/* Pantry Live: the one stylesheet, drawn after how food delivery apps such
   as Uber Eats are actually built: a white page, black type, photos that sit
   straight on the page with small corners, one gray for quiet surfaces,
   hairline dividers, black main buttons, and colour only where it means
   something (green for live and good news, red for Out). Tokens first,
   then shared parts, then pages. Phone first, with steps for small phones
   (under 360), tablets (from 700) and laptops (from 1100). */

/* Inter, self hosted: one variable file, weights 100 to 900. */
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f3f3;  /* pills, fields, steppers, photo backgrounds */
  --line: #e8e8e8;
  --text: #000000;
  --muted: #5e5e5e;
  --green: #06c167;      /* live, in stock, following, done */
  --green-ink: #05944f;  /* green text on white */
  --green-soft: #e7f7ee; /* behind small good news badges */
  --red: #e11900;        /* Out and release only */
  --brand: #000000;      /* main buttons and the bag bar */
  --on-brand: #ffffff;
  --radius: 12px;
  --gutter: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* ---------- Type ---------- */

.micro { font-size: 15px; font-weight: 700; color: var(--text); }
.muted { color: var(--muted); }
.title { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; overflow-wrap: anywhere; text-wrap: balance; }
.lede { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.lede b { color: var(--text); font-weight: 600; }
.hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

/* Section header: bold title, gray line under it. */
.section-title { margin: 26px 0 12px; }
.section-title h2 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.section-title p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }

/* The logo: a pantry shelf with goods (public/icons/logo.svg). */
.logo { width: 26px; height: 26px; flex: none; border-radius: 6px; }

/* Live dot. */
.live { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.live.on { color: var(--green-ink); }
.live.on::before { background: var(--green); }
/* The Live dot breathes while the board is listening. */
#live.on::before { animation: breathe 2s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 5px rgb(6 193 103 / 0.18); } }
@media (prefers-reduced-motion: reduce) { #live::before { animation: none; } .card .photo { transition: none; } }
.live:empty { display: none; }

/* Open or closed, as a pill under the board title. */
#openLine { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.status {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); font-size: 14px; font-weight: 600;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.on { background: var(--green-soft); color: var(--green-ink); }

/* ---------- Bars ---------- */

.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) var(--gutter) 10px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.topbar .brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.topbar .logo { width: 28px; height: 28px; }
.back { background: none; border: 0; padding: 0; min-height: 44px; font-weight: 600; font-size: 16px; color: var(--text); }
.pill-tag { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); }
.pill-tag.muted { color: var(--muted); }
.bar-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; }

/* ---------- Buttons ---------- */

.btn {
  display: flex; align-items: center; justify-content: center; width: 100%;
  min-height: 52px; padding: 0 18px; border-radius: 8px; border: 0;
  font-size: 16px; font-weight: 600; text-decoration: none; text-align: center;
}
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:disabled { background: var(--surface-2); color: #a6a6a6; cursor: default; }
.btn-quiet { background: var(--surface-2); color: var(--text); }
.btn-text { background: none; color: var(--text); min-height: 44px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.btn-danger { background: none; color: var(--red); min-height: 44px; font-weight: 600; width: 100%; }

/* The + on a photo: white circle, black plus. */
.round {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgb(0 0 0 / 0.08);
  background: var(--surface); color: var(--text);
  display: grid; place-items: center; font-size: 22px; font-weight: 500; line-height: 1;
}

/* Small pills: Following, Tell me, Bag. */
.tag-green {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 999px; border: 0;
  background: var(--green-soft); color: var(--green-ink); font-weight: 600; font-size: 13px;
}
.tag-line {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 999px; border: 0;
  background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 13px;
}
.pill-light { height: 36px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--brand); color: var(--on-brand); font-weight: 600; font-size: 14px; }

/* Good news badge: best by dates. */
.badge {
  display: inline-block; margin-top: 4px; padding: 2px 6px; border-radius: 4px;
  background: var(--green-soft); color: var(--green-ink); font-size: 12px; font-weight: 600;
}

/* ---------- Steppers and fields ---------- */

.stepper {
  display: inline-grid; grid-template-columns: 40px 44px 40px; height: 40px; flex: none;
  border-radius: 999px; overflow: hidden; background: var(--surface-2);
}
.stepper button { border: 0; background: transparent; font-size: 18px; font-weight: 500; }
.stepper button:disabled { opacity: 0.3; }
.stepper input, .stepper output {
  width: 100%; border: 0; background: transparent; text-align: center;
  font-weight: 600; font-size: 16px; display: grid; place-items: center;
}
.stepper input:focus { outline: none; }
.stepper input.empty { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.stepper.mini { grid-template-columns: 32px 24px 32px; height: 34px; background: var(--surface); border: 1px solid rgb(0 0 0 / 0.08); }
.stepper.mini output { font-size: 14px; }

.field {
  width: 100%; height: 50px; padding: 0 16px; border-radius: 8px;
  border: 0; background: var(--surface-2); font-size: 16px;
}
.field::placeholder { color: var(--muted); }
.field:focus { outline: none; box-shadow: inset 0 0 0 2px var(--text); }
.search { margin-top: 16px; border-radius: 999px; }

/* ---------- Rows ---------- */

.rows { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row > div:first-child, .row .left { min-width: 0; }
.row .name { font-weight: 600; overflow-wrap: anywhere; }
.row .sub { font-size: 13px; color: var(--muted); }
.row .left { display: flex; align-items: center; gap: 12px; }
.section-head { display: flex; justify-content: space-between; gap: 12px; margin: 22px 0 8px; }
.thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--surface-2); flex: none; }
.qty { font-size: 16px; font-weight: 600; white-space: nowrap; }
.qty small { font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.box-card .row:last-child { border-bottom: 0; }
.row-end { display: flex; align-items: center; gap: 10px; flex: none; }
.field.area { height: 150px; padding: 12px 16px; line-height: 1.45; resize: vertical; }

/* ---------- Item cards: the photo is the card ---------- */

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
.card { position: relative; display: flex; flex-direction: column; text-align: left; min-width: 0; }
.card-open { position: absolute; inset: 0; z-index: 1; border: 0; background: transparent; padding: 0; }
.card .pic { position: relative; }
.card .photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); }
.card.out .photo { filter: grayscale(1); opacity: 0.5; }
.card .act { position: absolute; z-index: 2; }
.card .pic .act { right: 8px; bottom: 8px; }
.card .bagtag {
  position: absolute; z-index: 2; left: 8px; top: 8px; padding: 3px 8px; border-radius: 4px;
  background: var(--text); color: var(--on-brand); font-size: 12px; font-weight: 700;
}
/* Photos answer a touch: a small press on phones, a slow zoom on laptops. */
.card .pic { overflow: hidden; border-radius: var(--radius); }
.card .photo { transition: transform 0.35s ease; }
.card:active .photo { transform: scale(0.97); }
@media (hover: hover) { .card:hover .photo { transform: scale(1.04); } }
.card .body { position: relative; padding-top: 8px; }
.card .name { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.card .count { font-size: 14px; font-weight: 600; margin-top: 1px; }
.card .count.out { color: var(--red); }
.card .count.in { color: var(--green-ink); }
.card .when { font-size: 13px; color: var(--muted); }
.card .body .act { position: relative; z-index: 2; margin-top: 8px; }

/* A grouped category: one card across the row that drops down to its kinds. */
.group { grid-column: 1 / -1; border-radius: var(--radius); background: var(--surface-2); }
.group summary {
  list-style: none; display: flex; align-items: center; gap: 12px; padding: 10px; cursor: pointer; border-radius: var(--radius);
}
.group summary::-webkit-details-marker { display: none; }
.group-photo { width: 76px; height: 76px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface); }
.group-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.group-text .name { font-weight: 700; font-size: 16px; }
.group-text .count { font-size: 14px; font-weight: 600; }
.group-text .when { font-size: 13px; color: var(--muted); }
.group .chev { font-size: 18px; transition: transform 0.2s; padding: 0 6px; }
.group[open] .chev { transform: rotate(180deg); }
.kinds { padding: 0 10px 4px; }
.kind { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.kind-open { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 0; border: 0; background: none; text-align: left; }
.kind-open img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface); }
.kind-open > span { display: flex; flex-direction: column; min-width: 0; }
.kind .name { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.kind .sub { font-size: 13px; color: var(--muted); }
.kind.out .sub { color: var(--red); }
.kind.out img { filter: grayscale(1); opacity: 0.5; }
.kind-act { flex: none; }

/* ---------- Board ---------- */

.page { padding: calc(12px + env(safe-area-inset-top)) var(--gutter) 110px; max-width: 1240px; margin: 0 auto; }
.board-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 28px; }
.board-head .brandline { display: flex; align-items: center; gap: 8px; }
.board-head .side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.board-head .side .tag-line { height: 36px; padding: 0 16px; font-size: 14px; }
.board-title { margin-top: 10px; font-size: 28px; }
.board-hours { display: none; }
.bubbles.board-chips { margin-top: 18px; }

/* Categories: a small photo with a label, no rings. */
.bubbles { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.bubbles::-webkit-scrollbar { display: none; }
.bubble {
  flex: none; width: 76px; padding: 0 0 8px; border: 0; background: none;
  display: flex; flex-direction: column; align-items: center; gap: 6px; border-bottom: 2px solid transparent;
}
.bubble-img {
  width: 56px; height: 56px; border-radius: 12px; overflow: hidden; display: grid; place-items: center;
  background: var(--surface-2); font-weight: 700; font-size: 17px;
}
.bubble-img img { width: 100%; height: 100%; object-fit: cover; }
.bubble-img.all { background: none; }
.bubble-label { font-size: 13px; color: var(--text); }
.bubble[aria-pressed="true"] { border-bottom-color: var(--text); }
.bubble[aria-pressed="true"] .bubble-label { font-weight: 700; }

/* New on the shelf today: a row of wide photo cards. */
.today-row { margin: 0; }
.tiles { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.tiles::-webkit-scrollbar { display: none; }
.tile { flex: none; width: min(220px, 62vw); padding: 0; border: 0; background: none; text-align: left; }
.tile img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); }
.tile-name { display: block; padding-top: 8px; font-weight: 600; font-size: 15px; }
.tile-when { display: block; font-size: 13px; color: var(--muted); }

/* Floating bag bar. */
.bagbar {
  position: fixed; left: var(--gutter); right: var(--gutter);
  bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 56px; padding: 0 20px; border-radius: 8px; border: 0;
  background: var(--brand); color: var(--on-brand); font-weight: 600; font-size: 16px;
  max-width: 560px; margin: 0 auto;
}
.only-phone-flex { display: flex; }

/* ---------- The email screen on first visit ---------- */

.join { position: fixed; inset: 0; z-index: 30; background: var(--bg); overflow-y: auto; }
.join-box {
  max-width: 440px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center;
  padding: calc(24px + env(safe-area-inset-top)) var(--gutter) calc(24px + env(safe-area-inset-bottom));
}
.join .brandline { display: flex; align-items: center; gap: 8px; }
.join-food { display: flex; margin-top: 28px; }
.join-food img {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid var(--bg);
  background: var(--surface-2); margin-left: -12px;
}
.join-food img:first-child { margin-left: 0; }
.join-line { margin: 28px 0 0; font-size: 22px; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }

/* ---------- Sheets ---------- */

.scrim { position: fixed; inset: 0; z-index: 20; background: rgb(0 0 0 / 0.4); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21;
  max-height: 92dvh; overflow-y: auto; max-width: 560px; margin: 0 auto;
  padding: 10px var(--gutter) calc(20px + env(safe-area-inset-bottom));
  background: var(--surface); border-radius: 16px 16px 0 0;
}
.sheet .grab { width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 14px; }
.sheet .shot-lg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); }
.shot-wrap { position: relative; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: 16px; }
.sheet-head h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.sheet-head .big { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.sheet-head .big small { display: block; margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; text-align: right; }
.sheet .say-line { margin: 12px 0 0; font-size: 15px; }
.howmany { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 20px 0; font-weight: 600; font-size: 16px; }

/* ---------- Code screen ---------- */

.code { margin-top: 22px; text-align: center; font-size: clamp(56px, 22vw, 88px); font-weight: 700; letter-spacing: 0.06em; line-height: 1; }
.qr { width: 168px; height: 168px; margin: 18px auto 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.qr svg { width: 100%; height: 100%; display: block; }

/* ---------- Staff ---------- */

.staff-page { padding: 18px var(--gutter) calc(24px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; }
.foot-actions { position: sticky; bottom: 0; padding-top: 12px; padding-bottom: env(safe-area-inset-bottom); background: var(--bg); }
.box-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 18px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2);
}
.box-card > div { min-width: 0; }
.box-card .name { font-weight: 600; font-size: 17px; }
.links { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); margin-top: 8px; font-size: 15px; }
.links a, .links button { color: var(--muted); background: none; border: 0; padding: 10px 2px; text-decoration: none; font-size: 15px; }

/* Sign in. */
.pin-wrap { min-height: calc(100dvh - 150px); display: flex; flex-direction: column; justify-content: center; }
.pin { position: relative; display: flex; gap: 8px; margin-top: 22px; width: max-content; max-width: 100%; }
.pin span {
  width: 48px; height: 56px; border-radius: 8px; background: var(--surface-2);
  display: grid; place-items: center; font-size: 22px; font-weight: 700;
}
.pin span.next { box-shadow: inset 0 0 0 2px var(--text); }
.pin input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; font-size: 16px; caret-color: transparent; border: 0; }
.pin.shake { animation: shake 0.3s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.say { margin: 14px 0 0; font-size: 14px; min-height: 20px; }

/* Who is on the shelf. */
.names { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.name-pill { height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--surface-2); font-size: 16px; font-weight: 600; }
.name-pill[aria-pressed="true"] { background: var(--text); color: var(--on-brand); }

/* Reading and review. */
.shot { position: relative; width: fit-content; max-width: 100%; margin: 0 auto; border-radius: var(--radius); overflow: hidden; }
.shot img { max-width: 100%; max-height: 46dvh; width: auto; }
.shot svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.shot svg rect { fill: none; stroke: var(--green); stroke-width: 2; stroke-opacity: 0.75; vector-effect: non-scaling-stroke; }
.shot svg rect.sel { stroke-width: 3; stroke-opacity: 1; }
#reviewShot { cursor: crosshair; }
#reviewRows .row.active { box-shadow: inset 3px 0 0 var(--text); padding-left: 12px; }
.boxtag {
  position: absolute; transform: translateY(calc(-100% - 3px)); white-space: nowrap;
  padding: 2px 7px; border-radius: 4px; background: var(--text); color: var(--on-brand); font-size: 12px; font-weight: 700;
}
.working { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-weight: 600; font-size: 17px; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--text); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bar { height: 4px; border-radius: 2px; background: var(--surface-2); margin-top: 14px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--text); transition: width 6s cubic-bezier(0.1, 0.6, 0.3, 1); }
.edit-name { width: 100%; border: 0; background: transparent; padding: 0; font-weight: 600; font-size: 17px; }
.edit-name:focus { outline: none; }
.edit-name::placeholder { color: var(--muted); }
.catpick { position: relative; display: inline-flex; color: var(--text); font-weight: 600; }
.catpick select { position: absolute; inset: 0; opacity: 0; font-size: 16px; }
.add-line { margin-top: 14px; height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--surface-2); font-weight: 600; }
.bestby { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.bestby input { background: var(--surface-2); border: 0; border-radius: 6px; color: var(--text); padding: 5px 8px; font-size: 16px; max-width: 100%; }

/* Desk. */
.pick { width: 100%; background: none; border: 0; text-align: left; display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pick .code-sm { font-size: 20px; font-weight: 700; letter-spacing: 0.04em; }
.pick .name { font-weight: 600; font-size: 16px; }
.pick.done .name, .pick.done .code-sm { color: var(--muted); }
.tick {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface-2);
  display: grid; place-items: center; color: var(--on-brand); font-size: 17px; font-weight: 800; flex: none;
}
.tick[aria-pressed="true"] { background: var(--green); }
.tick.static { width: 32px; height: 32px; background: var(--green); opacity: 0.8; }

/* Published. */
.title.done { color: var(--green-ink); }
#pubRows .row:last-child { border-bottom: 0; }
.instock { color: var(--green-ink); font-weight: 600; margin-left: 16px; white-space: nowrap; }
.instock.out { color: var(--red); }

/* ---------- System page (projector) ---------- */

.sys { padding: 24px var(--gutter); max-width: 1600px; margin: 0 auto; }
.sys-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px 20px; }
.sys .title { font-size: 30px; }
.sys .live { font-size: 16px; }
.lane-label { margin: 24px 0 10px; font-size: 15px; color: var(--muted); }
.lane-label b { color: var(--text); margin-right: 10px; }
.lane { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lane.out { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.node {
  min-height: 150px; padding: 16px; border-radius: var(--radius); background: var(--surface-2); min-width: 0;
  display: flex; flex-direction: column; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow 0.3s;
}
.node.lit { box-shadow: inset 0 0 0 2px var(--green); background: var(--surface); }
.node.ghost { background: none; box-shadow: inset 0 0 0 1px var(--line); }
.node .micro { font-size: 13px; color: var(--muted); font-weight: 600; }
.node h3 { margin: 6px 0 6px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.node p { margin: 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.node time { margin-top: auto; padding-top: 12px; color: var(--green-ink); font-weight: 600; font-size: 14px; }
.log { margin-top: 24px; border-top: 1px solid var(--line); }
.log-row { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.log-row .t, .log-row .who { color: var(--muted); }
.log-row > span:last-child { grid-column: 1 / -1; overflow-wrap: anywhere; }

/* ---------- Small phones (under 360 wide) ---------- */

@media (max-width: 359px) {
  :root { --gutter: 12px; }
  .title, .board-title { font-size: 24px; }
  .grid { gap: 16px 10px; }
  .card .name { font-size: 14px; }
  .bubble { width: 68px; }
  .bubble-img { width: 50px; height: 50px; }
  .pin span { width: 42px; height: 52px; }
  .stepper { grid-template-columns: 36px 38px 36px; }
  .pick { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .pick .code-sm { font-size: 17px; }
  .bagbar { padding: 0 16px; font-size: 15px; }
}

/* ---------- Tablets (700 wide and up) ---------- */

@media (min-width: 700px) {
  :root { --gutter: 32px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 16px; }
  .title, .board-title { font-size: 34px; }
  .tile { width: 240px; }
  .sys .title { font-size: 38px; }
  .lane { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lane.out { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .log-row { grid-template-columns: 120px 200px minmax(0, 1fr); font-size: 16px; }
  .log-row > span:last-child { grid-column: auto; }
}

/* ---------- Laptops (1100 wide and up) ---------- */

.only-laptop { display: none; }

@media (min-width: 1100px) {
  :root { --gutter: 64px; }
  .page { max-width: none; }
  .only-laptop { display: revert; }
  .only-phone, .only-phone-flex { display: none; }
  .board-head .side .live.only-laptop { display: inline-flex; font-size: 15px; }
  .title { font-size: 44px; }
  .board-title { font-size: 44px; margin-top: 8px; }
  .lede.only-laptop { display: block; font-size: 17px; margin-top: 6px; }
  .board-hours {
    display: flex; flex-wrap: wrap; gap: 6px 32px; margin: 20px 0 0; padding: 0 0 20px;
    border-bottom: 1px solid var(--line); font-size: 15px;
  }
  .board-hours b { font-weight: 700; }
  .search { max-width: 440px; margin-top: 24px; }
  .bubble { width: 92px; }
  .bubble-img { width: 72px; height: 72px; }
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px 20px; }
  .tile { width: 280px; }
  .card .name { font-size: 16px; }
  .round { width: 40px; height: 40px; }
  .sys { padding: 32px 40px; }
  .sys .title { font-size: 44px; }
  .sys .live { font-size: 18px; }
  .lane { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
  .lane.out { grid-template-columns: repeat(3, minmax(0, 1fr)) 2fr; }
  .node { min-height: 170px; padding: 18px 20px; }
  .node h3 { font-size: 21px; }
  .node p { font-size: 15px; }
  .log-row { grid-template-columns: 160px 240px minmax(0, 1fr); font-size: 18px; }
}
