/* Rift Record for the collection: the same tokens, faces and devices as
   /matches/rift.css and the app (Design/RiftRecord). Loaded after the page's
   own layout rules, so this file only changes the look, never the layout. */

:root {
  --ground: #030812; --ground-hi: #091428; --ground-deep: #02050B; --ground-light: #0F2440; --arcane: #0AC8B9;
  --gold: #D8B56E; --gold-frame: #C8AA6E; --gold-light: #F0E6D2; --gold-dark: #785A28; --victory: #F4C660; --lost: #E84057;
  --ink: #F0E6D2; --ink2: #CFC8B8; --mute: #A09B8C; --dim-c: #5B5A56; --control: #B9B3A6; --tab-rest: #7D7A72; --hair: rgba(240,230,210,.09);
  --line: rgba(240,230,210,.09); --line2: rgba(200,170,110,.28); --soft: rgba(9,20,40,.55); --soft2: rgba(240,230,210,.05);
  --panel: #050c18; --panel2: #0a1628;
  --f-display: "Cinzel", Georgia, serif;
  --f-title: "DIN Condensed", "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-num: "M PLUS Rounded 1c", "Nunito", system-ui, sans-serif;
  --f-read: "Nunito", system-ui, -apple-system, sans-serif;
  --nav: 56px;
  --rule: linear-gradient(90deg, #785A28, #F0E6D2, #785A28);
  --frame: linear-gradient(180deg, #C8AA6E, #785A28);
  --dialog: linear-gradient(180deg, #0c1a33, #050c18);
  --hex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='97'%3E%3Cpath d='M42 1L83 25L83 72L42 96L1 72L1 25Z M42 25L62 37 M42 25L42 1 M22 37L42 25 M62 37L62 60L83 72' fill='none' stroke='%236EBEE6' stroke-opacity='.2' stroke-width='.8'/%3E%3Cg fill='%230AC8B9' fill-opacity='.3'%3E%3Ccircle cx='62' cy='37' r='1.6'/%3E%3Ccircle cx='22' cy='37' r='1.6'/%3E%3Ccircle cx='62' cy='60' r='1.6'/%3E%3C/g%3E%3C/svg%3E");
  --hex-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='32.33'%3E%3Cpath d='M14 .5L27.5 8.3L27.5 24L14 31.8L.5 24L.5 8.3Z' fill='none' stroke='%23C8AA6E' stroke-opacity='.08' stroke-width='.75'/%3E%3C/svg%3E");
  color-scheme: dark;
}

/* ------------------------------------------------------------- ground */
body { background: var(--ground); color: var(--ink); font: 600 15px/1.4 var(--f-read); }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 55% at 50% -6%, #0F2440 0%, rgba(9,20,40,.6) 50%, rgba(9,20,40,0) 100%), linear-gradient(180deg, #091428 0%, #030812 55%, #02050b 100%); }
.main { position: relative; isolation: isolate; }
.main::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 620px; z-index: -1; pointer-events: none; background: var(--hex); background-position: -16px -30px;
  -webkit-mask-image: linear-gradient(180deg, #000 10%, transparent 95%); mask-image: linear-gradient(180deg, #000 10%, transparent 95%); }
h1, h2, h3 { color: var(--ink); }
.eyebrow { font: 700 13px/1 var(--f-read); letter-spacing: 0; text-transform: none; opacity: 1; color: var(--gold); }
.fact, .lede, .intro, .counter, .hint { color: var(--mute); opacity: 1; }
code, kbd { background: rgba(240,230,210,.06); border-color: rgba(200,170,110,.3); border-radius: 2px; color: var(--ink2); }
select { color: var(--ink); } select option { background: #0a1628; color: var(--ink); }
.num, .side-total, .side-n, .cl-n b, .set-n, .badge, .step b, .pager-label b, .page-head em, .money, .under .pr, .have b, .selbar .sel-n b, .tier i { font-family: var(--f-num); font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------- nav */
.topnav.rnav { position: relative; z-index: 30; height: var(--nav); display: flex; align-items: center; gap: 26px; padding: 0 24px;
  background: rgba(3,8,18,.72); border-bottom: 1px solid var(--hair); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.rnav .brand { display: flex; align-items: center; gap: 10px; font: 700 18px/1 var(--f-title); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-light); }
.rnav .brand img { width: 28px; height: 28px; border-radius: 7px; }
.rnav .brand span, .rnav .tabs a span { padding-top: 3px; }
.rnav .tabs { display: flex; gap: 26px; align-items: center; }
.rnav .tabs a { position: relative; display: flex; align-items: center; height: 40px; font: 700 20px/1 var(--f-title); color: var(--tab-rest); }
.rnav .tabs a:hover { color: var(--ink2); }
.rnav .tabs a[aria-current] { color: var(--gold-light); }
.rnav .tabs a[aria-current]::after { content: ""; position: absolute; left: -6px; right: -6px; bottom: 0; height: 2px; background: var(--rule); }
.rnav .tabs a[aria-current]::before { content: ""; position: absolute; left: 50%; bottom: -2.5px; width: 6px; height: 6px; margin-left: -3px; transform: rotate(45deg); background: var(--gold-light); }
.rnav .who { margin-left: auto; display: flex; align-items: center; gap: 18px; font: 700 13px/1 var(--f-read); color: var(--mute); opacity: 1; min-width: 0; }
.rnav .who #who-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.rnav .who button, .rnav .get-app { background: none; border: 0; padding: 0; font: 700 15px/1 var(--f-read); color: var(--control); cursor: pointer; border-radius: 0; }
.rnav .who button:hover, .rnav .get-app:hover { color: var(--ink); border: 0; }
.rnav .get-app { margin-left: auto; }
.live { display: inline-flex; align-items: center; gap: 7px; }
.live i, .live-dot { width: 6px; height: 6px; border-radius: 0; transform: rotate(45deg); background: var(--arcane); box-shadow: none; }
@media (min-width: 900px) { body.in-app .topnav.rnav { display: flex; } body.in-app .shell { min-height: calc(100vh - var(--nav)); } }
@media (max-width: 899px) { .rnav { gap: 18px; padding: 0 16px; } .rnav .brand span { display: none; } .rnav .who .live, .rnav .who #who-name { display: none; } }

/* ----------------------------------------------------------- sidebar */
.side { background: linear-gradient(180deg, rgba(9,20,40,.55), rgba(2,5,11,.35)); border-right: 1px solid var(--hair); padding-top: 26px; }
.side-head { padding: 0 10px 20px; }
.side-total { font-weight: 900; font-size: 46px; letter-spacing: -.01em; color: var(--ink); margin-top: 10px; }
.side-total span { font: 900 18px/1 var(--f-read); opacity: 1; color: var(--ink); margin-left: 10px; }
.side-sub { color: var(--ink2); opacity: 1; font-weight: 700; }
.side-search { border: 0; border-bottom: 1px solid var(--hair); border-radius: 0; background: none; padding: 12px 10px; font: 700 15px/1 var(--f-read); color: var(--control); }
.side-search svg { color: var(--mute); }
.side-search:hover { background: rgba(240,230,210,.03); border-color: rgba(200,170,110,.45); color: var(--ink); }
.side-search.on { background: none; border-color: rgba(200,170,110,.6); color: var(--gold-light); }
.side-search.on svg { color: var(--gold-light); }
.side-sec { font: 700 22px/1 var(--f-title); letter-spacing: 0; text-transform: none; opacity: 1; color: var(--ink); padding: 28px 10px 10px; gap: 10px; }
.side-sec::after { content: ""; flex: 1; height: 1px; margin-left: 4px; background: linear-gradient(90deg, rgba(200,170,110,.5), rgba(200,170,110,.08)); order: 1; }
.side-add { order: 2; border-radius: 0; border-color: rgba(200,170,110,.45); color: var(--gold-light); }
.side-add:hover { border-color: var(--gold-light); color: var(--gold-light); }
.side-set, .side-place { border-radius: 0; padding: 7px 10px; }
.side-set:hover, .side-place:hover { background: rgba(240,230,210,.04); }
.side-set.on, .side-place.on { background: linear-gradient(90deg, rgba(200,170,110,.16), rgba(200,170,110,0)); }
.side-set.on::before, .side-place.on::before { left: 0; top: 0; bottom: 0; width: 2px; border-radius: 0; background: linear-gradient(180deg, #785A28, #F0E6D2, #785A28); }
.side-set img, .side-all { border-radius: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.6); }
.side-all { background: linear-gradient(135deg, #0F2440, #3a2a10); font-family: var(--f-read); color: var(--gold-light); }
.side-all.code { background: rgba(240,230,210,.04); border-color: var(--hair); }
.side-set-t b, .side-place b { font: 700 18px/1 var(--f-title); padding-top: 3px; color: var(--ink2); }
.side-set.on b, .side-place.on b { color: var(--gold-light); }
.side-n { font-size: 13px; color: var(--mute); opacity: 1; font-weight: 800; }
.side-n.done { color: var(--victory); }
.side-place .kind { border-radius: 0; border-color: var(--hair); color: var(--mute); opacity: 1; font-family: var(--f-read); }
.side-foot { opacity: 1; color: var(--mute); }
.side-foot button { border: 0; padding: 0; border-radius: 0; color: var(--control); font: 700 14px/1 var(--f-read); }
.side-foot button:hover { color: var(--ink); }

/* Gold progress, thin and square, as the app's set rows. */
.bar, .bar-line { height: 2px; border-radius: 0; background: rgba(240,230,210,.1); }
.bar i, .bar-line i { border-radius: 0; background: linear-gradient(90deg, #785A28, #D8B56E 70%, #F0E6D2); }

/* ------------------------------------------------------- word controls */
/* RiftControlLabel: words on the rule, the gold mark under the active one. */
.lens, .words, .seg { gap: 24px; border: 0; border-radius: 0; background: none; overflow: visible; }
.lens button, .words button, .seg button { position: relative; padding: 0; height: 36px; font: 700 15px/1 var(--f-read); color: var(--control); opacity: 1; }
.lens button:hover, .words button:hover, .seg button:hover { color: var(--ink); }
.lens button[aria-selected="true"], .words button[aria-pressed="true"], .seg button[aria-pressed="true"] { background: none; color: var(--gold-light); }
.lens button[aria-selected="true"]::after, .words button[aria-pressed="true"]::after, .seg button[aria-pressed="true"]::after {
  content: ""; position: absolute; left: -4px; right: -4px; bottom: -1px; height: 2px; background: var(--rule); }
.lens button[aria-selected="true"]::before, .words button[aria-pressed="true"]::before, .seg button[aria-pressed="true"]::before {
  content: ""; position: absolute; left: 50%; bottom: -3.5px; width: 6px; height: 6px; margin-left: -3px; transform: rotate(45deg); background: var(--gold-light); z-index: 1; }
.seg-more { border: 0; padding: 0; opacity: 1; background: none; }
.seg-more select, .addto select, .sel-move select { -webkit-appearance: none; appearance: none; padding-right: 18px; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M2 3.5l3 3 3-3' fill='none' stroke='%23C8AA6E' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 2px center / 10px no-repeat; }
.seg-more select { font: 700 15px/1 var(--f-read); color: var(--control); }
.seg-more.in { background: none; } .seg-more.in select { color: var(--gold-light); }
.pill, .addto { height: 36px; padding: 0; border: 0; border-radius: 0; background: none; font: 700 15px/1 var(--f-read); color: var(--control); gap: 7px; }
.pill:hover, .addto:hover { border: 0; color: var(--ink); }
.pill.in { background: none; color: var(--gold-light); }
.pill.small { height: 28px; font-size: 13px; }
.addto span { color: var(--mute); opacity: 1; }
.addto select { color: var(--gold-light); font-weight: 700; }
.tb-row { gap: 8px 26px; }
details.more summary { list-style: none; }

/* HextechButton: dark fill in a gold gradient frame. */
.btn { border-radius: 0; border: 1px solid transparent; background: linear-gradient(var(--ground-hi), var(--ground-hi)) padding-box, var(--frame) border-box;
  color: var(--gold-light); font: 700 18px/1 var(--f-title); letter-spacing: .4px; padding: 14px 22px 11px; box-shadow: inset 0 0 0 1px rgba(200,170,110,.18); }
.btn:hover { background: linear-gradient(#0c1a33, #0c1a33) padding-box, var(--frame) border-box; border-color: transparent; }
.btn.gold { background: linear-gradient(180deg, #F0E6D2, #C8AA6E 45%, #9A7420) padding-box, var(--frame) border-box; color: #0a0d14; }
.btn.danger { background: linear-gradient(var(--ground-hi), var(--ground-hi)) padding-box, linear-gradient(180deg, #E84057, #7a1e2c) border-box; color: #F6C3CB; }
.link { color: var(--control); opacity: 1; }
.crumb { color: var(--control); opacity: 1; } .crumb:hover { color: var(--ink); }

/* RiftDropdown */
.menu, #ctx { border-radius: 0; background: var(--dialog); border: 1px solid rgba(200,170,110,.45); box-shadow: 0 24px 50px -12px rgba(0,0,0,.8); padding: 8px 0; }
.menu button, #ctx button { border-radius: 0; padding: 11px 16px; font: 700 15px/1 var(--f-read); color: var(--control); }
.menu button:hover, #ctx button:hover { background: rgba(240,230,210,.05); color: var(--ink); }
.menu .danger { color: var(--lost); }
.menu-title { font: 700 12px/1 var(--f-read); letter-spacing: 0; text-transform: none; color: var(--mute); opacity: 1; padding: 6px 16px 8px; }

/* ------------------------------------------------------------- home */
/* Section titles: DIN words with a fading gold rule, as in the app. */
.sec { display: flex; align-items: center; gap: 12px; font: 700 24px/1 var(--f-title); letter-spacing: 0; text-transform: none; color: var(--ink); opacity: 1; margin: 34px 0 16px; padding-top: 3px; }
.sec::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(200,170,110,.5), rgba(200,170,110,.12)); }
.sec i { font: 700 13px/1 var(--f-read); color: var(--mute); opacity: 1; order: 2; }
.home-head h1 { font: 900 60px/.95 var(--f-num); letter-spacing: -.01em; }
.home-head h1 .unit { font: 900 22px/1 var(--f-read); opacity: 1; }
.search { border-radius: 0; border: 0; border-bottom: 1px solid var(--hair); background: none; padding: 0 4px; }
.search:focus-within { border-color: rgba(200,170,110,.6); box-shadow: none; }
.search svg { color: var(--mute); opacity: 1; }
.search input { color: var(--ink); font: 600 18px/1 var(--f-read); }
.search input::placeholder { color: var(--dim-c); }
.searchbar .addto { padding: 0 6px; }
.set-tile { border-radius: 0; border: 1px solid rgba(180,186,197,.24); background: var(--ground-hi); }
.set-tile:hover { border-color: rgba(200,170,110,.8); box-shadow: 0 22px 40px -24px rgba(0,0,0,.9); }
.set-tile::after { background: linear-gradient(180deg, rgba(2,5,11,0) 30%, rgba(2,5,11,.55) 62%, rgba(2,5,11,.94)); }
.set-tile.done { border-color: rgba(244,198,96,.85); }
.set-tile-all { background: radial-gradient(80% 90% at 20% 20%, rgba(15,36,64,.9), transparent), radial-gradient(70% 80% at 90% 80%, rgba(200,170,110,.3), transparent), var(--hex-gold), var(--ground-hi); }
.set-tile-t b { font: 700 30px/1 var(--f-title); padding-top: 3px; text-shadow: 0 2px 14px rgba(0,0,0,.9); }
.set-tile-t .eyebrow { color: var(--gold); opacity: 1; letter-spacing: .12em; font-size: 12px; }
.set-n { color: var(--ink2); opacity: 1; font-weight: 800; font-size: 14px; }
.set-tile.done .set-n { color: var(--victory); }
.back-binder { border-radius: 0; border: 1px solid transparent; background: linear-gradient(90deg, rgba(15,36,64,.9), rgba(9,20,40,.6)) padding-box, var(--frame) border-box; }
.back-binder img { border-radius: 0; }
.back-binder b { font: 700 26px/1 var(--f-title); padding-top: 3px; }
.back-binder i { color: var(--gold-light); }
.place-row { border-radius: 0; border: 1px solid rgba(180,186,197,.24); background: rgba(9,20,40,.55); }
.place-row:hover { border-color: rgba(200,170,110,.7); }
.place-row b { font: 700 22px/1 var(--f-title); padding-top: 3px; }
.place-row > span:last-child { color: var(--mute); opacity: 1; }

/* ------------------------------------------------------------ header */
.hbar { background: rgba(3,8,18,.88); border-bottom: 0; padding-bottom: 14px; }
.hbar::after { content: ""; position: absolute; left: clamp(16px, 2.4vw, 40px); right: clamp(16px, 2.4vw, 40px); bottom: 0; height: 1px;
  background: linear-gradient(90deg, rgba(200,170,110,.55), rgba(200,170,110,.18)); }
.hbar::before { content: ""; position: absolute; right: calc(clamp(16px, 2.4vw, 40px) - 3px); bottom: -3px; width: 5px; height: 5px; transform: rotate(45deg);
  border: 1.2px solid rgba(200,170,110,.9); background: var(--ground); z-index: 1; }
.bar-bg { background: var(--hex); background-position: -16px -30px; }
.bar-bg img { opacity: .55; -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); mask-image: linear-gradient(90deg, transparent, #000 60%); }
.bar-bg::after { background: linear-gradient(180deg, rgba(3,8,18,0) 30%, rgba(3,8,18,.75)), linear-gradient(90deg, rgba(3,8,18,.7), rgba(3,8,18,0) 55%); }
.bar-bg img.card { opacity: .4; }
.bar-bg.plain { background: radial-gradient(50% 140% at 90% 0%, rgba(15,36,64,.9), transparent), var(--hex); }
.bar-title .eyebrow { color: var(--gold); }
.bar-title h1 { font: 700 44px/1 var(--f-title); letter-spacing: 0; padding-top: 4px; text-shadow: 0 2px 18px rgba(2,5,11,.6); }
.hbar .crumb { border-color: rgba(200,170,110,.45); color: var(--gold-light); border-radius: 50%; }
.complete-line { border-left-color: var(--hair); }
.cl-n { color: var(--ink2); opacity: 1; font-weight: 800; } .cl-n b { font-size: 22px; color: var(--ink); font-weight: 900; }
.complete-line em { color: var(--gold); opacity: 1; font-weight: 700; font-size: 13px; }
.pager > button { border-radius: 0; border: 1px solid rgba(200,170,110,.35); background: rgba(3,8,18,.7); color: var(--gold-light); font-weight: 700; }
.pager > button:not(:disabled):hover { border-color: var(--gold-light); color: var(--gold-light); }
.pager .pager-label { border-radius: 0; font: 700 22px/1 var(--f-title); padding: 0 16px; }
/* The page turner: arrows and label optically centred in their plates.
   The title face sits high in its line box, so the label is trimmed to its
   cap height before centring. */
.pager > button { display: inline-flex; align-items: center; justify-content: center; padding-top: 0; padding-bottom: 0; }
.pager > button svg { display: block; }
.pager .pager-label { align-items: center; gap: 7px; }
.pager-label b, .pager-label span { line-height: 1; text-box: trim-both cap alphabetic; }
.pager-label b { font-family: var(--f-title); font-weight: 700; color: var(--ink); }
.pager-label span { color: var(--mute); opacity: 1; font-weight: 700; }
.findbox { border-radius: 0; background: var(--dialog); border-color: rgba(200,170,110,.45); }
.findbox input { border-radius: 0; background: rgba(2,5,11,.6); border-color: var(--hair); color: var(--ink); }
#find-hits button { border-radius: 0; }
#find-hits span { color: var(--mute); opacity: 1; }
/* The page map: square cells, filled in gold, the open pages outlined. */
.pagemap { height: 14px; gap: 2px; }
.pm { border-radius: 0; background: rgba(240,230,210,.07); }
.pm i { background: rgba(200,170,110,.5); }
.pm.full i { background: linear-gradient(180deg, #F0E6D2, #C8AA6E 50%, #9A7420); }
.pm:hover { background: rgba(240,230,210,.16); }
.pm.on { box-shadow: 0 0 0 1.5px var(--gold-light); background: rgba(240,230,210,.18); }

/* ------------------------------------------------------------ binder */
.page { border-radius: 2px; background: linear-gradient(180deg, rgba(15,36,64,.5), rgba(9,20,40,.35)), var(--hex-gold); border: 1px solid rgba(180,186,197,.22); }
.spread.two .page:first-of-type { border-radius: 2px 0 0 2px; }
.spread.two .page + .page { border-radius: 0 2px 2px 0; box-shadow: inset 18px 0 24px -20px rgba(0,0,0,.9); }
.page.complete { border-color: rgba(244,198,96,.85); box-shadow: 0 20px 50px -34px rgba(244,198,96,.6); }
.page-head { height: 40px; padding-top: 13px; }
.page-head b { font: 700 11px/1 var(--f-display); letter-spacing: 1.6px; color: var(--gold-light); }
.page-head span { color: var(--mute); opacity: 1; font-weight: 700; }
.page-head em { color: var(--ink2); opacity: 1; font-weight: 900; font-size: 14px; }
.page.complete .page-head em { color: var(--victory); }
.turn span { border-color: rgba(200,170,110,.4); background: rgba(3,8,18,.7); color: var(--gold-light); font-weight: 700; }
.turn:not(:disabled):hover span { border-color: var(--gold-light); color: var(--gold-light); }
.art { background: linear-gradient(160deg, #10203a, #050b16); }
.empty-slot .frame { border-color: rgba(200,170,110,.14); }
.pocket:hover .art { box-shadow: 0 18px 30px -16px #000, 0 0 0 1px rgba(200,170,110,.6); }
/* The count: the app's dark plate with a gold edge; a full playset turns gold. */
.badge { border-radius: 0; background: rgba(2,5,11,.86); border: 0; box-shadow: inset 0 0 0 1px rgba(200,170,110,.75), 0 4px 12px rgba(0,0,0,.5);
  color: var(--gold-light); font-weight: 900; height: 24px; min-width: 24px; }
.badge small { color: var(--mute); opacity: 1; }
.pocket.full .badge { background: linear-gradient(180deg, #FBF1D8, #F4C660); color: var(--ground-deep); box-shadow: 0 4px 12px rgba(0,0,0,.5); }
.pocket.full .badge small { color: rgba(2,5,11,.6); }
.prism { border-radius: 0; background: rgba(2,5,11,.82); border-color: rgba(201,168,255,.5); }
.under { color: var(--mute); opacity: 1; font-weight: 700; font-size: 12px; }
.under .pr { color: var(--ink2); font-weight: 800; }
.pocket.has .under .nm { color: var(--ink2); }
.pocket.bump .art { box-shadow: 0 0 0 2px var(--gold-light), 0 0 22px -4px rgba(244,198,96,.6); }
.row.bump { background: rgba(200,170,110,.08); }

/* Stepper: square, the app's − n + plate. */
.step { border-radius: 0; border: 1px solid rgba(200,170,110,.45); background: rgba(2,5,11,.9); }
.step button { border-radius: 0; color: var(--gold-light); font-weight: 700; }
.step button:not(:disabled):hover { color: var(--ink); background: rgba(200,170,110,.14); }
.step b { color: var(--ink); font-weight: 900; }
.pocket.full .step b, .step.full b { color: var(--victory); }
.pocket.full .step { border-color: rgba(244,198,96,.75); }
.empty { color: var(--ink2); opacity: 1; }
.set-done { font: 700 13px/1 var(--f-display); letter-spacing: 1.6px; color: var(--victory); }
.keys { color: var(--mute); opacity: .8; }

/* Search tiles, place rows */
.tile-t b { font: 700 18px/1.05 var(--f-title); padding-top: 2px; color: var(--ink); }
.tile-t span { color: var(--mute); opacity: 1; font-weight: 700; }
.tile-t .where { color: var(--ink2); opacity: 1; }
.money { color: var(--gold-light); font-weight: 900; }
.tag { border-radius: 0; border-color: rgba(200,170,110,.5); color: var(--gold-light); opacity: 1; }
.row { border-radius: 0; }
.row:hover { background: rgba(240,230,210,.04); }
.row-art img, .row-art, .others button, .others img, .pl img { border-radius: 2px; }
.row-text b { font: 700 18px/1.05 var(--f-title); padding-top: 2px; }
.row-text span { color: var(--mute); opacity: 1; font-weight: 700; }
.lbl { color: var(--mute); opacity: 1; }

/* ----------------------------------------------------------- sign in */
.signin-wrap { min-height: calc(100vh - var(--nav)); }
.signin { border-radius: 0; border: 1px solid transparent; background: var(--dialog) padding-box, linear-gradient(180deg, rgba(200,170,110,.7), rgba(120,90,40,.4)) border-box; }
.signin .eyebrow { font-family: var(--f-read); }
.signin h1 { font: 700 40px/1 var(--f-title); padding-top: 4px; }
.signin .lede { color: var(--ink2); }
.signin button { border-radius: 0; border: 1px solid transparent; background: linear-gradient(var(--ground-hi), var(--ground-hi)) padding-box, var(--frame) border-box;
  color: var(--gold-light); font: 700 19px/1 var(--f-title); letter-spacing: .4px; padding: 16px 20px 13px; }
.signin button:hover { background: linear-gradient(#0c1a33, #0c1a33) padding-box, var(--frame) border-box; }
.signin button.apple { background: linear-gradient(var(--ground-hi), var(--ground-hi)) padding-box, var(--frame) border-box; color: var(--gold-light); }
.signin .fine { color: var(--mute); opacity: 1; }
.wall img { border-radius: 2px; }

/* ------------------------------------------------------------ sheets */
/* RiftDialog: the deep blue plate, one gold border, square. */
dialog.sheet { border-radius: 0; border: 1px solid rgba(200,170,110,.5); background: var(--dialog); color: var(--ink); }
@media (min-width: 900px) { dialog.sheet.filter, dialog.sheet.view { border-radius: 0; border-right: 0; } }
dialog::backdrop { background: rgba(2,5,11,.7); }
.sheet-head h2 { font: 700 32px/1 var(--f-title); padding-top: 4px; }
.sheet-head p { color: var(--mute); opacity: 1; font-weight: 700; }
.x { border-radius: 50%; background: none; border-color: rgba(200,170,110,.45); color: var(--gold-light); }
.x:hover { border-color: var(--gold-light); }
dialog h3 { display: flex; align-items: center; gap: 12px; font: 700 21px/1 var(--f-title); letter-spacing: 0; text-transform: none; color: var(--ink); opacity: 1; margin: 24px 0 12px; padding-top: 3px; }
dialog h3::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(200,170,110,.45), rgba(200,170,110,.08)); }
.chip { border-radius: 0; border-color: var(--hair); background: rgba(240,230,210,.03); color: var(--control); font: 700 14px/1 var(--f-read); }
.chip:hover { border-color: rgba(200,170,110,.5); color: var(--ink); }
.chip i { color: var(--mute); opacity: 1; }
.chip.in { border-color: rgba(200,170,110,.85); background: rgba(200,170,110,.12); color: var(--gold-light); }
.chip.out { border-color: var(--lost); }
.sheet-foot { background: #050c18; }
.opt { border-radius: 0; border-color: var(--hair); background: rgba(240,230,210,.03); }
.opt:hover { border-color: rgba(200,170,110,.5); }
.opt span { color: var(--mute); opacity: 1; }
.opt.in { border-color: rgba(200,170,110,.85); background: rgba(200,170,110,.1); color: var(--gold-light); }
.field input, .field select { border-radius: 0; border-color: var(--hair); background: rgba(2,5,11,.6); color: var(--ink); }
.tier { border-bottom-color: var(--hair); }
.tier:hover { background: rgba(240,230,210,.03); }
.tier > span > span { color: var(--mute); opacity: 1; }
.big-art { border-radius: 4.5% / 3.2%; }
.have b { font-weight: 900; font-size: 26px; } .have span { color: var(--mute); opacity: 1; }
.where-row { border-top-color: var(--hair); }
.where-row > div:first-child span { color: var(--mute); opacity: 1; }
.pcol { border-radius: 0; background: rgba(240,230,210,.03); box-shadow: inset 0 0 0 1px var(--hair); }
.rules { color: var(--ink2); opacity: 1; white-space: pre-line; }
.foot { color: var(--mute); opacity: 1; }

/* -------------------------------------------------------- many at once */
.pocket.sel .art, .row.sel .row-art { box-shadow: 0 0 0 2px var(--gold-light), 0 0 26px -6px rgba(244,198,96,.55); }
.pocket.sel .frame::after { border-radius: 0; transform: translate(-50%, -50%) rotate(45deg); width: 34px; height: 34px; background: linear-gradient(180deg, #FBF1D8, #F4C660); content: ""; }
.row.sel { background: rgba(200,170,110,.08); }
.marquee { border-radius: 0; border-color: var(--gold-light); background: rgba(200,170,110,.1); }
.selbar { border-radius: 0; background: var(--dialog); border-color: rgba(200,170,110,.6); }
.selbar .sel-n b { color: var(--gold-light); }
.selbar button, .sel-move { border-radius: 0; border-color: var(--hair); background: rgba(240,230,210,.03); font: 700 14px/1 var(--f-read); color: var(--control); }
.selbar button:hover, .sel-move:hover { border-color: rgba(200,170,110,.7); color: var(--ink); }
.sel-move select { color: var(--gold-light); }
.dragghost { border-radius: 0; background: linear-gradient(180deg, #FBF1D8, #F4C660); color: var(--ground-deep); }
[data-drop].drop { background: rgba(200,170,110,.2) !important; outline-color: var(--gold-light) !important; }
.peek { box-shadow: 0 40px 90px -20px #000, 0 0 0 1px rgba(200,170,110,.5); }

.paste-grid textarea, .paste-out, .pl select { border-radius: 0; border-color: var(--hair); background: rgba(2,5,11,.6); color: var(--ink); }
.paste-grid textarea:focus { border-color: rgba(200,170,110,.6); }
.pl { border-top-color: var(--hair); }
.side-paste { border-color: var(--hair); }

/* Notes, undo, toast: the app's banner plate. */
.note, .undo, #toast { border-radius: 0; background: var(--dialog); border: 1px solid rgba(200,170,110,.5); color: var(--ink); }
.note.live { border-color: rgba(10,200,185,.5); }
.note.live::before { border-radius: 0; transform: rotate(45deg); background: var(--arcane); box-shadow: none; }
.undo button { border-radius: 0; background: none; color: var(--gold-light); font: 700 15px/1 var(--f-read); padding: 7px 10px; }
.undo button:hover { color: var(--ink); }
#toast { border-color: var(--lost); }

/* Fit the dropdowns to their words. */
.seg-more select, .addto select, .sel-move select { field-sizing: content; width: auto; }
/* The page map reads as the app's page dots: thin, gold where full, the open pages lit. */
.pagemap { height: 8px; margin-top: 14px; }
.pm.on { box-shadow: none; background: rgba(240,230,210,.45); }
.pm.on i { background: var(--gold-light); }
@media (max-width: 899px) {
  .bar-bg img, .bar-bg img.card { opacity: .32; }
  .bar-title h1 { font-size: 40px; }
  .pager .pager-label { font-size: 20px; }
}
/* The marketing site's .row (a 540px feature band) must not reach these rows. */
.rows .row { min-height: 0 !important; padding: 8px 10px !important; gap: 14px !important; }
@media (max-width: 899px) { .rows .row { gap: 10px !important; } }

/* W A S D lit card */
.pocket.kbd-hot .art, .row.kbd-hot .row-art { box-shadow: 0 0 0 2px var(--gold-light), 0 0 24px -4px rgba(244,198,96,.7); transform: translateY(-3px); }
.pocket.kbd-hot .ctl { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.pocket.kbd-hot .badge { opacity: 0; }

/* Aethos keyboard hint, right side of a binder */
.keytip { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 250px; flex-direction: column; display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; background: #060A14; border: 1px solid rgba(200,170,110,.45); border-radius: 14px;
  box-shadow: 0 20px 40px -20px #000; color: var(--ink2); font-size: .8rem; }
.keytip[hidden] { display: none; }
.keytip img { width: 64px; height: 64px; border-radius: 50%; flex: none; border: 1px solid rgba(200,170,110,.6); object-fit: cover; }
.keytip-body { min-width: 0; flex: 1; }
.keytip-say { margin: 0 0 10px; color: var(--ink, #F2EBDD); line-height: 1.35; }
.keytip dl { display: grid; grid-template-columns: 92px 1fr; gap: 5px 10px; margin: 0 0 10px; align-items: center; }
.keytip dt { display: flex; gap: 3px; margin: 0; }
.keytip dd { margin: 0; color: var(--mute); }
.keytip kbd { display: inline-block; min-width: 20px; padding: 1px 5px; text-align: center; font: 600 .72rem/1.5 inherit; color: var(--gold-light);
  border: 1px solid rgba(200,170,110,.5); border-bottom-width: 2px; border-radius: 5px; background: rgba(255,255,255,.03); }
.keytip-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--mute); font-size: .72rem; }
.keytip-foot button { background: none; border: 1px solid rgba(200,170,110,.6); color: var(--gold-light); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: .76rem; cursor: pointer; }
@media (max-width: 1100px), (hover: none) { .keytip { display: none !important; } }
.keytip-head { display: flex; gap: 12px; align-items: center; }
.keytip-head .keytip-say { margin: 0; }
.keytip-body dl { margin-top: 12px; }
.keytip.folded { width: auto; padding: 0; border-radius: 50%; background: none; border: 0; box-shadow: none; cursor: help; }
.keytip.folded .keytip-say, .keytip.folded .keytip-body { display: none; }
.keytip.folded img { width: 52px; height: 52px; box-shadow: 0 8px 20px -8px #000, 0 0 0 3px rgba(6,10,20,.9); }
.keytip.folded::after { content: "?"; position: absolute; right: -2px; top: -2px; width: 18px; height: 18px; border-radius: 50%; background: var(--gold-light); color: #02050B; font: 800 .7rem/18px inherit; text-align: center; }
.keytip.folded:hover { width: 250px; padding: 14px; border-radius: 14px; background: #060A14; border: 1px solid rgba(200,170,110,.45); box-shadow: 0 20px 40px -20px #000; cursor: default; }
.keytip.folded:hover::after { display: none; }
.keytip.folded:hover .keytip-say, .keytip.folded:hover .keytip-body { display: block; }
.keytip.folded:hover img { width: 64px; height: 64px; box-shadow: none; }
.keytip.folded:hover .keytip-foot button { display: none; }

/* Albums (specs/binder-layout.md): sized like the set tiles, three of the
   album's best cards fanned where a set has its key art. */
.set-grid.albums { margin-bottom: 6px; }
.album-fan { position: absolute; inset: 0; z-index: -1; overflow: hidden;
  background: radial-gradient(70% 90% at 50% 10%, rgba(200,170,110,.18), transparent), var(--hex-gold, none), var(--ground-hi); }
.set-tile.album-tile .album-fan img { position: absolute; inset: auto; left: 50%; top: 9%; width: 25%; height: auto; aspect-ratio: 744 / 1039;
  object-fit: cover; z-index: auto; transform-origin: 50% 100%; box-shadow: 0 10px 22px -10px #000, 0 0 0 1px rgba(200,170,110,.35);
  transform: translateX(calc(-50% + var(--i) * 58%)) rotate(calc(var(--i) * 9deg)); transition: transform .35s ease; }
.set-tile.album-tile:hover .album-fan img { transform: translateX(calc(-50% + var(--i) * 70%)) rotate(calc(var(--i) * 12deg)) translateY(-4px); }
.set-tile.album-tile.none .album-fan img { filter: saturate(.35); opacity: .7; }
.album-new { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; aspect-ratio: 16 / 9;
  border: 1px dashed rgba(200,170,110,.55); background: none; color: var(--ink); font: inherit; cursor: pointer; }
.album-new:hover { border-color: var(--gold); background: rgba(200,170,110,.05); }
.album-new .plus { font: 400 34px/1 var(--f-read); color: var(--gold); }
.album-new b { font: 700 22px/1 var(--f-title); padding-top: 3px; }
.album-new span:last-child { color: var(--mute); font-size: .82rem; }
.side-album-new { width: 100%; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.side-album-new .side-all { color: var(--gold); font-size: .9rem; }
.side-album-new b { color: var(--mute) !important; }
.place-group { font: 700 13px/1 var(--f-read); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 22px 0 10px; }
/* A long binder (an album over every set in playset pockets runs past 150
   pages) keeps its page map inside a phone's width. */
.pagemap { min-width: 0; overflow: hidden; }
@media (max-width: 700px) { .pagemap { gap: 1px; } .pm { min-width: 1px; } }
.album-tile .set-tile-t .eyebrow { text-shadow: 0 1px 6px #000, 0 0 2px #000; }

/* An album's Sort by steps: number, key, way, remove (BinderMagic sortSection). */
.sort-steps { display: flex; flex-direction: column; gap: 8px; }
.sort-step { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border: 1px solid var(--hair); background: rgba(240,230,210,.03); }
.sort-n { width: 16px; font: 700 15px/1 var(--f-read); font-variant-numeric: tabular-nums; color: var(--gold-light); }
.sort-key { flex: 1; min-width: 0; }
.sort-key select { width: 100%; padding: 8px 4px; border: 0; background: none; font: 700 15px/1 var(--f-read); color: var(--ink); cursor: pointer; }
.sort-step .chip { white-space: nowrap; }
.sort-step .chip.forget { margin-left: 0; }
.sort-add { margin-top: 10px; }

/* ---------------------------------------------------- binder side rail */
.rl, .rv, .ri { display: none; }
@media (min-width: 1400px) { .bview .ri { display: block; } }
/* On a wide screen the binder is short of height, not width. The bar moves
   into a rail beside the spread, so the pages get the whole window height
   under the nav and the cards grow (fitBinder measures from the stage). */
@media (min-width: 1400px) {
  .bview { display: grid; grid-template-columns: 252px minmax(0, 1fr); column-gap: clamp(20px, 2vw, 36px); align-items: start; }
  .bview > .hbar { grid-column: 1; grid-row: 1 / span 4; position: sticky; top: 0; margin: 0 0 0 calc(-1 * clamp(16px, 2.4vw, 40px));
    padding: 22px 20px 24px clamp(16px, 2.4vw, 40px); min-height: calc(100vh - var(--nav)); border-right: 1px solid var(--hair);
    background: rgba(3,8,18,.55); display: flex; flex-direction: column; gap: 18px; }
  .bview > :not(.hbar) { grid-column: 2; }
  .bview > .hbar::after, .bview > .hbar::before { display: none; }
  .bview .bar-bg img { width: 100%; height: 230px; object-position: 50% 25%;
    -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent); mask-image: linear-gradient(180deg, #000 30%, transparent); }
  .bview .bar-bg::after { background: linear-gradient(180deg, rgba(3,8,18,.15), rgba(3,8,18,.7) 160px, rgba(3,8,18,0) 260px); }
  .bview .bar-top { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 18px; margin: 0; }
  .bview .bar-title h1 { font-size: 40px; overflow-wrap: anywhere; }
  .bview .tb-gap { display: none; }
  .bview .complete-line { border-left: 0; padding: 0; }
  .bview .bar-line { width: 100%; }
  .bview .pager { width: 100%; }
  .bview .pager .pager-label { flex: 1; justify-content: center; padding: 0 8px; font-size: 20px; }
  .bview .findbox { left: 0; right: auto; width: 340px; }
  /* The rail reads as three short lists: what to show, how the binder is
     laid out (each row says its current setting), and lists in and out. */
  .bview > .hbar { gap: 22px; }
  .bview .pagemap { order: 1; margin-top: -8px; }
  .bview .pagemap { flex-wrap: wrap; height: auto; gap: 3px; }
  .bview .pm { flex: 0 0 12px; height: 12px; max-width: none; }
  .bview .tb-row { order: 2; display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .bview .tb-row .rl { display: flex; align-items: center; gap: 10px; margin: 22px 0 8px; font: 700 12px/1 var(--f-read); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
  .bview .tb-row .rl:first-child { margin-top: 0; }
  .bview .tb-row .rl::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(200,170,110,.4), rgba(200,170,110,0)); }
  .bview .tb-row .seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .bview .tb-row .seg button, .bview .tb-row .seg-more { height: 36px; justify-content: center; border: 1px solid var(--hair); background: rgba(240,230,210,.03); font-size: 14px; }
  .bview .tb-row .seg button::after, .bview .tb-row .seg button::before { display: none; }
  .bview .tb-row .seg button:hover, .bview .tb-row .seg-more:hover { border-color: rgba(200,170,110,.45); }
  .bview .tb-row .seg button[aria-pressed="true"], .bview .tb-row .seg-more.in { border-color: rgba(200,170,110,.7); background: rgba(200,170,110,.12); }
  .bview .tb-row .seg-more { display: flex; align-items: center; }
  .bview .tb-row .seg-more select { font-size: 14px; }
  .bview .tb-row > .pill, .bview .tb-row > .addto, .bview .tb-row details.more > summary { display: flex; width: 100%; height: 44px; align-items: center; gap: 10px;
    border-bottom: 1px solid var(--hair); color: var(--ink2); }
  .bview .tb-row > .pill:hover, .bview .tb-row details.more > summary:hover, .bview .tb-row > .addto:hover { color: var(--ink); border-bottom-color: rgba(200,170,110,.45); }
  .bview .tb-row > .pill.in { color: var(--gold-light); }
  .bview .tb-row .pill svg { flex: none; color: var(--mute); }
  .bview .tb-row .rt { flex: 1; text-align: left; }
  .bview .tb-row .rv { display: inline; font: 700 13px/1 var(--f-read); color: var(--mute); white-space: nowrap; }
  .bview .tb-row .rv::after { content: "›"; margin-left: 8px; color: var(--gold); font-size: 15px; }
  .bview .tb-row details.more > summary { padding: 0; }
  .bview .tb-row > .addto span { flex: 1; color: var(--ink2); }
  .bview .tb-row > .addto span::before { content: "+"; display: inline-block; width: 14px; margin-right: 10px; text-align: center; font-size: 18px; color: var(--mute); }
  .bview .tb-row > .addto select { max-width: 130px; font-size: 13px; text-align: right; }
  .bview .tb-row > details.more { width: 100%; }
  .bview .tb-row .menu.right { left: 0; right: auto; }
  .bview .stage { margin-top: 18px; }
}

/* ------------------------------------------------- set stats, spares */
/* SetStatsView and SparesExportView: one plate, rows on hairlines. */
dialog.sheet.stats, dialog.sheet.spares { width: min(640px, calc(100vw - 32px)); }
.st-eye { margin: 0 0 6px; font: 700 13px/1 var(--f-read); color: var(--gold); opacity: 1 !important; }
.st-note { margin: -4px 0 10px; color: var(--mute); font-size: 13px; }
.st-note + .st-row, .st-note + .st-dom { margin-top: 0; }
.st-row { display: grid; grid-template-columns: 1fr auto 44px; align-items: baseline; gap: 4px 10px; padding: 8px 0 6px; }
.st-row .st-l { display: flex; align-items: center; gap: 10px; }
.st-row .st-l b { font-weight: 800; color: var(--ink); }
.st-row > b.num { font-size: 16px; color: var(--ink); }
.st-row .done, .st-play .done { color: var(--victory); }
.st-x { color: var(--mute); font-size: 13px; text-align: right; }
.st-bar { display: block; height: 2px; background: var(--hair); position: relative; }
.st-row .st-bar { grid-column: 1 / -1; margin-left: 28px; }
.st-bar i { position: absolute; inset: 0 auto 0 0; background: var(--gold); }
.st-bar.dom { height: 6px; flex: 1; }
.st-bar.dom i { background: var(--dc); opacity: .85; }
.st-play { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.st-play b { font-size: 34px; line-height: 1; color: var(--ink); }
.st-play span { color: var(--ink2); }
.st-eye2 { margin: 14px 0 4px; font: 800 11px/1 var(--f-read); letter-spacing: 1px; color: var(--mute); }
.st-short { margin: 0; color: var(--ink2); font-size: 13px; }
.st-dom { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.st-dom > b { width: 64px; font-weight: 800; color: var(--ink); }
.st-dom .num { min-width: 40px; text-align: right; font-size: 13px; color: var(--ink); }
.st-dom .st-x { min-width: 32px; }
.st-top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.st-top figure { margin: 0; cursor: pointer; }
.st-top img { width: 100%; aspect-ratio: 744/1039; object-fit: cover; border-radius: 4.5% / 3.2%; display: block; }
.st-top figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; font-size: 13px; }
.st-top figcaption b { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-top figcaption span { color: var(--mute); }
/* LuckMeter */
.luck { --lk: var(--gold); margin: 14px 0 6px; padding: 14px; background: rgba(2,5,11,.6); border: 1px solid color-mix(in srgb, var(--lk) 35%, transparent); }
.luck.lost { --lk: var(--lost); } .luck.even { --lk: var(--gold-light); } .luck.won { --lk: var(--victory); }
.lk-top { display: flex; justify-content: space-between; gap: 10px; font: 800 11px/1 var(--f-read); }
.lk-eye { letter-spacing: 2px; color: var(--gold); }
.lk-word { letter-spacing: 1px; color: var(--lk); }
.lk-row { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.lk-n { min-width: 52px; text-align: center; font: 900 48px/1 var(--f-num); color: var(--lk); text-shadow: 0 0 16px color-mix(in srgb, var(--lk) 50%, transparent); }
.luck.none .lk-n { color: var(--mute); text-shadow: none; }
.lk-bars { flex: 1; display: flex; align-items: center; gap: 3px; height: 14px; }
.lk-bars i { flex: 1; height: 8px; background: var(--hair); }
.lk-bars i.on { height: 14px; background: var(--lk); }
.lk-facts { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.lk-fact { display: flex; justify-content: space-between; gap: 10px; }
.lk-fact span { color: var(--mute); } .lk-fact b { color: var(--ink); font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.lk-note { margin: 8px 0 0; color: var(--mute); font-size: 13px; }
.lk-note.dim { color: var(--dim-c); }
/* Your spares */
.sp-ctl { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.sp-from { display: flex; align-items: center; gap: 8px; color: var(--mute); font-size: 13px; }
.sp-from select { padding: 8px 10px; border: 1px solid var(--hair); background: rgba(2,5,11,.6); color: var(--ink); font: inherit; }
.sp-ctl .st-note { margin: 0; }
.sp-cheap { display: flex; align-items: center; gap: 8px; min-height: 36px; color: var(--ink2); font-size: 14px; cursor: pointer; }
.sp-cheap input { accent-color: var(--gold); width: 16px; height: 16px; }
.sp-sum { margin: 6px 0 10px; font-size: 18px; color: var(--ink); }
.sp-pre { margin: 0; padding: 12px; border: 1px solid var(--hair); font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink2);
  white-space: pre; overflow-x: auto; max-height: 46vh; }

/* ---------------------------------------- wide binder: sidebar as drawer */
/* On a wide screen a binder is short of width with two columns beside it.
   The sets and albums column leaves the grid and opens over the page from
   the rail's "Sets & albums" button; the rail and the spread take its room. */
.side-toggle { display: none; }
@media (min-width: 1400px) {
  body[data-route="set"] .shell { grid-template-columns: minmax(0, 1fr); }
  body[data-route="set"] .shell > .side { position: fixed; z-index: 70; left: 0; top: 0; bottom: 0; width: var(--side); height: 100vh;
    transform: translateX(-102%); transition: transform .28s cubic-bezier(.2,.7,.2,1); box-shadow: 30px 0 60px -20px rgba(0,0,0,.85); background: #050b16; }
  body[data-route="set"].side-open .shell > .side { transform: none; }
  body[data-route="set"] .side-toggle { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; height: 34px; padding: 0 12px;
    border: 1px solid var(--hair); background: rgba(240,230,210,.03); color: var(--ink2); font: 700 14px/1 var(--f-read); cursor: pointer; }
  body[data-route="set"] .side-toggle:hover { border-color: rgba(200,170,110,.45); color: var(--ink); }
  /* The dim sits inside .shell's stacking context (z-index 1), under the
     drawer: on body it covered the drawer too and nothing took clicks. */
  body[data-route="set"].side-open .shell::after { content: ""; position: fixed; inset: 0; z-index: 69; background: rgba(0,0,0,.45); }
}
@media (min-width: 1400px) { body[data-route="set"] .selbar { left: 50%; max-width: calc(100vw - 32px); } }

/* ------------------------------------------ pocket overlays, as the app */
/* BinderPocketView: the tag row bottom left (set code on mixed pages, then
   SIGNED / OVERNUMBERED / ALT ART / PROMO, or FOIL on a foil pocket), the
   foil chip bottom right (prism, plus the foil count once there is one),
   the language mark top left. The stepper slides in under them on hover. */
.ptags { position: absolute; z-index: 3; left: 5px; bottom: 5px; display: flex; gap: 3px; pointer-events: none; transition: translate .14s; }
.ptags i { font: 900 9px/1 var(--f-read); font-style: normal; letter-spacing: .06em; padding: 3px 4px 2px; white-space: nowrap; }
.ptags .pset { color: rgba(240,230,210,.92); background: rgba(3,8,18,.82); }
.ptags .ptag { color: var(--ground-deep, #02050B); background: var(--gold-light, #F0E6D2); }
.ptags .ptag.foil { display: inline-flex; align-items: center; gap: 3px; background: linear-gradient(90deg, #BFE6FF, #F1CCFF, #FFEBA8); }
.ptags .ptag.foil b, .prism::before { display: inline-block; width: 6px; height: 6px; rotate: 45deg; background: conic-gradient(#8FD3FF, #E3A6FF, #FFE08A, #9CFFC9, #8FD3FF); }
.prism { left: auto !important; top: auto !important; right: 5px; bottom: 5px; height: 22px; min-width: 22px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 0 !important; color: transparent; background: rgba(3,8,18,.55) !important; border: 1px solid transparent !important; border-radius: 999px !important; transition: translate .14s, background .14s; }
.prism::before { content: ""; width: 7px; height: 7px; opacity: .6; }
.prism.on { font: 900 12px/1 var(--f-num) !important; color: var(--ink) !important; background: rgba(3,8,18,.85) !important; border-color: rgba(240,230,210,.6) !important; }
.prism.on::before { opacity: 1; }
.prism:hover { border-color: rgba(240,230,210,.8) !important; }
.lang-mark { left: 5px !important; top: 5px; bottom: auto !important; }
.pocket:hover .ptags, .pocket:focus-within .ptags, .pocket.kbd-hot .ptags,
.pocket:hover .prism, .pocket:focus-within .prism, .pocket.kbd-hot .prism { translate: 0 -40px; }
/* BinderPocketView's wanted star: top left, under the language mark's spot. */
.wstar { position: absolute; z-index: 3; left: 5px; top: 26px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%;
  font-size: 10px; line-height: 1; color: var(--ground-deep, #02050B); background: var(--gold-light, #F0E6D2); pointer-events: none; }

/* ------------------------------------------- pager strip above the spread */
/* Owner 2026-10-13: the pager and page map belong above the cards, not in
   the rail. One slim row: the pager, then the page map as a scrubber. */
.pstrip { display: flex; align-items: center; gap: 16px; margin: 6px 0 10px; }
.pstrip .pager { flex: none; display: flex; align-items: center; gap: 6px; position: relative; }
.pstrip .pager > button { height: 34px; min-width: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(200,170,110,.35); background: rgba(3,8,18,.6); color: var(--gold-light); cursor: pointer; }
.pstrip .pager > button:disabled { opacity: .35; cursor: default; }
.pstrip .pager .pager-label { padding: 0 12px; gap: 6px; font: 700 18px/1 var(--f-title); color: var(--ink); }
.pstrip .pager .pager-label span { color: var(--mute); }
.bview .pstrip .pagemap { order: 0; flex: 1; flex-wrap: nowrap; height: 14px; gap: 2px; margin: 0; min-width: 0; }
.bview .pstrip .pm { flex: 1 1 0; height: 14px; min-width: 2px; max-width: 46px; }
.pstrip .findbox { top: calc(100% + 6px); left: 0; z-index: 30; }
@media (max-width: 700px) { .pstrip { flex-direction: column; align-items: stretch; gap: 10px; } .pstrip .pager .pager-label { flex: 1; } }
.bview .pstrip .pager { width: auto; }
.bview .pstrip .pager .pager-label { flex: none; padding: 0 12px; font-size: 18px; }
@media (min-width: 1400px) { body[data-route="set"] .shell > .side { top: var(--nav, 64px); height: calc(100vh - var(--nav, 64px)); } }
/* Five tabs on a narrow phone: Workbench folds away. */
@media (max-width: 440px) { .rnav .tabs a.tab-wb:not([aria-current]) { display: none; } }
/* What counts (specs/set-progress-goals.md): the set's goal and switches. */
.rule-open { flex: none; align-self: center; background: none; border: 0; padding: 6px 0; font: 700 15px/1 var(--f-read); color: var(--control); cursor: pointer; }
.rule-open:hover { color: var(--gold-light); }
.rule-bar { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 12px; margin: 4px 0 14px; }
.rule-bar > .num { font-weight: 800; color: var(--ink2); }
.rule-bar > .num.done { color: var(--victory); }
.rule-bar > .st-bar { grid-column: 1 / -1; }
.rule-word { grid-column: 1 / -1; font-size: 12px; font-weight: 800; color: var(--mute); }
.rule-goal { display: flex; margin-bottom: 6px; }
.rule-inc { display: flex; width: 100%; align-items: center; justify-content: space-between; background: none; border: 0; border-bottom: 1px solid var(--hair); padding: 12px 0; font: 700 15px/1.2 var(--f-read); color: var(--ink); cursor: pointer; text-align: left; }
.rule-inc:last-of-type { border-bottom: 0; }
.rule-inc i { position: relative; width: 38px; height: 22px; border: 1px solid var(--line2); background: var(--ground, #0b0d12); flex: none; }
.rule-inc i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; background: var(--mute); transition: transform .15s; }
.rule-inc[aria-checked="true"] i { border-color: var(--gold); }
.rule-inc[aria-checked="true"] i::after { transform: translateX(16px); background: var(--gold-light); }
.rule-line { margin: 16px 0 8px; font-weight: 800; color: var(--ink2); }
