:root {
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #13213a;
  --muted: #5b6b84;
  --line: #dfe5ee;
  --accent: #2a62d4;
  --good: #1f8a4c;
  --bad: #c0392b;
  --head: #0a1a30;
  --headAccent: #7fb0ff;
  --tab: #ffffff;
  --chip: #e8eefb;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1726;
    --card: #1b2638;
    --text: #e8eef8;
    --muted: #9aa9c0;
    --line: #2c3a52;
    --accent: #8db6ff;
    --good: #5fd38d;
    --bad: #ff8a7a;
    --tab: #162033;
    --chip: #24324a;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
a { color: var(--accent); }
.top { background: var(--head); color: #fff; padding: calc(12px + env(safe-area-inset-top)) 16px 14px; position: sticky; top: 0; z-index: 2; }
.brand { color: var(--headAccent); font-weight: 700; font-size: 13px; letter-spacing: 1px; }
.top h1 { margin: 2px 0 0; font-size: 22px; }
.back { background: none; border: 0; color: var(--headAccent); font-size: 15px; padding: 4px 0 0; cursor: pointer; }
main { max-width: 720px; margin: 0 auto; padding: 16px; }
.pad { padding: 16px; }
.card { background: var(--card); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; border: 1px solid var(--line); }
.card.tap { cursor: pointer; }
h2 { font-size: 17px; margin: 20px 0 10px; }
h3 { font-size: 16px; margin: 0 0 4px; }
.date { color: var(--accent); font-weight: 700; font-size: 14px; }
.muted { color: var(--muted); font-size: 14px; }
.row { display: flex; gap: 12px; align-items: baseline; }
.row .grow { flex: 1; min-width: 0; }
.big { font-size: 26px; font-weight: 700; }
.chip { display: inline-block; background: var(--chip); border-radius: 999px; padding: 2px 10px; font-size: 13px; margin: 2px 4px 2px 0; }
.good { color: var(--good); font-weight: 700; }
.bad { color: var(--bad); font-weight: 700; }
.lines { margin: 6px 0 0; padding: 0; list-style: none; }
.lines li { padding: 3px 0; }
.btn { background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 8px 14px; font-size: 15px; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.links a { display: block; padding: 4px 0; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.seg button { flex: 1; border: 0; padding: 8px; background: var(--card); color: var(--text); font-size: 14px; cursor: pointer; }
.seg button.on { background: var(--accent); color: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 6px 4px; border-top: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
td.n, th.n { text-align: right; white-space: nowrap; }
.sess { display: flex; gap: 10px; padding: 3px 0; }
.sess .d { width: 108px; flex: none; color: var(--muted); }
.sess .t { font-weight: 600; }
details summary { cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
.tap-link { color: var(--accent); padding: 8px 0; font-weight: 600; }
.lock { border-style: dashed; }
input[type=password], input[type=text], input[type=email], textarea, select { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 16px; }
.check { display: flex; gap: 10px; align-items: center; padding: 6px 0; }
.check input { width: 20px; height: 20px; }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--tab); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 3; }
.tabs button { flex: 1; background: none; border: 0; padding: 8px 2px 10px; color: var(--muted); font-size: 12px; cursor: pointer; }
.tabs button .ico { display: block; font-size: 18px; }
.tabs button.on { color: var(--accent); font-weight: 700; }
.foot { text-align: center; margin: 20px 0; }
tr.me td { background: var(--chip); }
.step { display: grid; grid-template-columns: 5.5em 1fr; gap: 8px; padding: 4px 0; }
.step.done { opacity: 0.55; }
.step.next { color: var(--accent); font-weight: 700; }
.step .muted { font-weight: 400; }
.offline { background: var(--chip); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; font-size: 0.9em; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.chip { border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 0.9em; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.book { font-weight: 400; font-size: 0.85em; margin-left: 6px; white-space: nowrap; }
.qr { display: block; margin: 8px auto; width: 200px; height: 200px; image-rendering: pixelated; }
.tip { border: 1px solid var(--accent); }
.teamline { margin: 0 0 10px; }
.guide { position: fixed; inset: 0; background: rgba(10, 20, 40, 0.45); display: flex; align-items: flex-end; justify-content: center; z-index: 50; padding: 16px; }
.guide-card { background: var(--card); color: var(--text); border-radius: 14px; padding: 16px; max-width: 560px; width: 100%; max-height: 80vh; overflow: auto; }
.guide-card p { margin: 0 0 10px; }
tr.tap { cursor: pointer; }

td.group { padding-top: 12px; font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.04em; }

.fb label { display: block; margin-bottom: 12px; font-weight: 600; font-size: 15px; }
.fb label input, .fb label textarea, .fb label select { display: block; margin-top: 4px; font-weight: 400; font-family: inherit; }
.fb textarea { resize: vertical; min-height: 120px; }
.fb .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
details.more > summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 4px 0 12px; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "▸ "; }
details.more[open] > summary::before { content: "▾ "; }
details.more.sessions > summary { padding: 4px 0; font-size: 14px; }
details.share > summary { list-style: none; gap: 8px; flex-wrap: wrap; cursor: default; }
details.share > summary::-webkit-details-marker { display: none; }
details.share > summary .ghost { cursor: pointer; }
details.share .qr { display: block; margin-top: 12px; }
form.unlock { display: flex; gap: 8px; align-items: center; }
form.unlock input { flex: 1; min-width: 0; }
a.tap-card { display: block; text-decoration: none; color: var(--text); }
a.tap-card b { color: var(--accent); }
details.prog > summary { cursor: pointer; list-style: none; }
details.prog > summary::-webkit-details-marker { display: none; }
details.prog .lines { margin-top: 8px; }
table.levels { margin-top: 10px; font-size: 14px; }
table.levels th, table.levels td { padding: 4px; }
.group-label { font-size: 13px; margin: 10px 0 4px; }
