
:root {
  --bg: #F1F4F4; --panel: #FFFFFF; --ink: #17262B; --muted: #5A6A6F; --line: #D6DEDF;
  --grid-minor: rgba(200, 70, 70, 0.07); --grid-major: rgba(200, 70, 70, 0.16);
  --trace: #C0303B; --trace-2: #2E6A8A; --ok: #2F7D5B; --warn: #A86A12; --bad: #B3261E;
  --radius: 6px;
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--bg);
  font-variant-numeric: tabular-nums;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D1417; --panel: #142024; --ink: #E3EBED; --muted: #94A5AA; --line: #2A393E;
    --grid-minor: rgba(240, 110, 110, 0.05); --grid-major: rgba(240, 110, 110, 0.12);
    --trace: #F0646C; --trace-2: #6FB3D6; --ok: #5DBB8E; --warn: #E0A84A; --bad: #F2857D;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); line-height: 1.45; }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--trace-2); outline-offset: 2px; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 20px 24px 60px; }

header.top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
header.top h1 { font-size: 1.35rem; font-weight: 700; margin: 0; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
header.top h1 svg { width: 44px; height: 20px; }
header.top .spacer { flex: 1; }
.who { color: var(--muted); font-size: 0.875rem; }

.btn { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 14px; cursor: pointer; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: 0.5; cursor: default; }
select, input[type=text], input[type=date] { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 0.8125rem; color: var(--muted); }
label.check { display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; cursor: pointer; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.seg button { border: 0; background: transparent; padding: 6px 12px; cursor: pointer; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed=true] { background: var(--ink); color: var(--bg); font-weight: 600; }

.controls { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-end; padding: 18px 0 14px; }
.period { display: inline-flex; align-items: center; gap: 6px; }
.period .label { min-width: 150px; text-align: center; font-weight: 600; }
.filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.chart-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 6px 0 8px; }
.chart-head h2 { margin: 0; font-size: 1.125rem; font-weight: 600; }
.chart-head .hint { color: var(--muted); font-size: 0.8125rem; }
.paper {
  position: relative; height: 440px; padding: 14px 10px 8px; border: 1px solid var(--line); border-radius: var(--radius);
  background-color: var(--panel);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px;
}
.paper .empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 20px; }

.stats { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 16px 2px; border-bottom: 1px solid var(--line); }
.stat { display: flex; flex-direction: column; }
.stat span { font-size: 0.8125rem; color: var(--muted); }
.stat b { font-size: 1.25rem; font-weight: 600; }
.stat b small { font-size: 0.8125rem; font-weight: 500; color: var(--muted); margin-left: 3px; }
.up { color: var(--ok); } .down { color: var(--bad); }

h3.section { font-size: 1rem; margin: 26px 0 10px; font-weight: 600; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: 0.875rem; }
th, td { padding: 7px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child, th.l, td.l { text-align: left; }
th { font-weight: 600; color: var(--muted); position: sticky; top: 0; background: var(--panel); }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: color-mix(in srgb, var(--trace) 6%, transparent); }
.more { margin: 10px 0; }
/* Sessions table: header row stays visible while scrolling */
.sessions-wrap { overflow: visible; }
.sessions-wrap th { top: 0; z-index: 2; box-shadow: inset 0 -1px 0 var(--line), 0 2px 6px -4px rgba(0, 0, 0, 0.25); }
.sessions-wrap th:first-child { border-top-left-radius: var(--radius); }
.sessions-wrap th:last-child { border-top-right-radius: var(--radius); }
@media (max-width: 1000px) { .sessions-wrap { overflow: auto; max-height: 75vh; } }

.center { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.center p { color: var(--muted); max-width: 46ch; margin: 8px auto 20px; }
.notice { padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); margin: 14px 0; }
.notice.bad { border-color: var(--bad); color: var(--bad); }

dialog { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); padding: 0; width: min(1100px, 96vw); max-height: 92vh; }
dialog::backdrop { background: rgba(10, 18, 20, 0.55); }
.dlg-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 1; }
.dlg-head h2 { margin: 0; font-size: 1.125rem; flex: 1; }
.dlg-body { padding: 16px 20px 22px; overflow: auto; max-height: calc(92vh - 64px); }
.drop { border: 2px dashed var(--line); border-radius: 10px; padding: 26px; text-align: center; background: var(--panel); }
.drop.over { border-color: var(--trace); }
.drop .pick { display: flex; gap: 10px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.opts { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; margin: 16px 0; }
progress { width: 100%; height: 8px; accent-color: var(--trace); }
.summary { display: flex; gap: 20px; flex-wrap: wrap; margin: 12px 0; font-size: 0.9375rem; }
.tag { font-size: 0.75rem; padding: 2px 7px; border-radius: 99px; border: 1px solid currentColor; }
.tag.ok { color: var(--ok); } .tag.dup { color: var(--muted); } .tag.bad { color: var(--bad); } .tag.warn { color: var(--warn); }
.preview-wrap { max-height: 340px; overflow: auto; }

.metrics-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 20px; margin-bottom: 18px; }
.detail-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.detail-charts .paper { height: 280px; }
.detail-charts .wide { grid-column: 1 / -1; }
.detail-charts h4 { margin: 0 0 6px; font-size: 0.875rem; font-weight: 600; }
@media (max-width: 760px) {
  .wrap { padding: 14px 12px 40px; }
  .paper { height: 340px; }
  .detail-charts { grid-template-columns: 1fr; }
  .period .label { min-width: 110px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.hint { color: var(--muted); font-size: 0.8125rem; }
.field-group { display: flex; flex-direction: column; gap: 4px; }
.field-group .lbl { font-size: 0.8125rem; color: var(--muted); }
.btn.icon { padding: 6px 11px; font-size: 1.05rem; line-height: 1; }
.btn.sound { display: inline-grid; place-items: center; padding: 6px 9px; }
.btn.sound svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn.sound .spk { fill: currentColor; }
.btn.sound .on { display: none; }
.btn.sound[aria-pressed=true] { color: var(--trace); border-color: var(--trace); }
.btn.sound[aria-pressed=true] .on { display: inline; }
.btn.sound[aria-pressed=true] .off { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.filters { padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.brand { font-size: 1.75rem; margin: 0 0 4px; display: inline-flex; gap: 12px; align-items: center; }
.brand svg { width: 64px; height: 28px; }
.markers { margin: 0 0 16px; padding-left: 18px; font-size: 0.875rem; }
.metrics-grid .stat b { font-size: 1.05rem; }
td.l, th.l { text-align: left; }
.player { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin-bottom: 14px; }
.heart-wrap { position: relative; width: 54px; height: 50px; flex: none; display: grid; place-items: center; }
.heart-wrap .heart { width: 46px; height: 42px; transform-origin: 50% 55%; overflow: visible; }
.heart path { fill: url(#heartGrad); transition: fill 0.3s; }
.heart.idle path { fill: var(--line); }
.heart.beat { animation: lubdub var(--beat-ms, 300ms) cubic-bezier(0.3, 0.7, 0.4, 1); }
@keyframes lubdub {
  0%   { transform: scale(1);    filter: drop-shadow(0 0 0 rgba(209, 47, 59, 0)); }
  14%  { transform: scale(1.22); filter: drop-shadow(0 0 10px rgba(209, 47, 59, 0.9)); }
  30%  { transform: scale(1.03); filter: drop-shadow(0 0 6px rgba(209, 47, 59, 0.5)); }
  44%  { transform: scale(1.13); filter: drop-shadow(0 0 16px rgba(209, 47, 59, 0.65)); }
  100% { transform: scale(1);    filter: drop-shadow(0 0 0 rgba(209, 47, 59, 0)); }
}
.heart-wrap .ring { position: absolute; left: 50%; top: 54%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%;
  border: 2px solid rgba(209, 47, 59, 0.6); box-shadow: 0 0 14px rgba(209, 47, 59, 0.55), inset 0 0 8px rgba(209, 47, 59, 0.35); opacity: 0; pointer-events: none; }
.heart-wrap .ring.go { animation: ripple calc(var(--beat-ms, 300ms) * 2.4) ease-out; }
@keyframes ripple { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(2.2); opacity: 0; } }
@keyframes beatfade { 0% { opacity: 0.3; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .heart.beat { animation: beatfade var(--beat-ms, 300ms) ease-out !important; } .heart-wrap .ring.go { animation: none !important; } }
.pl-read { display: flex; flex-direction: column; min-width: 64px; }
.pl-read b { font-size: 1.45rem; font-weight: 600; line-height: 1.1; }
.pl-read span { font-size: 0.75rem; color: var(--muted); }
.pl-seek { display: flex; align-items: center; gap: 12px; flex: 1 1 100%; }
.pl-seek input { flex: 1; accent-color: var(--trace); }
.pl-time { font-size: 0.875rem; white-space: nowrap; }
#plPlay { min-width: 84px; }
.player { position: sticky; top: -16px; z-index: 3; box-shadow: 0 8px 14px -12px rgba(0, 0, 0, 0.45); }
.sig-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.sig-head h4 { margin: 0; }
.sig-live { display: flex; align-items: baseline; gap: 5px; }
.sig-live b { font-size: 1.6rem; font-weight: 600; min-width: 5.5ch; text-align: right; color: var(--trace-2); line-height: 1; }
.sig-live span { font-size: 0.8125rem; color: var(--muted); }
.paper.small { height: 200px; }
.readout { margin-top: 26px; }
.ro-head .hint { display: block; margin: -4px 0 12px; max-width: 80ch; }
.ro-state { border: 1px solid var(--line); border-left: 5px solid var(--tone); background: var(--panel); border-radius: var(--radius); padding: 14px 18px; }
.ro-state .state { font-size: 1.2rem; color: var(--tone); }
.ro-state p { margin: 10px 0 0; max-width: 80ch; }
.loadwrap { max-width: 420px; margin-top: 10px; }
.loadbar { position: relative; height: 8px; border-radius: 99px; margin: 6px 0 3px; background: linear-gradient(90deg, var(--ok), var(--trace-2) 50%, var(--warn) 72%, var(--bad)); }
.loadbar i { position: absolute; top: -4px; width: 4px; height: 16px; border-radius: 2px; background: var(--ink); }
.loadscale { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); }
.ro-nums { border-bottom: 0; }
.ro-nums .stat span:last-child { font-size: 0.75rem; }
.ro-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 6px 0 14px; }
.ro-col { background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: var(--radius); padding: 12px 18px; }
.ro-col.win { --c: var(--ok); } .ro-col.att { --c: var(--warn); }
.ro-col h4 { margin: 0 0 8px; color: var(--c); font-size: 1rem; }
.ro-col ul, details.ro ul { padding-left: 18px; margin: 0; }
.ro-col li, details.ro li { margin-bottom: 10px; }
.ro-col li b, details.ro li b { display: block; }
details.ro { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 18px; margin-bottom: 10px; }
details.ro summary { cursor: pointer; font-weight: 600; padding: 2px 0; }
details.ro[open] summary { margin-bottom: 10px; }
.mods li b { display: inline; }
.week li { margin-bottom: 6px; }
.mods { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 24px; }
.mods h5 { margin: 4px 0 8px; font-size: 0.875rem; }
.ev { display: inline-block; font-size: 0.7rem; padding: 0 7px; border-radius: 99px; border: 1px solid currentColor; margin-left: 8px; vertical-align: 1px; }
.ev.strong { color: var(--ok); } .ev.moderate { color: var(--trace-2); } .ev.limited { color: var(--warn); } .ev.practice { color: var(--muted); }
.ro-foot { max-width: 90ch; margin-top: 12px; }
@media (max-width: 760px) { .ro-cols { grid-template-columns: 1fr; } .player { top: -12px; } }

.pl-min { font-style: normal; color: var(--muted); margin-left: 4px; }
.nl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.nl-card { --c: var(--line); background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: var(--radius); padding: 12px 14px; transition: border-color 0.4s; }
.nl-card.good { --c: var(--ok); } .nl-card.mid { --c: var(--warn); } .nl-card.low { --c: var(--bad); }
.nl-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.nl-name { display: block; font-size: 0.95rem; }
.nl-val { font-size: 2rem; line-height: 1; color: var(--c); transition: color 0.4s; }
.nl-card:not(.good):not(.mid):not(.low) .nl-val { color: var(--ink); }
.nl-spark { position: relative; height: 90px; margin: 8px 0 6px; }
.nl-card p { margin: 0; }
.poin-burst { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #d12f3b; opacity: 0; pointer-events: none; }
.poin-burst.go { animation: pburst 450ms ease-out; }
@keyframes pburst {
  0% { opacity: 1; transform: scale(0.6); box-shadow: 0 0 0 0 rgba(209, 47, 59, 0.7); }
  50% { opacity: 0.95; transform: scale(1.35); box-shadow: 0 0 10px 4px rgba(209, 47, 59, 0.45); }
  100% { opacity: 0; transform: scale(1); box-shadow: 0 0 16px 8px rgba(209, 47, 59, 0); }
}
.poin-note { margin: 8px 0 0; }
.poin-note b { color: var(--ink); }
.hma { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.hma h4 .hint { font-weight: 400; margin-left: 8px; }
.hma-grid { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 22px; align-items: start; }
.hma-stage svg { width: 100%; height: auto; display: block; overflow: visible; }
.hma-frame { fill: none; stroke: var(--line); }
.hma-diag { stroke: var(--muted); stroke-dasharray: 4 4; stroke-width: 1; opacity: 0.6; }
.hma-ax { fill: var(--muted); font-size: 10px; }
.hma-dots circle { fill: var(--ink); opacity: 0.35; }
.hma-blob { fill: #f9a825; stroke: #f9a825; fill-opacity: 0.5; stroke-width: 2; stroke-opacity: 0.9; transition: fill 1.2s ease, stroke 1.2s ease, filter 1.2s ease; }
.hma-breath { transform-box: fill-box; transform-origin: center; animation: breathe var(--breath, 10s) ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(0.97); } 50% { transform: scale(1.04); } }
.hma-score b { font-size: 3rem; line-height: 1; transition: color 1.2s; }
.hma-score span { color: var(--muted); margin-left: 4px; }
.hma-band { font-weight: 600; font-size: 1.1rem; margin: 4px 0 12px; }
.hma-scale { position: relative; display: grid; grid-template-columns: repeat(10, 1fr); height: 14px; }
.hma-scale i:first-of-type { border-radius: 99px 0 0 99px; } .hma-scale i:last-of-type { border-radius: 0 99px 99px 0; }
.hma-marker { position: absolute; top: -5px; left: 45%; width: 12px; height: 24px; border-radius: 4px; border: 2px solid var(--ink); background: rgba(255, 255, 255, 0.35); transition: left 1s ease; z-index: 1; }
.hma-scale-lbl { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--muted); margin: 6px 0 12px; }
@media (max-width: 760px) { .nl-row, .hma-grid { grid-template-columns: 1fr; } }
.hma-cage { display: none; }
.caged .hma-cage { display: inline; fill: none; stroke: #b3122a; stroke-opacity: 0.4; stroke-width: 1.5; stroke-dasharray: 3 5; stroke-linecap: round; }
@keyframes cagePulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.caged .hma-breath { animation: tremble 0.16s linear infinite; }
@keyframes tremble { 0% { transform: translate(0, 0); } 25% { transform: translate(0.7px, -0.5px); } 50% { transform: translate(-0.6px, 0.6px); } 75% { transform: translate(0.5px, 0.7px); } 100% { transform: translate(0, 0); } }
.hma-alert { border-left: 5px solid var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--panel)); padding: 10px 12px; border-radius: var(--radius); margin-bottom: 14px; font-size: 0.9rem; }
@keyframes alertPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(179, 18, 42, 0); } 50% { box-shadow: 0 0 0 4px rgba(179, 18, 42, 0.18); } }
.hma-alert.warn { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--panel)); }
.hma-alert b { display: block; color: var(--bad); margin-bottom: 2px; }
.hma-alert.warn b { color: var(--warn); }

.check-banner { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; border-radius: var(--radius);
  border: 2px solid var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--panel)); }
.check-banner.warn { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, var(--panel)); }
.check-banner.done { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--panel)); }
.check-banner > b { font-size: 1.05rem; color: var(--bad); }
.check-banner.warn > b { color: var(--warn); } .check-banner.done > b { color: var(--ok); }
.check-banner > span { flex: 1 1 280px; }
.ci-ask, .ci-form { flex: 1 1 100%; }
.ci-ask ul { margin: 4px 0 6px; padding-left: 20px; }
.ci-form textarea { width: 100%; font: inherit; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); margin: 4px 0 8px; }
.check-list { margin: 14px 0 0; padding: 12px 16px; border-radius: var(--radius); border: 2px solid var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--panel)); }
.check-list.warn { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--panel)); }
.check-list > b { display: block; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid currentColor; background: var(--panel); border-radius: 99px; padding: 4px 12px; cursor: pointer; font-size: 0.875rem; }
.chip.bad { color: var(--bad); } .chip.warn { color: var(--warn); }
.chip:hover { background: color-mix(in srgb, currentColor 10%, var(--panel)); }
.flag { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; }
.flag.bad { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 25%, transparent); }
.flag.warn { background: var(--warn); }
.flag.ok { width: auto; height: auto; color: var(--ok); font-weight: 700; }

.notes { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px 14px; margin-bottom: 16px; }
.notes h3.section { margin: 12px 0 8px; }
.note-list { list-style: none; margin: 0 0 10px; padding: 0; }
.note-list li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.note-list li:last-child { border-bottom: 0; }
.note-time { flex: none; min-width: 58px; font: inherit; font-size: 0.8125rem; font-weight: 600; color: var(--warn); background: none; border: 1px solid currentColor; border-radius: 99px; padding: 2px 8px; cursor: pointer; }
.note-time.none { color: var(--muted); cursor: default; text-align: center; }
.note-body { flex: 1; }
.note-body .hint { display: block; margin-top: 2px; }
.note-del { flex: none; padding: 2px 9px; color: var(--muted); }
.note-add textarea { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); resize: vertical; }
.note-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 8px; }
.nbadge { font-size: 0.72rem; color: var(--warn); border: 1px solid currentColor; border-radius: 99px; padding: 0 6px; margin-left: 6px; white-space: nowrap; }
.note-time.ci { color: var(--ok); cursor: default; }
.note-ci { background: color-mix(in srgb, var(--ok) 7%, transparent); border-radius: var(--radius); padding-left: 6px !important; padding-right: 6px !important; }
.ci-edit, .ci-reopen { flex: none; padding: 2px 8px; color: var(--muted); }

/* ---- compact session view ---- */
.dlg-head { padding: 4px 14px; gap: 8px; }
.dlg-head h2 { font-size: 0.95rem; }
.dlg-head .btn { padding: 2px 10px; font-size: 0.8125rem; }
.dlg-body { max-height: calc(92vh - 34px); }
.player { gap: 4px 12px; padding: 6px 12px; }
.player .btn { padding: 3px 10px; font-size: 0.8125rem; }
.player select { padding: 2px 6px; font-size: 0.8125rem; }
#plPlay { min-width: 66px; }
.pl-read { min-width: 64px; }
.pl-read b { font-size: 25px; line-height: 1.1; }
.pl-read span { font-size: 0.75rem; }
.heart-wrap { width: 52px; height: 48px; }
.heart-wrap .heart { width: 44px; height: 40px; }
.heart-wrap .ring { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
.btn.sound { padding: 3px 6px; }
.btn.sound svg { width: 15px; height: 15px; }
.pl-seek { gap: 8px; }
.pl-time { font-size: 0.85rem; }
.player .hint { font-size: 0.75rem; }
.check-banner { padding: 5px 10px; gap: 4px 10px; font-size: 0.8125rem; }
.check-banner > b { font-size: 0.9rem; }
.check-banner .btn { padding: 2px 9px; font-size: 0.8125rem; }
.notes { padding: 0 12px 8px; margin-bottom: 12px; }
.notes h3.section { margin: 8px 0 2px; font-size: 0.95rem; }
.note-list { margin-bottom: 4px; }
.note-list li { padding: 5px 0; gap: 10px; font-size: 0.875rem; }
.note-add textarea { padding: 5px 8px; min-height: 32px; font-size: 0.875rem; }
.note-actions { margin-top: 4px; gap: 4px 12px; font-size: 0.8125rem; }
.note-actions .btn { padding: 3px 10px; font-size: 0.8125rem; }
/* info buttons */
.info { display: inline-grid; place-items: center; width: 17px; height: 17px; padding: 0; margin-left: 6px; border-radius: 50%; border: 1px solid var(--muted);
  background: transparent; color: var(--muted); font: italic 700 11px/1 Georgia, 'Times New Roman', serif; cursor: pointer; vertical-align: 1px; }
.info:hover { color: var(--ink); border-color: var(--ink); }
.info[aria-expanded=true] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.info.labelled { width: auto; height: auto; border-radius: 99px; padding: 1px 9px; margin-left: 0; font: 600 0.75rem/1.5 inherit; }
.poin-more { display: block; margin-top: 4px; }
.ro-howto { margin: 12px 0 4px; }
.nl-sub { font-size: 0.75rem; font-weight: 500; color: var(--muted); margin-left: 4px; }
.nl-explain { font-size: 0.875rem; margin-top: 6px; }
.nl-explain p { margin: 0 0 3px; }
.nl-explain .nl-today { margin-top: 6px; }
.nl-explain .nl-what { margin-top: 6px; }
.sum-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 4px 0 8px; }
.sum-head h3.section { margin: 0; }
.sum-sel { display: inline-flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--muted); }
.sum-legend { display: inline-flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; font-size: 0.75rem; color: var(--muted); }
.sum-legend .rdot { margin: 0 0 0 8px; cursor: default; }
.sum-note { margin: -8px 0 14px; max-width: 95ch; }
/* thin vertical range marker; the transparent side borders widen the hover area without showing */
.rdot { position: relative; display: inline-block; box-sizing: content-box; width: 2px; height: 13px; padding: 0; margin: 0 3px 0 -4px; border: solid transparent; border-width: 0 4px; border-radius: 2px; background-clip: padding-box; vertical-align: -2px; cursor: help; }
.rdot.g { background-color: var(--ok); } .rdot.y { background-color: #d9a400; } .rdot.r { background-color: var(--bad); } .rdot.n { background-color: var(--line); }
.rdot[data-tip]:hover::after, .rdot[data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; left: -6px; bottom: calc(100% + 6px); width: max-content; max-width: 260px; z-index: 5;
  background: var(--ink); color: var(--bg); font: 500 0.75rem/1.3 "Public Sans", system-ui, sans-serif; text-align: left; padding: 4px 8px; border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.25); white-space: normal; }
.nl-win { color: var(--ink); }
.nl-win b { color: var(--ok); }
.ls-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.ls-status { font-weight: 600; margin: 4px 0; }
.ls-verdict { color: var(--trace-2); margin: 0 0 10px; }
.ls-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.ls-grid div { display: flex; flex-direction: column; min-width: 0; }
.ls-grid .wide { grid-column: 1 / -1; }
.ls-grid span { font-size: 0.75rem; color: var(--muted); }
.ls-grid b { font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ls-canvas { width: 100%; height: 180px; margin: 12px 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: block; }
.ls-pre, .ls-log { font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; overflow: auto; }
.ls-pre { max-height: 260px; margin: 6px 0 0; }
.ls-log { height: 260px; white-space: pre; }
.ls-log .t { color: var(--muted); }

/* ---- live session ---- */
.lv-dlg { width: min(1240px, 97vw); }
.lv-bar { position: sticky; top: -16px; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 12px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 14px -12px rgba(0,0,0,.45); }
.lv-bar .spacer { flex: 1; }
.lv-qual { display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; font-weight: 600; }
.lv-qual i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.lv-qual.ok i { background: var(--ok); } .lv-qual.warn i { background: #d9a400; } .lv-qual.bad i { background: var(--bad); }
.lv-timer { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 90px; }
#lvHeart path { fill: url(#lvHeartGrad); } #lvHeart.idle path { fill: var(--line); }
.btn.rec { color: var(--bad); border-color: var(--bad); font-weight: 600; }
.btn.rec.recording { background: var(--bad); color: #fff; }
.btn.rec:disabled { color: var(--muted); border-color: var(--line); }
.lv-status { font-weight: 600; margin: 8px 2px; min-height: 1.3em; }
.lv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.lv-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.lv-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lv-card-head h4 { margin: 0; }
.pc-canvas { display: block; width: 100%; height: 240px; margin: 10px 0 8px; background: var(--bg); border-radius: var(--radius); outline-offset: 2px; }
.pc-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pc-ctl .btn.icon { font-size: 0.9rem; padding: 5px 12px; }
.pc-val { font-size: 1rem; } .pc-val b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.lv-blobwrap { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 16px; align-items: center; }
.lv-blobsvg { width: 100%; height: auto; overflow: visible; }
.lv-canvas { display: block; width: 100%; height: 150px; margin-bottom: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.lv-canvas.tall { height: 250px; }
.lv-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.lv-stats .stat b { font-size: 1.35rem; }
.lv-note { margin-top: 10px; max-width: 100ch; }
@media (max-width: 860px) { .lv-grid, .lv-blobwrap { grid-template-columns: 1fr; } }
.btn.add-ath { display: inline-grid; place-items: center; padding: 5px 7px; }
.btn.add-ath svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn.add-ath .plus { stroke: var(--ok); stroke-width: 2.2; }
.btn.add-ath:disabled { opacity: 0.4; }
.recalc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 14px 0 4px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: var(--radius); }
.lv-blobnote { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 8px; font-size: 0.75rem; }
.hma-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; }
.hma-tog { font-size: 0.8125rem; color: var(--muted); }
/* KF logo: one color that follows the theme */
.kf-logo { --kf: #51007A; display: inline-flex; align-items: center; color: var(--kf); height: 34px; flex: none; }
.kf-logo:empty { display: none; }
.kf-logo svg { height: 100% !important; width: auto !important; max-width: 200px; display: block; overflow: hidden; pointer-events: none; }
.kf-home { max-width: 200px; overflow: hidden; margin-right: 6px; }
/* recolor the logo, but leave mask and clip shapes alone (recoloring them can blank the logo) */
/* the logo color comes from our own variable, so a color set inside the logo file can never override it */
.kf-logo svg *:not([fill="none"]):not(mask *):not(clipPath *):not(mask):not(clipPath) { fill: var(--kf) !important; }
.kf-logo svg [stroke]:not([stroke="none"]):not(mask *):not(clipPath *) { stroke: var(--kf) !important; }
.brand .kf-logo { height: 44px; }
@media (prefers-color-scheme: dark) { .kf-logo { --kf: #fff; } }
#signin { position: fixed; inset: 0; z-index: 5; overflow-y: auto; background: var(--bg); }   /* covers the whole window, edge to edge */
.si-hero { position: relative; min-height: 68vh; display: flex; align-items: center; color: #fff;
  background-color: #2a0740;
  background-image: linear-gradient(90deg, rgba(22, 4, 34, 0.9) 0%, rgba(22, 4, 34, 0.7) 45%, rgba(22, 4, 34, 0.2) 100%), var(--hero-img), linear-gradient(135deg, #51007A, #1a0328);
  background-size: cover, cover, cover; background-position: center, center 35%, center; }
.si-hero-inner { width: min(1100px, 100%); margin: 0 auto; padding: 56px 28px; }
.si-hero .brand { margin: 0 0 34px; color: #fff; }
.si-hero .kf-logo { --kf: #fff; }
.si-title { font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.08; margin: 0 0 16px; max-width: 16ch; letter-spacing: -0.015em; color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35); }
.si-title::after { content: ""; display: block; width: 72px; height: 4px; margin-top: 18px; border-radius: 2px; background: #c9a4ec; }
.si-kicker { font-size: 1.25rem; font-weight: 700; margin: 0 0 8px; color: #fff; }
.si-lede { max-width: 50ch; margin: 0 0 26px; color: rgba(255, 255, 255, 0.86); line-height: 1.6; }
.btn.si-btn { background: #fff; color: #1b0f24; border-color: #fff; font-weight: 700; padding: 10px 20px; }
.btn.si-btn:hover { background: #f1e8f8; }
.si-access { margin: 10px 0 0; font-size: 0.8125rem; color: rgba(255, 255, 255, 0.72); }
.si-hero .notice { margin-top: 14px; max-width: 50ch; }
.si-below { width: min(1100px, 100%); margin: 0 auto; padding: 28px 28px 48px; }
.si-points { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; text-align: left; }
.si-points li { display: grid; align-content: start; gap: 4px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid #51007A; border-radius: var(--radius); }
@media (prefers-color-scheme: dark) { .si-points li { border-left-color: #b98ae0; } }
.si-points b { font-size: 0.95rem; }
.si-points span { font-size: 0.875rem; color: var(--muted); line-height: 1.45; }
@media (max-width: 820px) {
  .si-points { grid-template-columns: 1fr; }
  .si-hero { min-height: 78vh; background-image: linear-gradient(180deg, rgba(22, 4, 34, 0.55) 0%, rgba(22, 4, 34, 0.88) 60%), var(--hero-img), linear-gradient(135deg, #51007A, #1a0328); }
}
.kf-home { display: inline-flex; border-radius: 6px; }
.kf-home:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.si-eyebrow { margin: -18px 0 12px; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #d9c2f0; }
.si-eyebrow a { color: inherit; text-decoration: none; }
.si-eyebrow a:hover { text-decoration: underline; }
.si-links { margin: -10px 0 22px; font-size: 0.875rem; color: rgba(255, 255, 255, 0.8); }
.si-links a { color: #fff; text-underline-offset: 3px; }
.si-foot { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--muted); }
.si-foot p { margin: 0 0 8px; }
.si-foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.si-foot a { color: var(--ink); text-underline-offset: 3px; }
.switch { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel); color: var(--muted); font: 600 0.8125rem/1 inherit; cursor: pointer; }
.switch .knob { position: relative; width: 34px; height: 20px; border-radius: 99px; background: var(--line); transition: background 0.2s; }
.switch .knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform 0.2s; }
.switch[aria-checked=true] { color: var(--ink); }
.switch[aria-checked=true] .knob { background: var(--trace-2); }
.switch[aria-checked=true] .knob::after { transform: translateX(14px); }
.switch:focus-visible { outline: 2px solid var(--trace-2); outline-offset: 2px; }
.pc-canvas.off { opacity: 0.55; filter: saturate(0.4); transition: opacity 0.25s, filter 0.25s; }
.pc-canvas { transition: opacity 0.25s, filter 0.25s; }
/* ---- sidebar ---- */
:root { --nav-w: 184px; }
body.nav-collapsed { --nav-w: 62px; }
.sidenav { position: fixed; top: 0; left: 0; bottom: 0; width: var(--nav-w); z-index: 20; display: flex; flex-direction: column; gap: 4px; padding: 18px 10px; background: var(--panel); border-right: 1px solid var(--line); overflow: hidden; transition: width 0.2s ease; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 11px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: 600 0.9rem/1 inherit; cursor: pointer; white-space: nowrap; text-align: left; }
.nav-item svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.nav-item[aria-current=page] { background: color-mix(in srgb, #51007A 12%, transparent); color: var(--ink); }
@media (prefers-color-scheme: dark) { .nav-item[aria-current=page] { background: color-mix(in srgb, #b98ae0 18%, transparent); } }
.nav-spacer { flex: 1; }
body.nav-collapsed .nav-item span { opacity: 0; }
body.nav-collapsed .nav-collapse svg { transform: rotate(180deg); }
.nav-burger { display: none; }
body:has(#app:not([hidden])) .wrap { margin-left: calc(var(--nav-w) + max(0px, (100vw - var(--nav-w) - 1280px) / 2)); transition: margin-left 0.2s ease; }
@media (max-width: 760px) {
  .sidenav { transform: translateX(-100%); transition: transform 0.2s ease; width: 200px; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  body.nav-open .sidenav { transform: none; }
  body.nav-collapsed .nav-item span { opacity: 1; }
  .nav-collapse { display: none; }
  .nav-burger { display: inline-flex; }
  body:has(#app:not([hidden])) .wrap { margin-left: auto; }
}
/* ---- games page ---- */
.gm-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 18px 0 4px; }
.gm-head h2 { margin: 0; font-size: 1.5rem; }
.gm-summary { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin: 14px 0 22px; }
.gm-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.gm-stats .stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.gm-stats .stat b { font-size: 1.6rem; }
.gm-stats .stat small { display: block; margin-top: 2px; }
.gm-board { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.gm-board h3 { margin: 0 0 8px; font-size: 1rem; }
.gm-board ol { list-style: none; margin: 0; padding: 0; }
.gm-board li { display: grid; grid-template-columns: 26px 1fr auto; align-items: baseline; column-gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.gm-board li:last-child { border-bottom: 0; }
.gm-board li .hint { grid-column: 2 / 4; font-size: 0.75rem; }
.gm-board .rk { font-weight: 700; color: var(--muted); }
.gm-board .pt { font-weight: 700; font-variant-numeric: tabular-nums; }
.gm-board li.me .nm { font-weight: 700; }
.gm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gm-tile { position: relative; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); padding: 0; background: #05040d; color: #fff; text-align: left; font: inherit; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
button.gm-tile:hover, button.gm-tile:focus-visible { transform: translateY(-3px); box-shadow: 0 16px 34px -18px rgba(81, 0, 122, 0.8); }
.gm-tile canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.gm-cap { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 4px; padding: 18px 16px 16px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.8)); }
.gm-cap b { font-size: 1.15rem; }
.gm-cap span { font-size: 0.85rem; color: rgba(255, 255, 255, 0.82); }
.gm-cap .gm-play { justify-self: start; margin-top: 6px; padding: 5px 12px; border-radius: 99px; background: #fff; color: #1b0f24; font-weight: 700; }
.gm-tile.soon { display: grid; place-items: center; cursor: default; color: var(--muted); font-weight: 600; background: repeating-linear-gradient(45deg, var(--panel), var(--panel) 12px, color-mix(in srgb, var(--line) 50%, var(--panel)) 12px, color-mix(in srgb, var(--line) 50%, var(--panel)) 24px); }
@media (max-width: 900px) { .gm-summary { grid-template-columns: 1fr; } .gm-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gm-grid { grid-template-columns: 1fr; } }
/* ---- the game ---- */
.game-dlg { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: #000; color: #fff; overflow: hidden; }
.game-dlg::backdrop { background: #000; }
#gmCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gm-hud { position: absolute; inset: 0; pointer-events: none; font-family: system-ui, sans-serif; }
.gm-hud button { pointer-events: auto; }
.gm-tl { position: absolute; top: 20px; left: 24px; display: grid; gap: 6px; max-width: 360px; }
.gm-tl b { font-size: 1.15rem; letter-spacing: 0.02em; }
.gm-tl span { font-size: 0.85rem; color: rgba(255,255,255,.75); }
.gm-lags { display: flex; gap: 6px; }
.gm-lags i { width: 22px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.15); }
.gm-lags i.on { background: var(--c); box-shadow: 0 0 10px var(--c); }
.gm-bar { width: 220px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.14); overflow: hidden; }
.gm-bar.wide { width: 260px; }
.gm-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #9fe8ff, #c9a4ff); transition: width 0.3s; }
.gm-tr { position: absolute; top: 18px; right: 24px; display: grid; justify-items: end; gap: 2px; }
.gm-tr b { font-size: 2.2rem; font-variant-numeric: tabular-nums; text-shadow: 0 0 18px rgba(201,164,255,.6); }
.gm-tr span { font-size: 0.95rem; color: rgba(255,255,255,.8); font-variant-numeric: tabular-nums; }
#gmMult { color: #9fe8ff; font-weight: 700; }
.gm-bottom { position: absolute; left: 0; right: 0; bottom: 26px; display: grid; justify-items: center; gap: 8px; text-align: center; }
.gm-bottom b { font-size: 1.35rem; letter-spacing: 0.03em; text-shadow: 0 0 14px rgba(190,215,255,.7); }
.gm-clar { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; color: rgba(255,255,255,.7); }
#gmSignal { font-size: 0.85rem; color: #ffcf8a; min-height: 1em; }
.gm-actions { position: absolute; bottom: 22px; right: 24px; display: flex; gap: 8px; }
.gm-btn { padding: 8px 14px; border-radius: 99px; border: 1px solid rgba(255,255,255,.35); background: rgba(10,8,24,.55); color: #fff; font: 600 0.9rem/1 system-ui, sans-serif; cursor: pointer; backdrop-filter: blur(6px); }
.gm-btn:hover { background: rgba(40,30,70,.7); }
.gm-btn.primary { background: #fff; color: #1b0f24; border-color: #fff; }
.gm-btn:disabled { opacity: 0.45; cursor: not-allowed; }
#gmSound[aria-pressed=false] { opacity: 0.5; text-decoration: line-through; }
.gm-panel { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(560px, 92vw); max-height: 90vh; overflow: auto; padding: 26px 28px; border-radius: 18px; background: rgba(12, 8, 28, 0.78); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(10px); box-shadow: 0 30px 80px rgba(0,0,0,.6); font-family: system-ui, sans-serif; }
.gm-panel h2 { margin: 0 0 8px; font-size: 1.6rem; }
.gm-intro, .gm-panel p { color: rgba(255,255,255,.8); line-height: 1.5; margin: 0 0 14px; }
.gm-f { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 14px; padding: 0; border: 0; color: rgba(255,255,255,.9); }
.gm-f legend { float: left; margin-right: 6px; color: rgba(255,255,255,.65); font-size: 0.9rem; }
.gm-f select { padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.35); color: #fff; font: inherit; }
.gm-f select option { color: #000; }
.gm-go { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.gm-go span, #gmDevState { font-size: 0.85rem; color: rgba(255,255,255,.7); }
.gm-small { font-size: 0.8rem; color: rgba(255,255,255,.6) !important; margin-top: 14px !important; }
.gm-big { display: block; font-size: 3.4rem; line-height: 1.1; margin: 4px 0 10px; text-shadow: 0 0 24px rgba(201,164,255,.7); }
.gm-badge { color: #ffe9a8 !important; font-weight: 700; min-height: 1.2em; margin: 0 !important; }
@media (prefers-reduced-motion: reduce) { .gm-tile { transition: none; } }
.gm-split { font-size: 0.8rem !important; color: rgba(255,255,255,.62) !important; font-variant-numeric: tabular-nums; }
.gm-splits { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.gm-splits span, .gm-records span { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--c); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.gm-splits span b, .gm-records span b { color: var(--c); }
.gm-sig { margin: 4px 0 12px; display: grid; justify-items: center; gap: 6px; }
.gm-sig img { width: 200px; height: 200px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); }
.gm-sig figcaption { font-size: 0.78rem; color: rgba(255,255,255,.6); text-align: center; }
.gm-rec-h { margin-top: 14px !important; }
.gm-records { display: flex; flex-wrap: wrap; gap: 6px; }
.gm-records span { border-color: color-mix(in srgb, var(--c) 60%, var(--line)); }
.gm-records span b { color: var(--ink); } .gm-records small { color: var(--muted); }
.gm-strip { position: absolute; top: 0; left: 0; right: 0; display: grid; grid-template-columns: 1.1fr 1.2fr 1fr auto; align-items: center; gap: 18px; padding: 12px 22px; background: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,0)); }
.gm-ph b { display: block; font-size: 0.95rem; letter-spacing: 0.04em; margin-bottom: 5px; }
.gm-mid { display: grid; justify-items: center; gap: 5px; font-size: 0.8rem; color: rgba(255,255,255,.75); }
.gm-fuel { display: grid; gap: 5px; font-size: 0.75rem; color: rgba(255,255,255,.7); }
.gm-bar.fuel { width: 100%; height: 7px; }
.gm-bar.fuel i { background: linear-gradient(90deg, #3fd6b0, #8ff5d8); }
.gm-fuel.recharging .gm-bar.fuel i { background: linear-gradient(90deg, #2c8f79, #6fd9bd); animation: fuelBreath 3s ease-in-out infinite; }
.gm-fuel.pending { opacity: 0.55; }
@keyframes fuelBreath { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
.gm-sc { display: flex; align-items: baseline; gap: 10px; }
.gm-sc b { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.gm-sc span { font-size: 0.85rem; color: rgba(255,255,255,.75); font-variant-numeric: tabular-nums; }
.gm-bottom { bottom: 22px; }
.gm-bottom b { font-size: 1.15rem; font-weight: 600; }
.game-dlg.hud-off .gm-strip, .game-dlg.hud-off .gm-actions, .game-dlg.hud-off #gmSignal { opacity: 0; transition: opacity 0.4s; }
.game-dlg.hud-off .gm-actions:hover { opacity: 1; }
.game-dlg.idle { cursor: none; }
.gm-journey { font-size: 0.8rem; color: rgba(255,255,255,.6) !important; margin: -6px 0 12px !important; }
.gm-ba { margin: 4px 0 14px; padding: 12px 14px; border-radius: 12px; background: rgba(143,245,216,.07); border: 1px solid rgba(143,245,216,.25); display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.gm-ba h3 { grid-column: 1 / -1; margin: 0 0 2px; font-size: 0.95rem; }
.gm-ba h3 small { font-weight: 400; color: rgba(255,255,255,.55); margin-left: 6px; }
.gm-ba div { display: grid; }
.gm-ba span { font-size: 0.75rem; color: rgba(255,255,255,.6); }
.gm-ba b { font-size: 1.15rem; font-variant-numeric: tabular-nums; } .gm-ba b small { font-weight: 400; color: rgba(255,255,255,.6); }
.gm-ba em { font-style: normal; font-size: 0.8rem; font-weight: 700; } .gm-ba em.up { color: #8ff5d8; } .gm-ba em.down { color: #ffcf8a; }
.gm-ba p { grid-column: 1 / -1; margin: 4px 0 0 !important; }
.gm-trend { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: -8px 0 22px; }
.gm-trend h3 { margin: 0 0 6px; font-size: 1rem; }
.gm-trend svg { width: 100%; max-width: 720px; height: auto; display: block; }
.gm-trend .b0 { fill: color-mix(in srgb, var(--muted) 55%, transparent); } .gm-trend .b1 { fill: #7a3fb0; }
@media (prefers-color-scheme: dark) { .gm-trend .b1 { fill: #b98ae0; } }
.gm-trend .ax { stroke: var(--line); }
.gm-trend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 8px; vertical-align: -1px; }
.gm-trend .k0 { background: color-mix(in srgb, var(--muted) 55%, transparent); } .gm-trend .k1 { background: #7a3fb0; }
@media (max-width: 900px) { .gm-strip { grid-template-columns: 1fr 1fr; } }
.gm-rm { display: flex; align-items: baseline; justify-content: center; gap: 8px; font-size: 0.8rem; color: rgba(255,255,255,.7); }
.gm-rm b { font-size: 1.25rem; color: #8ff5d8; font-variant-numeric: tabular-nums; }
.gm-rm em { font-style: normal; font-weight: 700; } .gm-rm em.up { color: #8ff5d8; } .gm-rm em.down { color: #ffb28a; }
.gm-reserve { display: grid; grid-template-columns: auto 320px auto; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 0.8rem; color: rgba(255,255,255,.75); }
.gm-reserve .rbar { height: 10px; border-radius: 5px; background: rgba(255,255,255,.14); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.gm-reserve .rbar i { display: block; height: 100%; width: 60%; border-radius: 5px; background: linear-gradient(90deg, #3fd6b0, #8ff5d8); box-shadow: 0 0 12px rgba(143,245,216,.6); transition: width 0.4s, background 0.6s; }
.gm-reserve b { min-width: 3.2em; text-align: left; font-variant-numeric: tabular-nums; color: #8ff5d8; }
.gm-reserve.mid .rbar i { background: linear-gradient(90deg, #d6a63f, #f5d58f); box-shadow: 0 0 12px rgba(245,213,143,.5); } .gm-reserve.mid b { color: #f5d58f; }
.gm-reserve.low .rbar i { background: linear-gradient(90deg, #d66a4f, #ffb28a); box-shadow: 0 0 14px rgba(255,178,138,.6); animation: fuelBreath 2.4s ease-in-out infinite; } .gm-reserve.low b { color: #ffb28a; }
.gm-reserve.recharging .rbar i { background: linear-gradient(90deg, #2c8f79, #6fd9bd); animation: fuelBreath 3s ease-in-out infinite; }
.gm-reserve.pending { opacity: 0.5; }
@media (max-width: 700px) { .gm-reserve { grid-template-columns: 1fr; justify-items: center; } .gm-reserve .rbar { width: 260px; } }
.nl-ranges { margin: 10px 0 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 3px; }
.nl-rh { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }
.rr { display: grid; grid-template-columns: 12px max-content 1fr auto; column-gap: 10px; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 6px; font-size: 0.8125rem; }
.rr i { width: 10px; height: 10px; border-radius: 50%; }
.rr b { white-space: nowrap; min-width: 11.5em; }
.rr.good i { background: var(--ok); } .rr.mid i { background: var(--warn); } .rr.low i { background: var(--bad); }
.rr span { color: var(--muted); font-variant-numeric: tabular-nums; }
.rr em { font-style: normal; font-size: 0.72rem; font-weight: 700; }
.rr p { grid-column: 2 / -1; margin: 0 0 2px !important; font-size: 0.78rem; line-height: 1.4; color: var(--muted); }
.rr.cur p { color: var(--ink); }
.rr { padding: 5px 8px !important; align-items: baseline !important; }
.rr i { align-self: center; }
.nl-rnote { margin: 4px 2px 0 !important; font-size: 0.72rem !important; }
.rr.cur { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.rr.cur b, .rr.cur span { color: var(--ink); }
.rr.good.cur em { color: var(--ok); } .rr.mid.cur em { color: var(--warn); } .rr.low.cur em { color: var(--bad); }
.nl-usual { margin: 6px 0 2px !important; font-size: 0.8125rem; color: var(--muted); }
.nl-usual b { color: var(--ink); }
.gm-loading { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 8px; padding: 22px 30px; border-radius: 18px; background: rgba(10,6,24,.55); backdrop-filter: blur(6px); text-align: center; }
.gm-loading svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.gm-loading .trk { fill: none; stroke: rgba(255,255,255,.15); stroke-width: 4; }
.gm-loading .prog { fill: none; stroke: #8ff5d8; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 151; stroke-dashoffset: 151; transition: stroke-dashoffset 0.3s linear; filter: drop-shadow(0 0 6px rgba(143,245,216,.7)); }
.gm-loading b { font-size: 1.15rem; } .gm-loading span { color: rgba(255,255,255,.75); font-size: 0.9rem; }
.gm-why { display: block; margin-top: 4px; font-size: 0.75rem; color: rgba(255,255,255,.65); font-variant-numeric: tabular-nums; }
.gm-pause b { color: #ffcf8a; }
.gm-pause .gm-btn { margin-top: 6px; pointer-events: auto; }
.ses-cov { margin: 4px 0 12px; }
.si-access a { color: #fff; text-underline-offset: 3px; }
#signinErr a { color: inherit; font-weight: 700; text-underline-offset: 3px; }
[hidden] { display: none !important; }
