/* The games store, game pages and account pages (WallaceOSSiteGames, 18 Nov 2026). Loaded only on those pages, after
   site.css, and uses only site.css's theme tokens (--bg --card --line --line2 --ink --dim --dim2 --gold --btn ...), so it
   moves to the WallaceOS shell by swapping the token sheet. Layout follows main's own width (container queries). */

/* ---------- the store (WallaceOSSiteV3, 19 Nov 2026): a compact head, the lead game, then the library ----------
   Type scale on these pages: 13 · 14 · 15 · 17 · 19 px + the two heading sizes. Cards are one shape: a 16:9 picture with the
   state on it, the name, a two-line verb line, one meta line, then Play / Buy. */
.store-head { padding:30px 0 18px; }
.store-head h1 { font-size:clamp(34px, 6cqi, 52px); margin:0 0 8px; }
.store-head .lede { margin-bottom:8px; }
.store-head .fine { margin:0; }
.store { padding-top:34px; }
.lib-head { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:4px 18px; margin-bottom:14px; }
.lib-head h2 { margin:0; font-size:clamp(26px, 4cqi, 34px); }
.lib-head .fine { margin:0; }
.lib-head h2 + .fine { margin-top:4px; }
.lib-order { display:flex; flex-wrap:wrap; align-items:center; gap:4px 14px; margin:0; font-size:15px; }
.lib-order .f-l { width:auto; }
.lib-order a { display:inline-flex; align-items:center; min-height:44px; color:var(--dim); font-weight:650; text-underline-offset:4px; }
.lib-order a[aria-current] { color:var(--ink); text-decoration-color:var(--gold); text-decoration-thickness:2px; }
.store-grid { list-style:none; margin:0; padding:0; display:grid; gap:16px; grid-template-columns:1fr; }
/* the card is the li (WallaceOSAllGamesCatalogue): the link fills it, the Play demo / Buy row sits under the link */
.game-card { display:flex; flex-direction:column; background:var(--card); border:1px solid var(--line); border-radius:16px; overflow:hidden; transition:border-color .15s, transform .15s, box-shadow .15s; }
.game-card:hover { border-color:var(--gold); transform:translateY(-2px); box-shadow:var(--shadow); }
.game-card .gc-link { display:flex; flex-direction:column; flex:1; color:var(--ink); text-decoration:none; }
.game-card .gc-link:focus-visible { outline:3px solid var(--focus); outline-offset:-3px; }
.gc-meta { font-size:14px; color:var(--dim2); font-variant-numeric:tabular-nums; }
.gc-why { font-size:14px; color:var(--dim); }
.gc-acts { display:flex; flex-wrap:wrap; gap:8px; padding:0 16px 16px; }
.gc-acts form { margin:0; }
.gc-acts > * { flex:1 1 auto; }
.gc-acts .btn { width:100%; }
.btn.sm { min-height:44px; padding:0 14px; font-size:15px; border-radius:11px; }
.btn[disabled] { cursor:not-allowed; }
/* a disabled Buy keeps its words readable (it was 2.45:1): the dashed edge and the plain card colour say "not yet" */
.btn.gold[disabled], .btn.line[disabled] { background:transparent; color:var(--dim); border:1px dashed var(--line2); opacity:1; }
.filters { display:grid; gap:6px; margin:0 0 18px; }
.f-row { display:flex; align-items:center; gap:8px; margin:0; min-width:0; }
.f-l { flex:none; width:58px; font-size:13px; font-weight:800; color:var(--dim2); text-transform:uppercase; letter-spacing:.08em; }
/* a phone: each facet is one row that scrolls sideways (no wall of chips); wider: the chips wrap */
.f-chips { display:flex; gap:6px; min-width:0; overflow-x:auto; scrollbar-width:none; padding:2px 0; -webkit-mask:linear-gradient(90deg, #000 88%, transparent); mask:linear-gradient(90deg, #000 88%, transparent); }
.f-chips::-webkit-scrollbar { display:none; }
.chip { flex:none; display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:0 14px; border-radius:999px; border:1px solid var(--line2); color:var(--ink); text-decoration:none; font-size:15px; font-weight:650; white-space:nowrap; }
.chip:hover { border-color:var(--gold); }
.chip.on { background:var(--btn); border-color:var(--btn); color:var(--btn-ink); }
.chip .n { font-size:13px; color:var(--dim2); font-variant-numeric:tabular-nums; }
.chip.on .n { color:var(--btn-ink); }
.chip.none { color:var(--dim2); border-style:dashed; }
.lib-count { margin:0 0 16px; color:var(--dim); font-size:15px; }
.lib-count b { color:var(--ink); }
.lib-none { padding:18px; border:1px dashed var(--line2); border-radius:14px; }
.coming-box { margin-top:34px; border-top:1px solid var(--line); padding-top:18px; }
.coming-box > summary { cursor:pointer; list-style:none; display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; min-height:44px; }
.coming-box > summary::-webkit-details-marker { display:none; }
.coming-box > summary::before { content:"\25B8" / ""; color:var(--gold); font-size:19px; transition:transform .2s; }
.coming-box[open] > summary::before { transform:rotate(90deg); }
.cb-h { font-size:clamp(22px, 3.4cqi, 28px); font-weight:800; letter-spacing:-.02em; }
.cb-n { color:var(--dim); font-size:15px; }
.store-grid.coming .game-card { opacity:.85; }
/* the picture: one 16:9 shape; the state sits on it, top left; a trailer is marked top right */
.game-card .cover { position:relative; display:block; aspect-ratio:16/9; background:var(--bg2); overflow:hidden; }
.game-card .cover img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .3s; }
.game-card:hover .cover img { transform:scale(1.03); }
.no-pic { position:absolute; inset:0; display:grid; place-items:center; color:var(--dim2); font-size:14px; }
.gc-state, .gc-trailer { position:absolute; top:10px; font-size:13px; font-weight:800; line-height:1; padding:6px 9px; border-radius:8px; background:rgba(8,9,11,.82); color:#f3f1ec; }
.gc-state { left:10px; }
.gc-trailer { right:10px; }
.gc-trailer::before { content:"\25B6" / ""; font-size:10px; margin-right:6px; vertical-align:1px; color:#e2b857; }
.gc-state.st-early-access { background:#e2b857; color:#1a1305; }
.gc-state.st-coming { background:rgba(8,9,11,.82); color:#cfc9bd; }
/* ---------- the lead game: always a dark stage, whatever the theme (like a game's own store capsule) ---------- */
.feature { padding:0 0 8px; }
.ft { display:grid; background:#0b0c0f; color:#f3f1ec; border:1px solid #2a2f38; border-radius:20px; overflow:hidden; }
.ft-media video, .ft-media img { width:100%; aspect-ratio:16/9; object-fit:cover; background:#000; display:block; }
.ft-info { padding:18px 18px 20px; display:grid; gap:10px; align-content:start; }
.ft-info > * { margin:0; }
.ft-kick { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; font-size:13px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; color:#e2b857; }
.ft-kick .gc-state { position:static; letter-spacing:0; text-transform:none; font-size:13px; }
.ft-name { font-size:clamp(32px, 5cqi, 46px); letter-spacing:-.03em; }
.ft-name a { color:#fff; text-decoration:none; }
.ft-name a:hover { text-decoration:underline; text-decoration-thickness:2px; }
.ft-line { font-size:19px; color:#d9d4c8; line-height:1.45; }
.ft .vhist { color:#c9c4b8; }
.ft .vhist b { color:#fff; }
.ft .vhist-l { color:#e2b857; }
.ft-buy .price-now { color:#e2b857; margin:0 0 8px; }
.ft-price { font-size:15px; color:#c9c4b8; }
.ft-price b { font-size:19px; color:#e2b857; margin-right:4px; }
.ft-buy .fine { color:#a9a397; margin:8px 0 0; }
.ft-buy .btn.gold { background:#e2b857; color:#1a1305; }
.ft-buy .btn.gold[disabled], .ft-buy .btn.line[disabled] { background:transparent; color:#c9c4b8; border:1px dashed #4a515d; }
.ft-acts { margin-top:2px; }
.ft-acts .btn.line { color:#f3f1ec; border-color:#4a515d; }
.ft-acts .btn.line:hover { border-color:#e2b857; }
.ft a:focus-visible { outline-color:#f3d48e; }
/* ---------- the version history strip (a line of words and a small timeline of the whole library) ---------- */
.vhist { margin:10px 0 0; font-size:15px; color:var(--dim); max-width:640px; }
.vhist-t { margin:0 0 6px; line-height:1.45; }
.vhist-l { display:inline-block; margin-right:6px; font-size:13px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; color:var(--gold); }
.vhist b { color:var(--ink); }
.vhist-page { margin:4px 0 6px; }
.more-like .store-grid { margin-top:4px; }
.price-now { font-size:26px; font-weight:800; color:var(--gold); margin:0 0 8px; }
.facts { display:grid; grid-template-columns:auto 1fr; gap:6px 14px; margin:18px 0 0; font-size:15px; }
.facts dt { color:var(--dim2); font-weight:700; }
.facts dd { margin:0; color:var(--ink); }
.facts dd.hash { font-family:var(--mono); font-size:13px; word-break:break-all; color:var(--dim); }
.gc-body { display:flex; flex-direction:column; gap:6px; padding:14px 16px 14px; flex:1; }
.gc-name { font-size:19px; font-weight:800; line-height:1.25; letter-spacing:-.01em; }
.gc-line { font-size:15px; color:var(--dim); line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:2.8em; }
.gc-meta { margin-top:auto; padding-top:4px; }
.gc-tags { display:flex; flex-wrap:wrap; gap:6px; padding-top:4px; }
.badge { font-size:13px; font-weight:700; padding:3px 9px; border-radius:999px; border:1px solid var(--line2); color:var(--dim); }
.badge.demo-ok { border-color:var(--gold); color:var(--gold); }
.badge.on { background:var(--gold); border-color:var(--gold); color:var(--btn-ink); }

.game-top { padding:22px 0 30px; }
.game-top h1 { font-size:clamp(32px, 5.5vw, 52px); margin:0 0 8px; }
.back { margin:0 0 14px; font-size:15px; }
.back a { color:var(--dim); text-decoration:none; }
.back a:hover { color:var(--ink); }
.gp-grid { display:grid; gap:18px; margin-top:18px; }
.gp-media video, .gp-media img { width:100%; aspect-ratio:16/9; object-fit:cover; background:#000; border-radius:16px; border:1px solid var(--line2); display:block; }
@media (max-width:700px) and (orientation:portrait) { .gp-media video.has-tall { aspect-ratio:9/16; width:auto; max-width:100%; max-height:78vh; margin:0 auto; } }
.gp-media figure { margin:0; }
.gp-media .fine { margin-top:8px; }
.gp-side { display:grid; gap:16px; align-content:start; background:var(--card); border:1px solid var(--line); border-radius:18px; padding:18px; }
.gp-side h2 { font-size:19px; margin:0 0 8px; }
.gp-side .form { padding:0; border:0; background:none; }
.gp-side .fine { margin:6px 0 0; }
.play-btn { border-color:var(--gold); }
.demo-note b { color:var(--ink); }
.follow { border-top:1px solid var(--line); padding-top:14px; }
.follow-form .btn { width:100%; }
.buy { border-top:1px solid var(--line); padding-top:14px; }
.price-plan { font-weight:600; }
/* the launch price (WallaceOSStoreLaunchPrice): the regular price struck through, the launch price in gold, places left */
.vh { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap; }
s.was { color:var(--dim); text-decoration-thickness:2px; }
.launch-line { margin:0 0 10px; padding:10px 12px; border:1px solid var(--gold); border-radius:12px; background:var(--bg2); line-height:1.45; }
.launch-line > b:first-of-type { color:var(--gold); }
.launch-line .left { white-space:nowrap; }
.launch-held { margin:0 0 10px; }
.gc-price { display:flex; gap:8px; align-items:baseline; flex-wrap:wrap; font-size:15px; border-top:1px solid var(--line); padding-top:10px; margin-top:6px; }
.gc-price b { color:var(--gold); font-size:17px; }
.gp-about { display:grid; gap:26px; }
.gp-about h2 { margin-top:0; }
.gp-about p { max-width:62ch; }
.early { border-left:3px solid var(--gold); padding:8px 0 8px 12px; color:var(--dim); }
.controls { display:grid; grid-template-columns:auto 1fr; gap:8px 16px; margin:0; }
.controls dt { font-family:var(--mono); font-size:14px; font-weight:700; color:var(--ink); background:var(--bg2); border:1px solid var(--line2); border-radius:7px; padding:3px 8px; justify-self:start; }
.controls dd { margin:0; color:var(--dim); align-self:center; }

.acct .form { margin-top:18px; }
.acct fieldset { border:0; padding:0; margin:0 0 12px; }
.acct legend { font-weight:800; margin-bottom:6px; }
.flash, .note-box, .local-box { background:var(--card); border:1px solid var(--line2); border-radius:14px; padding:12px 14px; }
.flash { border-color:var(--ok); }
.local-box { border-style:dashed; margin:18px 0; }
.local-box .btn { margin-top:8px; }
.owner-table { border-collapse:collapse; margin-top:18px; width:100%; max-width:720px; }
.owner-table th, .owner-table td { text-align:left; padding:9px 10px; border-bottom:1px solid var(--line); }
.owner-table td { font-variant-numeric:tabular-nums; }

@container (min-width:560px) {
  .store-grid { grid-template-columns:repeat(2, 1fr); }
}
@container (min-width:700px) {
  .f-chips { flex-wrap:wrap; overflow:visible; -webkit-mask:none; mask:none; }
  .f-row { align-items:flex-start; }
  .f-l { padding-top:13px; }
  .ft-info { padding:22px 26px 24px; }
}
@container (min-width:900px) {
  .store-grid { grid-template-columns:repeat(3, 1fr); gap:20px; }
  .gp-grid { grid-template-columns:1.6fr 1fr; align-items:start; }
  .gp-about { grid-template-columns:1.4fr 1fr; }
  /* the lead: the trailer large on the left, what it is and Buy on the right */
  .ft { grid-template-columns:minmax(0, 1.65fr) minmax(300px, 1fr); }
  .ft-media { align-self:stretch; background:#000; display:flex; align-items:center; }
  .ft-info { padding:26px 28px; align-self:center; }
}
/* a wide screen: the filters are a column beside the grid (it stays in view while you scroll), so the first row of games is on the
   first screen under the lead (blind critic, 19 Nov: four rows of chips had pushed the cards below the fold) */
@container (min-width:1000px) {
  .lib-body { display:grid; grid-template-columns:232px minmax(0, 1fr); gap:28px; align-items:start; }
  .lib-side { position:sticky; top:14px; max-height:calc(100vh - 28px); overflow-y:auto; scrollbar-width:thin; padding-right:4px; }
  .lib-side .filters { gap:16px; margin:0; }
  .lib-side .f-row { flex-direction:column; align-items:stretch; gap:6px; }
  .lib-side .f-l { width:auto; padding-top:0; }
  .lib-side .chip { min-height:44px; padding:0 12px; font-size:15px; }
  .lib-main .store-grid { grid-template-columns:repeat(3, minmax(0, 1fr)); gap:18px; }
  /* a short shelf (games.hide, WallaceOSHideRough): no filter column, the grid takes the full width */
  .lib-body.lib-few { display:block; }
}
@container (min-width:1300px) {
  .store-grid { grid-template-columns:repeat(4, 1fr); }
  .lib-main .store-grid { grid-template-columns:repeat(3, minmax(0, 1fr)); }
}
@container (min-width:1500px) {
  .lib-main .store-grid { grid-template-columns:repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion:reduce) { .game-card, .game-card .cover img { transition:none; } .game-card:hover, .game-card:hover .cover img { transform:none; } }
/* the private door's pages (lib/door.js): workspace and sign-out buttons in a wrapping row */
.door-ws, .door-out { display:flex; flex-wrap:wrap; gap:10px; margin:8px 0 18px; }
form.inline { display:inline; margin:0; }
/* WallaceOSDoorParity: the devices and passkeys lists, the add box, the activity table */
.door-list { list-style:none; padding:0; margin:10px 0 16px; display:grid; gap:10px; }
.door-item { border:1px solid rgba(207,165,74,.35); border-radius:10px; padding:10px 12px; overflow-wrap:anywhere; }
.door-item .fine { display:block; margin:2px 0 8px; }
.door-item form.inline { display:block; }
.door-here { font-size:.8em; font-weight:800; padding:1px 8px; border-radius:999px; border:1px solid #cfa54a; color:#cfa54a; margin-left:6px; }
#door-pk-add-box, #door-pk-use-box { display:grid; gap:8px; max-width:420px; margin:8px 0 18px; }
.door-table { overflow-x:auto; }
.door-table table { border-collapse:collapse; width:100%; font-size:.92em; }
.door-table th, .door-table td { text-align:left; padding:6px 8px; border-bottom:1px solid rgba(127,127,127,.25); vertical-align:top; }
/* the store (lib/shop.js): owned games, download rows, news, the admin tables */
.dl-list { list-style:none; padding:0; margin:12px 0; display:grid; gap:10px; }
.dl-list li { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; }
.dl-list .btn { max-width:100%; overflow-wrap:anywhere; }
.owned-game { border-top:1px solid var(--line); padding-top:14px; margin-top:18px; }
.owned-game details { margin-top:10px; }
.buy-form { margin:0; }
.buy .btn + .btn { margin-top:10px; }
.news-list { list-style:none; padding:0; display:grid; gap:10px; }
.table-scroll { overflow-x:auto; max-width:100%; }
.on { color:var(--ok); } .off { color:var(--gold, #e0b455); }
/* price votes and release goals (lib/votes.js, WallaceOSSiteVotes) */
.play-first { margin:16px 0 0; display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; }
.play-first .fine { margin:0; max-width:46ch; }
.vote { display:grid; gap:10px; }
.vote h2 { margin:0; }
.vote .promise { margin:0; font-weight:600; color:var(--ink); }
.goal-done { margin:0; justify-self:start; font-size:13px; font-weight:800; padding:3px 10px; border-radius:999px; background:var(--btn); color:var(--btn-ink); }
.goal { display:grid; gap:6px; }
.goal p { margin:0; }
.goal progress, .gc-vote progress, .owner-table progress { width:100%; height:12px; appearance:none; -webkit-appearance:none; border:1px solid var(--line2); border-radius:999px; background:var(--bg2); overflow:hidden; display:block; }
.goal progress::-webkit-progress-bar, .gc-vote progress::-webkit-progress-bar, .owner-table progress::-webkit-progress-bar { background:var(--bg2); }
.goal progress::-webkit-progress-value, .gc-vote progress::-webkit-progress-value, .owner-table progress::-webkit-progress-value { background:var(--gold); }
.goal progress::-moz-progress-bar, .gc-vote progress::-moz-progress-bar, .owner-table progress::-moz-progress-bar { background:var(--gold); }
.vote-median { margin:0; }
.vote-form { display:grid; gap:10px; }
.price-pick { border:0; padding:0; margin:0; display:grid; grid-template-columns:repeat(4, 1fr); gap:8px; min-width:0; }
.price-pick legend { padding:0; margin-bottom:8px; font-weight:700; font-size:15px; }
.pp { position:relative; display:block; cursor:pointer; }
.pp input { position:absolute; opacity:0; inset:0; width:100%; height:100%; margin:0; cursor:pointer; }
.pp span { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:48px; padding:6px 4px; border:1px solid var(--line2); border-radius:12px; font-weight:800; font-variant-numeric:tabular-nums; text-align:center; line-height:1.15; }
.pp small { font-size:12px; font-weight:600; color:var(--dim); }
.pp input:checked + span { border-color:var(--btn); background:var(--btn); color:var(--btn-ink); }
.pp input:checked + span::before { content:"\2713" / ""; font-size:13px; line-height:1; margin-bottom:2px; }
/* the Other box only once Other is picked (CSS only, so it works without JavaScript too) */
.vote-form:not(:has(#pv-o:checked)) .pv-other { display:none; }
.pp input:checked + span small { color:var(--btn-ink); }
.pp input:focus-visible + span { outline:3px solid var(--focus); outline-offset:2px; }
.pv-other { margin:0; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.pv-other label { font-weight:600; font-size:15px; }
.gp-side .pv-other input { width:7.5em; min-height:48px; }
.vote-form .btn, .vote-undo .btn { width:100%; }
.vote-undo { margin:0; }
.gc-vote { display:grid; gap:5px; font-size:14px; color:var(--dim); border-top:1px solid var(--line); padding-top:10px; margin-top:6px; }
.gc-vote b { color:var(--ink); }
.goal-form { display:grid; gap:4px; max-width:420px; }
.goal-form p { margin:0; display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.goal-form input, .goal-form select { min-height:40px; }
.admin-game { border-top:1px solid var(--line); padding-top:14px; margin-top:22px; }
.my-votes { padding-left:20px; }

/* reviews, discussions, bug reports (WallaceOSCommunity) */
.community h2 { margin-top:28px; }
.rv-sum { font-size:17px; }
.review, .post, .mod-item { border:1px solid var(--line2); border-radius:14px; padding:12px 14px; margin:12px 0; background:var(--card); overflow-wrap:anywhere; }
.post.by-dev, .dev-reply { border-color:var(--gold); }
.dev-reply { border:1px solid var(--gold); border-radius:12px; padding:8px 12px; margin-top:10px; }
.rv-head { margin:0 0 4px; }
.rv-mark { display:inline-block; font-weight:800; padding:3px 10px; border-radius:999px; border:1px solid var(--line2); }
.rv-mark.up { border-color:var(--ok); color:var(--ok); }
.rv-mark.up::before { content:"\2713  " / ""; }
.rv-mark.down::before { content:"\2715  " / ""; }
.rv-meta { font-size:14px; color:var(--dim); margin:0 0 6px; }
.rv-meta .who { color:var(--ink); }
.badge.dev { background:var(--gold); border-color:var(--gold); color:var(--btn-ink); }
.rv-text p, .post-text p { margin:0 0 8px; }
.rv-pick { display:grid; grid-template-columns:1fr 1fr; gap:8px; border:0; padding:0; margin:0 0 8px; }
.rv-pick legend { font-weight:750; margin-bottom:6px; }
.flag { margin-top:6px; font-size:14px; }
.flag summary { cursor:pointer; color:var(--dim); min-height:44px; display:inline-flex; align-items:center; }
.flag fieldset { border:0; padding:0; margin:6px 0; }
.flag .check { display:flex; gap:8px; align-items:center; min-height:40px; }
.threads { list-style:none; padding:0; }
.thread-row { padding:12px 0; border-bottom:1px solid var(--line); }
.thread-row a { display:inline-block; min-height:28px; }
.form select { width:100%; font:inherit; font-size:16px; color:var(--ink); background:var(--bg); border:1px solid var(--line2); border-radius:11px; padding:12px 13px; min-height:50px; }
.form input[type="file"] { width:100%; font:inherit; font-size:15px; color:var(--ink); padding:10px 0; min-height:50px; }
.bug-history { padding-left:20px; }
pre.sys { white-space:pre-wrap; overflow-wrap:anywhere; background:var(--card); border:1px solid var(--line2); border-radius:12px; padding:10px; font-size:13px; }
.bug-links code { overflow-wrap:anywhere; }
.community-links .row .btn { flex:1 1 220px; }
.err ul { margin:6px 0 0; padding-left:20px; }
