/* Tab bars: one rounded track, one glowing pill that glides to the selected tab (tab-glide.js).
   The pill takes the game's color, so Magic is gold, Yu-Gi-Oh! violet and Pokémon red. */
:root { --glide-ease: cubic-bezier(.32,.72,0,1); }
:is(.seg, .set-browser-quick, .cs-tabs, nav.tabs) {
  --pill: linear-gradient(180deg, color-mix(in srgb, var(--gold) 78%, #fff 22%), var(--gold) 58%, color-mix(in srgb, var(--gold) 86%, #000 14%));
  --pill-glow: 0 0 0 1px color-mix(in srgb, var(--gold) 65%, transparent), 0 6px 18px -6px color-mix(in srgb, var(--gold) 70%, transparent), 0 0 22px color-mix(in srgb, var(--gold) 22%, transparent), inset 0 1px 0 #ffffff70;
  --track: color-mix(in srgb, var(--surface) 80%, #000 20%);
}

/* The track */
:is(body, body.glass) :is(.seg, .set-browser-quick) {
  position: relative; isolation: isolate; gap: 2px; padding: 4px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, var(--track) 90%, transparent);
  box-shadow: inset 0 1px 3px #00000059, 0 1px 0 #ffffff0a;
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
:is(body, body.glass) .cs-tabs {
  padding: 4px; gap: 2px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, var(--track) 94%, transparent);
  box-shadow: inset 0 1px 3px #00000059, 0 8px 24px -12px #000a;
}

/* Deck page tabs (Cards, Rules, Power…): the same track, kept sticky under the header. */
:is(body, body.glass) nav.tabs {
  margin: 12px 0; padding: 4px; gap: 2px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, var(--track) 92%, transparent);
  box-shadow: inset 0 1px 3px #00000059, 0 8px 24px -12px #000a;
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
nav.tabs > button { flex: none; padding: 8px 14px; white-space: nowrap; }

/* The tabs */
:is(.seg, .set-browser-quick, nav.tabs) > button, .cs-tabs > button {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; border: 0; border-radius: 999px; background: transparent; box-shadow: none;
  color: var(--muted); font-weight: 650; letter-spacing: -.01em; cursor: pointer;
  transition: color .35s var(--glide-ease), transform .2s var(--glide-ease);
}
/* Card sheet tabs share any spare width, so the row stays even when a tab (like Meta) is left out. */
.cs-tabs > button { flex: 1 0 auto; }
@media (hover: hover) { :is(.seg, .set-browser-quick, .cs-tabs, nav.tabs) > button:not(.on):hover { color: var(--text); } }
:is(.seg, .set-browser-quick, .cs-tabs, nav.tabs) > :is(.on, [aria-selected="true"], [aria-pressed="true"]) { color: var(--gold-ink); animation: none; }
:is(.seg, .set-browser-quick, .cs-tabs, nav.tabs) > button:active { transform: scale(.96); }

/* Until the pill is placed (or without script), the selected tab wears the pill itself. */
:is(.seg, .set-browser-quick, nav.tabs):not([data-glide]) > :is(.on, [aria-selected="true"], [aria-pressed="true"]),
.cs-tabs:not([data-indicator-ready]) > :is(.on, [aria-selected="true"]) { background: var(--pill); box-shadow: var(--pill-glow); }
:is(.seg, .set-browser-quick, nav.tabs)[data-glide] > button,
.cs-tabs[data-indicator-ready] > button { background: transparent !important; box-shadow: none !important; border-color: transparent !important; }

/* The pill */
:is(.seg, .set-browser-quick, nav.tabs) > .glide {
  position: absolute; z-index: 0; left: 0; top: 0; pointer-events: none; border-radius: 999px;
  background: var(--pill); box-shadow: var(--pill-glow);
  transition: transform .5s var(--glide-ease), width .5s var(--glide-ease), height .5s var(--glide-ease);
  will-change: transform;
}
.cs-tabs .cs-tab-indicator {
  background: var(--pill); box-shadow: var(--pill-glow);
  transition: left .5s var(--glide-ease), width .5s var(--glide-ease), top .3s var(--glide-ease), height .3s var(--glide-ease);
}

/* Tab icons */
.label-ico { display: inline-flex; flex: none; }
.label-ico .ico { width: 16px; height: 16px; stroke-width: 1.9; }
:is(.seg, .set-browser-quick, .cs-tabs, nav.tabs) > button:not(.on):not([aria-selected="true"]) .label-ico { opacity: .75; }

/* Grid-style choice bars keep their squarer shape. */
.am-sheet .am-scenario-choice .seg > .glide { border-radius: 12px; }

@media (prefers-reduced-motion: reduce) {
  :is(.seg, .set-browser-quick, nav.tabs) > .glide, .cs-tabs .cs-tab-indicator { transition: none !important; }
}

/* Home deck cards: the whole card is the button. */
.home-resume:has(.home-card-hit) { position: relative; cursor: pointer; }
#content .home-resume .home-card-hit, .home-resume .home-card-hit {
  position: absolute; inset: 0; z-index: 1; max-width: none; min-height: 0; padding: 0;
  border: 0; border-radius: inherit; background: none; box-shadow: none; cursor: pointer;
}
.home-resume .home-resume-choose { position: relative; z-index: 2; }
.home-resume:has(.home-card-hit:focus-visible) { outline: 2px solid var(--gold); outline-offset: 4px; }
.home-personal-deck, section.home-resume:has(.home-card-hit) { transition: transform .35s var(--glide-ease), box-shadow .35s var(--glide-ease), border-color .35s; }
@media (hover: hover) {
  .home-personal-deck:hover, section.home-resume:has(.home-card-hit):not(.home-personal-resume > *):hover {
    transform: translateY(-2px); box-shadow: 0 16px 36px -12px #000c; border-color: color-mix(in srgb, var(--gold) 38%, #ffffff26);
  }
  .home-personal-deck:hover::after { background: linear-gradient(155deg, #f6d891, #ffffff4d 26%, #ffffff1a 52%, #ffffff0f 70%, #f1d08a99); }
}
.home-personal-deck:active, section.home-resume:has(.home-card-hit):not(.home-personal-resume > *):active { transform: scale(.985); }
@media (prefers-reduced-motion: reduce) { .home-personal-deck, section.home-resume { transition: none; transform: none !important; } }

/* Deck box: the deck's cover card, full-bleed, with two of its cards stacked behind.
   Opening fans the back cards out to either side; nothing ever sits on top of the cover art. */
.deck-box { --db-w: 38px; --db-h: 53px; width: 50px; height: 54px; perspective: none; }
.deck-box-control { --db-w: 44px; --db-h: 61px; width: 64px; height: 64px; }
.deck-box-lid { display: none; }
.deck-box :is(.deck-box-case, .deck-box-cards) {
  position: absolute; inset: auto; top: 50%; left: 50%; width: var(--db-w); height: var(--db-h);
  margin: calc(var(--db-h) / -2) 0 0 calc(var(--db-w) / -2);
}
.deck-box .deck-box-case {
  border: 0; border-radius: 5px; overflow: hidden; z-index: 3;
  background: linear-gradient(160deg, color-mix(in srgb, var(--deck-box-color) 86%, white), var(--deck-box-color) 55%, color-mix(in srgb, var(--deck-box-color) 78%, black));
  box-shadow: 0 0 0 1px #ffffff30, 0 8px 16px -6px #000c, 0 1px 2px #0007;
  transition: transform .45s var(--glide-ease);
}
.deck-box .deck-box-case::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(155deg, #ffffff30, transparent 38%); box-shadow: inset 0 0 0 1px #ffffff22;
}
.deck-box .deck-box-case > img {
  inset: 0; width: 100%; height: 100%; border-radius: 0; opacity: 1; box-shadow: none; object-position: 50% 22%;
}
.deck-box .deck-box-mark { font-size: 18px; }
.deck-box .deck-box-cards { z-index: 1; }
.deck-box .deck-box-cards > img {
  border: 0; border-radius: 5px; transform-origin: 50% 90%;
  box-shadow: 0 0 0 1px #ffffff26, 0 6px 12px -5px #000b;
  transition: transform .45s var(--glide-ease);
}
/* The first fan card is the cover itself; the next two rest just behind it. */
.deck-box .deck-box-cards > img:nth-child(1) { visibility: hidden; }
.deck-box .deck-box-cards > img:nth-child(2) { transform: translateX(-3px) rotate(-5deg); }
.deck-box .deck-box-cards > img:nth-child(3) { transform: translateX(3px) rotate(5deg); }
.deck-box.is-open .deck-box-cards > img:nth-child(1),
.deck-tile:is(:hover, :focus-visible) .deck-box-cards > img:nth-child(1) { transform: none; }
.deck-box.is-open .deck-box-cards > img:nth-child(2),
.deck-tile:is(:hover, :focus-visible) .deck-box-cards > img:nth-child(2) { transform: translateX(-13px) rotate(-13deg); }
.deck-box.is-open .deck-box-cards > img:nth-child(3),
.deck-tile:is(:hover, :focus-visible) .deck-box-cards > img:nth-child(3) { transform: translateX(13px) rotate(13deg); }
.deck-box.is-open .deck-box-case,
.deck-tile:is(:hover, :focus-visible) .deck-box-case { transform: translateY(-2px); }
@media (max-width: 600px) {
  .deck-box { --db-w: 33px; --db-h: 46px; width: 42px; height: 46px; }
  .deck-box-control { --db-w: 40px; --db-h: 56px; width: 54px; height: 58px; }
}
@media (prefers-reduced-motion: reduce) { .deck-box :is(.deck-box-case, .deck-box-cards > img) { transition: none; } }

/* Home search: the rotating hint fades between names and questions (search-hints.js). */
input[data-home-search] { text-overflow: ellipsis; }
input[data-home-search]::placeholder { transition: opacity .26s ease, transform .26s ease; }
input[data-home-search].hint-out::placeholder { opacity: 0; }
@media (prefers-reduced-motion: reduce) { input[data-home-search]::placeholder { transition: none; } }

/* Home: "Choose a deck" never breaks across two lines. */
#content .home-resume .home-resume-choose { white-space: nowrap; }
#wikiQ { text-overflow: ellipsis; }

/* Deck stacks: a raised card never covers the −/+ of the card below it. Each card's visible
   strip is tall enough for the bottom card's controls, and the controls sit above the card's
   own badges. */
.deck-viewer[data-deck-view="stacks"] .deck-stack-pile { --deck-stack-step: 48px; }
.deck-viewer[data-deck-view="stacks"] .lot.deck-row .lot-side { z-index: 6; }
.deck-viewer[data-deck-view="stacks"] .lot.deck-row .deck-stack-roles { z-index: 4; }
@media (max-width: 480px) {
  .deck-viewer[data-deck-view="stacks"] .deck-stack-pile { --deck-stack-step: 44px; }
}

/* Text links read as part of the app: the game color, no browser underline or arrow until hover. */
:is(#content, #sheetBody) :is(a:not([class]), a.link, a.home-meta-original) {
  color: var(--gold); text-decoration: none; font-weight: 650;
}
@media (hover: hover) {
  :is(#content, #sheetBody) :is(a:not([class]), a.link, a.home-meta-original):hover { text-decoration: underline; text-underline-offset: 3px; }
}
:is(#content, #sheetBody) :is(a:not([class]), a.link, a.home-meta-original):focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* Search page: one capsule holds the field and its search button, with Ask beside it, built
   from the same pieces as the Home search. The capsule is the row's ::before, laid over the
   field and button columns, so the suggestion list still anchors to .search-query. */
.searchbar.search-query {
  --sq-h: 52px;
  grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 0; align-items: center; margin: 14px 0 12px;
}
.searchbar.search-query::before {
  content: ''; grid-area: 1 / 1 / 2 / 3; height: var(--sq-h); border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--gold) 30%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, #fff 6%), var(--surface));
  box-shadow: inset 0 1px 0 #ffffff0f, 0 12px 30px -16px #000d;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.searchbar.search-query:has(> input:focus)::before {
  border-color: color-mix(in srgb, var(--gold) 80%, transparent);
  box-shadow: inset 0 1px 0 #ffffff0f, 0 0 0 4px color-mix(in srgb, var(--gold) 16%, transparent), 0 12px 30px -16px #000d;
}
.searchbar.search-query > input {
  grid-area: 1 / 1; height: var(--sq-h); min-height: 0; padding: 0 10px 0 18px; border-radius: 18px 0 0 18px;
  border: 0 !important; background: transparent !important; box-shadow: none !important; outline: none !important;
  color: var(--text); font-size: 16px; text-overflow: ellipsis;
}
.searchbar.search-query > input::placeholder { color: var(--muted); opacity: .85; }
.searchbar.search-query > .search-go {
  grid-area: 1 / 2; position: relative; display: grid; place-items: center; width: 44px; height: 44px; min-height: 0;
  margin-right: 6px; padding: 0; border: 0; border-radius: 50%; background: var(--gold); color: var(--gold-ink);
  box-shadow: inset 0 1px 0 #ffffff59, 0 6px 16px -6px color-mix(in srgb, var(--gold) 75%, transparent);
  transition: transform .15s ease, filter .15s ease;
}
.searchbar.search-query > .search-go .search-emblem { width: 26px; height: 26px; --surface: var(--gold); }
.searchbar.search-query > .search-go:active { transform: scale(.94); }
.searchbar.search-query > .ask-launch {
  grid-area: 1 / 3; width: var(--sq-h); height: var(--sq-h); min-height: 0; margin-left: 8px; padding: 0;
  justify-content: center; gap: 0; border-radius: 50%;
}
.searchbar.search-query > .ask-launch .assistant-button-mark { width: 30px; height: 30px; }
/* Phones show the two actions as symbols; their names stay for screen readers. */
.searchbar.search-query > :is(.search-go, .ask-launch) > span {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
@media (hover: hover) { .searchbar.search-query > .search-go:hover { filter: brightness(1.08); } }
@media (min-width: 600px) {
  .searchbar.search-query > .search-go { display: inline-flex; align-items: center; gap: 6px; width: auto; padding: 0 16px 0 10px; border-radius: 999px; font-size: 14px; font-weight: 750; }
  .searchbar.search-query > .search-go .search-emblem { width: 22px; height: 22px; }
  .searchbar.search-query > .ask-launch { width: auto; gap: 8px; margin-left: 10px; padding: 0 20px 0 12px; border-radius: 999px; font-size: 15px; }
  .searchbar.search-query > :is(.search-go, .ask-launch) > span { position: static; width: auto; height: auto; overflow: visible; clip-path: none; font-size: inherit; }
}
:root[data-theme="light"] .searchbar.search-query::before {
  background: #fff; border-color: color-mix(in srgb, var(--gold) 28%, var(--line)); box-shadow: 0 10px 28px -16px #24364b47;
}

/* Search shortcuts: small chips in one row under the field, each with its icon. */
.search-tools { display: flex; gap: 8px; margin: 0 0 14px; padding: 1px 0; overflow-x: auto; scrollbar-width: none; }
.search-tools::-webkit-scrollbar { display: none; }
.search-tools > .tool-chip {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px;
  padding: 0 14px 0 11px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
  background: color-mix(in srgb, var(--surface) 86%, transparent); box-shadow: inset 0 1px 0 #ffffff0a;
  color: var(--text); font-size: 13px; font-weight: 650; white-space: nowrap;
}
.search-tools > .tool-chip > .ico { width: 16px; height: 16px; color: var(--gold); }
@media (hover: hover) { .search-tools > .tool-chip:hover { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); } }
@media (max-width: 420px) {
  .search-tools { gap: 6px; }
  .search-tools > .tool-chip { flex: 1 1 auto; padding: 0 9px; gap: 5px; }
  .search-tools > .tool-chip > .ico { width: 15px; height: 15px; }
}
:root[data-theme="light"] .search-tools > .tool-chip { background: #fff; box-shadow: 0 1px 2px #24364b14; }

/* Search filters: the disclosure reads as a control, with a count badge and a turning chevron
   instead of the browser's triangle. */
details.filters > summary {
  list-style: none; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 10px 0 12px;
  border-radius: 999px; border: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
  background: color-mix(in srgb, var(--surface) 86%, transparent); color: var(--text); font-size: 13px; font-weight: 650;
}
details.filters > summary::-webkit-details-marker { display: none; }
details.filters > summary .label-ico .ico { width: 16px; height: 16px; color: var(--gold); }
details.filters > summary .filters-count {
  display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--gold); color: var(--gold-ink); font-size: 11.5px; font-weight: 800;
}
details.filters > summary .filters-chev { display: grid; place-items: center; color: var(--muted); transition: transform .25s var(--glide-ease); }
details.filters > summary .filters-chev .ico { width: 14px; height: 14px; }
details.filters[open] > summary .filters-chev { transform: rotate(180deg); }
details.filters[open] > summary { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); margin-bottom: 10px; }
:root[data-theme="light"] details.filters > summary { background: #fff; box-shadow: 0 1px 2px #24364b14; }

/* Carried over from the separate UI audit: one selected tab in the phone nav, one font for the
   three game names, Sets and Wiki as header links, no iOS zoom on fields, light-mode contrast. */
.bottom-nav .nav-search > span { width: 52px; height: 32px; border: 0; border-radius: 16px; background: none; color: inherit; }
.bottom-nav .nav-search .search-emblem { width: 26px; height: 26px; }
.bottom-nav .nav-search > span::before { display: none; }
.bottom-nav .nav-search.on > span { background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); }
.game-tabs .game-tab.game-tab-mtg { font-family: inherit; letter-spacing: normal; }
body .topbar #desktopSearch > .header-sets {
  padding: 6px 10px; border: 0; border-radius: 10px; background: none; box-shadow: none; color: var(--muted); font-size: 12px; font-weight: 600;
}
body .topbar #desktopSearch > .header-sets svg { display: none; }
body .topbar #desktopSearch > .header-sets:is(:hover, .on) { color: var(--text); background: var(--surface-2); }
@supports (-webkit-touch-callout: none) {
  :is(#app, #sheet, #settingsDialog, .glass-select-menu) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea) { font-size: 16px; }
}
:root[data-theme="light"] :is(.tile-chrome, .chip.dark, .icon.light, .hh-credit, .hero-body, .deck-hero, .community-art, .home-meta-card, .home-personal-deck, .home-today) { --warn: #f2c66d; }
:root[data-theme="light"] body[data-view="home"] .home-intro #homeHero.no-art .hh-shade { display: none; }
:root[data-theme="light"] #content .home-resume.home-resume-empty { background: var(--surface); border-color: var(--line); box-shadow: 0 8px 25px #23334d0d; }
:root[data-theme="light"] #content .home-resume.home-resume-empty p:not(.eyebrow) { color: var(--muted); }
body.glass .chip.dark:not(.on):not(.pick.on) { background-color: #0000008c; border-color: #ffffff26; box-shadow: none; }
/* Play vs CPU as a gilded plate: the table's Cinzel lettering on brushed gold, an engraved
   inner line and two diamond rivets. A slow light pass on hover; no arrow, no generic pill. */
.btn.cs-plate,.btn.scan-go,.page-head .btn[data-act="importDeck"]:not(.ghost){position:relative;isolation:isolate;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;min-height:50px;padding:0 30px;border:0;border-radius:10px;
 background:linear-gradient(180deg,#f8e2a8 0%,#e9bf6c 44%,#c08a3a 56%,#ddb064 100%);color:#2a1906;font:700 15px/1 Cinzel,Georgia,serif;letter-spacing:.1em;text-shadow:0 1px 0 #fbe9bd99;
 box-shadow:inset 0 1px 0 #fff6d6,inset 0 -2px 0 #8a5c1f66,0 0 0 1px #5a3b12,0 10px 26px #c99a4b3d;transition:transform .12s ease,box-shadow .22s ease,filter .22s ease}
.btn.cs-plate::before,.btn.scan-go::before,.page-head .btn[data-act="importDeck"]:not(.ghost)::before{content:"";position:absolute;inset:4px;border:1px solid #6b45155e;border-radius:7px;pointer-events:none}
.btn.cs-plate::after,.btn.scan-go::after,.page-head .btn[data-act="importDeck"]:not(.ghost)::after{content:"";position:absolute;inset:0;background:linear-gradient(105deg,transparent 30%,#fffbe8a8 50%,transparent 70%);transform:translateX(-130%);pointer-events:none;z-index:-1}
.cs-plate-label{display:inline-flex;align-items:center;gap:12px}
.cs-plate-label::before,.cs-plate-label::after{content:"";flex:none;width:6px;height:6px;transform:rotate(45deg);background:#5e3c11;box-shadow:0 1px 0 #fbe9bd99}
.btn.cs-plate:not(:disabled):hover,.btn.scan-go:hover,.page-head .btn[data-act="importDeck"]:not(.ghost):hover{transform:translateY(-1px);filter:brightness(1.04);box-shadow:inset 0 1px 0 #fff6d6,inset 0 -2px 0 #8a5c1f66,0 0 0 1px #5a3b12,0 14px 34px #c99a4b55}
.btn.cs-plate:not(:disabled):hover::after,.btn.scan-go:hover::after,.page-head .btn[data-act="importDeck"]:not(.ghost):hover::after{transform:translateX(130%);transition:transform .8s ease}
.btn.cs-plate:not(:disabled):active{transform:translateY(1px) scale(.99)}
.btn.cs-plate:focus-visible{outline:2px solid #f6dfa8;outline-offset:3px}
.btn.cs-plate:disabled{filter:saturate(.4);opacity:.6;box-shadow:0 0 0 1px #5a3b12}
.btn.cs-plate[hidden]{display:none}
@media(prefers-reduced-motion:reduce){.btn.cs-plate,.btn.cs-plate::after{transition:none!important}}
.page-head .btn[data-act="importDeck"]:not(.ghost){min-height:44px;padding:0 20px;font-size:13.5px}
.btn.scan-go{gap:10px}

/* Fix pass (audit 28 Oct): one guide banner look, Ask in dark glass, Collection on one row, a small condition chip. */
.context-guide{border-color:var(--glass-line,var(--line));background:linear-gradient(160deg,#ffffff0b,#fff0 45%),var(--glass,var(--panel));backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
body[data-view="scan"] #content>.context-guide{margin:12px 14px 0}
:root:not([data-theme="light"]) :is(.ask-launch,.home-ai-submit){color:#f6e7c4;background:radial-gradient(circle at 35% 30%,#ffffff1f,transparent 55%),#14161ccc;border:1px solid #e8b95b8c;box-shadow:inset 0 1px 0 #ffffff1a,0 0 0 3px #e8b95b14,0 6px 18px #0006;animation:none}
:root:not([data-theme="light"]) :is(.ask-launch,.home-ai-submit):hover{color:#fff4d6;border-color:#f6dfa8}
@media(min-width:760px){
 .coll-tools{display:flex;align-items:center;gap:8px}
 .coll-tools>.collection-primary-tools{display:flex;flex:1 1 auto;flex-wrap:nowrap;align-items:center;gap:8px;min-width:0}
 .coll-tools .collection-sort-controls{width:auto;flex:none}
 .coll-tools .collection-sort-label{flex:none;font-size:0;gap:0}
 .coll-tools .collection-sort-controls select{width:auto;min-width:150px}
 /* The direction select sizes its own label, so its arrow never runs into the search box. */
 .coll-tools .collection-direction-label{flex:none}
 .coll-tools .collection-direction-label select{min-width:112px}
 .coll-tools .collection-primary-tools>input[type="search"]{flex:1 1 auto;min-width:0}
 .coll-tools>.filter-pills{flex:none;margin:0}
}
.condition-badge{position:relative;min-width:34px;min-height:24px;padding:2px 8px;border-radius:999px;font-size:11.5px;font-weight:750;letter-spacing:.03em}
.condition-badge::after{content:"";position:absolute;inset:-10px -5px}
@media(pointer:coarse){.condition-badge{min-height:26px;min-width:38px}}

/* One glass recipe: the existing frost, with a faint gold edge so panels read as one family. */
:root:not([data-theme="light"]) body.glass{--glass-line:color-mix(in srgb,#e8b95b 15%,#ffffff0d)}

/* Arena-style tabs: text with a gold underline that slides; gold means "press this", not "you are here". */
:is(.seg,.set-browser-quick,nav.tabs):not(dialog *),body.glass :is(.seg,.set-browser-quick,nav.tabs):not(dialog *){background:transparent!important;border:0;border-bottom:1px solid var(--glass-line,var(--line));border-radius:0;box-shadow:none!important;padding:0 2px}
:is(.seg,.set-browser-quick,nav.tabs):not(dialog *)>.glide,.cs-tabs:not(dialog *) .cs-tab-indicator{border-radius:0;box-shadow:none;background:radial-gradient(60% 55% at 50% 100%,color-mix(in srgb,var(--gold) 24%,transparent),transparent 70%),linear-gradient(90deg,transparent 18%,var(--gold) 50%,transparent 82%) center bottom/100% 2px no-repeat}
:is(.seg,.set-browser-quick,nav.tabs):not(dialog *):not([data-glide])>:is(.on,[aria-selected="true"],[aria-pressed="true"]),.cs-tabs:not(dialog *):not([data-indicator-ready])>:is(.on,[aria-selected="true"]){background:linear-gradient(90deg,transparent 18%,var(--gold) 50%,transparent 82%) center bottom/100% 2px no-repeat;box-shadow:none}
:is(.seg,.set-browser-quick,.cs-tabs,nav.tabs):not(dialog *)>:is(.on,[aria-selected="true"],[aria-pressed="true"]){color:var(--text);font-weight:750}
:is(.seg,.set-browser-quick,.cs-tabs,nav.tabs):not(dialog *)>button{border-radius:0}

/* One title face: page titles in the table's Cinzel, everything else stays DM Sans. */
#content :is(h1,.page-head h1){font-family:Cinzel,Georgia,serif;font-weight:700;letter-spacing:.02em}
/* Scan before the camera starts: the same page header as every other page, not a full-width bar. */
.scan-workspace:not(.is-live) .scan-toolbar{width:min(100% - 28px,1196px);margin-inline:auto;justify-self:center;align-self:center;background:transparent!important;border-color:transparent!important;box-shadow:none!important;backdrop-filter:none!important}
.scan-workspace:not(.is-live) .scan-toolbar h1{font-size:clamp(24px,2.4vw,30px)}
.scan-auto-game{padding:3px 9px;border:1px solid var(--glass-line,var(--line));border-radius:999px;font-size:11.5px;color:var(--muted)}

/* Deck tiles as art (art pass): taller art, a format emblem, Cinzel names, owned on the left and
   what's left to find on the right over a gold bar. No prices. */
.deck-grid .deck-tile:not(.wide){height:260px}
.deck-tile .tile-shade{background:linear-gradient(180deg,#0000 28%,#07080bd9 78%,#07080bf5)}
.deck-format-emblem{display:inline-flex;align-items:center;gap:6px;padding-left:8px;backdrop-filter:blur(8px)}
.deck-format-emblem .format-emblem{width:14px;height:14px;fill:var(--gold);flex:none}
.deck-tile .tile-body>b{font:700 21px/1.15 Cinzel,Georgia,serif;letter-spacing:.01em;text-shadow:0 2px 10px #000a}
.deck-tile .tile-stats{display:flex;align-items:center;gap:10px}
.deck-tile .tile-find{margin-left:auto}
.deck-tile .tile-find:not(:has(em)){color:var(--gold);font-weight:750}
.deck-tile .bar.thin>span{background:linear-gradient(90deg,#c08a3a,var(--gold))}

/* Art header band (art pass): the page title over an illustration from your own cards. */
.page-head.page-hero{position:relative;isolation:isolate;overflow:hidden;min-height:180px;align-items:flex-end;padding:22px 26px;margin-bottom:6px;border:1px solid var(--glass-line,var(--line));border-radius:22px;box-shadow:0 18px 40px #0007}
.page-hero-art{position:absolute;inset:0;z-index:-1}
.page-hero-art img{width:100%;height:100%;object-fit:cover;object-position:50% 30%;transform:scale(1.02)}
.page-hero-art:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#07080bf0 12%,#07080b80 48%,#07080b1f),linear-gradient(0deg,#07080bc7,transparent 65%)}
.page-head.page-hero h1{font-size:clamp(30px,3.4vw,44px);color:#f6eedb;text-shadow:0 2px 14px #000c}
.page-head.page-hero .head-actions{align-self:flex-start}
:root[data-theme="light"] .page-head.page-hero h1{color:#fff}
@media(max-width:600px){.page-head.page-hero{min-height:140px;padding:16px;border-radius:18px}}
/* Phones (story-act-and-collection brief B): no Collection title card. The banner art stays as a slim strip behind the view
   buttons, Select and the menu, so the cards start much higher; the title stays for screen readers. */
@media(max-width:599px){.page-head.page-hero{min-height:0;padding:6px 8px;border-radius:14px;align-items:center;justify-content:flex-end;box-shadow:none;margin-bottom:0}
  .page-head.page-hero h1{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .page-head.page-hero .head-actions{align-self:center}}

/* Search empty state (art pass): a fan of today's cards from your collection. */
/* The fan is spread by --fan-step and clipped sideways, so its outer cards can never push the
   page wider than a phone screen (that shifted the whole app, bottom nav included). */
.search-fan{--fan-w:clamp(112px,15vw,200px);--fan-step:clamp(36px,8vw,112px);display:grid;justify-items:center;gap:6px;margin:34px 0 8px;text-align:center;max-width:100%;min-width:0}
.search-fan-cards{position:relative;height:calc(var(--fan-w) * 1.4 + 44px);width:100%;overflow-x:clip;overflow-clip-margin:0}
.search-fan-card{position:absolute;left:50%;top:10px;width:var(--fan-w);padding:0;border:0;background:none;border-radius:10px;cursor:pointer;
 transform:translateX(calc(-50% + var(--i) * var(--fan-step))) translateY(calc(var(--i) * var(--i) * 6px)) rotate(calc(var(--i) * 7deg));transform-origin:50% 120%;transition:transform .22s ease,filter .22s ease;z-index:calc(10 - var(--i) * var(--i))}
.search-fan-card img{display:block;width:100%;aspect-ratio:63/88;object-fit:cover;border-radius:10px;box-shadow:0 24px 48px #000c}
.search-fan-card:hover,.search-fan-card:focus-visible{transform:translateX(calc(-50% + var(--i) * var(--fan-step))) translateY(-14px) rotate(calc(var(--i) * 7deg));z-index:20;filter:brightness(1.06)}
.search-fan h2{margin:4px 0 0;font:700 clamp(20px,2vw,26px)/1.2 Cinzel,Georgia,serif}
.search-fan p{margin:0}
.search-fan+.hints,.search-fan+.center{justify-content:center;text-align:center}
@media(prefers-reduced-motion:reduce){.search-fan-card{transition:none}}
/* 4.3.34 design pass: one page container. Every top-level screen puts its content and title on the
   same left edge (16px on phones, the 1196px column on desktop, 85px at 1366). */
:root{--page-max:1196px;--page-edge:max(var(--gutter),calc((100% - var(--page-max)) / 2))}
@media(min-width:1200px){
 body:is([data-view="home"],[data-view="play"]) #content{max-width:1240px;margin-inline:auto;padding-inline:22px}
}
/* Scan: the floating title bar only floats over a live camera. Before that it is a plain page header. */
body[data-view="scan"] #content>.context-guide{margin:12px var(--page-edge) 0}
#app .scan-workspace.is-camera:not(.is-live)>.scan-toolbar{left:var(--page-edge);right:var(--page-edge);padding:6px 0;border-color:transparent;background:none;backdrop-filter:none;box-shadow:none}
.scan-pile-tray[data-batch-count="0"]{display:none}
/* Settings: the account column fills the page instead of leaving an empty second column. */
.settings-page{max-width:none}
.settings-account-layout:not(:has(.settings-aside)){grid-template-columns:minmax(0,1fr)}
/* Rules: the lesson column starts on the page edge like its title. */
.rule-learning{max-width:none;margin-inline:0}
/* Primary actions are gold everywhere (Settings, the deck builder, scan chips), never lavender. */
:root{--brand-action:#e8b95b;--brand-action-ink:#1b1406}
/* Settings: the save status line under the title already says "Sync needs your decision"; the account card says it once. */
.settings-page:has(#settings-account:not([hidden])) .settings-save-overview{display:none}
/* Wiki shares the page column with every other screen. */
.wiki-page,.wiki-page-head{max-width:none}
/* Phones: an empty screen's one message sits in the middle of the free space instead of leaving half the screen dark. */
@media(max-width:700px){
 #content>.empty:last-child,#content>section>.empty:last-child{display:flex;flex-direction:column;justify-content:center;min-height:min(46vh,420px)}
}
/* Inside Settings the Backup tab's dot is the one pointer to unread release notes; the header dot waits outside. */
body[data-view="settings"] .profile-menu>.release-dot{display:none}
/* Wiki: the daily topic's refresh is a small corner control, not a third link on the Read article row. */
.wiki-daily{position:relative}.wiki-daily .wiki-daily-refresh{position:absolute;top:10px;right:10px;z-index:3;width:44px;height:44px;border-radius:50%;background:#0c0e13a6;color:#f1e9d8;backdrop-filter:blur(8px)}
/* Next-patch minors from the 29 Oct gate: Scan's idle panel keeps the page gutters; seat badge rows match. */
#app .scan-workspace.is-camera:not(.is-live)>.scan-panel{margin-inline:var(--page-edge);border-radius:18px;border:1px solid var(--line)}
.pl-seat-who{min-height:30px}

/* ---- Design-gate cleanup (29 Oct): structural fixes ---- */
/* Ambient art: the oversized, blurred layer is a pseudo-element so the host element stays inside the viewport (nothing off-screen, nothing clipped). */
body.glass #ambient .amb-art{inset:0;transform:none;background-size:0 0;overflow:visible}
body.glass #ambient .amb-art::before{content:"";position:absolute;inset:-8%;background-image:inherit;background-size:cover;background-position:center 30%;transform:scale(1.08)}
/* A closed disclosure has no box: its menu options are neither tappable nor measurable until it opens. */
details:not([open])>:not(summary){display:none}
/* Phone bottom nav: solid enough that the page under it does not read through the gesture band. */
:is(body,body.glass) .bottom-nav{background:color-mix(in srgb,var(--bg) 94%,transparent)}
/* 44px hit area for compact controls (chips, text links, small buttons): an invisible pseudo extends the touch target without changing the look. */
:is(button,a,summary).chip,.chip[data-act],.chip[role=button],button.link,a.link,.link[data-act],.btn.small{position:relative}
:is(:is(button,a,summary).chip,.chip[data-act],.chip[role=button],button.link,a.link,.link[data-act],.btn.small):not(.cs-plate)::before{content:"";position:absolute;left:50%;top:50%;width:max(100%,44px);height:max(100%,44px);translate:-50% -50%;border-radius:inherit}
/* Text floor: nothing under 11px (eyebrows, set codes, mode tags, pill labels). */
.eyebrow,.pl-home-head .eyebrow,.pl-head .eyebrow,.play-menu--forge .play-heading .eyebrow,.home-personal-resume .home-resume .eyebrow,.home-value-main>.eyebrow,.home-ai-label,body .topbar .home-ai-label,.home-meta-heading .link.small,.pl-mode-tag,.set-code-mark,.pl-mat-now small,.pl-format-opt em,.pl-format-opt small,.pl-format-group,.set-tile-progress-label,.home-value-note,.home-value-movement,.pl-mat-sheet small,.pl-mat-opt small,.pl-cpu-tag{font-size:11px}
@media(max-width:380px){.set-tile-progress-label,.home-value-note{font-size:11px}}
/* Search pill: the label has its own row above the field instead of floating over the field's box. */
.home-search-pill{grid-template-rows:auto minmax(0,1fr);align-items:stretch}
.home-search-pill>.home-ai-label{position:static;grid-column:1;grid-row:1;align-self:end;padding:10px 0 0 20px;line-height:1}
.home-search-pill>input{grid-column:1;grid-row:2;align-self:start;padding-top:4px;min-height:44px}
.home-search-pill>:not(.home-ai-label):not(input){grid-row:1/3;align-self:center}
body .topbar .home-search-pill>.home-ai-label{padding-left:12px}
/* Scan on a landscape phone: the page flows and scrolls instead of squeezing the drop zone to a sliver. */
@media(max-height:520px) and (orientation:landscape){
 body[data-view="scan"] #app:has(.scan-workspace.is-camera:not(.is-live)){height:auto;min-height:100dvh;overflow:visible}
 body[data-view="scan"] #app:has(.scan-workspace.is-camera:not(.is-live))>#content{overflow:visible;flex:none;min-height:0}
 #app .scan-workspace.is-camera:not(.is-live){flex:none}
 #app .scan-workspace.is-camera:not(.is-live)>.scan-toolbar{position:static;margin:8px 0 0;padding-inline:var(--page-edge)}
 #app .scan-workspace.is-camera:not(.is-live)>.scan-panel{flex:none;min-height:0;margin-bottom:12px}
 #app .scan-workspace.is-camera:not(.is-live) .cam-wrap{flex:none;min-height:0}
 #app .scan-workspace.is-camera:not(.is-live) .scan-drop{position:relative;inset:auto;margin:16px auto;min-height:0}
}

/* Desktop top nav, home counters and disclosure rows reach 44px; the gesture pad under the nav is solid. */
.top-nav button{min-width:44px;min-height:44px}
.home-value-counts button{min-width:44px;min-height:44px}
:is(.filters,details.more,.group,.side-group,.glossary,.play-import,details.note,.set-browser-more,.rule-learning details) > summary{min-height:44px;display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;box-sizing:border-box}
.bottom-nav{box-shadow:inset 0 calc(-1 * env(safe-area-inset-bottom)) 0 var(--bg)}
body[data-view="settings"] .profile-menu>.sr-only{display:none}
.wiki-daily .hh-body{padding-right:72px}
/* Seat tap overlays stop short of the VS medallion on the seam; VS stays above them. */
.pl-arena:not(.pl-arena--pod) .pl-seat:not(.pl-seat--cpu) .pl-seat-hit{right:40px}
.pl-arena:not(.pl-arena--pod) .pl-seat--cpu .pl-seat-hit{left:40px}
@media(max-width:700px){.pl-arena:not(.pl-arena--pod) .pl-seat:not(.pl-seat--cpu) .pl-seat-hit{right:0;bottom:36px}.pl-arena:not(.pl-arena--pod) .pl-seat--cpu .pl-seat-hit{left:0;top:36px}}
#content .eyebrow,.hh-body .eyebrow,.set-progress-top .eyebrow,.set-overview .set-progress-top .eyebrow,.settings-dialog-head .eyebrow,.settings-profile-inline>.eyebrow,.settings-section-intro .eyebrow,.settings-card-heading .eyebrow,.flavor .eyebrow{font-size:11px}
.community-source-links a{position:relative}
.community-source-links a::before{content:"";position:absolute;left:50%;top:50%;width:max(100%,44px);height:max(100%,44px);translate:-50% -50%}
/* Seat avatar initial fits its ring at 130% text. */
.pl-seat .profile-avatar>span{font-size:16px;line-height:1}
/* Scan drop zone (camera off): no shutter row to reserve, so the frame can hold 130% text. */
#app .scan-workspace.is-camera:not(.is-live) .scan-drop{inset:64px 16px 24px}
/* Scan title bar sits on the page edge (the centred width rule is for the live-camera pill). */
#app .scan-workspace.is-camera:not(.is-live)>.scan-toolbar{width:auto;margin-inline:0;justify-self:auto;align-self:stretch}
/* Phones: the Play bar is laid out after the deck list, so sticky keeps it pinned all the way down and it rests at the end. */
@media(max-width:700px){.pl-lobby .pl-startbar{order:9}}
/* Desktop top bar: the pill's label is for screen readers; the placeholder says it, so the bar keeps its single-row height. */
@media(min-width:1200px){body .topbar .home-search-pill>.home-ai-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}body .topbar .home-search-pill{grid-template-rows:minmax(0,1fr)}body .topbar .home-search-pill>input{grid-row:1;padding-top:9px;min-height:44px}body .topbar .home-search-pill>:not(.home-ai-label):not(input){grid-row:1}}
/* Phones: a short fade above the pinned Play bar so the panel it covers reads as sliding under a dock, not as cut. */
@media(max-width:700px){.pl-lobby .pl-startbar{position:sticky}.pl-lobby .pl-startbar::before{content:"";position:absolute;left:-20px;right:-20px;bottom:calc(100% - 1px);height:28px;background:linear-gradient(to bottom,transparent,color-mix(in srgb,var(--bg) 92%,transparent));pointer-events:none}}
/* Room for the last letter's tracking, so the label never runs past its own box. */
.cs-plate-label{padding-right:2px}

/* ===== Search bar speaks for itself (Randall 31 Oct): no icon buttons beside or inside it. Typing wakes a gold
   bezel that sweeps the rim; the dropdown is one glass sheet with the app's own matches first and AI only when it helps. ===== */
.home-search-wrap { gap:0; }
.home-search-wrap>.home-search-pill,
body .topbar .home-search-pill,
.home-search-pill { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr); padding-right:0; }
.home-search-pill>input { grid-row:1; align-self:center; padding:0 22px; min-height:48px; }
body .topbar .home-search-pill>input { padding-left:18px; }
.home-search-pill { transition:box-shadow .35s ease, border-color .35s ease, background-color .35s ease; }
.home-search-pill:focus-within { outline:0; border-color:color-mix(in srgb,var(--gold) 70%,transparent);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--gold) 14%,transparent),0 0 28px -8px color-mix(in srgb,var(--gold) 70%,transparent),inset 0 1px 0 #ffffff14; }
.home-search-pill:focus-within::before { padding:1.5px; animation-duration:2.6s;
  background:linear-gradient(110deg,transparent 12%,#c99a4b 34%,#fff4d0 50%,#c99a4b 66%,transparent 88%); background-size:250% 100%; }
.home-search-pill:has(input:not(:placeholder-shown))::before { animation-duration:1.6s; }
@media (prefers-reduced-motion: reduce) { .home-search-pill:focus-within::before { animation:none; background-position:50% 0; } }
.home-suggestions { border-radius:20px; border:1px solid color-mix(in srgb,var(--gold) 26%,#ffffff14);
  background:linear-gradient(160deg,#1d1f29,#12141b); backdrop-filter:blur(18px) saturate(1.2); -webkit-backdrop-filter:blur(18px) saturate(1.2);
  box-shadow:0 24px 50px -18px #000e,inset 0 1px 0 #ffffff12; padding:8px; }
.home-suggestions .home-result-status { margin:4px 8px 8px; font-size:11px; letter-spacing:.04em; color:var(--gold); }
.home-result-actions { padding:6px 0 0; gap:8px; }
.home-suggestions.is-asking .home-result-actions, .home-result-actions:only-child { padding-top:0; }
.home-result-actions>button { border-radius:14px; border-color:#ffffff14; background:#ffffff08; transition:background-color .2s, border-color .2s; }
.home-result-actions>button:hover { background:#ffffff12; border-color:color-mix(in srgb,var(--gold) 45%,transparent); }
.home-result-actions .home-assistant-action.is-lead { flex:1 1 100%; justify-content:flex-start; padding-inline:14px;
  border-color:color-mix(in srgb,var(--gold) 55%,transparent); background:linear-gradient(115deg,#2c2638,#1b2232); }
.home-assistant-action>span { min-width:0; overflow-wrap:anywhere; }
/* Result rows: one quiet line per printing, art + name + set, price only when known. No boxes, hairline separators. */
.home-suggestions .display-list { gap:0; }
.home-suggestions .display-list>.lot.home-result { min-height:56px; padding:6px 10px; gap:12px; border:0; border-radius:12px; background:transparent; box-shadow:none; }
.home-suggestions .display-list>.lot.home-result+.lot.home-result { box-shadow:inset 0 1px 0 #ffffff0d; }
.home-suggestions .display-list>.lot.home-result:is(:hover,[aria-selected="true"]) { background:#ffffff0c; }
.home-suggestions .lot.home-result .lot-art { width:34px; height:47px; border-radius:4px; overflow:hidden; }
.home-suggestions .lot.home-result .lot-name { font-size:14px; }
.home-suggestions .lot.home-result .lot-sub { font-size:11px; color:var(--muted); }
.home-suggestions .lot.home-result .lot-side { align-self:center; }
.home-suggestions .lot.home-result .price { font-size:13px; color:var(--gold); }

/* Idea tiles share the deck-tile art direction (Randall 31 Oct): full-bleed art, a soft melt into the dark backing,
   a glass band at the bottom carrying a Cinzel title, a slim stats line and the action. One style, two markups:
   Pokémon / Yu-Gi-Oh! "build around" (.collection-idea) and Magic "Build from my cards" (.build-own .idea). */
:is(.collection-idea,.build-own .idea) { position:relative; isolation:isolate; display:flex; flex-direction:column; justify-content:flex-end;
  min-height:248px; overflow:hidden; border:0; border-radius:18px; background:#0d0f15;
  box-shadow:0 18px 34px -20px #000e,0 3px 10px -4px #0009; }
:is(.collection-idea,.build-own .idea)::after { content:''; position:absolute; inset:0; z-index:2; border-radius:inherit; pointer-events:none; padding:1px;
  background:linear-gradient(155deg,#f1d08ab3,#ffffff38 26%,#ffffff12 52%,#ffffff0a 70%,#f1d08a66);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); -webkit-mask-composite:xor; mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0); }
.collection-idea>.idea-card-open, .build-own .idea>.idea-art { position:absolute; inset:0; z-index:0; height:auto; background:transparent; }
.collection-idea>.idea-card-open .idea-row-art { height:100%; }
.build-own .idea>.idea-art img { height:100%; object-position:50% 30%; }
.collection-idea>.idea-card-open::after, .build-own .idea>.idea-art::after { content:''; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(0deg,#0b0e15f5,#0b0e15b8 38%,#0b0e1540 64%,#0b0e1500 82%); }
:is(.collection-idea>.idea-card-body,.build-own .idea>.idea-body) { position:relative; z-index:1; margin:0; padding:34px 16px 14px; color:#f5f6fa;
  background:linear-gradient(180deg,#0b0e1500,#0b0e1566 40%,#0b0e15a6);
  -webkit-backdrop-filter:blur(10px) saturate(1.15); backdrop-filter:blur(10px) saturate(1.15);
  -webkit-mask-image:linear-gradient(180deg,transparent,#000 30px); mask-image:linear-gradient(180deg,transparent,#000 30px); }
:is(.collection-idea .idea-card-name,.build-own .idea .idea-title) { font:700 17px/1.2 Cinzel,Georgia,serif; letter-spacing:.02em; color:#f8f1e1; text-shadow:0 1px 2px #000b,0 0 14px #0008; }
:is(.collection-idea .idea-card-facts,.build-own .idea .idea-body small,.build-own .idea .idea-body .row) { color:#dfe3ea; }
.build-own .idea .idea-art .chip { z-index:1; }
.collection-idea:has(.idea-card-open:focus-visible), .build-own .idea:has(.idea-art:focus-visible) { outline:2px solid var(--gold); outline-offset:3px; }

/* Meta decks share the deck-tile art direction too (Randall 31 Oct, all 3 games): "Top decks right now" tiles are
   full-bleed art melting into a glass base with a Cinzel title; "Recent top lists" rows carry their deck art as a
   strip that fades into the row. The long source text sits behind a quiet one-line, tap-to-reveal summary. */
.meta-source { margin:2px 0 14px; color:var(--muted); font-size:12px; }
.meta-source>summary { display:inline-flex; align-items:center; gap:6px; min-height:32px; cursor:pointer; list-style:none; opacity:.8; transition:opacity .2s; }
.meta-source>summary::-webkit-details-marker { display:none; }
.meta-source>summary::after { content:''; width:6px; height:6px; margin-left:2px; border:solid currentColor; border-width:0 1.5px 1.5px 0; transform:rotate(45deg) translateY(-2px); transition:transform .2s; }
.meta-source[open]>summary::after { transform:rotate(-135deg) translate(-1px,-1px); }
.meta-source>summary:hover, .meta-source[open]>summary { opacity:1; }
.meta-source>p { margin:4px 0 0; max-width:68ch; line-height:1.5; }

.arch-grid { gap:12px; }
.arch-grid .arch { isolation:isolate; display:flex; flex-direction:column; justify-content:flex-end; min-height:212px; padding:0; gap:0;
  border:0; border-radius:18px; background:#0d0f15; box-shadow:0 18px 34px -20px #000e,0 3px 10px -4px #0009; transition:transform .25s ease, box-shadow .25s ease; }
.arch-grid .arch::after, .meta-row::after { content:''; position:absolute; inset:0; z-index:3; border-radius:inherit; pointer-events:none; padding:1px;
  background:linear-gradient(155deg,#f1d08ab3,#ffffff38 26%,#ffffff12 52%,#ffffff0a 70%,#f1d08a66);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); -webkit-mask-composite:xor; mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0); }
.meta-row::after { background:linear-gradient(155deg,#f1d08a80,#ffffff24 30%,#ffffff0d 60%,#f1d08a40); }
.arch-grid .arch>.arch-art { position:absolute; inset:0; z-index:0; width:100%; height:100%; opacity:1; filter:saturate(1.1) contrast(1.05); transition:transform .6s cubic-bezier(.2,.8,.2,1); }
.arch-grid .arch::before { content:''; position:absolute; inset:0; z-index:1; pointer-events:none;
  background:linear-gradient(0deg,#0b0e15f5,#0b0e15b8 38%,#0b0e1540 64%,#0b0e1500 82%); }
.arch-grid .arch>.arch-body { position:relative; z-index:2; display:grid; gap:4px; padding:30px 14px 12px; color:#f5f6fa;
  background:linear-gradient(180deg,#0b0e1500,#0b0e1566 40%,#0b0e15a6);
  -webkit-backdrop-filter:blur(10px) saturate(1.15); backdrop-filter:blur(10px) saturate(1.15);
  -webkit-mask-image:linear-gradient(180deg,transparent,#000 26px); mask-image:linear-gradient(180deg,transparent,#000 26px); }
.arch-grid .arch .arch-body b { font:700 16px/1.2 Cinzel,Georgia,serif; letter-spacing:.02em; color:#f8f1e1; text-shadow:0 1px 2px #000b,0 0 14px #0008; }
.arch-grid .arch .arch-body small { color:#dfe3ea; text-shadow:0 1px 2px #000a; }
.arch-grid .arch .arch-body .bar { height:3px; margin:4px 0 0; background:#ffffff1a; }
.arch-grid .arch .arch-body .bar>span { background:linear-gradient(90deg,#c9a45c,#f1d08a); }
.arch-grid .arch>.arch-icons:not(:empty) { z-index:2; }
.arch-grid .arch>.arch-art-state { z-index:2; }
@media (hover:hover) {
  .arch-grid .arch:not(:disabled):hover { transform:translateY(-2px); box-shadow:0 24px 40px -20px #000,0 4px 14px -4px #000a; }
  .arch-grid .arch:not(:disabled):hover>.arch-art { transform:scale(1.04); }
  .meta-row:hover>.meta-art { transform:scale(1.04); }
}
.arch-grid .arch:focus-visible, .meta-row:focus-visible { outline:2px solid var(--gold); outline-offset:3px; }

.meta-row { position:relative; isolation:isolate; overflow:hidden; display:grid; grid-template-columns:minmax(0,1fr); min-height:76px;
  padding:12px 14px 12px clamp(96px,30%,190px); border:0; border-radius:14px; background:#0f1219; box-shadow:0 10px 22px -16px #000d; }
.meta-row:hover { border-color:transparent; }
.meta-row>.meta-art { position:absolute; inset:0 auto 0 0; z-index:-1; width:clamp(150px,46%,300px); min-height:0; display:flex; justify-content:center; align-items:center; gap:4px;
  -webkit-mask-image:linear-gradient(90deg,#000 35%,transparent); mask-image:linear-gradient(90deg,#000 35%,transparent); transition:transform .6s cubic-bezier(.2,.8,.2,1); }
.meta-row>.meta-art :is(.mini-art,.meta-card-art) { width:100%; height:100%; border-radius:0; object-fit:cover; object-position:50% 30%; filter:saturate(1.1) contrast(1.05); }
.meta-row>.meta-art .pk-icon { width:32px; height:32px; }
.meta-row .meta-main>b { text-shadow:0 1px 2px #000c,0 0 10px #000a; }
.meta-row .meta-main small { text-shadow:0 1px 2px #000c; }
.meta-row .meta-own .bar { height:3px; margin:4px 0; background:#ffffff1a; }
.meta-row .meta-own .bar>span { background:linear-gradient(90deg,#c9a45c,#f1d08a); }
.list:has(>.meta-row) { display:grid; gap:8px; }
.meta-row { color:#f5f6fa; }
.meta-row :is(.muted,.meta-own small) { color:#c4cad4; }
.meta-row:not(:has(>.meta-art :is(img,.pk-crop:not(.img-missing)))) { padding-left:14px; }
.meta-row:not(:has(>.meta-art :is(img,.pk-crop:not(.img-missing)))) > .meta-art { display:none; }
@media (max-width:419px) { .arch-grid .arch { min-height:176px; } }

/* One search for the whole app (Randall 31 Oct): grouped answers from CardStashy itself (your decks, sets,
   tournament decks, wiki, news, pages) above the card matches, in the same slim glass rows. */
.home-app-results { display:grid; gap:2px; }
.home-app-group { display:grid; }
.home-app-group+.home-app-group, .home-app-results+.home-app-group, .home-app-results+.home-result-status { margin-top:6px; }
.home-app-label { margin:4px 10px 2px; font-size:11px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:color-mix(in srgb,var(--gold) 80%,#fff 0%); opacity:.85; }
.home-app-row { display:grid; grid-template-columns:34px minmax(0,1fr) auto; align-items:center; gap:12px; width:100%; min-height:48px; padding:6px 10px;
  border:0; border-radius:12px; background:transparent; color:var(--text); text-align:left; cursor:pointer; transition:background-color .15s; }
.home-app-row+.home-app-row { box-shadow:inset 0 1px 0 #ffffff0d; }
.home-app-row:hover, .home-app-row[aria-selected="true"] { background:#ffffff0f; }
.home-app-row:focus-visible { outline:2px solid var(--gold); outline-offset:-2px; }
.home-app-art { display:grid; place-items:center; width:34px; height:34px; border-radius:9px; overflow:hidden; background:#ffffff0a; color:var(--gold); font-size:16px; line-height:1; }
.home-app-art img { width:100%; height:100%; object-fit:cover; }
.home-app-art img.is-icon { width:22px; height:22px; object-fit:contain; filter:invert(1) brightness(.92) sepia(.35) saturate(1.6) hue-rotate(5deg); }
:root[data-theme="light"] .home-app-art img.is-icon { filter:none; }
.home-app-text { display:grid; gap:1px; min-width:0; }
.home-app-text b { font-size:14px; font-weight:650; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.home-app-text small { font-size:11.5px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.home-app-out { color:var(--muted); font-size:13px; }
.home-suggestions.has-app .home-app-group>.display-list { margin:0; }
/* Card matches sit in the same rhythm as the app's own rows: art, name and set, price on the right. */
.home-suggestions .display-list>.lot.home-result { grid-template-columns:34px minmax(0,1fr) auto; gap:12px; }
.home-suggestions .lot.home-result .lot-side { grid-column:auto; justify-self:end; align-self:center; }
/* ---------- Card sheet · Play guide, Rules & legality, Prices ----------
   Uniform with the rest of the card sheet: the same panel as the set summary and price history
   (1px line, 18px radius, glass sheen), 16px section titles, the game's accent for the one
   primary element, 44px rows. Every line is card data, not filler. */
#sheetBody :is(.card-guide .guide-panel, .guide-hero, .price-hero, .price-copy) {
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px;
  background: linear-gradient(135deg, #ffffff09, #ffffff03); box-shadow: inset 0 1px #ffffff0a; backdrop-filter: blur(16px);
}
#sheetBody :is(.guide-hero, .price-hero) { background: linear-gradient(160deg, color-mix(in srgb, var(--gold) 5%, var(--surface)), var(--surface)); }
.card-guide { display: grid; gap: 14px; margin-top: 6px; }
.card-guide .guide-sec { margin: 0; min-width: 0; }
.card-guide .guide-sec > h3 { margin: 0 0 12px; font-size: 16px; line-height: 1.4; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.guide-hero { display: grid; gap: 10px; }
.guide-hero .eyebrow { margin: 0; }
.guide-roles { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.guide-role { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--text); border: 1px solid var(--line); background: var(--glass-2, var(--surface-2)); }
.guide-role.main { color: var(--gold-ink); border-color: transparent; background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 78%, #fff 22%), var(--gold) 58%, color-mix(in srgb, var(--gold) 86%, #000 14%)); }
.card-guide .guide-what { margin: 0; font-size: 15px; line-height: 1.5; }
.guide-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 10px; }
.guide-steps li { counter-increment: step; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; line-height: 1.5; }
.guide-steps li::before { content: counter(step); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 12px; font-weight: 800; color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); background: color-mix(in srgb, var(--gold) 10%, transparent); }
.card-guide .guide-list { padding-left: 18px; gap: 8px; }
.card-guide .guide-list li::marker { color: var(--gold); }
.guide-along { display: grid; gap: 6px; }
.guide-along-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(60px, 34%) 40px; gap: 10px; align-items: center; min-height: 44px; padding: 6px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; }
.guide-along-row b { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.guide-meter { height: 5px; border-radius: 999px; background: var(--line); overflow: hidden; }
.guide-meter i { display: block; height: 100%; border-radius: inherit; background: var(--gold); }
.card-guide .pair-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card-guide .pair-shared { margin: 0 0 10px; }
.card-guide .guide-limits { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; margin: 0 0 10px; }
.card-guide .guide-limits span { position: relative; gap: 2px; padding: 8px 12px 8px 14px; border-radius: 14px; overflow: hidden; }
.card-guide .guide-limits span::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--good); }
.card-guide .guide-limits span.warn::before { background: var(--warn); }
.card-guide .guide-limits span.bad::before { background: var(--bad); }
.card-guide .guide-limits span.bad b { color: var(--bad); }
.guide-rulings { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.guide-link-list { display: grid; gap: 6px; }
.guide-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 650; }
.guide-rule-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.guide-rule-links .chip { min-height: 44px; }
#sheetBody .card-discovery > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }

/* Prices: one hero with the number that matters, then your copy at its condition. */
#sheetBody .price-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px 12px; margin: 6px 0 12px; }
.price-hero-main { display: grid; gap: 2px; min-width: 0; }
.price-hero .eyebrow { margin: 0; }
.price-hero-value { font-size: 32px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price-hero-id { color: var(--muted); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.price-fresh { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid var(--line); background: var(--glass-2, var(--surface-2)); color: var(--muted); }
.price-fresh::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.price-fresh.fresh { color: var(--good); }
.price-fresh.stale { color: var(--warn); }
.price-hero > :is(.price-selectors, .current-printing-reference, .history-status) { grid-column: 1 / -1; margin: 4px 0 0; }
#sheetBody .price-hero select { width: 100%; min-width: 0; min-height: 44px; }
#sheetBody .price-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; margin: 0 0 12px; }
.price-copy-label, .price-copy-value { display: grid; gap: 2px; min-width: 0; }
.price-copy-label b { font-size: 14px; }
.price-copy-value { text-align: right; }
.price-copy small { color: var(--muted); font-size: 12px; }
.price-copy-value b { font-size: 18px; font-variant-numeric: tabular-nums; }
.price-copy .foot { grid-column: 1 / -1; margin: 2px 0 0; }
@media (max-width: 420px) { #sheetBody .price-hero { grid-template-columns: minmax(0, 1fr); } .price-fresh { justify-self: start; } }
/* Rows in the guide wear the same frosted glass as pairing rows and list tiles. */
body.glass :is(.guide-along-row, .guide-link) { background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0) 45%), var(--glass); border-color: var(--glass-line); box-shadow: var(--glass-hi), 0 10px 30px rgba(0, 0, 0, 0.22); }
/* Phones: card tabs are text-only so Overview · Meta · Play guide · Prices all fit in one row,
   the same on every card whether or not it has a Meta tab. */
@media (max-width: 480px) {
  .cs-tabs[aria-label="Card details"] > button { padding-inline: clamp(8px, 2.6vw, 16px); gap: 0; }
  .cs-tabs[aria-label="Card details"] > button .label-ico { display: none; }
}

/* Card detail art: the frame hugs the printed card on every game.
   Pokémon (600×825 and 734×1024) and Yu-Gi-Oh! (421×614) scans are not Magic's 488×680, so the
   shared cover box cropped them and slid the scan's rounded corner off the clip, which let the
   dark fill show between card and frame. Their art keeps its own shape, the way the collection
   grid already does, and any see-through corner pixel shows the frame, never a dark fill. */
.cd-img .cd-zoom > img.card-img[data-tier] { background: transparent; }
.cd-img:is([data-finish-game="ptcg"], [data-finish-game="ygo"]) .card-img { height: auto; aspect-ratio: auto 600 / 825; object-fit: contain; }
.cd-img[data-finish-game="ygo"] .card-img { aspect-ratio: auto 421 / 614; }

/* Card sheet header: the art fills the header edge to edge and flows on into the sheet.
   Each screen shape gets its own header height and crop instead of one compromise:
   phone portrait, phone landscape, foldable or tablet portrait, and tablet landscape or PC.
   The art is cropped to the header (Magic art crop, Yu-Gi-Oh! cropped art, and the Pokémon
   art window zoomed past the card's frame, stage badge and evolve bar). */
#sheetBody { --hero-h: clamp(240px, 74vw, 340px); }
#sheetBody:has(> .cs-banner > .cs-hero.ptcg) { --hero-h: clamp(220px, 64vw, 300px); }
#sheetBody:has(> .cs-banner > .cs-hero.ygo) { --hero-h: clamp(250px, 82vw, 360px); }
/* Foldable or tablet held upright: a tall, roomy header. */
@media (min-width: 700px) and (orientation: portrait) { #sheetBody:has(> .cs-banner > .cs-hero:not(.compact)) { --hero-h: clamp(340px, 38dvh, 460px); } }
/* Tablet landscape and PC: a wide, cinematic header. */
@media (min-width: 700px) and (orientation: landscape) { #sheetBody:has(> .cs-banner > .cs-hero:not(.compact)) { --hero-h: clamp(300px, 46dvh, 420px); } }
/* Phone on its side: a short panorama, so the tabs and details stay in view. */
@media (orientation: landscape) and (max-height: 500px) { #sheetBody:has(> .cs-banner > .cs-hero:not(.compact)) { --hero-h: clamp(170px, 48dvh, 220px); } }
.cs-banner:not(.no-art) { --banner-art-height: var(--hero-h, clamp(240px, 74vw, 340px)); }

/* Below the header the art keeps going, behind the sheet, like a painting seen through frosted
   glass: first softly blurred, then frosted, then only its colour, darkening as it goes so text
   on the sheet stays crisp. The soft and frost layers line up with the header crop (same cover
   box and focus point), and Magic and Yu-Gi-Oh! add a mirrored copy under the picture so the
   glass never ends on a hard edge where the art runs out. */
#sheetBody:has(> .cs-bleed) { position: relative; isolation: isolate; }
#sheetBody > .cs-bleed { --oy: .32; container-type: inline-size; position: absolute; top: 0; left: 0; right: 0; height: calc(var(--hero-h) * 1.25 + 300px); z-index: -1; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(var(--hero-h) + 120px), transparent 100%); mask-image: linear-gradient(180deg, #000 calc(var(--hero-h) + 120px), transparent 100%); }
#sheetBody > .cs-bleed.ygo { --oy: .28; }
#sheetBody > .cs-bleed > span { position: absolute; inset: 0; }
#sheetBody > .cs-bleed > .cs-bleed-glow > :is(img, .pk-crop) { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; filter: blur(40px) saturate(1.45) brightness(.62); }
#sheetBody > .cs-bleed .cs-bleed-fit { position: absolute; top: 0; left: 0; width: 100%; height: var(--hero-h); }
#sheetBody > .cs-bleed .cs-bleed-fit > img { position: absolute; left: 0; top: calc(var(--hero-h) * var(--oy)); width: 100%; height: auto; min-height: var(--hero-h); max-width: none; object-fit: cover; object-position: center calc(var(--oy) * 100%); translate: 0 calc(var(--oy) * -100%); }
#sheetBody > .cs-bleed .cs-bleed-fit > img.cs-bleed-mirror { transform: translateY(100%) scaleY(-1); }
#sheetBody > .cs-bleed .cs-bleed-fit.pk-crop { overflow: visible; display: flex; align-items: flex-start; justify-content: center; }
#sheetBody > .cs-bleed .cs-bleed-fit.pk-crop .pk-win { transform: scale(1.22); transform-origin: 50% 88%; -webkit-mask-image: linear-gradient(180deg, #000 94%, transparent 100%); mask-image: linear-gradient(180deg, #000 94%, transparent 100%); }
/* The mirrored window flips about the window's lower edge as zoomed above: the window is
   max(width / 1.68, header) tall and its zoomed lower edge sits at 1.0264 of that. */
#sheetBody > .cs-bleed .cs-bleed-fit.pk-crop.cs-bleed-mirror { transform: scaleY(-1); transform-origin: 50% calc(max(100cqw / 1.68, var(--hero-h)) * 1.0264); }
#sheetBody > .cs-bleed > .frost { -webkit-mask-image: linear-gradient(180deg, #000 calc(var(--hero-h) + 60px), transparent calc(var(--hero-h) + 340px)); mask-image: linear-gradient(180deg, #000 calc(var(--hero-h) + 60px), transparent calc(var(--hero-h) + 340px)); }
#sheetBody > .cs-bleed > .frost .cs-bleed-fit { filter: blur(18px) saturate(1.3) brightness(.72); }
#sheetBody > .cs-bleed > .soft { -webkit-mask-image: linear-gradient(180deg, #000 calc(var(--hero-h) - 10px), transparent calc(var(--hero-h) + 130px)); mask-image: linear-gradient(180deg, #000 calc(var(--hero-h) - 10px), transparent calc(var(--hero-h) + 130px)); }
#sheetBody > .cs-bleed > .soft .cs-bleed-fit { filter: blur(6px) saturate(1.15) brightness(.9); }
#sheetBody > .cs-bleed::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0, transparent calc(var(--hero-h) * .45), #0a0b1047 calc(var(--hero-h) * .85), #0a0b1061 var(--hero-h), #0a0b1099 calc(var(--hero-h) + 70px), #0a0b10a8 calc(var(--hero-h) + 220px), #0a0b10b3 100%); }
/* A card page's art waits for its picture, then comes in once (app.js settleSheetArt): the header art and its glass
   together, the big card on its own. The glass shares the header's entrance too, so it never shows ahead of the art. */
#sheetBody[data-settling~="art"] > .cs-bleed > span, #sheetBody[data-settling~="art"] > .cs-banner > .cs-hero > .cs-art, #sheetBody[data-settling~="card"] .cd-img .cd-zoom { opacity: 0; }
#sheetBody[data-settling~="card"] .cd-img.shine-once, #sheetBody[data-settling~="card"] .cd-img.shine-once::after { animation-play-state: paused; }
@media (prefers-reduced-motion: no-preference) {
  dialog.sheet[open] #sheetBody > .cs-bleed { animation: art-reveal-glass .32s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes art-reveal-glass { from { opacity: 0; } to { opacity: 1; } }
  #sheetBody > .cs-bleed > span, #sheetBody > .cs-banner > .cs-hero > .cs-art, #sheetBody .cd-img .cd-zoom { transition: opacity .32s cubic-bezier(.2, .8, .2, 1); }
}

/* The artist credit stays a quiet line; the name opens every card that artist drew. Its tap area is 44px tall. */
.card-artist .artist-link { position: relative; padding: 0; color: inherit; font: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
.card-artist .artist-link::before { content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: 44px; translate: -50% -50%; }
.card-artist .artist-link:is(:hover, :focus-visible) { color: var(--text); text-decoration-color: currentColor; }

/* The art covers the whole header, edge to edge, and fades out only at the bottom. */
.cs-banner > .cs-hero:not(.compact) { -webkit-mask-image: none; mask-image: none; }
.cs-banner > .cs-hero:not(.compact) .cs-art { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; aspect-ratio: auto; translate: none; transform: none; object-fit: cover; object-position: center 32%;
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 50%, #0008 74%, transparent 94%); mask-image: linear-gradient(180deg, #000 0, #000 50%, #0008 74%, transparent 94%); }
.cs-banner > .cs-hero.ygo:not(.compact) .cs-art { object-position: center 28%; }
/* Pokémon: the art window, zoomed past the card frame. It hangs from the top and the zoom pivots
   low, so the same top band (evolve bar and stage badge) is cut on every screen shape and a short
   header shows the face rather than the feet. */
.cs-banner > .cs-hero.ptcg:not(.compact) .cs-art.pk-crop { display: flex; align-items: flex-start; justify-content: center; }
.cs-banner > .cs-hero.ptcg .pk-crop .pk-win { transform: scale(1.22); transform-origin: 50% 88%; }
.cs-banner > .cs-hero:not(.compact) .cs-shade { background: linear-gradient(180deg, #00000052 0, transparent 30%); }

/* Price history with one point: a compact start line instead of an empty chart. */
#sheetBody #card-history .history-start { display: flex; height: auto; min-height: 0; align-items: center; gap: 10px; margin: 10px 0 4px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--text) 5%, transparent); color: var(--muted); font-size: 14px; }
#sheetBody #card-history .history-start b { color: var(--text); }
#sheetBody .history-start-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--accent, var(--gold)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent, var(--gold)) 22%, transparent); }
.meta-row .meta-main small.ellip { white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
/* Collection banner on all three games: Pokémon art crops cover the band; a missing image leaves the dark band. */
.page-hero-art .pk-crop{position:absolute;inset:0;width:100%;height:100%}
.page-hero-art .img-missing{display:none}
.artwork-banner-reset{margin:10px 0 0}
.artwork-banner-reset .link{min-height:44px}
/* Card sheet tab bar (Randall 1 Nov): once it sticks, nothing peeks round its rounded ends or above it. A backing strip
   the sheet's colour runs out to both sheet edges and up to the title bar; at rest it only covers the bar's own margin. */
#sheetBody .cs-tabs{--tab-backing:rgb(17 19 24);box-shadow:inset 0 1px 3px #00000059,0 8px 24px -12px #000a,calc(var(--gutter) * -1 + 5px) -5px 0 5px var(--tab-backing),calc(var(--gutter) - 5px) -5px 0 5px var(--tab-backing)}
:root[data-theme="light"] #sheetBody .cs-tabs{--tab-backing:var(--surface)}
/* The search box's own answer card (answer-run.js): the answer on top, tiles, two buttons, where it came from. */
.home-suggestions .answer-card { margin:6px 6px 8px; padding:12px; border-radius:16px; border:1px solid color-mix(in srgb,var(--gold) 50%,transparent); background:linear-gradient(180deg,color-mix(in srgb,var(--gold) 12%,transparent),transparent 70%); display:flex; flex-direction:column; gap:9px; }
.answer-card .answer-read { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:0; }
.answer-card .answer-read em { font-style:normal; font-size:10px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); }
.answer-card .answer-chip { font-size:11.5px; font-weight:700; padding:5px 9px; border-radius:999px; border:1px solid #ffffff1f; background:#ffffff0a; }
.answer-card .answer-chip.can-fix { border-color:color-mix(in srgb,var(--gold) 60%,transparent); color:var(--gold); }
.answer-card .answer-say { margin:0; font-size:15.5px; font-weight:700; line-height:1.35; text-wrap:pretty; overflow-wrap:anywhere; }
.answer-card .answer-say b { color:var(--gold); }
.answer-card.is-miss .answer-say, .answer-card.is-loading .answer-say { font-weight:600; color:var(--muted); }
.answer-card .answer-quote { margin:0; padding-left:10px; border-left:2px solid var(--gold); font-size:13px; line-height:1.45; max-height:9.5em; overflow:auto; }
.answer-card .answer-note { margin:0; font-size:12px; color:var(--muted); }
/* The other asks on the same line: the ask in the card's own text colour, its answer beside it. */
.answer-card .answer-also { font-size:13px; }
/* Rows of an answer (a deck's cards, the cards that break a format, price moves), a progress bar, and the "Ask more" chips. */
.answer-card .answer-rows { display:flex; flex-direction:column; gap:5px; }
.answer-card .answer-row { margin:0; display:flex; justify-content:space-between; gap:12px; padding:7px 10px; border-radius:10px; border:1px solid #ffffff1f; background:#ffffff0a; font-size:13px; }
.answer-card .answer-row b { font-weight:700; min-width:0; overflow-wrap:anywhere; }
.answer-card .answer-row span { color:var(--muted); text-align:right; flex:0 1 auto; }
.answer-card .answer-row.is-bad span { color:#f0a261; }
.answer-card .answer-row.is-good span { color:#7fd1a0; }
.answer-card .answer-row.is-warn span { color:#e6c873; }
.answer-card .answer-meter { height:8px; border-radius:99px; background:#ffffff14; overflow:hidden; }
.answer-card .answer-meter i { display:block; height:100%; background:var(--gold); }
.answer-card .answer-chip.can-ask { cursor:pointer; color:inherit; font-family:inherit; border-color:color-mix(in srgb,var(--gold) 45%,transparent); background:color-mix(in srgb,var(--gold) 9%,transparent); min-height:32px; }
.answer-card .answer-chip.can-ask:hover, .answer-card .answer-chip.can-ask:focus-visible { background:color-mix(in srgb,var(--gold) 20%,transparent); }
.answer-card .answer-also b { color:inherit; font-weight:600; margin-right:4px; }
.answer-card .answer-items { display:flex; flex-direction:column; gap:6px; }
.answer-card .answer-buttons, .answer-card .answer-choices { display:flex; flex-wrap:wrap; gap:8px; }
.answer-card .answer-buttons .btn { flex:1 1 auto; min-height:44px; }
.answer-card .answer-source { margin:0; padding-top:7px; border-top:1px solid #ffffff14; font-size:11px; color:var(--muted); }
.answer-card .answer-fact { margin:0; display:flex; flex-direction:column; gap:2px; }
.answer-card .answer-fact small { font-size:10px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); }
.answer-card .answer-fact b { font-size:19px; line-height:1.25; color:var(--gold); overflow-wrap:anywhere; }
