:root {
  --navy: #0f2a4a;
  --navy-2: #1d3d63;
  --gold: #c9a227;
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #16202c;
  --muted: #6b7785;
  --line: #e3e7ec;
  --ok: #1f8a4c;
  --warn: #b7791f;
  --fs: 22px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
header { background: var(--navy); color: #fff; padding: 12px 16px; position: sticky; top: 0; z-index: 5; }
header .brand { font-size: 13px; opacity: .85; letter-spacing: .02em; }
header .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
select, button { font: inherit; border-radius: 10px; border: 1px solid var(--line); padding: 8px 12px; background: #fff; color: var(--text); }
button { cursor: pointer; }
button.primary { background: var(--gold); border-color: var(--gold); color: #1b1b1b; font-weight: 600; }
button.danger { background: #b42318; border-color: #b42318; color: #fff; font-weight: 600; }
button:disabled { opacity: .5; cursor: default; }
button.on { border-color: var(--gold); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.15); }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.pill.live::before { background: #3ddc84; }
.spacer { flex: 1; }
main { max-width: 820px; margin: 0 auto; padding: 12px 16px 96px; }
.caption { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 10px 0; }
.caption .t { font-size: var(--fs); line-height: 1.35; }
.caption .s { font-size: calc(var(--fs) * .62); color: var(--muted); margin-top: 6px; }
.caption.partial { border-style: dashed; }
.caption.original { background: transparent; }
.caption.original .t { color: var(--muted); font-style: italic; }
.caption.original .t::before { content: "🗣 "; font-style: normal; }
.empty { color: var(--muted); text-align: center; margin-top: 40px; }
#toLatest { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; border: 0; display: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 12px 0; }
.card h2 { margin: 0 0 10px; font-size: 17px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }
.meter { height: 12px; background: var(--line); border-radius: 6px; overflow: hidden; }
.meter > div { height: 100%; width: 0; background: var(--ok); transition: width .08s linear; }
.muted { color: var(--muted); font-size: 13px; }
table { width: 100%; border-collapse: collapse; }
td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.qr { width: 180px; height: 180px; background: #fff; }
label { display: block; font-size: 13px; color: var(--muted); margin: 8px 0 4px; }

.warn { background: #fff4e5; border: 1px solid #f0b35b; color: #6b3d00; border-radius: 8px; padding: 8px 10px; font-size: 14px; margin: 8px 0; }
.brandrow { display: flex; align-items: center; gap: 10px; }
.brandrow img { height: 34px; width: auto; background: #fff; border-radius: 6px; padding: 3px; }
header .event { font-size: 15px; font-weight: 600; margin-top: 2px; }
