:root {
  --bg: #f6f7f9; --card: #ffffff; --ink: #111214; --muted: #5b6270; --line: #e4e7ec;
  --fire: #e5484d; --fire-bg: #fdecec; --gun: #2f6fdb; --gun-bg: #eaf1fd;
  --thunder: #7c5cdb; --thunder-bg: #f0ecfd; --crash: #2e9f62; --crash-bg: #e8f6ee;
  --primary: #c62f35; --primary-ink: #fff; --warn: #9a4608; --warn-bg: #fff4e5; --chip-hot: #a8232a; --undo: #ff9a9a;
  color-scheme: light;
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111214; --card: #1b1d21; --ink: #f2f3f5; --muted: #a3a9b5; --line: #2c3036;
    --fire-bg: #3a1c1e; --gun-bg: #19263d; --thunder-bg: #251d3d; --crash-bg: #15301f;
    --warn: #ffb86b; --warn-bg: #3a2a12; --chip-hot: #ff9b9b; --undo: #a8232a; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom); }
main { max-width: 520px; margin: 0 auto; padding-bottom: 96px; }
button { font: inherit; color: inherit; cursor: pointer; }
.top { max-width: 520px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 14px 0 4px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.15rem; }
.logo { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle, var(--fire) 0 30%, transparent 31% 45%, var(--fire) 46% 56%, transparent 57%); }
.iconbtn { border: 0; background: none; font-size: 1.4rem; padding: 8px; min-width: 44px; min-height: 44px; }
h1 { font-size: 1.75rem; line-height: 1.15; margin: 12px 0 6px; letter-spacing: -0.01em; }
.sub { color: var(--muted); margin: 0 0 16px; }
h2 { font-size: 1.1rem; margin: 26px 0 10px; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 6px; text-align: left; min-height: 104px; padding: 16px; border-radius: 18px; border: 2px solid transparent; font-weight: 600; font-size: 1.05rem; }
.tile .ico { grid-column: 1 / -1; font-size: 2rem; line-height: 1; }
.tile .chev { color: var(--muted); font-size: 1.4rem; line-height: 1; }
.tile:active { transform: scale(0.98); }
.tile:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--gun); outline-offset: 2px; }
.t-fire { background: var(--fire-bg); } .tile.t-fire { border-color: color-mix(in srgb, var(--fire) 35%, transparent); }
.t-gunshot { background: var(--gun-bg); } .t-thunder { background: var(--thunder-bg); } .t-crash { background: var(--crash-bg); }

.push { margin-top: 16px; }
.push p { color: var(--muted); margin: 8px 0 0; }
.primary { display: block; width: 100%; border: 0; border-radius: 14px; padding: 15px; background: var(--primary); color: var(--primary-ink); font-weight: 700; font-size: 1.05rem; min-height: 52px; }
.ghost { border: 1.5px solid var(--line); background: var(--card); border-radius: 14px; padding: 13px; font-weight: 600; min-height: 48px; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px 10px; }
.row .open { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; text-align: left; background: none; border: 0; padding: 4px; min-height: 44px; border-radius: 12px; }
.mine { font-size: 0.8rem; color: var(--muted); }
.row.ended { opacity: 0.65; }
.row .ico { font-size: 1.6rem; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; }
.what { display: grid; gap: 2px; min-width: 0; }
.what small { color: var(--muted); }
.acts { display: flex; gap: 6px; }
.mini { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font-size: 1.1rem; font-weight: 700; }
.mini.yes { color: var(--crash); } .mini.no { color: var(--fire); }
.chip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; display: inline-block; font-size: 0.8rem; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); width: fit-content; }
.chip.active { background: var(--fire-bg); color: var(--chip-hot); font-weight: 600; }
.chip.disputed { background: var(--warn-bg); color: var(--warn); }
.empty { color: var(--muted); }
.banner { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; }
footer { margin-top: 32px; color: var(--muted); font-size: 0.9rem; }
footer a { color: inherit; }

.sheet { border: 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); width: 100%; max-width: 520px; margin: auto auto 0; border-radius: 22px 22px 0 0; background: var(--card); color: var(--ink); max-height: 90dvh; }
.sheet::backdrop { background: rgb(0 0 0 / 0.35); }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: -6px auto 12px; }
.sheet header { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.sheet h3 { margin: 0 0 2px; font-size: 1.25rem; }
.ico.big { font-size: 2rem; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; }
.where { font-weight: 600; margin: 8px 0 2px; }
.honest, .pct, .note, .tip { color: var(--muted); margin: 4px 0; }
.bar { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--crash); }
.sheet .primary { margin-top: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.call { display: block; text-align: center; margin: 14px 0 6px; padding: 12px; border-radius: 14px; background: var(--bg); color: var(--ink); font-weight: 700; text-decoration: none; }
.sw { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sw input { width: 22px; height: 22px; }
.hours select { font: inherit; padding: 6px; border-radius: 8px; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); width: min(480px, calc(100% - 32px)); justify-content: space-between; bottom: calc(20px + env(safe-area-inset-bottom)); background: var(--ink); color: var(--bg); border-radius: 14px; padding: 12px 16px; display: flex; gap: 16px; align-items: center; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgb(0 0 0 / 0.2); }
.toast[hidden] { display: none; }
.toast button { background: none; border: 0; color: var(--undo); font-weight: 700; padding: 10px 14px; min-height: 44px; min-width: 64px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: no-preference) { .sheet[open] { animation: up 0.18s ease-out; } @keyframes up { from { transform: translateY(24px); opacity: 0.6; } } }

.strip { display: block; width: 100%; text-align: left; margin: 6px 0 4px; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--primary); color: var(--primary-ink); font-size: 1rem; min-height: 48px; }
.bannerbtn { display: block; margin-top: 8px; border: 1.5px solid currentColor; background: none; color: inherit; border-radius: 10px; padding: 8px 12px; font-weight: 700; min-height: 44px; }
.updated { color: var(--muted); font-weight: 400; font-size: 0.8rem; }
.close { float: right; border: 0; background: var(--bg); color: var(--ink); width: 44px; height: 44px; border-radius: 50%; font-size: 1.1rem; margin: -4px -4px 0 8px; }
.err { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 10px 12px; margin: 10px 0 0; font-weight: 600; }
.sheet .tip { color: var(--ink); font-weight: 600; margin: 2px 0 8px; }
.dep { border: 0; padding: 0; margin: 0; min-width: 0; }
.dep:disabled { opacity: 0.5; }
button:disabled { opacity: 0.6; cursor: progress; }
