/* The After Hours Library. A flagship console's home screen after close.
   One world: ink, lacquer, bottle green, bone, ash. No chromatic UI accent:
   the key art carries all the colour. Type: tracked Cormorant Garamond
   capitals for logotypes and numerals, Hanken Grotesk for everything else.
   One ease. Motion is slow and sure; nothing bounces or shakes. */

:root {
  --ink: #0a0f0d;
  --ink-2: #0d1311;
  --lacquer: #111b17;
  --lacquer-2: #16221d;
  --bottle: #1c3229;
  --bottle-2: #24402f;
  --bone: #ede7db;
  --bone-2: #d9d2c4;
  --ash: #9a9890;
  --ash-2: #7d7b74;
  --hair: rgba(237, 231, 219, 0.14);
  --hair-2: rgba(237, 231, 219, 0.24);
  --bronze: #9c6b43; --silver: #b9bcbe; --gold: #c9a96a; --platinum: #dcdde0;
  --serif: "Cormorant Garamond", "Cormorant", Garamond, serif;
  --sans: "Hanken Grotesk", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --pad: clamp(16px, 4.7vw, 72px);
  --bar: 76px;
  /* the library row: a tile and the focused tile; the row's bottom edge is where the focused title may start */
  --tile: 136px;
  --tile-f: 162px;
  --shelf-b: calc(96px + 20px + 8px + var(--tile-f) + 14px + 23px + 8px);
  --head-b: 112px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--ink); color: var(--bone); -webkit-text-size-adjust: 100%; scrollbar-color: var(--bottle-2) var(--ink); }
body.lib { margin: 0; min-height: 100vh; background: var(--ink); color: var(--bone); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--bottle-2); color: var(--bone); }
input, button, textarea { font: inherit; color: inherit; caret-color: var(--bone); }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
img, video { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--bone); outline-offset: 4px; border-radius: 4px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--bone); color: var(--ink); border-radius: 4px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }
svg { width: 20px; height: 20px; flex: none; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bottle-2); border-radius: 10px; border: 3px solid var(--ink); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 22px; border: 1px solid rgba(237, 231, 219, 0.7); border-radius: 3px; background: transparent; color: var(--bone); font: 500 16px/1 var(--sans); letter-spacing: 0.01em; text-decoration: none; cursor: pointer; transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease); white-space: nowrap; }
.btn:hover { background: rgba(237, 231, 219, 0.08); border-color: var(--bone); }
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--bone); color: var(--ink); border-color: var(--bone); min-width: 148px; }
.btn--primary:hover { background: #fff8ec; border-color: #fff8ec; }
.btn--ghost { border-color: transparent; color: var(--bone-2); }
.btn--ghost:hover { border-color: var(--hair-2); background: transparent; }
.btn--sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn--lg { min-height: 54px; padding: 0 30px; font-size: 18px; min-width: 200px; }
.x { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--hair-2); border-radius: 50%; background: transparent; color: var(--bone); cursor: pointer; }
.x:hover { border-color: var(--bone); }
.key { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 6px; border: 1px solid rgba(237, 231, 219, 0.55); border-radius: 4px; font: 500 12px/1 var(--sans); color: var(--bone); }

/* =========================================================================
   NO-JS: a plain, complete document. The game layer starts at html.lib-on.
   ========================================================================= */
html:not(.lib-on) .stage, html:not(.lib-on) .hud-trophies, html:not(.lib-on) .legend { display: none; }
html:not(.lib-on) .lib__main { max-width: 860px; margin: 0 auto; padding: 120px 20px 60px; }
html:not(.lib-on) .titles, html:not(.lib-on) .screen { display: block; }
html:not(.lib-on) article.title { padding: 40px 0; border-top: 1px solid var(--hair); }
html:not(.lib-on) .title__acts .btn--primary, html:not(.lib-on) .tabs { display: none; }
html:not(.lib-on) .shelf__row { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; }
html:not(.lib-on) .tile__img { display: none; }
html:not(.lib-on) .sys { position: absolute; }

/* =========================================================================
   THE SYSTEM BAR
   ========================================================================= */
.sys { position: fixed; z-index: 30; top: 0; left: 0; right: 0; height: var(--bar); display: flex; align-items: center; gap: 22px; padding: 0 var(--pad) 0 calc(var(--pad) - 27px); }
.sys__me { display: flex; align-items: center; gap: 16px; text-decoration: none; min-width: 0; padding: 4px; border-radius: 40px; }
.sys__avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--bottle); box-shadow: 0 0 0 1px var(--hair-2), 0 6px 14px rgba(0, 0, 0, .45); }
.sys__who { display: grid; gap: 2px; min-width: 0; }
.sys__name { font: 500 18px/1.2 var(--sans); letter-spacing: 0.005em; }
.sys__title { font: 400 13px/1.3 var(--sans); color: var(--ash); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sys__lvl { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 12px; border: 1px solid var(--hair-2); border-radius: 20px; font: 500 12px/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ash); cursor: default; }
.sys__lvl b { font: 600 17px/1 var(--serif); letter-spacing: 0.04em; color: var(--bone); }
.sys__tro { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; padding: 6px 8px; border-radius: 20px; }
.sys__tro svg { width: 26px; height: 26px; color: var(--gold); }
.sys__tro b { font: 500 19px/1 var(--sans); }
.sys__nav { margin-left: auto; display: flex; align-items: center; gap: 34px; }
.sys__btn { display: inline-flex; align-items: center; gap: 9px; background: none; border: 0; padding: 8px 0; color: var(--bone); text-decoration: none; font: 400 16px/1 var(--sans); cursor: pointer; }
.sys__btn svg { width: 19px; height: 19px; opacity: 0.85; }
.sys__btn:hover span { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--hair-2); }
.sys__score .g-wave__on { opacity: 0; }
.sys__score.is-on .g-wave__on { opacity: 1; }
.sys__score.is-on .g-wave__off { opacity: 0; }
.sys__clock { font: 400 17px/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--bone); min-width: 74px; text-align: right; }

/* =========================================================================
   THE STAGE: key art behind everything
   ========================================================================= */
.lib-on .stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--ink); }
.plate { position: absolute; inset: 0; opacity: 0; transition: opacity .9s var(--ease); }
.plate.is-on { opacity: 1; }
.plate__img, .plate__loop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; }
/* the dolly moves the plate, so the still and its loop share one scale and the dissolve between them holds still */
.plate.is-on { animation: dolly 20s var(--ease) both; }
.plate__loop { opacity: 0; transition: opacity 1.2s var(--ease); }
/* a phone shows the still's portrait crop but the loop's whole frame: --lx (assemble_home.py, from frames.json) puts the loop over the same part of the frame */
@media (max-width: 760px) { .plate .plate__loop { object-position: var(--lx, 62%) 50%; } }
.plate.is-live .plate__loop { opacity: 1; }
@keyframes dolly { from { transform: scale(1.0); } to { transform: scale(1.02); } }
.stage__shade { position: absolute; inset: 0; background: radial-gradient(42% 26% at 82% 0%, rgba(10, 15, 13, .62) 0%, rgba(10, 15, 13, 0) 100%), linear-gradient(90deg, rgba(10, 15, 13, 0.55) 0%, rgba(10, 15, 13, 0.18) 46%, rgba(10, 15, 13, 0) 70%), linear-gradient(180deg, rgba(10, 15, 13, 0.8) 0%, rgba(10, 15, 13, 0) 18%, rgba(10, 15, 13, 0) 52%, rgba(10, 15, 13, 0.62) 100%); transition: background .6s var(--ease); }
.stage__grain { position: absolute; inset: -50%; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .93 0 0 0 0 .9 0 0 0 0 .85 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); opacity: 0.05; pointer-events: none; animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }
.title-open .stage__shade, .screen-open .stage__shade { background: rgba(10, 15, 13, 0.78); }

/* =========================================================================
   THE LIBRARY ROW
   ========================================================================= */
.lib-on .lib__main { position: relative; z-index: 1; min-height: 100vh; min-height: 100svh; }
.lib-on .shelf { position: absolute; z-index: 3; top: 96px; left: 0; right: 0; }
.lib-on .shelf__row { list-style: none; margin: 0; padding: 20px var(--pad) 28px calc(var(--pad) - 8px); display: flex; align-items: flex-start; gap: 30px; overflow-x: auto; scrollbar-width: none; scroll-padding-left: var(--pad); }
.lib-on .shelf__row::-webkit-scrollbar { display: none; }
.lib-on .shelf__row > li { flex: none; }
.tile { --s: var(--tile); display: grid; gap: 14px; width: calc(var(--s) + 20px); text-decoration: none; color: var(--bone); padding: 8px; margin-top: 12px; border-radius: 10px; outline: none; transition: transform .6s var(--ease), margin .36s var(--ease); }
.tile__frame { position: relative; display: block; width: var(--s); height: var(--s); border-radius: 6px; transition: width .36s var(--ease), height .36s var(--ease); }
.tile__img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; background: var(--lacquer-2); box-shadow: inset 0 0 0 1px var(--hair), 0 10px 24px rgba(0, 0, 0, .5); }
.tile__frame::after { content: ""; position: absolute; inset: -8px; border-radius: 11px; border: 3px solid var(--bone); opacity: 0; transform: scale(0.97); transition: opacity .36s var(--ease), transform .36s var(--ease); pointer-events: none; }
.tile__name { font: 400 16px/1.2 var(--sans); white-space: nowrap; transition: font-size .36s var(--ease); }
.tile__tag { display: block; margin-top: -10px; font: 400 13px/1.2 var(--sans); color: var(--ash); white-space: nowrap; }
/* the labels sit across the plate's band of lamp heads at every height, so they carry their own ink: a halo
   on the names, and the claims tag set as a hairline tag on an opaque lacquer fill */
.tile__name, .tile__tag { text-shadow: 0 0 2px var(--ink), 0 0 10px var(--ink), 0 0 18px rgba(10, 15, 13, .8); }
.tile__tag { justify-self: start; margin-top: -12px; padding: 2px 8px; background: var(--lacquer); border: 1px solid var(--hair-2); border-radius: 3px; text-shadow: none; box-shadow: 0 0 14px 4px rgba(10, 15, 13, .55); }
.tile.is-focus { margin-top: 0; }
.tile.is-focus .tile__frame { width: var(--tile-f); height: var(--tile-f); }
.tile.is-focus .tile__frame::after { opacity: 1; transform: none; animation: breathe 2.4s ease-in-out infinite; }
.tile.is-focus .tile__name { font-size: 19px; font-weight: 500; }
/* a level of the run cleared: a small lit diamond beside the name */
.tile.is-cleared .tile__name::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 2px 9px; background: var(--bone); transform: rotate(45deg); box-shadow: 0 0 8px rgba(246, 222, 170, .7); }
/* the run's door in the bar, and its line on the card scene */
.tile[data-size="sm"] { --s: calc(var(--tile) * 0.882); }
.tile[data-size="sm"].is-focus .tile__frame { width: calc(var(--tile-f) * 0.864); height: calc(var(--tile-f) * 0.864); }
.tile:focus-visible .tile__frame::after { opacity: 1; transform: none; }
.tile:hover .tile__img { filter: brightness(1.06); }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.82; } }

/* =========================================================================
   THE FOCUSED TITLE ON THE HOME SCREEN
   ========================================================================= */
.lib-on article.title { display: none; }
.lib-on article.title.is-focus, .lib-on article.title.is-open { display: block; }
.lib-on .title__head { position: absolute; z-index: 2; left: var(--pad); bottom: 112px; width: min(780px, 56vw); animation: rise .7s var(--ease) both; }
.lib-on article.title.is-open .title__head { animation: none; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.title__logo { margin: 0; font: 600 clamp(44px, 4.6vw, 76px)/1 var(--serif); letter-spacing: 0.12em; text-transform: uppercase; text-wrap: balance; text-shadow: 0 2px 30px rgba(0, 0, 0, .45); outline: none; }
.title__tag { display: inline-block; margin: 14px 0 0; padding: 4px 10px; border: 1px solid var(--hair-2); border-radius: 20px; font: 500 12px/1 var(--sans); letter-spacing: 0.08em; color: var(--bone-2); }
.title__role { margin: 14px 0 0; font: 400 15px/1.4 var(--sans); color: var(--bone-2); }
.title__sum { margin: 14px 0 0; max-width: 62ch; font: 400 18px/1.5 var(--sans); color: var(--bone); text-shadow: 0 1px 16px rgba(0, 0, 0, .5); }
.title__stats { display: flex; flex-wrap: wrap; margin: 26px 0 0; padding: 0; }
.stat { display: flex; flex-direction: column-reverse; gap: 4px; padding: 0 30px 0 0; margin: 0 30px 6px 0; border-right: 1px solid var(--hair-2); max-width: 240px; }
.stat:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.stat dd { margin: 0; font: 500 clamp(40px, 3.6vw, 56px)/1 var(--serif); letter-spacing: 0.01em; font-variant-numeric: lining-nums tabular-nums; }
.stat dt { font: 400 14px/1.35 var(--sans); color: var(--ash); }
.title__note { margin: 8px 0 0; font: 400 13px/1.4 var(--sans); color: var(--ash); }
.title__acts { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 34px; }

/* the trophies in this title, bottom right */
.lib-on .hud-trophies { position: absolute; z-index: 2; right: var(--pad); bottom: 54px; width: 250px; padding: 16px 18px; background: rgba(17, 27, 23, .9); border-radius: 6px; box-shadow: inset 0 1px 0 var(--hair-2), 0 0 0 1px rgba(0, 0, 0, .35), 0 18px 40px rgba(0, 0, 0, .45); animation: rise .7s .1s var(--ease) both; }
.hud-trophies__h { margin: 0 0 16px; font: 400 16px/1.2 var(--sans); }
.hud-trophies ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hud-trophies li { display: flex; align-items: center; gap: 14px; }
.hud-trophies li span { display: grid; gap: 2px; }
.hud-trophies b { font: 400 15px/1.25 var(--sans); }
.hud-trophies small { font: 400 12px/1.2 var(--sans); color: var(--bone-2); }
.hud-trophies__none { margin: 0; color: var(--ash); font-size: 14px; }
.medal { width: 40px; height: 40px; border-radius: 50%; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .55)); }

/* the control legend */
.lib-on .legend { position: fixed; z-index: 2; left: var(--pad); bottom: 30px; display: flex; gap: 28px; font: 400 14px/1 var(--sans); color: var(--bone-2); }
.legend span { display: inline-flex; align-items: center; gap: 9px; }
.legend .key { margin-right: -3px; }
html:not(.lib-on) .legend, .title-open .legend, .screen-open .legend { display: none; }
.title-open .hud-trophies, .screen-open .hud-trophies, .title-open .shelf, .screen-open .shelf { opacity: 0; pointer-events: none; }
.shelf, .hud-trophies { transition: opacity .4s var(--ease); }

/* =========================================================================
   AN OPEN TITLE: its own page
   ========================================================================= */
.title__body { display: none; }
.lib-on article.title.is-open { position: fixed; inset: 0; z-index: 40; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 120px; }
.lib-on article.title.is-open .title__head { position: relative; left: auto; bottom: auto; width: auto; max-width: 760px; margin: 0 0 0 var(--pad); padding-top: 128px; }
.lib-on article.title.is-open .title__acts .btn--primary { display: none; }
.lib-on article.title.is-open .title__body { display: block; }
.lib-on article.title.is-open .title__body > * { max-width: 760px; margin-left: var(--pad); }
.title__back { position: fixed; z-index: 5; top: 20px; left: calc(var(--pad) - 6px); display: none; }
.lib-on article.title.is-open .title__back { display: inline-flex; }
.tabs { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 6px; margin-top: 40px; padding: 14px 0; background: linear-gradient(180deg, rgba(10, 15, 13, .96) 70%, rgba(10, 15, 13, 0)); }
.tabs a { position: relative; padding: 10px 14px; text-decoration: none; color: var(--ash); font: 500 15px/1 var(--sans); border-radius: 3px; }
.tabs a.is-on { color: var(--bone); }
.tabs a.is-on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; background: var(--bone); }
.tabs a:hover { color: var(--bone); }
.tabs .key { margin: 0 6px; }
.pad .tabs .key--q::before { content: "LB"; } .pad .tabs .key--e::before { content: "RB"; }
.sec { padding: 36px 0 8px; border-top: 1px solid var(--hair); margin-top: 26px; }
.sec:first-of-type { border-top: 0; margin-top: 0; }
.sec__h { margin: 0 0 18px; font: 500 13px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ash); }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.points li { position: relative; padding-left: 24px; font: 400 17px/1.6 var(--sans); max-width: 66ch; }
.points li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 8px; height: 8px; border: 1px solid var(--bone-2); transform: rotate(45deg); }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 10px 26px; margin: 26px 0 0; font-size: 15px; }
.details dt { color: var(--ash); }
.details dd { margin: 0; }
.proof { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.film { margin: 0; }
.film video { width: 100%; aspect-ratio: 16 / 9; background: var(--ink); border-radius: 6px; box-shadow: 0 0 0 1px var(--hair), 0 18px 40px rgba(0, 0, 0, .5); }
.film figcaption { margin-top: 12px; font-size: 14px; color: var(--ash); }
.tlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.trophy { display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: center; }
.trophy .medal { width: 64px; height: 64px; }
.trophy:not(.is-seen) .medal { filter: saturate(0.35) brightness(0.78); }
.trophy b { display: block; font: 500 17px/1.3 var(--sans); }
.trophy small { display: inline-block; margin-left: 8px; font: 500 11px/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ash); }
.trophy p { margin: 4px 0 0; color: var(--bone-2); font-size: 15px; }
.trophy a { color: var(--bone); }
/* not earned yet: the fact stays readable, with a quiet way into the level that holds its medal */
.hud-trophies li:not(.is-seen) .medal { filter: saturate(0.35) brightness(0.78); }
.stack { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.stack li { padding: 9px 14px; border: 1px solid var(--hair-2); border-radius: 3px; background: rgba(17, 27, 23, .7); font: 500 14px/1 var(--sans); }
.empty { color: var(--ash); }
.demo { display: grid; grid-template-columns: auto 1fr; gap: 34px; align-items: start; }
.demo__note { color: var(--bone-2); font-size: 15px; max-width: 34ch; }

/* =========================================================================
   SCREENS: trophies, profile, proofs
   ========================================================================= */
.lib-on .screen { display: none; }
.lib-on .screen.is-open { display: block; position: fixed; inset: 0; z-index: 40; overflow-y: auto; overscroll-behavior: contain; padding: 120px var(--pad) 100px; animation: rise .6s var(--ease) backwards; }
/* a solid band of ink under the fixed chrome (Back, and the bar's Resume, Email and Score): what scrolls goes under it, not through it.
   The rise above fills backwards only: a transform left on the screen would carry Back and the band away with the scroll. */
.lib-on .screen.is-open::before { content: ""; position: fixed; z-index: 4; top: 0; left: 0; right: 0; height: var(--bar); background: var(--ink); }
.screen__back { position: fixed; z-index: 5; top: 20px; left: calc(var(--pad) - 6px); display: none; }
.lib-on .screen.is-open .screen__back { display: inline-flex; }
.screen__head { max-width: 900px; margin-bottom: 30px; }
.screen__h { margin: 0; font: 600 clamp(42px, 4.4vw, 70px)/1 var(--serif); letter-spacing: 0.12em; text-transform: uppercase; outline: none; }
.screen__sub { margin: 14px 0 0; color: var(--bone-2); font-size: 16px; }
.trophies__groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 36px 56px; max-width: 1300px; }
.tgroup h3 { margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--hair); font: 500 22px/1 var(--serif); letter-spacing: 0.12em; text-transform: uppercase; }
.profile__grid { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 56px; max-width: 1300px; align-items: start; }
.profile__portrait { position: relative; margin: 0; aspect-ratio: 4 / 5; border-radius: 6px; overflow: hidden; background: radial-gradient(120% 90% at 60% 30%, #233a2f 0%, #14211c 55%, #0b110f 100%); box-shadow: 0 0 0 1px var(--hair), 0 24px 50px rgba(0, 0, 0, .5); }
.profile__portrait img { position: absolute; left: 50%; bottom: 0; height: 100%; width: auto; max-width: none; transform: translateX(-50%); }
.profile__lvl { display: flex; align-items: baseline; gap: 14px; margin: 18px 0 0; }
.profile__lvl b { font: 500 64px/1 var(--serif); }
.profile__lvl span { color: var(--bone-2); max-width: 28ch; font-size: 15px; }
.profile__bio { font-size: 18px; max-width: 62ch; }
.loadout { display: grid; gap: 0; margin: 0; max-width: 820px; }
.loadout > div { display: grid; grid-template-columns: 180px 1fr; gap: 6px 24px; align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--hair); }
.loadout dt { font: 500 14px/1.4 var(--sans); color: var(--bone-2); }
.loadout dd { margin: 0; font-size: 15px; line-height: 1.6; }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-width: 560px; }
.links a { display: flex; justify-content: space-between; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--hair); text-decoration: none; }
.links a span { color: var(--ash); }
.links a:hover b { text-decoration: underline; text-underline-offset: 5px; }
.group { list-style: none; margin: 0; padding: 0; max-width: 760px; }
.group .row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--hair); text-decoration: none; }
.group .row__txt { flex: 1; display: grid; gap: 2px; }
.group .row__txt span { color: var(--ash); font-size: 14px; }
.group .row__chev { width: 9px; height: 9px; border-top: 1.5px solid var(--ash); border-right: 1.5px solid var(--ash); transform: rotate(45deg); }
.group .appicon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--lacquer-2); box-shadow: inset 0 0 0 1px var(--hair); }
.group .appicon img, .group .appicon svg { width: 20px; height: 20px; }
.credits { display: none; }
html:not(.lib-on) .credits { display: block; padding-top: 40px; border-top: 1px solid var(--hair); color: var(--ash); font-size: 14px; }
.screen .credits-inline { margin-top: 60px; color: var(--ash); font-size: 13px; max-width: 70ch; }
.credits__links { display: flex; flex-wrap: wrap; gap: 18px; }

/* =========================================================================
   TOASTS
   ========================================================================= */
.toasts { position: fixed; z-index: 80; top: 92px; right: var(--pad); display: grid; gap: 12px; pointer-events: none; }
/* a status line from the title screen (the card saved, a link copied) shows above it */
.intro-on .toasts { z-index: 210; }
.toast { display: flex; align-items: center; gap: 16px; width: min(380px, calc(100vw - 32px)); padding: 14px 18px; background: var(--lacquer); border-radius: 6px; box-shadow: inset 0 1px 0 var(--hair-2), 0 0 0 1px rgba(0, 0, 0, .4), 0 18px 40px rgba(0, 0, 0, .55); opacity: 0; transform: translateX(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.toast.is-on { opacity: 1; transform: none; }
@keyframes coin { from { transform: perspective(300px) rotateY(-180deg); } to { transform: perspective(300px) rotateY(0); } }
@keyframes sheen { 0% { opacity: 0; transform: translateX(-70%); } 30% { opacity: .9; } 100% { opacity: 0; transform: translateX(70%); } }
.toast__t small { margin-left: 8px; font: 500 11px/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ash); }
.toast__t { margin: 5px 0 0; font: 500 17px/1.2 var(--sans); }
.toast__s { margin: 4px 0 0; font: 400 13px/1.4 var(--sans); color: var(--bone-2); }
.toast--status { padding: 14px 18px; }
.toast--status .toast__t { margin: 0; font-size: 15px; }

/* =========================================================================
   DIALOGS: the deck, Check me, the controls
   ========================================================================= */
dialog.sheet { color: var(--bone); border: 0; padding: 0; background: transparent; max-width: none; max-height: none; }
dialog.sheet::backdrop { background: rgba(6, 9, 8, 0.82); }
.drawer { width: min(560px, 100vw); height: 100vh; height: 100dvh; margin: 0 0 0 auto; }
.drawer__inner { height: 100%; overflow-y: auto; padding: 26px 30px 40px; background: var(--lacquer); box-shadow: inset 1px 0 0 var(--hair-2), -30px 0 60px rgba(0, 0, 0, .5); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.drawer__head h2 { margin: 0; font: 500 38px/1 var(--serif); letter-spacing: 0.12em; text-transform: uppercase; }
.fine { color: var(--ash); font-size: 14px; }
.vd__list { margin-top: 10px; }
.ask-form { margin-top: 30px; }
.label { display: block; margin-bottom: 10px; color: var(--bone-2); font-size: 14px; }
.ask-form__row { display: flex; gap: 10px; }
.ask-form input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; background: var(--ink); border: 1px solid var(--hair-2); border-radius: 3px; color: var(--bone); }
.ask-form input:focus { outline: none; border-color: var(--bone); }
.ask-form__answer { margin-top: 14px; min-height: 1.4em; color: var(--bone-2); }
.ask-form__answer.is-thinking { color: var(--ash); }
.help__keys { display: grid; gap: 10px; margin: 18px 0; }
.help__keys > div { display: grid; grid-template-columns: 100px 1fr; gap: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--hair); }
.help__keys dt { font-weight: 600; }
.help__keys dd { margin: 0; color: var(--bone-2); }
.deck { width: 100vw; height: 100vh; height: 100dvh; margin: 0; }
.deck[open] { display: grid; grid-template-rows: auto 1fr auto; background: var(--ink); }
.deck__top { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 18px var(--pad); }
.deck__stage { display: grid; place-items: center; padding: 0 var(--pad); overflow: auto; }
.slide { width: min(900px, 100%); opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.slide.is-in { opacity: 1; transform: none; }
.slide__img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin-bottom: 22px; }
.slide__img--icon { border-radius: 18px; }
.slide__t { margin: 0; font: 500 clamp(36px, 4.2vw, 64px)/1.05 var(--serif); letter-spacing: 0.06em; text-transform: uppercase; outline: none; text-wrap: balance; }
.slide__s { font-size: 20px; color: var(--bone-2); max-width: 60ch; }
.slide__fine { color: var(--ash); font-size: 14px; }
.slide__rows { display: grid; gap: 10px; margin: 22px 0; }
.slide__rows > div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--hair); }
.slide__rows dt { color: var(--ash); }
.slide__rows dd { margin: 0; }
.slide__list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.slide__list a, .chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--hair-2); border-radius: 3px; text-decoration: none; font-size: 14px; }
.slide__proof { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.mask { display: inline; }
.deck__nav { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 18px; }
.deck__arrow { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--hair-2); border-radius: 50%; background: transparent; color: var(--bone); cursor: pointer; }
.deck__count { margin: 0; color: var(--ash); font-variant-numeric: tabular-nums; }

/* =========================================================================
   THE TITLE SCREEN
   ========================================================================= */
html.intro-pending body > :not(#intro):not(#boot):not(script):not(dialog):not(.toasts) { visibility: hidden; }
.intro { position: fixed; inset: 0; z-index: 200; overflow: hidden; background: var(--ink); color: var(--bone); opacity: 0; transition: opacity .9s var(--ease); }
.intro.is-shown { opacity: 1; }
.intro.is-leaving { opacity: 0; transition-duration: .7s; }
.intro__art { position: absolute; inset: 0; }
.intro__art img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; animation: dolly 30s var(--ease) both; }
/* real play from the run behind the title: it arrives over the plate once the page has settled */
.intro__attract { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; opacity: 0; transform: scale(1.04); transition: opacity 1.6s var(--ease), transform 6s var(--ease); }
.intro__attract.is-on { opacity: .62; transform: none; }
.intro.is-started .intro__attract { opacity: 0; transition-duration: .5s; }
.intro__start .intro__play { min-width: clamp(240px, 20vw, 300px); min-height: clamp(60px, 7vh, 68px); font-size: clamp(18px, 1.4vw, 20px); }
/* the start screen (the home page, where the run lives): everything in the middle, one thing to press */
.intro--play .intro__scene--title { inset: 0; margin: 0 auto; max-width: none; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 var(--pad); }
.intro--play .intro__logo { justify-items: center; }
.intro--play .intro__line { margin-top: 18px; }
.intro--play .intro__start { justify-content: center; margin-top: clamp(32px, 6vh, 56px); }
.intro--play .intro__press { margin-top: 22px; }
.intro.intro--play:not(.is-started) .intro__shade { background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(10, 15, 13, .72) 0%, rgba(10, 15, 13, .5) 55%, rgba(10, 15, 13, .2) 80%), linear-gradient(0deg, rgba(10, 15, 13, .7) 0%, rgba(10, 15, 13, 0) 30%), linear-gradient(180deg, rgba(10, 15, 13, .7) 0%, rgba(10, 15, 13, 0) 20%); }
.intro--play .intro__attract { object-position: 50% 55%; }
@media (max-height: 480px) and (orientation: landscape) { .intro--play .intro__press { margin-top: 10px; } }
@media (max-width: 759px) { .intro--play .intro__scene--title { bottom: 0; } .intro--play .intro__start .intro__play { width: min(320px, 100%); } }
.intro__start .intro__play svg { width: 20px; height: 20px; }
@media (max-height: 480px) and (orientation: landscape) {
  .intro__scene--title .intro__logo { font-size: clamp(30px, 9vh, 46px); }
  .intro__scene--title .intro__line { margin-top: 6px; }
  .intro__scene--title .intro__start { margin-top: 10px; }
  .intro__start .intro__play { min-height: 52px; }
}
@media (max-width: 759px) { .intro__attract { object-position: 30% 60%; } .intro__attract.is-on { opacity: .5; } }
.intro__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 15, 13, .82) 0%, rgba(10, 15, 13, .45) 42%, rgba(10, 15, 13, .05) 75%), linear-gradient(0deg, rgba(10, 15, 13, .75) 0%, rgba(10, 15, 13, 0) 45%); transition: background .8s var(--ease); }
.intro.is-started .intro__shade { background: rgba(10, 15, 13, 0.8); }
.intro__skip { position: absolute; z-index: 3; top: 22px; right: var(--pad); padding: 10px 14px; background: none; border: 0; color: var(--ash); font: 400 15px/1 var(--sans); cursor: pointer; }
.intro__skip:hover { color: var(--bone); }
.intro__scene { position: absolute; z-index: 2; left: var(--pad); right: var(--pad); bottom: clamp(70px, 12vh, 130px); max-width: 760px; opacity: 0; transform: translateY(12px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.intro__scene.is-on { opacity: 1; transform: none; }
.intro__logo { margin: 0; display: grid; font: 600 clamp(56px, 8.4vw, 132px)/0.92 var(--serif); letter-spacing: 0.12em; text-transform: uppercase; }
.intro__logo span:last-child { letter-spacing: 0.1em; }
.intro__line { margin: 22px 0 0; font: 400 clamp(15px, 1.4vw, 19px)/1.4 var(--sans); color: var(--bone-2); letter-spacing: 0.02em; }
.intro__press { margin: 44px 0 0; font: 500 13px/1 var(--sans); letter-spacing: 0.32em; text-transform: uppercase; color: var(--bone); animation: breathe 2.4s ease-in-out infinite; }
.intro__start { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 20px; }
.intro__fine { margin: 18px 0 0; max-width: 52ch; color: var(--ash); font-size: 14px; }
.intro__h { margin: 0 0 24px; font: 500 clamp(40px, 5vw, 76px)/1 var(--serif); letter-spacing: 0.1em; text-transform: uppercase; }
.menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 560px; }
.menu__row { position: relative; display: flex; align-items: center; gap: 18px; width: 100%; padding: 16px 20px; text-align: left; background: rgba(17, 27, 23, .74); border: 1px solid var(--hair); border-radius: 4px; color: var(--bone); cursor: pointer; transition: background-color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease); }
.menu__row.is-on { background: var(--bottle); border-color: var(--bone); }
.menu__row.is-picked { background: var(--bone); color: var(--ink); }
.menu__row.is-picked small { color: #2c3a33; }
.menu__n { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid currentColor; border-radius: 4px; font: 500 14px/1 var(--sans); opacity: .8; }
.menu__txt { display: grid; gap: 4px; }
.menu__txt b { font: 500 19px/1.2 var(--sans); }
.menu__txt small { font: 400 14px/1.35 var(--sans); color: var(--bone-2); }
.intro__form input { width: min(520px, 100%); height: 60px; padding: 0 2px; background: transparent; border: 0; border-bottom: 1px solid var(--bone); border-radius: 0; color: var(--bone); font: 500 30px/1 var(--sans); }
.intro__form input::placeholder { color: var(--ash-2); }
.intro__form input:focus { outline: none; border-bottom-width: 2px; }
.intro__acts { display: flex; gap: 12px; margin-top: 24px; }
.intro__card { margin: 0; font: 500 clamp(44px, 6vw, 92px)/1 var(--serif); letter-spacing: 0.08em; text-transform: uppercase; }

/* =========================================================================
   PHONES
   ========================================================================= */
@media (max-width: 899px) {
  :root { --bar: 60px; }
  .sys { gap: 10px; padding: 0 16px; }
  .sys__avatar { width: 34px; height: 34px; }
  .sys__name { font-size: 15px; }
  .sys__title, .sys__nav .sys__btn span, .sys__clock { display: none; }
  .sys__nav { gap: 6px; }
  .sys__btn { width: 40px; height: 40px; justify-content: center; }
  .sys__lvl { padding: 4px 8px; letter-spacing: .06em; }
  .sys__lvl-k { display: none; }
  .sys__tro { padding: 4px; }
  .sys__tro svg { width: 22px; height: 22px; }
  .sys__tro b { font-size: 16px; }
  .lib-on .shelf { top: 62px; }
  .lib-on .shelf__row { gap: 12px; padding: 4px 16px 16px 8px; scroll-snap-type: x mandatory; }
  .lib-on .shelf__row > li { scroll-snap-align: start; }
  .tile { --s: 76px; gap: 8px; width: auto; margin-top: 10px; padding: 6px; }
  .tile.is-focus .tile__frame { width: 96px; height: 96px; }
  .tile[data-size="sm"] { --s: 64px; }
  .tile[data-size="sm"].is-focus .tile__frame { width: 80px; height: 80px; }
  .tile__frame::after { inset: -6px; border-width: 2px; }
  .tile__name { font-size: 12px; }
  .tile.is-focus .tile__name { font-size: 13px; }
  .tile__tag { display: none; }
  .plate__img, .plate__loop, .intro__art img { object-position: var(--fx, 62%) 50%; }
  .stage__shade { background: linear-gradient(180deg, rgba(10, 15, 13, .8) 0%, rgba(10, 15, 13, .05) 18%, rgba(10, 15, 13, .05) 30%, rgba(10, 15, 13, .55) 52%, rgba(10, 15, 13, .96) 72%); }
  .lib-on .title__head { left: 16px; right: 16px; width: auto; bottom: 86px; }
  .title__logo { font-size: clamp(32px, 10vw, 44px); letter-spacing: 0.08em; }
  .title__role { font-size: 13px; margin-top: 8px; }
  .title__sum { font-size: 15px; margin-top: 10px; }
  .title__stats { margin-top: 16px; }
  .stat { padding-right: 16px; margin-right: 16px; }
  .stat dd { font-size: 34px; }
  .stat dt { font-size: 12px; }
  .lib-on .title__acts { position: fixed; z-index: 3; left: 0; right: 0; bottom: 0; margin: 0; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--lacquer); box-shadow: inset 0 1px 0 var(--hair-2); flex-wrap: nowrap; }
  .lib-on .title__acts .btn { flex: 1; min-width: 0; padding: 0 10px; font-size: 15px; }
  .lib-on .title__acts .btn--primary { flex: 1.3; }
  .lib-on .hud-trophies, .lib-on .legend { display: none; }
  .lib-on article.title.is-open .title__acts { position: static; background: none; box-shadow: none; padding: 0; margin-top: 24px; flex-wrap: wrap; }
  .lib-on article.title.is-open .title__head { margin: 0 16px; padding-top: 78px; }
  .lib-on article.title.is-open .title__body > * { margin-left: 16px; margin-right: 16px; }
  .tabs { overflow-x: auto; scrollbar-width: none; margin-top: 26px; }
  .tabs .key { display: none; }
  .title__back, .screen__back { top: 12px; left: 10px; }
  .lib-on .screen.is-open { padding: 76px 16px 60px; }
  .profile__grid { grid-template-columns: 1fr; gap: 26px; }
  .profile__portrait { max-width: 360px; }
  .demo { grid-template-columns: 1fr; }
  .toasts { top: 70px; right: 16px; left: 16px; }
  .toast { width: auto; }
  .intro__scene { bottom: 48px; }
  .intro__logo { font-size: clamp(46px, 14vw, 64px); }
  .intro__press { margin-top: 30px; }
  .intro__start .btn { flex: 1; }
  .intro__shade { background: linear-gradient(0deg, rgba(10, 15, 13, .94) 0%, rgba(10, 15, 13, .7) 40%, rgba(10, 15, 13, .1) 75%); }
  .deck__top { padding: 12px 16px; }
}
@media (max-width: 899px) and (max-height: 700px) {
  .title__sum { display: none; }
}

/* =========================================================================
   MOTION PREFERENCES
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .15s !important; }
  .plate.is-on, .intro__art img { animation: none; }
  .stage__grain { animation: none; }
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .5s; animation-timing-function: var(--ease); }

/* the sale desk's steps beside the phone: the current one is lit as you play */
.steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 4px; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 10px 0 10px 40px; color: var(--ash); font-size: 15px; line-height: 1.45; border-bottom: 1px solid var(--hair); transition: color .4s var(--ease); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 10px; width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--hair-2); border-radius: 50%; font: 500 12px/1 var(--sans); }
.steps li b { color: var(--bone-2); font-weight: 500; }
.steps li.is-now { color: var(--bone); }
.steps li.is-now b { color: var(--bone); }
.steps li.is-now::before { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.steps li.is-done::before { background: var(--bottle); border-color: var(--bottle-2); color: var(--bone); }
.demo .iphone { margin: 0; }
@media (max-width: 899px) { .demo .iphone { width: 280px; height: 580px; } }

/* ---------- open layers own the screen ---------- */
.title-open .hud-trophies, .screen-open .hud-trophies { visibility: hidden; animation: none; }
.title-open .sys__me, .title-open .sys__lvl, .title-open .sys__tro, .screen-open .sys__me, .screen-open .sys__lvl, .screen-open .sys__tro { visibility: hidden; }
.lib-on.screen-open article.title:not(.is-open) { display: none; }
.lib-on .screen.is-open { background: rgba(10, 15, 13, 0.9); }
.tabs a { white-space: nowrap; }
.sys__name { white-space: nowrap; }
@media (max-width: 899px) {
  .intro__logo { font-size: clamp(38px, 11.4vw, 60px); letter-spacing: 0.06em; }
  .intro__logo span:last-child { letter-spacing: 0.04em; }
  .intro__h { font-size: clamp(32px, 10vw, 48px); }
  .title__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 0; }
  .stat { margin: 0; padding: 0 12px 0 0; border-right: 0; max-width: none; }
  .stat + .stat { padding-left: 12px; border-left: 1px solid var(--hair-2); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat dd { font-size: 30px; }
}
@media (max-width: 430px) {
  .sys__lvl { display: none; }
  .sys__name { font-size: 14px; }
}

/* status toasts stack their title over the line; the title screen keeps Skip legible over bright art */
.toast--status { flex-direction: column; align-items: flex-start; gap: 0; }
.toast--status .toast__s { margin-top: 4px; }
/* the name runs to about 0.65 of the width, across the car row: the side shade holds through it, then lets the lot read */
.intro:not(.is-started) .intro__shade { background: linear-gradient(180deg, rgba(10, 15, 13, .8) 0%, rgba(10, 15, 13, .55) 8%, rgba(10, 15, 13, 0) 22%), linear-gradient(90deg, rgba(10, 15, 13, .82) 0%, rgba(10, 15, 13, .64) 50%, rgba(10, 15, 13, .5) 64%, rgba(10, 15, 13, .05) 84%), linear-gradient(0deg, rgba(10, 15, 13, .75) 0%, rgba(10, 15, 13, 0) 45%); }
@media (max-width: 899px) { .intro:not(.is-started) .intro__shade { background: linear-gradient(180deg, rgba(10, 15, 13, .82) 0%, rgba(10, 15, 13, .7) 7%, rgba(10, 15, 13, 0) 22%), linear-gradient(0deg, rgba(10, 15, 13, .94) 0%, rgba(10, 15, 13, .7) 40%, rgba(10, 15, 13, .1) 75%); } }

/* finish review: the focused tile carries two corner ticks outside its ring */
.tile__frame::before { content: ""; position: absolute; inset: -14px; pointer-events: none; opacity: 0; transition: opacity .36s var(--ease);
  background: linear-gradient(var(--bone), var(--bone)) right top / 12px 2px no-repeat, linear-gradient(var(--bone), var(--bone)) right top / 2px 12px no-repeat,
    linear-gradient(var(--bone), var(--bone)) left bottom / 12px 2px no-repeat, linear-gradient(var(--bone), var(--bone)) left bottom / 2px 12px no-repeat; }
.tile.is-focus .tile__frame::before { opacity: 1; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 899px) {
  .tile__frame::before { inset: -11px; }
  .tile.is-focus { gap: 16px; }
  .lib-on .shelf__row { padding-top: 12px; }
  /* a transform left on these would capture the fixed action bar; on a phone they only fade */
  .lib-on .title__head, .lib-on .screen.is-open, .lib-on .hud-trophies { animation-name: fade; }
  .profile .title__acts { position: static; flex-wrap: wrap; background: none; box-shadow: none; padding: 0; }
  .loadout > div { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 430px) {
  .sys__tro b { display: none; }
}

/* ---------- the focused title never rides up under the library row ----------
   It hangs from the foot of the screen, but its top is held below the row's bottom
   edge: the head is a column from there down and the logotype's auto margin takes
   the slack. Four numbers share one row on a wide screen; a short screen scales the
   tiles, the logotype and the numerals with its height. */
@media (min-width: 900px) {
  .lib-on article.title:not(.is-open) .title__head { top: calc(var(--shelf-b) + 14px); bottom: var(--head-b); display: flex; flex-direction: column; align-items: flex-start; }
  .lib-on article.title:not(.is-open) .title__logo { margin-top: auto; }
}
@media (min-width: 900px) {
  .lib-on article.title:not(.is-open) .title__stats:has(> .stat:nth-child(4)) { flex-wrap: nowrap; }
  .lib-on article.title:not(.is-open) .title__stats:has(> .stat:nth-child(4)) .stat { padding-right: clamp(14px, 1.6vw, 22px); margin-right: clamp(14px, 1.6vw, 22px); }
  .lib-on article.title:not(.is-open) .title__stats:has(> .stat:nth-child(4)) .stat:last-child { padding-right: 0; margin-right: 0; }
  .lib-on article.title:not(.is-open) .title__stats:has(> .stat:nth-child(4)) .stat dd { font-size: clamp(30px, min(2.7vw, 5.2vh), 48px); }
}
/* a laptop narrower than the head's full measure: the head takes the room the trophies leave it */
@media (min-width: 900px) and (max-width: 1199px) {
  .lib-on article.title:not(.is-open) .title__head { width: min(780px, 64vw, calc(100vw - 2 * var(--pad) - 274px)); }
  .lib-on article.title:not(.is-open) .stat dt { font-size: 13px; }
}
@media (min-width: 900px) and (max-height: 860px) {
  :root { --tile: clamp(100px, 15.4vh, 136px); --tile-f: calc(var(--tile) * 1.19); --head-b: clamp(84px, 12vh, 112px); }
  .lib-on article.title:not(.is-open) .title__logo { font-size: clamp(38px, min(4.6vw, 6.6vh), 76px); }
  .lib-on article.title:not(.is-open) :is(.title__role, .title__sum) { margin-top: 10px; }
  .lib-on article.title:not(.is-open) .title__sum { font-size: 16px; }
  .lib-on article.title:not(.is-open) .title__stats { margin-top: 16px; }
  .lib-on article.title:not(.is-open) .stat dd { font-size: clamp(32px, min(3.6vw, 5.2vh), 56px); }
  .lib-on article.title:not(.is-open) .title__acts { margin-top: 22px; }
}
/* a laptop with its browser chrome (a viewport about 650 tall): the title takes the room the control legend held; the controls stay a ? away, in the help sheet */
@media (min-width: 900px) and (max-height: 700px) {
  :root { --tile: clamp(84px, 15.4vh, 136px); --head-b: 40px; }
  .lib-on .legend { display: none; }
}
@media (min-width: 900px) and (max-height: 620px) {
  .lib-on article.title:not(.is-open) .title__role { display: none; }
}

/* =========================================================================
   THE LOADING SCREEN (tools/art/boot.py draws it, tools/site/boot.js runs it)
   The Triple J lot as a fine bone line drawing, laid over the same composition
   as the title screen's key art. Each stroke draws over its own stretch of the
   real loading progress (--p, 0 to 1); then the lamps light and it dissolves
   into the photo of the lot it was drawing. Only while html.intro-pending.
   ========================================================================= */
.boot { display: none; }
html.intro-pending .boot { display: block; position: fixed; inset: 0; z-index: 260; background: var(--ink); color: var(--bone); container-type: size; transition: opacity .7s var(--ease); }
.boot.is-out { opacity: 0; pointer-events: none; }
/* cover, anchored like the title screen's art (object-position 62% 50%) */
.boot__draw { position: absolute; width: max(100cqw, 177.78cqh); height: max(56.25cqw, 100cqh); left: calc((100cqw - max(100cqw, 177.78cqh)) * .62); top: calc((100cqh - max(56.25cqw, 100cqh)) * .5); transition: transform 1.2s var(--ease); }
.boot.is-out .boot__draw { transform: scale(1.02); }
/* a phone's title art is the right of the frame, from the main lamp to the showroom */
@media (max-width: 759px) and (max-aspect-ratio: 3/4) {
  .boot__draw { width: 177.78cqh; height: 100cqh; top: 0; left: calc((100cqw - 75cqh) * .62 - 102.78cqh); }
}
.boot__lines path { fill: none; stroke: var(--bone); stroke-width: 1.7; stroke-linejoin: round; stroke-dasharray: 1 2;
  stroke-dashoffset: calc(1 - clamp(0, (var(--p, 0) - var(--a)) / (var(--b) - var(--a)), 1)); }
.boot__lines path.solid { fill: var(--ink); fill-opacity: clamp(0, (var(--p, 0) - var(--a)) * 30, 1); }
.boot__lines path.thin { stroke-width: 1.2; stroke: var(--bone-2); opacity: .72; }
.boot__lines path.lamp { transition: fill .5s var(--ease); }
.boot.is-lit .boot__lines path.lamp { fill: rgba(237, 231, 219, .5); }
.boot__lit { opacity: 0; transition: opacity .5s var(--ease); }
.boot__lit circle:not([fill]) { fill: var(--bone); }
.boot__wet { fill: none; stroke: var(--bone); stroke-opacity: .24; stroke-width: 2.4; stroke-dasharray: 10 16; }
.boot.is-lit .boot__lit { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .boot__draw, .boot.is-out .boot__draw { transform: none; } }

.intro__textbtn { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 0; background: none; border: 0; color: var(--bone-2); font: 500 15px/1 var(--sans); letter-spacing: .01em; cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .3em; transition: color .3s var(--ease), text-decoration-color .3s var(--ease); }
.intro__textbtn:hover { color: var(--bone); text-decoration-color: var(--bone); }
.intro__textbtn svg { width: 18px; height: 18px; }

