/* LunchLine
   Warm cream and deep brown, one school color doing the work. The color comes
   from the school (js/theme.js sets --brand and friends); everything else here
   is fixed. Contrast: text on brand uses --brand-ink, brand-colored text uses
   --brand-text, both worked out in JS so any color a school picks stays readable. */

@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/public-sans-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/public-sans-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Public Sans"; font-style: italic; font-weight: 100 900; font-display: swap; src: url("/fonts/public-sans-latin-wght-italic.woff2") format("woff2"); }

:root {
  color-scheme: light;
  /* set by js/theme.js; these are the orange defaults */
  --brand: #FF5A1F; --brand-ink: #20150D; --brand-text-l: #B33F0C; --brand-text-d: #FF8A5C;
  --rail: #2B1D14; --rail-2: #3A291C;

  --bg: #FFF6EA; --bg-2: #F8E9D3; --surface: #FFFFFF; --surface-2: #FFFBF5;
  --ink: #2B1D14; --ink-2: #6B5848; --faint: #786556;
  --line: #EEDFCA; --line-2: #DCC9AE;
  --brand-text: var(--brand-text-l);
  --brand-soft: color-mix(in srgb, var(--brand) 14%, var(--surface));
  --brand-soft-2: color-mix(in srgb, var(--brand) 26%, var(--surface));

  --good: #1E8E4E; --good-t: #16693A; --good-s: #E2F4E9;
  --mid: #8A8378;  --mid-t: #5F594F;  --mid-s: #EEECE7;
  --bad: #D13B2F;  --bad-t: #AD2219;  --bad-s: #FBE5E2;
  --amber: #9A5200; --amber-s: #FFEFD0;

  --r-s: 10px; --r-m: 16px; --r-l: 24px; --r-xl: 32px;
  --sh-1: 0 1px 2px rgba(43, 29, 20, .06), 0 6px 18px rgba(43, 29, 20, .08);
  --sh-2: 0 14px 40px rgba(43, 29, 20, .18);
  --ring: 0 0 0 3px color-mix(in srgb, var(--brand-text) 45%, transparent);
  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.45; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; min-height: 100dvh; position: relative;
}
body::before { /* soft blobs in the school's color, like the splash in a leather menu */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 60vmax at -12% -12%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 62%),
    radial-gradient(48vmax 48vmax at 112% 24%, color-mix(in srgb, var(--brand) 11%, transparent), transparent 62%),
    radial-gradient(40vmax 40vmax at 30% 120%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 62%);
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brand-text); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 100; font-weight: 700; }
.skip:focus { top: 12px; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--mono); letter-spacing: .04em; }
.muted { color: var(--ink-2); } .small { font-size: .85rem; }
.boot { text-align: center; padding: 30vh 20px 0; color: var(--ink-2); font-weight: 600; }
#main { outline: none; }

/* ---------- buttons, inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 20px;
  border-radius: 14px; font-weight: 750; border: 1.5px solid transparent; text-decoration: none; transition: transform .12s, filter .15s, background .15s; line-height: 1.1; text-align: center;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .5; }
.btn.primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 35%, transparent); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn.secondary { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn.secondary:hover:not(:disabled) { border-color: var(--brand-text); }
.btn.ghost { color: var(--brand-text); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.danger-ghost { color: var(--bad-t); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn.light { background: #FFF6EA; color: #2B1D14; }
.btn.ghost-light { color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn.on-brand { background: var(--brand-ink); color: var(--brand); border-color: transparent; }
.btn.lg { min-height: 54px; padding: 14px 26px; font-size: 1.05rem; border-radius: 16px; }
.btn.sm { min-height: 40px; padding: 8px 14px; font-size: .9rem; border-radius: 12px; }
.btn.xs { min-height: 32px; padding: 4px 10px; font-size: .8rem; border-radius: 10px; }
.btn.block { width: 100%; }
.link { color: var(--brand-text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 6px; }
.link.center { display: flex; justify-content: center; margin: 16px auto 0; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; }
.icon-btn:hover { background: var(--brand-soft); }
.icon-btn.outlined { border: 1.5px solid var(--line-2); background: var(--surface); }
.icon-btn.danger { color: var(--bad-t); }
.icon-btn.on-dark { color: #fff; } .icon-btn.on-dark:hover { background: rgba(255, 255, 255, .12); }
.ghost-space { visibility: hidden; }
.chip-btn { display: inline-flex; gap: 6px; align-items: center; min-height: 40px; padding: 6px 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--sh-1); font-weight: 800; font-size: .85rem; }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.row-btns.center { justify-content: center; }

.input { width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; }
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; border-color: var(--brand-text); box-shadow: var(--ring); }
.input.sm { min-height: 40px; padding: 6px 12px; border-radius: 12px; }
.input.lg { min-height: 56px; font-size: 1.1rem; }
textarea.input { resize: vertical; min-height: 84px; }
.label { display: block; font-weight: 750; font-size: .88rem; margin: 16px 0 6px; }
.label.sub-label { margin-top: 12px; font-weight: 650; }
.req { color: var(--bad-t); font-weight: 650; font-size: .78rem; margin-left: 6px; }
.help { color: var(--ink-2); font-size: .85rem; margin-top: 8px; display: flex; gap: 6px; align-items: flex-start; }
.help .i { width: 16px; height: 16px; margin-top: 2px; }
.err { color: var(--bad-t); font-weight: 650; min-height: 1.4em; margin-top: 10px; }
.fine { color: var(--ink-2); font-size: .8rem; display: flex; gap: 8px; align-items: flex-start; margin: 14px 2px; }
.fine .i { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.fine.left { justify-content: flex-start; }
.search { position: relative; } .search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search .input { padding-left: 44px; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--bg-2); border-radius: 16px; padding: 4px; margin: 12px 0; }
.seg button { padding: 8px 16px; border-radius: 12px; font-weight: 750; display: inline-flex; gap: 6px; align-items: center; min-height: 40px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.seg-n { font-size: .75rem; background: var(--bg); padding: 1px 7px; border-radius: 99px; }
.seg.mini button { min-height: 32px; padding: 4px 10px; font-size: .8rem; }
.seg.narrow { max-width: 100%; }

.toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle { padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--surface); font-weight: 700; min-height: 40px; }
.toggle[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--ink); box-shadow: inset 0 0 0 1px var(--brand); }
.toggle:disabled { opacity: .6; }
.fs { border: 0; padding: 0; margin: 18px 0 0; min-width: 0; } .fs legend { padding: 0; }

.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; cursor: pointer; }
.check-box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line-2); background: var(--surface); display: grid; place-items: center; flex: none; color: transparent; }
.check input:checked + .check-box { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.check input:focus-visible + .check-box { outline: 3px solid var(--brand-text); outline-offset: 2px; }
.check-text { display: flex; flex-direction: column; font-size: .88rem; color: var(--ink-2); } .check-text strong { color: var(--ink); font-size: .95rem; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 750; }
.pill .i { width: 14px; height: 14px; }
.pill.v-good { background: var(--good-s); color: var(--good-t); } .pill.v-mid { background: var(--mid-s); color: var(--mid-t); } .pill.v-bad { background: var(--bad-s); color: var(--bad-t); }
.v-good { color: var(--good-t); } .v-mid { color: var(--mid-t); } .v-bad { color: var(--bad-t); }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; margin-top: 12px; font-size: .92rem; }
.alert .i { margin-top: 1px; }
.alert.danger { background: var(--bad-s); color: var(--bad-t); border: 1.5px solid color-mix(in srgb, var(--bad) 50%, transparent); }
.alert.caution { background: var(--amber-s); color: var(--amber); border: 1.5px solid color-mix(in srgb, var(--amber) 40%, transparent); }
.alert.info { background: var(--brand-soft); color: var(--ink); }
.alert p { color: inherit; }
.notice { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border-radius: 18px; padding: 12px 14px; margin: 18px 0; color: var(--ink-2); font-size: .85rem; box-shadow: var(--sh-1); }
.notice .i { margin-top: 1px; color: var(--brand-text); } .notice strong { color: var(--ink); }

.empty { background: var(--surface); border: 1.5px dashed var(--line-2); border-radius: 22px; padding: 28px 18px; text-align: center; color: var(--ink-2); display: grid; gap: 12px; justify-items: center; margin: 14px 0; }
.empty.slim { padding: 16px; } .empty.big { padding: 36px 18px; }
.big-code { font-family: var(--mono); font-size: 2.4rem; font-weight: 900; letter-spacing: .2em; color: var(--ink); }

.skel-list { display: grid; gap: 12px; margin-top: 16px; } .skel-list.grid { grid-template-columns: 1fr 1fr; } .skel-list.bento { grid-template-columns: 1fr 1fr; }
.skel { height: 150px; border-radius: 22px; background: linear-gradient(100deg, var(--bg-2) 30%, var(--surface) 50%, var(--bg-2) 70%) 0 0 / 200% 100%; animation: shimmer 1.3s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.28); } 100% { transform: scale(1); } }
@keyframes slide-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 24px); opacity: 0; pointer-events: none; z-index: 80;
  display: flex; align-items: center; gap: 14px; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 16px; box-shadow: var(--sh-2); font-weight: 650; font-size: .92rem; max-width: min(92vw, 460px); transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast.error { background: var(--bad); color: #fff; }
.toast-act { color: var(--brand); font-weight: 800; text-decoration: underline; padding: 4px; }
body[data-mode="admin"] .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { body[data-mode="admin"] .toast { bottom: 24px; } }

/* sheets and modals */
dialog { color: var(--ink); }
dialog::backdrop { background: rgba(24, 14, 7, .6); backdrop-filter: blur(3px); animation: fade .2s; }
dialog.sheet { border: 0; padding: 0; margin: auto auto 0; width: min(100%, 620px); max-height: 94dvh; border-radius: 30px 30px 0 0; background: var(--bg); box-shadow: var(--sh-2); overflow: auto; animation: slide-up .28s ease-out; overscroll-behavior: contain; }
@media (min-width: 720px) { dialog.sheet { margin: auto; border-radius: 30px; max-height: 90dvh; } }
dialog.modal { border: 0; border-radius: 26px; padding: 0; width: min(92vw, 440px); background: var(--surface); box-shadow: var(--sh-2); animation: slide-up .2s; }
.modal-in { padding: 24px; } .modal-in h2 { font-size: 1.25rem; } .modal-body { color: var(--ink-2); margin-top: 8px; }
.modal-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.sheet-form { padding: 24px; } .sheet-form h2 { font-size: 1.3rem; margin-bottom: 6px; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; position: sticky; top: 0; background: var(--bg); z-index: 5; border-bottom: 1px solid var(--line); }
.sheet-title { flex: 1; min-width: 0; } .sheet-title h2 { font-size: 1.15rem; } .sheet-sub { color: var(--ink-2); font-size: .82rem; }
.sheet-body { padding: 4px 18px 28px; }

/* ================= flows (join, staff sign-in) ================= */
body.is-ob { background: var(--rail); }
body.is-ob::before { display: none; }
.fl { min-height: 100dvh; display: flex; flex-direction: column; background: linear-gradient(180deg, var(--rail), var(--rail-2)); color: #fff; position: relative; overflow: clip; }
.fl-blobs { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fl-top { position: relative; display: flex; align-items: center; justify-content: space-between; padding: max(10px, env(safe-area-inset-top)) 10px 0; }
.fl-brand { display: inline-flex; gap: 8px; align-items: center; font-weight: 850; letter-spacing: -.01em; }
.fl-hero { position: relative; display: grid; place-items: center; padding: 14px 20px 58px; }
.stitch { width: min(440px, 100%); border: 2px dashed rgba(255, 255, 255, .38); border-radius: 24px; padding: 22px 16px; text-align: center; display: grid; gap: 4px; justify-items: center; }
.stitch-logo { margin-bottom: 4px; }
.stitch-name { font-size: clamp(1.7rem, 7vw, 2.4rem); font-weight: 900; letter-spacing: -.03em; line-height: 1.05; }
.stitch-k { color: rgba(255, 255, 255, .86); font-size: .9rem; font-weight: 600; }
.fl-card { position: relative; width: min(580px, 100%); align-self: center; flex: 1; margin-top: -34px; background: var(--bg); color: var(--ink); border-radius: 34px 34px 0 0; padding: 26px 22px max(28px, env(safe-area-inset-bottom)); box-shadow: 0 -14px 44px rgba(0, 0, 0, .3); display: flex; flex-direction: column; }
.fl.has-tabs .fl-card { display: grid; grid-template-columns: 46px minmax(0, 1fr); grid-template-rows: 1fr auto; column-gap: 6px; padding-left: 8px; }
.fl.has-tabs .fl-tabs { grid-column: 1; grid-row: 1 / span 2; }
.fl.has-tabs .fl-body { grid-column: 2; grid-row: 1; }
.fl.has-tabs .fl-foot { grid-column: 2; grid-row: 2; }
.fl-tabs { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
.fl-tabs button { writing-mode: vertical-rl; transform: rotate(180deg); padding: 18px 0; min-height: 110px; font-weight: 850; color: var(--faint); border-radius: 0 14px 14px 0; position: relative; letter-spacing: .02em; }
.fl-tabs button[aria-selected="true"] { color: var(--ink); background: var(--surface); box-shadow: var(--sh-1); }
.fl-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; top: 18%; bottom: 18%; width: 3px; background: var(--brand); border-radius: 0 3px 3px 0; }
.fl-body { flex: 1; min-width: 0; }
.fl-title { font-size: clamp(1.5rem, 5vw, 1.9rem); font-weight: 900; letter-spacing: -.03em; line-height: 1.1; }
.fl-lede { color: var(--ink-2); margin-top: 8px; }
.fl-h2 { font-size: 1.05rem; font-weight: 850; margin-top: 22px; }
.fl-foot { padding-top: 20px; display: grid; gap: 4px; }
.code-input { font-family: var(--mono); font-size: 1.7rem; letter-spacing: .32em; text-align: center; font-weight: 800; text-transform: uppercase; min-height: 62px; }
.chips-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pick { display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--surface); font-weight: 700; }
.pick .i { width: 16px; height: 16px; display: none; }
.pick[aria-pressed="true"] { background: var(--brand-soft-2); border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.pick[aria-pressed="true"] .i { display: block; color: var(--brand-text); }
.pick.g { min-width: 58px; justify-content: center; font-size: 1.1rem; font-weight: 850; } .pick.g.wide { padding: 8px 18px; font-size: 1rem; }
.other-field { margin-top: 6px; }
.results { margin-top: 8px; } .result-list { display: grid; gap: 8px; margin-top: 8px; }
.result { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--surface); box-shadow: var(--sh-1); font-weight: 750; text-align: left; }
.sent-card { display: flex; gap: 12px; align-items: center; background: var(--brand-soft); padding: 16px; border-radius: 18px; margin-top: 16px; } .sent-card .i { width: 28px; height: 28px; color: var(--brand-text); }
.dev-note { margin-top: 16px; padding: 14px; border: 1.5px dashed var(--line-2); border-radius: 16px; display: grid; gap: 10px; font-size: .88rem; }

/* ================= student / parent app ================= */
.app.student { display: grid; grid-template-columns: 58px minmax(0, 1fr); min-height: 100dvh; max-width: 640px; margin: 0 auto; background: var(--bg); position: relative; }
@media (min-width: 720px) { .app.student { margin: 24px auto; min-height: calc(100dvh - 48px); border-radius: 36px; box-shadow: var(--sh-2); overflow: clip; } }
.rail { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; align-items: center; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding: max(14px, env(safe-area-inset-top)) 0 14px; background: linear-gradient(180deg, var(--rail), var(--rail-2)); color: #fff; z-index: 10; border-radius: 0 28px 28px 0; }
@media (min-width: 720px) { .rail { height: calc(100dvh - 48px); } }
.rail::-webkit-scrollbar { display: none; }
.rail-mark { display: grid; place-items: center; margin-bottom: 8px; flex: none; }
.rail-list { flex: 1 0 auto; width: 100%; display: flex; flex-direction: column; justify-content: center; margin: auto 0; }
.rail-i { position: relative; display: flex; align-items: center; justify-content: center; padding: 20px 0; color: rgba(255, 255, 255, .72); text-decoration: none; border-top: 1px solid rgba(255, 255, 255, .12); min-height: clamp(62px, 11dvh, 96px); cursor: pointer; transition: color .2s, background .2s; }
.rail-i:last-child { border-bottom: 1px solid rgba(255, 255, 255, .12); }
.rail-t { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 800; font-size: .92rem; letter-spacing: .05em; }
.rail-i.on { color: #fff; }
.rail-i.on::after { content: ""; position: absolute; right: 0; top: 16%; bottom: 16%; width: 4px; border-radius: 4px 0 0 4px; background: var(--brand); }
.rail-me { flex: none; margin-top: 10px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 92%, #fff 0%); color: var(--brand-ink); border: 2px solid rgba(255, 255, 255, .35); }
.rail-me.on { box-shadow: 0 0 0 3px rgba(255, 255, 255, .5); }
.stage { min-width: 0; padding: max(14px, env(safe-area-inset-top)) 14px 40px; }
.st-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.st-id { min-width: 0; } .st-k { color: var(--ink-2); font-size: .8rem; font-weight: 650; }
.st-school { font-size: 1.45rem; font-weight: 900; letter-spacing: -.03em; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 14px 0 6px; }
.page-head h1 { font-size: clamp(1.5rem, 5vw, 2rem); font-weight: 900; letter-spacing: -.035em; line-height: 1.08; }
.eyebrow { color: var(--ink-2); font-weight: 700; font-size: .82rem; margin-bottom: 2px; }
.page-head .sub { color: var(--ink-2); margin-top: 6px; }

.week-bar { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 4px; }
.week-label { display: flex; flex-direction: column; align-items: center; line-height: 1.15; } .week-label strong { font-size: .95rem; } .week-label span { color: var(--ink-2); font-size: .8rem; }
.days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 6px 0 18px; }
.day { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 0 7px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); min-height: 64px; box-shadow: var(--sh-1); }
.day-w { font-size: .72rem; color: var(--ink-2); font-weight: 700; } .day-n { font-size: 1.15rem; font-weight: 850; }
.day-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); margin-top: 2px; } .day-dot.off { opacity: .3; }
.day.can-rate .day-dot { background: var(--good); }
.day.is-today .day-w { color: var(--brand-text); font-weight: 850; }
.day[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 8px 18px color-mix(in srgb, var(--brand) 35%, transparent); }
.day[aria-pressed="true"] .day-w { color: var(--brand-ink); } .day[aria-pressed="true"] .day-dot { background: var(--brand-ink); }

/* banner carousel */
.carousel { margin: 6px -14px 4px; }
.banners { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 14px 8px; scrollbar-width: none; scroll-padding: 0 14px; }
.banners::-webkit-scrollbar { display: none; }
.banner { flex: 0 0 min(86%, 440px); scroll-snap-align: start; position: relative; overflow: hidden; min-height: 148px; border-radius: 26px; padding: 18px; display: flex; text-decoration: none; background: var(--brand); color: var(--brand-ink); box-shadow: 0 12px 28px color-mix(in srgb, var(--brand) 30%, transparent); }
.banner::before { content: ""; position: absolute; right: -40px; top: -50px; width: 190px; height: 190px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.banner::after { content: ""; position: absolute; left: -30px; bottom: -60px; width: 130px; height: 130px; border-radius: 50%; background: rgba(0, 0, 0, .06); }
.b-soon, .b-reply { background: linear-gradient(135deg, var(--rail), var(--rail-2)); color: #fff; box-shadow: 0 12px 28px rgba(0, 0, 0, .25); }
.b-idea { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); border: 1.5px solid var(--line); }
.b-idea::before { background: var(--brand-soft-2); }
.b-allergy { background: var(--amber-s); color: var(--amber); box-shadow: var(--sh-1); border: 1.5px solid color-mix(in srgb, var(--amber) 35%, transparent); }
.b-allergy::before { background: color-mix(in srgb, var(--amber) 14%, transparent); }
.bn-text { position: relative; z-index: 1; max-width: 62%; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.bn-big { font-size: 2.3rem; font-weight: 950; line-height: .95; letter-spacing: -.045em; }
.bn-title { font-weight: 850; font-size: 1.02rem; line-height: 1.2; margin-top: 4px; }
.bn-sub { font-size: .84rem; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bn-bar { display: block; width: 100%; height: 7px; border-radius: 7px; margin-top: 10px; background: color-mix(in srgb, currentColor 25%, transparent); }
.bn-bar span { display: block; height: 100%; border-radius: 7px; background: currentColor; transition: width .4s ease; }
.bn-img { position: absolute; right: -16px; bottom: -18px; width: 44%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 5px solid rgba(255, 255, 255, .6); box-shadow: 0 12px 28px rgba(0, 0, 0, .3); }
.bn-ico { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .18); }
.bn-ico .i { width: 36px; height: 36px; }
.b-idea .bn-ico { background: var(--brand-soft-2); color: var(--brand-text); }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 2px; }
.dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); transition: width .25s, background .25s; }
.dots span.on { width: 20px; border-radius: 8px; background: var(--brand-text); }

.meal-head { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 2px 10px; }
.meal-t { font-size: 1.25rem; font-weight: 900; letter-spacing: -.025em; } .meal-n { color: var(--ink-2); font-size: .85rem; font-weight: 650; }

.dish-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 349px) { .dish-grid { grid-template-columns: 1fr; } }
.dc { display: flex; flex-direction: column; background: var(--surface); border-radius: 22px; box-shadow: var(--sh-1); overflow: hidden; position: relative; transition: transform .15s, box-shadow .15s; }
.dc:has(.dc-open:hover) { transform: translateY(-2px); box-shadow: var(--sh-2); }
.dc.is-warn { box-shadow: 0 0 0 2.5px var(--bad), var(--sh-1); } .dc.is-caution { box-shadow: 0 0 0 2.5px var(--amber), var(--sh-1); }
.dc-open { display: block; width: 100%; text-align: left; padding: 10px 10px 0; }
.dc-photo { display: block; position: relative; aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: var(--bg-2); }
.dc-photo img { width: 100%; height: 100%; object-fit: cover; }
.dc-noimg { width: 100%; height: 100%; display: grid; place-items: center; color: var(--faint); } .dc-noimg .i { width: 36px; height: 36px; }
.dc-flag { position: absolute; top: 8px; left: 8px; right: 8px; display: inline-flex; gap: 4px; align-items: center; padding: 4px 9px; border-radius: 99px; font-size: .72rem; font-weight: 850; width: max-content; max-width: calc(100% - 16px); }
.dc-flag .i { width: 13px; height: 13px; flex: none; }
.dc-flag.danger { background: var(--bad); color: #fff; } .dc-flag.caution { background: var(--amber-s); color: var(--amber); }
.dc-badge { position: absolute; left: 8px; bottom: 8px; display: inline-flex; gap: 4px; align-items: center; padding: 4px 9px; border-radius: 99px; font-size: .7rem; font-weight: 800; background: rgba(255, 255, 255, .94); color: #2B1D14; max-width: calc(100% - 16px); }
.dc-badge .i { width: 12px; height: 12px; color: var(--brand-text-l); flex: none; }
.dc-body { display: block; text-align: center; padding: 10px 2px 10px; }
.dc-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 850; font-size: .95rem; line-height: 1.2; min-height: 2.4em; }
.dc-sub { display: block; color: var(--ink-2); font-size: .78rem; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-foot { margin-top: auto; padding: 9px 10px; background: var(--brand-soft-2); min-height: 58px; display: grid; align-items: center; }
.rb-row { display: flex; justify-content: center; gap: 7px; }
.rb { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid; transition: transform .12s, background .15s; }
.rb:active { transform: scale(.9); }
.rb .i { width: 20px; height: 20px; }
.rb.r-good { border-color: var(--good); color: var(--good-t); } .rb.r-mid { border-color: var(--mid); color: var(--mid-t); } .rb.r-bad { border-color: var(--bad); color: var(--bad-t); }
.rb.r-good.on { background: var(--good); color: #fff; } .rb.r-mid.on { background: var(--mid); color: #fff; } .rb.r-bad.on { background: var(--bad); color: #fff; }
.rb-row:has(.on) .rb:not(.on) { opacity: .55; }
.rb.pop { animation: pop .38s ease; }
.dc-note { display: flex; justify-content: center; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; color: var(--ink-2); text-align: center; }
.dc-note .i { width: 15px; height: 15px; }

/* dish sheet */
.ds-photo { position: relative; aspect-ratio: 4 / 3; background: var(--bg-2); border-radius: 0 0 0 0; overflow: hidden; }
.ds-photo img { width: 100%; height: 100%; object-fit: cover; }
.ds-x { position: absolute; top: 12px; right: 12px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .94); color: #2B1D14; box-shadow: var(--sh-1); }
.ds-body { padding: 18px 18px 30px; }
.ds-meta { display: flex; flex-wrap: wrap; gap: 6px; } .ds-meta span { background: var(--bg-2); padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; color: var(--ink-2); }
.ds-name { font-size: 1.6rem; font-weight: 900; letter-spacing: -.03em; line-height: 1.1; margin-top: 10px; } .ds-desc { color: var(--ink-2); margin-top: 6px; }
.reply { display: flex; gap: 10px; align-items: flex-start; background: var(--brand-soft); padding: 12px 14px; border-radius: 16px; margin-top: 12px; } .reply .i { color: var(--brand-text); margin-top: 2px; } .reply-k { font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-text); }
.rate { margin-top: 18px; padding: 16px; background: var(--surface); border-radius: 22px; box-shadow: var(--sh-1); }
.rate-q { font-weight: 850; margin-bottom: 10px; }
.rate-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rate-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 18px; border: 2px solid; font-weight: 850; background: var(--surface); transition: transform .12s; }
.rate-btn:active { transform: scale(.96); } .rate-btn .i { width: 26px; height: 26px; }
.rate-btn.r-good { border-color: var(--good); color: var(--good-t); } .rate-btn.r-mid { border-color: var(--mid); color: var(--mid-t); } .rate-btn.r-bad { border-color: var(--bad); color: var(--bad-t); }
.rate-btn[aria-pressed="true"].r-good { background: var(--good); color: #fff; } .rate-btn[aria-pressed="true"].r-mid { background: var(--mid); color: #fff; } .rate-btn[aria-pressed="true"].r-bad { background: var(--bad); color: #fff; }
.rate-note { display: flex; gap: 8px; align-items: center; color: var(--ink-2); font-weight: 650; }
.comment { margin-top: 12px; } .comment-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; } .count { margin-right: auto; color: var(--ink-2); font-size: .8rem; }
.sent { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-top: 12px; background: var(--bg-2); padding: 10px 12px; border-radius: 14px; } .sent p { display: flex; gap: 8px; } .sent .i { margin-top: 2px; flex: none; }
.add-comment { margin-top: 12px; }
.contains { margin-top: 18px; } .mini-label { display: block; font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; } .chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; border-radius: 99px; background: var(--bg-2); font-weight: 700; font-size: .85rem; } .chip .i { width: 14px; height: 14px; }
.chip.hit { background: var(--bad); color: #fff; } .none { color: var(--ink-2); font-size: .9rem; }
.facts { margin-top: 18px; display: grid; gap: 12px; } .facts dt { font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); } .facts dd { margin-top: 2px; }

/* ideas */
.idea-form { display: flex; gap: 8px; margin: 14px 0 10px; } .idea-form .input { flex: 1; }
.dym { background: var(--brand-soft); border-radius: 20px; padding: 14px; margin-bottom: 10px; }
.dym-k { display: flex; gap: 6px; align-items: center; font-weight: 850; margin-bottom: 8px; } .dym-k .i { color: var(--brand-text); }
.dym ul { display: grid; gap: 8px; margin-bottom: 8px; } .dym li { display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--surface); padding: 10px 12px; border-radius: 14px; }
.dym-t { display: flex; flex-direction: column; font-weight: 750; min-width: 0; } .dym-t em { font-style: normal; color: var(--ink-2); font-size: .8rem; font-weight: 600; }
.board { display: grid; gap: 10px; margin-top: 6px; }
.bd { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--surface); border-radius: 20px; padding: 12px 14px; box-shadow: var(--sh-1); }
.bd-rank { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 950; background: var(--bg-2); color: var(--ink-2); }
.bd.t1 .bd-rank { background: #F6C343; color: #3B2A06; } .bd.t2 .bd-rank { background: #D4D9E0; color: #2B313A; } .bd.t3 .bd-rank { background: #E0A66E; color: #3B2410; }
.bd.t1 { box-shadow: 0 0 0 2px #F6C343, var(--sh-1); }
.bd-text { font-weight: 800; overflow-wrap: anywhere; } .bd-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--ink-2); font-size: .78rem; margin-top: 3px; align-items: center; } .bd-meta .i { width: 12px; height: 12px; vertical-align: -1px; }
.bd-reply { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; font-size: .84rem; background: var(--brand-soft); padding: 6px 10px; border-radius: 12px; } .bd-reply .i { width: 14px; height: 14px; margin-top: 2px; color: var(--brand-text); flex: none; }
.status { padding: 1px 9px; border-radius: 99px; font-weight: 800; font-size: .72rem; background: var(--bg-2); }
.status.s-planned { background: var(--brand-soft-2); color: var(--ink); } .status.s-on_menu { background: var(--good); color: #fff; } .status.s-not_now { background: var(--mid-s); color: var(--mid-t); }
.vote-btn { display: flex; flex-direction: column; align-items: center; min-width: 54px; padding: 8px 10px; border-radius: 16px; border: 1.5px solid var(--line-2); font-weight: 850; line-height: 1.1; }
.vote-btn[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.bd-count { display: flex; flex-direction: column; align-items: center; font-weight: 850; min-width: 44px; color: var(--ink-2); }
.bd-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.board.compact .bd { box-shadow: none; background: var(--bg); }

/* profile list */
.group { background: var(--surface); border-radius: 22px; box-shadow: var(--sh-1); margin: 16px 0; overflow: hidden; }
.cell { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 16px; text-align: left; min-height: 62px; }
.cell + .cell { border-top: 1px solid var(--line); }
button.cell:hover { background: var(--brand-soft); }
.cell.col { flex-direction: column; align-items: flex-start; } .cell.col .seg { margin: 0; }
.cell-main { min-width: 0; } .cell-t { font-weight: 800; } .cell-s { color: var(--ink-2); font-size: .85rem; overflow-wrap: anywhere; }
.cell.danger .cell-t { color: var(--bad-t); }

/* ================= staff app ================= */
.app.staff { display: block; min-height: 100dvh; }
.side { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; background: linear-gradient(180deg, var(--rail), var(--rail-2)); color: #fff; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .25); }
.side-brand, .side-foot { display: none; }
.side-nav { display: flex; width: 100%; justify-content: space-around; gap: 2px; }
.side-i { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; font-size: .68rem; font-weight: 750; text-decoration: none; color: rgba(255, 255, 255, .75); border-radius: 14px; min-height: 52px; justify-content: center; }
.side-i.on { background: rgba(255, 255, 255, .14); color: #fff; }
.stage.wide { padding: max(14px, env(safe-area-inset-top)) 14px 96px; max-width: 1180px; margin: 0 auto; }
@media (min-width: 900px) {
  .app.staff { display: grid; grid-template-columns: 252px minmax(0, 1fr); }
  .side { position: sticky; top: 0; height: 100dvh; flex-direction: column; justify-content: flex-start; gap: 18px; padding: 20px 14px; border-radius: 0 30px 30px 0; box-shadow: none; }
  .side-brand { display: flex; gap: 12px; align-items: center; padding: 4px 8px; }
  .side-name { font-weight: 900; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .side-role { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .72); font-weight: 750; }
  .side-nav { flex-direction: column; justify-content: flex-start; gap: 4px; }
  .side-i { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 14px; font-size: .95rem; position: relative; }
  .side-i.on { box-shadow: inset 3px 0 0 var(--brand); }
  .side-foot { display: flex; flex-direction: column; gap: 4px; margin-top: auto; }
  .side-btn { display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-radius: 14px; color: rgba(255, 255, 255, .8); font-weight: 700; text-align: left; } .side-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
  .side-mail { font-size: .74rem; color: rgba(255, 255, 255, .6); padding: 6px 14px; overflow: hidden; text-overflow: ellipsis; }
  .side-foot .input { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .25); margin-bottom: 6px; } .side-foot .input option { color: #2B1D14; }
  .stage.wide { padding: 28px 36px 60px; }
}

.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.tile { grid-column: span 12; background: var(--surface); border-radius: 26px; padding: 20px; box-shadow: var(--sh-1); min-width: 0; }
.tile.flush { padding: 0; background: none; box-shadow: none; }
@media (min-width: 1000px) {
  .tile.hero { grid-column: span 7; } .tile.part { grid-column: span 5; } .tile.half { grid-column: span 6; }
  .tile.brand-tile, .tile.grades-tile { grid-column: span 6; }
  .tile.waste { grid-column: span 12; display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 8px 24px; align-items: center; }
  .tile.waste .tile-k, .tile.waste .tile-big, .tile.waste .tile-s { grid-column: 1; } .tile.waste .spark { grid-column: 2; grid-row: 1 / span 3; } .tile.waste .waste-form { grid-column: 3; grid-row: 1 / span 3; }
}
.tile.hero { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; background: var(--rail); color: #fff; box-shadow: 0 16px 36px rgba(0, 0, 0, .22); position: relative; overflow: hidden; }
.tile.hero::before { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: color-mix(in srgb, var(--brand) 28%, transparent); }
.tile.hero > * { position: relative; }
.hero-k { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: rgba(255, 255, 255, .75); }
.hero-lead { font-size: 1.5rem; font-weight: 800; line-height: 1.15; margin: 2px 0 10px; } .hero-lead strong { font-size: 2.3rem; font-weight: 950; letter-spacing: -.04em; }
.hero-s { margin-top: 10px; color: rgba(255, 255, 255, .8); font-size: .88rem; }
.hero-text { flex: 1; min-width: 200px; }
.tile.hero .stack { background: rgba(255, 255, 255, .18); }
.ring { --p: 0; width: 132px; height: 132px; border-radius: 50%; background: conic-gradient(var(--good) calc(var(--p) * 1%), rgba(127, 127, 127, .25) 0); display: grid; place-items: center; flex: none; }
.ring-in { width: 100px; height: 100px; border-radius: 50%; background: var(--surface); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.tile.hero .ring-in { background: var(--rail); color: #fff; } .ring-in strong { font-size: 1.7rem; font-weight: 950; letter-spacing: -.03em; } .ring-in span { font-size: .72rem; font-weight: 750; color: inherit; }
.tile-k { display: flex; gap: 8px; align-items: center; font-weight: 850; color: var(--ink-2); font-size: .88rem; }
.tile-big { font-size: 3rem; font-weight: 950; letter-spacing: -.05em; line-height: 1.05; margin-top: 4px; } .tile-big small { font-size: 1.1rem; font-weight: 800; letter-spacing: 0; color: var(--ink-2); }
.tile-s { color: var(--ink-2); font-size: .88rem; margin-top: 4px; }
.tile-flag, .tile-ok { display: flex; gap: 6px; align-items: center; margin-top: 12px; font-size: .82rem; font-weight: 750; } .tile-flag { color: var(--amber); } .tile-ok { color: var(--good-t); } .tile-flag .i, .tile-ok .i { width: 16px; height: 16px; }
.meter { height: 10px; border-radius: 10px; background: var(--bg-2); overflow: hidden; margin-top: 12px; } .meter span { display: block; height: 100%; background: var(--brand); border-radius: 10px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { font-size: 1.1rem; font-weight: 850; display: flex; gap: 8px; align-items: center; }
.legend { display: flex; gap: 12px; font-size: .78rem; color: var(--ink-2); font-weight: 700; } .legend li { display: flex; gap: 5px; align-items: center; } .legend span { width: 10px; height: 10px; border-radius: 3px; }
.s-good { background: var(--good); } .s-mid { background: var(--mid); } .s-bad { background: var(--bad); }
.stack { display: flex; height: 10px; border-radius: 10px; overflow: hidden; background: var(--bg-2); } .stack.is-empty { opacity: .5; } .stack span { height: 100%; }
.cols { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px; align-items: end; }
.col { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.col-v { font-size: .72rem; font-weight: 800; color: var(--ink-2); min-height: 1em; }
.col-track { height: 150px; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.col-bar { width: min(100%, 38px); display: flex; flex-direction: column; border-radius: 8px 8px 3px 3px; overflow: hidden; }
.col-x { font-size: .7rem; color: var(--ink-2); font-weight: 650; } .col-x.now { color: var(--brand-text); font-weight: 850; }

.rank { display: grid; } .rank li { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); } .rank li:first-child { border-top: 0; }
.rank.flat li { grid-template-columns: auto minmax(0, 1fr) auto; }
.rank-n { width: 26px; height: 26px; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; font-weight: 850; font-size: .78rem; color: var(--ink-2); }
.rank-img { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; background: var(--bg-2); display: grid; place-items: center; color: var(--faint); }
.rank-t { font-weight: 800; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin-bottom: 6px; }
.rank-reply { display: flex; gap: 6px; font-size: .8rem; color: var(--ink-2); margin-top: 6px; } .rank-reply .i { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--brand-text); }
.rank-side { display: grid; justify-items: end; gap: 6px; }
.rank-p { text-align: right; display: flex; flex-direction: column; line-height: 1.1; } .rank-p strong { font-size: 1.15rem; font-weight: 900; } .rank-p span { font-size: .72rem; color: var(--ink-2); }
.conf { font-size: .68rem; font-weight: 850; padding: 2px 8px; border-radius: 99px; text-transform: uppercase; letter-spacing: .04em; }
.conf.c-high { background: var(--good-s); color: var(--good-t); } .conf.c-medium { background: var(--amber-s); color: var(--amber); } .conf.c-low { background: var(--mid-s); color: var(--mid-t); }
.hbars { display: grid; gap: 14px; } .hbar-top { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; margin-bottom: 5px; flex-wrap: wrap; }
.feed { display: grid; } .feed li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); } .feed li:first-child { border-top: 0; }
.feed-q { font-weight: 650; overflow-wrap: anywhere; } .feed-m { color: var(--ink-2); font-size: .8rem; margin-top: 2px; } .feed-act { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 599px) { .feed li { grid-template-columns: auto 1fr; } .feed-act { grid-column: 1 / -1; flex-direction: row; } }
.grade-list { display: grid; gap: 16px; } @media (min-width: 800px) { .grade-list { grid-template-columns: 1fr 1fr; } }
.gr-h { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; } .gr-n { font-weight: 850; } .gr-s { color: var(--ink-2); font-size: .85rem; }
.gr-d { display: grid; gap: 3px; margin-top: 8px; font-size: .84rem; font-weight: 650; } .gr-d span { display: flex; gap: 6px; align-items: center; } .gr-d .i { width: 15px; height: 15px; }
.spark { display: flex; align-items: flex-end; gap: 6px; height: 74px; margin: 12px 0 4px; } .spark span { flex: 1; background: color-mix(in srgb, var(--brand) 80%, transparent); border-radius: 6px 6px 2px 2px; min-height: 6px; }
.waste-form { display: flex; gap: 8px; margin-top: 12px; align-items: center; } .waste-form .input { width: 140px; }
.dupes { grid-column: span 12; } .dupe-list { display: grid; gap: 10px; } .dupe-list li { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--bg); padding: 10px 12px; border-radius: 14px; }
.card { background: var(--surface); border-radius: 26px; padding: 20px; box-shadow: var(--sh-1); margin-bottom: 14px; }
.grid2 { display: grid; gap: 14px; } @media (min-width: 800px) { .grid2 { grid-template-columns: 1fr 1fr; } }

.edit-list { display: grid; gap: 10px; margin: 14px 0; }
.edit-row { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 10px; background: var(--surface); border-radius: 20px; box-shadow: var(--sh-1); }
.edit-row:hover { box-shadow: var(--sh-2); }
.thumb { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; flex: none; background: var(--bg-2); display: grid; place-items: center; color: var(--faint); }
.edit-main { flex: 1; min-width: 0; display: flex; flex-direction: column; } .edit-t { font-weight: 850; } .edit-s { color: var(--ink-2); font-size: .82rem; }
.edit-go { color: var(--ink-2); }
.photo-field { margin-top: 12px; } .photo-drop { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 20px; border: 2px dashed var(--line-2); cursor: pointer; background: var(--surface); } .photo-drop .i { width: 28px; height: 28px; color: var(--brand-text); } .photo-drop-t { display: flex; flex-direction: column; } .photo-drop-t span { color: var(--ink-2); font-size: .85rem; } .photo-drop.busy { justify-content: center; }
.photo-has img { width: 100%; max-height: 240px; object-fit: cover; border-radius: 20px; } .photo-actions { display: flex; gap: 8px; margin-top: 8px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.join { display: grid; gap: 20px; align-items: center; } @media (min-width: 700px) { .join { grid-template-columns: auto 1fr; } }
.join-qr { width: min(220px, 100%); padding: 12px; background: #fff; border-radius: 22px; box-shadow: var(--sh-1); margin: 0 auto; } .qr { width: 100%; height: auto; display: block; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.swatch { width: 42px; height: 42px; border-radius: 50%; background: var(--sw); border: 3px solid var(--surface); box-shadow: 0 0 0 1.5px var(--line-2); display: grid; place-items: center; color: #fff; }
.swatch .i { display: none; filter: drop-shadow(0 0 2px rgba(0, 0, 0, .7)); } .swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ink); } .swatch[aria-pressed="true"] .i { display: block; }
.color-custom { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; } .color-custom .label { margin: 0; } .color-custom input[type=color] { width: 48px; height: 40px; border: 0; border-radius: 12px; padding: 0; background: none; cursor: pointer; } .color-custom .input { width: 120px; }
.theme-prev { display: flex; height: 92px; border-radius: 20px; overflow: hidden; border: 1.5px solid var(--line-2); background: var(--bg); }
.tp-rail { width: 34px; background: var(--rail); } .tp-body { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.tp-pill { background: var(--brand); color: var(--brand-ink); font-weight: 900; padding: 8px 14px; border-radius: 12px; font-size: .9rem; } .tp-btn { background: var(--brand-soft-2); color: var(--ink); font-weight: 800; padding: 4px 12px; border-radius: 99px; font-size: .78rem; }
.tp-dots { display: flex; gap: 4px; } .tp-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); display: block; }
.team li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); } .team li:first-child { border-top: 0; }
.team-av { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-soft-2); display: grid; place-items: center; font-weight: 900; flex: none; } .team-main { flex: 1; min-width: 0; } .team-e { font-weight: 750; overflow-wrap: anywhere; } .team-s { color: var(--ink-2); font-size: .8rem; }
.role-badge { padding: 1px 8px; border-radius: 99px; font-size: .7rem; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; background: var(--bg-2); } .role-badge.r-owner { background: var(--brand); color: var(--brand-ink); } .role-badge.r-admin { background: var(--brand-soft-2); }
.invite { margin-top: 14px; padding-top: 4px; } .invite-row { display: grid; gap: 8px; } @media (min-width: 700px) { .invite-row { grid-template-columns: 1fr auto auto; } }
.audit li { padding: 8px 0; border-top: 1px solid var(--line); font-size: .88rem; } .audit li:first-child { border-top: 0; } .audit-who { font-weight: 800; }
.group-tile { padding: 0; background: none; box-shadow: none; } .group-tile .group { margin: 0; }
.mail-tile { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.report .rep-stats { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 14px; } .rep-stats div { display: flex; flex-direction: column; } .rep-stats strong { font-size: 1.8rem; font-weight: 950; letter-spacing: -.04em; line-height: 1; } .rep-stats span { color: var(--ink-2); font-size: .8rem; font-weight: 650; }
.rep-text p { margin-bottom: 10px; font-size: 1.02rem; } .rep-h { font-size: .95rem; margin: 14px 0 4px; } .rep-bullets { margin-top: 12px; padding-left: 18px; list-style: disc; color: var(--ink-2); display: grid; gap: 4px; }

/* ================= landing ================= */
.lp { background: var(--bg); }
.lp-nav { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: max(14px, env(safe-area-inset-top)) clamp(16px, 5vw, 56px) 8px; background: var(--rail); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; } .brand-name { font-weight: 900; font-size: 1.15rem; letter-spacing: -.02em; }
.lp-links { display: none; gap: 22px; margin-left: auto; margin-right: 12px; font-weight: 700; } .lp-links a { text-decoration: none; color: rgba(255, 255, 255, .85); } .lp-links a:hover { color: #fff; }
@media (min-width: 720px) { .lp-links { display: flex; } }
.lp-hero { position: relative; display: grid; gap: 36px; align-items: center; background: linear-gradient(180deg, var(--rail), var(--rail-2)); color: #fff; padding: 28px clamp(24px, 6vw, 80px) 84px; overflow: clip; }
.lp-hero::before { content: ""; position: absolute; inset: 10px clamp(8px, 2vw, 28px) 18px; border: 2px dashed rgba(255, 255, 255, .22); border-radius: 34px; pointer-events: none; }
.lp-hero::after { content: ""; position: absolute; right: -10%; top: -20%; width: 60vmax; height: 60vmax; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 30%, transparent), transparent); pointer-events: none; }
@media (min-width: 900px) { .lp-hero { grid-template-columns: 1.1fr .9fr; } }
.lp-hero-text { position: relative; z-index: 1; max-width: 640px; }
.lp-pill { display: inline-flex; gap: 8px; align-items: center; padding: 6px 14px; border-radius: 99px; background: rgba(255, 255, 255, .12); font-weight: 700; font-size: .85rem; margin-bottom: 18px; } .lp-pill .i { width: 16px; height: 16px; color: var(--brand-text-d); }
.lp-title { font-size: clamp(2.4rem, 7vw, 4.4rem); font-weight: 950; line-height: .98; letter-spacing: -.045em; } .lp-title em { font-style: normal; color: var(--brand-text-d); }
.lp-lede { font-size: clamp(1.02rem, 2.4vw, 1.2rem); color: rgba(255, 255, 255, .88); margin-top: 18px; max-width: 54ch; }
.lp-go { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; } .lp-go.center { justify-content: center; }
.lp-note { display: flex; gap: 8px; align-items: center; margin-top: 18px; color: rgba(255, 255, 255, .78); font-size: .9rem; } .lp-note .i { width: 18px; height: 18px; }
.lp-pause { position: absolute; right: 0; bottom: -52px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; display: none; place-items: center; }
@media (min-width: 900px) { .lp-pause { display: grid; right: 12px; bottom: 6px; } .lp-hero-text { position: relative; } .lp-hero-art { position: relative; } }
.lp-hero-art { position: relative; z-index: 1; display: grid; place-items: center; padding: 10px 0; }
.lp-phone { position: relative; width: 292px; height: 590px; border-radius: 46px; background: #120B06; padding: 10px; border: 2px solid rgba(255, 255, 255, .14); box-shadow: 0 34px 90px rgba(0, 0, 0, .5); transform: rotate(2deg); }
.phone-notch { position: absolute; top: 15px; left: 50%; transform: translateX(-50%); width: 96px; height: 24px; border-radius: 14px; background: #120B06; z-index: 6; }
.lp-phone .app.student.mini { grid-template-columns: 42px minmax(0, 1fr); height: 100%; min-height: 0; margin: 0; border-radius: 36px; overflow: hidden; box-shadow: none; max-width: none; color: var(--ink); background: var(--bg); }
.mini .rail { position: static; height: 100%; border-radius: 0 20px 20px 0; padding-top: 38px; }
.mini .rail-i { min-height: 54px; padding: 10px 0; } .mini .rail-t { font-size: .72rem; } .mini .rail-me { width: 30px; height: 30px; } .mini .rail-me .i { width: 15px; height: 15px; }
.mini .stage { padding: 38px 8px 8px; overflow: hidden; } .mini .st-school { font-size: 1.05rem; } .mini .st-k { font-size: .66rem; }
.mini .banner { flex: none; min-height: 100px; padding: 12px; border-radius: 20px; } .mini .bn-big { font-size: 1.5rem; } .mini .bn-title { font-size: .78rem; } .mini .bn-sub { font-size: .68rem; }
.mini .stage-in { display: grid; gap: 12px; } .mini .dish-grid { gap: 8px; }
.mini .dc { border-radius: 16px; } .mini .dc-open { padding: 6px 6px 0; } .mini .dc-photo { border-radius: 12px; } .mini .dc-name { font-size: .7rem; min-height: 2.4em; } .mini .dc-sub { font-size: .62rem; }
.mini .dc-foot { padding: 6px; min-height: 40px; } .mini .rb { width: 26px; height: 26px; border-width: 1.5px; } .mini .rb .i { width: 13px; height: 13px; } .mini .rb-row { gap: 3px; }
.lp-float { position: absolute; display: flex; gap: 8px; align-items: center; background: #fff; color: #2B1D14; border-radius: 16px; padding: 10px 14px; box-shadow: var(--sh-2); font-weight: 750; font-size: .82rem; opacity: 0; transform: translateY(10px) scale(.96); transition: opacity .35s, transform .35s; z-index: 7; }
.lp-float.show { opacity: 1; transform: none; } .lp-float .i { color: #16693A; width: 18px; height: 18px; } .lp-float strong { color: #16693A; }
.lp-float.f1 { left: -22px; top: 210px; } .lp-float.f2 { right: -18px; bottom: 130px; }
@media (max-width: 420px) { .lp-float.f1 { left: -6px; } .lp-float.f2 { right: -4px; } .lp-phone { width: 270px; height: 550px; } }

.lp-how, .lp-problem, .lp-feats, .lp-staff, .lp-trust, .lp-end { max-width: 1160px; margin: 0 auto; padding: clamp(44px, 7vw, 92px) clamp(18px, 4vw, 40px) 0; }
.lp-h2 { font-size: clamp(1.7rem, 4.4vw, 2.7rem); font-weight: 950; letter-spacing: -.04em; line-height: 1.05; max-width: 22ch; }
.lp-end .lp-h2, .lp-trust .lp-h2 { margin-left: auto; margin-right: auto; text-align: center; }
.lp-steps { display: grid; gap: 16px; margin-top: 28px; } @media (min-width: 800px) { .lp-steps { grid-template-columns: repeat(3, 1fr); } }
.lp-steps li { position: relative; background: var(--surface); border-radius: 28px; padding: 26px 24px; box-shadow: var(--sh-1); } .lp-steps h3 { font-size: 1.3rem; font-weight: 900; margin: 14px 0 6px; } .lp-steps p { color: var(--ink-2); }
.lp-n { position: absolute; right: 20px; top: 14px; font-size: 3.6rem; font-weight: 950; color: var(--brand-soft-2); line-height: 1; letter-spacing: -.06em; }
.lp-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); } .lp-ic .i { width: 26px; height: 26px; }
.lp-problem { display: grid; gap: 22px; align-items: center; } @media (min-width: 800px) { .lp-problem { grid-template-columns: auto 1fr; gap: 56px; } }
.lp-stat { font-size: clamp(6rem, 18vw, 11rem); font-weight: 950; letter-spacing: -.07em; line-height: .85; color: var(--brand-text); } .lp-stat span { font-size: .28em; letter-spacing: 0; margin-left: 6px; color: var(--ink-2); }
.lp-problem p { color: var(--ink-2); margin-top: 12px; max-width: 60ch; } .lp-problem .lp-h2 { max-width: 26ch; } .lp-src { font-size: .82rem; }
.lp-grid { display: grid; gap: 14px; margin-top: 28px; } @media (min-width: 640px) { .lp-grid { grid-template-columns: 1fr 1fr; } } @media (min-width: 960px) { .lp-grid { grid-template-columns: repeat(3, 1fr); } }
.lp-grid li { background: var(--surface); border-radius: 26px; padding: 24px; box-shadow: var(--sh-1); } .lp-grid h3 { font-size: 1.1rem; font-weight: 900; margin: 14px 0 6px; } .lp-grid p { color: var(--ink-2); font-size: .95rem; }
.lp-grid .lp-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--brand-soft-2); color: var(--brand-text); }
.lp-staff { display: grid; gap: 34px; align-items: center; } @media (min-width: 900px) { .lp-staff { grid-template-columns: 1fr 1fr; } }
.lp-label { color: var(--brand-text); font-weight: 850; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin-bottom: 10px; }
.lp-points { display: grid; gap: 14px; margin: 22px 0 28px; } .lp-points li { color: var(--ink-2); padding-left: 30px; position: relative; } .lp-points li::before { content: ""; position: absolute; left: 0; top: 5px; width: 18px; height: 18px; border-radius: 50%; background: var(--brand); } .lp-points strong { color: var(--ink); }
.lp-dash { background: var(--surface); border-radius: 30px; padding: 18px; box-shadow: var(--sh-2); border: 1.5px solid var(--line); } .lp-dash figcaption { text-align: center; color: var(--ink-2); font-size: .8rem; margin-top: 10px; }
.lp-dash-body { display: grid; gap: 16px; } .d-hero { display: flex; gap: 16px; align-items: center; background: var(--rail); color: #fff; border-radius: 22px; padding: 16px; } .d-hero .ring { width: 96px; height: 96px; } .d-hero .ring-in { width: 72px; height: 72px; background: var(--rail); color: #fff; } .d-hero .ring-in strong { font-size: 1.25rem; } .d-hero > div:last-child { flex: 1; } .d-hero .stack { background: rgba(255, 255, 255, .2); margin-top: 8px; }
.d-k { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .75); font-weight: 800; } .d-lead { font-weight: 800; }
.d-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .d-h { font-weight: 850; font-size: .85rem; margin-bottom: 6px; } .d-row { display: flex; gap: 8px; align-items: center; font-size: .82rem; font-weight: 700; padding: 6px 0; } .d-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .d-row .rank-img { width: 34px; height: 34px; border-radius: 10px; }
.lp-trust p { color: var(--ink-2); max-width: 66ch; margin: 16px auto 0; text-align: center; }
.lp-end { text-align: center; padding-bottom: 20px; } .lp-end .lp-go { margin-top: 24px; } .lp-end .btn.light { background: var(--rail); color: #fff; }
.lp-foot { max-width: 1160px; margin: 48px auto 0; padding: 26px clamp(18px, 4vw, 40px) 40px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--ink-2); font-size: .85rem; } .lp-foot .link { margin-right: 16px; }

/* ================= posters (shown in a sheet, printed on paper) ================= */
.poster-sheet { padding-bottom: 8px; } .poster-kinds { margin: 12px 16px 0; } .poster-sheet .modal-btns { padding: 0 18px 18px; }
.poster-wrap { padding: 16px; display: grid; place-items: center; }
.poster { background: #fff; color: #20150D; border-radius: 10px; box-shadow: var(--sh-1); display: flex; flex-direction: column; align-items: center; text-align: center; width: min(100%, 380px); }
.poster.letter { aspect-ratio: 8.5 / 11; padding: 7% 8%; gap: 2%; justify-content: space-between; border: 10px solid var(--brand); }
.poster-brand { display: flex; gap: 10px; align-items: center; font-weight: 950; font-size: 1.4rem; letter-spacing: -.03em; }
.poster-h { font-size: clamp(1.8rem, 9vw, 2.6rem); font-weight: 950; letter-spacing: -.045em; line-height: 1; } .poster-h.sm { font-size: 1.2rem; }
.poster-es { font-size: 1.1rem; font-weight: 800; color: #6B5848; margin-top: -4px; }
.poster-qr { width: 62%; } .poster-qr.sm { width: 56%; } .poster-qr .qr { border: 6px solid #fff; border-radius: 6px; }
.poster-step { font-size: .86rem; line-height: 1.35; } .poster-school { font-weight: 950; font-size: 1.2rem; } .poster-code { font-size: .78rem; color: #6B5848; }
.poster.tent { aspect-ratio: 8.5 / 5.5; display: grid; grid-template-rows: 1fr 1fr; border: 2px dashed #bbb; padding: 0; } .tent-half { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; } .tent-half.flip { transform: rotate(180deg); border-top: 1px dashed #bbb; }

@media print {
  body.printing * { visibility: hidden; }
  body.printing .poster-wrap, body.printing .poster-wrap * { visibility: visible; }
  body.printing dialog.sheet { position: static; max-height: none; overflow: visible; box-shadow: none; background: #fff; width: auto; margin: 0; }
  body.printing .poster-wrap { position: fixed; inset: 0; padding: 0; display: grid; place-items: center; }
  body.printing .poster { width: 7.4in; box-shadow: none; border-radius: 0; }
  body.printing .poster-qr { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.printing .poster.letter { border-width: 14px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { margin: .4in; }
}

/* ================= motion, contrast, small screens ================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .rb.on, .rate-btn[aria-pressed="true"], .pick[aria-pressed="true"], .toggle[aria-pressed="true"], .day[aria-pressed="true"], .seg button[aria-pressed="true"] { outline: 3px solid Highlight; }
  .banner, .dc, .tile { border: 1px solid CanvasText; }
}
@media (pointer: coarse) { .icon-btn, .btn.sm { min-height: 44px; } }
@media (max-width: 399px) { .stage { padding-left: 10px; padding-right: 10px; } .carousel { margin-left: -10px; margin-right: -10px; } .banners { padding-left: 10px; padding-right: 10px; } .rb { width: 38px; height: 38px; } }

.crash { max-width: 440px; margin: 22vh auto 0; padding: 0 20px; text-align: center; display: grid; gap: 10px; }
.crash h1 { font-size: 1.7rem; font-weight: 900; letter-spacing: -.03em; } .crash p { color: var(--ink-2); }

/* programmatic focus on a page title shouldn't draw a box */
h1[tabindex="-1"]:focus, #main:focus { outline: none; }
/* language button on the dark join screens */
.fl .chip-btn, .lp-nav .chip-btn { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: none; }
/* school color picker */
.swatch-groups { display: grid; gap: 10px; margin: 14px 0 6px; }
.swatch-g { font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); margin-bottom: 6px; }
.swatches { margin: 0; }
.swatch-now { display: flex; align-items: center; gap: 10px; font-weight: 800; margin: 12px 0 14px; }
.swatch-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--sw); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--line-2); }
.create-swatches { margin-top: 6px; }
.create-swatches .swatches { gap: 8px; }
.create-swatches .swatch { width: 38px; height: 38px; }

.swatch.custom { position: relative; overflow: hidden; background: conic-gradient(#e03a3e, #f2c500, #1fa145, #2563eb, #b5179e, #e03a3e); cursor: pointer; }
.swatch.custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.swatch.custom .i { display: block; position: relative; pointer-events: none; }

.mail-card { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.mail-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); }
.mail-ic .i { width: 28px; height: 28px; }
.mail-body h2 { font-size: 1.25rem; font-weight: 900; letter-spacing: -.02em; }
.mail-body > p { color: var(--ink-2); margin-top: 4px; max-width: 58ch; }
.mail-actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-top: 16px; }
.switch { display: inline-flex; align-items: center; gap: 12px; font-weight: 750; min-height: 44px; text-align: left; }
.switch-track { width: 52px; height: 30px; border-radius: 99px; background: var(--line-2); position: relative; flex: none; transition: background .2s; }
.switch-track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .2s; }
.switch[aria-checked="true"] .switch-track { background: var(--good); } .switch[aria-checked="true"] .switch-track::after { transform: translateX(22px); }
@media (max-width: 560px) { .mail-card { grid-template-columns: 1fr; } .mail-actions .btn { width: 100%; } }


/* ================= motion ================= */
@property --p { syntax: "<number>"; inherits: false; initial-value: 0; }
:root { --ease: cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-in { from { opacity: 0; transform: translateX(calc(var(--dir, 1) * 38px)); } to { opacity: 1; transform: none; } }
@keyframes card-up { from { opacity: 0; transform: translateY(46px); } to { opacity: 1; transform: none; } }
@keyframes zoom-in { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes ring-in { from { --p: 0; } }
@keyframes rail-ind { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(2.5%, 3%, 0) scale(1.06); } }
@keyframes bob { 0%, 100% { transform: rotate(2deg) translateY(0); } 50% { transform: rotate(2deg) translateY(-9px); } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 45%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }

/* a new page or a changed list: one short fade for the whole thing, no cascade */
.nav-in > .stage-in > *, .nav-in.stage-in > * { animation: rise .2s ease-out backwards; }
.nav-in .stage-in > * { animation: rise .2s ease-out backwards; }
:is(.nav-in, .list-in) :is(.dish-grid, .board, .edit-list, .bento, .grade-list, .team, .rank, .feed) > * { animation: rise .2s ease-out backwards; }
.swipe-in { animation: slide-in .38s var(--ease) backwards; }


/* charts draw themselves */
.ring { animation: ring-in 1.1s var(--ease) .25s backwards; }
.stack span, .meter span { transform-origin: left; animation: grow-x .9s var(--ease) .3s backwards; }
.col-bar { transform-origin: bottom; animation: grow-y .8s var(--ease) .2s backwards; }
.spark span { transform-origin: bottom; animation: grow-y .7s var(--ease) .3s backwards; }
.rail-i.on::after { transform-origin: center; animation: rail-ind .35s var(--ease); }
.dots span { transition: width .3s var(--ease), background .3s; }

/* small interactions everywhere */
.btn, .pick, .toggle, .day, .seg button, .vote-btn, .rate-btn, .rb, .swatch, .chip-btn, .icon-btn, .cell, .side-i, .side-btn, .edit-row, .result { transition: transform .18s var(--ease), background-color .2s, border-color .2s, color .2s, box-shadow .25s var(--ease), opacity .2s; }
@media (hover: hover) {
  .btn:hover:not(:disabled), .pick:hover, .toggle:hover, .chip-btn:hover, .result:hover { transform: translateY(-2px); }
  .swatch:hover { transform: scale(1.14); } .edit-row:hover, .bd:hover { transform: translateY(-2px); }
  .tile, .bd, .edit-row, .lp-grid li, .lp-steps li { transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
  .tile:hover, .lp-grid li:hover, .lp-steps li:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
  .rail-i:hover { color: #fff; background: rgba(255, 255, 255, .06); }
  .side-i:hover { background: rgba(255, 255, 255, .08); color: #fff; }
}
.btn.primary:not(:disabled):focus-visible { animation: pulse-ring 1.2s infinite; }
.pick[aria-pressed="true"], .toggle[aria-pressed="true"], .vote-btn[aria-pressed="true"], .swatch[aria-pressed="true"] { animation: zoom-in .25s var(--ease); }
.day[aria-pressed="true"], .seg button[aria-pressed="true"] { transition: background-color .25s, box-shadow .25s, color .2s; }
.alert, .dym, .notice, .reply, .sent { animation: rise .4s var(--ease) backwards; }
.toast { transition: opacity .3s var(--ease), transform .35s var(--ease); }
.rate-btn[aria-pressed="true"], .rb.on { animation: pop .38s var(--ease); }
.skel { animation: shimmer 1.3s infinite linear, zoom-in .4s var(--ease) backwards; }
.bn-img { transition: transform .6s var(--ease); } .banner:hover .bn-img { transform: scale(1.06) rotate(-3deg); }
.dc-photo img, .rank-img, .thumb { transition: transform .5s var(--ease); } .dc:hover .dc-photo img { transform: scale(1.06); }
.switch-track, .switch-track::after { transition: background .25s, transform .3s var(--ease); }

/* the soft background blobs drift slowly */
body::before { inset: -8%; animation: drift 26s ease-in-out infinite alternate; }

/* join screens and sheets */
.fl-hero .stitch { animation: zoom-in .6s var(--ease) backwards; }
.fl-card { animation: card-up .6s var(--ease) .08s backwards; }
dialog.sheet { animation: slide-up .42s var(--ease); } dialog.modal { animation: zoom-in .28s var(--ease); }

/* landing page */
.lp-phone { animation: bob 7s ease-in-out infinite, zoom-in .9s var(--ease) .2s backwards; }
.lp-nav { animation: rise .6s var(--ease) backwards; }
.lp.js-reveal [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--rd, 0ms); }
.lp.js-reveal [data-reveal].in { opacity: 1; transform: none; }

/* dishes without a photo get a friendly emoji tile in the school's colors */
.dc-noimg, .rank-img.ph, .thumb.ph, .ds-photo .dc-noimg { background: linear-gradient(135deg, var(--brand-soft), var(--brand-soft-2)); display: grid; place-items: center; color: var(--ink); }
.dc-noimg { width: 100%; height: 100%; } .dc-noimg .emo { font-size: 3.4rem; line-height: 1; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .12)); }
.ds-photo .dc-noimg .emo { font-size: 5.5rem; }
.rank-img.ph .emo, .thumb.ph .emo { font-size: 1.7rem; line-height: 1; }
.mini .dc-noimg .emo { font-size: 2rem; }

/* nutrition facts */
.nutri { margin-top: 18px; }
.nutri-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; margin-top: 6px; }
.nutri-grid > div { background: var(--surface); border-radius: 14px; padding: 10px 12px; box-shadow: var(--sh-1); }
.nutri-grid dt { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.nutri-grid dd { font-size: 1.15rem; font-weight: 900; letter-spacing: -.02em; } .nutri-grid dd small { font-size: .72rem; font-weight: 700; color: var(--ink-2); letter-spacing: 0; }
.nutri-edit { margin-top: 16px; border: 1.5px solid var(--line-2); border-radius: 16px; padding: 4px 14px 14px; background: var(--surface); }
.nutri-edit summary { cursor: pointer; font-weight: 800; padding: 12px 0; }
.nutri-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

