:root {
  --bg: #f1ece1;
  --ink: #16191c;
  --ink2: #666b72;
  --line: rgba(22, 25, 28, .14);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; overflow-x: hidden;
  /* warm paper with a faint pattern of d-pad crosses and button rings, tinted with the console's teal */
  background: var(--bg);
  color: var(--ink);
  font: 400 13px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
}
/* a soft light behind the model, over the pattern */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  /* fixed to the window, so the pattern stays put while the page scrolls */
  background: radial-gradient(60vw 54vh at 50% 50%, rgba(255, 255, 255, .85), transparent 72%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' fill='none' stroke='%23117587' stroke-opacity='.16' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M14 8v12M8 14h12'/%3E%3Ccircle cx='42' cy='42' r='4.5'/%3E%3C/svg%3E") 0 0 / 56px 56px;
}

#gl { position: fixed; inset: 0; bottom: auto; z-index: 1; width: 100%; height: 100%; height: 100svh; display: block; touch-action: pan-y; cursor: default; outline: none; }
#gl.grab { cursor: grab; }
#gl.grabbing { cursor: grabbing; }
#gl.point { cursor: pointer; }

.hud { position: fixed; left: 0; right: 0; z-index: 2; pointer-events: none; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; opacity: 0; animation: fade .9s ease .5s forwards; }
.hud a, .hud h1 { pointer-events: auto; }
.top { top: 0; padding: max(22px, env(safe-area-inset-top)) 28px 0; }
.top h1 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.top nav { display: flex; gap: 22px; margin-left: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } /* for screen readers and search engines only */
.top nav a { position: relative; padding-bottom: 4px; color: var(--ink2); text-decoration: none; font-weight: 500; transition: color .2s; }
/* underline that sweeps in from the left on hover, and back out to the right when you leave */
.top nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .22s ease-out; }
.top nav a:hover::after, .top nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.top nav a:hover { color: var(--ink); }

.bottom { bottom: 0; align-items: flex-end; padding: 0 28px max(22px, env(safe-area-inset-bottom)); color: var(--ink2); }
.bottom p { margin: 0; }
.role { max-width: 34ch; }
.hint { text-align: right; }
.hint span { color: var(--ink); }
.opened { display: none; }
body.open .opened { display: block; }
body.open .closed { display: none; }
.scrollcue { position: fixed; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); z-index: 2; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ink2); font-size: 12px; letter-spacing: .04em; pointer-events: none; opacity: 0; animation: fade .9s ease .9s forwards; transition: opacity .3s; }
.scrollcue i { width: 1px; height: 34px; background: linear-gradient(var(--ink2), transparent); transform-origin: top; animation: cue 1.8s ease-in-out infinite; }
body.moved .scrollcue { opacity: 0 !important; animation: none; }

.fallback { position: fixed; inset: 0; z-index: 3; display: grid; place-content: center; max-width: 560px; margin: auto; padding: 24px; text-align: center; }
.fallback[hidden] { display: none; }
.fallback h2 { font-size: 40px; font-weight: 700; letter-spacing: -.03em; margin: 0 0 12px; }
.fallback p { color: var(--ink2); font-size: 16px; line-height: 1.5; }

/* the page is just a scroll track: scrolling opens the lid */
.track { height: 340vh; }
.track i { display: block; height: 50%; }
.cue-m { display: none; }
#gl, body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
/* phones: the page has just two resting places, closed and open, and one swipe carries it from one to the other.
   That keeps scrolling (open / close) and dragging (turn the console) from ever being confused. */
@media (max-width: 700px) and (orientation: portrait) {
  .track { height: 200vh; height: 200lvh; }
  .cue-d { display: none; } .cue-m { display: inline; }
}

@keyframes fade { to { opacity: 1; } }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

@media (max-width: 700px) {
  .top, .bottom { padding-left: 18px; padding-right: 18px; }
  .top nav { gap: 14px; }
  .hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { .hud, .scrollcue { animation-duration: .01s; animation-delay: 0s; } .scrollcue i { animation: none; } }

/* the outer camera 'takes a photo' */
body.flash::after { content: ""; position: fixed; inset: 0; z-index: 5; background: #fff; pointer-events: none; animation: flash .45s ease-out forwards; }
@keyframes flash { from { opacity: .9; } to { opacity: 0; } }

/* the music player: a spinning disc with previous / next beside it and the title underneath. No card, no chrome. */
.np { position: fixed; left: 28px; bottom: 26px; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 10px; width: 230px; color: var(--ink); animation: sheet .35s ease-out; }
.np-row { display: flex; align-items: center; gap: 14px; }
.np button { border: 0; background: none; padding: 0; color: inherit; cursor: pointer; font: inherit; -webkit-tap-highlight-color: transparent; }
.np-row > button:not(.np-disc) { width: 34px; height: 34px; display: grid; place-items: center; opacity: .8; transition: opacity .2s, transform .2s; }
.np-row > button:not(.np-disc):hover { opacity: 1; transform: scale(1.12); }
.np svg { width: 20px; height: 20px; fill: currentColor; }
.np .np-disc { position: relative; width: 84px; height: 84px; border-radius: 50%; background: #23262b center / cover no-repeat; box-shadow: 0 6px 18px rgba(22, 25, 28, .28), inset 0 0 0 1px rgba(255, 255, 255, .25); } /* turned from the script, so pausing leaves it exactly where it was */
.np-disc::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 3px, rgba(255, 255, 255, .07) 3px 4px), conic-gradient(from 20deg, rgba(255, 255, 255, .22), transparent 18%, transparent 50%, rgba(255, 255, 255, .2) 62%, transparent 78%); }
.np-disc::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 3px rgba(0, 0, 0, .25); }
.np p { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.np-t { font-size: 13px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; }
.np-t::before { content: "\266A"; margin-right: 8px; }
.np-by { font-size: 12px; color: var(--ink2); }
.np-x { font-size: 11px !important; letter-spacing: .06em; text-transform: uppercase; color: var(--ink2) !important; opacity: 0; transition: opacity .2s; }
.np:hover .np-x, .np-x:focus-visible { opacity: 1; }
.np-yt { position: fixed; left: -4000px; top: 0; width: 200px; height: 200px; } /* the sound comes from here; it is kept off-screen */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sheet { from { transform: translateY(24px); opacity: 0; } }
@media (max-width: 700px) and (orientation: portrait) {
  .np { left: 50%; margin-left: -115px; bottom: max(14px, env(safe-area-inset-bottom)); gap: 6px; }
  .np .np-disc { width: 64px; height: 64px; }
  .np-x { opacity: 1; }
}

/* the Konami code: stickers flying over the whole page */
.burst { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 6; pointer-events: none; }

/* exploded view: numbered dots that follow the parts, and a compact key (names only; the chosen part's details show under the list) */
.xp { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.xp[hidden] { display: none; }
.xp-dot { position: absolute; left: -13px; top: -13px; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--ink); border: 1.5px solid var(--ink); font: 600 13px/23px var(--sans); text-align: center; font-style: normal; box-shadow: 0 2px 8px rgba(22, 25, 28, .2); will-change: transform; pointer-events: auto; cursor: pointer; }
.xp-dot.on { background: var(--ink); color: #fff; }
.xp-key { position: absolute; right: 22px; top: 62px; width: 232px; max-height: calc(100vh - 84px); max-height: calc(100dvh - 84px); overflow-y: auto; pointer-events: auto; }
.xp-key p { margin: 0 0 6px; font: 600 11px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); }
.xp-key ol { margin: 0; padding: 0; list-style: none; counter-reset: xp; }
.xp-key li { counter-increment: xp; position: relative; padding: 5px 0 5px 30px; border-top: 1px solid var(--line); cursor: pointer; }
.xp-key li::before { content: counter(xp); position: absolute; left: 0; top: 5px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--ink); font: 600 11px/18px var(--sans); text-align: center; }
.xp-key li.on::before { background: var(--ink); color: #fff; }
.xp-key b { font-weight: 500; } .xp-key li.on b { font-weight: 700; }
.xp-key .xp-desc { margin: 8px 0 12px; padding-top: 8px; border-top: 1px solid var(--line); min-height: 4.2em; font: 11.5px/1.45 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0; text-transform: none; color: var(--ink2); }
.xp-key button { font: 600 12.5px var(--sans); color: var(--ink); background: #fff; border: 1.5px solid var(--ink); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.xp-key button:hover { background: var(--ink); color: #fff; }
/* small windows and phones: the key becomes a panel along the bottom, names in three columns */
@media (max-width: 900px), (max-height: 620px) {
  .xp-key { left: 10px; right: 10px; top: auto; bottom: max(10px, env(safe-area-inset-bottom)); width: auto; max-height: 44vh; background: rgba(241, 236, 225, .95); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
  .xp-key > p:first-child { display: none; }
  .xp-key ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 10px; }
  .xp-key li { border: 0; padding: 4px 0 4px 24px; font-size: 12px; line-height: 1.25; }
  .xp-key li::before { top: 3px; width: 17px; height: 17px; font-size: 10px; line-height: 15px; }
  .xp-key .xp-desc { min-height: 3em; margin: 6px 0 8px; }
  .xp-dot { left: -11px; top: -11px; width: 22px; height: 22px; font-size: 11px; line-height: 19px; }
}

/* ---------- phones: the console's software, full screen (html.app) ---------- */
html.app, html.app body { height: 100%; overflow: hidden; overscroll-behavior: none; background: #eef0f3; }
html.app .hud, html.app .track, html.app .scrollcue { display: none; }
html.app #gl { touch-action: none; }
.os { --ink: #23262b; --mute: #737a85; --line: #d9dde3; --acc: #1aa3b3; --tint: #e3f4f6;
  position: fixed; inset: 0; z-index: 5; display: flex; flex-direction: column; color: var(--ink); font: 400 16px/1.5 var(--sans);
  background: linear-gradient(#f8f9fb, #e4e7ec); -webkit-tap-highlight-color: transparent; }
.os button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; touch-action: manipulation; cursor: pointer; }
.os-bar { flex: none; display: flex; align-items: center; justify-content: space-between; padding: max(10px, env(safe-area-inset-top)) 18px 9px; font-size: 14px; background: #f2f4f7; border-bottom: 1px solid var(--line); z-index: 3; }
.os-bar b { font-weight: 600; } .os-right { display: flex; align-items: center; gap: 8px; color: var(--mute); }
.os-batt { position: relative; width: 22px; height: 11px; border: 1.5px solid var(--mute); border-radius: 3px; }
.os-batt::before { content: ""; position: absolute; inset: 1.5px; right: 6px; background: var(--mute); border-radius: 1px; } .os-batt::after { content: ""; position: absolute; right: -4px; top: 3px; width: 2px; height: 4px; background: var(--mute); border-radius: 0 1px 1px 0; }
.os-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.os-view { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; background: linear-gradient(#f8f9fb, #e4e7ec); transition: transform .34s cubic-bezier(.2, .8, .2, 1), opacity .34s; will-change: transform; }
.os-view.right { transform: translateX(102%); } .os-view.left { transform: translateX(-24%); opacity: 0; pointer-events: none; }
.os-nosel { touch-action: none; overflow: hidden; }
/* startup */
.os-boot { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; background: #fff; transition: opacity .7s ease; text-align: center; }
.os-boot.done { opacity: 0; pointer-events: none; }
.os-boot h1 { margin: 0; font-size: 34px; font-weight: 700; letter-spacing: -.03em; opacity: 0; transform: scale(.92); animation: osIn .7s cubic-bezier(.2, .8, .2, 1) .25s forwards; }
.os-line { display: block; height: 3px; width: 64px; margin: 12px auto 0; border-radius: 2px; background: var(--acc); transform: scaleX(0); animation: osLine .6s ease .75s forwards; }
.os-boot p { margin: 64px 0 0; color: var(--mute); font-size: 13px; opacity: 0; animation: osIn .5s ease 1.1s forwards; }
.os-boot em { display: inline-flex; gap: 4px; margin-left: 8px; } .os-boot u { width: 4px; height: 4px; border-radius: 50%; background: var(--mute); animation: osDot 1s ease-in-out infinite; } .os-boot u:nth-child(2) { animation-delay: .15s; } .os-boot u:nth-child(3) { animation-delay: .3s; }
@keyframes osIn { to { opacity: 1; transform: none; } } @keyframes osLine { to { transform: none; } } @keyframes osDot { 50% { opacity: .2; transform: translateY(-3px); } }
/* home */
.os-home { display: flex; flex-direction: column; }
.os-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 12px; padding: 16px 16px 8px; min-height: 0; }
.os-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 0; padding: 10px 8px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 3px 0 rgba(30, 40, 55, .07); opacity: 0; transform: translateY(14px) scale(.96); transition: transform .12s, box-shadow .12s, border-color .12s, background .12s; }
.os.ready .os-tile { animation: osPop .5s cubic-bezier(.2, .9, .3, 1.2) forwards; } .os.ready .os-tile:nth-child(2) { animation-delay: .06s; } .os.ready .os-tile:nth-child(3) { animation-delay: .12s; } .os.ready .os-tile:nth-child(4) { animation-delay: .18s; } .os.ready .os-tile:nth-child(5) { animation-delay: .24s; } .os.ready .os-tile:nth-child(6) { animation-delay: .3s; }
@keyframes osPop { to { opacity: 1; transform: none; } }
.os-tile:active { transform: scale(.96) !important; background: var(--tint); border-color: var(--acc); box-shadow: none; }
.os-ico { flex: 1; min-height: 0; width: 100%; display: grid; place-items: center; } .os-ico img { max-width: 62%; max-height: 100%; min-height: 0; object-fit: contain; }
.os-tile b { font-size: 17px; font-weight: 600; } .os-tile small { font-size: 12.5px; color: var(--mute); }
.os-snake { display: grid; grid-template-columns: repeat(4, 20px); grid-template-rows: repeat(2, 20px); gap: 4px; } .os-snake i, .os-snake b { border-radius: 5px; background: var(--acc); }
.os-snake i:nth-child(1) { grid-area: 2 / 1; } .os-snake i:nth-child(2) { grid-area: 2 / 2; } .os-snake i:nth-child(3) { grid-area: 2 / 3; } .os-snake i:nth-child(4) { grid-area: 1 / 3; } .os-snake i:nth-child(5) { grid-area: 1 / 4; background: #0e7f8d; } .os-snake b { grid-area: 2 / 4; background: #e0584d; transform: scale(.7); }
.os-foot { flex: none; padding: 8px 16px max(14px, env(safe-area-inset-bottom)); text-align: center; } .os-foot p { margin: 0 0 6px; font-size: 13px; color: var(--mute); }
.os-foot nav { display: flex; justify-content: center; gap: 20px; } .os-foot a { color: var(--ink); font-weight: 500; font-size: 14px; text-decoration: none; padding: 6px 0; border-bottom: 1.5px solid var(--line); }
/* inside a section */
.os-head { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 8px 10px; background: rgba(246, 247, 249, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.os-back { justify-self: start; display: flex; align-items: center; gap: 4px; border: 0; background: none; padding: 8px 8px; color: var(--acc) !important; } .os-back span { font-size: 24px; line-height: .8; } .os-back b { font-weight: 500; }
.os-head strong { font-weight: 600; } .os-count { justify-self: end; padding-right: 8px; font-size: 13px; color: var(--mute); }
.os-body { padding: 16px 18px max(28px, env(safe-area-inset-bottom)); }
.os-list, .os-links { display: flex; flex-direction: column; gap: 10px; }
.os-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 2px 0 rgba(30, 40, 55, .06); }
.os-row:active { background: var(--tint); border-color: var(--acc); }
.os-th { position: relative; flex: none; width: 46px; height: 46px; display: grid; place-items: center; } .os-th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; } /* every thumbnail fills the same square, centred, whatever its shape */ .os-th em { font-style: normal; font-weight: 700; color: var(--acc); width: 100%; height: 100%; display: grid; place-items: center; background: var(--tint); border-radius: 12px; }
.os-rt { flex: 1; min-width: 0; display: flex; flex-direction: column; } .os-rt b { font-weight: 600; } .os-rt small { font-size: 12px; letter-spacing: .04em; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os-win { font-size: 12px; font-weight: 600; color: var(--acc); background: var(--tint); border-radius: 999px; padding: 3px 9px; } .os-go { color: var(--mute); font-size: 20px; }
/* a page */
.os-photo { display: block; width: 132px; height: 160px; object-fit: cover; object-position: 50% 25%; border-radius: 14px; margin: 0 0 14px; }
.os-hero { display: flex; align-items: center; gap: 14px; height: 96px; margin-bottom: 8px; } .os-hero img { max-height: 100%; max-width: 46%; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(30, 40, 55, .18)); } .os-hero img + img { max-height: 62%; }
.os-kick { margin: 0 0 2px; font-size: 12px; font-weight: 600; letter-spacing: .09em; color: var(--mute); }
.os-body h2 { margin: 0; font-size: 31px; line-height: 1.12; font-weight: 700; letter-spacing: -.025em; } .os-sub { margin: 4px 0 0; color: var(--mute); }
.os-body ul { margin: 16px 0 0; padding-left: 20px; } .os-body li { margin-bottom: 10px; color: #3d424a; } .os-text p { margin: 16px 0 0; color: #3d424a; font-size: 17px; }
.os-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; } .os-chips span { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: #4a4f57; }
.os-shots { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; } .os-shots img { width: 100%; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 6px 16px rgba(30, 40, 55, .12); }
.os-shots.tall { flex-direction: row; } .os-shots.tall img { flex: 1; min-width: 0; width: auto; max-height: 420px; object-fit: contain; background: #fff; }
.os-stickers { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; } .os-stickers img { max-width: 100%; max-height: 190px; object-fit: contain; filter: drop-shadow(0 5px 10px rgba(30, 40, 55, .2)); }
.os-logos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 10px; margin-top: 22px; justify-items: center; } .os-logos img { width: 62px; height: 62px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(30, 40, 55, .2)); }
.os-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.os-btn { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font-weight: 600 !important; } .os-btn i { font-style: normal; }
.os-btn:first-child { background: var(--acc); border-color: var(--acc); color: #fff !important; } .os-btn:active { filter: brightness(.94); }
.os-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); }
.os-pn button { display: flex; flex-direction: column; text-align: left; padding: 10px 12px; background: none; border: 1px solid var(--line); border-radius: 12px; min-width: 0; } .os-pn button:last-child { text-align: right; align-items: flex-end; }
.os-pn small { font-size: 12px; color: var(--mute); } .os-pn b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* snake */
.os-score { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 12px; color: var(--mute); } .os-score span { display: flex; flex-direction: column; } .os-score b { font-size: 44px; line-height: 1; font-weight: 700; color: var(--ink); } .os-score small { font-size: 13px; }
.os-game { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); background: #f3f5f8; touch-action: none; } .os-gmsg { min-height: 1.5em; margin: 14px 0 0; text-align: center; color: var(--mute); }

/* the page sits exactly over the 3D device's screen (its place is set from the model); it shows only while the device faces you */
html.dev .os { inset: auto; border-radius: 6px; overflow: hidden; opacity: 0; pointer-events: none; transition: opacity .18s; font-size: 14.5px; }
html.dev .os { transform-origin: 0 0; transition: none; }
html.dev .os.on.vis { opacity: 1; }
html.dev .os.on.face { pointer-events: auto; }
.os.full { opacity: 1; }
html.dev .os-bar { padding: 7px 12px 6px; font-size: 12px; }
html.dev .os-foot { padding-bottom: 8px; } html.dev .os-foot p { display: none; } html.dev .os-foot a { font-size: 12.5px; padding: 3px 0; } html.dev .os-foot nav { gap: 14px; }
html.dev .os-grid { gap: 8px; padding: 10px 10px 6px; } html.dev .os-tile { border-radius: 16px; padding: 6px; } html.dev .os-tile b { font-size: 14.5px; } html.dev .os-tile small { font-size: 11px; }
html.dev .os-body { padding: 12px 13px 22px; } html.dev .os-body h2 { font-size: 25px; } html.dev .os-text p { font-size: 15px; }
html.dev .os-boot h1 { font-size: 27px; } html.dev .os-row { padding: 9px 11px; border-radius: 13px; } html.dev .os-th { width: 38px; height: 38px; }
html.dev .os-snake { grid-template-columns: repeat(4, 15px); grid-template-rows: repeat(2, 15px); gap: 3px; }
.os .foc { border-color: var(--acc) !important; background: var(--tint) !important; box-shadow: 0 0 0 2px var(--acc) !important; }

/* the device's own startup: the screen flickers on, the name drops down the screen in steps and lands, a bar loads, then an iris closes on it */
html.dev .os.on { animation: osFlick .45s steps(1, end); }
@keyframes osFlick { 0% { filter: brightness(3); } 20% { filter: brightness(.2); } 40% { filter: brightness(1.8); } 60% { filter: brightness(.6); } 100% { filter: none; } }
html.dev .os-boot { background: #cfd7a8; color: #26331c; clip-path: circle(140% at 50% 50%); transition: clip-path .75s cubic-bezier(.7, 0, .3, 1); opacity: 1 !important; }
html.dev .os-boot.done { clip-path: circle(0% at 50% 46%); }
html.dev .os-boot::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(rgba(38, 51, 28, .07) 0 1px, transparent 1px 3px); }
html.dev .os-boot h1 { opacity: 1; transform: translateY(-46vh); font-weight: 800; letter-spacing: .02em; animation: none; }
html.dev .os.on .os-boot h1 { animation: osDrop 1.25s steps(18, end) .35s forwards, osLand .28s ease-out 1.6s; }
@keyframes osDrop { to { transform: none; } } @keyframes osLand { 30% { transform: translateY(5px) scaleY(.9); } 60% { transform: translateY(-2px); } }
html.dev .os-line { animation: none; } html.dev .os-boot p { animation: none; }
html.dev .os.on .os-line { animation: osLine .9s steps(10, end) 1.75s forwards; }
html.dev .os-line { width: 120px; height: 6px; border-radius: 0; background: #26331c; transform-origin: left; outline: 2px solid #26331c; outline-offset: 2px; }
html.dev .os-boot p { margin-top: 26px; color: #4a5a36; font: 600 11px ui-monospace, Menlo, monospace; letter-spacing: .18em; text-transform: uppercase; }
html.dev .os.on .os-boot p { animation: osBlink .5s steps(1) 1.6s 3, osIn .01s linear 1.6s forwards; } html.dev .os-boot em { display: none; }
@keyframes osBlink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { html.dev .os-boot h1 { animation: none; transform: none; } }
.os-cheat { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 12; white-space: nowrap; padding: 10px 16px; border-radius: 12px; background: rgba(18, 52, 59, .92); color: #fff; font: 700 14px var(--sans); animation: osIn .25s ease; }

/* Snake: a small score line, then the whole board fitted into the space that is left */
.os-snakev { display: flex; flex-direction: column; } .os-snakev .os-head { flex: none; }
.os-snakev .os-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 8px 10px 10px !important; }
.os-snakev .os-score { flex: none; align-items: center; margin-bottom: 6px; font-size: 13px; } .os-snakev .os-score span { flex-direction: row; align-items: baseline; gap: 4px; }
.os-snakev .os-score b { font-size: 15px; line-height: 1.2; } .os-snakev .os-score small { font-size: 13px; }
.os-gwrap { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; }
.os-gwrap .os-game { position: absolute; inset: 0; margin: auto; width: auto; height: auto; max-width: 100%; max-height: 100%; border-radius: 10px; } /* out of the flow, so the board can never push the layout taller than the screen */
.os-gwrap .os-gmsg { position: absolute; left: 0; right: 0; top: 27%; transform: translateY(-50%); margin: 0; min-height: 0; pointer-events: none; font-weight: 600; color: var(--ink); text-shadow: 0 0 8px #fff, 0 0 8px #fff; }
.os-stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.os-stack span { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.os-stack img { width: 40px; height: 40px; object-fit: contain; } .os-stack b { font-size: 11.5px; font-weight: 600; white-space: nowrap; letter-spacing: -.01em; } /* a name never breaks across lines */
.os-stack span { min-width: 0; padding-left: 2px; padding-right: 2px; }

/* phones: nothing moves sideways. The page itself is pinned, and each screen only ever scrolls up and down. */
html.app, html.app body { position: fixed; inset: 0; width: 100%; overflow: hidden; touch-action: none; }
.os-view { overflow-x: hidden; touch-action: pan-y; } .os-stage { touch-action: pan-y; }
.os-body { max-width: 100%; overflow-x: hidden; overflow-wrap: break-word; } .os-body img { max-width: 100%; }
