:root {
  /* kitchensink's palette (its Windows app's light and dark themes). */
  --bg: #f2f3f5;
  --surface: #ffffff;
  --surface2: #eef0f3;
  --hover: #e8ebef;
  --border: #e1e4e8;
  --text: #1f2328;
  --muted: #656d76;
  --link: #0969da;
  --star: #b07a0a;
  --good: #1a7f37;
  --primary: #0969da;
  --on-primary: #ffffff;
  --danger: #cf222e;
  --liz: #6950a1;          /* TfL's Elizabeth line purple */
  --liz-soft: #ece8f5;
  --v1: #0969da; --v2: #1a7f37; --v3: #bf3989; --v4: #b35900; /* voters */
  --v5: #8250df; --v6: #0a7d8c; --v7: #9a6700; --v8: #cf222e;
  --sans: "Petrov Sans", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171c;
    --surface: #1e2128;
    --surface2: #2a2e37;
    --hover: #262a33;
    --border: #2b2f38;
    --text: #e6e8ec;
    --muted: #8c929d;
    --link: #5aa8ff;
    --star: #d9a23a;
    --good: #3fb950;
    --primary: #5aa8ff;
    --on-primary: #0d1117;
    --danger: #f8645a;
    --liz: #a58ae0;
    --liz-soft: #2c2640;
    --v1: #5aa8ff; --v2: #3fb950; --v3: #f778ba; --v4: #f0883e;
    --v5: #b694ff; --v6: #39c5cf; --v7: #e3b341; --v8: #ff7b72;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 500 15px/1.45 var(--sans); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h2 { font-size: 1rem; font-weight: 700; margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
[hidden] { display: none !important; }

/* header */
.top { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.top-in { display: flex; align-items: baseline; gap: 16px; min-height: 54px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { display: flex; align-items: baseline; gap: 7px; color: var(--text); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 24px; height: 24px; color: var(--liz); align-self: center; }
.me { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.me .lbl { color: var(--muted); font-size: 0.85rem; margin-right: 4px; }
.me button { border: 1px solid var(--border); background: var(--surface2); padding: 4px 10px; cursor: pointer; font-weight: 600; font-size: 0.9rem; }
.me button:hover { background: var(--hover); }
.me button[aria-checked="true"] { background: var(--vc); border-color: var(--vc); color: var(--surface); }
.me.ask button { animation: nudge 1.2s ease-in-out 2; }
@keyframes nudge { 50% { border-color: var(--vc); } }

main.wrap { padding-top: 16px; padding-bottom: 32px; }

/* panels */
.panel { background: var(--surface); border: 1px solid var(--border); padding: 12px 14px; margin-bottom: 10px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.actions { display: flex; gap: 6px; }

/* buttons, segments, chips */
.btn { border: 1px solid var(--border); background: var(--surface); padding: 5px 12px; cursor: pointer; font-weight: 600; }
.btn:hover { background: var(--surface2); }
.btn.small { font-size: 0.83rem; padding: 3px 9px; }
.btn.danger { color: var(--danger); }
.link-btn { background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; font-size: 0.8rem; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }
.seg { display: inline-flex; border: 1px solid var(--border); background: var(--surface2); }
.seg button { border: 0; background: none; padding: 4px 10px; cursor: pointer; font-size: 0.86rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button:hover { color: var(--text); background: var(--hover); }
.seg button[aria-checked="true"] { background: var(--primary); color: var(--on-primary); }
.wrapseg { flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { border: 1px solid var(--border); background: var(--surface2); color: var(--muted); padding: 2px 9px; cursor: pointer; font-size: 0.84rem; font-weight: 600; }
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { background: color-mix(in srgb, var(--primary) 10%, var(--surface)); color: var(--text); border-color: var(--primary); }
.chip .n { color: var(--muted); font-weight: 500; margin-left: 3px; font-size: 0.78rem; }
.chip.empty { opacity: 0.45; }

.frow { display: grid; grid-template-columns: 92px 1fr; gap: 8px; align-items: start; padding: 6px 0; }
.frow + .frow { border-top: 1px solid var(--border); }
.flabel { color: var(--muted); font-size: 0.85rem; font-weight: 600; padding-top: 3px; }
.tiny-links { display: block; font-weight: 500; }

/* the line */
.line { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 0 2px; }
.line::before { content: ""; position: absolute; left: 10%; right: 10%; top: 17px; height: 6px; background: var(--liz); }
.stop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; background: none; border: 0; cursor: pointer; padding: 0 2px; text-align: center; }
.stop .dot { width: 22px; height: 22px; border: 5px solid var(--liz); background: var(--surface); border-radius: 50%; }
.stop[aria-pressed="true"] .dot { background: var(--liz); box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--liz); }
.stop[aria-pressed="false"] .dot { border-color: var(--border); }
.stop[aria-pressed="false"] .nm { color: var(--muted); text-decoration: line-through; }
.stop .nm { font-weight: 700; font-size: 0.86rem; line-height: 1.2; }
.stop .ct { font-size: 0.75rem; color: var(--muted); }

/* shortlist */
.sl { list-style: none; margin: 0; padding: 0; }
.sl li { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; padding: 5px 0; border-top: 1px solid var(--border); }
.sl li:first-child { border-top: 0; }
.sl .rank { font-weight: 800; color: var(--muted); text-align: right; }
.sl .nm { font-weight: 700; }
.sl .nm a { color: var(--text); }
.sl .sub { color: var(--muted); font-size: 0.82rem; }
.sl li.lead .rank { color: var(--liz); }

/* list */
.searchbar { margin: 14px 0 0; }
.searchbar input { width: 100%; box-sizing: border-box; font: inherit; font-size: 1rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); padding: 9px 12px; }
.searchbar input:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.listbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 8px; }
.listbar #count { margin-right: auto; font-size: 0.9rem; }
.onlyvoted { font-size: 0.86rem; color: var(--muted); display: flex; align-items: center; gap: 5px; cursor: pointer; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.card { background: var(--surface); border: 1px solid var(--border); display: grid; grid-template-columns: auto 1fr; gap: 0 12px; padding: 12px 14px; }
.card.ticked { border-left: 3px solid var(--liz); padding-left: 12px; }
.tick { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; padding-top: 2px; width: 46px; }
.tick input { appearance: none; margin: 0; width: 26px; height: 26px; border: 2px solid var(--muted); background: var(--surface); cursor: pointer; display: grid; place-content: center; }
.tick input::after { content: ""; width: 14px; height: 8px; border: solid var(--on-primary); border-width: 0 0 3px 3px; transform: rotate(-45deg) translate(1px, -2px); opacity: 0; }
.tick input:checked { background: var(--liz); border-color: var(--liz); }
.tick input:checked::after { opacity: 1; border-color: #fff; }
.tick input:disabled { opacity: 0.4; cursor: not-allowed; }
.tick span { font-size: 0.7rem; color: var(--muted); font-weight: 600; text-align: center; line-height: 1.1; }
.body { min-width: 0; }
.head { display: flex; align-items: baseline; gap: 10px; justify-content: space-between; }
.title { font-weight: 800; font-size: 1.05rem; line-height: 1.25; }
.title a { color: var(--text); }
.title .cu { color: var(--muted); font-weight: 600; font-size: 0.86rem; margin-left: 6px; }
.rating { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-weight: 700; color: var(--star); font-size: 0.95rem; }
.rating .rc { color: var(--muted); font-weight: 500; font-size: 0.78rem; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.85rem; color: var(--muted); margin: 3px 0 5px; align-items: center; }
.meta b { color: var(--text); font-weight: 700; }
.walk { display: inline-flex; align-items: center; gap: 5px; }
.roundel { display: inline-block; width: 13px; height: 13px; border: 3px solid var(--liz); border-radius: 50%; position: relative; }
.roundel::after { content: ""; position: absolute; left: -4px; right: -4px; top: 50%; height: 3px; margin-top: -1.5px; background: var(--liz); }
.badge { font-size: 0.74rem; font-weight: 700; padding: 1px 6px; border: 1px solid currentColor; text-transform: uppercase; letter-spacing: 0.03em; }
.badge.vegan { color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); }
.badge.vegetarian { color: var(--good); }
.badge.options { color: var(--muted); }
.badge.limited { color: var(--danger); }
.blurb { margin: 0 0 6px; font-size: 0.9rem; }
.dishes { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.dishes li { background: var(--surface2); padding: 2px 8px; font-size: 0.82rem; }
.tag { font-size: 0.68rem; font-weight: 800; margin-left: 4px; padding: 0 3px; }
.tag.vg { color: var(--good); border: 1px solid var(--good); }
.tag.v { color: var(--good); }
.voters { display: flex; gap: 3px; margin-top: 7px; align-items: center; flex-wrap: wrap; }
.vp { font-size: 0.75rem; font-weight: 700; padding: 1px 7px; color: #fff; background: var(--vc); }
.vp.off { background: none; color: var(--border); border: 1px solid var(--border); padding: 0 6px; }
button.vp { font-family: inherit; cursor: pointer; border: 1px solid var(--vc); line-height: inherit; }
button.vp.off { color: var(--vc); border: 1px dashed var(--vc); }
button.vp:hover { outline: 2px solid var(--vc); outline-offset: 1px; }
.none { color: var(--muted); padding: 24px 0; text-align: center; background: var(--surface); border: 1px solid var(--border); }

.foot { padding-top: 6px; padding-bottom: 28px; line-height: 1.5; }
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 7px 14px; font-size: 0.88rem; opacity: 0; pointer-events: none; transition: opacity .2s; }
.toast.show { opacity: 1; }

@media (max-width: 640px) {
  .me .lbl { display: none; }
  .me button { padding: 4px 8px; }
  .frow { grid-template-columns: 1fr; gap: 4px; }
  .tiny-links { display: inline; margin-left: 6px; }
  .stop .nm { font-size: 0.72rem; }
  .line::before { top: 15px; }
  .stop .dot { width: 18px; height: 18px; border-width: 4px; }
  .head { flex-direction: column; gap: 0; }
  .seg button { padding: 4px 8px; }
  .card { padding: 10px; gap: 0 10px; }
  .tick { width: 36px; }
}

/* cuisine groups */
.cgroups { display: flex; flex-direction: column; gap: 5px; }
.cgroup { display: grid; grid-template-columns: 200px 1fr; gap: 6px; align-items: start; }
.chip.group { font-weight: 800; color: var(--text); text-align: left; }
.chip.group[aria-pressed="mixed"] { background: var(--surface); border-color: var(--primary); border-style: dashed; }
.chip.group[aria-pressed="false"] { color: var(--muted); }

/* Megz */
.badge.megz { text-transform: none; letter-spacing: 0; }
.badge.megz.good { color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); }
.badge.megz.ok { color: var(--star); }
.badge.megz.poor { color: var(--danger); }
.badge .ask { font-weight: 600; margin-left: 4px; opacity: 0.8; }
.dl { font-size: 0.75rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.nodish { margin: 0; color: var(--danger); font-size: 0.86rem; }
.tag.egg { color: var(--star); border: 1px solid var(--star); }
.tag.star { color: var(--star); }
.menu-btn { margin-left: auto; font-size: 0.84rem; }

/* full menu */
.menu { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 8px; }
.menu-head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-bottom: 4px; }
.onlymine { font-size: 0.86rem; font-weight: 700; display: flex; gap: 5px; align-items: center; cursor: pointer; }
.menu h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 10px 0 3px; }
.menu ul { list-style: none; margin: 0; padding: 0; columns: 2 300px; column-gap: 18px; }
.mi { break-inside: avoid; padding: 3px 0 3px 8px; border-left: 3px solid transparent; }
.mi.ok { border-left-color: var(--good); }
.mi.ask { border-left-color: var(--star); }
.mi-top { display: flex; justify-content: space-between; gap: 8px; font-size: 0.88rem; font-weight: 700; }
.mi-price { color: var(--muted); font-weight: 600; white-space: nowrap; }
.mi-desc { font-size: 0.8rem; color: var(--muted); line-height: 1.35; }
@media (max-width: 640px) {
  .cgroup { grid-template-columns: 1fr; gap: 3px; }
  .chip.group { justify-self: start; }
}

/* chains: one card, branches underneath */
.chain-mark { cursor: default; }
.chain-mark .nb { font-weight: 800; font-size: 1.2rem; color: var(--liz); line-height: 1; }
.branches { list-style: none; margin: 10px 0 0; padding: 0; border-top: 1px solid var(--border); }
.branch { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; padding: 8px 0 8px 6px; border-bottom: 1px solid var(--border); border-left: 3px solid transparent; }
.branch:last-child { border-bottom: 0; }
.branch.ticked { border-left-color: var(--liz); }
.branch .meta { margin: 1px 0 2px; }
.branch .voters { margin-top: 3px; }
.b-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 10px; align-items: baseline; }
.b-name { font-weight: 800; }
.b-name a { color: var(--text); }
.tick.sm { width: auto; padding-top: 1px; }
.tick.sm input { width: 22px; height: 22px; }

/* planning */
.when { font-weight: 700; color: var(--liz); font-size: 0.95rem; }
#edit-top { margin-left: 6px; }
.closed { padding: 22px 20px; }
.closed h2 { font-size: 1.25rem; margin-bottom: 4px; }
.planform { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-top: 12px; }
.planform label { display: flex; flex-direction: column; gap: 3px; font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.planform input { font: inherit; color: var(--text); background: var(--surface2); border: 1px solid var(--border); padding: 5px 8px; }
.planner { margin-top: 18px; }
.newh { font-size: 1rem; margin: 16px 0 0; }
.planform fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.planform fieldset legend { padding: 0; margin-bottom: 3px; }
.planform fieldset label { flex-direction: row; align-items: center; gap: 5px; color: var(--text); font-weight: 500; font-size: 0.95rem; display: inline-flex; margin-right: 10px; }
.planform fieldset legend + label { margin-top: 0; }
.cityseg { flex-direction: row !important; flex-wrap: wrap; align-items: center; }
.cityseg legend { width: 100%; }
.planform .names { flex: 1 1 260px; }
.planform .names input { width: 100%; }
.hrs { color: var(--text); font-weight: 600; }
.hrs.shut { color: var(--danger); }
.hrs.unknown { color: var(--muted); font-weight: 500; font-style: italic; }
@media (max-width: 640px) { .when { order: 3; width: 100%; font-size: 0.85rem; } }

/* Tom-Mode: modern, friendly, far too much. */
.tomtoggle { border: 2px dashed var(--border); background: var(--surface2); padding: 3px 10px; cursor: pointer; font-weight: 700; font-size: 0.85rem; }
.tomtoggle[aria-pressed="true"] { border-style: solid; }
.confetti { position: fixed; z-index: 50; pointer-events: none; font-size: 1.6rem; animation: pop 1.1s cubic-bezier(.2,.8,.4,1) forwards; }
@keyframes pop {
  to { transform: translate(var(--dx), calc(var(--dy) + 260px)) rotate(var(--rot)) scale(0.6); opacity: 0; }
}
body.tom {
  --bg: #fff7fd; --surface: #ffffff; --surface2: #fff0c7; --hover: #ffe08a; --border: #ffb5e8;
  --text: #3b1d6e; --muted: #8a5fc7; --link: #ff4fa3; --primary: #ff4fa3; --on-primary: #fff;
  --star: #ff9a00; --good: #18b85c; --danger: #ff3b3b; --liz: #9b5cff; --liz-soft: #efe2ff;
  --sans: "Fredoka", "Comic Sans MS", "Chalkboard SE", system-ui, sans-serif;
  background: radial-gradient(circle at 10% 0%, #ffe3f6 0, transparent 40%), radial-gradient(circle at 90% 20%, #d9f7ff 0, transparent 45%), radial-gradient(circle at 50% 100%, #fff3c4 0, transparent 50%), var(--bg);
  background-attachment: fixed;
  color-scheme: light;
  font-size: 16px;
}
body.tom .top { background: linear-gradient(90deg, #ff6ec7, #ffb86b, #ffe66b, #6bffb8, #6bc8ff, #b86bff); border: 0; box-shadow: 0 6px 0 #ffffff80; }
body.tom .brand { color: #fff; text-shadow: 2px 2px 0 #b8338a; font-size: 1.6rem; }
body.tom .brand svg { color: #fff; animation: wiggle 2s ease-in-out infinite; }
body.tom .brand span::after { content: " 🍔🎈"; }
body.tom .when { color: #fff; text-shadow: 1px 1px 0 #b8338a; font-size: 1.05rem; }
body.tom .tomtoggle { background: #fff; border: 3px solid #fff; border-radius: 999px; color: #ff4fa3; box-shadow: 0 4px 0 #b8338a; animation: bounce 1.6s ease-in-out infinite; }
body.tom .me .lbl { color: #fff; }
body.tom .me button { border-radius: 999px; border: 3px solid #fff; background: #ffffffd0; box-shadow: 0 3px 0 #0002; }
body.tom .me button[aria-checked="true"] { background: var(--vc); color: #fff; transform: scale(1.12) rotate(-3deg); }
body.tom .panel, body.tom .card, body.tom .none {
  border-radius: 28px; border: 4px solid var(--border); box-shadow: 0 8px 0 #ffb5e8, 0 14px 30px #ff4fa31f;
}
body.tom .card:nth-child(4n+1) { border-color: #ffb5e8; box-shadow: 0 8px 0 #ffb5e8; }
body.tom .card:nth-child(4n+2) { border-color: #a8e6ff; box-shadow: 0 8px 0 #a8e6ff; }
body.tom .card:nth-child(4n+3) { border-color: #ffe08a; box-shadow: 0 8px 0 #ffe08a; }
body.tom .card:nth-child(4n+4) { border-color: #b8f5c9; box-shadow: 0 8px 0 #b8f5c9; }
body.tom .card { transition: transform .15s; }
body.tom .card:hover { transform: translateY(-4px) rotate(-0.4deg); }
body.tom .card.ticked { border-left-width: 4px; background: linear-gradient(135deg, #fff 60%, #fff0fa); }
body.tom .card.ticked::after { content: "⭐ PICKED! ⭐"; position: absolute; }
body.tom .list { gap: 18px; }
body.tom .card { position: relative; }
body.tom .card.ticked::after { top: -14px; right: 22px; background: #ffd400; color: #7a3b00; font-weight: 700; padding: 2px 12px; border-radius: 999px; transform: rotate(4deg); box-shadow: 0 3px 0 #c79a00; font-size: 0.85rem; }
body.tom .title { font-size: 1.35rem; }
body.tom .title a { color: var(--text); }
body.tom .title::before { content: "🍽️ "; }
body.tom .btn, body.tom .chip, body.tom .seg button, body.tom .seg, body.tom .dishes li, body.tom .badge, body.tom .vp, body.tom .tag, body.tom .planform input, body.tom .menu-btn {
  border-radius: 999px;
}
body.tom .seg { border: 3px solid var(--border); overflow: hidden; gap: 0; }
body.tom .seg button[aria-checked="true"] { background: linear-gradient(90deg, #ff4fa3, #ff9a00); }
body.tom .chip { border-width: 2px; }
body.tom .chip[aria-pressed="true"] { background: #fff; box-shadow: 0 3px 0 var(--primary); border-color: var(--primary); }
body.tom .chip:hover, body.tom .btn:hover { transform: scale(1.06); }
body.tom .btn { border: 3px solid var(--border); box-shadow: 0 4px 0 var(--border); }
body.tom .dishes li { background: #fff0c7; padding: 3px 12px; font-weight: 600; }
body.tom .dishes li::before { content: "😋 "; }
body.tom .tick input { width: 38px; height: 38px; border-radius: 12px; border: 4px solid var(--liz); }
body.tom .tick input:checked { background: linear-gradient(135deg, #ff4fa3, #ffb86b); border-color: #ff4fa3; animation: boing .4s; }
body.tom .tick input:checked::after { content: "♥"; border: 0; transform: none; width: auto; height: auto; color: #fff; font-size: 1.4rem; line-height: 1; }
body.tom .tick span { color: #ff4fa3; font-weight: 700; }
body.tom .tick { width: 64px; }
body.tom .rating { font-size: 1.1rem; }
body.tom .rating::after { content: " 🤩"; }
body.tom .line::before { height: 10px; border-radius: 99px; background: linear-gradient(90deg, #ff6ec7, #ffb86b, #ffe66b, #6bffb8, #6bc8ff, #b86bff); }
body.tom .stop .dot { border-radius: 50%; }
body.tom .stop[aria-pressed="true"] .dot { animation: bounce 1.4s ease-in-out infinite; }
body.tom .stop:nth-child(2) .dot { animation-delay: .15s; } body.tom .stop:nth-child(3) .dot { animation-delay: .3s; }
body.tom .stop:nth-child(4) .dot { animation-delay: .45s; } body.tom .stop:nth-child(5) .dot { animation-delay: .6s; }
body.tom .roundel { border-color: #ff4fa3; } body.tom .roundel::after { background: #ff4fa3; }
body.tom .walk::after { content: " 🚶‍♂️💨"; }
body.tom .badge.megz.good::before { content: "🥕 "; }
body.tom .shortlist { background: linear-gradient(135deg, #fffbe0, #ffe9f6); }
body.tom .sl .rank { font-size: 1.3rem; color: #ff9a00; }
body.tom .sl li.lead .nm::after { content: " 👑"; }
body.tom .foot::after { content: "Made with 💖 and 🧁 for Tom"; display: block; margin-top: 8px; font-weight: 700; color: #ff4fa3; }
body.tom .branches { border-top: 3px dotted var(--border); }
body.tom .menu { border-top: 3px dotted var(--border); }
@keyframes wiggle { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes boing { 0% { transform: scale(1); } 40% { transform: scale(1.35) rotate(-8deg); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { body.tom * { animation: none !important; } }

/* Landing: invite code, the dinners you've opened, the planner's list. */
.dlist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dlist li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 8px 10px; background: var(--surface2); }
.dlist li.gone { opacity: 0.6; }
.dlist .dn { font-weight: 700; }
.dlist .dm { color: var(--muted); font-size: 0.85rem; flex: 1 1 200px; }
.dlist .code { font-family: ui-monospace, monospace; font-size: 0.85rem; }
#seen h3 { font-size: 0.95rem; margin: 16px 0 0; }
#admin { margin-top: 14px; }
.past { padding: 12px 16px; font-weight: 600; border-left: 4px solid var(--danger); }

/* Per-guest diet toggles in the planner's forms. */
.dietrows { flex: 1 1 100%; display: flex; flex-direction: column; gap: 4px; }
.dietrows:empty { display: none; }
.dietrow { display: grid; grid-template-columns: minmax(3.5em, 7em) repeat(3, auto); justify-content: start; align-items: center; gap: 2px 10px; font-size: 0.85rem; }
.dietrow .dn { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.planform .dietrow label { flex-direction: row; align-items: center; gap: 3px; font-weight: 500; color: var(--text); font-size: 0.85rem; }
.dlist .dd { color: var(--muted); font-style: italic; }

/* Wide screens: the filters live in a sticky left sidebar, each section a
   compact row showing its setting that opens on a click; the shortlist
   stays at the top of the list. Phones keep the stacked layout. */
.fhead { display: none; }
@media (min-width: 1100px) {
  .wrap { max-width: 1400px; }
  #planning:not([hidden]) { display: grid; grid-template-columns: 300px 1fr; gap: 0 20px; align-items: start; }
  #planning > .past { grid-column: 1 / -1; }
  .side { position: sticky; top: calc(var(--head-h, 60px) + 12px); max-height: calc(100vh - var(--head-h, 60px) - 24px);
    overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .side > .panel { margin: 0 0 12px; padding: 4px 12px; }
  .mainlist > .shortlist { margin-top: 0; }
  .mainlist > .searchbar { margin-top: 0; }
  .mainlist > .shortlist:not([hidden]) + .searchbar { margin-top: 12px; }
  .fhead { display: flex; align-items: baseline; gap: 8px; width: 100%; background: none; border: 0; padding: 9px 0; cursor: pointer; font: inherit; color: var(--text); text-align: left; }
  .fhead:hover .ft { color: var(--primary); }
  .fhead .ft { font-weight: 700; font-size: 0.92rem; }
  .fhead .fsum { flex: 1; min-width: 0; color: var(--muted); font-size: 0.85rem; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fhead .chev { color: var(--muted); font-size: 0.8rem; transition: transform .15s; }
  .fsec.open > .fhead .chev { transform: rotate(180deg); }
  /* Closed sections show only their head. */
  .side .frow { display: block; padding: 0; }
  .side .frow > .flabel { display: none; }
  .side .fsec:not(.open) > :not(.fhead) { display: none; }
  .side .fsec.open > :not(.fhead) { margin-bottom: 10px; }
  .side .frow.open[data-sec=cuisine] > .flabel { display: block; margin-bottom: 4px; }
  .side .frow.open[data-sec=cuisine] > .flabel > span:first-child { display: none; } /* keep just the all · none links */
  .side .line-panel .panel-head h2 { display: none; }
  .side .line-panel .panel-head { margin-bottom: 6px; }
  /* The line runs down the sidebar, a stop per row. */
  .side .line { grid-template-columns: 1fr; gap: 6px; padding: 4px 0; }
  .side .line::before { left: 10px; right: auto; top: 14px; bottom: 14px; width: 4px; height: auto; }
  .side .stop { flex-direction: row; justify-content: flex-start; gap: 10px; text-align: left; padding: 0; }
  .side .stop .dot { width: 20px; height: 20px; border-width: 4px; flex: none; }
  .side .stop .ct { margin-left: auto; }
  .side .cgroup { grid-template-columns: 1fr; gap: 4px; }
  .side .cgroup .chips { padding-left: 10px; }
}
}
