/* Console Wars: the Game Boy palette the Godot game uses (rustic-gb). */
:root { --d: #2c2137; --m: #764462; --l: #a96868; --b: #edb4a1; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--d); color: var(--b); font: 16px/1.45 system-ui, sans-serif; }
a { color: var(--b); }
.muted { color: var(--l); }
header, main, footer { max-width: 960px; margin: 0 auto; padding: 12px 16px; }
h1 { margin: 8px 0; letter-spacing: 2px; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--m); }
a.live, a.download { background: var(--m); padding: 2px 10px; border-radius: 4px; text-decoration: none; }
a.live:hover, a.download:hover, a.download:focus-visible { background: var(--l); color: var(--d); }
/* the Solo / Multi cells: Play, and the bundle's download icon right next to it (same height, same theme) */
td.prog { white-space: nowrap; }
td.prog a.live, td.prog a.download { display: inline-flex; align-items: center; height: 1.6em; vertical-align: middle; }
a.download { padding: 0 6px; margin-left: 4px; }
a.download svg { display: block; width: 1em; height: 1em; }
span.download-off { display: inline-flex; align-items: center; height: 1.6em; vertical-align: middle; padding: 0 6px; margin-left: 4px; opacity: .3; cursor: help; }
span.download-off svg { display: block; width: 1em; height: 1em; }
button { background: var(--m); color: var(--b); border: 1px solid var(--l); border-radius: 6px;
  padding: 8px 14px; font: inherit; cursor: pointer; touch-action: none; user-select: none; }
button:disabled { opacity: 0.5; cursor: default; }
button.down { background: var(--l); color: var(--d); }
#home { font-weight: bold; text-decoration: none; letter-spacing: 1px; }
#stage { position: relative; background: #000; aspect-ratio: 10 / 9; max-height: 70vh; margin: 0 auto; }
#screen { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; display: block; }
#overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 16px; background: rgba(44, 33, 55, 0.85); padding: 24px; text-align: center; }
#overlay[hidden] { display: none; }
#play { font-size: 22px; padding: 12px 40px; }
#controls { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; margin: 12px 0; }
#pad div { display: flex; gap: 6px; margin-bottom: 6px; }
#mic { display: flex; flex-direction: column; gap: 6px; }
.meter { width: 200px; height: 8px; background: var(--m); border-radius: 4px; overflow: hidden; }
#level { height: 100%; width: 0; background: var(--b); }
#level.off { background: var(--l); }
#hint, #keys { flex-basis: 100%; margin: 0; }
#status th { width: 180px; color: var(--l); font-weight: normal; }

.proto { font-size: 0.85em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.proto-v4 { color: #2e8b57; font-weight: 600; }
.proto-v3 { color: #c08a00; }
.proto-v2, .proto-v1 { color: #888; }
.proto-unseen { opacity: 0.6; font-style: italic; }

/* the table's Voice (tier), Network (kind) and Hardware columns: compact, hover = the specifics */
td.tier, td.net, td.hw { font-size: 0.85em; white-space: nowrap; cursor: help; }
td.tier-2x { font-weight: bold; }
.hw-tested { color: #8fe39a; font-weight: 600; }   /* green (contrast > 9:1 on --d) */
.hw-likely { color: #6fd1c0; }                     /* teal (> 8:1) */
.hw-maybe { color: #f0b44c; }                      /* amber (> 8:1) */
.hw-unknown { color: var(--l); }
dl.groups dt { font-weight: bold; margin-top: 0.6em; }
dl.groups dd { margin-left: 1.2em; }

.slides-link { font-size: 1.1em; margin: 0.8em 0; }
.slides-link a { color: #f6dccf; background: #764462; padding: 0.25em 0.7em; border-radius: 0.4em; text-decoration: none; }

td.playing { text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }

p.explain { max-width: 60rem; line-height: 1.5; }

/* Data paths (web/paths.js + paths.json): the landing page's last section */
section.paths { max-width: 1220px; margin: 0 auto; padding: 12px 16px 28px; }
section.paths > p { max-width: 60rem; line-height: 1.5; }
.cwp-legend { display: grid; gap: 6px; margin: 12px 0 8px; padding: 10px 14px; border: 1px solid var(--m);
  border-radius: 8px; background: rgba(118, 68, 98, 0.12); font-size: 0.85em; }
.cwp-lrow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.cwp-lrow > b { min-width: 9.5em; color: #f6dccf; }
.cwp-li { display: inline-flex; align-items: center; gap: 6px; }
.cwp-badge { display: inline-block; color: var(--d); font-weight: 700; font-size: 0.75em; letter-spacing: 0.05em;
  padding: 0 7px; border-radius: 8px; line-height: 1.5; }
.cwp-sub { margin: 22px 0 6px; color: #f6dccf; letter-spacing: 1px; }
figure.cwp-card { margin: 10px 0 18px; padding: 12px 14px 8px; border: 1px solid var(--m); border-radius: 10px; }
figure.cwp-group { border-color: var(--l); background: rgba(169, 104, 104, 0.06); }
.cwp-card figcaption h3 { margin: 0 0 4px; color: #f6dccf; }
.cwp-card figcaption p, .cwp-card figcaption ul { margin: 0 0 6px; font-size: 0.9em; line-height: 1.45; }
.cwp-card figcaption ul { padding-left: 1.2em; }
.cwp-scroll { overflow-x: auto; }
.cwp-scroll svg { min-width: 760px; }
.cwp-text { font-size: 0.8em; color: var(--l); margin: 2px 0 0; }
.cwp-text summary { cursor: pointer; }

/* the phone (decision 56): call-to-play and real calls */
#callbox { font-size: 1.1em; }
#callbox .call-head { text-transform: uppercase; letter-spacing: 0.1em; color: var(--l); }
#callbox .call-number { font-size: 1.8em; font-weight: bold; margin: 0.2em 0; }
#callbox .call-number a { text-decoration: none; }
#s-phone.bad { color: #ff8a7a; font-weight: bold; }
#mic[hidden] { display: none; }

/* narrow screens: the table scrolls sideways inside the page instead of overflowing it */
@media (max-width: 720px) {
  #programs { display: block; overflow-x: auto; font-size: 0.9em; }
  #programs th, #programs td { padding: 5px 6px; }
  #programs th { white-space: nowrap; }
}

figure.trailer { margin: 1em 0 1.2em; max-width: 960px; }
figure.trailer video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 0.5em; }
figure.trailer figcaption { font-size: 0.9em; color: var(--l, #b9a3b0); margin-top: 0.4em; }

/* the log console (play.js: a hidden program's page, or ?debug=1): the session's events beside the game */
body.with-log header, body.with-log main { max-width: 1400px; }
body.with-log #gamerow { display: grid; grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); gap: 12px; align-items: start; }
body.with-log #stage { max-height: none; width: 100%; }
#log { display: flex; flex-direction: column; min-height: 0; height: min(72vh, 760px); overflow: hidden; background: #111; border: 1px solid var(--m); border-radius: 6px; }
#log[hidden] { display: none; }
#log-bar { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 6px 8px; border-bottom: 1px solid var(--m); font-size: 13px; }
#log-bar label { white-space: nowrap; }
#log-bar button { padding: 2px 10px; font-size: 13px; }
#log-lines { flex: 1; overflow-y: auto; height: 0; min-height: 360px; padding: 6px 8px;
  font: 12px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
#log-lines div { border-bottom: 1px solid #222; padding: 1px 0; }
#log-lines .t { color: #888; }
#log-lines .k { display: inline-block; width: 4.5em; font-weight: bold; }
.lk-line .k { color: #9ab; } .lk-voice .k { color: #fd6; } .lk-call .k { color: #6df; }
.lk-cpu .k { color: #f88; } .lk-cmd .k { color: #8f8; } .lk-snap .k { color: #ccc; } .lk-snap { color: #bbb; }
@media (max-width: 1000px) { body.with-log #gamerow { grid-template-columns: 1fr; } }
