/* Mad Silly Games · the app hub. Built on system/msg.css (tokens, fonts, .btn, .key, .plate, .panel) with the studio
   paint key: signal yellow, alert red, Cherenkov blue. The concept is the reactor: the yellow ring of the logo is the
   app's one moving part. It ignites on launch, fills as a rank's XP, and lights up when a game starts. */

@property --amb { syntax: '<color>'; inherits: true; initial-value: rgb(180 238 70 / .07); }

html.app {
  --bar-h: 60px;
  --dock-h: 66px;
  --top: env(safe-area-inset-top, 0px);
  --bot: env(safe-area-inset-bottom, 0px);
  --g: max(16px, env(safe-area-inset-left, 0px));
  --g-r: max(16px, env(safe-area-inset-right, 0px));
  --ease: cubic-bezier(.16, 1, .3, 1);
  background: var(--night);
  scroll-padding-top: calc(var(--bar-h) + var(--top));
  transition: --amb .9s var(--ease);
}
.app body {
  min-height: 100dvh; background: var(--night);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
.app ::selection { background: var(--signal); color: var(--outline); }
.app :focus-visible { outline: 3px solid var(--core-lit); outline-offset: 3px; }
.app .data { color: var(--bone-faint); }
.small { font-size: var(--t-small); line-height: 1.45; }

/* The reactor in the room: a faint segmented ring turning behind the top of the screen. Pauses when hidden. */
.room { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
  background: radial-gradient(120% 55% at 50% -10%, var(--amb), transparent 60%), radial-gradient(90% 55% at 0% 0%, rgb(255 190 110 / .09), transparent 62%), var(--night); }
.reactor { position: absolute; width: 560px; height: 560px; right: -260px; top: calc(-250px + var(--top)); opacity: .5; animation: turn 90s linear infinite; }
.reactor circle { fill: none; stroke: var(--signal); stroke-width: 3; stroke-dasharray: 22 8; opacity: .14; }
.reactor .inner { stroke: var(--core-lit); stroke-width: 1.5; stroke-dasharray: 2 10; opacity: .22; animation: turn 50s linear infinite reverse; transform-origin: 200px 200px; }
@keyframes turn { to { transform: rotate(1turn); } }
html:not(.vis) .reactor, html:not(.vis) .reactor .inner { animation-play-state: paused; }

/* ---- Top bar --------------------------------------------------------------- */
.bar {
  position: sticky; max-width: 1120px; margin-inline: auto; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: calc(var(--bar-h) + var(--top)); padding: var(--top) var(--g-r) 0 var(--g);
  background: linear-gradient(var(--night) 55%, rgb(13 11 10 / .0));
}
.bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 3px; opacity: .55;
  background: repeating-linear-gradient(135deg, var(--signal) 0 8px, transparent 8px 16px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--bone); min-height: 44px; }
.brand .mark { width: 38px; height: 38px; overflow: visible; filter: drop-shadow(0 3px 6px rgb(0 0 0 / .6)); }
.mark .base { fill: var(--soil-1); stroke: var(--signal-deep); stroke-width: 18; }
.mark .gauge { --f: 0; fill: none; stroke: var(--signal); stroke-width: 18; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--f)); transform: rotate(-90deg); transform-origin: 150px 150px; transition: stroke-dashoffset 1.2s .3s var(--ease); }
.mark .na { fill: var(--core); stroke: var(--outline); stroke-width: 5; }
.brand .wm { font: 900 .92rem/1 var(--f-brand); font-stretch: 118%; text-transform: uppercase; letter-spacing: .01em; }
.me { position: relative; padding: 0; border: 0; background: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; }
.avatar { position: relative; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  background: var(--soil-3); color: var(--signal); border: 3px solid var(--signal); box-shadow: 0 0 0 2px var(--outline), 0 6px 14px -6px #000;
  font: 900 1rem/1 var(--f-brand); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar svg { width: 60%; height: 60%; }
.avatar.online::after { content: ""; position: absolute; }
.me .avatar.online { overflow: visible; }
.me .avatar.online img { border-radius: 50%; }
.me .avatar.online::after { width: 11px; height: 11px; right: -4px; top: -4px; border-radius: 50%; background: var(--core); border: 2px solid var(--outline); }

/* ---- Panes ---------------------------------------------------------------- */
.panes { position: relative; z-index: 1; max-width: 1120px; margin-inline: auto; padding-bottom: calc(var(--dock-h) + var(--bot) + 36px); }
.pane { padding-top: 6px; }
.pane[hidden] { display: none; }
.hello, .pane-h { margin: 8px var(--g-r) 18px var(--g); font: 900 clamp(1.7rem, 7.4vw, 2.7rem)/.95 var(--f-brand); font-stretch: 116%;
  text-transform: uppercase; letter-spacing: -.01em; text-wrap: balance; }
.pane-h::after { content: ""; display: block; width: 72px; height: 5px; margin-top: 12px; background: repeating-linear-gradient(135deg, var(--signal) 0 6px, transparent 6px 12px); }
.hello .hi { display: block; color: var(--bone-soft); font-weight: 700; font-size: .56em; letter-spacing: .02em; margin-bottom: .25em; }
.hello .who { color: var(--signal); text-shadow: 0 .06em .3em rgb(0 0 0 / .6); }
.sub { margin: 30px var(--g-r) 12px var(--g); font: 800 .8rem/1 var(--f-data); letter-spacing: .14em; text-transform: uppercase; color: var(--bone-soft); }
.soft.none { margin: 0 var(--g-r) 0 var(--g); max-width: 46ch; }

/* ---- Install offer -------------------------------------------------------- */
.install { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin: 0 var(--g-r) 16px var(--g);
  padding: 10px 10px 10px 12px; background: var(--soil-2); border: 1px solid var(--edge); border-radius: var(--cut-s); }
.install[hidden] { display: none; }
.install .ib { display: grid; justify-items: center; gap: 2px; }
.install .later { background: none; border: 0; color: var(--bone-faint); font: 600 .75rem var(--f-text); min-height: 28px; cursor: pointer; padding: 0 4px; }
.install .ico { width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: var(--signal); color: var(--outline); }
.install p { font-size: .9rem; line-height: 1.35; color: var(--bone-soft); }
.install strong { color: var(--bone); }

/* ---- The deck: one cartridge per game ------------------------------------- */
.deck { display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding: 4px var(--g-r) 22px var(--g); scroll-padding-inline: var(--g); scrollbar-width: none; }
.deck::-webkit-scrollbar { display: none; }
.cart {
  --cut-c: 18px;
  position: relative; flex: 0 0 min(82vw, 380px); aspect-ratio: 4 / 5.5; scroll-snap-align: center; isolation: isolate;
  border: 3px solid var(--outline); border-radius: 12px; overflow: hidden; background: var(--soil-2);
  box-shadow: 0 0 0 1px rgb(255 240 210 / .05) inset, 0 26px 50px -22px rgb(0 0 0 / .95);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(.94); opacity: .62; transition: transform .5s var(--ease), opacity .5s var(--ease);
  outline: 3px solid transparent; outline-offset: 4px;
}
@supports (corner-shape: bevel) { .cart { corner-shape: bevel; border-radius: var(--cut-c); } }
.cart.on { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); opacity: 1; }
/* A sheen across the cartridge from the lamp, following a mouse. */
.cart .art::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(45% 35% at var(--sx, 20%) var(--sy, 10%), rgb(255 235 200 / .16), transparent 70%); }
.cart:hover .art::after { opacity: 1; }
.cart.ping { animation: ping 1.3s var(--ease); }
@keyframes ping { 0%, 40% { outline-color: var(--paint); } 100% { outline-color: transparent; } }
.cart .art { position: absolute; inset: 0; z-index: -1; }
.cart .art img { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 40%; }
.cart.on .art img { animation: drift 22s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.04) translate3d(0, 0, 0); } to { transform: scale(1.14) translate3d(-3%, 2%, 0); } }
html:not(.vis) .cart .art img { animation-play-state: paused; }
.cart::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, var(--night) 0 50%, rgb(13 11 10 / .9) 58%, rgb(13 11 10 / .45) 70%, transparent 84%),
              linear-gradient(160deg, rgb(255 225 170 / .14), transparent 30%); }
/* A strip of the game's own paint along the bottom edge: the cartridge's label. */
.cart::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: linear-gradient(var(--paint) 0 50%, color-mix(in srgb, var(--paint), #000 45%) 50%); }

.plates { position: absolute; left: 14px; right: 14px; top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.state { display: inline-flex; align-items: center; gap: 6px; padding: .3rem .55rem; border-radius: 6px;
  font: 600 .66rem/1.2 var(--f-data); letter-spacing: .07em; text-transform: uppercase; color: var(--bone);
  background: rgb(13 11 10 / .84); border: 1px solid rgb(255 240 210 / .12); }
@supports (corner-shape: bevel) { .state { corner-shape: bevel; border-radius: 6px; } }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.state.live::before { background: var(--skin); box-shadow: 0 0 0 0 var(--skin); animation: beat 2.4s ease-out infinite; }
.state.prealpha::before { background: var(--core-lit); }
.state.beta::before { background: #ff5f52; }
.state.when::before { display: none; }
.state.when { color: var(--bone); font: 600 .78rem/1.2 var(--f-text); letter-spacing: 0; text-transform: none; }
.state.lock { color: var(--signal); }
.state.lock::before { display: none; }
.state svg { width: 12px; height: 12px; }
@keyframes beat { 0% { box-shadow: 0 0 0 0 rgb(180 238 70 / .7); } 70%, 100% { box-shadow: 0 0 0 7px rgb(180 238 70 / 0); } }

.info { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 18px 22px; display: grid; gap: 8px; }
.name { font: 900 clamp(1.7rem, 7.6vw, 2.15rem)/.9 var(--f-brand); font-stretch: 112%; text-transform: uppercase; letter-spacing: -.01em; color: var(--bone);
  text-shadow: 0 .05em .3em rgb(0 0 0 / .7); }
.tag { color: var(--bone); font-weight: 500; font-size: .95rem; line-height: 1.35; }
.mine { display: grid; gap: 2px; font-size: .92rem; line-height: 1.35; color: var(--bone); min-height: 2.6em; align-content: end; }
.mine .data { color: var(--paint); font-weight: 700; }
.go { width: 100%; margin-top: 6px; }
.go.off { cursor: default; opacity: .7; filter: none; transform: none; }
.go svg use[href="#i-g"] { }
.btn.steel svg { width: 1.2em; height: 1.2em; }

.pips { display: flex; justify-content: center; margin-top: -14px; }
.pips button { display: grid; place-items: center; width: 36px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.pips i { display: block; width: 8px; height: 8px; border-radius: 4px; background: var(--soil-4); transition: width .4s var(--ease), background .3s; }
.pips .on i { width: 24px; background: var(--signal); }
@media (min-width: 860px) {
  .deck { overflow: visible; justify-content: flex-start; flex-wrap: wrap; }
  .cart { flex: 1 1 300px; max-width: 360px; opacity: 1; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s var(--ease), opacity .5s; }
  .pips { display: none; }
}

/* ---- Dispatches ----------------------------------------------------------- */
.news[hidden] { display: none; }
.news ul { list-style: none; margin: 0 var(--g-r) 0 var(--g); padding: 0; display: grid; gap: 8px; max-width: 760px; }
.disp { display: grid; grid-template-columns: 52px 1fr 18px; gap: 12px; align-items: center; padding: 8px 12px 8px 8px; text-decoration: none; color: var(--bone);
  background: linear-gradient(160deg, var(--soil-3) 0 30%, var(--soil-2) 30%); border: 1px solid var(--edge); border-radius: var(--cut-s);
  transition: transform .2s var(--ease), border-color .2s; }
@supports (corner-shape: bevel) { .disp { corner-shape: bevel; border-radius: 10px; } }
.disp:hover { border-color: var(--soil-4); transform: translateX(2px); }
.disp:active { transform: scale(.985); }
.disp img { width: 52px; height: 52px; object-fit: contain; background: var(--night); border-radius: 8px; padding: 3px; filter: drop-shadow(0 2px 2px #000); }
.disp .dt { display: grid; gap: 3px; min-width: 0; }
.disp .dh { font-size: .93rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.disp .new { font-weight: 700; color: var(--core-lit); margin-left: 4px; }
.disp .new::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 5px 1px 0; border-radius: 50%; background: var(--core); box-shadow: 0 0 8px var(--core); }
.disp .chev { width: 18px; height: 18px; color: var(--bone-faint); }

/* ---- Humanity's tally, compact ------------------------------------------- */
.tally { margin: 30px var(--g-r) 0 var(--g); gap: 8px; }
.tally .wheel { font-size: clamp(1.5rem, 6.5vw, 2.1rem); }
.tally .cap { font-size: .64rem; }

/* ---- Records ------------------------------------------------------------- */
.game-rec { margin-bottom: 34px; }
.gr-h { display: flex; align-items: center; gap: 12px; margin: 0 var(--g-r) 14px var(--g); }
.gr-h img { width: 40px; height: auto; filter: drop-shadow(0 3px 3px #000); }
.gr-h h2 { font: 900 1.25rem/1 var(--f-brand); font-stretch: 112%; text-transform: uppercase; color: var(--paint); }
.gr-h .state { margin-left: auto; }
.gift { width: 34px; height: 34px; border: 3px solid var(--outline); border-radius: 6px; background:
  linear-gradient(90deg, transparent 42%, var(--brass) 42% 58%, transparent 58%), linear-gradient(transparent 42%, var(--brass) 42% 58%, transparent 58%), var(--blood); }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 14px; padding: 0 var(--g-r) 2px var(--g); scrollbar-width: none; }
.chips .key { flex: none; font-family: var(--f-text); font-weight: 700; font-size: .85rem; padding: 0 .9rem; }
.rank { display: grid; grid-template-columns: 104px 1fr; gap: 16px; align-items: center; margin: 0 var(--g-r) 12px var(--g); padding: 16px; }
.rank-ring { width: 100%; height: auto; overflow: visible; }
.rank-ring circle { fill: none; }
.rank-ring .track { stroke: var(--soil-1); stroke-width: 11; }
.rank-ring .fill { stroke: var(--signal); stroke-width: 11; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--f)); transform: rotate(-90deg); transform-origin: 60px 60px;
  transition: stroke-dashoffset 1.1s var(--ease); }
.rank-ring .na { fill: var(--core); stroke: var(--outline); stroke-width: 2.5; }
.rank-ring text { font: 900 38px var(--f-brand); font-stretch: 112%; fill: var(--signal); }
.rank-ring.mini { width: 44px; flex: none; }
.rank-ring.mini text { font-size: 44px; }
.rank-ring.mini .track, .rank-ring.mini .fill { stroke-width: 13; }
.rank-t { display: grid; gap: 6px; min-width: 0; }
.rk-name { font: 900 1.3rem/1.05 var(--f-brand); font-stretch: 110%; text-transform: uppercase; color: var(--bone); }
.rk-name span { display: block; font: 600 .95rem/1.3 var(--f-text); text-transform: none; color: var(--bone-soft); margin-top: 2px; }
.xp { display: grid; gap: 6px; }
.xp .xpbar { display: block; height: 8px; border-radius: 4px; background: var(--soil-1); box-shadow: inset 0 1px 2px #000; overflow: hidden; }
.xp .xpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--signal-deep), var(--signal)); transform-origin: left; transform: scaleX(var(--f)); transition: transform 1.1s var(--ease); }
.pane:not([hidden]) .xp .xpbar i { animation: fillx 1.1s var(--ease) both; }
.pane:not([hidden]) .rank-ring .fill { animation: fillring 1.2s var(--ease) both; }
@keyframes fillx { from { transform: scaleX(0); } }
@keyframes fillring { from { stroke-dashoffset: 100; } }

/* The four readouts sit in one instrument strip, not four cards. */
.gauges { display: grid; grid-template-columns: 1fr 1fr; margin: 0 var(--g-r) 0 var(--g); border: 1px solid var(--edge); border-radius: var(--cut-s);
  background: linear-gradient(160deg, var(--soil-3) 0 22%, var(--soil-2) 22%); overflow: hidden; }
@supports (corner-shape: bevel) { .gauges { corner-shape: bevel; border-radius: 12px; } }
.gauges.three { grid-template-columns: 1fr 1fr 1.2fr; }
.gauges > div { padding: 14px 14px 12px; display: grid; gap: 4px; border-right: 1px solid var(--edge); border-bottom: 1px solid var(--edge); }
.gauges:not(.three) > div:nth-child(2n) { border-right: 0; }
.gauges:not(.three) > div:nth-child(n+3) { border-bottom: 0; }
.gauges.three > div { border-bottom: 0; }
.gauges.three > div:last-child { border-right: 0; }
.gauges dt { font: 600 .64rem/1.2 var(--f-data); letter-spacing: .08em; text-transform: uppercase; color: var(--bone-faint); }
.gauges dd { margin: 0; font: 900 clamp(1.45rem, 6vw, 1.9rem)/1 var(--f-brand); font-stretch: 108%; font-variant-numeric: tabular-nums; color: var(--bone); }
.gauges > div:first-child dd { color: var(--paint); }
.gauges dd.when { font: 700 1rem/1.2 var(--f-text); color: var(--bone); align-self: end; }
@media (min-width: 620px) { .gauges:not(.three) { grid-template-columns: repeat(4, 1fr); } .gauges:not(.three) > div { border-bottom: 0; border-right: 1px solid var(--edge); } .gauges:not(.three) > div:last-child { border-right: 0; } }

.fronts, .recent, .cmds { list-style: none; margin: 0 var(--g-r) 0 var(--g); padding: 0; }
.fronts { display: grid; gap: 6px; }
.front { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "n w" "x w"; column-gap: 12px; align-items: center;
  padding: 10px 14px; background: linear-gradient(160deg, var(--soil-3) 0 18%, var(--soil-2) 18%); border: 1px solid var(--edge); border-radius: 10px; }
@supports (corner-shape: bevel) { .front, .cmds li, .rows, .id, .rank { corner-shape: bevel; border-radius: 12px; } }
.front .fn { grid-area: n; font-weight: 700; }
.front .fx { grid-area: x; display: flex; gap: 10px; }
.front .fx em { font-style: normal; color: var(--bone-faint); }
.front .fw { grid-area: w; display: grid; justify-items: end; }
.front .fw b { font: 900 1.35rem/1 var(--f-brand); color: var(--outline); min-width: 2.4ch; text-align: center; padding: .28rem .45rem .32rem;
  background: linear-gradient(172deg, var(--brass-lit) 0 40%, var(--brass) 40%); border: 2px solid var(--outline); box-shadow: inset 0 -3px 0 var(--brass-deep); border-radius: 6px; }
@supports (corner-shape: bevel) { .front .fw b { corner-shape: bevel; } }
.front .fw small { margin-top: 4px; }
.front .fw small { font: 600 .6rem/1.2 var(--f-data); letter-spacing: .08em; text-transform: uppercase; color: var(--bone-faint); }
.front.won { background: linear-gradient(100deg, rgb(255 214 10 / .1), transparent 55%), var(--soil-2); border-color: var(--signal-deep); }
.front.won .fw b { background: linear-gradient(172deg, var(--signal-lit) 0 40%, var(--signal) 40%); box-shadow: inset 0 -3px 0 var(--signal-deep); }
.front.won .fw small { color: var(--signal); }
.front.won .fn::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; transform: rotate(45deg) translateY(-2px); background: var(--signal); }

.recent li { display: grid; grid-template-columns: 10px 1fr auto; grid-template-areas: "d n w" "d k t"; column-gap: 12px; row-gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--edge); }
.recent li:last-child { border-bottom: 0; }
.recent .dot { grid-area: d; align-self: center; width: 10px; height: 10px; transform: rotate(45deg); background: var(--alert); }
.recent .won .dot { background: var(--skin); }
.recent .rn { grid-area: n; font-weight: 700; }
.recent .rn small { font: 600 .6rem var(--f-data); letter-spacing: .08em; text-transform: uppercase; color: var(--core-lit); margin-left: 6px; }
.recent .rw { grid-area: w; text-align: right; font-size: .85rem; }
.recent .rk { grid-area: k; }
.recent .rt { grid-area: t; text-align: right; }

.empty { display: grid; justify-items: center; text-align: center; gap: 16px; margin: 20px var(--g-r) 0 var(--g); padding: 28px 18px; }
.empty img { width: 96px; height: auto; filter: drop-shadow(0 8px 8px #000); animation: sway 3.4s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.empty p { max-width: 36ch; color: var(--bone-soft); }
@keyframes sway { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }

/* ---- Profile ------------------------------------------------------------- */
.id { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; margin: 0 var(--g-r) 0 var(--g); padding: 18px; overflow: hidden; }
.avatar.big { width: 88px; height: 88px; border-width: 4px; font-size: 2.2rem; }
.id-t { display: grid; gap: 4px; min-width: 0; }
.id-t .data { display: inline-flex; align-items: center; gap: 6px; }
.id-t .data svg { width: 15px; height: 15px; }
.id-t .data.ok { color: var(--core-lit); }
.id-name { font: 900 1.35rem/1.05 var(--f-brand); font-stretch: 108%; color: var(--bone); overflow-wrap: anywhere; }
.id-t .mail { font-size: .9rem; overflow-wrap: anywhere; }
.id.guest { grid-template-columns: 1fr; padding-right: 110px; min-height: 196px; }
.id.guest .tech { position: absolute; right: -18px; bottom: -36px; width: 132px; height: auto; transform: rotate(-4deg); filter: drop-shadow(0 8px 10px #000); }
.signin { display: grid; gap: 10px; justify-items: start; margin-top: 10px; }
.gbtn { font-family: var(--f-text); font-weight: 700; font-size: 1rem; padding: .75rem 1.1rem 1rem; min-height: 50px; }
.link { color: var(--bone-soft); font-size: .9rem; min-height: 44px; display: inline-flex; align-items: center; }

.cmds { display: grid; gap: 8px; }
.cmds li { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; background: var(--soil-2); border: 1px solid var(--edge); border-radius: 10px; }
.cmds li.on { border-color: var(--signal-deep); }
.cmds .cn { display: grid; gap: 1px; min-width: 0; margin-right: auto; }
.cmds .cn small { color: var(--bone-faint); font-size: .82rem; }

.rows { list-style: none; margin: 0 var(--g-r) 0 var(--g); padding: 0; overflow: hidden; }
.rows > li + li { border-top: 1px solid var(--edge); }
.row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "l i" "s i"; align-items: center; column-gap: 12px; width: 100%; min-height: 58px;
  padding: 10px 16px; text-align: left; text-decoration: none; color: var(--bone); background: none; border: 0; font: inherit; cursor: pointer; }
li.row { cursor: default; }
.row .rl { grid-area: l; font-weight: 700; }
.row .rs { grid-area: s; font-size: .85rem; color: var(--bone-faint); line-height: 1.35; }
li.row > .rs:only-child { grid-area: l; }
.row svg, .row .seg { grid-area: i; }
.row svg { width: 18px; height: 18px; color: var(--bone-faint); transition: transform .2s var(--ease); }
.row.go:hover svg { transform: translateX(3px); color: var(--signal); }
.row.go:active { background: rgb(255 255 255 / .03); }
.seg { display: inline-flex; gap: 6px; }
.seg .key { min-width: 48px; }
.out { display: grid; justify-items: start; gap: 8px; margin: 22px var(--g-r) 0 var(--g); }
.out p { max-width: 44ch; }
.colophon { margin: 34px var(--g-r) 0 var(--g); text-align: center; color: var(--bone-faint); }
.colophon sub { font-size: .7em; }

/* ---- The dock ------------------------------------------------------------- */
.dock {
  --n: 3; --at: 0;
  position: fixed; z-index: 30; left: 50%; bottom: max(10px, var(--bot)); transform: translateX(-50%);
  width: min(calc(100% - var(--g) - var(--g-r)), 440px); height: var(--dock-h);
  display: grid; grid-template-columns: repeat(var(--n), 1fr); padding: 6px;
  background: linear-gradient(170deg, var(--soil-4) 0 18%, var(--soil-3) 18% 60%, var(--soil-2) 60%);
  border: 2px solid var(--outline); border-radius: 16px;
  box-shadow: inset 0 1px 0 rgb(255 230 190 / .1), 0 18px 36px -10px rgb(0 0 0 / .9), 0 0 0 1px rgb(255 240 210 / .04);
}
@supports (corner-shape: bevel) { .dock { corner-shape: bevel; border-radius: 16px; } .glider { corner-shape: bevel; } }
.dock::before { content: ""; position: fixed; left: -50vw; right: -50vw; bottom: calc(-1 * max(10px, var(--bot))); height: calc(var(--dock-h) + 60px + var(--bot)); z-index: -1; pointer-events: none;
  background: linear-gradient(transparent, rgb(13 11 10 / .92) 55%); }
.glider { position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / var(--n)); border-radius: 11px;
  background: linear-gradient(172deg, var(--signal-lit) 0 32%, var(--signal) 32%); box-shadow: inset 0 -4px 0 var(--signal-deep), 0 0 0 2px var(--outline);
  transform: translateX(calc(var(--at) * 100%)); transition: transform .45s var(--ease); }
.dock a { position: relative; z-index: 1; display: grid; place-items: center; align-content: center; gap: 3px; text-decoration: none; color: var(--bone-soft);
  font: 700 .72rem/1 var(--f-text); letter-spacing: .02em; transition: color .25s; }
.dock a svg { width: 22px; height: 22px; transition: transform .35s var(--ease-snap); }
.dock a[aria-current="page"] { color: var(--outline); }
.dock a[aria-current="page"] svg { transform: translateY(-1px) scale(1.06); }
.dock a:active svg { transform: scale(.9); }

/* ---- Launch: the cartridge takes the whole screen, the reactor lights -------------- */
.launch { position: fixed; inset: 0; z-index: 100; background: var(--night); overflow: hidden; display: grid; place-items: center; }
.launch > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.launch .strip { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--paint); }
.launch .veil { position: absolute; inset: 0; background: radial-gradient(60% 45% at 50% 46%, rgb(61 123 255 / .0), rgb(13 11 10 / .75) 75%); transition: background .6s; }
.launch.lit .veil { background: radial-gradient(60% 45% at 50% 46%, rgb(61 123 255 / .28), rgb(13 11 10 / .86) 75%); }
.launch .core { position: relative; width: min(38vw, 170px); height: auto; overflow: visible; }
.launch .what { position: absolute; left: 0; right: 0; top: calc(50% + min(19vw, 85px) + 22px); display: grid; justify-items: center; gap: 8px; text-align: center; padding: 0 16px; }
.launch .data { color: var(--core-lit); opacity: 0; transition: opacity .3s .25s; }
.launch .nm { font: 900 clamp(1.5rem, 7vw, 2.4rem)/.95 var(--f-brand); font-stretch: 116%; text-transform: uppercase; color: var(--bone);
  opacity: 0; transform: translateY(10px); letter-spacing: .06em; transition: opacity .45s .2s var(--ease), transform .6s .2s var(--ease), letter-spacing .9s .2s var(--ease); }
.launch.lit .data { opacity: 1; animation: blink 1s .7s steps(2) infinite; }
.launch.lit .nm { opacity: 1; transform: none; letter-spacing: -.01em; }
@keyframes blink { 50% { opacity: .35; } }

/* The ring itself, shared by the launch and the ignition. */
.core circle { fill: none; }
.core .ring-bg { fill: var(--soil-1); stroke: rgb(255 214 10 / .14); stroke-width: 18; }
.core .ring { stroke: var(--signal); stroke-width: 18; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transform: rotate(-90deg); transform-origin: 150px 150px;
}
.core use { opacity: 0; transform: scale(.7); transform-origin: 150px 150px; transition: opacity .3s .35s, transform .5s .35s var(--ease-snap); }
.launch .ring { transition: stroke-dashoffset .75s .05s cubic-bezier(.65, 0, .35, 1); }
.launch.lit .ring { stroke-dashoffset: 0; }
.launch.lit .core use { opacity: 1; transform: none; }
.launch.lit .core { animation: hum 1.6s .8s ease-in-out infinite; }
@keyframes hum { 50% { transform: scale(1.04); } }

/* ---- Ignition (first open of a launch) --------------------------------- */
.boot { display: none; }
html.booting .boot { display: grid; place-items: center; position: fixed; inset: 0; z-index: 200; background: var(--night); }
html.booting .boot .core { width: min(46vw, 200px); height: auto; overflow: visible; }
html.booting .boot .ring { animation: draw .7s .1s cubic-bezier(.65, 0, .35, 1) forwards; }
html.booting .boot use { animation: pop .45s .55s var(--ease-snap) forwards; }
html.booting .boot .na { fill: var(--core); stroke: #0c0c0e; stroke-width: 5; transform: scale(0); transform-origin: 150px 16px; animation: na .4s .6s var(--ease-snap) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; transform: none; } }
@keyframes na { to { transform: none; } }
html.booting .bar .mark { opacity: 0; }
html.booting :is(.bar .wm, .me, .hello, .install, .cart, .pips, .news, .tally, .dock) { opacity: 0; translate: 0 14px; }
html.booting .dock { translate: -50% 30px; transform: none; left: 50%; }
html.booting.docking :is(.bar .wm, .me, .hello, .install, .cart, .pips, .news, .tally) { opacity: 1; translate: none; transition: opacity .5s var(--ease), translate .7s var(--ease); transition-delay: calc(.18s + var(--d, 0) * 70ms); }
html.booting.docking .cart { opacity: var(--o, 1); }
html.booting.docking .dock { opacity: 1; translate: -50% 0; transition: opacity .4s .35s, translate .7s .35s var(--ease); }
.hello { --d: 1; } .cart { --d: 2; } .cart + .cart { --d: 3; } .news { --d: 4; } .tally { --d: 5; }

@media (prefers-reduced-motion: reduce) {
  .reactor, .reactor .inner, .cart.on .art img, .state.live::before, .empty img, .launch.lit .core, .launch.lit .data { animation: none !important; }
  .cart { transition: opacity .2s; transform: none; }
  .glider { transition-duration: .01s; }
  .launch .ring { stroke-dashoffset: 0; transition: none; }
  .launch .core use, .launch .nm, .launch .data { opacity: 1; transform: none; transition: none; }
}
.nojs { padding: 40px 16px; text-align: center; }

/* Pre-alpha cartridge (Path of the Dead, 2026-11-18): its key wears the game's ember, not the finished games' yellow. */
.cart[data-status="prealpha"] .btn.go:not(.steel) { --fill: #ff8a3d; --lit: #ffb27a; --deep: #7a3410; }
