/* BiteNite v1 */
/* ============ BiteNite — design tokens ============ */
:root {
  --bg: #F6F2F6;
  --bg-2: #EFE8F0;
  --surface: #FFFFFF;
  --surface-2: #F7F2F7;
  --ink: #241326;
  --ink-2: #5A4560;
  --muted: #8B7A8F;
  --line: #E4DAE6;
  --line-strong: #CDBFD1;
  --plum: #2B1530;
  --pom: #A3123A;
  --saffron: #E7A11A;
  --gold: #B8862B;
  --basil: #2E7D4F;
  --btn-bg: #2B1530;
  --btn-ink: #F3C55B;
  --btn-bg-hover: #3D1F45;
  --sel-bg: #2B1530;
  --sel-ink: #FFF6E3;
  --rim-a: #FFFFFF;
  --rim-b: #E9E1EA;
  --rim-line: #C9A55A;
  --scrim: rgba(36, 19, 38, .45);
  --shadow: 0 1px 0 rgba(36,19,38,.04), 0 18px 40px -24px rgba(43,21,48,.35);
  --ok: #2E7D4F;
  --warn: #B7791F;
  --off: #8B7A8F;
  --radius-sheet: 28px;
  --radius-panel: 22px;
  --radius-field: 14px;
  --serif: "Bodoni Moda", "Bodoni 72", Didot, "Didot LT STD", Georgia, serif;
  --sans: "Jost", "Futura", "Avenir Next", "Century Gothic", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #150B18;
    --bg-2: #1C1020;
    --surface: #22142A;
    --surface-2: #2A1A33;
    --ink: #F6ECF4;
    --ink-2: #CDBBD0;
    --muted: #9C889F;
    --line: #3A2843;
    --line-strong: #4D3757;
    --plum: #F3C55B;
    --pom: #F0607F;
    --saffron: #F0B53A;
    --gold: #D9B26F;
    --basil: #6DC28C;
    --btn-bg: #EDB23A;
    --btn-ink: #1E0F22;
    --btn-bg-hover: #F7C65A;
    --sel-bg: #EDB23A;
    --sel-ink: #1E0F22;
    --rim-a: #3A2742;
    --rim-b: #24162B;
    --rim-line: #D9B26F;
    --scrim: rgba(8, 3, 10, .62);
    --shadow: 0 1px 0 rgba(0,0,0,.2), 0 22px 44px -26px rgba(0,0,0,.8);
    --ok: #6DC28C;
    --warn: #F0B53A;
    --off: #9C889F;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #150B18;
  --bg-2: #1C1020;
  --surface: #22142A;
  --surface-2: #2A1A33;
  --ink: #F6ECF4;
  --ink-2: #CDBBD0;
  --muted: #9C889F;
  --line: #3A2843;
  --line-strong: #4D3757;
  --plum: #F3C55B;
  --pom: #F0607F;
  --saffron: #F0B53A;
  --gold: #D9B26F;
  --basil: #6DC28C;
  --btn-bg: #EDB23A;
  --btn-ink: #1E0F22;
  --btn-bg-hover: #F7C65A;
  --sel-bg: #EDB23A;
  --sel-ink: #1E0F22;
  --rim-a: #3A2742;
  --rim-b: #24162B;
  --rim-line: #D9B26F;
  --scrim: rgba(8, 3, 10, .62);
  --shadow: 0 1px 0 rgba(0,0,0,.2), 0 22px 44px -26px rgba(0,0,0,.8);
  --ok: #6DC28C;
  --warn: #F0B53A;
  --off: #9C889F;
  color-scheme: dark;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
::selection { background: var(--sel-bg); color: var(--sel-ink); }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--saffron); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { display: block; }

/* ============ Shell ============ */
.app { min-height: 100vh; }
.sidebar { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px 16px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; }
.brand-word { font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: -.01em; line-height: 1; }
.top-actions { display: flex; gap: 6px; }
.main { padding: 20px 16px 120px; max-width: 1120px; margin: 0 auto; overflow-x: clip; min-width: 0; }
.content { min-width: 0; }
.app.public .main { padding-bottom: 60px; }
.main.narrow { max-width: 1040px; }
.grid-2 > *, .grid-hero > *, .spin-layout > *, .picks-grid > *, .people-grid > * { min-width: 0; }
.stack > .seg { align-self: flex-start; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-top: 1px solid var(--line);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: 0; padding: 6px 2px; border-radius: 14px;
  color: var(--muted); font-size: 12px; letter-spacing: .01em;
}
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--ink); }
.tab[aria-current="page"] .tab-dot { opacity: 1; }
.tab-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--saffron); opacity: 0; margin-top: 1px; }

@media (min-width: 960px) {
  .app:not(.public) { display: grid; grid-template-columns: 248px minmax(0, 1fr); }
  .tabbar { display: none; }
  .app:not(.public) .topbar { justify-content: flex-end; background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom-color: transparent; padding: 14px 40px 6px; }
  .app:not(.public) .topbar .brand { display: none; }
  .only-mobile { display: none !important; }
  .sidebar {
    display: flex; flex-direction: column; gap: 28px;
    position: sticky; top: 0; height: 100vh;
    padding: 28px 20px;
    border-right: 1px solid var(--line);
    background: var(--bg-2);
  }
  .side-nav { display: flex; flex-direction: column; gap: 4px; }
  .side-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 14px; border: 0; background: none;
    color: var(--ink-2); font-size: 16px; text-align: left; width: 100%;
  }
  .side-link svg { width: 22px; height: 22px; }
  .side-link:hover { background: var(--surface-2); color: var(--ink); }
  .side-link[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
  .side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
  .main { padding: 18px 48px 80px; }
}

/* ============ Type ============ */
.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: 0;
  font-optical-sizing: auto;
}
.h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 5vw, 48px); line-height: 1.05; letter-spacing: -.015em; margin: 0; }
.h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(24px, 3.4vw, 30px); line-height: 1.15; margin: 0; }
.h3 { font-family: var(--serif); font-weight: 600; font-size: 20px; line-height: 1.2; margin: 0; }
.lede { color: var(--ink-2); font-size: 17px; margin: 10px 0 0; max-width: 56ch; }
.note { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 15px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section { margin-top: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px;
  border-radius: 999px; border: 0;
  background: var(--btn-bg); color: var(--btn-ink);
  font-weight: 500; font-size: 16px; letter-spacing: .01em;
  transition: background .2s ease, transform .1s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--btn-bg-hover); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }
.btn.big { min-height: 56px; padding: 0 30px; font-size: 18px; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.quiet { background: transparent; color: var(--ink-2); padding: 0 12px; }
.btn.quiet:hover { color: var(--ink); background: var(--surface-2); }
.btn.danger { background: transparent; color: var(--pom); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pom) 40%, transparent); }
.btn.full { width: 100%; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0;
  display: inline-grid; place-items: center;
  background: transparent; color: var(--ink-2);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 22px; height: 22px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.tight { gap: 6px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.spread > :first-child { flex: 1 1 220px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* ============ Segmented + chips ============ */
.seg {
  display: inline-flex; padding: 4px; gap: 2px;
  border-radius: 999px; background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg button {
  border: 0; background: none; border-radius: 999px;
  padding: 8px 16px; font-size: 15px; color: var(--ink-2); white-space: nowrap;
}
@media (max-width: 420px) { .seg button { padding: 8px 13px; } }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08), inset 0 0 0 1px var(--line); }
:root[data-theme="dark"] .seg button[aria-pressed="true"] { background: var(--plum); color: var(--btn-ink); box-shadow: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg button[aria-pressed="true"] { background: var(--plum); color: var(--btn-ink); box-shadow: none; } }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
@media (min-width: 960px) { .chips.scroll { margin: 0; padding-left: 0; padding-right: 0; flex-wrap: wrap; } }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent;
  font-size: 14.5px; color: var(--ink-2); white-space: nowrap;
}
.chip svg { width: 15px; height: 15px; }
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--sel-bg); border-color: var(--sel-bg); color: var(--sel-ink); }
.chip .from { font-family: var(--serif); font-style: italic; opacity: .8; font-size: 13px; }
.chip .swatch { width: 10px; height: 10px; border-radius: 50%; }

/* ============ Panels ============ */
.panel {
  background: var(--surface);
  border-radius: var(--radius-panel);
  box-shadow: inset 0 0 0 1px var(--line);
  padding: 20px;
}
.panel.pad-lg { padding: 28px; }
.panel.flush { padding: 0; overflow: hidden; }
.grid-2 { display: grid; gap: 16px; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-hero { display: grid; gap: 20px; }
@media (min-width: 900px) { .grid-hero { grid-template-columns: 1.15fr .85fr; align-items: stretch; } }

/* ============ Tonight hero ============ */
.tonight-hero {
  position: relative; overflow: hidden;
  border-radius: 32px;
  background: var(--plum);
  color: #FFF6E3;
  padding: 28px 24px 24px;
  display: grid; gap: 18px;
  min-height: 300px;
}
:root[data-theme="dark"] .tonight-hero { background: #2A1631; box-shadow: inset 0 0 0 1px var(--line-strong); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tonight-hero { background: #2A1631; box-shadow: inset 0 0 0 1px var(--line-strong); } }
.tonight-hero .h2 { color: #FFF6E3; }
.tonight-hero p { color: rgba(255,246,227,.78); margin: 6px 0 0; max-width: 34ch; }
.hero-plate { position: absolute; right: -92px; top: -92px; width: 210px; height: 210px; opacity: .95; pointer-events: none; }
.hero-plate svg { width: 100%; height: 100%; }
.hero-copy { position: relative; z-index: 1; }
.hero-copy .hero-stat, .hero-copy .h2 { padding-right: 96px; }
.hero-actions { position: relative; z-index: 1; display: flex; gap: 10px; flex-wrap: wrap; align-self: end; }
.btn.gold { background: #F3C55B; color: #2B1530; }
.btn.gold:hover { background: #FFD677; }
.btn.on-dark { background: transparent; color: #FFF6E3; box-shadow: inset 0 0 0 1px rgba(255,246,227,.35); }
.btn.on-dark:hover { background: rgba(255,246,227,.08); }
.hero-stat { font-family: var(--serif); font-style: italic; color: #F3C55B; font-size: 17px; }
.hero-actions .btn { flex: 1 1 100%; }
@media (min-width: 600px) {
  .hero-plate { width: 360px; height: 360px; right: -60px; top: auto; bottom: -90px; }
  .hero-copy { max-width: 62%; }
  .hero-copy .hero-stat, .hero-copy .h2 { padding-right: 0; }
  .hero-actions .btn { flex: 0 0 auto; }
}

/* ============ Cravings rail ============ */
.cravings { display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 4px 16px 6px; }
.cravings::-webkit-scrollbar { display: none; }
@media (min-width: 960px) { .cravings { margin: 0; padding-left: 0; padding-right: 0; grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); } }
.craving {
  border: 0; background: none; padding: 8px 4px 10px; border-radius: 18px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
}
.craving:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.craving .plate { width: 76px; height: 76px; }
.craving-name { font-size: 14px; line-height: 1.2; color: var(--ink); }
.craving-count { font-size: 12.5px; color: var(--muted); }

/* ============ Plates ============ */
.plate { width: 56px; height: 56px; flex: none; }
.plate svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 10px rgba(43,21,48,.18)); }
.plate.sm { width: 44px; height: 44px; }
.plate.lg { width: 120px; height: 120px; }
.plate.xl { width: 168px; height: 168px; }

/* ============ Place rows (menu-style) ============ */
.menu { display: flex; flex-direction: column; gap: 34px; }
.menu-section {}
.menu-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.menu-head .swatch { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.menu-head h3 { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 26px; margin: 0; line-height: 1.1; }
.menu-head .count { margin-left: auto; color: var(--muted); font-size: 14px; }
.place-row {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start;
  width: 100%; text-align: left; border: 0; background: none;
  padding: 12px 10px; margin: 0 -10px; border-radius: 18px;
}
.place-row:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.place-row > .plate, .place-row > .pick-badge { margin-top: 2px; }
.place-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.place-name { font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leader { flex: 1; min-width: 16px; border-bottom: 2px dotted var(--line-strong); transform: translateY(-5px); }
.price { font-family: var(--serif); font-size: 17px; color: var(--ink-2); letter-spacing: .04em; white-space: nowrap; }
.price .dim { opacity: .28; }
.place-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 3px; font-size: 14px; color: var(--ink-2); }
.place-meta .sep-none {}
.never-row { opacity: .5; }

/* tags + status */
.tags { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.tag svg { width: 13px; height: 13px; }
.tag.halal { color: var(--basil); }
.tag.partial { color: var(--warn); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.open { color: var(--ok); }
.status.soon { color: var(--warn); }
.status.closed { color: var(--off); }
.stars { display: inline-flex; gap: 2px; color: var(--saffron); }
.stars svg { width: 14px; height: 14px; }

/* ============ Lists of simple items ============ */
.list { display: flex; flex-direction: column; }
.list > * + * { border-top: 1px solid var(--line); }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; }
.list-item:first-child { border-top: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-family: var(--serif); font-weight: 600; font-size: 18px; line-height: 1.2; }

/* ============ Link-Up cards ============ */
.lu-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
  padding: 18px; border-radius: var(--radius-panel); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line); width: 100%; border: 0; text-align: left;
}
.lu-card:hover { box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow); }
.date-tile {
  width: 62px; border-radius: 16px; overflow: hidden; text-align: center;
  box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--surface-2);
}
.date-tile .m { background: var(--pom); color: #fff; font-size: 12px; padding: 3px 0; letter-spacing: .04em; }
.date-tile .d { font-family: var(--serif); font-size: 28px; line-height: 1.1; padding: 4px 0 6px; font-weight: 600; }
@media (max-width: 560px) {
  .lu-card { grid-template-columns: auto 1fr; }
  .lu-card .pill { grid-column: 2; justify-self: start; }
}
.lu-title { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.2; }
.lu-sub { color: var(--ink-2); font-size: 14.5px; margin-top: 2px; }
.pill { font-family: var(--sans); font-weight: 400; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); white-space: nowrap; }
.pill.go { color: var(--ok); }
.pill.wait { color: var(--warn); }
.pill.done { color: var(--ink); }

.avatars { display: inline-flex; }
.avatars .avatar { margin-left: -8px; box-shadow: 0 0 0 2px var(--surface); }
.avatars .avatar:first-child { margin-left: 0; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center;
  font-family: var(--serif); font-weight: 600; font-size: 15px; color: #fff;
}
.avatar.lg { width: 52px; height: 52px; font-size: 22px; }

/* ============ Forms ============ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .label { font-size: 14px; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 14px;
  border-radius: var(--radius-field); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink);
}
.textarea { min-height: 84px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--saffron); box-shadow: 0 0 0 3px color-mix(in srgb, var(--saffron) 25%, transparent); }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.search .input { padding-left: 42px; border-radius: 999px; }
.form-grid { display: grid; gap: 14px; }
@media (min-width: 560px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
.form-grid.pair { grid-template-columns: 1.25fr 1fr; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.switch { position: relative; width: 48px; height: 28px; border-radius: 999px; background: var(--line-strong); border: 0; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch[aria-checked="true"] { background: var(--basil); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

/* ============ Sheet ============ */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 80; opacity: 0; transition: opacity .25s ease; }
.scrim.show { opacity: 1; }
.sheet {
  position: fixed; z-index: 90; left: 0; right: 0; bottom: 0;
  max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); color: var(--ink);
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  box-shadow: 0 -20px 60px -20px rgba(0,0,0,.35);
  transform: translateY(100%); transition: transform .32s cubic-bezier(.2,.8,.2,1);
  padding: 0 20px calc(28px + env(safe-area-inset-bottom));
}
.sheet.show { transform: translateY(0); }
.sheet:focus { outline: none; }
body.sheet-open .toast { bottom: auto; top: calc(14px + env(safe-area-inset-top)); transform: translate(-50%, -20px); }
body.sheet-open .toast.show { transform: translate(-50%, 0); }
.sheet-grip { width: 44px; height: 5px; border-radius: 9px; background: var(--line-strong); margin: 10px auto 6px; }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0 12px; background: var(--bg); }
.sheet-body { display: flex; flex-direction: column; gap: 22px; }
.sheet-foot { position: sticky; bottom: calc(-28px - env(safe-area-inset-bottom)); padding: 14px 0 0; margin-top: 18px; background: linear-gradient(to bottom, transparent, var(--bg) 30%); display: flex; gap: 10px; }
@media (min-width: 760px) {
  .sheet { left: auto; top: 0; bottom: 0; width: 520px; max-height: none; border-radius: var(--radius-sheet) 0 0 var(--radius-sheet); transform: translateX(100%); padding: 0 32px 32px; }
  .sheet.show { transform: translateX(0); }
  .sheet-grip { display: none; }
  .sheet-head { padding-top: 22px; }
  .sheet-foot { bottom: -32px; }
}
.block { display: flex; flex-direction: column; gap: 10px; }
.block-title { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.hint { font-size: 13.5px; color: var(--muted); }
.hours { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.hours td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; color: var(--ink-2); }
.hours tr.today td { color: var(--ink); font-weight: 500; }
.hours tr.today td:first-child::after { content: " today"; font-family: var(--serif); font-style: italic; color: var(--muted); font-weight: 400; }

.tagset { display: flex; flex-direction: column; }
.tagset > div { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 520px) { .tagset > div { grid-template-columns: 150px 1fr; align-items: center; } }
.tagset .seg button { padding: 6px 12px; font-size: 14px; }
.community { font-family: var(--serif); font-style: italic; font-size: 13.5px; color: var(--muted); }

.rate { display: inline-flex; gap: 4px; }
.rate button { border: 0; background: none; padding: 2px; color: var(--line-strong); }
.rate button svg { width: 28px; height: 28px; }
.rate button.on { color: var(--saffron); }

/* ============ Spin ============ */
.spin-layout { display: grid; gap: 28px; }
@media (min-width: 1000px) { .spin-layout { grid-template-columns: 1fr 340px; align-items: start; } }
.wheel-stage { position: relative; width: min(92vw, 560px); aspect-ratio: 1; margin: 8px auto 0; }
.wheel-stage svg.wheel { width: 100%; height: 100%; overflow: visible; }
.wheel-rot { transform-origin: 0 0; transform-box: view-box; }
.wheel-pointer { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); width: 34px; height: 46px; z-index: 3; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
.wheel-hub {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 26%; aspect-ratio: 1; border-radius: 50%; border: 0; z-index: 3;
  background: var(--btn-bg); color: var(--btn-ink);
  display: grid; place-items: center; gap: 0;
  box-shadow: 0 0 0 6px var(--surface), 0 14px 30px -10px rgba(0,0,0,.5);
  font-family: var(--serif); font-size: clamp(18px, 3.4vw, 26px); font-style: italic; font-weight: 500;
}
.wheel-hub:hover { background: var(--btn-bg-hover); }
.wheel-hub[disabled] { opacity: .7; cursor: default; }
.wheel-empty { position: absolute; inset: 18%; display: grid; place-items: center; text-align: center; padding: 20px; color: var(--muted); }
.result-card { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
@media (max-width: 520px) { .result-card { grid-template-columns: 1fr; justify-items: center; text-align: center; } .result-card .row { justify-content: center; } }
.result-card .kicker { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 16px; }
.result-name { font-family: var(--serif); font-size: clamp(30px, 5vw, 40px); line-height: 1.05; font-weight: 600; margin: 2px 0 6px; }
.pop { animation: pop .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ============ Link-Up detail ============ */
.lu-hero { display: grid; gap: 18px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--ink-2); }
.fact { display: inline-flex; align-items: center; gap: 8px; font-size: 15.5px; }
.fact svg { width: 18px; height: 18px; color: var(--muted); }
.people-strip { display: flex; gap: 12px; flex-wrap: wrap; }
.person-chip {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px;
  border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  border: 0; text-align: left;
}
.person-chip .who { font-weight: 500; line-height: 1.1; }
.person-chip .state { font-size: 13px; color: var(--muted); }
.person-chip.done .state { color: var(--ok); }
.person-chip:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.suggest {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  padding: 14px 16px; border-radius: 18px;
  background: color-mix(in srgb, var(--saffron) 12%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--saffron) 40%, transparent);
}
@media (max-width: 560px) { .suggest { grid-template-columns: auto 1fr; } .suggest > .row { grid-column: 1 / -1; } }
.nudge { padding: 14px 16px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 15px; }
.nudge strong { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 17px; }
.excluded summary { cursor: pointer; color: var(--ink-2); font-size: 14.5px; padding: 6px 0; }

/* picking */
.pick-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.slot { border-radius: 18px; padding: 12px; min-height: 92px; box-shadow: inset 0 0 0 1.5px var(--line-strong); display: flex; flex-direction: column; justify-content: space-between; gap: 6px; background: var(--surface); }
.slot.empty { box-shadow: inset 0 0 0 1.5px var(--line-strong); background: transparent; border: 0; }
.slot .rank { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 14px; }
.slot .nm { font-family: var(--serif); font-weight: 600; font-size: 16px; line-height: 1.15; }
.pick-row[aria-pressed="true"] { background: var(--surface); box-shadow: inset 0 0 0 2px var(--saffron); }
.pick-badge { width: 44px; height: 44px; font-size: 20px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--saffron); color: #2B1530; font-family: var(--serif); font-weight: 700; flex: none; }

/* curtain */
.curtain {
  position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; text-align: center;
  background: var(--plum); color: #FFF6E3; padding: 32px;
}
:root[data-theme="dark"] .curtain { background: #1E0F22; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .curtain { background: #1E0F22; } }
.curtain .h1 { color: #FFF6E3; }
.curtain p { color: rgba(255,246,227,.75); max-width: 40ch; margin: 10px auto 26px; }
.curtain .brand-mark { width: 72px; height: 72px; margin: 0 auto 22px; }

/* reveal */
.reveal-stage { position: relative; display: grid; place-items: center; padding: 30px 0 10px; }
.cloche-wrap { position: relative; width: 240px; height: 200px; }
.cloche-wrap > svg { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; }
.reveal-plate { position: absolute; left: 50%; bottom: 18px; z-index: 1; transform: translateX(-50%); transition: transform .9s cubic-bezier(.2,1.2,.4,1) .55s; }
.lifted .reveal-plate { transform: translateX(-50%) translateY(-6px) scale(1.32); }
.cloche-dome { z-index: 2; transform-origin: 50% 90%; transition: transform 1.1s cubic-bezier(.5,-0.3,.2,1), opacity .9s ease .3s; }
.lifted .cloche-dome { transform: translateY(-120px) rotate(-14deg); opacity: 0; }
.reveal-result { opacity: 0; transform: translateY(10px); transition: opacity .6s ease .7s, transform .6s ease .7s; }
.lifted .reveal-result { opacity: 1; transform: none; }
.sparkle { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--saffron); opacity: 0; }
.lifted .sparkle { animation: spark 1.4s ease-out .6s forwards; }
@keyframes spark { 0% { opacity: 0; transform: translate(0,0) scale(.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1); } }
.verdict { text-align: center; max-width: 560px; margin: 0 auto; }
.verdict .h1 { margin-top: 6px; }
.picks-grid { display: grid; gap: 14px; }
@media (min-width: 700px) { .picks-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
.picks-col { padding: 16px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.picks-col ol { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.picks-col li { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.picks-col li .n { font-family: var(--serif); font-style: italic; color: var(--muted); width: 18px; }
.picks-col li.hit { font-weight: 600; }
.picks-col li.hit .n { color: var(--saffron); }

/* ============ Circle ============ */
.people-grid { display: grid; gap: 14px; }
@media (min-width: 700px) { .people-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); } }
.person-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--radius-panel); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); border: 0; text-align: left; width: 100%; }
.person-card:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }

/* ============ Empty states, toast ============ */
.empty { text-align: center; padding: 40px 20px; color: var(--ink-2); }
.empty .plate { margin: 0 auto 14px; }
.empty .h3 { color: var(--ink); margin-bottom: 6px; }
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 200;
  transform: translate(-50%, 20px); opacity: 0;
  background: var(--btn-bg); color: var(--btn-ink);
  padding: 12px 20px; border-radius: 18px; font-size: 15px; line-height: 1.35;
  transition: opacity .25s, transform .25s; pointer-events: none; width: max-content; max-width: min(88vw, 420px); text-align: center;
  box-shadow: 0 12px 30px -12px rgba(0,0,0,.45);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 960px) { .toast { bottom: 32px; } }
.divider { height: 1px; background: var(--line); margin: 6px 0; border: 0; }
.kbd-note { font-size: 13px; color: var(--muted); }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============ v1 server additions ============ */
.mb-16 { margin-bottom: 16px; } .mt-40 { margin-top: 40px; }
.is-busy { opacity: .6; pointer-events: none; }
.danger-text { color: var(--pom); }
.icon-btn.sm { width: 32px; height: 32px; } .icon-btn.sm svg { width: 16px; height: 16px; }
.bell { position: relative; }
.badge { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--pom); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.avatar.xl { width: 84px; height: 84px; font-size: 36px; margin: 0 auto; }
.list-ic { width: 22px; flex: none; color: var(--muted); } .list-ic svg { width: 20px; height: 20px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-2); }
.check input { width: 20px; height: 20px; accent-color: var(--plum); }
.form-grid.three { grid-template-columns: 1.4fr .6fr .9fr; gap: 10px; }
@media (max-width: 420px) { .form-grid.three { grid-template-columns: 1fr 1fr; } .form-grid.three > :first-child { grid-column: 1 / -1; } }

/* sign in */
.auth { display: grid; gap: 28px; align-items: center; padding: 12px 0 40px; }
.auth-art { width: min(64vw, 260px); margin: 4px auto 0; opacity: .95; }
.auth-art svg { width: 100%; height: auto; }
.auth-card { max-width: 440px; width: 100%; margin: 0 auto; }
.auth-card .h1 { font-size: clamp(34px, 8vw, 50px); }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; font-size: 15px; }
.auth-links a { color: var(--ink-2); text-underline-offset: 3px; }
@media (min-width: 860px) { .auth { grid-template-columns: 1fr 1fr; min-height: 72vh; } .auth-art { width: min(40vw, 440px); } .auth-card { margin: 0; } }

/* join + connect */
.join { min-height: 60vh; display: grid; place-items: center; }
.join-card { max-width: 560px; text-align: center; padding: 20px 4px; }
.join-form { text-align: left; max-width: 420px; margin-left: auto; margin-right: auto; }

/* Tonight */
.crave-bar { margin-top: 18px; max-width: 640px; }
.search.big .input { min-height: 56px; font-size: 17px; padding-left: 48px; box-shadow: 0 10px 30px -20px rgba(43,21,48,.35); }
.search.big svg { left: 18px; width: 20px; height: 20px; }
.nudge-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-radius: 20px; background: color-mix(in srgb, var(--saffron) 12%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--saffron) 38%, transparent); }
.nudge-card > div { flex: 1 1 240px; min-width: 0; }
.coffee { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 20px; text-decoration: none; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.coffee svg { width: 28px; height: 28px; color: var(--gold); flex: none; }
.coffee:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.range-row { display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--ink-2); }
.range-row input[type=range] { width: 100%; accent-color: var(--plum); height: 28px; }
:root[data-theme="dark"] .range-row input[type=range] { accent-color: var(--saffron); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .range-row input[type=range] { accent-color: var(--saffron); } }

/* craving search */
.crave-hit { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.crave-hit .place-row { margin-bottom: 0; }
.crave-lines { display: flex; flex-direction: column; gap: 4px; padding: 0 0 4px 58px; }
.hit-line { display: flex; align-items: flex-start; gap: 7px; font-size: 14.5px; color: var(--ink-2); }
.hit-line svg { width: 15px; height: 15px; color: var(--pom); flex: none; margin-top: 3px; }

/* place page */
.photo-plate { border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 3px var(--rim-a), 0 0 0 4px var(--rim-line), 0 10px 20px -10px rgba(0,0,0,.4); }
.photo-plate img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tag-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.tag-name svg { width: 16px; height: 16px; color: var(--muted); }
.fav-list { display: flex; flex-wrap: wrap; gap: 8px; }
.fav { display: inline-flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--pom) 9%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pom) 28%, transparent); font-family: var(--serif); font-style: italic; font-size: 16px; }
.fav svg { width: 15px; height: 15px; color: var(--pom); }
.fav button { border: 0; background: none; color: var(--muted); padding: 2px; border-radius: 50%; display: grid; place-items: center; }
.fav button svg { color: var(--muted); width: 14px; height: 14px; }
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 560px) { .ph-grid { grid-template-columns: repeat(4, 1fr); } }
.ph { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 0; padding: 0; background: var(--surface-2); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-badge { position: absolute; left: 6px; right: 6px; bottom: 6px; font-size: 11px; line-height: 1.2; padding: 4px 6px; border-radius: 8px; background: rgba(30,15,34,.78); color: #FFF6E3; text-align: center; }
.ph.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; color: var(--ink-2); font-size: 13px; box-shadow: inset 0 0 0 1.5px var(--line-strong); background: transparent; }
.ph.add svg { width: 26px; height: 26px; }
.ph.add:hover { background: var(--surface-2); }
.ph-full { width: 100%; border-radius: 18px; display: block; max-height: 62vh; object-fit: contain; background: var(--surface-2); }
.menu-sec { margin-bottom: 10px; }
.menu-sec-name { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink-2); margin: 6px 0 2px; }
.dish-row { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; }
.dish-name { font-size: 15.5px; min-width: 0; }
.dish-price { font-family: var(--serif); font-size: 16px; white-space: nowrap; }
.dish-row .icon-btn { align-self: center; }
.menu-add { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.menu-add [name=name] { grid-column: 1 / -1; }
@media (min-width: 560px) { .menu-add { grid-template-columns: 1fr 1.4fr .6fr auto; } .menu-add [name=name] { grid-column: auto; } }
.hours-edit { display: flex; flex-direction: column; gap: 8px; }
.he-row { display: grid; grid-template-columns: 40px 1fr auto 1fr; gap: 8px; align-items: center; }
.he-row .chip { grid-column: 2 / -1; justify-self: start; padding: 4px 12px; font-size: 13.5px; }
@media (min-width: 560px) { .he-row { grid-template-columns: 48px 1fr auto 1fr auto; } .he-row .chip { grid-column: auto; } }
.he-row.is-closed .input { opacity: .35; }
.he-day { font-weight: 500; }
.he-row .input { min-height: 42px; padding: 8px 10px; }
.dupe-banner { margin-top: -4px; }

/* Link-Ups */
.person-chip { padding: 6px 6px 6px 6px; gap: 6px; }
.person-chip.me { box-shadow: inset 0 0 0 1.5px var(--saffron); }
.pc-main { border: 0; background: none; text-align: left; padding: 2px 8px 2px 4px; color: inherit; }
.pc-main[disabled] { cursor: default; opacity: 1; }
.pc-x { border: 0; background: none; color: var(--muted); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.pc-x:hover { background: var(--surface-2); color: var(--ink); }
.pc-x svg { width: 16px; height: 16px; }
.crown { width: 15px; height: 15px; display: inline; vertical-align: -2px; color: var(--gold); }
.invite-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.invite-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 16px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; font-size: 13.5px; }
.invite-btn svg { width: 24px; height: 24px; }
.invite-btn:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.qr-wrap { background: #fff; padding: 14px; border-radius: 22px; width: min(72vw, 260px); margin: 6px auto 0; box-shadow: 0 0 0 1px var(--line); }
.qr { width: 100%; height: auto; display: block; }
.mode-card { padding: 14px 16px; }
.mode-card[disabled] { cursor: not-allowed; }

/* notifications */
.notif { align-items: flex-start; }
.notif-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.notif-ic svg { width: 18px; height: 18px; }
.notif.unread .notif-ic { background: color-mix(in srgb, var(--saffron) 22%, var(--surface)); color: var(--ink); }
.notif.unread .grow > span:first-child { font-weight: 500; }

/* admin */
.admin-tabs { margin-top: -4px; }
.count-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--pom); color: #fff; font-size: 11.5px; margin-left: 2px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 16px 18px; border-radius: 20px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.stat[disabled] { cursor: default; opacity: 1; }
.stat:not([disabled]):hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.stat-n { font-family: var(--serif); font-size: 34px; line-height: 1.05; }
.stat-l { color: var(--ink-2); font-size: 14px; line-height: 1.3; }
.kv { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 6px 16px; font-size: 14.5px; }
.kv > span:nth-child(odd) { color: var(--muted); }
.kv > span:nth-child(even) { overflow-wrap: anywhere; }
.history { display: flex; flex-direction: column; }
.h-row { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.h-what { overflow-wrap: anywhere; }
.sugg-diff { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 15px; align-items: baseline; }
.sugg-diff > span:nth-child(even) { overflow-wrap: anywhere; }
.dupe-pair { display: grid; gap: 10px; }
@media (min-width: 700px) { .dupe-pair { grid-template-columns: 1fr 1fr; } }
.dupe-side { display: flex; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.dupe-side .title { font-family: var(--serif); font-weight: 600; font-size: 17px; }
.dupe-side > div { min-width: 0; overflow-wrap: anywhere; }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.mod-card { display: flex; flex-direction: column; gap: 10px; padding: 10px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.mod-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 14px; display: block; }
.mod-meta { display: flex; flex-direction: column; gap: 2px; padding: 0 4px; }

@media (max-width: 360px) {
  .topbar { padding-left: 12px; padding-right: 6px; }
  .topbar .brand-word { font-size: 22px; }
  .topbar .brand-mark { width: 26px; height: 26px; }
  .top-actions { gap: 0; }
  .top-actions .icon-btn { width: 38px; height: 38px; }
}

.input.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; letter-spacing: 0; }

/* ---------- 1.2c: Find it online ---------- */
.ai-panel { border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--saffron) 9%, var(--surface)), var(--surface) 60%); }
.ai-panel .h3 { display: flex; align-items: center; gap: 8px; }
.ai-panel .h3 svg { width: 18px; height: 18px; color: var(--gold); }
.ai-card { border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); padding: 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.ai-card .tags { margin: 4px 0 2px; }
.ai-card .btn.full { margin-top: 8px; }
.ai-card a, .ai-src a { color: var(--gold); }
.ai-src { display: flex; gap: 6px; align-items: flex-start; }
.ai-src svg { width: 15px; height: 15px; flex: none; margin-top: 3px; color: var(--gold); }
.ai-loading { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 36px 8px; }
.ai-orb { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; color: var(--btn-ink); background: radial-gradient(circle at 35% 30%, var(--saffron), var(--gold) 55%, var(--plum)); animation: ai-pulse 1.6s ease-in-out infinite; }
.ai-orb svg { width: 30px; height: 30px; animation: ai-spin 3s linear infinite; }
@keyframes ai-pulse { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 color-mix(in srgb, var(--saffron) 40%, transparent); } 50% { transform: scale(1.06); box-shadow: 0 0 0 14px transparent; } }
@keyframes ai-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ai-orb, .ai-orb svg { animation: none; } }
.ai-meter { display: flex; flex-direction: column; gap: 8px; }
.ai-meter .bar { height: 8px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.ai-meter .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--saffron), var(--gold)); border-radius: inherit; }
details.adv summary { cursor: pointer; color: var(--ink-2); font-size: 14px; }
.ai-line { display: flex; align-items: center; gap: 6px; }
.ai-line svg { width: 15px; height: 15px; flex: none; }
