:root {
  --bg: #f6f5f2; --card: #ffffff; --text: #1d1d1b; --muted: #6b6a66; --line: #e3e1db;
  --accent: #2f7d5b; --accent-ink: #ffffff; --chip: #e7f2ec; --warn: #a14a1a; --warn-bg: #fbeee6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161716; --card: #202221; --text: #ecebe7; --muted: #9a9a95; --line: #333532;
    --accent: #5cc195; --accent-ink: #0d1a14; --chip: #23382e; --warn: #f0a77d; --warn-bg: #3a2519;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; max-width: 1200px; margin: 0 auto; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 17px; margin: 0 0 12px; }
main { max-width: 1200px; margin: 0 auto; padding: 0 16px 48px; }
.muted { color: var(--muted); font-weight: 400; font-size: .9em; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
label.grow { flex: 1 1 200px; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
input, select { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 0; }
button { font: inherit; border: 0; border-radius: 8px; padding: 9px 14px; background: var(--accent); color: var(--accent-ink); cursor: pointer; font-weight: 600; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 500; }
button.small { padding: 4px 10px; font-size: 13px; }
button:disabled { opacity: .5; cursor: wait; }
.tally { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.tally .t { background: var(--chip); border-radius: 10px; padding: 8px 12px; min-width: 160px; }
.tally .t strong { display: block; }
.tally .t.skip { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.tally .who { font-size: 13px; }
.small-link { font-size: 13px; }
code { font-size: .92em; }
.menus { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; margin-bottom: 16px; }
.card { min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card h3 { margin: 0; font-size: 17px; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.badge { background: var(--chip); border-radius: 999px; padding: 2px 9px; font-size: 12px; white-space: nowrap; }
.sec h4 { margin: 6px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.item { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.item > div { min-width: 0; overflow-wrap: anywhere; }
.item:last-child { border-bottom: 0; }
.item .desc { color: var(--muted); font-size: 13px; }
.price { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.error { background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.links a { display: block; font-size: 13px; color: var(--accent); word-break: break-all; }
.card footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none; }
#toast.on { opacity: .95; }
@media (max-width: 520px) { .menus { grid-template-columns: 1fr; } .row > * { flex: 1 1 100%; } }
