/* APN PLAY: components and pages. Tokens and the shell live in base.css. */
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--crimson-fill); color: #fff; padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.fine { font-size: 12.5px; color: var(--subtle); line-height: 1.5; }
.fine a, .lead a, .seo-block a, .legal a, .ps-note .link { color: var(--crimson-text); }
.link { color: var(--crimson-text); font-weight: 600; }
@media (hover: hover) { .link:hover { text-decoration: underline; } }
.lead { font-size: 16px; line-height: 1.6; color: var(--muted); max-width: 760px; margin: 8px 0 0; }
.h-sec { font: 800 20px/1.2 var(--f-display); margin: 0 0 12px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px; }
.btn-white { background: #fff; color: #1d1d1f; }
.btn.wide { width: 100%; }
.btn-play { height: 52px; padding: 0 32px; font-size: 17px; background: var(--crimson-fill); color: #fff; box-shadow: 0 8px 28px rgba(252, 18, 67, .35); }
@media (hover: hover) { .btn-play:hover { filter: brightness(1.04); transform: translateY(-1px); } }
.btn-play .ico { width: 18px; height: 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--raised); color: var(--text); font-weight: 600; font-size: 13px; text-transform: capitalize; border: 1px solid transparent; }
.chip span { color: var(--muted); font-weight: 600; }
@media (hover: hover) { .chip:hover { background: var(--raised-2); } }
.chip.on { background: var(--text); color: var(--canvas); }
.chip:disabled { opacity: .45; cursor: not-allowed; }
.pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: 11.5px; font-weight: 700; }

/* Search panel */
.search-panel { position: absolute; top: 46px; left: 0; right: 0; background: var(--raised); border: 1px solid var(--line-strong); border-radius: 16px; padding: 8px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); max-height: min(70vh, 560px); overflow: auto; }
.sp-h { padding: 8px 10px 4px; font-size: 12px; font-weight: 700; color: var(--subtle); text-transform: uppercase; letter-spacing: .04em; }
.sp-item { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 10px; }
.sp-item img { width: 64px; height: 36px; border-radius: 6px; object-fit: cover; background: var(--raised-2); }
.sp-item b { font-weight: 700; display: block; }
.sp-item small { color: var(--muted); }
.sp-item[aria-selected="true"], .sp-item:hover { background: var(--hover); }
.sp-cats { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 10px 10px; }
.sp-empty { padding: 16px 10px; color: var(--muted); }
.sp-all { display: block; padding: 10px; text-align: center; font-weight: 700; color: var(--crimson-text); border-top: 1px solid var(--line); margin-top: 6px; }
.who .avatar { cursor: pointer; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--crimson), var(--crimson-deep)); color: #fff; font-weight: 800; }
.acct-head .avatar { width: 64px; height: 64px; font-size: 24px; }
.who-menu { position: absolute; right: 12px; top: 56px; width: 260px; background: var(--raised); border: 1px solid var(--line-strong); border-radius: 14px; padding: 8px; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.who-menu a, .who-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: 8px; font-weight: 600; }
.who-menu a:hover, .who-menu button:hover { background: var(--hover); }
.who-menu .wm-xp { padding: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.who-menu .wm-xp b { display: block; }

/* Cards */
.card { position: relative; display: block; border-radius: var(--r-l); outline-offset: 3px; isolation: isolate; }
.card-img { display: block; position: relative; border-radius: var(--r-l); overflow: hidden; background: var(--cover-wait); aspect-ratio: 16 / 9; }
.c-sq .card-img { aspect-ratio: 1; }
.c-tall .card-img { aspect-ratio: 2 / 3; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s; }
.card.playing .card-img video { opacity: 1; }
.ob-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s; }
.ob-card.playing video { opacity: 1; }
.card-name { display: none; }
.badge { position: absolute; top: -6px; left: -6px; z-index: 2; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.badge + .badge { left: 24px; }
.badge .ico { width: 15px; height: 15px; }
.b-original { background: var(--crimson-fill); }
.b-new { background: #7c3aed; }
.b-updated { background: #2563eb; }
.b-kids { background: #16a34a; }
.card-hover { position: absolute; inset: 0; border-radius: var(--r-l); display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 10px 12px; background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, 0) 58%); opacity: 0; transition: opacity var(--t-fast); pointer-events: none; overflow: hidden; }
.hc-title { font-weight: 800; font-size: 14px; line-height: 1.2; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.hc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 12px; font-weight: 700; }   /* the category, the year (once the site is open) and the likes wrap inside a narrow card; the overlay clips what is left, so it never widens the page */
.hc-meta .ico { width: 13px; height: 13px; vertical-align: -2px; }
@media (hover: hover) {
  .card { transition: transform .18s var(--ease); }
  .card:hover { transform: scale(1.06); z-index: 5; }
  .card:hover .card-img { box-shadow: 0 0 0 3px var(--crimson), 0 18px 40px rgba(0, 0, 0, .55); }
  .card:hover .card-hover { opacity: 1; }
  .c-lg:hover { transform: scale(1.03); }
}
.card:focus-visible .card-img { box-shadow: 0 0 0 3px var(--crimson-text); }
.card:active { transform: scale(.98); }

/* Shelves */
.shelf { margin: 0 0 28px; position: relative; }
.shelf-head { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; }
.shelf-head h2 { margin: 0; font: 800 20px/1.2 var(--f-display); }
.shelf-title { display: inline-flex; align-items: center; gap: 2px; }
.shelf-title .ico { width: 20px; height: 20px; color: var(--muted); }
@media (hover: hover) { a.shelf-title:hover .ico { color: var(--text); transform: translateX(2px); } }
.shelf-sub { margin: 0; color: var(--muted); font-size: 13px; }
.shelf-nav { margin-left: auto; display: flex; gap: 6px; }
.shelf-nav .icon-btn { width: 34px; height: 34px; }
.shelf-row { display: grid; grid-auto-flow: column; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 8px 8px 12px; margin: -8px -8px -12px; scroll-padding: 8px; }
.shelf-row::-webkit-scrollbar { display: none; }
.shelf-row > * { scroll-snap-align: start; }
.s-md { grid-auto-columns: 218px; }
.s-sq { grid-auto-columns: 120px; }
.s-tall { grid-auto-columns: 180px; }
.sp-row { grid-auto-columns: auto; gap: 8px; }
.sp-big { width: 440px; }
.sp-quad { display: grid; grid-template-columns: 218px 218px; grid-template-rows: auto auto; gap: 8px; }

/* Continue playing */
.continue { margin: 0 0 24px; }
.continue h2 { margin: 0 0 10px; font: 800 20px/1.2 var(--f-display); }
.cont-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 6px; margin: -6px; }
.cont-row a { flex: none; width: 92px; text-align: center; }
.cont-row img { width: 92px; height: 92px; border-radius: 16px; object-fit: cover; background: var(--raised); }
.cont-row span { display: block; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (hover: hover) { .cont-row a:hover img { box-shadow: 0 0 0 3px var(--crimson); } }

/* Originals band */
.orig-band { margin: 4px 0 32px; padding: 20px; border-radius: 22px; background: radial-gradient(120% 140% at 0% 0%, rgba(252, 18, 67, .22), rgba(252, 18, 67, 0) 55%), linear-gradient(180deg, #171c24, #11161c); border: 1px solid rgba(252, 18, 67, .28); }
.ob-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.ob-mascot { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .45)); transform-origin: 50% 100%; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .ob-head:hover .ob-mascot { animation: apn-jelly 1.1s ease-out infinite; } }
.ob-head h2 { margin: 0; font: 900 26px/1.1 var(--f-display); }
.ob-head h2 a { display: inline-flex; align-items: center; gap: 4px; }
.ob-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ob-card { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--cover-wait); }
.ob-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.ob-info { position: absolute; inset: auto 0 0 0; padding: 40px 14px 12px; background: linear-gradient(to top, rgba(0, 0, 0, .85), transparent); display: grid; gap: 2px; }
.ob-info b { font: 900 18px/1.15 var(--f-display); }
.ob-info span:last-child { font-size: 13px; color: #d7dbe2; }
.ob-status { justify-self: start; padding: 2px 8px; border-radius: 6px; background: var(--crimson-fill); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
@media (hover: hover) { .ob-card:hover img { transform: scale(1.05); } .ob-card:hover { box-shadow: 0 0 0 3px var(--crimson); } }

/* Promo tiles, moods, category tiles */
.promo-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0 0 32px; }
.promo { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 14px; row-gap: 2px; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.promo-ico { grid-row: 1 / 4; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; }
.promo-ico .ico { width: 24px; height: 24px; }
.promo b { font: 800 17px/1.2 var(--f-display); }
.promo > span:not(.promo-ico) { color: var(--muted); font-size: 13.5px; }
.p-lb .promo-ico { background: rgba(245, 184, 61, .16); color: var(--gold); }
.p-kids .promo-ico { background: rgba(63, 207, 142, .16); color: var(--live); }
@media (hover: hover) { .promo:hover { border-color: var(--line-strong); background: var(--raised); } }
.moods { margin: 0 0 32px; }
.mood-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.mood { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.mood-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--crimson-wash); color: var(--crimson-text); display: grid; place-items: center; flex: none; }
.mood b { display: block; font-weight: 800; }
.mood small { color: var(--muted); font-size: 12.5px; line-height: 1.35; display: block; margin-top: 2px; }
@media (hover: hover) { .mood:hover { background: var(--raised); } }
.cat-tiles { margin: 8px 0 32px; }
.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
@media (max-width: 767px) { .ct-grid { grid-template-columns: 1fr 1fr; } }
.ct { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.ct .ico { grid-row: 1 / 3; width: 26px; height: 26px; color: var(--crimson-text); }
.ct b { font-weight: 800; }
.ct span { color: var(--subtle); font-size: 12.5px; }
@media (hover: hover) { .ct:hover { background: var(--raised); } }

/* SEO text blocks */
.seo-block { margin: 40px 0 0; padding: 28px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); max-width: 1100px; }
.seo-block h1 { margin: 0 0 12px; font: 900 28px/1.15 var(--f-display); }
.seo-block h2 { margin: 24px 0 8px; font: 800 18px/1.3 var(--f-display); }
.seo-block p { margin: 0 0 12px; line-height: 1.65; color: #cfd4dc; max-width: 820px; }
.seo-block details { border-top: 1px solid var(--line); padding: 12px 0; }
.seo-block summary { cursor: pointer; font-weight: 700; }
.link-cols { columns: 3 200px; padding: 0; list-style: none; margin: 0; }
.link-cols li { padding: 4px 0; }
.link-cols a { color: var(--muted); }
@media (hover: hover) { .link-cols a:hover { color: var(--text); } }

/* Listing pages */
.list-head { margin: 4px 0 18px; }
.list-head h1 { margin: 6px 0 0; font: 900 32px/1.1 var(--f-display); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; font-size: 13px; font-weight: 600; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--subtle); }
.crumbs a { color: var(--muted); }
@media (hover: hover) { .crumbs a:hover { color: var(--text); } }
.crumbs [aria-current] { color: var(--text); }
.sortbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.sortbar .muted { margin-right: 6px; font-weight: 600; }
.grid { display: grid; gap: 14px 10px; }
.g-md { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.list-grid .card-name { display: block; margin-top: 6px; font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { color: var(--muted); padding: 24px; text-align: center; background: var(--surface); border-radius: 14px; }
.list-copy { margin-top: 36px; }
.seg { display: flex; gap: 6px; margin-top: 12px; }

/* Game page */
.gp { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.gp-main { min-width: 0; }
.frame-wrap { border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--line); }
.frame { position: relative; aspect-ratio: 16 / 9; background: #07090c; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.ps { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.ps-bg { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(28px) saturate(1.2) brightness(.55); transform: scale(1.05); }
.ps-inner { position: relative; display: grid; justify-items: center; gap: 14px; text-align: center; padding: 20px; }
.ps-cover { width: 148px; height: 148px; border-radius: 26px; object-fit: cover; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.ps-title { margin: 0; font: 900 28px/1.1 var(--f-display); text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.ps-note { margin: 0; font-size: 13px; color: #e2e5ea; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.ps-note .ico { width: 16px; height: 16px; }
.ps-note > span { min-width: 0; text-align: center; } /* the sentence is ONE flex item: a button in mid-sentence must not split it into three (W1 picture review, 2026-11-11) */
.ps-warn { margin: 0; display: flex; gap: 8px; align-items: center; color: var(--gold); font-weight: 700; max-width: 320px; }
.ps-loading { position: absolute; inset: 0; display: grid; place-items: center; background: #07090c; }
.ps-loading .bar { width: 200px; height: 6px; border-radius: 3px; background: var(--raised); overflow: hidden; }
.ps-loading .bar span { display: block; height: 100%; width: 0; background: var(--crimson); transition: width .3s; }
.ps-loading p { margin: 12px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
/* A third-party game that was stopped (Paused in a hidden tab, or stopped responding) and a link a game asks to open (launch step 9.4b). Both sit in the page's own frame
   area, inside the full-screen wrapper, so they are on screen whatever the game does. */
.ps-notice { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: #07090c; color: var(--text); }
.ps-notice .ps-title { font-size: 24px; }
.ps-notice .ps-note { max-width: 360px; justify-content: center; text-align: center; }
.ps-link { position: absolute; left: 12px; right: 12px; top: 12px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line-strong); box-shadow: 0 12px 32px rgba(0, 0, 0, .5); color: var(--text); }
.ps-link p { margin: 0; flex: 1 1 200px; font-size: 14px; overflow-wrap: anywhere; }
.guest-bar { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 999px; background: rgba(13, 18, 23, .88); border: 1px solid var(--line-strong); font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.guest-bar .icon-btn { width: 30px; height: 30px; }
.guest-bar .icon-btn .ico { width: 16px; height: 16px; }
/* The bar is one row of 52 px while the title and the buttons fit; when they do not (a phone: about 310 px of buttons), the buttons wrap to a second row
   and the title keeps its row whole. Until 2026-10-21 the title shrank instead, to 15 px ("F..") at 390 px and to nothing at 360 (M4 visual pass). */
.gbar { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; min-height: 52px; padding: 0 10px 0 12px; background: var(--surface); }
.gbar-id { display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; min-height: 52px; font-weight: 800; }
.gbar-id img { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; }
.gbar-id span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gbar-act { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.gb { height: 38px; min-width: 38px; padding: 0 9px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; font-size: 13px; color: var(--text); }
@media (hover: hover) { .gb:hover { background: var(--hover); } }
.gb:active { background: var(--press); }
.gb[aria-pressed="true"] { color: var(--crimson-text); }
.gb[aria-disabled="true"] { opacity: .6; cursor: progress; }
.gb[data-vote="up"][aria-pressed="true"] .ico, .gb[data-save][aria-pressed="true"] .ico { fill: currentColor; }
.gsep { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }
.info { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; margin: 16px 0 0; padding: 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.title-row h1 { margin: 0; font: 900 30px/1.1 var(--f-display); }
.orig-tag { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--crimson-wash); color: var(--crimson-text); font-weight: 800; font-size: 12.5px; }
.orig-tag .ico { width: 16px; height: 16px; }
.snack-tag { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--raised-2); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text); font-weight: 800; font-size: 12.5px; }
.snack-tag .ico { width: 16px; height: 16px; color: var(--gold); }
.snack-tag:hover { background: var(--raised); }
.demo-tag { height: 28px; padding: 0 10px; border-radius: 8px; background: rgba(245, 184, 61, .16); color: var(--gold); font-weight: 800; font-size: 12.5px; display: inline-flex; align-items: center; }
.by { margin: 4px 0 0; color: var(--muted); }
.by a { color: var(--text); font-weight: 700; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 20px; margin: 18px 0; }
.facts div { min-width: 0; }
.facts dt { font-size: 12px; font-weight: 700; color: var(--subtle); text-transform: uppercase; letter-spacing: .04em; }
.facts dd { margin: 2px 0 0; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.facts dd .ico { width: 16px; height: 16px; color: var(--live); }
.facts a { color: var(--text); }
.facts .wide { grid-column: 1 / -1; }
.facts .descs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-weight: 400; }
.facts .descs b { font-weight: 600; }
.facts .descs span, .facts .descs-none { color: var(--subtle); font-weight: 400; }
.age { display: inline-grid; place-items: center; min-width: 36px; height: 24px; padding: 0 6px; border-radius: 6px; border: 2px solid var(--text); font-weight: 900; font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.info-side { display: grid; gap: 12px; align-content: start; }
.panel h2 { margin: 0 0 10px; font: 800 15px/1.2 var(--f-display); display: flex; align-items: center; gap: 8px; }
.panel h2 .ico { width: 18px; height: 18px; color: var(--gold); }
.ach ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ach li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.ach-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--raised-2); color: var(--subtle); }
.ach li.got .ach-ico { background: rgba(245, 184, 61, .18); color: var(--gold); }
.ach li b { display: block; font-size: 13.5px; }
.ach li small { color: var(--muted); font-size: 12px; }
.xp { font-weight: 800; font-size: 12px; color: var(--gold); }
.lb-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; counter-reset: r; }
.lb-list li { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; font-size: 13px; counter-increment: r; }
.lb-list li::before { content: counter(r); font-weight: 900; color: var(--subtle); text-align: center; }
.lb-list li:nth-child(1)::before { color: var(--gold); }
.lb-list li:nth-child(2)::before { color: #c7ced8; }
.lb-list li:nth-child(3)::before { color: #d08b5b; }
.lb-list li.me { background: var(--crimson-wash); }
.lb-list li b { font-weight: 800; }
.lb-list .lb-empty { grid-template-columns: 1fr; padding-left: 0; padding-right: 0; color: var(--muted); }
.lb-list .lb-empty::before { content: none; }
.lb-list.big li { font-size: 14.5px; padding: 8px 10px; }
.desc { margin: 16px 0 0; padding: 4px 24px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.block { padding: 18px 0 4px; }
.block + .block { border-top: 1px solid var(--line); }
.block h2 { margin: 0 0 10px; font: 800 19px/1.25 var(--f-display); }
.block p { margin: 0 0 12px; line-height: 1.7; color: #d3d8df; max-width: 820px; }
.steps { margin: 0; padding-left: 22px; line-height: 1.7; color: #d3d8df; }
.steps li { padding-left: 4px; }
.ctl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ctl h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 14px; }
.ctl ul { margin: 0; padding-left: 20px; color: #d3d8df; line-height: 1.7; }
.updates { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.updates li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; }
.updates time { color: var(--subtle); font-weight: 700; font-size: 13px; padding-top: 2px; }
.updates h3 { margin: 0 0 4px; font-size: 15px; }
.updates p { margin: 0; }
.faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq details:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 800; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 8px 0 0; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.shots img { border-radius: 10px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; height: auto; }
.gp-side { position: sticky; top: calc(var(--top-h) + 20px); }
.side-h { margin: 0 0 10px; font: 800 17px/1.2 var(--f-display); }
.pn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
body.theatre .gp { grid-template-columns: 1fr; }
body.theatre .gp-side { position: static; }
body.theatre .pn-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
body.theatre .frame { aspect-ratio: auto; height: calc(100vh - var(--top-h) - 120px); }
.frame-wrap:fullscreen { border-radius: 0; display: flex; flex-direction: column; }
.frame-wrap:fullscreen .frame { flex: 1; aspect-ratio: auto; }

/* Login drawer, modal, toasts */
.drawer { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .55); display: flex; justify-content: flex-end; }
.drawer[hidden] { display: none; }
.drawer-panel { position: relative; width: min(420px, 100%); height: 100%; background: var(--surface); border-left: 1px solid var(--line); padding: 56px 28px 28px; overflow: auto; animation: slideIn .2s var(--ease); }
@keyframes slideIn { from { transform: translateX(24px); opacity: 0; } }
.drawer-close { position: absolute; top: 12px; right: 12px; }
.login-body { display: grid; gap: 14px; text-align: center; }
.login-body h2 { margin: 0; font: 900 24px/1.2 var(--f-display); }
.login-body p { margin: 0; }
.login-mascot { justify-self: center; width: 96px; height: 96px; object-fit: contain; }
.login-age-form { display: grid; gap: 10px; }
.login-dob { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.login-dob select { width: 100%; min-height: 44px; }
.login-body input { height: 48px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--raised); padding: 0 16px; font-size: 16px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--subtle); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.modal { border: 0; padding: 0; border-radius: 18px; background: var(--surface); color: var(--text); width: min(480px, calc(100vw - 24px)); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.modal::backdrop { background: rgba(0, 0, 0, .55); }
.modal-body { padding: 24px; display: grid; gap: 14px; }
.modal-body h2 { margin: 0; font: 900 22px/1.2 var(--f-display); }
.modal-body p { margin: 0; }
.choices { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.choices label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--raised); cursor: pointer; font-weight: 600; }
.choices input { accent-color: var(--crimson); }
.field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.field input, .field textarea, .field select { border-radius: 10px; border: 1px solid var(--line-strong); background: var(--raised); padding: 10px 12px; font-size: 15px; font-weight: 500; }
.field small, .check small { color: var(--subtle); font-weight: 500; }
.field i { color: var(--crimson-text); font-style: normal; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.toasts { position: fixed; left: 12px; right: 12px; bottom: 24px; z-index: 90; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; max-width: 560px; padding: 10px 16px; border-radius: 12px; line-height: 1.4; background: var(--raised-2); border: 1px solid var(--line-strong); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); font-weight: 700; animation: toastIn .25s var(--ease); }
.toast .ico { color: var(--gold); }
.toast.ach-toast { background: linear-gradient(90deg, #3a2a08, #1f1a0e); border-color: rgba(245, 184, 61, .5); }
@keyframes toastIn { from { transform: translateY(12px); opacity: 0; } }

/* Mobile tab bar */
.tabbar { position: fixed; inset: auto 0 0 0; z-index: 45; height: calc(60px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(4, 1fr); background: var(--bar); border-top: 1px solid var(--line); }
.tabbar a { display: grid; justify-items: center; align-content: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--muted); }
.tabbar a[aria-current="page"] { color: var(--text); }
.tabbar a[aria-current="page"] .ico { color: var(--crimson); }

/* Originals hub */
.orig-hero { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 28px; border-radius: 24px; background: radial-gradient(90% 120% at 100% 0%, rgba(252, 18, 67, .3), transparent 60%), linear-gradient(180deg, #171c24, #11161c); border: 1px solid rgba(252, 18, 67, .3); margin-bottom: 24px; }
.orig-hero h1 { margin: 8px 0 0; font: 900 44px/1.05 var(--f-display); }
.oh-points { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.oh-points li { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.oh-points .ico { color: var(--live); width: 18px; height: 18px; }
.oh-mascot img { width: 260px; height: 260px; object-fit: contain; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .5)); }
.orig-list { display: grid; gap: 18px; }
.orig-feature { display: grid; grid-template-columns: 1.5fr 1fr; gap: 0; border-radius: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.of-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; }
.of-body { padding: 24px; display: grid; gap: 10px; align-content: center; }
.of-body h2 { margin: 0; font: 900 28px/1.1 var(--f-display); }
.of-status { justify-self: start; padding: 3px 9px; border-radius: 6px; background: var(--crimson-fill); font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.of-tag { margin: 0; color: var(--crimson-text); font-weight: 700; }
.of-body p { margin: 0; color: #d3d8df; line-height: 1.6; }
.of-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 6px 0; }
.of-facts dt { font-size: 11.5px; color: var(--subtle); font-weight: 700; text-transform: uppercase; }
.of-facts dd { margin: 0; font-weight: 700; }
.of-body .btn { justify-self: start; }

/* Tags, A to Z, studio, account, legal, 404 */
.tag-index { columns: 4 220px; column-gap: 24px; }
.tag-index section { break-inside: avoid; margin-bottom: 18px; }
.tag-index h2 { margin: 0 0 6px; font: 900 20px/1 var(--f-display); color: var(--crimson-text); }
.tag-index ul, .az-list { list-style: none; padding: 0; margin: 0; }
.tag-index li { padding: 3px 0; text-transform: capitalize; }
.az-list { columns: 3 260px; }
.az-list li { padding: 5px 0; }
.studio-head { display: flex; gap: 20px; align-items: center; margin: 4px 0 24px; }
.studio-logo { width: 96px; height: 96px; border-radius: 24px; display: grid; place-items: center; background: linear-gradient(135deg, var(--raised-2), var(--surface)); border: 1px solid var(--line-strong); font: 900 34px/1 var(--f-display); flex: none; }
.studio-head h1 { margin: 6px 0 0; font: 900 32px/1.1 var(--f-display); }
.studio-head .ico { width: 16px; height: 16px; color: var(--live); vertical-align: -3px; }
.level .lv-top { display: flex; justify-content: space-between; font-weight: 800; }
.level .lv-top span { color: var(--gold); }
.lv-bar { height: 10px; border-radius: 5px; background: var(--raised-2); overflow: hidden; margin: 10px 0 6px; }
.lv-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #ffd677); border-radius: 5px; width: 0; transition: width .5s var(--ease); }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.ach-card { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.ach-card.got .ach-ico { background: rgba(245, 184, 61, .18); color: var(--gold); }
.ach-card b { display: block; font-size: 13.5px; }
.ach-card small { color: var(--muted); font-size: 12px; }
.saves { display: grid; gap: 8px; }
.save-row { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.save-row img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.save-row small { color: var(--muted); display: block; }
.legal { max-width: 860px; }
.legal section { padding: 8px 0; }
.legal h2 { font: 800 20px/1.3 var(--f-display); margin: 24px 0 10px; scroll-margin-top: calc(var(--top-h) + 16px); }
.legal section[id] { scroll-margin-top: var(--top-h); }   /* a link to a section (the page's contents) puts its heading below the fixed header */
.legal p, .legal li { line-height: 1.7; color: #d3d8df; }
.legal ul, .legal ol { padding-left: 22px; }
.legal .note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); }
.legal .note .ico { color: var(--official); margin-top: 3px; }
.toc { padding: 16px 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin: 8px 0 12px; }
.toc ol { margin: 8px 0 0; padding-left: 20px; columns: 2 260px; }
.toc li { padding: 2px 0; }
.toc a { color: var(--muted); }
.table-wrap { overflow-x: auto; margin: 8px 0 14px; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--raised); font-weight: 800; }
tr:last-child td { border-bottom: 0; }
.contact-line { display: flex; align-items: center; gap: 8px; }
.nf { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 60px 20px; }
.nf h1 { margin: 0; font: 900 34px/1.1 var(--f-display); }
.nf-act { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.search-page { display: flex; gap: 8px; margin-top: 12px; max-width: 640px; }
.search-page input { flex: 1; height: 44px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--raised); padding: 0 18px; font-size: 16px; }
.season { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.season-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(245, 184, 61, .16); color: var(--gold); }
.season b { display: block; font: 900 18px/1.1 var(--f-display); }
.season span { color: var(--muted); font-size: 13px; }
.season .seg { margin: 0 0 0 auto; }
.xp-board { margin: 0 0 16px; }
.lb-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.lb-games h2 a { display: flex; align-items: center; gap: 10px; }
.lb-games h2 img { border-radius: 8px; }

/* Kids theme */
.kids-theme { --canvas: #fff8ec; --surface: #ffffff; --raised: #fff1d6; --text: #1d2433; --muted: #4b5568; --line: rgba(29, 36, 51, .12); background: var(--canvas); color: var(--text); font-size: 16px; }
.k-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.k-brand { display: flex; align-items: center; gap: 10px; }
.k-brand b { font: 900 28px/1 var(--f-display); white-space: nowrap; }
/* KIDS lettering: its outlined letters are the cap height of APN (0.729em) plus 6% for the round shapes, on the same baseline */
.k-brand b img { display: inline-block; height: 1em; width: auto; vertical-align: -.153em; margin-left: .06em; }
.k-grown { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 999px; background: #1d2433; color: #fff; font-weight: 800; font-size: 14px; }
.k-grown .ico { width: 16px; height: 16px; }
.k-main { max-width: 1200px; margin: 0 auto; padding: 8px 24px 40px; }
.k-hero h1 { margin: 12px 0 6px; font: 900 40px/1.1 var(--f-display); }
.k-hero p { margin: 0 0 24px; font-size: 18px; color: var(--muted); }
.k-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.k-card { display: grid; gap: 6px; padding: 12px; border-radius: 28px; background: #fff; box-shadow: 0 6px 0 #f2d9a6, 0 12px 30px rgba(29, 36, 51, .1); }
.k-card img { border-radius: 20px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; height: auto; }
.k-card b { font: 900 22px/1.1 var(--f-display); padding: 4px 6px 0; }
.k-card span { padding: 0 6px 6px; color: var(--muted); }
.k-soon { place-content: center; text-align: center; min-height: 200px; background: #fff1d6; box-shadow: none; border: 3px dashed #f2d9a6; }
@media (hover: hover) { .k-card:hover { transform: translateY(-3px); } }
.k-parents { margin: 40px 0 0; padding: 24px; border-radius: 24px; background: #fff; }
.k-parents h2 { margin: 0 0 8px; }
.k-parents a, .k-foot a { color: #be123c; font-weight: 700; }
.k-foot { text-align: center; padding: 24px; color: var(--muted); font-size: 14px; }
.k-game { display: grid; gap: 16px; }
.k-frame { border-radius: 28px; overflow: hidden; box-shadow: 0 8px 0 #f2d9a6; }
.k-bar { display: flex; gap: 10px; justify-content: space-between; }
.kids-theme .btn-ghost { background: #fff; color: var(--text); box-shadow: 0 3px 0 #f2d9a6; }
.k-play { background: #16a34a; box-shadow: 0 8px 0 #0f7a36; height: 64px; font-size: 22px; padding: 0 40px; }
.k-about { padding: 24px; border-radius: 24px; background: #fff; }
.k-about h1 { margin: 0 0 10px; font: 900 32px/1.1 var(--f-display); }
.k-about p, .k-about li { line-height: 1.7; }
.k-about .steps { color: inherit; }
.k-facts dt { color: var(--muted); }
.k-hold { position: relative; overflow: hidden; }
.k-hold::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .25); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* Responsive */
@media (max-width: 1279px) {
  .gp { grid-template-columns: 1fr; }
  .gp-side { position: static; }
  .pn-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .mood-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1023px) {
  .info { grid-template-columns: 1fr; }
  .ob-row { grid-template-columns: 1fr 1fr; }
  .promo-row { grid-template-columns: 1fr; }
  .orig-feature { grid-template-columns: 1fr; }
  .orig-hero { grid-template-columns: 1fr; }
  .oh-mascot { display: none; }
}
@media (max-width: 767px) {
  .main { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .brand b { font-size: 17px; }
  .k-brand b { font-size: 23px; }
  .who .btn { height: 36px; padding: 0 14px; }
  .shelf-head h2, .continue h2 { font-size: 18px; }
  .shelf-head:has(.shelf-sub) { flex-wrap: wrap; row-gap: 2px; }
  .shelf-sub { flex-basis: 100%; order: 3; }
  .s-md { grid-auto-columns: 46vw; }
  .sp-big { width: 86vw; }
  .sp-quad { grid-template-columns: 42vw 42vw; }
  .ob-row { grid-template-columns: 1fr; }
  .orig-band { padding: 16px; margin-left: -4px; margin-right: -4px; }
  .mood-row { grid-template-columns: 1fr 1fr; }
  .g-md { grid-template-columns: 1fr 1fr; }
  .pn-grid { grid-template-columns: 1fr 1fr; }
  .gp-main .frame-wrap { margin: 0 -12px; border-radius: 0; }
  .frame { aspect-ratio: 4 / 3; }
  /* While the start or Coming soon screen (.ps) is in the frame, its content sets the hero's height on a phone and 4:3 is only a floor: the
     ::before spacer (padding 75 % of the width) and .ps share one grid cell, so the row is the taller of the two and .ps stretches to it.
     An absolute .ps in the fixed 4:3 box cut Play now at 320x568 and the guest line at 390x844 (W1 F1, 2026-11-11); grid plus aspect-ratio's
     automatic minimum height did not grow the frame in Chromium (run w1c-hero-after). play.js removes .ps on Play: the running game, and
     the fullscreen frame, keep the 4:3 box above. */
  .frame:has(> .ps) { aspect-ratio: auto; display: grid; }
  .frame:has(> .ps)::before { content: ''; grid-area: 1 / 1; padding-top: 75%; }
  .frame:has(> .ps) > .ps { grid-area: 1 / 1; position: relative; inset: auto; }
  .gbar { padding: 0 6px 0 10px; }
  .gbar-id { min-height: 44px; }
  .gbar-act { min-height: 44px; padding-bottom: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 100%; }
  /* in fullscreen on a phone the game keeps the height of a one-row bar: the buttons stay, the title goes (the player knows the game they play) */
  .frame-wrap:fullscreen .gbar-id { display: none; }
  .frame-wrap:fullscreen .gbar-act { min-height: 52px; padding-bottom: 0; }
  .gb { min-width: 36px; padding: 0 6px; }
  .info { padding: 16px; }
  .facts { grid-template-columns: 1fr 1fr; gap: 10px 14px; }
  .brand img { width: 28px; height: 28px; }
  .title-row h1 { font-size: 24px; }
  .desc { padding: 4px 16px 16px; }
  .ctl-grid { grid-template-columns: 1fr; }
  .updates li { grid-template-columns: 1fr; gap: 2px; }
  .seo-block { padding: 20px; }
  .list-head h1 { font-size: 26px; }
  .orig-hero { padding: 20px; }
  .orig-hero h1 { font-size: 34px; }
  .k-grid { grid-template-columns: 1fr; }
  .k-hero h1 { font-size: 30px; }
  .studio-head { flex-direction: column; align-items: flex-start; }
  .season .seg { margin: 0; }
  .guest-bar { font-size: 12px; max-width: calc(100% - 16px); }
  .guest-bar span { overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 359px) { .gbar .gsep { display: none; } }   /* the bar's buttons keep one row down to 320 px */
@media (min-width: 768px) { .hide-desktop { display: none; } }
@media (max-width: 767px) { .desktop-only { display: none; } }
@media (min-width: 1600px) { .ob-row { grid-template-columns: repeat(3, 1fr); } }

.review-note { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: rgba(245, 184, 61, .12); border: 1px solid rgba(245, 184, 61, .35); color: #f3d9a2; }
.review-note .ico { color: var(--gold); margin-top: 1px; }
/* Links inside running text are underlined, so they do not rely on colour alone (WCAG 1.4.1). */
main :where(p, li, dd, td) a:not([class]) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
/* Login: age confirmation above the sign-in buttons. */
.login-age { margin: 4px 0 12px; text-align: left; font-size: 13px; line-height: 1.45; color: var(--muted); }
.login-age input { margin-top: 2px; width: 18px; height: 18px; flex: none; accent-color: var(--crimson-fill); }

/* Coming soon Originals (owner, 2026-10-17) */
.soon-ribbon { position: absolute; right: 8px; bottom: 8px; z-index: 2; padding: 4px 8px; border-radius: 6px; background: rgba(8, 10, 14, .82); color: #fff; font: 700 12px/1 var(--f-ui); letter-spacing: .02em; }
.card.is-soon .card-img img, .k-card.is-soon img, .ob-card.is-soon img { filter: saturate(.8); }
.ob-card.is-soon .ob-status, .demo-tag.is-soon { background: #3a424e; color: #e6e9ee; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.k-card { position: relative; }
.ps-soon .ps-inner { gap: 10px; }
.soon-tag { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 10px; border-radius: 999px; background: rgba(8, 10, 14, .7); color: #fff; font-weight: 700; font-size: 14px; }
.soon-tag .ico { width: 16px; height: 16px; }
.k-card > .soon-ribbon { top: 20px; left: 20px; right: auto; bottom: auto; color: #fff; font-size: 13px; padding: 6px 10px; }
.lb-games .lb { scroll-margin-top: calc(var(--top-h) + 16px); }


/* ---------- Accounts (M2): the sign-in drawer, /auth/callback and /account ----------
   One look for the three: dark panels, the crimson of the brand for actions, callouts for every message (info, ok, warn,
   error), custom selects and switches, and a visible focus ring on every control. Icons in callouts are CSS masks, because
   the scripts fill those lines with textContent. */
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn:focus-visible { border-radius: 999px; outline-offset: 3px; }
.btn-danger { background: transparent; color: var(--crimson-text); box-shadow: inset 0 0 0 1px rgba(255, 95, 126, .55); }
@media (hover: hover) { .btn-danger:not(:disabled):hover { background: var(--crimson-wash); } }
.btn-unlock { background: rgba(245, 184, 61, .12); color: #f3d9a2; box-shadow: inset 0 0 0 1px rgba(245, 184, 61, .4); }
@media (hover: hover) { .btn-unlock:hover { background: rgba(245, 184, 61, .2); } }
.btn-unlock .ico { color: var(--gold); }
.acct .btn .ico, .login-body .btn .ico, .cb .btn .ico { width: 18px; height: 18px; }

/* Fields and selects */
.field input, .field select, .field textarea { min-height: 44px; color: var(--text); transition: border-color var(--t-fast), background var(--t-fast); }
@media (hover: hover) { .field input:hover, .field select:hover, .login-dob select:hover { border-color: rgba(150, 156, 171, .5); } }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible, .login-dob select:focus-visible { outline: 2px solid var(--crimson-text); outline-offset: 1px; border-color: transparent; border-radius: 10px; }
.field input:disabled, .field select:disabled { opacity: .55; cursor: not-allowed; }
.field small { font-size: 12.5px; line-height: 1.45; }
.field select, .login-dob select { -webkit-appearance: none; appearance: none; width: 100%; padding: 0 40px 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--raised) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a7afbc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 18px 18px; color: var(--text); font-size: 15px; font-weight: 600; cursor: pointer; }
.login-dob select { height: 48px; min-height: 48px; font-size: 16px; }
.field select:has(option[value=""]:checked), .login-dob select:has(option[value=""]:checked) { color: var(--muted); }
.field select option, .login-dob select option { background: var(--raised); color: var(--text); }

/* Callouts: one line or short block of status text */
.callout { position: relative; margin: 0; padding: 10px 12px 10px 38px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--raised); color: var(--text); font-size: 14px; font-weight: 500; line-height: 1.45; text-align: left; overflow-wrap: anywhere; }
.callout::before { content: ""; position: absolute; left: 12px; top: 11px; width: 18px; height: 18px; background: var(--official); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat; }
.callout.ok, .callout[data-kind="ok"], .lock-status[data-kind="open"] { background: rgba(63, 207, 142, .1); border-color: rgba(63, 207, 142, .38); }
.callout.ok::before, .callout[data-kind="ok"]::before, .lock-status[data-kind="open"]::before { background: var(--live); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12.5 3 3 5-6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12.5 3 3 5-6'/%3E%3C/svg%3E"); }
.callout.warn, .lock-status[data-kind="wait"] { background: rgba(245, 184, 61, .1); border-color: rgba(245, 184, 61, .4); color: #f6e0b2; }
.callout.warn::before, .lock-status[data-kind="wait"]::before { background: var(--gold); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5M12 16h.01'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5M12 16h.01'/%3E%3C/svg%3E"); }
.callout.err, .callout[data-kind="error"], .lock-status[data-kind="frozen"] { background: var(--crimson-wash); border-color: rgba(252, 18, 67, .45); color: #ffd0d9; }
.callout.err::before, .callout[data-kind="error"]::before, .lock-status[data-kind="frozen"]::before { background: var(--crimson-text); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5M12 16h.01'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5M12 16h.01'/%3E%3C/svg%3E"); }
.pin-msg[data-kind="busy"], .pin-msg[data-kind="too_fast"] { background: rgba(245, 184, 61, .1); border-color: rgba(245, 184, 61, .4); color: #f6e0b2; }
.pin-msg[data-kind="busy"]::before, .pin-msg[data-kind="too_fast"]::before { background: var(--gold); }
.callout a:not(.btn) { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* The sign-in drawer */
.drawer-panel { padding: 64px 32px 32px; }
.login-body { gap: 16px; }
.login-body h2 { font-size: 26px; }
.login-body > .muted { font-size: 15px; line-height: 1.55; }
.login-mascot { width: 88px; height: 88px; filter: drop-shadow(0 10px 24px rgba(252, 18, 67, .28)); }
.login-age-form { gap: 12px; margin-top: 4px; }
.login-body .btn.wide { height: 48px; font-size: 15px; }
.login-google { box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.login-google:focus-visible { outline-color: #fff; }
.login-google:disabled { opacity: .8; }
.login-google:disabled::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(29, 29, 31, .25); border-top-color: #1d1d1f; animation: acct-spin .8s linear infinite; }
.login-keep { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--raised); color: var(--muted); font-size: 13.5px; line-height: 1.45; text-align: left; }
.login-keep .ico { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--official); }
.login-body .fine { margin-top: 2px; }
.login-body .fine a { text-decoration: underline; text-underline-offset: 2px; }
@keyframes acct-spin { to { transform: rotate(360deg); } }

/* /auth/callback */
.cb { display: grid; justify-items: center; padding: clamp(12px, 6vh, 56px) 0 8px; }
.cb-card { width: min(460px, 100%); display: grid; gap: 14px; padding: 28px; border-radius: 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.cb-card[hidden] { display: none; }
.cb-card h1 { margin: 0; font: 900 26px/1.15 var(--f-display); }
.cb-card h1:focus { outline: none; }
.cb-card p { margin: 0; }
.cb-card > .muted { font-size: 15px; line-height: 1.55; }
.cb-mascot { width: 64px; height: 64px; filter: drop-shadow(0 8px 20px rgba(252, 18, 67, .25)); }
.cb-loading { justify-items: center; text-align: center; padding: 44px 28px; }
.cb-spin { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--raised-2); border-top-color: var(--crimson); animation: acct-spin .9s linear infinite; margin-bottom: 4px; }
.cb-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--crimson-wash); color: var(--crimson-text); }
.cb-ico .ico { width: 22px; height: 22px; }
.cb-detail { padding: 8px 12px; border-radius: 8px; background: var(--raised); color: var(--muted); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.cb-name-form { display: grid; gap: 14px; }
.cb-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2px; }
.cb-card .login-age-form { margin-top: 2px; }

/* /account */
.acct { max-width: 880px; }
.acct-title { margin-bottom: 16px; }
.acct-guest, .acct-head { border-radius: 20px; background: radial-gradient(90% 160% at 100% 0%, rgba(252, 18, 67, .2), transparent 60%), linear-gradient(180deg, #171c24, #11161c); border: 1px solid rgba(252, 18, 67, .26); }
.acct-guest { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; padding: 28px; }
.acct-guest img { width: 96px; height: 96px; }
.acct-guest h2 { margin: 0 0 6px; font: 900 26px/1.15 var(--f-display); }
.acct-guest p { margin: 0 0 16px; color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 620px; }
.acct-head { display: flex; align-items: center; gap: 16px; padding: 20px 24px; }
.acct-head .avatar { flex: none; box-shadow: 0 8px 24px rgba(252, 18, 67, .3); }
.acct-id { min-width: 0; }
.acct-id h2 { margin: 0; font: 900 26px/1.15 var(--f-display); overflow-wrap: anywhere; }
.acct-id p { margin: 4px 0 0; font-size: 13.5px; }
.acct-head .btn { margin-left: auto; flex: none; }
.acct-profile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 8px; padding-bottom: 8px; }
.acct-profile .btn { flex: none; }
.acct-profile::before { top: 50%; transform: translateY(-50%); }
.acct-note { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; padding: 0 4px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.acct-note .ico { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--subtle); }
.acct-done { margin: 0 0 16px; font-weight: 700; }
.acct-done:focus { outline: none; }
.acct-done:focus-visible { outline: 2px solid var(--crimson-text); outline-offset: 2px; }
.acct-sec { margin-top: 32px; }
.acct-sec > h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font: 800 20px/1.2 var(--f-display); }
.acct-h-tag { padding: 4px 9px; border-radius: 999px; background: var(--raised-2); color: var(--muted); font: 700 12px/1 var(--f-ui); letter-spacing: .02em; }
.acct .panel.pc, .acct .panel.yd { padding: 0; }

/* Parental controls: rows with a switch or a select */
.pc { display: grid; }
.pc-row { display: grid; gap: 8px; justify-items: start; padding: 18px 20px; }
.pc-row + .pc-row { border-top: 1px solid var(--line); }
.pc-row .fine { margin: 0; max-width: 620px; font-size: 13px; }
.pc-row .switch + .fine { padding-right: 64px; }
.pc-row .field { width: 100%; max-width: 360px; font-size: 15px; font-weight: 700; }
.pc-status { margin: 0 20px 18px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; font-weight: 700; font-size: 15px; cursor: pointer; }
.switch input { -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 46px; height: 26px; margin: 0; border-radius: 999px; background: var(--raised-2); box-shadow: inset 0 0 0 1px var(--line-strong); cursor: pointer; transition: background var(--t-fast); }
.switch input::before { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #c9ced6; transition: transform var(--t-fast) var(--ease), background var(--t-fast); }
.switch input:checked { background: var(--crimson-fill); box-shadow: none; }
.switch input:checked::before { transform: translateX(20px); background: #fff; }
.switch input:disabled { opacity: .45; cursor: not-allowed; }
.switch:has(input:disabled) { cursor: not-allowed; }
.switch:has(input:disabled) .switch-label { color: var(--muted); }
.switch input:focus-visible { outline: 2px solid var(--crimson-text); outline-offset: 3px; border-radius: 999px; }

/* The account lock */
.lock { display: grid; gap: 16px; padding: 20px; }
.lock-off, .lock-on, .lock-error { display: grid; gap: 16px; }
.lock p { margin: 0; }
.lock-loading { color: var(--muted); }
.lock-intro { line-height: 1.6; max-width: 700px; }
.lock-facts { list-style: none; margin: 0; padding: 14px 16px; display: grid; gap: 10px; border-radius: 12px; background: var(--raised); color: #cfd4dc; font-size: 14px; line-height: 1.5; }
.lock-facts li { position: relative; padding-left: 28px; }
.lock-facts li::before { content: ""; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; background: var(--official); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat; }
.lock-facts a { color: var(--crimson-text); }
.lock-form { display: grid; gap: 14px; max-width: 520px; }
.pin-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pin-field input { font-size: 20px; font-weight: 700; letter-spacing: .4em; font-variant-numeric: tabular-nums; -webkit-text-security: disc; } /* a text field shown as dots: type=password would invite the password manager to save the PIN (account.js falls back to it where this is unsupported) */
.lock-head { display: flex; gap: 14px; align-items: center; }
.lock-badge { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(245, 184, 61, .14); color: var(--gold); }
.lock-badge .ico { width: 22px; height: 22px; }
.lock-title { font: 800 17px/1.25 var(--f-display); }
.lock-head .fine { margin-top: 3px; font-size: 13px; color: var(--muted); }
.lock-status { position: relative; padding: 10px 12px 10px 38px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--raised); font-weight: 600; line-height: 1.45; }
.lock-status::before { content: ""; position: absolute; left: 12px; top: 11px; width: 18px; height: 18px; background: var(--gold); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat; }
.lock-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lock-change { max-width: none; padding-top: 16px; border-top: 1px solid var(--line); }
.lock-change > .fine { max-width: 520px; }
.lock-change .pin-pair, .lock-change .field { max-width: 520px; }

/* Your data */
.yd { display: grid; }
.yd-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; row-gap: 12px; align-items: start; padding: 18px 20px; }
.yd-row + .yd-row { border-top: 1px solid var(--line); }
.yd-text h3 { margin: 0 0 6px; font: 800 16px/1.25 var(--f-display); }
.yd-text p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 560px; }
.yd-text a { color: var(--crimson-text); }
.yd-act { display: grid; gap: 8px; justify-items: end; }
.yd-msg { grid-column: 1 / -1; }

/* The two dialogs of the account page */
.acct .modal { width: min(460px, calc(100vw - 24px)); border: 1px solid var(--line-strong); }
.acct .modal-body { gap: 16px; }
.acct .modal-body > .muted { line-height: 1.55; }
.del-part { padding: 10px 12px; border-radius: 10px; background: var(--raised); border-left: 3px solid var(--line-strong); font-size: 14px; line-height: 1.5; }
.del-go { border-left-color: var(--crimson); }
.del-keep { border-left-color: var(--live); }
.del-word { font-weight: 800; letter-spacing: .2em; }
.acct .modal-actions { margin-top: 4px; }

@media (max-width: 767px) {
  .drawer-panel { padding: 56px 20px 24px; }
  .acct-title h1 { font-size: 26px; }
  .acct-guest { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 24px 20px; gap: 12px; }
  .acct-guest img { width: 80px; height: 80px; }
  .acct-guest h2 { font-size: 24px; }
  .acct-guest p { margin-bottom: 14px; }
  .acct-head { flex-wrap: wrap; padding: 16px; gap: 12px; }
  .acct-head .avatar { width: 52px; height: 52px; font-size: 21px; }
  .acct-id { flex: 1 1 200px; }
  .acct-id h2 { font-size: 22px; }
  .acct-head .btn { margin-left: 64px; }
  .acct-sec { margin-top: 28px; }
  .acct-sec > h2 { font-size: 19px; }
  .pc-row, .yd-row { padding: 16px; }
  .pc-status { margin: 0 16px 16px; }
  .lock { padding: 16px; }
  .yd-row { grid-template-columns: 1fr; }
  .yd-act { justify-items: start; }
  .cb-card { padding: 22px 18px; }
  .cb-actions .btn { flex: 1 1 100%; }
  .acct .modal-body { padding: 20px; }
  .acct .modal-actions { flex-direction: column-reverse; }
  .acct .modal-actions .btn { width: 100%; }
}
@media (max-width: 420px) {
  .pin-pair { grid-template-columns: 1fr; }
}

/* ---------- Cloud saves (M3): the sign-in question, the conflict screen, notices, game-page lines, Previous saves ----------
   saves-ui.js and account.js build this markup. Same look as the account screens of M2: dark panels, crimson for the action that
   moves on, callouts for status, 44 px controls. Blue (--official) marks information, gold a warning, green a done step. */
.sv-dialog { width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line-strong); }
.sv-dialog.sv-wide { width: min(640px, calc(100vw - 24px)); }
.sv-body { gap: 16px; }
.sv-body > p { color: var(--muted); font-size: 15px; line-height: 1.55; }
.sv-head { display: flex; align-items: flex-start; gap: 12px; }
/* the icon sits beside the first line of a heading that wraps: padding = (icon height - line height) / 2 */
.sv-head h2 { padding-top: 7px; font-size: 22px; line-height: 1.2; min-width: 0; overflow-wrap: anywhere; }
.sv-head h2:focus { outline: none; }
.sv-ico { display: inline-grid; place-items: center; flex: none; }
.sv-head-ico { width: 40px; height: 40px; border-radius: 12px; }
.sv-head-ico.is-info { background: color-mix(in srgb, var(--official) 14%, transparent); color: var(--official); }
.sv-head-ico.is-warn { background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold); }
.sv-head-ico .ico { width: 22px; height: 22px; }
.sv-ico .ico { display: block; }
.sv-body > .sv-fine { font-size: 13.5px; line-height: 1.5; }
.sv-dialog .btn, .sv-notice .btn, .sv-line .btn, .sv-saves .btn { height: 44px; }
.sv-actions { flex-wrap: wrap; }
.sv-cover { width: 32px; height: 32px; flex: none; border-radius: 8px; object-fit: cover; background: var(--raised-2); }

/* the sign-in question: the games as a short list */
.sv-glist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sv-glist li { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 12px 6px 6px; border-radius: 10px; background: var(--raised); font-weight: 700; overflow-wrap: anywhere; }
.sv-glist li.sv-more { padding-left: 12px; background: transparent; color: var(--muted); font-weight: 600; }

/* the conflict screen: a card per candidate; the footer stays in view while the list scrolls */
.sv-body[data-sv="conflicts"] { padding-bottom: 0; }
.sv-form { display: grid; gap: 16px; }
.sv-list { display: grid; gap: 20px; }
.sv-game { min-width: 0; margin: 0; padding: 0; border: 0; }
.sv-game legend { float: left; width: 100%; display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 0; font: 800 16px/1.25 var(--f-display); }
.sv-game legend + * { clear: both; }
.sv-cands { display: grid; gap: 8px; }
.sv-cand { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; min-height: 44px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--raised); cursor: pointer; transition: background var(--t-fast), border-color var(--t-fast); }
@media (hover: hover) { .sv-cand:hover { background: var(--raised-2); } }
.sv-cand input { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin: 1px 0 0; border-radius: 50%; border: 2px solid var(--muted); background: transparent; cursor: pointer; }
.sv-cand input:checked { border-color: var(--crimson-text); background: radial-gradient(circle, var(--crimson-text) 0 4px, transparent 4.5px); }
.sv-cand input:focus-visible { outline: none; }
.sv-cand:has(input:focus-visible) { outline: 2px solid var(--crimson-text); outline-offset: 2px; }
.sv-cand:has(input:checked) { border-color: var(--crimson); background: var(--crimson-wash); }
.sv-cand-text { display: grid; gap: 4px; min-width: 0; }
.sv-cand-top { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 8px; }
.sv-cand-title { min-width: 0; }
.sv-src-ico { margin-top: 1px; }
.sv-src { font-size: 15px; font-weight: 800; line-height: 1.3; }
.sv-src-ico { color: var(--muted); }
.sv-src-ico .ico { width: 18px; height: 18px; }
.sv-latest { display: inline-block; margin-left: 8px; padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--official) 26%, var(--surface)); color: var(--text); font: 700 12px/1.2 var(--f-ui); letter-spacing: .02em; vertical-align: 1px; white-space: nowrap; }
.sv-meta { color: var(--muted); font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.sv-summary { justify-self: start; max-width: 100%; margin: 2px 0 0; padding: 3px 8px; border-radius: 6px; background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
/* old progress (before a Delete my data): the warning box also says what the progress is */
.sv-note { display: grid; gap: 8px; }
.sv-note .sv-epoch-meta { display: grid; gap: 6px; }
.sv-note .sv-meta { color: inherit; opacity: .8; }
.sv-foot { position: sticky; bottom: 0; z-index: 1; display: grid; gap: 12px; margin: 0 -24px; padding: 14px 24px 20px; background: var(--surface); border-top: 1px solid var(--line); }
.sv-status { margin: 0; color: var(--muted); font-size: 13.5px; }
.sv-status:empty { display: none; }
.sv-confirm { display: grid; gap: 12px; padding: 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--raised); }
.sv-confirm p { margin: 0; line-height: 1.5; }
.sv-confirm .btn-ghost { background: var(--raised-2); }
.sv-foot > .sv-actions > [data-sv-skip] { margin-right: auto; }
.sv-foot > .sv-actions[hidden] { display: none; }

/* notices: bottom of the screen, above the phone tab bar */
.sv-notices { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(560px, calc(100vw - 24px)); pointer-events: none; }
.sv-notices:empty { display: none; }
.sv-notice { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--raised-2); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); font-weight: 600; line-height: 1.4; animation: toastIn .25s var(--ease); }
.sv-notice-text { flex: 1; min-width: 0; padding: 7px 0; overflow-wrap: anywhere; }
.sv-notice-ico .ico { width: 20px; height: 20px; }
.sv-notice.is-info .sv-notice-ico { color: var(--official); }
.sv-notice.is-ok .sv-notice-ico { color: var(--live); }
.sv-notice.is-warn .sv-notice-ico { color: var(--gold); }
.sv-notice .btn { flex: none; }
.sv-notice .btn-ghost { background: var(--raised); }
.sv-x { width: 44px; height: 44px; flex: none; border-radius: 12px; color: var(--muted); }
.sv-x .ico { width: 18px; height: 18px; }
@media (hover: hover) { .sv-x:hover { color: var(--text); } }

/* game-page lines: a strip between the game and its bar */
.sv-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 10px 10px 40px; border-width: 1px 0 0; border-radius: 0; font-size: 13.5px; }
.sv-line::before { left: 13px; top: 13px; }
.sv-line-text { flex: 1 1 260px; min-width: 0; padding: 2px 0; }
.sv-line .btn { flex: none; }
.sv-line .sv-x { margin: -4px -2px; color: inherit; }
/* with a button beside the text (wide screens): the icon, the first line of text and the buttons share one centre line, 32 px down */
@media (min-width: 768px) {
  .sv-line:has(> .btn) { align-items: flex-start; }
  .sv-line:has(> .btn) .sv-line-text { padding: 12px 0; }
  .sv-line:has(> .btn)::before { top: 23px; }
  .sv-line:has(> .btn) .sv-x { margin: 0 -2px; }
}

/* Previous saves on the account page */
.acct-lead { margin: -4px 0 12px; max-width: 700px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.acct .panel.sv-saves { padding: 0; display: grid; }
.sv-saves-row { margin: 0; padding: 16px 20px; }
.sv-saves-row + .sv-pg-list:not(:empty), .sv-pg-list > * + * { border-top: 1px solid var(--line); }
p.callout.sv-saves-row { margin: 16px 20px 0; padding: 10px 12px 10px 38px; }
p.callout.sv-saves-row:focus { outline: none; }
.sv-saves-err { display: grid; gap: 12px; justify-items: start; }
.sv-space { display: grid; gap: 8px; }
.sv-space .fine { margin: 0; font-size: 13px; color: var(--muted); }
.sv-space-bar { display: block; height: 6px; border-radius: 3px; background: var(--raised-2); overflow: hidden; }
.sv-space-bar span { display: block; height: 100%; width: 0; background: var(--live); }
.sv-pg-game { padding: 18px 20px; }
.sv-pg-head { display: flex; align-items: flex-start; gap: 12px; }
.sv-pg-head .sv-cover { width: 40px; height: 40px; border-radius: 10px; }
.sv-pg-id { display: grid; gap: 4px; min-width: 0; }
.sv-pg-id h3 { margin: 0; font: 800 16px/1.25 var(--f-display); }
.sv-pg-current { margin: 0; color: var(--muted); font-size: 13.5px; }
.sv-pg-id .sv-summary { margin: 2px 0 0; background: var(--raised); }
.sv-pg-copies { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.sv-pg-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 16px; padding: 10px 10px 10px 14px; border-radius: 12px; border: 1px solid var(--line); }
.sv-pg-copy.is-asking { background: var(--raised); border-color: var(--line-strong); }
.sv-pg-copy.is-asking .btn-ghost { background: var(--raised-2); }
.sv-pg-text { display: grid; gap: 3px; min-width: 0; }
.sv-pg-text p { margin: 0; }
.sv-pg-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-weight: 700; }
.sv-pg-reason { padding: 3px 8px; border-radius: 999px; background: var(--raised-2); color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.sv-pg-meta { color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.sv-pg-ask { margin: 0; line-height: 1.5; font-weight: 600; }
.sv-pg-acts { display: flex; gap: 8px; }
.sv-pg-none { padding: 4px 2px; color: var(--muted); font-size: 13.5px; }

@media (max-width: 767px) {
  .sv-notices { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(76px + env(safe-area-inset-bottom)); }   /* above the tab bar, as the notices (M4 visual pass) */
  .sv-line { padding-right: 8px; }
  .sv-saves-row, .sv-pg-game { padding-left: 16px; padding-right: 16px; }
  p.callout.sv-saves-row { margin: 12px 16px 0; }
  .sv-pg-copy { grid-template-columns: 1fr; }
  .sv-pg-copy .btn { justify-self: start; }
  .sv-pg-acts { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .sv-dialog .modal-body { padding: 20px 18px; }
  .sv-body[data-sv="conflicts"] { padding-bottom: 0; }
  .sv-foot { margin: 0 -18px; padding: 12px 18px 16px; }
  .sv-head h2 { padding-top: 6px; font-size: 20px; }
  .sv-head-ico { width: 36px; height: 36px; }
  .sv-dialog .sv-actions { flex-direction: column-reverse; }
  .sv-dialog .sv-actions .btn { width: 100%; }
  /* the conflict footer: the main button on its own row, the two others side by side (labels may wrap) */
  .sv-foot > .sv-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .sv-foot > .sv-actions > .btn { height: auto; min-height: 44px; padding: 6px 12px; white-space: normal; line-height: 1.25; text-align: center; }
  .sv-foot > .sv-actions > [data-sv-go] { grid-column: 1 / -1; order: -1; }
  .sv-foot > .sv-actions > [data-sv-newer][hidden] + [data-sv-go], .sv-foot > .sv-actions:has([data-sv-newer][hidden]) > [data-sv-skip] { grid-column: 1 / -1; }
  .sv-foot > .sv-actions > [data-sv-skip] { margin-right: 0; }
  .sv-cand { padding: 12px; }
}

/* Scores, achievements and XP (M4, launch step 7): boards drawn by progress.js, the level line, the account page's Level and XP section. */
.lb-list li[data-rank] { grid-template-columns: 26px minmax(0, 1fr) auto; }
.lb-list li[data-rank]::before { content: attr(data-rank); }
.lb-list li[data-rank].has-report { grid-template-columns: 26px minmax(0, 1fr) auto auto; }
.lb-who { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.lb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.lb-you { flex: none; color: var(--crimson-text); font-size: 12px; font-weight: 700; }
.lb-score { font-variant-numeric: tabular-nums; }
.lb-report { font-size: 11.5px; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; padding: 4px 6px; margin: -4px -6px -4px 0; border-radius: 6px; }
.lb-report:hover, .lb-report:focus-visible { color: var(--crimson-text); }
.lb-report[aria-hidden="true"] { visibility: hidden; } /* the own row's empty cell */
.lb-list li.me .lb-name { font-weight: 800; }
.lb-sub { margin: 16px 0 6px; font: 800 12.5px/1.2 var(--f-display); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.lb-winners li { font-size: 12.5px; padding: 4px 8px; }
.lb-me { margin: 6px 0 0; color: var(--muted); }
/* an empty live region stays in the page (display: none would take it out of the accessibility tree, and its first text would not be announced) */
.lb .fine[data-lb-state]:empty, .xp-board .fine[data-lb-state]:empty, .lb-me:empty { margin: 0; padding: 0; min-height: 0; border: 0; }
.lb-later { margin-top: 16px; }
/* M4 visual pass (2026-10-20): a toast's link can be pressed (the toasts let clicks through to the page); the game page's "Full leaderboard" link is a
   24 px target; "Last week's winners" has no heading and an empty list no space while it is empty (loading, or the board could not be read); the XP board's rows keep
   rank, name and score together on a wide screen; an unlocked achievement is told by its filled star, not by its colour alone. */
.toast button, .toast a { pointer-events: auto; }   /* only a toast's control takes the pointer (and the pointer on it holds the toast, app.js APN.toast); its text lets
   clicks through to the game under it. Until round 2 (2026-10-21) a toast with a control was a target as a whole (:has), up to 560 px over the game for up to 11.6 s. */
.toast .link { padding: 3px 2px; margin: -3px 0; font: inherit; color: #ffd27a; text-decoration: underline; text-underline-offset: 2px; }
.lb > .link { display: inline-block; padding: 3px 0; }
.lb-sub:has(+ .lb-winners:empty) { display: none; }
.lb-list:empty { display: none; }
.xp-board .lb-list { max-width: 760px; }
.ach li.got .ach-ico .ico { fill: currentColor; }
.who-menu .wm-level { display: block; margin-top: 2px; color: var(--gold); font-size: 12.5px; font-weight: 700; }
.acct-xp { display: grid; gap: 10px; }
.acct-xp > div[data-progress-body] { display: grid; gap: 8px; }
.acct-xp .fine { margin: 0; font-size: 13px; color: var(--muted); }
.acct-level { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0; }
.acct-level b { font: 900 24px/1.1 var(--f-display); }
.acct-level span { color: var(--gold); font-weight: 800; }
progress.acct-xp-bar { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border: 0; border-radius: 4px; background: var(--raised-2); overflow: hidden; color: var(--live); }
progress.acct-xp-bar::-webkit-progress-bar { background: var(--raised-2); border-radius: 4px; }
progress.acct-xp-bar::-webkit-progress-value { background: var(--live); border-radius: 4px; }
progress.acct-xp-bar::-moz-progress-bar { background: var(--live); border-radius: 4px; }
.acct-ach-h { margin: 12px 0 2px; font: 800 14px/1.2 var(--f-display); }
.acct-ach { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.acct-ach-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); }
.acct-ach-text { display: grid; gap: 2px; min-width: 0; }
.acct-ach-text b { font-size: 13.5px; overflow-wrap: anywhere; }
.acct-ach-text small { color: var(--muted); font-size: 12px; }
.sv-extra { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
@media (max-width: 767px) {
  .lb-list li[data-rank].has-report { grid-template-columns: 24px minmax(0, 1fr) auto auto; gap: 6px; }
  .lb-report { padding: 8px 6px; margin: -8px -6px -8px 0; }
}

/* Consent banner (src/static/consent.js): drawn at the bottom, above the phone tab bar; Accept and Reject share one class, so they look and press alike.
   z-index 70: above the tab bar (45), under the login drawer (80) and the toasts (90), so an open drawer is never covered (review B of PR 70, 320x568). */
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 70; max-width: 880px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 16px; border-radius: var(--r-l); background: var(--raised); border: 1px solid var(--line-strong); box-shadow: 0 16px 48px rgba(0, 0, 0, .55); color: var(--text); }
.consent-text { flex: 1 1 300px; margin: 0; font-size: 14px; line-height: 1.45; }
.consent-actions { display: flex; gap: 8px; }
.consent-btn { min-width: 96px; background: var(--raised-2); border: 1px solid var(--line-strong); }
.consent-link { font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) { .consent-link:hover { color: var(--text); } .consent-btn:hover { background: var(--press); } }
@media (max-width: 767px) {
  .consent { left: 8px; right: 8px; bottom: calc(60px + env(safe-area-inset-bottom) + 8px); }
  .consent-actions { flex: 1 1 100%; }
  .consent-btn { flex: 1 1 0; }
}
/* a short phone screen: the banner takes less of it */
@media (max-width: 767px) and (max-height: 640px) {
  .consent { padding: 10px 12px; gap: 8px 12px; }
  .consent-text { font-size: 13px; line-height: 1.4; }
}
/* consent.js moves the focus to the page's content when the button that held it goes; the content itself draws no ring */
.main[tabindex="-1"]:focus { outline: none; }
