/* Layout: games as tabs in a left rail; the main area is one game's full dashboard: status and build, plan, then Poki analytics panels. */
:root {
  --bg: #eef1f6; --surface: #ffffff; --inset: #f4f6fa; --ink: #141a2a; --ink-2: #454e63; --muted: #5a6478; --line: #d3dae6; --axis: #b9c2d2; --chip: #e2e8f2; --track: #dfe5ef;
  --accent: #d93a17; --accent-ink: #ffffff; --cobalt: #2447d6;
  --good: #1c7f45; --good-soft: #dff3e6; --good-ink: #176b3a; --warn: #8a5200; --warn-soft: #fdeecb; --crit: #b3261e; --crit-soft: #fbe2e0; --idle: #5a6478;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #8b5cf6; --s5: #c99300; --s6: #6b7689;
  --display: 'Unbounded', 'Arial Black', system-ui, sans-serif; --body: 'Golos Text', system-ui, 'Segoe UI', Roboto, Arial, sans-serif; --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #0f131c; --surface: #171c28; --inset: #1e2433; --ink: #e9edf5; --ink-2: #c3cbdb; --muted: #9aa4b8; --line: #2b3345; --axis: #46506a; --chip: #222a3a; --track: #262e40; --accent: #ff6a45; --accent-ink: #160d09; --cobalt: #93a8ff; --good: #62d08c; --good-soft: #17341f; --good-ink: #62d08c; --warn: #f0b24a; --warn-soft: #3a2f14; --crit: #ff8a80; --crit-soft: #3f1f27; --idle: #9aa4b8; --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #a98bff; --s5: #e8c04a; --s6: #9aa4b8; color-scheme: dark } }
:root[data-theme="dark"] { --bg: #0f131c; --surface: #171c28; --inset: #1e2433; --ink: #e9edf5; --ink-2: #c3cbdb; --muted: #9aa4b8; --line: #2b3345; --axis: #46506a; --chip: #222a3a; --track: #262e40; --accent: #ff6a45; --accent-ink: #160d09; --cobalt: #93a8ff; --good: #62d08c; --good-soft: #17341f; --good-ink: #62d08c; --warn: #f0b24a; --warn-soft: #3a2f14; --crit: #ff8a80; --crit-soft: #3f1f27; --idle: #9aa4b8; --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #a98bff; --s5: #e8c04a; --s6: #9aa4b8; color-scheme: dark }
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--body); }
h1, h2, h3, p { margin: 0; }
h1 { font: 800 clamp(24px, 4.6vw, 34px)/1.1 var(--display); text-wrap: balance; }
h2 { font: 600 16px/1.25 var(--display); text-wrap: balance; }
h3 { font: 500 11.5px/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
a { color: var(--cobalt); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.tab { font-variant-numeric: tabular-nums; }
.app { display: grid; grid-template-columns: 250px minmax(0, 1fr); max-width: 1360px; margin: 0 auto; align-items: start; }
.side { position: sticky; top: env(safe-area-inset-top, 0px); max-height: 100vh; overflow-y: auto; padding: 22px 12px 22px 16px; display: flex; flex-direction: column; gap: 14px; }
.brand { font: 800 17px/1.15 var(--display); padding: 0 8px; }
.eyebrow { font: 500 11.5px/1 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); padding: 0 8px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-h { font: 500 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 10px 8px 4px; }
.navb { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center; padding: 7px 8px; border-radius: 12px; width: 100%; }
.navb:hover { background: var(--chip); }
.navb[aria-current="true"] { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); }
.navb img, .navb .noic { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; background: var(--chip); display: block; }
.navb .nm { font-weight: 700; font-size: 14.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.navb .st { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.navb .st i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.st.act { color: var(--cobalt); } .st.warn { color: var(--warn); } .st.good { color: var(--good); } .st.crit { color: var(--crit); } .st.idle { color: var(--idle); }
.side-foot { padding: 4px 8px; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--muted); }
.main { padding: 22px 18px 70px 12px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; max-height: none; padding: 14px 16px 4px; gap: 8px; }
  .nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 6px; }
  .nav-h, .side-foot .hint { display: none; }
  .navb { width: auto; flex: none; grid-template-columns: 30px auto; padding: 6px 10px 6px 6px; background: var(--surface); }
  .navb img, .navb .noic { width: 30px; height: 30px; }
  .navb .st { display: none; }
  .navb[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--cobalt); }
  .main { padding: 10px 16px 60px; }
}
.empty { border: 1px dashed var(--axis); border-radius: 16px; padding: 26px 20px; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel.wide { grid-column: 1 / -1; }
/* two blocks that belong together, side by side as halves of the row (one under the other on a narrow screen) */
.pair { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; align-items: start; }
.lede { color: var(--ink-2); font-size: 13.5px; }
.cap { font-size: 13px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 14px; align-items: start; }
.hero { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 6px 18px; }
.hero > * { grid-column: 2; min-width: 0; }
.hero > .icon { grid-column: 1; grid-row: 1 / span 5; width: 76px; height: 76px; border-radius: 18px; object-fit: cover; background: var(--chip); }
.hero.noicon { grid-template-columns: minmax(0, 1fr); } .hero.noicon > * { grid-column: 1; }
@media (max-width: 560px) { .hero { grid-template-columns: 52px minmax(0, 1fr); gap: 6px 12px; } .hero > .icon { width: 52px; height: 52px; border-radius: 13px; grid-row: 1 / span 2; } .hero > .full { grid-column: 1 / -1; } }
.title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.title .en { color: var(--muted); font-size: 15px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 7px; font: 500 12px/1 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; padding: 7px 10px; border-radius: 999px; border: 1.5px solid currentColor; }
.pill i { width: 8px; height: 8px; flex: none; background: currentColor; border-radius: 50%; }
.pill.act { color: var(--cobalt); } .pill.warn { color: var(--warn); } .pill.good { color: var(--good); } .pill.crit { color: var(--crit); } .pill.idle { color: var(--idle); }
.pill.warn i { border-radius: 0; transform: rotate(45deg); } .pill.crit i { border-radius: 0; height: 3px; } .pill.idle i { background: none; border: 2px solid currentColor; }
.build { font: 500 13px/1.45 var(--mono); background: var(--chip); padding: 5px 10px; border-radius: 8px; }
.build span { color: var(--muted); }
.pitch { font-size: 16px; max-width: 66ch; }
.poki { font-size: 14px; color: var(--muted); max-width: 74ch; }
.poki b { color: var(--ink); font-weight: 500; }
.tagrow { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font: 500 12px/1.4 var(--mono); padding: 4px 8px; border-radius: 6px; background: var(--chip); color: var(--muted); }
.tag b { color: var(--ink); font-weight: 500; }
.acts { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.open { display: inline-block; background: var(--accent); color: var(--accent-ink); font: 600 14px/1 var(--display); padding: 14px 20px; border-radius: 999px; text-decoration: none; }
.open:hover { filter: brightness(1.08); }
/* the two text buttons of the site share one size, so they line up side by side: .go (filled) and .ghost (quiet) */
.ghost, .go { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 32px; padding: 0 12px; border-radius: 8px; white-space: nowrap; cursor: pointer; font: 500 11.5px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.ghost { color: var(--cobalt); background: var(--chip); }
.go { color: var(--bg); background: var(--ink); }
.ghost:hover { background: var(--track); } .go:hover { filter: brightness(0.92); }
.ghost svg, .go svg { width: 15px; height: 15px; flex: none; }
.ghost:disabled, .go:disabled { opacity: 0.5; cursor: default; }
.spin { width: 11px; height: 11px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
.rstatus { font-size: 13px; color: var(--muted); } .rstatus.err { color: var(--crit); } .rstatus.ok { color: var(--good); }
.next { font-size: 15.5px; max-width: 66ch; }
ul.dec { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 5px; font-size: 14.5px; }
.block { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
ol.rm { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
ol.rm li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 7px 0; position: relative; font-size: 14.5px; line-height: 1.35; }
ol.rm li::before { content: ''; position: absolute; left: 9px; top: 24px; bottom: -8px; width: 2px; background: var(--line); }
ol.rm li:last-child::before { display: none; }
.mk { all: unset; box-sizing: border-box; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--muted); background: var(--surface); position: relative; z-index: 1; }
button.mk { cursor: pointer; }
.s-done .mk { background: var(--muted); border-color: var(--muted); }
.s-done .mk::after { content: ''; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid var(--surface); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.s-now .mk { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.s-done .tx { color: var(--muted); } .s-now .tx { font-weight: 700; }
.tx { min-width: 0; overflow-wrap: anywhere; }
.tx small { display: block; font: 500 11px/1.4 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.dt { font: 500 12px/1.6 var(--mono); color: var(--muted); white-space: nowrap; }
.ctl { display: flex; gap: 4px; }
.ctl button { all: unset; cursor: pointer; min-width: 26px; height: 26px; padding: 0 4px; box-sizing: border-box; border-radius: 6px; background: var(--chip); color: var(--ink); font: 500 13px/26px var(--mono); text-align: center; }
.ctl button.sure { background: var(--crit); color: var(--surface); padding: 0 8px; }
.ctl button:disabled { opacity: 0.35; cursor: default; }
.add { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.add form { display: flex; gap: 8px; }
.add input { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 10px 12px; border-radius: 9px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); }
.add form button { all: unset; cursor: pointer; background: var(--ink); color: var(--bg); font: 500 12px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 0 14px; border-radius: 9px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.presets button { all: unset; display: inline-block; white-space: nowrap; cursor: pointer; font-size: 13.5px; padding: 6px 10px; border-radius: 999px; border: 1.5px dashed var(--line); color: var(--muted); }
/* analytics */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tile-label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.tile-value { font: 600 28px/1 var(--display); display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.tile-value small { font: 500 13px var(--body); color: var(--muted); }
.tile-sub { font-size: 12.5px; color: var(--muted); }
.meter { position: relative; height: 8px; border-radius: 4px; background: var(--track); margin-top: 2px; }
.meter > i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--cobalt); }
.meter > b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); border-radius: 1px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font: 500 12px var(--body); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.warn { background: var(--warn-soft); color: var(--warn); } .chip.warn::before { border-radius: 1px; transform: rotate(45deg); }
.chip.crit { background: var(--crit-soft); color: var(--crit); } .chip.crit::before { border-radius: 1px; }
.chip.note { background: var(--inset); color: var(--ink-2); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }
.sw.d { background: var(--s1); } .sw.m { background: var(--s2); } .sw.t { background: var(--s3); } .sw.tick { width: 2px; height: 12px; border-radius: 1px; background: var(--ink); }
.chart { width: 100%; min-width: 0; }
.chart svg { display: block; max-width: 100%; }
.chart text { font-family: var(--body); font-size: 11px; fill: var(--muted); }
.chart .lab { fill: var(--ink); font-weight: 500; }
.flags { display: flex; flex-direction: column; gap: 10px; list-style: none; margin: 0; padding: 0; }
.flags li { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; }
.flags .t { font-weight: 700; } .flags .d { grid-column: 2; color: var(--ink-2); font-size: 13.5px; }
.rows { display: flex; flex-direction: column; gap: 8px; }
.row { display: grid; grid-template-columns: minmax(92px, 34%) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.row .name { color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.row .name code { font: 500 12px/1.3 var(--mono); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track { position: relative; height: 14px; background: var(--track); border-radius: 4px; }
.track > i { position: absolute; inset: 0 auto 0 0; border-radius: 0 4px 4px 0; background: var(--s1); min-width: 2px; }
.track > b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); border-radius: 1px; }
.track.d > i { background: var(--s1); } .track.m > i { background: var(--s2); } .track.t > i { background: var(--s3); }
.row .val { font-weight: 500; white-space: nowrap; text-align: right; }
.row .val small { color: var(--muted); font-weight: 400; }
.sub { display: flex; flex-direction: column; gap: 8px; }
.sub h4 { margin: 0; font: 700 14px var(--body); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 18px; }
.tscroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 7px 10px 7px 0; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { font-weight: 500; color: var(--muted); font-size: 12px; }
table.txt th, table.txt td { text-align: left; } table.txt td.tab { text-align: right; } td.msg { white-space: normal; min-width: 180px; text-align: left; } td.msg small { display: block; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }
details summary { cursor: pointer; color: var(--ink-2); font-size: 13px; padding: 4px 0; }
.hist { display: flex; align-items: flex-end; gap: 4px; height: 96px; padding-top: 16px; }
.hist div { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; height: 100%; }
.hist i { display: block; width: 100%; border-radius: 3px 3px 0 0; background: var(--s1); min-height: 2px; }
.hist div.over i { background: var(--s3); }
.hist span { font: 500 10.5px/1 var(--mono); color: var(--muted); white-space: nowrap; }
.hist em { font: 500 10.5px/1 var(--mono); font-style: normal; color: var(--ink); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 14px 18px; }
.kpi { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.kpi .v { font: 600 22px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.kpi .l, .kpi .d { font-size: 13px; color: var(--muted); }
.kpi .v { white-space: nowrap; }
.kpi .v .thr { font: 500 12px/1 var(--body); color: var(--muted); }
#tip { position: fixed; z-index: 10; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 12.5px; line-height: 1.4; padding: 7px 10px; border-radius: 8px; max-width: 260px; white-space: pre-line; }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 10px; font-size: 14.5px; max-width: calc(100% - 36px); z-index: 11; }
