/* fuyo. One ink, one blue, white paper, hairlines. Lato throughout.
   The dashboard is the exception: a pause menu on the night sky, at the end of this file. */

@font-face { font-family: Lato; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/Lato-Regular.ttf) format("truetype"); }
@font-face { font-family: Lato; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/Lato-Bold.ttf) format("truetype"); }
@font-face { font-family: Lato; font-weight: 400; font-style: italic; font-display: swap; src: url(fonts/Lato-Italic.ttf) format("truetype"); }

:root {
  --ink: #1d2165;
  --ink-soft: #2b3078;
  --text: #2a2d4a;
  --muted: #666a8a;
  --faint: #9a9db5;
  --blue: #4c54df;
  --blue-ink: #363db5;
  --paper: #fff;
  --snow: #f5f6fa;
  --line: #e3e5ef;
  --line-strong: #c6c9dc;
  --ok: #178a6c;
  --bad: #c0392b;
  --font: Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --max: 1120px;
  --gutter: 24px;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.55 var(--font);
  color: var(--text);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }

h1, h2, h3 { color: var(--ink); font-weight: 700; margin: 0; line-height: 1.12; letter-spacing: -0.015em; }
h1 { font-size: clamp(40px, 6vw, 64px); margin-bottom: 20px; letter-spacing: -0.025em; }
h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 14px; letter-spacing: -0.02em; }
h3 { font-size: 18px; letter-spacing: 0; margin-bottom: 6px; }
p { margin: 0 0 1em; }
a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-ink); }
strong, b { color: var(--ink); }
small, .muted { color: var(--muted); }
.lead { font-size: 21px; line-height: 1.5; color: var(--text); max-width: 50ch; }
.over { font-family: var(--mono); font-size: 13px; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); margin: 0 0 18px; }
.over .n { color: var(--faint); margin-right: 10px; }
::selection { background: var(--blue); color: #fff; }
.more { font-weight: 700; text-decoration: none; }
.more::after { content: " \2192"; }
.more:hover { text-decoration: underline; }
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
code { font-family: var(--mono); font-size: .92em; color: var(--ink); background: var(--snow); padding: 1px 5px; border-radius: 4px; }
.code { font-family: var(--mono); font-size: 14px; line-height: 1.65; color: var(--ink); background: var(--snow); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 0 0 1em; overflow-x: auto; white-space: pre; }
.code.long { white-space: pre-wrap; word-break: break-all; }
.code .p { color: var(--faint); }
.code .s { color: var(--blue-ink); }
.code code { background: none; padding: 0; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 600px; }

/* Header and footer */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { display: inline-flex; color: var(--ink); text-decoration: none; margin-right: auto; }
.logo svg { height: 30px; width: auto; display: block; } /* 2 px per pixel of the mark */
.top nav { display: flex; align-items: center; gap: 24px; white-space: nowrap; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; }
.top nav a:hover { color: var(--blue); }
.top nav a[aria-current] { color: var(--blue); }
.top nav .btn, .top nav .btn:hover { color: #fff; }
.top nav form { display: contents; }
.top nav button { font: inherit; font-weight: 700; font-size: 15px; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; }
.top nav button:hover { color: var(--blue); }
@media (max-width: 560px) { .top nav { gap: 16px; } .top .btn { height: 36px; padding: 0 12px; } }

.foot-horizon { color: var(--ink); margin-top: 32px; }
.foot-horizon svg { display: block; width: 100%; height: clamp(54px, 7vw, 90px); }
.foot { background: var(--ink); color: rgba(255,255,255,.7); }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; padding: 40px var(--gutter) 48px; font-size: 14px; }
.foot .brand { margin-right: auto; display: inline-flex; align-items: center; gap: 14px; color: #fff; }
.foot .brand svg { height: 30px; width: auto; }
.foot a { color: rgba(255,255,255,.7); text-decoration: none; }
.foot a:hover { color: #fff; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 20px; border-radius: var(--radius); background: var(--ink); color: #fff; border: 1px solid var(--ink); font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; }
.btn:hover { background: var(--ink-soft); border-color: var(--ink-soft); color: #fff; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn-danger { background: #fff; color: var(--bad); border-color: var(--line); height: 34px; padding: 0 12px; font-size: 14px; }
.btn-danger:hover { background: #fff; color: var(--bad); border-color: var(--bad); }
.btn-small { height: 36px; padding: 0 14px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.htmx-request { opacity: .6; }
.actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 28px; }

/* Landing: a winter night, then snow-white ground. */
.night { background: var(--ink); background-image: linear-gradient(180deg, #15184f 0%, var(--ink) 55%, #262c80 100%); color: #fff; position: relative; overflow: hidden; }
.night h1, .night h2, .night h3, .night strong, .night b { color: #fff; }
.night .lead { color: rgba(255,255,255,.82); }
.night .over { color: #9fa6ff; }
.night .over .n { color: rgba(255,255,255,.4); }
.night a { color: #fff; }
.night .more:hover { color: #c7cbff; }
.hero { --scene: 300px; min-height: 100svh; }
.hero .wrap { position: relative; z-index: 2; padding: 112px var(--gutter) var(--scene); }
.hero h1 { font-size: clamp(56px, 8vw, 104px); line-height: .95; letter-spacing: -0.04em; margin: 0 0 24px; text-shadow: 0 2px 0 rgba(11,9,30,.35); }
.hero .lead { font-size: clamp(19px, 1.7vw, 22px); max-width: 48ch; }
.hero .over, .hero .lead { text-shadow: 0 1px 0 rgba(11,9,30,.7), 0 0 14px rgba(14,17,54,.9); }
@media (max-width: 899px) { .hero { --scene: 240px; } .hero .wrap { padding-top: 96px; } }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light:hover { background: #e9ebff; border-color: #e9ebff; color: var(--ink); }
.night .btn-light, .night .btn-light:hover { color: var(--ink); }
/* the generated village (static/village.js) fills the hero; pixels stay crisp */
.village { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.village canvas { position: absolute; left: 0; bottom: 0; image-rendering: pixelated; image-rendering: crisp-edges; }
/* on the start page the header sits on the night sky */
.home .top { position: absolute; top: 0; left: 0; right: 0; z-index: 3; border-bottom: 0; }
.home .top .logo, .home .top nav a, .home .top nav button { color: #fff; }
.home .top nav a:hover, .home .top nav button:hover { color: #c7cbff; }
.home .top nav .btn, .home .top nav .btn:hover { background: #fff; border-color: #fff; color: var(--ink); }
.home .top nav .btn:hover { background: #e9ebff; border-color: #e9ebff; }

/* Pages of prose: terms, privacy */
.page { padding-top: 64px; padding-bottom: 96px; }
.prose { max-width: 72ch; }
.prose h1 { margin-bottom: 16px; }
.prose h2 { font-size: 22px; margin: 48px 0 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.prose p, .prose li { font-size: 16px; }
.prose table { font-size: 15px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; margin: 0 0 1em; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.kv dd strong { font-size: 1.05em; }

/* Usage against the plan's limits */
progress.meter { -webkit-appearance: none; appearance: none; display: block; width: 100%; max-width: 360px; height: 8px; margin: 7px 0 6px; border: 0; border-radius: 4px; background: var(--line); overflow: hidden; color: var(--blue); }
progress.meter::-webkit-progress-bar { background: var(--line); border-radius: 4px; }
progress.meter::-webkit-progress-value { background: var(--blue); border-radius: 4px; }
progress.meter::-moz-progress-bar { background: var(--blue); border-radius: 4px; }
progress.meter.full { color: var(--bad); }
progress.meter.full::-webkit-progress-value { background: var(--bad); }
progress.meter.full::-moz-progress-bar { background: var(--bad); }
.meters dd { font-variant-numeric: tabular-nums; }
.meters .sub { display: block; color: var(--muted); font-size: 14px; }
.packs { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 12px; }

/* Forms */
.field { margin-bottom: 22px; }
label { display: block; font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
label small { font-weight: 400; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--text); font-size: 15px; }
label.check input { margin: 4px 0 0; accent-color: var(--ink); }
.plans { border-top: 1px solid var(--line); margin: 28px 0 0; }
label.plan { display: flex; gap: 14px; align-items: flex-start; margin: 0; padding: 18px 4px; border-bottom: 1px solid var(--line); font-weight: 400; font-size: 16px; color: var(--text); cursor: pointer; }
label.plan input { margin: 3px 0 0; width: 20px; height: 20px; flex: none; accent-color: var(--ink); }
label.plan strong { color: var(--ink); font-size: 18px; }
label.plan .price { color: var(--ink); margin-left: 8px; }
label.plan small { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
label.plan:has(input:checked) { background: var(--snow); }
input[type=text], input[type=email], input[type=tel], input[type=password], textarea {
  display: block; width: 100%; height: 44px; padding: 0 12px; font: inherit; color: var(--text); background: #fff;
  border: 1px solid var(--line-strong); border-radius: var(--radius); transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; min-height: 112px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(76, 84, 223, .16); }
.hint { display: block; font-size: 13px; color: var(--muted); margin-top: 7px; }
.choices { border-top: 1px solid var(--line); margin-bottom: 8px; }
.choice { display: grid; grid-template-columns: 20px 1fr auto; gap: 14px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-weight: 400; color: var(--text); margin: 0; }
.choice input { accent-color: var(--ink); margin: 0; align-self: center; }
.choice b { display: block; font-size: 16px; }
.choice small { display: block; color: var(--muted); font-size: 14px; }
.choice .amount { color: var(--ink); font-weight: 700; font-size: 15px; white-space: nowrap; }
.msg { padding: 12px 16px; border-left: 3px solid var(--line-strong); background: var(--snow); margin: 0 0 24px; font-size: 15px; }
.error { border-left-color: var(--bad); }
.success { border-left-color: var(--ok); }
.notice { border-left-color: var(--blue); }

/* The app */
.app-head { padding: 40px 0 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.app-head h1 { font-size: 36px; margin: 0 0 6px; }
.app-head .crumb { font-family: var(--mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 10px; }
.app-head .crumb a { color: var(--muted); text-decoration: none; }
.app-head .crumb a::before { content: "← "; }
.app-head .crumb a:hover { color: var(--ink); }
.app-head .meta { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin: 24px 0 0; overflow-x: auto; }
.tabs a { padding: 12px 0; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current] { color: var(--ink); border-bottom-color: var(--ink); }
@media (max-width: 560px) { .tabs { gap: 18px; } .tabs a { font-size: 14px; } }
.block { padding: 36px 0 44px; border-bottom: 1px solid var(--line); }
.block:last-child { border-bottom: 0; }
.block > h2 { font-family: var(--mono); font-weight: 400; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 24px; }
.block > h2 + p { margin-top: -10px; color: var(--muted); font-size: 15px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; gap: 32px; } }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.stat b { display: block; font-size: 48px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat b small { font-size: 20px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.stat span { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; gap: 0; } .stat { padding: 14px 0; border-top: 1px solid var(--line); } }
.scroll { overflow-x: auto; }
@media (max-width: 760px) {
  .scroll { margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
  .scroll table { min-width: 600px; }
}
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 400; padding: 0 16px 10px 0; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th:last-child, td:last-child { padding-right: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.when { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 14px; }
.status { white-space: nowrap; }
.phone { white-space: nowrap; }
.status::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--faint); vertical-align: 1px; }
.status-delivered::before { background: var(--ok); }
.status-failed::before { background: var(--bad); }
.status-sent::before { background: var(--blue); }
.err { color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); }
.key { font-family: var(--mono); font-size: 17px; color: var(--ink); background: var(--snow); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 16px 20px; word-break: break-all; margin: 0 0 1em; }
td form { margin: 0; }
.tag { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* The signup conversation */
.chat { display: flex; flex-direction: column; gap: 10px; margin: 24px 0 8px; }
.sms { max-width: 80%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.4; }
.sms p { margin: 0; }
.sms.out { align-self: flex-start; background: var(--snow); color: var(--ink); border-bottom-left-radius: 4px; }
.sms.in { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.sms time { display: block; font-family: var(--mono); font-size: 11px; opacity: .6; margin-top: 4px; }

/* Onboarding */
.panel { border: 1px solid var(--line-strong); border-radius: 8px; padding: 32px 36px; margin: 32px 0; }
.verify { display: grid; grid-template-columns: 136px 1fr; gap: 40px; align-items: center; }
.verify svg { width: 136px; height: 136px; color: var(--ink); }
@media (max-width: 520px) { .verify { grid-template-columns: 1fr; gap: 20px; } .panel { padding: 24px; } }
.bigcode { font-family: var(--mono); font-size: 32px; letter-spacing: .06em; color: var(--ink); font-weight: 700; margin: 6px 0 4px; }
.bignum { font-size: 28px; font-weight: 700; color: var(--ink); margin: 6px 0 22px; letter-spacing: .01em; }
.waiting { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
details { margin: 24px 0; }
summary { cursor: pointer; font-weight: 700; color: var(--ink); }
summary:hover { color: var(--blue); }
details form { margin-top: 16px; }
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline; }

/* Apps (the dashboard's app pages) */
.status-live::before, .status-running::before, .status-done::before, .status-switched::before { background: var(--ok); }
.status-starting::before, .status-restarting::before, .status-pending::before { background: var(--blue); }
.status-rolled_back::before { background: var(--bad); }
.app-cols > * { min-width: 0; } /* a long command scrolls in its box, not the page */
/* An app's clients: a computer a row, as a network lists its machines. */
.clients .sub { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.clients td { vertical-align: middle; }
.status-seen::before, .status-received::before { background: var(--ok); }
.status-waiting::before, .status-queued::before { background: var(--blue); }
td .sub { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.code.logs { max-height: 420px; overflow: auto; font-size: 13px; white-space: pre-wrap; word-break: break-all; }

/* The way in: the two commands on the start page. */
.start { font-family: var(--mono); font-size: clamp(15px, 1.5vw, 19px); line-height: 1.9; color: #fff; background: rgba(11,9,30,.62); border: 1px solid rgba(159,166,255,.45); border-radius: var(--radius); padding: 16px 22px; margin: 28px 0 12px; max-width: max-content; overflow-x: auto; white-space: pre; box-shadow: 0 0 34px rgba(14,17,54,.8); }
.start .p { color: #9fa6ff; user-select: none; }
.start .cmd { user-select: all; }
.start-note { font-size: 16px; color: rgba(255,255,255,.72); max-width: 48ch; text-shadow: 0 1px 0 rgba(11,9,30,.7), 0 0 14px rgba(14,17,54,.9); }
@media (max-width: 599px) { .start { max-width: 100%; font-size: 13px; padding: 14px 16px; } }

/* The dashboard: a pause menu (internal/web/game.go). Pixel windows on the
   start page's night sky; DotGothic16 for what is in the game, Lato for prose.
   The page's own colours are redefined for the night, so the app pages'
   tables, forms and meters follow; what needs more is below. */
@font-face { font-family: DotGothic16; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/DotGothic16.woff2) format("woff2"); }

body.game {
  --ink: #fff; --ink-soft: #fff0c9; --text: #e9ebff; --muted: #b9bce6; --faint: #8487d4;
  --blue: #c7cbff; --blue-ink: #fff; --paper: #1b235f; --snow: #0b0e2c;
  --line: rgba(208, 205, 245, .16); --line-strong: rgba(208, 205, 245, .4);
  --ok: #7be0a8; --bad: #ff9b8f;
  --night: #0e1136; --win-1: #28357c; --win-2: #1b235f; --ice: #d0cdf5; --lamp: #fad293; --ember: #e88f69; --rose: #e5a9a5;
  --px: DotGothic16, ui-monospace, Menlo, monospace;
  color: var(--text); font-variant-ligatures: none;
  background:
    radial-gradient(1px 1px at 20% 30%, #a6a6e4 50%, transparent 51%) 0 0 / 140px 110px,
    radial-gradient(1px 1px at 70% 65%, #6f73c8 50%, transparent 51%) 0 0 / 97px 83px,
    radial-gradient(1px 1px at 45% 85%, #8487d4 50%, transparent 51%) 0 0 / 173px 151px,
    linear-gradient(180deg, #0e1136, #161c51 75%, #1d2165);
}
.game [hidden] { display: none !important; }
.game .foot { background: #0b0e2c; }
.game ::selection { background: var(--lamp); color: var(--night); }
.game .top { border-bottom: 0; }
.game .top .logo { color: #fff; }
.game a:hover { color: #fff; }
.game .foot-horizon { color: #3b4898; margin-top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* The screen: menu, the page's windows, and the dialogue box and limits along the bottom. */
.screen { display: grid; grid-template-columns: 190px minmax(0, 1fr); grid-template-areas: "menu stage" "hud hud"; gap: 16px; padding-top: 4px; padding-bottom: 8px; }
.stage { grid-area: stage; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stage > .wrap { padding: 0; max-width: none; display: flex; flex-direction: column; gap: 16px; }
.stage > .cols, .stage > .wrap > .cols { gap: 16px; }

/* A window: indigo, a light rim, a dark keyline. */
.win, .game .block { background: linear-gradient(180deg, var(--win-1), var(--win-2)); border: 3px solid var(--ice); border-radius: 8px; box-shadow: 0 0 0 2px #0b0e2c, inset 0 0 0 2px #0e1136; padding: 16px 20px; min-width: 0; }
.game .block { padding: 18px 22px 22px; }
.game .block:last-child { border-bottom: 3px solid var(--ice); }
.win > h1, .win > h2, .game .block > h2, .wt { font: 400 15px/1.2 var(--px); color: var(--lamp); letter-spacing: 0; text-transform: none; margin: 0 0 14px; }
.game .block > h2 + p { margin-top: 0; }
.game .block > p, .game .block .cols p { font-size: 16px; }
.game .upgrade > h1, .game .welcome > h1 { font: 400 clamp(32px, 4vw, 44px)/1.1 var(--px); color: #fff; margin: 0 0 12px; }
.game .lead { color: var(--muted); font-size: 18px; }

/* The menu, and the cursor that marks where you are in any list. */
.menu { grid-area: menu; align-self: start; position: sticky; top: 16px; padding: 12px 8px; }
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.menu form { margin: 0; }
.menu a, .menu button[type=submit] { display: block; position: relative; width: 100%; padding: 7px 10px 7px 30px; font: 400 18px/1.25 var(--px); color: #fff; text-decoration: none; text-align: left; background: none; border: 0; border-radius: 4px; cursor: pointer; }
.menu a:hover, .menu button[type=submit]:hover { background: rgba(208, 205, 245, .12); color: #fff; }
.menu .keys { margin: 16px 10px 0; font: 400 13px/1.9 var(--px); color: var(--ice); }
.game kbd { font: 400 12px/1 var(--px); color: var(--night); background: var(--ice); border-radius: 3px; padding: 2px 4px 1px; margin-right: 6px; }
.menu .keys kbd { margin-right: 3px; }
.menu a[aria-current]::before, .row.on::before, .row:focus-visible::before, .shop .row:hover::before, .game .tabs a[aria-current]::before, .keys-nav a:focus-visible::before, .menu a:focus-visible::before, .menu button:focus-visible::before {
  content: ""; position: absolute; left: 9px; top: 50%; margin-top: -6px; border: 6px solid transparent; border-left: 9px solid #fff; border-right-width: 0;
}
.game :focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }

/* Foxes: each app's portrait, coloured by its slug (fox() in game.go). */
.fox { display: block; flex: none; width: 56px; height: 56px; shape-rendering: crispEdges; border: 2px solid #0b0e2c; border-radius: 3px; }
.fx-bg { fill: var(--fx-bg); } .fx-gr { fill: rgba(0, 0, 0, .25); } .fx-k { fill: #0c091e; }
.fx-f1 { fill: var(--fx-f1); } .fx-f2 { fill: var(--fx-f2); } .fx-f3 { fill: var(--fx-f3); } .fx-w1 { fill: var(--fx-w1); } .fx-w2 { fill: var(--fx-w2); }
.pal-0 { --fx-bg: #173a34; --fx-f1: #987a7e; --fx-f2: #766076; --fx-f3: #57466a; --fx-w1: #fbdcbf; --fx-w2: #e5a9a5; }
.pal-1 { --fx-bg: #3b143b; --fx-f1: #bb4d4d; --fx-f2: #9a3449; --fx-f3: #7c2747; --fx-w1: #fad293; --fx-w2: #f4b278; }
.pal-2 { --fx-bg: #142438; --fx-f1: #8a7bbf; --fx-f2: #7262a9; --fx-f3: #5d4f94; --fx-w1: #d0cdf5; --fx-w2: #a6a6e4; }
.pal-3 { --fx-bg: #312965; --fx-f1: #f4b278; --fx-f2: #e88f69; --fx-f3: #c9655d; --fx-w1: #fff0c9; --fx-w2: #fad293; }
.pal-4 { --fx-bg: #212c6d; --fx-f1: #a6a6e4; --fx-f2: #8487d4; --fx-f3: #6f73c8; --fx-w1: #fbdcbf; --fx-w2: #f2c2ab; }
.pal-5 { --fx-bg: #0e2129; --fx-f1: #e5a9a5; --fx-f2: #d192a8; --fx-f3: #b67ead; --fx-w1: #fff0c9; --fx-w2: #fbdcbf; }
.pal-6 { --fx-bg: #4c1941; --fx-f1: #987a7e; --fx-f2: #766076; --fx-f3: #57466a; --fx-w1: #fad293; --fx-w2: #f4b278; }
.pal-7 { --fx-bg: #1c3149; --fx-f1: #fbdcbf; --fx-f2: #f2c2ab; --fx-f3: #d192a8; --fx-w1: #d0cdf5; --fx-w2: #a6a6e4; }
.pal-sys { --fx-bg: #1b235f; --fx-f1: #fff0c9; --fx-f2: #fad293; --fx-f3: #f4b278; --fx-w1: #fff0c9; --fx-w2: #fad293; }
.row:has(.st-none) .fox, .sheet:has(.st-none) .fox, .row:has(.st-paused) .fox { filter: grayscale(.75) brightness(.75); }
.st-live { color: var(--ok) !important; } .st-none { color: var(--faint) !important; } .st-paused { color: #cfe6ff !important; }

/* The apps: one a row. */
.apps-screen { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 330px); gap: 16px; align-items: start; }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rows .empty { font: 400 16px var(--px); color: var(--muted); padding: 8px 4px; }
.row { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 8px 12px 8px 30px; border-radius: 4px; color: #fff; text-decoration: none; font-family: var(--px); }
.row:hover, .row.on, .row:focus-visible { background: rgba(208, 205, 245, .14); color: #fff; outline: 0; }
.row .who { display: grid; gap: 2px; }
.row .nm { font-size: 20px; font-weight: 400; line-height: 1.15; overflow-wrap: anywhere; }
.row .ln { font-size: 14px; color: var(--ice); }
.row .counts { text-align: right; font-size: 14px; line-height: 1.5; color: var(--ice); white-space: nowrap; }

/* The chosen app's sheet, and an app's head. */
.sheet .who, .app-head .who { display: flex; gap: 16px; align-items: center; }
.sheet .who { margin-bottom: 14px; }
.sheet .fox, .app-head .fox { width: 84px; height: 84px; }
.sheet h2 { font: 400 24px/1.15 var(--px); margin: 0 0 4px; overflow-wrap: anywhere; }
.game .meta { font: 400 14px/1.5 var(--px); color: var(--ice); margin: 0; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 5px 16px; margin: 0 0 14px; font: 400 14px/1.45 var(--px); }
.facts dt { color: var(--ice); opacity: .8; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.keys-nav { display: flex; flex-wrap: wrap; gap: 6px 14px; font: 400 15px var(--px); }
.keys-nav a { position: relative; color: #fff; text-decoration: none; }
.keys-nav a:hover { color: var(--lamp); }
.game .app-head { padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: stretch; }
.game .app-head h1 { font: 400 clamp(28px, 3.4vw, 36px)/1.1 var(--px); margin: 0 0 6px; overflow-wrap: anywhere; }
.game .app-head .crumb { font: 400 14px var(--px); letter-spacing: 0; text-transform: none; margin: 0 0 6px; }
.game .app-head .crumb a { color: var(--ice); }
.game .app-head .crumb a::before { content: "\2190  "; }
.game .tabs { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 10px 14px 10px 8px; overflow: visible; border-bottom: 3px solid var(--ice); }
.game .tabs a { position: relative; padding: 4px 10px 4px 30px; margin: 0; border: 0; color: #fff; font: 400 16px/1.3 var(--px); }
.game .tabs a:hover { color: var(--lamp); }
.game .tabs a[aria-current] { color: var(--lamp); border: 0; }

/* The dialogue box and the limits. */
.hud { grid-area: hud; display: grid; gap: 10px; z-index: 2; }
@media (min-width: 901px) and (min-height: 720px) {
  .hud { position: sticky; bottom: 0; padding: 18px 0 10px; background: linear-gradient(rgba(14, 17, 54, 0), #0e1136 22px); }
}
.talk { position: relative; padding: 12px 48px 12px 16px; min-height: 74px; }
.talk ol { list-style: none; margin: 0; padding: 0; }
.talk .line { display: flex; gap: 14px; align-items: flex-start; }
.talk .fox { width: 42px; height: 42px; }
.talk p { margin: 0; font: 400 17px/1.5 var(--px); color: #fff; overflow-wrap: anywhere; }
.talk .when { color: var(--ice); opacity: .75; margin-right: 4px; }
.line-error .say { color: var(--rose); }
.line-notice .say { color: var(--lamp); }
.talk .next { position: absolute; right: 8px; bottom: 6px; min-width: 36px; min-height: 36px; font: 400 16px var(--px); color: #fff; background: none; border: 0; cursor: pointer; }
.bar { display: flex; flex-wrap: wrap; gap: 6px 26px; align-items: center; padding: 0 6px; font: 400 15px var(--px); color: #fff; }
.bar .id { margin-right: auto; }
.bar .m { white-space: nowrap; }
.coin { display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 50%; background: var(--lamp); box-shadow: inset -2px -2px 0 var(--ember); vertical-align: -1px; }
.game progress.meter { height: 12px; max-width: 320px; border-radius: 2px; background: #0b0e2c; box-shadow: inset 0 0 0 1px rgba(208, 205, 245, .45); }
.game progress.meter::-webkit-progress-bar { background: #0b0e2c; border-radius: 2px; }
.game progress.meter::-webkit-progress-value { background: repeating-linear-gradient(90deg, var(--lamp) 0 8px, transparent 8px 10px); border-radius: 0; }
.game progress.meter::-moz-progress-bar { background: repeating-linear-gradient(90deg, var(--lamp) 0 8px, transparent 8px 10px); border-radius: 0; }
.game progress.meter.full::-webkit-progress-value { background: repeating-linear-gradient(90deg, var(--rose) 0 8px, transparent 8px 10px); }
.game progress.meter.full::-moz-progress-bar { background: repeating-linear-gradient(90deg, var(--rose) 0 8px, transparent 8px 10px); }
.bar progress.meter { display: inline-block; width: 110px; height: 10px; margin: 0 6px; vertical-align: -1px; }
.game .meters dd { font-family: var(--px); }

/* The shop: credits a row. */
.shop { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.shop form { margin: 0; }
.shop .row { display: block; width: 100%; text-align: left; font: 400 18px var(--px); background: none; border: 0; cursor: pointer; }

/* What the app pages had, at night. */
.game .btn { height: 44px; font: 400 16px var(--px); color: #1d0a25; background: var(--lamp); border: 2px solid #0b0e2c; border-radius: 4px; box-shadow: inset 0 -3px 0 var(--ember); }
.game .btn:hover { background: #fff0c9; color: #1d0a25; border-color: #0b0e2c; }
.game .btn-secondary { color: #fff; background: transparent; border-color: var(--ice); box-shadow: none; }
.game .btn-secondary:hover { color: var(--night); background: var(--ice); border-color: var(--ice); }
.game .btn-danger { height: 34px; color: var(--rose); background: transparent; border-color: rgba(229, 169, 165, .6); box-shadow: none; }
.game .btn-danger:hover { color: #1d0a25; background: var(--rose); border-color: var(--rose); }
.game input[type=text], .game input[type=email], .game input[type=tel] { color: #fff; background: #0b0e2c; border: 2px solid rgba(208, 205, 245, .5); border-radius: 4px; font: 400 16px var(--px); }
.game input:focus { border-color: var(--lamp); box-shadow: 0 0 0 3px rgba(250, 210, 147, .25); }
.game th { font: 400 13px var(--px); letter-spacing: 0; text-transform: none; color: var(--ice); border-bottom: 2px solid var(--line-strong); }
.game .status, .game .tag, .game .when { font-family: var(--px); font-size: 14px; }
.game .tag { letter-spacing: 0; text-transform: none; color: #1d0a25; background: var(--lamp); padding: 0 6px; border-radius: 2px; font-size: 12px; }
.game .scroll { margin: 0; padding: 0; }
.game .code { border-color: var(--line-strong); }
.game summary:hover { color: var(--lamp); }
.game .block form.after { margin-top: 20px; }
.game .block .hint, .game .block p.muted + form { margin-top: 12px; }
.game .welcome { max-width: 720px; }

@media (max-width: 900px) {
  .screen { grid-template-columns: minmax(0, 1fr); grid-template-areas: "menu" "stage" "hud"; }
  .screen.urgent { grid-template-areas: "menu" "hud" "stage"; }
  .menu { position: static; padding: 6px; }
  .menu ul { flex-direction: row; flex-wrap: wrap; }
  .menu a, .menu button[type=submit] { font-size: 16px; }
  .menu .keys { display: none; }
  .apps-screen, .game .app-head { grid-template-columns: minmax(0, 1fr); }
  .game .tabs { flex-direction: row; flex-wrap: wrap; padding: 8px; }
}
@media (max-width: 560px) {
  .row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 2px 10px; padding-left: 26px; }
  .row .fox { width: 44px; height: 44px; }
  .row .nm { font-size: 18px; }
  .sheet .fox, .app-head .fox { width: 64px; height: 64px; }
  .talk p { font-size: 15px; }
  .bar { gap: 4px 16px; font-size: 14px; }
  .bar .id { width: 100%; }
  .bar progress.meter { width: 64px; }
  .win, .game .block { padding: 14px 14px 16px; }
}
