  :root {
    color-scheme: light;
    --bg: #ffffff; --fg: #111; --muted: #6b6b6b; --line: #e3e3e3; --soft: #f4f4f4;
    --radius: 0; --max: 1240px;
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 system-ui, -apple-system, Segoe UI, sans-serif; }
  a { color: inherit; }
  img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
  button { font: inherit; color: inherit; }
  .wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
  .muted { color: var(--muted); }
  h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; }
  h1 { font-size: clamp(28px, 4.5vw, 44px); }
  h2 { font-size: 22px; }
  section { padding: 32px 0; }
  .row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
  .row-head a { font-size: 14px; }

  /* ---------- header ---------- */
  header.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
  .bar { display: flex; align-items: center; gap: 18px; height: 60px; }
  .logo { font-weight: 700; text-decoration: none; white-space: nowrap; }
  nav.main { display: flex; gap: 4px; margin-left: auto; }
  nav.main a { text-decoration: none; padding: 6px 10px; border-radius: var(--radius); color: var(--muted); white-space: nowrap; }
  nav.main a.on, nav.main a:hover { color: var(--fg); background: var(--soft); }

  /* ---------- controls ---------- */
  .btn { display: inline-block; padding: 10px 18px; border-radius: var(--radius); border: 1px solid var(--fg); background: var(--fg); color: var(--bg); text-decoration: none; cursor: pointer; white-space: nowrap; text-align: center; }
  .btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
  .btn.small { padding: 6px 12px; font-size: 14px; }
  .btn.block { display: block; width: 100%; }
  .btn.big { padding: 14px 22px; font-size: 17px; }
  .controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

  /* ---------- cards ---------- */
  .grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .version-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
  .version-list a { text-decoration: none; font-size: 14px; font-weight: 600; }
  .version-list img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; image-rendering: pixelated; outline: 1px solid var(--line); margin-bottom: 6px; }
  .version-list a:hover img { outline: 2px solid var(--fg); }
  .grid.packs { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 24px; }
  .grid.packs .card .meta { font-size: 18px; padding-top: 10px; align-items: baseline; }
  .grid.packs .card .meta .muted { font-size: 15px; }
  body.phone .grid.scenes { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .card { text-decoration: none; display: block; }
  .card .art { border-radius: var(--radius); overflow: hidden; background: var(--soft); outline: 1px solid var(--line); position: relative; }
  .card:hover .art { outline: 2px solid var(--fg); }
  .card .meta { display: flex; justify-content: space-between; gap: 8px; padding: 6px 2px 0; font-size: 14px; }
  .badge { position: absolute; top: 8px; left: 8px; background: var(--bg); font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 4px; }
  .crumbs { font-size: 13px; color: var(--muted); padding-top: 18px; }
  .crumbs a { color: var(--muted); }
  .price { font-size: 34px; font-weight: 700; line-height: 1; }
  .facts { list-style: none; padding: 0; margin: 14px 0; font-size: 14px; }
  .facts li { padding: 4px 0; }
  .facts li::before { content: "✓  "; color: var(--muted); }
  table { border-collapse: collapse; width: 100%; font-size: 14px; }
  td, th { text-align: left; padding: 9px 6px; border-top: 1px solid var(--line); }
  details { border-top: 1px solid var(--line); padding: 12px 0; }
  summary { cursor: pointer; font-weight: 600; }

  /* ---------- home hero: one big scene you can flick through ---------- */
  .hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: center; padding-top: 32px; }
  .viewer { display: block; border-radius: var(--radius); overflow: hidden; outline: 1px solid var(--line); background: var(--soft); }
  .viewer-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 14px; gap: 10px; }
  .arrow { border: 1px solid var(--line); background: var(--bg); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; flex: none; }
  @media (max-width: 760px) {
    .hero { grid-template-columns: 1fr; }
    .viewer-wrap { max-width: 300px; width: 100%; margin-left: auto; margin-right: auto; }  /* phone screens get the phone picture */
  }

  /* ---------- pack page ---------- */
  .pack-hero { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: start; padding-top: 16px; }
  .buybox { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: 80px; }
  .fit { display: grid; grid-template-columns: 3fr 1fr; gap: 20px; align-items: end; max-width: 820px; }
  .fit figure { margin: 0; } .fit figcaption { font-size: 13px; color: var(--muted); padding-top: 6px; }
  @media (max-width: 860px) { .pack-hero { grid-template-columns: 1fr; } .buybox { position: static; } }

  /* sticky buy bar (phones only) */
  .buybar { display: none; }
  @media (max-width: 760px) {
    .buybar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--bg); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); gap: 12px; align-items: center; justify-content: space-between; }
    body.has-buybar { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  }

  /* ---------- scene page ---------- */
  .detail { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; padding-top: 16px; align-items: start; }
  .stage { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; min-height: 340px; }
  .lock { position: absolute; inset: 0; color: #fff; text-align: center; padding-top: 18%; text-shadow: 0 1px 3px rgba(0,0,0,.6); pointer-events: none; display: none; }
  .lock big { display: block; font-size: 52px; font-weight: 600; line-height: 1; }
  .show-lock .lock { display: block; }

  /* ---------- iPhone-style frame ---------- */
  .iphone { position: relative; width: min(280px, 100%); margin: 0 auto; padding: 3.4%; border-radius: 17% / 8%;
    background: #0a0a0b; container-type: inline-size;
    box-shadow: 0 0 0 1.5px #3c3c41, 0 0 0 3.5px #b4b4ba, 0 0 0 5px #67676d,
                0 40px 60px -28px rgba(0,0,0,.55), 0 14px 22px -12px rgba(0,0,0,.35); }
  .iphone .side { position: absolute; width: 4px; border-radius: 2px; background: linear-gradient(90deg, #6d6d73, #c2c2c7, #7a7a80); }
  .iphone .b-action { left: -8px; top: 17%; height: 4.5%; }
  .iphone .b-volup { left: -8px; top: 25%; height: 8%; }
  .iphone .b-voldown { left: -8px; top: 35%; height: 8%; }
  .iphone .b-power { right: -8px; top: 27%; height: 12%; }
  .iphone-screen { position: relative; overflow: hidden; border-radius: 13% / 6%; aspect-ratio: 220 / 478; background: #000; }
  .iphone-screen > img { width: 100%; height: 100%; object-fit: cover; }
  .iphone-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(118deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.04) 28%, rgba(255,255,255,0) 40%); }
  .iphone .island { position: absolute; top: 2.3%; left: 50%; transform: translateX(-50%); width: 31%; height: 4.3%; background: #000; border-radius: 999px; z-index: 2; }
  .iphone .status { position: absolute; top: 2.5%; left: 0; right: 0; height: 4.1%; padding: 0 8% 0 11%; display: flex; align-items: center; justify-content: space-between;
    color: #fff; font: 600 4.6cqw/1 -apple-system, "SF Pro Text", system-ui, sans-serif; z-index: 2; text-shadow: 0 0 6px rgba(0,0,0,.25); }
  .iphone .status .icons { display: flex; gap: 1.6cqw; align-items: center; }
  .iphone .status svg { height: 3.6cqw; width: auto; fill: currentColor; }
  .iphone .lock { padding: 0; text-shadow: 0 1px 10px rgba(0,0,0,.35); font-family: -apple-system, "SF Pro Display", system-ui, sans-serif; }
  .iphone .lock small { display: block; margin-top: 15%; font-size: 5.4cqw; font-weight: 600; }
  .iphone .lock big { display: block; font-size: 23cqw; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
  .iphone .lock .qa { position: absolute; bottom: 5%; width: 13cqw; height: 13cqw; border-radius: 50%; background: rgba(20,20,24,.45); backdrop-filter: blur(6px); }
  .iphone .lock .qa.left { left: 11%; } .iphone .lock .qa.right { right: 11%; }
  .iphone .home-ind { position: absolute; bottom: 1.3%; left: 50%; transform: translateX(-50%); width: 36%; height: 1cqw; min-height: 3px; border-radius: 999px; background: rgba(255,255,255,.92); z-index: 2; }

  /* ---------- desktop monitor frame ---------- */
  .monitor { width: 100%; max-width: 720px; margin: 0 auto; container-type: inline-size; }
  .monitor-screen { padding: 1.5cqw; border-radius: 1.6cqw; background: #0b0b0c;
    box-shadow: 0 0 0 .3cqw #d0d0d4, 0 0 0 .5cqw #8d8d92, 0 34px 50px -30px rgba(0,0,0,.5); }
  .monitor-inner { position: relative; overflow: hidden; border-radius: .35cqw; }
  .monitor-inner > img { aspect-ratio: 16 / 9; object-fit: cover; }
  .monitor-inner::after { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(115deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,0) 32%); }
  .monitor-neck { width: 16%; height: 9cqw; margin: 0 auto; background: linear-gradient(90deg, #a3a3a8, #ececef 45%, #b9b9be 60%, #a3a3a8);
    clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%); }
  .monitor-base { width: 32%; height: 1.3cqw; min-height: 5px; margin: 0 auto; border-radius: .7cqw .7cqw .3cqw .3cqw;
    background: linear-gradient(#f0f0f2, #a2a2a7); box-shadow: 0 8px 14px -8px rgba(0,0,0,.45); }
  .monitor .lock.desk { padding: 0; text-shadow: none; text-align: left; }
  .monitor .menubar { height: 3.2cqw; display: flex; justify-content: space-between; align-items: center; padding: 0 1.4cqw;
    background: rgba(255,255,255,.28); backdrop-filter: blur(10px); color: #111; font: 500 1.55cqw/1 -apple-system, system-ui, sans-serif; }
  .monitor .menubar .icons { display: flex; gap: 1cqw; align-items: center; }
  .monitor .menubar svg { height: 1.4cqw; width: auto; fill: currentColor; }
  .monitor .dock { position: absolute; bottom: 1.2cqw; left: 50%; transform: translateX(-50%); display: flex; gap: .8cqw; padding: .8cqw;
    border-radius: 1.6cqw; background: rgba(255,255,255,.3); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
  .monitor .dock i { width: 4.2cqw; height: 4.2cqw; border-radius: 1.1cqw; background: linear-gradient(160deg, rgba(255,255,255,.9), rgba(255,255,255,.55)); }
  .fit .iphone { width: 100%; }
  .stage:has(.monitor), .stage:has(.device3d) { min-height: 0; }

  /* ---------- 3D device frames (devices3d.js) ---------- */
  .device3d { position: relative; margin: 0 auto; touch-action: pan-y; }
  .device3d.phone { width: min(300px, 100%); aspect-ratio: 0.62; }
  .device3d.desktop { width: 100%; max-width: 760px; aspect-ratio: 1.32; }
  .device3d .fallback { position: absolute; inset: 0; display: grid; place-items: center; }
  .device3d.phone .fallback .iphone { width: 74%; }
  .device3d.ready .fallback { visibility: hidden; }
  .device3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .5s ease; }
  .device3d.ready canvas { opacity: 1; }
  .device3d.phone canvas { filter: drop-shadow(0 26px 26px rgba(20,16,40,.22)) drop-shadow(0 6px 8px rgba(20,16,40,.12)); }
  .fit .device3d.phone { width: 100%; }
  .stage-tools { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; align-items: center; font-size: 14px; }
  .panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-top: 14px; }
  .panel h3 { font-size: 15px; }
  .pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: 14px; }
  @media (max-width: 860px) { .detail { grid-template-columns: 1fr; } }

  /* ---------- reassurance + phone-only hiding ---------- */
  .trust { font-size: 13px; color: var(--muted); margin: 8px 0 0; }

  /* ---------- home intro ---------- */
  .intro { padding: 28px 0 0; }
  .intro h1 { max-width: 760px; }
  .featured-name { font-size: clamp(26px, 3.5vw, 36px); }

  /* ---------- footer ---------- */
  footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 0 40px; font-size: 14px; }
  .fcols { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 20px; }
  .fcols h4 { margin: 0 0 8px; font-size: 14px; }
  .fcols a { display: block; text-decoration: none; padding: 2px 0; }
  .fcols a:hover { text-decoration: underline; }

/* Approved Mix theme */
  :root { --bg: #ffffff; --fg: #121726; --muted: #5a6275; --line: #e3e8f4; --soft: #f5f7fc;
    --btn-r: 999px; --grid: #f1f3f8; --buy: #7b5cff; --sticker-ink: #17141f; --radius: 0px; }
  :root {
    --f-body: 'Outfit', system-ui, sans-serif; --f-head: 'Outfit', system-ui, sans-serif; --head-w: 600; --head-ls: -0.02em;
    --f-label: 'Outfit', sans-serif; --f-pixel: 'Silkscreen', monospace; --pixel-w: 400; --price-size: 38px; }
  /* grid is faint and larger so it never fights the pixel art */
  body { font-family: var(--f-body);
    background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 24px 24px; }
  :is(h1, h2, h3, .featured-name, .buybox h1, .detail h1, .fcols h4) { font-family: var(--f-head); font-weight: var(--head-w); letter-spacing: var(--head-ls); }
  .logo { font-family: var(--f-pixel); font-weight: var(--pixel-w); letter-spacing: 0; }
  /* price in the normal font (Kofi didn't like the pixel £) */
  .price { font-family: var(--f-body); font-weight: 700; letter-spacing: -0.02em; font-size: var(--price-size); }
  :is(.card .meta, .count, .crumbs) { font-family: var(--f-label); font-size: 13px; }
  header.top { background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); }
  nav.main a { color: var(--fg); }
  nav.main a:is(.on, :hover) { background: none; text-decoration: underline; text-underline-offset: 6px; }

  /* clean surfaces: no borders, white boxes so text reads over the grid */
  :is(.card .art, .viewer) { outline: 0; border: 0; border-radius: 0; background: var(--soft); }
  .card:hover .art { outline: 0; box-shadow: 0 0 0 2px var(--fg); }
  :is(.buybox, .panel) { border: 0; border-radius: 0; background: #fff; box-shadow: 0 0 0 1px var(--line); }
  .stage { border: 0; border-radius: 0; background: rgba(255,255,255,.7); }
  :is(td, th, details) { border-top: 1px solid var(--line); }
  table, details { background: rgba(255,255,255,.85); }
  .facts li::before { content: "✓  "; color: var(--muted); }

  /* main Buy buttons: Sticker style */
  .btn:not(.ghost) { background: var(--buy); color: #fff; border: 2px solid var(--sticker-ink); border-radius: var(--btn-r); box-shadow: 0 4px 0 var(--sticker-ink); font-weight: 700; }
  .btn:not(.ghost):hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--sticker-ink); }

  /* everything secondary: Retro OS bevelled buttons */
  :is(.btn.ghost, .arrow) { background: #ececec; color: #111; border: 2px solid #111; border-radius: var(--btn-r);
    box-shadow: inset 0 -3px 0 #9a9a9a, inset 0 2px 0 #fff; font-weight: 600; }

  :is(.btn.ghost, .arrow):active { background: #d6d6d6; color: #111; box-shadow: inset 0 3px 0 #9a9a9a; }
  .controls { gap: 16px; }
  /* grouped choices (All / Day / Night, Desktop / Phone): one sunken tray per group,
     the chosen option is a raised white button inside it */
  .seg { display: inline-flex; gap: 4px; padding: 4px; background: #ececec; border: 2px solid #111;
    border-radius: var(--btn-r); box-shadow: inset 0 2px 0 #cfcfcf; }
  .seg > :is(a, button) { border: 0; background: none; border-radius: var(--btn-r); padding: 7px 18px;
    font: 600 14px/1.2 var(--f-body); color: #5a5a5a; text-decoration: none; cursor: pointer; box-shadow: none; white-space: nowrap; }
  .seg > :is(a, button):hover { color: #111; background: rgba(0,0,0,.06); }
  .seg > .on, .seg > .on:hover { background: #fff; color: #111; box-shadow: 0 0 0 2px #111, 0 3px 0 #111; }
  @media (max-width: 480px) { .seg > :is(a, button) { padding: 7px 12px; } .controls { gap: 10px; } }

  .badge { background: #fff; border: 1px solid var(--sticker-ink); border-radius: var(--btn-r); font-family: var(--f-label); }
  footer { background: rgba(255,255,255,.94); border-top: 1px solid var(--line); }
  .buybar { background: #fff; border-top: 1px solid var(--line); }

.logo .sprout { display: inline-block; width: 32px; height: 40px; margin-right: 8px; vertical-align: -13px; }
[hidden] { display: none !important; }
html:not(.enhanced) [data-js] { display: none; }
img[data-phone] { aspect-ratio: 16 / 9; }
body.phone img[data-phone] { aspect-ratio: 220 / 478; }
.artwork { display: block; }
.artwork[data-device="phone"] { width: min(100%, calc(68svh * 220 / 478)); margin-inline: auto; }
.scene-media .artwork img { aspect-ratio: 16 / 9; }
.artwork[data-device="phone"] img { aspect-ratio: 220 / 478; }
.viewer-wrap[data-device="phone"] .viewer-nav { max-width: 340px; margin-inline: auto; }
.viewer-nav .count { text-align: center; }
@media (max-width: 760px) {
  .scene-media .artwork:not([data-device]) { width: min(100%, calc(68svh * 220 / 478)); margin-inline: auto; }
  .scene-media .artwork:not([data-device]) img { aspect-ratio: 220 / 478; }
  .bar { gap: 8px; }
  .buybar { flex-wrap: wrap; }
  .buybar .trust { flex-basis: 100%; margin: -5px 0 0; }
}
@media (max-width: 360px) {
  .grid.scenes { grid-template-columns: minmax(0, 1fr); }
  body.phone .grid.scenes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
:focus-visible { outline: 2px solid #34218e; outline-offset: 4px; }
[id] { scroll-margin-top: 78px; }
.viewer-wrap { scroll-margin-top: 76px; }
.viewer-scene-link { text-align: center; margin: 8px 0 0; font-size: 14px; }

/* Keep the decision and its action together, ahead of the artwork on narrow screens. */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hero-copy, .buybox { grid-column: 2; grid-row: 1; }
.hero > .viewer-wrap, .pack-hero > .viewer-wrap { grid-column: 1; grid-row: 1; }
.scene-copy { grid-column: 2; grid-row: 1; min-width: 0; }
.scene-preview { grid-column: 1; grid-row: 1; min-width: 0; }
.pack-links { font-size: 14px; }
.scene-guide { margin: -4px 0 16px; }
.scene-copy h2, .versions h2 { font-size: 18px; }
.scene-pack p { margin: 4px 0 12px; }
.sample-pack { font-size: 14px; margin: 12px 0 0; }
.sample-downloads { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 4px; }
.sample-downloads span { display: block; margin-top: 4px; font-size: 13px; text-align: center; }
@media (max-width: 860px) {
  .buybox, .pack-hero > .viewer-wrap, .scene-copy, .scene-preview { grid-column: 1; grid-row: auto; }
}
@media (max-width: 760px) {
  .hero-copy, .hero > .viewer-wrap { grid-column: 1; grid-row: auto; }
  .hero, .detail, .pack-hero { gap: 24px; }
  .hero-copy .actions { gap: 8px; }
  .hero-copy .actions .btn { padding: 12px 16px; font-size: 15px; }
  .sample-downloads .btn { padding-inline: 10px; font-size: 13px; }
}

.preview-note { margin: 8px 0 0; text-align: center; font-size: 13px; }
.media-controls { justify-content: center; margin: 0 0 16px; }
.scene-media .stage { background: transparent; padding: 0; }
.overlay-control { display: flex; width: fit-content; gap: 6px; align-items: center; margin: 12px auto 0; font-size: 14px; }
.pack-hero .stage .device3d.desktop { max-width: 620px; }
