:root {
  --bg: #0d102c;
  --panel: rgba(25, 27, 67, .88);
  --panel-2: rgba(42, 44, 91, .86);
  --panel-hot: rgba(57, 57, 111, .91);
  --line: rgba(196, 188, 255, .25);
  --line-hot: rgba(190, 180, 255, .7);
  --text: #fffaf2;
  --muted: #c4c3dd;
  --accent: #f1d58d;
  --accent-2: #bfb2ff;
  --toxic: #8ee0d1;
  --magenta: #e9a8d7;
  --good: #9fe2c7;
  --warn: #f3c87f;
  --bad: #ff9aab;
  --shadow: 0 24px 70px rgba(8, 7, 35, .46);
}

/* Admin-only catalogue previews: Pokémon and Lorcana deliberately share the
   mature search layout without pretending their shop-price connectors exist. */
.preview-realm-banner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 18px;
  align-items: center;
  margin: 18px clamp(16px, 3vw, 42px) 0;
  padding: 14px 18px;
  border: 1px solid rgba(255, 207, 83, .48);
  border-radius: 14px;
  background: rgba(10, 14, 31, .92);
  box-shadow: 0 14px 35px rgba(0, 0, 0, .28);
}
.preview-realm-banner > span {
  grid-row: 1 / span 2;
  padding: 7px 9px;
  border-radius: 7px;
  color: #17101f;
  background: #ffd45f;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
}
.preview-realm-banner b { color: #fff; font-size: 14px; }
.preview-realm-banner p { margin: 0; color: #cbd4e7; font-size: 11px; }

body[data-realm="pokemon"] {
  --accent: #ffcb3b;
  --accent-2: #55a7ff;
  --toxic: #ffcb3b;
  background:
    radial-gradient(circle at 90% 5%, rgba(48, 123, 223, .28), transparent 34%),
    radial-gradient(circle at 8% 50%, rgba(255, 203, 59, .12), transparent 32%),
    #071428;
}
body[data-realm="lorcana"] {
  --accent: #69d3ff;
  --accent-2: #d38cff;
  --toxic: #69d3ff;
  background:
    radial-gradient(circle at 88% 9%, rgba(125, 72, 193, .30), transparent 34%),
    radial-gradient(circle at 10% 55%, rgba(59, 174, 222, .15), transparent 34%),
    #100c28;
}
body[data-realm="pokemon"] .search-header,
body[data-realm="lorcana"] .search-header {
  background: rgba(5, 11, 27, .95);
  border-bottom-color: color-mix(in srgb, var(--accent) 42%, transparent);
}
body[data-realm="pokemon"] .brand-copy h1 {
  color: #ffdd66;
  font-family: Bahnschrift, "Arial Narrow", sans-serif;
  letter-spacing: .035em;
}
body[data-realm="lorcana"] .brand-copy h1 {
  color: #8de3ff;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: .015em;
}
/* Preview realms need their own native-form colour contract. Chrome can
   otherwise paint a light textarea while retaining the inherited light text
   colour (especially after spellcheck/autofill), making typed text vanish. */
body[data-realm="pokemon"] #buylist,
body[data-realm="lorcana"] #buylist {
  color-scheme: dark;
  color: #f7fbff;
  -webkit-text-fill-color: #f7fbff;
  caret-color: var(--accent);
  background: #091129 !important;
  border-color: color-mix(in srgb, var(--accent) 68%, #7082b8);
  box-shadow: inset 4px 0 color-mix(in srgb, var(--accent) 38%, transparent);
}
body[data-realm="pokemon"] #buylist:focus,
body[data-realm="lorcana"] #buylist:focus {
  color: #fff;
  -webkit-text-fill-color: #fff;
  background: #0d1734 !important;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent),
              inset 4px 0 var(--accent);
}
body[data-realm="pokemon"] #buylist::placeholder,
body[data-realm="lorcana"] #buylist::placeholder {
  color: #91a0c4;
  -webkit-text-fill-color: #91a0c4;
  opacity: 1;
}
body[data-realm="pokemon"] #buylist:-webkit-autofill,
body[data-realm="lorcana"] #buylist:-webkit-autofill {
  -webkit-text-fill-color: #f7fbff;
  -webkit-box-shadow: 0 0 0 1000px #091129 inset;
  box-shadow: 0 0 0 1000px #091129 inset;
}
body[data-realm="pokemon"] .analytics-contributor-only,
body[data-realm="lorcana"] .analytics-contributor-only,
.preview-printing-badge {
  display: grid;
  gap: 3px;
  min-width: min(290px, 100%);
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 8%, rgba(8, 12, 27, .92));
}
.preview-printing-badge span {
  color: var(--accent);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .13em;
}
.preview-printing-badge b { color: #f6f8ff; font-size: 11px; }
.admin-preview-links h3 { margin: 5px 0 2px; color: var(--text); }
.admin-preview-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}
.admin-preview-link-grid a {
  display: grid;
  gap: 3px;
  align-content: center;
  min-height: 58px;
  text-align: left;
  text-decoration: none;
}
.admin-preview-link-grid small { color: var(--muted); font-size: 9px; }
body[data-realm="pokemon"] .no-shop-offers::before,
body[data-realm="lorcana"] .no-shop-offers::before {
  content: "UNDER CONSTRUCTION · ";
  color: var(--accent);
  font-weight: 900;
}
@media (max-width: 620px) {
  .preview-realm-banner { grid-template-columns: 1fr; }
  .preview-realm-banner > span { grid-row: auto; width: fit-content; }
  .preview-printing-badge { min-width: 0; }
  .admin-preview-link-grid { grid-template-columns: 1fr; }
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  /* Without a stacking context of its own, body's `position: fixed;
     z-index: -1;` ::before/::after (grain, and now the realm backdrops
     below) render BEHIND body's own background instead of above it —
     invisible regardless of what's in them. `isolation: isolate` gives
     body that stacking context without touching layout/positioning. */
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(12, 13, 45, .34), rgba(12, 13, 45, .82)),
    url("wish-garden.png") center top / cover fixed no-repeat,
    var(--bg);
  color: var(--text);
  font: 14px/1.5 "Segoe UI", Inter, Arial, sans-serif;
  letter-spacing: .01em;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 78% 70%, rgba(159, 226, 199, .09), transparent 34%),
    radial-gradient(circle at 22% 72%, rgba(233, 168, 215, .09), transparent 30%);
}
/* A faint grain over the atmospheric background — the same trick print
   card stock and premium dark UIs use so a flat gradient doesn't read as
   flat. Inlined as an SVG turbulence filter so no binary asset is needed
   and it tiles at any viewport size. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: .05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}
::selection { background: var(--magenta); color: #fff; }
a, button { -webkit-tap-highlight-color: transparent; }
button, input, textarea, select { font: inherit; }
button:focus-visible, a:focus-visible, textarea:focus-visible,
input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 24px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 1px, transparent 1px 26px),
    rgba(18, 19, 55, .84);
  backdrop-filter: blur(18px) saturate(130%);
  box-shadow: 0 1px 0 rgba(215, 170, 98, .08), 0 12px 34px rgba(0, 0, 0, .28);
  z-index: 5;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: max-content; }
.brand-mascot {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 5px 12px rgba(9, 8, 42, .45));
}
.brand-sigil {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #081013;
  background: linear-gradient(135deg, var(--accent), #f0d89a 50%, var(--accent-2));
  clip-path: polygon(20% 0, 100% 0, 100% 80%, 80% 100%, 0 100%, 0 20%);
  font: 900 12px/1 "Arial Narrow", "Segoe UI", sans-serif;
  letter-spacing: .12em;
  box-shadow: 0 0 24px rgba(67, 225, 209, .2);
}
.brand-copy { display: grid; line-height: 1; }
.brand h1 {
  margin: 0;
  color: var(--text);
  font: 900 22px/.95 "Arial Narrow", "Segoe UI", sans-serif;
  letter-spacing: .12em;
}
.brand h1 span { color: var(--accent); margin-left: .24em; }
.eyebrow, .section-code {
  color: var(--accent);
  font: 700 9px/1.2 ui-monospace, "Cascadia Code", Consolas, monospace;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.brand .eyebrow { margin-bottom: 4px; }
.sub { color: var(--muted); font-size: 11px; margin-top: 4px; }
.sync-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.chip {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 2px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
  backdrop-filter: blur(8px);
}
.chip.fresh { border-color: rgba(185, 239, 82, .45); color: var(--good); box-shadow: inset 2px 0 var(--good); }
.chip.stale { border-color: var(--warn); color: var(--warn); }
.chip.down  { border-color: var(--bad);  color: var(--bad); }
.banner {
  background: rgba(51, 41, 15, .94);
  border-bottom: 1px solid var(--warn);
  color: var(--warn);
  padding: 8px 22px;
  font-size: 13px;
}
main {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
  max-width: 1680px;
  margin: 0 auto;
  align-items: start;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top-color: rgba(215, 170, 98, .55);
  border-radius: 2px 18px 2px 18px;
  padding: 20px;
  position: sticky;
  top: 82px;
  box-shadow: var(--shadow), inset 0 1px rgba(255,255,255,.025);
  backdrop-filter: blur(18px) saturate(125%);
}
.panel::after {
  content: "";
  position: absolute;
  top: -1px;
  right: 20px;
  width: 52px;
  height: 2px;
  background: var(--accent-2);
  box-shadow: 0 0 14px var(--accent-2);
}
.panel h2 {
  margin: 5px 0 5px;
  font: 800 18px/1.2 "Arial Narrow", "Segoe UI", sans-serif;
  letter-spacing: .035em;
}
.panel h3 {
  margin: 19px 0 7px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hint { color: var(--muted); font-size: 12px; margin: 2px 0 8px; }
.region-toggle { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; }
.region-toggle label { color: var(--muted); font-size: 11.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.region-toggle select {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.region-toggle select:hover, .region-toggle select:focus { border-color: var(--accent-2); }
code { background: rgba(67,225,209,.08); color: #b9f7ef; padding: 1px 5px; border-radius: 2px; font-size: 11px; }
.ta-wrap { position: relative; }
.ta-wrap:has(.ac:not(.hidden)) { padding-bottom: 186px; }
/* The in-flight "shops are responding" overlay is position:absolute (it
   has to sit above the textarea without shifting the page underneath),
   so it doesn't contribute to .ta-wrap's own height — on a short textarea
   (guest state, or the shortened rows="3" default) its content is taller
   than the wrap, and it visually spills over the buttons below. Reserve
   real room for it whenever it's showing, regardless of textarea height. */
.ta-wrap:has(.search-input-overlay:not(.hidden)) { min-height: 132px; }
textarea, input, select {
  width: 100%;
  background: rgba(1, 8, 12, .72);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 2px 10px 2px 10px;
  padding: 10px 12px;
  font: 13px/1.5 ui-monospace, "SF Mono", Menlo, monospace;
  resize: vertical;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
textarea:focus, input:focus, select:focus {
  outline: none;
  border-color: var(--accent-2);
  background: rgba(3, 15, 19, .88);
  box-shadow: 0 0 0 3px rgba(67, 225, 209, .08), inset 3px 0 var(--accent-2);
}
textarea::placeholder, input::placeholder { color: #607577; }
select { resize: none; appearance: auto; }
.ac {
  position: absolute;
  margin-top: 0;
  background: var(--panel-2);
  border: 1px solid var(--accent-2);
  border-radius: 2px 10px 2px 10px;
  z-index: 10;
  max-height: 180px;
  overflow-y: auto;
}
.ac div { padding: 6px 10px; cursor: pointer; font-size: 12px; }
.ac div:hover, .ac div.sel { background: rgba(67, 225, 209, .22); color: #fff; }
.ac .k { color: var(--muted); margin-left: 6px; font-size: 11px; }
.ac div:hover .k, .ac div.sel .k { color: #e8dcff; }
.btn-row { display: flex; gap: 8px; margin-top: 10px; }
button {
  border: 1px solid var(--line);
  border-radius: 2px 9px 2px 9px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  background: var(--panel-2);
  color: var(--text);
  letter-spacing: .045em;
  transition: border-color .18s, color .18s, background .18s, transform .18s, box-shadow .18s;
}
button.primary {
  background: linear-gradient(105deg, var(--toxic), var(--accent-2));
  border-color: transparent;
  color: #071113;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  flex: 1;
  box-shadow: 0 0 26px rgba(67, 225, 209, .12);
}
.btn-link.primary {
  background: linear-gradient(105deg, var(--toxic), var(--accent-2));
  border-color: transparent;
  color: #17163b;
  font-weight: 800;
  text-align: center;
}
button.primary:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 0 30px rgba(67, 225, 209, .25); }
button.ghost:hover { border-color: var(--accent-2); color: var(--accent-2); background: rgba(67,225,209,.07); }
button:disabled { opacity: .5; cursor: wait; }
.saved ul, .watch ul { list-style: none; margin: 6px 0 0; padding: 0; }
.saved li, .watch li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 2px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--line);
}
.saved li a, .watch li a { color: var(--accent-2); cursor: pointer; text-decoration: none; flex: 1; }
.watch .hit { color: var(--good); font-weight: 600; }
.x { color: var(--bad); cursor: pointer; padding: 0 4px; background: none; border: none; font-size: 13px; }
.results {
  min-width: 0;
  min-height: 420px;
  padding: 22px;
  background: rgba(4, 13, 18, .8);
  border: 1px solid var(--line);
  border-radius: 18px 2px 18px 2px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(15px) saturate(115%);
}
.results-intro {
  position: relative;
  padding: 2px 0 17px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.results-intro::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 88px;
  height: 1px;
  background: linear-gradient(90deg, var(--magenta), transparent);
  box-shadow: 0 0 12px var(--magenta);
}
.results-intro h2 {
  margin: 5px 0 2px;
  color: var(--text);
  font: 900 clamp(25px, 3vw, 42px)/1 "Arial Narrow", "Segoe UI", sans-serif;
  letter-spacing: .015em;
  text-transform: uppercase;
}
.results-intro p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.results-intro.compact h2 { font-size: clamp(23px, 2.5vw, 34px); }
.status {
  color: var(--accent-2);
  font: 11px/1.5 ui-monospace, "Cascadia Code", Consolas, monospace;
  min-height: 18px;
  margin-bottom: 9px;
}
.tier-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 18px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  background: rgba(2, 10, 14, .58);
  color: var(--muted);
  font-size: 10.5px;
}
.tier-strip > div { display: flex; align-items: center; gap: 5px; }
.tier-strip b { color: var(--text); text-transform: uppercase; letter-spacing: .08em; }
.tier-strip .locked { opacity: .62; }
.tier-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.tier-dot.free { background: var(--accent); }
.tier-dot.member { background: var(--good); box-shadow: 0 0 8px var(--good); }
.tier-dot.pro { background: var(--magenta); }
.unmatched {
  background: #2b1e1e;
  border: 1px solid var(--bad);
  border-radius: 2px 10px 2px 10px;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: #ffb3b3;
}
/* Keep wide comparison tables inside the result panel on small screens. */
.table-wrap { overflow-x: auto; scrollbar-color: var(--accent-2) rgba(0,0,0,.2); }
table { border-collapse: collapse; width: 100%; }
th, td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
  font-size: 13px;
}
th {
  color: var(--accent);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .1em;
  background: rgba(3, 11, 15, .94);
}
tbody tr { transition: background .15s; }
tbody tr:hover { background: rgba(67, 225, 209, .045); }
td.price a { color: var(--text); text-decoration: none; }
td.price a:hover { color: var(--accent-2); }
td.price.best { color: var(--good); font-weight: 800; text-shadow: 0 0 13px rgba(185,239,82,.25); }
td.price.best a { color: var(--good); }
td.price .oos { color: var(--muted); font-style: italic; font-size: 12px; }
td.card-cell { display: flex; align-items: center; gap: 10px; }
td.card-cell img {
  width: 34px; height: 47px;
  object-fit: cover;
  border-radius: 2px 7px 2px 7px;
  background: var(--panel-2);
  cursor: zoom-in;
}
.cname { font-weight: 600; cursor: pointer; }
.cname:hover { color: var(--accent-2); }
.cmeta { color: var(--muted); font-size: 11.5px; }
.finish-foil { color: var(--magenta); font-size: 10px; border: 1px solid rgba(255,76,154,.55); border-radius: 2px; padding: 1px 4px; margin-left: 6px; text-transform: uppercase; }
.finish-nonfoil { color: var(--cyan); font-size: 10px; border: 1px solid rgba(51,208,255,.48); border-radius: 2px; padding: 1px 4px; margin-left: 6px; text-transform: uppercase; }
.rowbtn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; padding: 2px 5px; }
.rowbtn:hover { color: var(--accent); }
.carousell { margin-top: 24px; }
.carousell h2 { font-size: 14px; color: var(--muted); }
.caro-item { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.caro-item a { color: var(--accent-2); text-decoration: none; }
.caro-item .p { color: var(--good); font-weight: 600; margin-left: 8px; }
/* Purchase plans */
.plan-box { margin-top: 16px; }
.plan-row {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 2px 9px 2px 9px;
  padding: 7px 10px;
  margin-bottom: 6px;
  cursor: pointer;
}
.plan-row:hover { border-color: var(--accent-2); border-left-color: var(--accent-2); background: var(--panel-hot); }
.plan-head { display: flex; align-items: baseline; gap: 8px; }
.plan-name { font-weight: 600; font-size: 12.5px; }
.plan-total { margin-left: auto; color: var(--good); font-weight: 700; font-size: 13.5px; }
.plan-sub { color: var(--muted); font-size: 11px; margin-top: 2px; }
.plan-short { color: var(--warn); }
.plan-prem { color: var(--warn); }
.plan-sechead {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 12px 0 6px;
}
.plan-caveat { color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.plan-caveat div { margin-top: 5px; }
.plan-modal-card {
  width: min(1040px, 94vw);
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
}
#plan-modal .plan-modal-card { width: min(1040px, 94vw); max-height: 90dvh; }
.plan-modal-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.plan-title { min-width: 0; }
.plan-title h2 { margin: 0 0 3px; font-size: 22px; }
.plan-title .sub { display: block; max-width: 720px; line-height: 1.45; }
.plan-modal-head #plan-modal-close { margin-left: auto; flex: 0 0 auto; }
.plan-modal-controls {
  display: grid;
  grid-template-columns: auto minmax(160px, 230px) auto;
  align-items: end;
  gap: 9px;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px 3px 12px 3px;
  background: rgba(67, 225, 209, .035);
}
.plan-body { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; }
.plan-folder-label {
  display: grid;
  gap: 3px;
  min-width: 150px;
  color: var(--accent);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.plan-folder-label select { padding: 6px 9px; }
.plan-new-folder {
  position: relative;
  display: grid;
  gap: 4px;
}
.plan-new-folder > button { margin-left: 0; }
.plan-folder-create {
  position: absolute;
  z-index: 2;
  top: calc(100% + 5px);
  right: 0;
  display: flex;
  gap: 6px;
  width: min(360px, 75vw);
  padding: 9px;
  border: 1px solid var(--line-hot);
  border-radius: 10px;
  background: var(--panel-hot);
  box-shadow: var(--shadow);
}
.plan-folder-create input { min-width: 0; flex: 1; padding: 7px 9px; }
.plan-folder-create button { margin-left: 0; }
.plan-folder-status {
  max-width: 210px;
  color: var(--good);
  font-size: 10px;
  line-height: 1.2;
}
.plan-store { margin-bottom: 14px; }
.plan-store-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 7px 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 7px;
  margin-bottom: 5px;
  font-size: 13px;
}
.plan-store-sub { color: var(--good); font-weight: 700; min-width: 62px; text-align: right; }
.plan-store ul { list-style: none; margin: 0; padding: 0; }
.plan-store li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 3px 0;
  font-size: 12.5px;
}
.plan-store li a { color: var(--text); text-decoration: none; }
.plan-store li a:hover { color: var(--accent-2); }
.plan-line-cost { margin-left: auto; font-variant-numeric: tabular-nums; }
.plan-missing {
  color: #ffb3b3;
  background: #2b1e1e;
  border: 1px solid var(--bad);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
}

/* Small inline buttons (plan modal store tools) */
button.mini, a.mini {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  line-height: 1.6;
}
button.mini:hover, a.mini:hover { border-color: var(--accent-2); color: var(--accent-2); }
button.mini:disabled { opacity: .7; cursor: default; color: var(--good); border-color: var(--good); }
.plan-store-tools {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--text);
  font-weight: 400;
}
.btn-link { display: inline-block; padding: 8px 16px; border-radius: 8px;
            border: 1px solid var(--line); background: var(--panel-2);
            color: var(--text); text-decoration: none; font-size: 13px; }
.btn-link:hover { border-color: var(--accent-2); color: var(--accent-2); }
#plan-add-all { margin-left: 0; height: 100%; }
body:not(.has-account) .plan-modal-controls { grid-template-columns: 1fr; }
body:not(.has-account) #plan-add-all { width: 100%; }
.account-btn {
  border-color: rgba(185, 239, 82, .42);
  color: var(--good);
  background: rgba(185, 239, 82, .06);
  white-space: nowrap;
}
.account-btn::before { content: "◈ "; }
.account-btn.signed-in { border-color: var(--accent-2); color: var(--accent-2); }
body:not(.has-account) .member-only { display: none !important; }
body.has-account .guest-only { display: none !important; }
.analytics-contributor-only { display: none !important; }
body.has-analytics-consent .analytics-contributor-only { display: block !important; }
body:not(.has-account) #buylist { height: 64px; min-height: 64px; }
body.has-account #buylist { min-height: 150px; }

/* Account modal */
body.auth-modal-open { overflow: hidden; }
.auth-card {
  width: min(560px, 92vw);
  max-height: 90dvh;
  overflow-y: auto;
  position: relative;
}
.auth-card h2 { margin: 7px 0 5px; font-size: 27px; text-transform: uppercase; }
.auth-close { position: absolute; top: 12px; right: 12px; padding: 5px 9px; }
.auth-reason { color: var(--muted); margin: 0 34px 14px 0; }
.auth-perks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 14px 0;
}
.auth-perks span {
  padding: 8px;
  border: 1px solid var(--line);
  background: rgba(67,225,209,.04);
  color: var(--accent-2);
  font-size: 10.5px;
}
.auth-perks .locked { color: var(--muted); }
.auth-tabs { display: flex; gap: 5px; border-bottom: 1px solid var(--line); margin: 18px 0 13px; }
.auth-tab { border: 0; border-radius: 0; background: none; color: var(--muted); }
.auth-tab.active { color: var(--text); box-shadow: inset 0 -2px var(--accent-2); }
.auth-form { display: grid; gap: 10px; }
.auth-form label, .inventory-form label {
  display: grid;
  gap: 5px;
  color: var(--accent);
  font-size: 10px;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.auth-form label span { color: var(--muted); text-transform: none; letter-spacing: 0; }
.auth-form button { margin-top: 4px; }
.auth-form .consent-check {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 11px;
  letter-spacing: 0;
  line-height: 1.45;
  text-transform: none;
}
.consent-check input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--accent-2); }
.consent-check a, .site-footer a, .prose-card a { color: var(--accent-2); }
.optional-consent { background: rgba(67,225,209,.04); }
.analytics-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(67,225,209,.04);
}
.analytics-choice legend { padding: 0 6px; color: var(--accent); font-size: 11px; font-weight: 800; }
.analytics-choice > p { grid-column: 1 / -1; margin: 0 0 3px; color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.analytics-choice label { display: grid; grid-template-columns: 18px 1fr; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); cursor: pointer; }
.analytics-choice input { width: 16px; height: 16px; accent-color: var(--accent-2); }
.analytics-choice b, .analytics-choice small { display: block; }
.analytics-choice small { margin-top: 3px; color: var(--muted); font-size: 9.5px; }
.privacy-preference { margin: 17px 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.privacy-preference p { color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.privacy-status { display: block; min-height: 16px; margin-top: 8px; color: var(--accent-2); font-size: 10.5px; }
.auth-error {
  margin-top: 10px;
  padding: 8px 10px;
  color: #ffd0d7;
  border: 1px solid rgba(255,95,116,.5);
  background: rgba(255,95,116,.09);
  font-size: 12px;
}
.auth-note { color: var(--muted); font-size: 10.5px; margin: 13px 0 0; }
.auth-email { color: var(--accent-2); font-family: ui-monospace, Consolas, monospace; }
.google-auth-button {
  width: 100%;
  display: grid;
  grid-template-columns: 25px 1fr;
  align-items: center;
  gap: 2px 9px;
  margin: 2px 0 10px;
  padding: 10px 13px;
  color: var(--text);
  border-color: rgba(255,255,255,.2);
  text-align: left;
}
.google-auth-button > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: #4285f4;
  background: white;
  border-radius: 50%;
  font-weight: 900;
}
.google-auth-button small { color: var(--muted); font-size: 9px; }
.google-auth-button:disabled { opacity: .62; cursor: not-allowed; }
.google-auth-button.compact { margin-top: 10px; }
.google-auth-button-host { min-height: 44px; margin: 10px 0; display: flex; justify-content: center; }
.google-auth-button-host.compact { justify-content: flex-start; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.account-tools {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(67,225,209,.025);
}
.account-tools p { color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.linked-account-list { display: grid; gap: 7px; margin-top: 9px; }
.linked-account-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 10.5px;
}
.linked-account-row b { color: var(--good); }
.account-tool-loading { color: var(--muted); font-size: 10.5px; }
.account-session-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.delete-account-panel {
  margin-top: 34px;
  padding: 14px 16px;
  border: 1px solid rgba(255,95,116,.25);
  border-radius: 10px;
  background: rgba(255,95,116,.035);
}
.delete-account-panel summary { color: #ff9baa; cursor: pointer; font-size: 10.5px; }
.delete-account-panel label {
  display: grid;
  gap: 5px;
  margin: 9px 0;
  color: var(--accent);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.danger-button { color: #ffd0d7; border-color: rgba(255,95,116,.52); background: rgba(255,95,116,.09); }

/* Private owner activity dashboard */
.admin-page {
  min-height: 100vh;
  color: #f7f8ff;
  background:
    linear-gradient(rgba(99, 128, 190, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 128, 190, .035) 1px, transparent 1px),
    radial-gradient(circle at 10% 8%, rgba(49, 130, 246, .20), transparent 34%),
    radial-gradient(circle at 92% 20%, rgba(255, 103, 77, .13), transparent 30%),
    #090d1c;
  background-size: 44px 44px, 44px 44px, auto, auto, auto;
}
.admin-header {
  min-height: 76px;
  padding-inline: clamp(20px, 3vw, 52px);
  border-bottom-color: rgba(126, 156, 220, .2);
  background: rgba(5, 9, 20, .9);
}
.admin-header nav { display: flex; gap: 10px; }
.admin-main {
  display: block;
  width: min(1540px, calc(100% - 64px));
  max-width: none;
  margin: 0 auto;
  padding: 54px 0 80px;
}
.admin-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 34px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(126,156,220,.16);
}
.admin-intro h1 {
  margin: 9px 0 11px;
  color: #fff;
  font-size: clamp(42px, 5vw, 68px);
  line-height: .94;
  letter-spacing: -.045em;
}
.admin-intro p { max-width: 610px; margin: 0; color: #aeb9d2; font-size: 14px; }
.admin-intro-tools { display: grid; justify-items: end; gap: 10px; }
.admin-intro-tools > small { color: #75819c; font-size: 10px; }
.admin-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #a9f1d5;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.admin-live-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #54dca8;
  box-shadow: 0 0 0 4px rgba(84,220,168,.10), 0 0 14px rgba(84,220,168,.72);
}
.admin-periods { display: flex; gap: 6px; padding: 5px; border: 1px solid rgba(126,156,220,.2); border-radius: 999px; background: rgba(13,20,43,.72); }
.admin-periods a { padding: 8px 13px; border-radius: 999px; color: #aeb9d2; font-size: 12px; font-weight: 800; text-decoration: none; }
.admin-periods a.active { color: #081020; background: #78d8ed; }
.admin-view-tabs {
  display: inline-flex;
  gap: 5px;
  margin-bottom: 22px;
  padding: 5px;
  border: 1px solid rgba(126,156,220,.2);
  border-radius: 12px;
  background: rgba(7,13,30,.78);
}
.admin-view-tabs a {
  padding: 10px 18px;
  border-radius: 8px;
  color: #9ca9c5;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}
.admin-view-tabs a.active { color: #071020; background: #78d8ed; }
.admin-metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 42px; }
.admin-metric, .admin-panel {
  border: 1px solid rgba(126,156,220,.18);
  background: linear-gradient(145deg, rgba(20,31,62,.94), rgba(9,15,34,.96));
  box-shadow: 0 20px 50px rgba(0,0,0,.20), inset 0 1px rgba(255,255,255,.025);
}
.admin-metric {
  position: relative;
  min-height: 156px;
  overflow: hidden;
  padding: 22px;
  border-radius: 18px;
}
.admin-metric::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #49c8e4, transparent 78%);
}
.admin-metric:nth-child(2n)::before { background: linear-gradient(90deg, #ff856f, transparent 78%); }
.admin-metric.featured { border-color: rgba(120,216,237,.48); background: linear-gradient(145deg, rgba(18,67,103,.96), rgba(15,29,61,.96)); }
.admin-metric span, .admin-metric small { display: block; color: #aeb9d2; }
.admin-metric span { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.admin-metric strong { display: block; margin: 12px 0 8px; color: #fff; font-size: 38px; line-height: 1; }
.admin-metric small { font-size: 10.5px; line-height: 1.35; }
.admin-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 15px;
}
.admin-section-heading h2 { margin: 5px 0 0; color: #fff; font-size: 24px; }
.admin-section-heading p { margin: 0; color: #7f8ba8; font-size: 11px; }
.admin-dashboard-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.admin-panel { min-width: 0; padding: 26px; border-radius: 20px; }
.admin-panel h2 { margin: 5px 0 18px; color: #fff; font-size: 22px; }
.admin-chart-panel { grid-column: span 6; min-height: 360px; }
.admin-chart-panel > header {
  position: static;
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
}
.admin-chart-panel header h2 { margin-bottom: 5px; }
.admin-chart-panel header > b { color: #78d8ed; font-size: 32px; }
.admin-bar-chart {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 230px;
  margin-top: 8px;
  padding: 30px 2px 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(126,156,220,.16);
  background: repeating-linear-gradient(to top, rgba(126,156,220,.06) 0 1px, transparent 1px 52px);
}
.admin-bar-column { position: relative; display: grid; grid-template-rows: 1fr 22px; align-items: end; flex: 1; height: 100%; min-width: 3px; }
.admin-bar-column i { display: block; width: 100%; min-height: 3px; height: var(--bar-height); border-radius: 4px 4px 1px 1px; background: linear-gradient(#78d8ed, #3477d4); }
.admin-bar-chart.accent .admin-bar-column i { background: linear-gradient(#ff9b78, #d45568); }
.admin-bar-column small { overflow: visible; color: #7f8ba8; font-size: 8px; white-space: nowrap; transform: rotate(-35deg); transform-origin: top left; }
.admin-bar-value { position: absolute; bottom: calc(var(--bar-height, 0%) + 25px); width: 100%; color: #dce6fb; font-size: 9px; text-align: center; }
.admin-chart-legend { display: flex; flex-wrap: wrap; gap: 9px 18px; margin: 2px 0 10px; }
.admin-chart-legend span { display: inline-flex; align-items: center; gap: 7px; color: #aeb9d2; font-size: 11px; }
.admin-chart-legend span::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: #49c8e4; }
.admin-chart-legend span.mtg::before { background: #d46fda; }
.admin-chart-legend b { color: #fff; font-size: 12px; }
.admin-grouped-chart { height: 205px; }
.admin-grouped-bars {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 2px;
  height: 100%;
}
.admin-bar-column .admin-grouped-bars i {
  width: min(42%, 13px);
  min-height: 2px;
  height: var(--bar-height);
  border-radius: 4px 4px 1px 1px;
}
.admin-bar-column .admin-grouped-bars i.riftbound { background: linear-gradient(#73e8f7, #247abd); }
.admin-bar-column .admin-grouped-bars i.mtg { background: linear-gradient(#ef9be9, #83409d); }
.admin-note, .admin-empty { color: #9ca9c5; font-size: 11px; line-height: 1.55; }
.admin-search-summary, .admin-audience, .admin-top-cards { grid-column: span 4; }
.admin-breakdown, .admin-realm-split { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.admin-breakdown div, .admin-realm-split div { padding: 15px; border: 1px solid rgba(126,156,220,.14); border-radius: 12px; background: rgba(5,10,25,.35); }
.admin-breakdown span, .admin-realm-split span { display: block; color: #9ca9c5; font-size: 11px; }
.admin-breakdown b, .admin-realm-split b { display: block; margin-top: 7px; color: #fff; font-size: 24px; }
.admin-split-bar { height: 9px; margin-top: 16px; overflow: hidden; border-radius: 999px; background: #69466f; }
.admin-split-bar i { display: block; height: 100%; background: #47bdd9; }
.admin-top-cards ol { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.admin-top-cards li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid rgba(126,156,220,.14); }
.admin-top-cards li span { color: #eef3ff; font-weight: 750; }
.admin-top-cards li b { color: #78d8ed; }
.admin-top-cards li small { grid-column: 1 / -1; color: #8794b0; }
.admin-methodology { grid-column: 1 / -1; }
.admin-methodology ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 36px; margin: 0; padding-left: 18px; color: #aeb9d2; font-size: 12px; line-height: 1.5; }
.admin-breakdown small { display: block; margin-top: 4px; color: #75819c; font-size: 9px; }
.admin-daily-grid { display: grid; gap: 16px; }
.admin-daily-chart { min-height: 340px; }
.admin-daily-chart > header, .admin-daily-table-panel > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
}
.admin-daily-chart header h2, .admin-daily-table-panel header h2 { margin-bottom: 8px; }
.admin-daily-table-panel header p { max-width: 390px; margin: 5px 0 0; color: #8e9ab5; font-size: 11px; text-align: right; }
.admin-table-scroll { max-height: 540px; overflow: auto; border: 1px solid rgba(126,156,220,.14); border-radius: 14px; }
.admin-daily-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin-daily-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 13px 16px;
  color: #9ca9c5;
  background: #0d1731;
  font-size: 9px;
  letter-spacing: .07em;
  text-align: right;
  text-transform: uppercase;
}
.admin-daily-table th:first-child, .admin-daily-table td:first-child { text-align: left; }
.admin-daily-table td { padding: 12px 16px; border-top: 1px solid rgba(126,156,220,.11); color: #dbe5fa; text-align: right; }
.admin-daily-table tbody tr:nth-child(even) { background: rgba(126,156,220,.035); }
.admin-daily-table .riftbound-value { color: #73e8f7; font-weight: 800; }
.admin-daily-table .mtg-value { color: #ef9be9; font-weight: 800; }
.admin-updated { margin-top: 20px; color: #75819c; font-size: 10.5px; text-align: right; }
@media (max-width: 1100px) {
  .admin-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-chart-panel { grid-column: 1 / -1; }
  .admin-search-summary, .admin-audience, .admin-top-cards { grid-column: span 6; }
  .admin-top-cards { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .admin-main { width: min(100% - 24px, 1500px); padding-top: 28px; }
  .admin-intro { align-items: start; flex-direction: column; }
  .admin-intro-tools { width: 100%; justify-items: start; }
  .admin-section-heading { align-items: start; flex-direction: column; gap: 6px; }
  .admin-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-metric { min-height: 125px; padding: 16px; }
  .admin-metric strong { font-size: 31px; }
  .admin-chart-panel, .admin-search-summary, .admin-audience,
  .admin-top-cards, .admin-methodology { grid-column: 1 / -1; }
  .admin-panel { padding: 18px; }
  .admin-methodology ul { grid-template-columns: 1fr; }
  .admin-daily-chart > header, .admin-daily-table-panel > header { align-items: start; flex-direction: column; gap: 6px; }
  .admin-daily-table-panel header p { text-align: left; }
}
@media (max-width: 440px) {
  .admin-header { align-items: flex-start; }
  .admin-header .cardsu-home-link img { width: 32px; }
  .admin-metric-grid { grid-template-columns: 1fr 1fr; }
  .admin-metric span { font-size: 9px; }
  .admin-breakdown { grid-template-columns: 1fr; }
}

/* Collection page */
main.single { grid-template-columns: 1fr; }
.panel-static {
  margin-bottom: 18px;
  padding: 17px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top-color: rgba(215, 170, 98, .55);
  border-radius: 2px 14px 2px 14px;
}
.inventory-add h2 { margin: 4px 0 1px; font-size: 18px; }
.folder-manager {
  display: grid;
  grid-template-columns: minmax(240px, .65fr) minmax(520px, 1.35fr);
  gap: 18px;
  align-items: end;
}
.folder-manager h2 { margin: 4px 0 1px; font-size: 18px; }
.folder-controls {
  display: grid;
  grid-template-columns: minmax(210px, 1.5fr) auto minmax(180px, 1fr) auto auto;
  gap: 7px;
  align-items: center;
}
.folder-controls .primary { min-height: 39px; }
.folder-controls .danger { color: var(--bad); border-color: rgba(255,95,116,.35); }
.folder-manager .status { grid-column: 1 / -1; margin: 0; }
.item-folder { min-width: 145px; padding: 5px 8px; font-size: 11px; }
.inventory-form {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(6, minmax(105px, 1fr)) auto;
  gap: 9px;
  align-items: end;
  margin-top: 13px;
}
.inventory-form button { min-height: 39px; }
.coll-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  align-items: stretch;
}
.coll-stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px 10px 2px 10px;
  padding: 10px 16px;
  min-width: 110px;
}
.coll-stat span { display: block; color: var(--muted); font-size: 11px;
                  text-transform: uppercase; letter-spacing: .5px; }
.coll-stat b { font-size: 18px; }
.coll-note { flex-basis: 100%; color: var(--muted); font-size: 11.5px; }
.pl-up { color: var(--good); font-weight: 700; }
.pl-down { color: var(--bad); font-weight: 700; }
.analytics-lock {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) minmax(260px, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 22px;
  padding: 20px;
  border: 1px solid rgba(255, 76, 154, .28);
  border-radius: 14px 2px 14px 2px;
  background: linear-gradient(110deg, rgba(23, 9, 22, .88), rgba(4, 18, 23, .88));
  box-shadow: inset 3px 0 var(--magenta);
}
.analytics-lock h2 { margin: 5px 0; font-size: 20px; }
.analytics-lock p { margin: 0; color: var(--muted); font-size: 12px; max-width: 610px; }
.analytics-preview { display: grid; gap: 5px; filter: blur(.25px); opacity: .7; }
.analytics-preview div { display: flex; justify-content: space-between; gap: 15px; padding: 6px 8px; border-bottom: 1px solid var(--line); font-size: 10px; }
.analytics-preview span { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.analytics-preview b { color: var(--magenta); }
.analytics-lock.analytics-open {
  border-color: rgba(159, 226, 199, .48);
  background: linear-gradient(110deg, rgba(48, 38, 91, .9), rgba(22, 58, 74, .86));
  box-shadow: inset 3px 0 var(--good), 0 18px 50px rgba(8, 7, 35, .22);
}

/* Portfolio preview */
.portfolio-page { max-width: 1380px; }
.portfolio-hero { padding-right: 220px; }
.asof { display: block; color: var(--accent); font-size: 10.5px; margin-top: 9px; }
.portfolio-loading { padding: 40px; text-align: center; color: var(--accent-2); }
.portfolio-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.portfolio-stat {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(47, 48, 102, .92), rgba(24, 29, 70, .9));
  box-shadow: var(--shadow);
}
.portfolio-stat span, .portfolio-stat small { display: block; color: var(--muted); }
.portfolio-stat span { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.portfolio-stat b { display: block; margin: 6px 0 2px; font-size: clamp(22px, 3vw, 34px); }
.portfolio-stat small { font-size: 10.5px; }
.portfolio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.portfolio-panel { border-radius: 18px; }
.portfolio-panel h2 { margin: 5px 0 13px; }
.portfolio-panel td a { color: var(--accent-2); text-decoration: none; }
.portfolio-position-row { cursor: pointer; transition: background .16s ease; }
.portfolio-position-row:hover, .portfolio-position-row:focus { background: color-mix(in srgb, var(--accent-2) 9%, transparent); outline: none; }
.portfolio-card-history { min-height: 260px; }
.history-dashboard-head { display: flex; align-items: center; gap: 14px; margin: 12px 0 16px; }
.history-dashboard-head img { width: 68px; height: 94px; object-fit: cover; border-radius: 7px; border: 1px solid var(--line); }
.history-dashboard-head h3 { margin: 0 0 4px; }
.history-dashboard-head p { margin: 0; color: var(--muted); font-size: 11px; }
.trend-value { font-size: 32px; font-weight: 850; }
.trend-value.soft { color: var(--accent-2); font-size: 22px; }
.portfolio-panel p { color: var(--muted); margin: 4px 0; }
.allocation-list { display: grid; gap: 12px; }
.allocation-row { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; }
.allocation-row span { display: block; color: var(--muted); font-size: 10.5px; }
.allocation-row strong { color: var(--accent); }
.allocation-track { grid-column: 1 / -1; height: 7px; background: rgba(6, 8, 32, .5); border-radius: 99px; overflow: hidden; }
.allocation-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--good)); }
.source-list { display: grid; gap: 8px; }
.source-row { display: grid; grid-template-columns: 1fr auto 110px; align-items: center; gap: 14px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(20, 21, 61, .5); }
.source-row p { font-size: 11px; }
.source-row a { color: var(--accent-2); text-decoration: none; }
.source-row > strong { text-align: right; color: var(--text); }
.source-row > strong small { display: block; color: var(--muted); font-weight: 400; font-size: 9.5px; }
.source-status { padding: 4px 7px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.source-status.connected { color: var(--good); border-color: rgba(159, 226, 199, .5); }
.source-status.search_only { color: var(--accent); }
.method-note { color: var(--muted); font-size: 10.5px; padding: 0 5px 15px; }
.header-spacer { margin-left: auto; }

/* Riftbound Pulse */
.pulse-page { max-width: 1320px; }
.pulse-hero { position: relative; overflow: hidden; padding-right: min(28vw, 360px); }
.pulse-hero::after {
  content: "✦";
  position: absolute;
  right: clamp(35px, 9vw, 135px);
  top: 50%;
  color: rgba(249, 220, 151, .75);
  font-size: clamp(70px, 10vw, 145px);
  line-height: 1;
  transform: translateY(-52%) rotate(12deg);
  text-shadow: 0 0 38px rgba(159, 226, 199, .45);
}
.pulse-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.pulse-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 18px; }
.pulse-feature, .pulse-card, .pulse-method { border-radius: 20px 3px 20px 3px; }
.pulse-feature h2, .pulse-card h2, .pulse-method h2 { margin: 6px 0 15px; }
.news-list { display: grid; gap: 9px; }
.news-list a {
  display: grid;
  grid-template-columns: 105px minmax(180px, .8fr) 1.25fr;
  align-items: center;
  gap: 16px;
  padding: 15px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 3px 14px 3px 14px;
  background: rgba(16, 20, 59, .58);
  transition: border-color .2s, transform .2s, background .2s;
}
.news-list a:hover { transform: translateX(3px); border-color: rgba(159, 226, 199, .58); background: rgba(44, 48, 104, .76); }
.news-list time { color: var(--accent); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.news-list strong { font-size: 14px; }
.news-list span, .pulse-card p, .pulse-method-grid span { color: var(--muted); font-size: 11px; line-height: 1.55; }
.pulse-asof { margin: 15px 2px 0; color: var(--muted); font-size: 9.5px; }
.pulse-side { display: grid; gap: 18px; }
.pulse-card { min-height: 185px; }
.pulse-card-soft { background: linear-gradient(145deg, rgba(67, 52, 116, .88), rgba(22, 50, 73, .86)); }
.text-link { color: var(--accent-2); text-decoration: none; font-size: 11px; font-weight: 750; }
.approval-pill { display: inline-block; margin-top: 10px; padding: 6px 10px; color: var(--accent); border: 1px solid rgba(249, 220, 151, .35); border-radius: 99px; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.pulse-method { margin-top: 18px; }
.pulse-method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pulse-method-grid div { padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(14, 18, 53, .46); }
.pulse-method-grid b, .pulse-method-grid span { display: block; }
.pulse-method-grid b { margin-bottom: 5px; color: var(--good); font-size: 11px; }
.pulse-method .method-note { margin: 14px 0 0; padding: 0; }
.site-footer { max-width: 1100px; margin: 10px auto 0; padding: 18px 24px 26px; color: rgba(219, 216, 239,.68); font-size: 9.5px; text-align: center; }
.site-footer p { margin: 5px auto; max-width: 840px; }
.site-footer b { color: var(--accent); }
.site-footer nav { margin-top: 9px; }
.install-app-button { margin-top: 12px; color: var(--good); border-color: rgba(159,226,199,.42); }

/* Privacy, terms, and retailer approval preview */
.simple-header { justify-content: space-between; }
.simple-header .brand-copy { color: var(--text); text-decoration: none; }
.policy-page, .retailer-page { max-width: 1120px; }
.prose-card { max-width: 850px; margin: 0 auto; padding: clamp(22px, 5vw, 48px); border-radius: 22px 3px 22px 3px; }
.prose-card h2 { margin: 8px 0 20px; font-size: clamp(28px, 5vw, 48px); }
.prose-card h3 { margin: 25px 0 7px; color: var(--accent); }
.prose-card p { color: var(--muted); line-height: 1.7; }
.retailer-hero { padding: clamp(25px, 6vw, 70px) 10px 35px; text-align: center; }
.retailer-hero h2 { margin: 9px auto; max-width: 780px; font-size: clamp(35px, 7vw, 70px); line-height: .98; }
.retailer-hero p { max-width: 680px; margin: 18px auto; color: var(--muted); font-size: 15px; line-height: 1.6; }
.approval-badge { display: inline-block; padding: 7px 12px; border: 1px solid rgba(215,170,98,.5); border-radius: 99px; color: var(--accent); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.retailer-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
.retailer-grid .panel-static { padding: 25px; border-radius: 20px 3px 20px 3px; }
.retailer-grid h2 { margin: 6px 0 16px; }
.sample-report { padding: 18px; background: rgba(67,225,209,.05); border: 1px solid var(--line); border-radius: 14px; }
.sample-report p, .sample-report li, .retailer-plan p { color: var(--muted); line-height: 1.55; }
.sample-report li { margin: 8px 0; }
.retailer-price { margin: 12px 0; color: var(--accent-2); font-size: 40px; font-weight: 850; }
.retailer-price small { color: var(--muted); font-size: 12px; font-weight: 400; }
.pulse-list { display: grid; gap: 8px; }
.pulse-list div { display: flex; justify-content: space-between; gap: 14px; padding: 11px; border-bottom: 1px solid var(--line); }
.pulse-list span { color: var(--muted); font-size: 10px; }

.hidden { display: none !important; }
.modal {
  position: fixed; inset: 0;
  background: rgba(0,4,7,.8);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  z-index: 20;
}
.modal-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 2px 18px 2px 18px;
  width: min(860px, 92vw);
  padding: 18px;
  box-shadow: var(--shadow);
}
.modal-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.modal-head img { width: 74px; height: 103px; object-fit: cover; border-radius: 6px; background: var(--panel-2); }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-head button { margin-left: auto; }
.modal-head img[data-card-art] { cursor: zoom-in; }
.art-modal { z-index: 40; padding: 18px; }
.art-viewer {
  position: relative;
  display: grid;
  justify-items: center;
  max-width: 94vw;
  max-height: 94dvh;
  padding: 14px;
  border: 1px solid rgba(249, 220, 151, .55);
  border-radius: 4px 20px 4px 20px;
  background: rgba(11, 13, 44, .96);
  box-shadow: 0 26px 90px rgba(0, 0, 0, .7), 0 0 45px rgba(159, 226, 199, .15);
}
.art-viewer img { display: block; max-width: min(620px, 86vw); max-height: 82dvh; object-fit: contain; border-radius: 10px; }
.art-close { position: absolute; z-index: 1; top: 10px; right: 10px; background: rgba(10, 12, 38, .9); }
.art-caption { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; margin-top: 10px; text-align: center; }
.art-caption .sub { color: var(--accent); }

/* Card Realms world traversal */
[data-realm-only="mtg"] { display: none; }
body[data-realm="mtg"] [data-realm-only="riftbound"] { display: none; }
body[data-realm="mtg"] [data-realm-only="mtg"] { display: block; }

.world-switcher {
  position: fixed;
  left: 20px;
  bottom: 18px;
  z-index: 18;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px 8px 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(14, 15, 43, .88);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .48);
  backdrop-filter: blur(16px) saturate(140%);
}
.world-switcher > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .15em;
  text-transform: uppercase;
  white-space: nowrap;
}
.world-switcher button {
  position: relative;
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  padding: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .035);
}
.world-switcher button::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid transparent;
  border-radius: inherit;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.world-switcher button:hover::after { border-color: var(--accent-2); transform: scale(1.04); }
.world-switcher button.active::after { border-color: var(--accent); box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent); }
.world-switcher img { width: 100%; height: 100%; object-fit: contain; }
.world-switcher-letters span { font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.realm-notice {
  position: fixed;
  left: 20px;
  bottom: 92px;
  z-index: 17;
  width: min(360px, calc(100vw - 40px));
  padding: 13px 15px;
  border: 1px solid rgba(230, 200, 135, .5);
  border-radius: 14px 3px 14px 3px;
  color: var(--text);
  background: rgba(30, 20, 29, .94);
  box-shadow: var(--shadow);
}
.realm-notice b, .realm-notice span { display: block; }
.realm-notice b { margin-bottom: 3px; color: var(--accent); }
.realm-notice span { color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.realm-notice > button {
  position: absolute;
  top: 7px;
  right: 7px;
  padding: 3px 7px;
  border: 0;
  background: transparent;
  color: var(--muted);
}

body[data-realm="mtg"] {
  --bg: #07080d;
  --panel: rgba(16, 22, 27, .91);
  --panel-2: rgba(27, 36, 38, .9);
  --panel-hot: rgba(43, 48, 43, .95);
  --line: rgba(198, 190, 161, .24);
  --line-hot: rgba(230, 199, 139, .74);
  --text: #f3eee2;
  --muted: #bbb9aa;
  --accent: #e0bd7d;
  --accent-2: #76b8b4;
  --toxic: #8fa66f;
  --magenta: #b07862;
  --good: #91a995;
  --warn: #c9a25e;
  --bad: #bd5966;
  --shadow: 0 28px 80px rgba(0, 0, 0, .74);
  background:
    linear-gradient(180deg, rgba(4, 5, 10, .12), rgba(5, 5, 10, .6)),
    linear-gradient(90deg, rgba(7, 4, 10, .12), transparent 34% 66%, rgba(7, 4, 10, .12)),
    url("mtg-watercolor-convergence-v6.png") center top / cover fixed no-repeat,
    #07080d;
  transition: background-color .45s, color .35s;
}
body[data-realm="mtg"]::before {
  background:
    linear-gradient(115deg, transparent 20%, rgba(115, 78, 138, .09) 50%, transparent 80%),
    radial-gradient(circle at 72% 23%, rgba(132, 165, 199, .12), transparent 27%),
    radial-gradient(circle at 18% 42%, rgba(125, 68, 111, .1), transparent 28%);
}
body[data-realm="mtg"] header {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 1px, transparent 1px 26px),
    linear-gradient(90deg, rgba(10, 15, 18, .97), rgba(24, 29, 27, .91), rgba(12, 17, 20, .97));
  box-shadow: 0 1px 0 rgba(208, 218, 224, .16), 0 14px 42px rgba(0, 0, 0, .6);
}
body[data-realm="mtg"] .brand h1,
body[data-realm="mtg"] .results-intro h2,
body[data-realm="mtg"] .retailer-hero h2 { font-family: Georgia, "Times New Roman", serif; letter-spacing: .07em; }
body[data-realm="mtg"] .brand h1 span { color: #8fc5bf; }
body[data-realm="mtg"] .brand-mascot { filter: drop-shadow(0 0 15px rgba(153, 111, 181, .44)); }
body[data-realm="mtg"] .sync-chips,
body[data-realm="mtg"] #refresh-btn { display: none; }
[data-realm-disabled="true"] { opacity: .58; cursor: not-allowed; }
body[data-realm="mtg"] .panel,
body[data-realm="mtg"] .results,
body[data-realm="mtg"] .panel-static,
body[data-realm="mtg"] .modal-card {
  border-top-color: rgba(230, 200, 135, .62);
  box-shadow: var(--shadow), inset 0 1px rgba(255, 246, 228, .035);
}
body[data-realm="mtg"] button.primary {
  color: #0d0c13;
  background: linear-gradient(105deg, #e2c486, #7fc1bb 52%, #9eae79);
}
.mtg-search-cue {
  display: none;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 14px 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(224, 189, 125, .42);
  border-radius: 4px 18px 4px 18px;
  background: linear-gradient(110deg, rgba(33, 27, 39, .92), rgba(19, 40, 40, .88));
  box-shadow: inset 0 0 30px rgba(118, 184, 180, .08), 0 14px 38px rgba(0, 0, 0, .3);
}
body[data-realm="mtg"] .mtg-search-cue:not(.hidden) { display: grid; }
.mtg-search-cue b, .mtg-search-cue span { display: block; }
.mtg-search-cue b { color: #f1d9a9; letter-spacing: .04em; }
.mtg-search-cue span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.mtg-search-cue strong { color: #8fd0c9; font-variant-numeric: tabular-nums; font-size: 17px; }
.archive-breath { position: relative; width: 50px; height: 50px; }
.archive-breath i {
  position: absolute;
  inset: 50%;
  border: 1px solid rgba(143, 208, 201, .72);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: archive-breathe 2.4s ease-out infinite;
}
.archive-breath i:nth-child(2) { animation-delay: .8s; }
.archive-breath i:nth-child(3) { animation-delay: 1.6s; }
body[data-realm="mtg"] .archive-searching {
  animation: archive-button-breathe 1.8s ease-in-out infinite;
}
@keyframes archive-breathe {
  0% { width: 8px; height: 8px; opacity: .95; box-shadow: 0 0 14px #76b8b4; }
  78%, 100% { width: 48px; height: 48px; opacity: 0; box-shadow: 0 0 2px transparent; }
}
@keyframes archive-button-breathe {
  0%, 100% { box-shadow: 0 0 0 rgba(118, 184, 180, 0); filter: brightness(.95); }
  50% { box-shadow: 0 0 24px rgba(118, 184, 180, .55); filter: brightness(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  .archive-breath i, body[data-realm="mtg"] .archive-searching { animation: none; }
  .archive-breath i { inset: 8px; width: 32px; height: 32px; transform: none; opacity: .8; }
}
body[data-realm="mtg"] .world-switcher {
  background: rgba(9, 9, 15, .92);
  box-shadow: 0 18px 54px rgba(0, 0, 0, .72), inset 0 1px rgba(255, 255, 255, .035);
}
.mtg-sigil-row { display: none; gap: 8px; margin-top: 10px; }
body[data-realm="mtg"] .mtg-sigil-row { display: flex; }
.mtg-sigil-row img { width: 31px; height: 31px; filter: drop-shadow(0 0 8px rgba(134, 109, 160, .32)); }
body.realm-arrival main { animation: realm-enter .62s ease both; }
@keyframes realm-enter {
  0% { opacity: .15; transform: scale(.985); filter: blur(8px); }
  55% { opacity: .8; filter: blur(1px); }
  100% { opacity: 1; transform: scale(1); filter: none; }
}
@media (max-width: 900px) {
  header { flex-wrap: wrap; }
  .sync-chips { order: 3; width: 100%; margin-left: 0; }
  main { grid-template-columns: 1fr; padding: 16px; }
  .panel { position: static; }
  body { background-position: 58% top; }
  .inventory-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-form .wide, .inventory-form button { grid-column: 1 / -1; }
  .folder-manager { grid-template-columns: 1fr; }
  .folder-controls { grid-template-columns: 1fr 1fr; }
  .folder-controls input, .folder-controls select { grid-column: 1 / -1; }
  .analytics-lock { grid-template-columns: 1fr; }
  .portfolio-summary { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid { grid-template-columns: 1fr; }
  .portfolio-hero { padding-right: 0; }
  .retailer-grid { grid-template-columns: 1fr; }
  .pulse-layout { grid-template-columns: 1fr; }
  .pulse-method-grid { grid-template-columns: 1fr; }
  .plan-modal-controls { grid-template-columns: 1fr 1fr; }
  #plan-add-all { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  header { gap: 10px; padding: 11px 13px; }
  .brand { width: 100%; }
  .brand-sigil { width: 38px; height: 38px; }
  .brand-mascot { width: 44px; height: 44px; }
  .brand h1 { font-size: 19px; }
  .brand .sub { font-size: 10px; }
  .sync-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .chip { flex: 0 0 auto; }
  main { padding: 10px; gap: 12px; }
  .panel, .results { padding: 15px; border-radius: 2px 13px 2px 13px; }
  .results-intro h2 { font-size: 27px; }
  textarea { min-height: 185px; }
  .btn-row { flex-wrap: wrap; }
  .mtg-search-cue { grid-template-columns: 46px 1fr; }
  .mtg-search-cue strong { grid-column: 2; }
  th, td { padding: 8px; }
  .auth-perks { grid-template-columns: 1fr; }
  .inventory-form { grid-template-columns: 1fr; }
  .inventory-form .wide, .inventory-form button { grid-column: auto; }
  .folder-controls { grid-template-columns: 1fr; }
  .folder-controls input, .folder-controls select { grid-column: auto; }
  .tier-strip { display: grid; }
  .portfolio-summary { grid-template-columns: 1fr; }
  .source-row { grid-template-columns: 1fr auto; }
  .source-row > strong { grid-column: 1 / -1; text-align: left; }
  .pulse-hero { padding-right: 15px; }
  .pulse-hero::after { display: none; }
  .news-list a { grid-template-columns: 1fr; gap: 5px; }
  body:not(.has-account) #buylist { height: 64px; min-height: 64px; }
  body.has-account #buylist { min-height: 130px; }
  #plan-modal { align-items: flex-end; padding: 0; }
  #plan-modal .plan-modal-card { width: 100%; max-height: 92dvh; padding: 14px; border-radius: 18px 18px 0 0; }
  .plan-title h2 { font-size: 20px; }
  .plan-modal-controls { grid-template-columns: 1fr; gap: 8px; }
  #plan-add-all { grid-column: auto; width: 100%; }
  .plan-folder-label { min-width: 0; }
  .plan-new-folder > button { width: 100%; }
  .plan-folder-create { position: static; width: 100%; margin-top: 4px; }
  .plan-store { margin-bottom: 18px; }
  .plan-store-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plan-store-tools .mini { display: grid; place-items: center; min-height: 38px; padding: 5px; text-align: center; }
  .plan-store li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 7px 0; }
  .plan-store li .cmeta { grid-column: 1; }
  .plan-line-cost { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .art-viewer { padding: 10px; }
  .art-viewer img { max-width: 88vw; max-height: 78dvh; }
  .world-switcher { left: 10px; bottom: 10px; padding: 7px; }
  .world-switcher > span { display: none; }
  .world-switcher button { width: 42px; height: 42px; }
  .realm-notice { left: 10px; bottom: 76px; width: min(350px, calc(100vw - 40px)); padding-right: 34px; }
}

/* CardSuDon card-hawker-centre portal */
.cardsu-home-link { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; height: 38px; padding: 4px 9px 4px 4px; border: 1px solid rgba(124,226,212,.28); border-radius: 11px; background: rgba(5,25,29,.56); color: #fff8e8; text-decoration: none; }
.cardsu-home-link img { width: 30px; height: 30px; object-fit: contain; }
.cardsu-home-link span { font-size: 11px; font-weight: 800; }
.cardsu-home-link span b,.portal-mini-brand b span,.cardsudon-logo h1 span { color: #ff7358; }
body.portal-page { min-height: 100dvh; display: flex; flex-direction: column; overflow-x: hidden; background: radial-gradient(circle at 12% 15%, rgba(67,204,193,.16), transparent 30%), radial-gradient(circle at 86% 78%, rgba(255,181,77,.16), transparent 33%), linear-gradient(145deg,#041b22 0%,#0a3440 43%,#15213a 100%); }
body.portal-page::before { z-index: 0; opacity: .7; background-image: linear-gradient(rgba(255,255,255,.018) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.018) 1px,transparent 1px); background-size: 52px 52px; mask-image: linear-gradient(to bottom,#000,transparent 76%); }
.portal-header { position: relative; z-index: 2; justify-content: space-between; background: rgba(5,21,26,.68); border-bottom-color: rgba(124,226,212,.18); }
.portal-mini-brand { display: flex; align-items: center; gap: 9px; color: #fff8e8; text-decoration: none; font-size: 17px; letter-spacing: -.02em; }
.portal-mini-brand img { width: 42px; height: 42px; object-fit: contain; }
.portal-local-note { margin-left: auto; color: #afc9c7; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.portal-main { position: relative; z-index: 1; display: block; width: 100%; max-width: 1260px; padding: 54px 28px 42px; }
.portal-intro { max-width: 780px; margin: 0 auto 38px; text-align: center; }
.cardsudon-logo { display: flex; align-items: center; justify-content: center; gap: clamp(8px,2vw,22px); width: min(850px,94vw); margin: 0 auto; text-align: left; }
.cardsudon-logo > img { width: clamp(118px,19vw,206px); aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(0,0,0,.32)); }
.cardsudon-logo h1 { margin: 0; color: #fff4dc; font: 900 clamp(52px,9vw,104px)/.86 "Arial Black","Segoe UI",sans-serif; letter-spacing: -.075em; text-shadow: 0 6px 22px rgba(0,0,0,.28); }
.cardsudon-logo b { display: block; max-width: 590px; margin-top: 16px; color: #f6c467; font-size: clamp(8px,1.35vw,13px); letter-spacing: .17em; line-height: 1.45; }
.portal-intro > p { max-width: 620px; margin: 4px auto 0; color: #c7d9d6; font-size: 15px; }
.realm-gateway { padding: 28px; border: 1px solid rgba(194,221,214,.18); border-radius: 28px; background: rgba(5,20,28,.48); box-shadow: 0 34px 90px rgba(0,0,0,.34),inset 0 1px rgba(255,255,255,.035); backdrop-filter: blur(22px) saturate(120%); }
.gateway-heading { max-width: 680px; margin: 0 auto 23px; text-align: center; }
.gateway-heading h1 { margin: 8px 0 6px; color: #fff8e8; font: 800 clamp(25px,4vw,39px)/1.08 "Segoe UI",sans-serif; letter-spacing: -.035em; }
.gateway-heading p { margin: 0; color: #b8ccca; }
.realm-gateway-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.gateway-card { position: relative; min-height: 280px; display: grid; grid-template-columns: 150px minmax(0,1fr); align-items: center; gap: 20px; padding: 28px; overflow: hidden; border: 1px solid rgba(255,255,255,.16); border-radius: 22px; color: #fff; text-decoration: none; box-shadow: 0 18px 44px rgba(0,0,0,.25); transition: transform .24s ease,border-color .24s ease,box-shadow .24s ease; }
.gateway-card::before { content: ""; position: absolute; inset: 0; opacity: .55; transition: opacity .24s ease; }
.gateway-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,.38); box-shadow: 0 27px 60px rgba(0,0,0,.34); }
.gateway-card:hover::before { opacity: .8; }
.gateway-riftbound { background: linear-gradient(135deg,#153154,#3b3970 62%,#8a516f); }
.gateway-riftbound::before { background: radial-gradient(circle at 10% 5%,rgba(138,239,213,.38),transparent 43%); }
.gateway-mtg { background: linear-gradient(135deg,#17161e,#302332 58%,#68412b); }
.gateway-mtg::before { background: radial-gradient(circle at 8% 10%,rgba(220,179,111,.3),transparent 43%); }
.gateway-art,.gateway-copy { position: relative; z-index: 1; }
.gateway-art { display: grid; place-items: center; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; background: rgba(4,12,22,.32); box-shadow: inset 0 0 34px rgba(255,255,255,.06),0 14px 30px rgba(0,0,0,.28); }
.gateway-art img { width: 78%; height: 78%; object-fit: contain; filter: drop-shadow(0 9px 17px rgba(0,0,0,.42)); }
.gateway-copy > span { color: #ebd49a; font-size: 9px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.gateway-copy h2 { margin: 8px 0 7px; font-size: clamp(22px,3vw,32px); line-height: 1; }
.gateway-copy p { min-height: 64px; margin: 0 0 17px; color: rgba(255,255,255,.78); font-size: 12px; line-height: 1.55; }
.gateway-copy b { color: #fff0bd; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
.gateway-copy i { display: inline-block; margin-left: 5px; font-style: normal; transition: transform .2s; }
.gateway-card:hover .gateway-copy i { transform: translateX(5px); }
.gateway-memory { margin: 19px 0 0; color: #9fb7b5; font-size: 11px; text-align: center; }
.portal-footer { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 18px; margin-top: auto; padding: 20px 28px; border-top: 1px solid rgba(124,226,212,.12); color: #8fa7a5; font-size: 11px; }
.portal-footer a { color: #c3d7d3; }
.realm-preference-fieldset { margin: 2px 0 4px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.realm-preference-fieldset legend { padding: 0 6px; color: var(--text); font-size: 11px; font-weight: 700; }
.realm-preference-fieldset > p { margin: 7px 2px 0; color: var(--muted); font-size: 10px; }
.realm-preference-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.realm-preference-options label { position: relative; cursor: pointer; }
.realm-preference-options input { position: absolute; opacity: 0; pointer-events: none; }
.realm-preference-options span { display: grid; gap: 2px; min-height: 54px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(4,11,24,.48); transition: border-color .18s,background .18s,box-shadow .18s; }
.realm-preference-options small { color: var(--muted); font-size: 9px; }
.realm-preference-options input:checked + span { border-color: var(--toxic); background: rgba(124,226,212,.1); box-shadow: inset 3px 0 var(--toxic); }
.realm-preference-options input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.realm-preference-options.compact { margin: 9px 0; }
@media (max-width: 820px) { .portal-main { padding: 32px 15px 30px; } .realm-gateway { padding: 20px 14px; border-radius: 22px; } .realm-gateway-grid { grid-template-columns: 1fr; } .gateway-card { min-height: 230px; } }
@media (max-width: 520px) { .portal-header { padding: 10px 14px; } .portal-local-note { display: none; } .portal-intro { margin-bottom: 24px; } .cardsudon-logo { align-items: flex-end; gap: 0; width: 100%; } .cardsudon-logo > img { width: 88px; margin-left: -4px; } .cardsudon-logo h1 { font-size: clamp(38px,12.5vw,56px); letter-spacing: -.085em; white-space: nowrap; } .cardsudon-logo b { margin-top: 8px; font-size: 6.5px; letter-spacing: .08em; } .gateway-card { grid-template-columns: 88px minmax(0,1fr); gap: 14px; min-height: 206px; padding: 19px 16px; } .gateway-copy p { min-height: 0; } .portal-footer { display: grid; text-align: center; } }

/* CardSuDon light café theme */
:root {
  --bg: #f7f4ee;
  --panel: rgba(255, 255, 255, .93);
  --panel-2: rgba(242, 238, 230, .96);
  --panel-hot: #fff9ef;
  --line: rgba(105, 117, 114, .2);
  --line-hot: rgba(93, 155, 147, .58);
  --text: #354344;
  --muted: #71807f;
  --accent: #b87860;
  --accent-2: #659f9a;
  --toxic: #a9d7bf;
  --magenta: #d893a8;
  --good: #5f9977;
  --warn: #bd8746;
  --bad: #c76d72;
  --shadow: 0 18px 48px rgba(82, 76, 66, .13);
}
html { background: var(--bg); }
body,
body[data-realm="mtg"] {
  background:
    radial-gradient(circle at 12% 9%, rgba(171, 216, 201, .34), transparent 28%),
    radial-gradient(circle at 88% 30%, rgba(241, 197, 176, .28), transparent 29%),
    linear-gradient(145deg, #fbfaf6, #f5f1e9 58%, #f3eee7);
  color: var(--text);
}
body::before,
body[data-realm="mtg"]::before {
  opacity: .55;
  background-image: radial-gradient(rgba(100, 130, 125, .11) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, #000, transparent 74%);
}
body[data-realm="mtg"] {
  --bg: #f6f3ee;
  --panel: rgba(255, 255, 255, .94);
  --panel-2: rgba(239, 236, 232, .96);
  --panel-hot: #fbf7f0;
  --line: rgba(104, 99, 112, .2);
  --line-hot: rgba(128, 118, 168, .56);
  --text: #403f48;
  --muted: #77747d;
  --accent: #a66f62;
  --accent-2: #7b76a4;
  --toxic: #c9d9bd;
  --magenta: #cb93a5;
  --good: #6e9b7b;
  --warn: #b78b4f;
  --bad: #c56c73;
  --shadow: 0 18px 50px rgba(75, 68, 62, .14);
}
header,
body[data-realm="mtg"] header {
  background: rgba(255, 253, 248, .88);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 28px rgba(83, 77, 69, .08);
}
.brand-mascot,
body[data-realm="mtg"] .brand-mascot { filter: drop-shadow(0 6px 10px rgba(84, 77, 67, .15)); }
.panel,
.results,
.panel-static,
.modal-card,
body[data-realm="mtg"] .panel,
body[data-realm="mtg"] .results,
body[data-realm="mtg"] .panel-static,
body[data-realm="mtg"] .modal-card {
  background: var(--panel);
  border-color: var(--line);
  border-top-color: color-mix(in srgb, var(--accent) 58%, white);
  box-shadow: var(--shadow);
}
.panel,.results,.panel-static,.modal-card { backdrop-filter: blur(18px) saturate(108%); }
textarea, input, select {
  background: rgba(255,255,255,.92);
  color: var(--text);
}
textarea::placeholder, input::placeholder { color: #98a3a1; }
textarea:focus, input:focus, select:focus {
  background: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 14%, transparent), inset 3px 0 var(--accent-2);
}
code { background: rgba(101,159,154,.11); color: #477b77; }
.ac div:hover,.ac div.sel { background: rgba(101,159,154,.17); color: var(--text); }
.ac div:hover .k,.ac div.sel .k { color: var(--muted); }
button.primary,
.btn-link.primary,
body[data-realm="mtg"] button.primary {
  background: linear-gradient(105deg, #b7dec8, #b9d9e7 52%, #e3c7d2);
  color: #354344;
  box-shadow: 0 8px 22px rgba(98, 145, 137, .16);
}
button.ghost:hover { background: rgba(101,159,154,.09); }
.results,.tier-strip { background: rgba(255,255,255,.88); }
.tier-strip,.plan-modal-controls,.sample-report { background: rgba(241,238,230,.7); }
th { background: #eee9df; color: #866653; }
tbody tr:hover { background: rgba(169,215,191,.14); }
.table-wrap { scrollbar-color: var(--accent-2) rgba(110,100,85,.12); }
.unmatched { background: #fff2ef; color: #a9565b; }
.analytics-lock,
.analytics-lock.analytics-open {
  background: linear-gradient(110deg, rgba(250,235,230,.96), rgba(229,243,238,.96));
  box-shadow: inset 3px 0 var(--magenta), var(--shadow);
}
.portfolio-stat { background: linear-gradient(145deg, #fff, #f0ece5); }
.allocation-track { background: #e5e0d8; }
.source-row,.news-list a,.pulse-method-grid div { background: rgba(255,255,255,.72); }
.news-list a:hover { background: #f3eee7; }
.pulse-card-soft { background: linear-gradient(145deg, #eee8f4, #e3f1ed); }
.modal { background: rgba(89, 84, 76, .32); }
.art-viewer { background: rgba(255,253,248,.98); box-shadow: 0 24px 70px rgba(74,67,59,.3); }
.art-close { background: rgba(255,255,255,.92); }
.site-footer { color: #7a8583; }
.world-switcher,
body[data-realm="mtg"] .world-switcher {
  background: rgba(255, 253, 248, .94);
  box-shadow: 0 13px 34px rgba(82,75,67,.17);
}
.world-switcher button { background: rgba(244,240,232,.85); }
.realm-notice { background: rgba(255,250,244,.98); }
.mtg-search-cue {
  background: linear-gradient(110deg, #f4edf2, #e8f2ef);
  box-shadow: inset 0 0 25px rgba(118,184,180,.08), 0 10px 25px rgba(80,72,64,.1);
}
.mtg-search-cue b { color: #745e55; }
.mtg-search-cue strong { color: #5c918b; }
.archive-breath i { border-color: rgba(101,159,154,.65); }

body.portal-page {
  background:
    radial-gradient(circle at 10% 12%, rgba(167,217,199,.46), transparent 28%),
    radial-gradient(circle at 90% 23%, rgba(244,195,171,.4), transparent 29%),
    linear-gradient(145deg,#fffdf8 0%,#f7f3eb 56%,#f2eee8 100%);
}
body.portal-page::before { opacity: .48; }
.portal-header { background: rgba(255,253,248,.86); border-bottom-color: var(--line); }
.portal-mini-brand,.cardsu-home-link { color: #354344; }
.cardsu-home-link { background: rgba(255,253,248,.9); border-color: var(--line); }
.portal-local-note { color: #788583; }
.cardsudon-logo h1 { color: #354344; text-shadow: 0 5px 18px rgba(92,82,70,.1); }
.portal-intro > p,.gateway-heading p,.gateway-memory { color: #71807f; }
.realm-gateway { background: rgba(255,255,255,.62); border-color: rgba(108,121,117,.16); box-shadow: 0 25px 65px rgba(95,85,72,.11); }
.gateway-heading h1 { color: #354344; }
.gateway-card { color: #3f4849; border-color: rgba(104,117,113,.18); box-shadow: 0 14px 34px rgba(86,76,65,.11); }
.gateway-card:hover { border-color: rgba(101,159,154,.55); box-shadow: 0 21px 43px rgba(86,76,65,.15); }
.gateway-riftbound { background: linear-gradient(135deg,#e6f3ef,#edf1fa 55%,#f8e8ed); }
.gateway-riftbound::before { background: radial-gradient(circle at 10% 5%,rgba(255,255,255,.8),transparent 44%); }
.gateway-mtg { background: linear-gradient(135deg,#f5eee5,#efe9f4 58%,#f4e3dc); }
.gateway-mtg::before { background: radial-gradient(circle at 8% 10%,rgba(255,255,255,.82),transparent 44%); }
.gateway-art { background: rgba(255,255,255,.65); border-color: rgba(102,114,110,.16); box-shadow: inset 0 0 28px rgba(255,255,255,.5),0 10px 24px rgba(90,80,68,.1); }
.gateway-copy > span,.gateway-copy b { color: #9c6f55; }
.gateway-copy p { color: #697675; }
.portal-footer { border-top-color: var(--line); color: #7d8886; }
.portal-footer a { color: #587d79; }
.realm-preference-options span { background: rgba(248,245,239,.92); }
.realm-preference-options input:checked + span { background: rgba(169,215,191,.17); }

/* Strong stall identities: neutral portal, clearly different game spaces. */
body[data-realm="riftbound"] {
  --bg: #edf8f5;
  --panel: rgba(255,255,255,.94);
  --panel-2: #e3f2ee;
  --panel-hot: #fff5f1;
  --line: rgba(55,126,119,.22);
  --line-hot: rgba(45,145,135,.62);
  --accent: #d16f59;
  --accent-2: #268f8a;
  --toxic: #85d4ba;
  --magenta: #e59bad;
  --good: #4c9872;
  background:
    radial-gradient(circle at 8% 12%, rgba(102,205,188,.38), transparent 31%),
    radial-gradient(circle at 92% 22%, rgba(255,149,126,.28), transparent 30%),
    linear-gradient(140deg,#eefaf7 0%,#f8fbf6 54%,#fff0eb 100%);
}
body[data-realm="mtg"] {
  --bg: #f5effa;
  --panel: rgba(255,253,255,.95);
  --panel-2: #eee7f5;
  --panel-hot: #fff7e8;
  --line: rgba(105,76,145,.22);
  --line-hot: rgba(122,84,165,.6);
  --accent: #b47a2e;
  --accent-2: #7552a0;
  --toxic: #dfbd72;
  --magenta: #b77ca6;
  --good: #718e68;
  background:
    radial-gradient(circle at 10% 14%, rgba(154,119,198,.32), transparent 31%),
    radial-gradient(circle at 90% 20%, rgba(240,188,82,.3), transparent 29%),
    linear-gradient(140deg,#f3edfa 0%,#fbf8f1 56%,#fff3d8 100%);
}
body[data-realm="riftbound"]::before {
  background-image: radial-gradient(rgba(38,143,138,.15) 1px, transparent 1px);
}
body[data-realm="mtg"]::before {
  background-image: radial-gradient(rgba(117,82,160,.15) 1px, transparent 1px);
}
body[data-realm="riftbound"] header {
  background: rgba(235,249,245,.94);
  border-bottom: 4px solid #72c9b5;
}
body[data-realm="mtg"] header {
  background: rgba(246,239,251,.95);
  border-bottom: 4px solid #9b78bd;
}
body[data-realm="riftbound"] .panel,
body[data-realm="riftbound"] .results,
body[data-realm="riftbound"] .panel-static {
  border-top: 4px solid #63bfae;
}
body[data-realm="mtg"] .panel,
body[data-realm="mtg"] .results,
body[data-realm="mtg"] .panel-static {
  border-top: 4px solid #9671b7;
}
body[data-realm="riftbound"] .results { background: rgba(250,255,253,.94); }
body[data-realm="mtg"] .results { background: rgba(255,252,246,.95); }
body[data-realm="riftbound"] button.primary,
body[data-realm="riftbound"] .btn-link.primary {
  background: linear-gradient(105deg,#7bd3b8,#91d8e4 54%,#f2a799);
  color: #234944;
}
body[data-realm="mtg"] button.primary,
body[data-realm="mtg"] .btn-link.primary {
  background: linear-gradient(105deg,#9d79c1,#d6a6c8 52%,#efc56d);
  color: #352741;
}
body[data-realm="riftbound"] th { background: #dcefeb; color: #317871; }
body[data-realm="mtg"] th { background: #e9dff2; color: #6c4a8b; }
body[data-realm="riftbound"] .tier-strip { background: #eaf6f2; }
body[data-realm="mtg"] .tier-strip { background: #f1e9f5; }
body[data-realm="riftbound"] .results-intro::after { background: linear-gradient(90deg,#e47b67,transparent); }
body[data-realm="mtg"] .results-intro::after { background: linear-gradient(90deg,#8d67af,#e2b34f,transparent); }
body[data-realm="riftbound"] .world-switcher { border-color: rgba(38,143,138,.35); }
body[data-realm="mtg"] .world-switcher { border-color: rgba(117,82,160,.38); }
body[data-realm="riftbound"] .world-switcher button.active { background: #dff3ed; }
body[data-realm="mtg"] .world-switcher button.active { background: #eadff3; }

/* Subscription plans */
.pricing-main { max-width: 980px; padding-top: 56px; }
.pricing-intro { max-width: 690px; margin-bottom: 26px; }
.pricing-intro h2 { margin: 7px 0; font-size: clamp(30px,5vw,52px); }
.pricing-intro p,.pricing-fineprint { color: var(--muted); }
.pricing-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.pricing-card { display: flex; flex-direction: column; gap: 10px; padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); box-shadow: var(--shadow); }
.pricing-card-featured { border: 2px solid var(--accent-2); background: linear-gradient(145deg,#fff,#eef8f4); }
.pricing-card h3 { margin: 5px 0 0; font-size: 34px; }
.pricing-card > p { margin: 0; color: var(--muted); }
.pricing-card ul { display: grid; gap: 8px; min-height: 148px; margin: 10px 0; padding-left: 19px; }
.pricing-card form,.pricing-card button { width: 100%; }
.pricing-card small { color: var(--muted); line-height: 1.45; }
.plan-current,.billing-notice { padding: 12px 14px; border-radius: 11px; background: rgba(101,159,154,.13); color: #477b77; font-weight: 700; }
.billing-notice { margin-bottom: 18px; }
.pricing-fineprint { margin: 22px auto; max-width: 720px; text-align: center; font-size: 11px; }
@media (max-width: 700px) { .pricing-grid { grid-template-columns: 1fr; } .pricing-main { padding-top: 28px; } }
body[data-realm="riftbound"] .brand h1 span { color: #d16f59; }
body[data-realm="mtg"] .brand h1 span { color: #7552a0; }

/* Email verification and password recovery */
.auth-help-link { align-self: center; color: var(--accent-2); font-weight: 700; font-size: 13px; }
.auth-help-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px; }
.link-button { padding: 0; border: 0; background: transparent; text-decoration: underline; cursor: pointer; }
.auth-success { padding: 12px 14px; border-radius: 12px; background: rgba(75,145,105,.14); color: #3e7454; line-height: 1.45; }
.account-action-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(145deg,#f8f4eb,#eef7f4); }
.account-action-card { width: min(100%,480px); padding: 34px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); }
.account-action-brand { display: inline-block; margin-bottom: 24px; color: var(--ink); font-size: 24px; font-weight: 900; text-decoration: none; }
.account-action-card h1 { margin: 8px 0 12px; font-size: clamp(30px,7vw,44px); }
.account-action-card > p { color: var(--muted); line-height: 1.6; }
.account-action-card .auth-form { margin: 22px 0 0; }
.account-action-message.success { color: #3e7454; }
.account-action-message.error { color: #a24d55; }

/* Search-first layout, three columns on desktop: a compact search
   sidebar on the left, results as the primary center column (with the
   watchlist as a horizontal strip above it), and a narrow community/
   trending rail on the right — the same left-rail/main-content shape
   the rest of the site (collection, portfolio) already uses, rather
   than the search page's own one-off hero treatment. Mobile still
   stacks search-in-the-middle via the max-width: 900px rule below. */
body.search-page { background-attachment: fixed; }
.magazine-search-layout {
  width: 100%;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr) minmax(260px, 300px);
  grid-template-areas:
    "search   watchlist community"
    "search   plan      community"
    "search   results   community";
  align-content: start;
  gap: 16px 24px;
  max-width: none;
  padding: 28px clamp(18px, 2.4vw, 46px) 90px;
}
.search-page .panel {
  grid-area: search;
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  padding: 20px;
  border-radius: 20px 3px 20px 3px;
}
.search-page .panel h2 {
  max-width: 100%;
  margin: 6px 0 8px;
  font-size: clamp(21px, 1.7vw, 26px);
  line-height: 1.05;
  letter-spacing: -.02em;
}
.search-page .panel > .hint { max-width: 100%; font-size: 12px; line-height: 1.5; }
.search-page .panel textarea {
  min-height: 68px;
  border-radius: 13px;
  padding: 13px 15px;
  font-size: 13px;
  line-height: 1.55;
}
.search-page .panel .btn-row { align-items: stretch; }
.search-page .panel .btn-row > button { min-height: 42px; border-radius: 11px; font-size: 12.5px; }
.search-page .panel > .tier-strip {
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.search-page .results {
  grid-area: results;
  border-radius: 3px 24px 3px 24px;
  padding: clamp(20px, 2.4vw, 30px);
}
.search-page .results-intro { display: grid; grid-template-columns: minmax(0,1fr); }
.search-page .results-intro h2 { max-width: 820px; letter-spacing: -.02em; }
.results-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  padding: 56px 24px;
  border: 1px dashed var(--line);
  border-radius: 22px;
  text-align: center;
  color: var(--muted);
}
.results-empty-mark {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, var(--accent-2), transparent 68%),
    radial-gradient(circle at 68% 72%, var(--accent), transparent 68%);
  box-shadow: 0 0 44px color-mix(in srgb, var(--accent-2) 42%, transparent);
}
.results-empty p { max-width: 380px; margin: 0; font-size: 13px; line-height: 1.65; }

/* Community/trending rail — narrow right column now, not the wide hero
   treatment this had when it shared the old left column. */
.featured-cards {
  grid-area: community;
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  align-self: start;
  min-width: 0;
}
.featured-cards-heading { margin: 0 0 14px; max-width: 100%; }
.featured-cards-heading h2 {
  margin: 4px 0 5px;
  color: var(--text);
  font-size: clamp(19px, 1.8vw, 24px);
  line-height: 1.05;
  letter-spacing: -.02em;
}
.featured-cards-heading p,
.featured-cards-note { color: var(--muted); font-size: 11px; line-height: 1.5; }
.featured-cards-heading p { margin: 6px 0 0; max-width: 100%; }
.featured-cards-note { margin: 12px 3px 0; font-size: 10px; }

/* Watchlist — a horizontal strip above the results, not a stacked list
   in the sidebar, with prev/next buttons for scrolling past a handful
   of cards. */
.featured-watchlist {
  grid-area: watchlist;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel) 84%, transparent);
  box-shadow: 0 12px 30px rgba(69, 62, 55, .08);
}
.featured-watchlist-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 11px;
}
.featured-watchlist-heading h2 { margin: 4px 0 0; font-size: clamp(18px, 1.6vw, 22px); line-height: 1; }
.featured-watchlist-heading p {
  max-width: 290px;
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
  text-align: right;
}
.watchlist-scroller { position: relative; display: flex; align-items: stretch; gap: 6px; }
.watchlist-grid {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  padding: 2px 1px;
}
.watchlist-nav {
  flex: 0 0 auto;
  width: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.watchlist-nav:hover { border-color: var(--accent-2); color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 12%, var(--panel-2)); }
.watchlist-nav:disabled { opacity: .35; cursor: default; background: var(--panel-2); color: var(--text); }
.watchlist-card {
  position: relative;
  flex: 0 0 292px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 22px;
  gap: 9px;
  align-items: center;
  min-height: 104px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  scroll-snap-align: start;
}
.watchlist-image { padding: 0; border: 0; background: transparent; }
.watchlist-image img {
  display: block;
  width: 50px;
  height: 66px;
  object-fit: cover;
  border-radius: 5px;
  cursor: zoom-in;
}
.watchlist-card-copy { display: grid; gap: 3px; min-width: 0; }
.watchlist-card-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watchlist-card-copy span,.watchlist-card-copy small { color: var(--muted); font-size: 10.5px; }
.watchlist-card-copy b { color: var(--text); }
.watchlist-card-copy .hit { color: var(--good); }
.watchlist-shop-link { color: var(--accent-2); font-size: 10.5px; text-decoration: none; }
.watchlist-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.watchlist-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 27px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: color-mix(in srgb, var(--panel-hot) 72%, transparent);
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}
.watchlist-action:hover { border-color: var(--accent-2); color: var(--accent-2); }
.watchlist-action:disabled,.watchlist-action.disabled {
  opacity: .48;
  cursor: default;
  pointer-events: none;
}
.watchlist-add-search {
  color: #07101c;
  border-color: color-mix(in srgb, var(--accent) 70%, white);
  background: linear-gradient(120deg, var(--accent-2), var(--accent));
}
.watchlist-add-search:hover { color: #07101c; filter: brightness(1.08); }
.watchlist-empty,.inline-status { min-height: 16px; color: var(--muted); font-size: 11px; }
.inline-status { margin: 6px 0 0; }
.saved-searches-details {
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.saved-searches-details summary {
  width: max-content;
  max-width: 100%;
  color: var(--accent-2);
  font-weight: 750;
  cursor: pointer;
}
.saved-searches {
  margin: 10px 0 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel-2) 65%, transparent);
}
.saved-searches-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}
.saved-searches-heading h3 { margin: 3px 0 0; font-size: 16px; }
.saved-searches-heading p,.saved-list-empty {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
}
.saved-list-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0 !important;
  padding: 0 !important;
}
.saved-list-chips li {
  gap: 3px;
  padding: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px;
  background: var(--panel);
}
.saved-list-chips li a { padding: 7px 4px 7px 11px; font-weight: 750; }
.saved-list-chips li .x { padding: 7px 9px 7px 3px; }
.save-search-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; margin-top: 10px; }
.save-search-row input,.save-search-row button { min-height: 40px; }
.save-search-row button { white-space: nowrap; }

/* A card-first price comparison avoids a seventeen-column horizontal table. */
.comparison-list { display: grid; gap: 14px; }
.comparison-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
}
.comparison-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-2) 70%, transparent);
}
.comparison-card-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.comparison-card-identity img {
  width: 46px;
  height: 64px;
  object-fit: cover;
  border-radius: 5px;
  cursor: zoom-in;
}
.watch-add-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--accent-2);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent-2) 9%, transparent);
  color: var(--accent-2);
  font-weight: 800;
  cursor: pointer;
}
.watch-add-button:hover { background: color-mix(in srgb, var(--accent-2) 18%, transparent); }
/* Spreadsheet-style shop comparison: one row per shop, gridlines instead
   of a grid of individually-bordered "bubble" cards. */
.offer-table-wrap { overflow-x: auto; padding: 4px 12px 12px; }
.offer-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.offer-row { cursor: pointer; border-bottom: 1px solid var(--line); transition: background .12s; }
.offer-row:last-child { border-bottom: 0; }
.offer-row:nth-child(even) { background: color-mix(in srgb, var(--panel-2) 40%, transparent); }
.offer-row:hover { background: color-mix(in srgb, var(--accent-2) 12%, transparent); }
.offer-row.best { background: color-mix(in srgb, var(--good) 13%, transparent); }
.offer-row.best:hover { background: color-mix(in srgb, var(--good) 20%, transparent); }
.offer-row.out-of-stock { opacity: .5; }
.offer-shop, .offer-status, .offer-price { padding: 8px 10px; vertical-align: middle; }
.offer-shop { font-weight: 700; }
.offer-shop a { color: inherit; text-decoration: none; }
.offer-row:hover .offer-shop a { text-decoration: underline; }
.offer-lang-note { margin-left: 5px; font-size: 11px; cursor: help; opacity: .85; }
.offer-status { color: var(--muted); font-size: 11px; white-space: nowrap; }
.offer-price { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.offer-row.best .offer-price { color: var(--good); }
.no-shop-offers { display: block; padding: 10px; color: var(--muted); font-size: 12px; }
.offer-more-row { border-bottom: 0; }
.shop-offer-more {
  width: 100%;
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 11.5px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.shop-offer-more:hover { border-color: var(--accent-2); color: var(--accent-2); }
.featured-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 205px;
  gap: 10px;
}
.featured-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 72%, white);
  border-radius: 3px;
  background: var(--panel-2);
  box-shadow: 0 12px 30px rgba(69, 62, 55, .12);
}
.featured-card-1 { grid-row: span 2; }
.featured-card-4 { grid-column: 1 / -1; }
.featured-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  cursor: zoom-in;
  transition: transform .35s ease, filter .35s ease;
}
.featured-card:hover img { transform: scale(1.025); filter: saturate(1.06); }
.featured-card.image-missing::before {
  content: "Card image unavailable";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
}
.featured-card-caption {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 2px;
  padding: 38px 13px 12px;
  color: #fff;
  background: linear-gradient(transparent, rgba(12, 14, 16, .91));
  text-shadow: 0 1px 5px rgba(0,0,0,.55);
}
.featured-card-caption span {
  color: #f2d18b;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.featured-card-caption b { font-size: 15px; line-height: 1.15; }
.featured-card-caption small { color: rgba(255,255,255,.72); font-size: 9px; }

/* Filter chips — one per searched card. Pick a card, the results list
   shows only that card's shop breakdown instead of every card at once. */
.result-picker { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.result-picker.hidden { display: none; }
.result-chip {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.result-chip:hover { border-color: var(--accent-2); color: var(--accent-2); }
.result-chip.active {
  border-color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 18%, var(--panel-2));
  color: var(--text);
}

.search-page .plan-box {
  grid-area: plan;
  margin: 0;
  padding: 22px clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: 20px 3px 20px 3px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.search-page .plan-box h3 {
  margin: 6px 0 5px;
  color: var(--text);
  font-size: clamp(20px, 2vw, 27px);
  letter-spacing: -.015em;
  text-transform: none;
}
.plan-box-intro { margin: 0 0 14px; color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.plan-currency-note { margin: 0; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.search-page #planPanel { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.search-page .plan-row {
  min-height: 100px;
  margin: 0;
  padding: 15px 16px;
  border-left-width: 3px;
  border-radius: 14px 3px 14px 3px;
  background: rgba(255,255,255,.76);
  transition: transform .15s, box-shadow .15s;
}
.search-page .plan-row:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.1); }
.search-page .plan-row:nth-child(2) { border-color: color-mix(in srgb, var(--accent-2) 45%, var(--line)); }
.search-page .plan-row { overflow: hidden; }
/* Label-over-price, not side-by-side — labels like "MOST CONVENIENT" have
   no good breakpoint next to an 18px price; stacking sidesteps the squeeze
   instead of fighting it with ever-smaller text or mid-word wraps. */
.search-page .plan-head { display: flex; flex-direction: column; gap: 4px; }
.search-page .plan-name {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.search-page .plan-total { font-size: 20px; }
.search-page .plan-sub { margin-top: 12px; line-height: 1.4; }
.search-page .plan-sechead { grid-column: 1 / -1; margin: 9px 0 0; }
.search-page .plan-caveat { margin-top: 12px; }

@media (min-width: 981px) {
  /* The trending grid was tuned for the old ~28vw-wide shared column;
     the community rail is a fixed, narrower column now, so one card per
     row reads better than a cramped 2-up masonry. */
  .magazine-search-layout .featured-card-grid { grid-template-columns: 1fr; grid-auto-rows: 165px; }
  .magazine-search-layout .featured-card-1,
  .magazine-search-layout .featured-card-4 { grid-row: auto; grid-column: auto; }
}
@media (max-width: 980px) {
  .magazine-search-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "search" "watchlist" "plan" "results" "community";
    padding-top: 18px;
  }
  /* Sticky-with-its-own-scrollbar is a desktop sidebar pattern — on a
     touch screen it means a second, easy-to-miss scroll container
     trapped above the results the person actually came for. Let the
     panel flow with the page like everything else below 980px. */
  .search-page .panel {
    position: static;
    top: auto;
    max-height: none;
    overflow-y: visible;
  }
  /* A 30px-tall select is fine for a mouse pointer, too small for a
     thumb — bump to a real touch target on anything narrower than a
     small laptop. */
  .region-toggle select { padding: 12px 10px; font-size: 13px; min-height: 44px; }
  .featured-cards { position: static; max-height: none; }
  .featured-card-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 2px 1px 10px;
  }
  .featured-card {
    flex: 0 0 min(42vw, 190px);
    height: 260px;
    scroll-snap-align: start;
  }
  .featured-card-1,.featured-card-4 { grid-row: auto; grid-column: auto; }
  .featured-cards-note { margin-top: 4px; }
}

@media (max-width: 560px) {
  .magazine-search-layout { padding: 12px 10px 92px; gap: 18px; }
  .search-page .panel,.search-page .results { padding: 20px 16px; }
  .search-page .panel > .tier-strip { display: grid; gap: 8px; }
  .featured-card { flex-basis: 154px; height: 220px; }
  .featured-watchlist-heading { display: block; }
  .featured-watchlist-heading p { margin-top: 5px; text-align: left; }
  .saved-searches-heading { display: block; }
  .saved-searches-heading p { margin-top: 5px; }
  .save-search-row { grid-template-columns: 1fr; }
  .comparison-card-head { align-items: stretch; flex-direction: column; }
  .watch-add-button { width: 100%; }
  .offer-table-wrap { padding: 4px 9px 9px; }
  .featured-card-caption { padding: 34px 10px 10px; }
  .search-page #planPanel { grid-template-columns: 1fr; }
  .search-page .plan-sechead { grid-column: auto; }
}

/* Search masthead: centre the CardSuDon identity and keep tools secondary. */
.search-header {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 13px;
  min-height: 142px;
  padding: 17px 24px 14px;
}
.search-header-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.search-header .cardsu-home-link {
  height: auto;
  padding: 4px 20px 4px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: 12px;
}
.search-header .cardsu-home-link img { width: 54px; height: 54px; }
.search-header .cardsu-home-link span {
  font-size: 27px;
  line-height: 1;
  letter-spacing: -.045em;
}
.search-header .brand {
  min-width: 0;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}
.search-header .brand-mascot { width: 58px; height: 58px; }
.search-header .brand h1 { font-size: 28px; }
.search-header .brand .sub { font-size: 10px; }
.search-header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
}
.search-header-nav .ghost,
.search-header-nav .account-btn { min-height: 36px; padding: 7px 13px; }
.search-header .sync-chips { display: none !important; }
.search-page .featured-cards { top: 166px; }

/* Keep primary navigation in the same top-right position across app pages. */
.page-header-nav { margin-left: auto; display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
@media (min-width: 701px) {
  .search-header { position: sticky; }
  .search-header-nav { position: absolute; top: 17px; right: 24px; justify-content: flex-end; max-width: 48vw; }
}

/* Search feedback stays visible even when results are below the fold. */
.mtg-search-cue:not(.hidden),
body[data-realm="mtg"] .mtg-search-cue:not(.hidden) {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  display: grid;
  width: min(680px, calc(100vw - 28px));
  margin: 0;
  transform: translateX(-50%);
  box-shadow: 0 18px 60px rgba(47, 77, 73, .3), 0 0 0 1px rgba(255,255,255,.35);
}
.search-energy-track { height: 8px; margin-top: 9px; overflow: hidden; border-radius: 99px; background: rgba(88,103,101,.16); }
.search-energy-track i { display: block; width: 42%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #80d8cd, #f5c9b8, #f0b961); box-shadow: 0 0 16px #80d8cd; animation: search-charge 1.45s ease-in-out infinite alternate; }
@keyframes search-charge { from { width: 12%; filter: brightness(.9); } to { width: 100%; filter: brightness(1.15); } }
.community-trends-empty { grid-column: 1 / -1; padding: 22px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); }
.simple-header .cardsu-home-link { height: auto; border: 0; background: transparent; }
.simple-header .cardsu-home-link img { width: 46px; height: 46px; }
.simple-header .cardsu-home-link span { font-size: 22px; }

/* The Excel file is a printable buying plan, not just a raw data export. */
.xlsx-explainer {
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.xlsx-explainer summary {
  width: max-content;
  max-width: 100%;
  color: var(--accent-2);
  font-weight: 750;
  cursor: pointer;
}
.xlsx-explainer p {
  max-width: 650px;
  margin: 7px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--accent-2);
  border-radius: 0 10px 10px 0;
  background: color-mix(in srgb, var(--accent-2) 8%, transparent);
}

/* Current shop price plus a clearly labelled seven-day market-reference move. */
.featured-card img { height: calc(100% - 40px); }
.featured-card-caption { bottom: 40px; }
.featured-card.image-missing::before { inset: 0 0 40px; }
.featured-card-market {
  position: absolute;
  inset: auto 0 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-top: 1px solid color-mix(in srgb, var(--line) 75%, white);
  background: rgba(255, 253, 248, .97);
  color: var(--text);
  text-shadow: none;
}
.featured-price-value { font-size: 10px; white-space: nowrap; }
.featured-price-trend {
  overflow: hidden;
  font-size: 9px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.featured-price-trend.trend-up { color: #278265; }
.featured-price-trend.trend-down { color: #c95861; }
.featured-price-trend.trend-flat { color: var(--muted); }

@media (max-width: 700px) {
  .search-header {
    position: relative;
    min-height: 0;
    padding: 13px 12px 11px;
    gap: 10px;
  }
  .search-header-identity { gap: 12px; }
  .search-header .cardsu-home-link { padding-right: 12px; gap: 7px; }
  .search-header .cardsu-home-link img { width: 39px; height: 39px; }
  .search-header .cardsu-home-link span { font-size: 19px; }
  .search-header .brand { padding-left: 12px; gap: 7px; }
  .search-header .brand-mascot { width: 39px; height: 39px; }
  .search-header .brand h1 { font-size: 17px; letter-spacing: .08em; }
  .search-header .brand .eyebrow { font-size: 7px; }
  .search-header .brand .sub { display: none; }
  .search-header-nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 1px 3px;
    scrollbar-width: none;
  }
  .search-header-nav::-webkit-scrollbar { display: none; }
  .search-header-nav > * { flex: 0 0 auto; }
  .page-header-nav { width: 100%; margin-left: 0; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; }
  .analytics-choice { grid-template-columns: 1fr; }
  .analytics-choice > p { grid-column: auto; }
  .mtg-search-cue:not(.hidden), body[data-realm="mtg"] .mtg-search-cue:not(.hidden) { grid-template-columns: 42px 1fr auto; padding: 12px; }
  .search-page .featured-cards { top: auto; }
  .featured-card-market { display: grid; gap: 1px; min-height: 44px; padding: 5px 8px; }
  .featured-card img { height: calc(100% - 44px); }
  .featured-card-caption { bottom: 44px; }
  .featured-card.image-missing::before { inset: 0 0 44px; }
}

/* August 2026 — cosmic dashboard palette. */
:root {
  --bg: #080a14;
  --panel: rgba(20, 29, 67, .96);
  --panel-2: rgba(28, 48, 92, .96);
  --panel-hot: rgba(35, 64, 116, .98);
  --line: rgba(92, 151, 215, .30);
  --line-hot: rgba(71, 173, 239, .72);
  --text: #f7f8ff;
  --muted: #aeb8d1;
  --accent: #ff6f2c;
  --accent-2: #45b8ee;
  --toxic: #45b8ee;
  --magenta: #c45bb5;
  --good: #63d8c4;
  --warn: #ffad54;
  --bad: #ff6e81;
  --shadow: 0 24px 70px rgba(2, 4, 14, .58);
}
body[data-realm="riftbound"], body[data-realm="mtg"] {
  --accent: #ff6f2c;
  --accent-2: #45b8ee;
  --panel: rgba(20, 29, 67, .96);
  --panel-2: rgba(28, 48, 92, .96);
}
body,
body[data-realm="riftbound"],
body[data-realm="mtg"] {
  color: var(--text);
  background:
    radial-gradient(ellipse at 22% 8%, rgba(11, 111, 177, .42), transparent 32%),
    radial-gradient(ellipse at 79% 18%, rgba(126, 28, 102, .32), transparent 34%),
    radial-gradient(ellipse at 65% 82%, rgba(65, 31, 107, .40), transparent 40%),
    linear-gradient(150deg, #080a14 0%, #111433 42%, #251438 72%, #0b0c1a 100%) fixed;
}
header, .search-header, .portal-header, .simple-header {
  background: rgba(3, 5, 12, .94);
  border-color: var(--line);
}
.panel-static, .search-panel, .results, .tier-strip, .saved,
.plan-box, .portfolio-stat, .pricing-card, .analytics-lock,
.modal-card, .account-action-card, .realm-gateway, .gateway-art,
.source-row, .news-list a, .pulse-method-grid div {
  color: var(--text);
  background: linear-gradient(145deg, rgba(21, 34, 77, .97), rgba(27, 26, 67, .97));
  border-color: var(--line);
  box-shadow: var(--shadow);
}
input, textarea, select {
  color: var(--text);
  background: rgba(5, 8, 22, .82);
  border-color: var(--line);
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 76%, transparent); }
.ghost, .account-btn, .btn-link.ghost, .cardsu-home-link {
  color: var(--text);
  background: color-mix(in srgb, var(--panel-2) 82%, transparent);
  border-color: var(--line);
}
.primary { color: #fff; background: linear-gradient(135deg, #ff812f, #f05224); border-color: rgba(255, 174, 106, .45); box-shadow: 0 8px 24px rgba(240, 82, 36, .22); }
.primary:hover { filter: brightness(1.08); }
.results-intro h2, h1, h2, h3, .brand h1 { color: var(--text); }
.hint, .sub, .cmeta, .method-note, .price-disclaimer { color: var(--muted); }

.dashboard-wide { width: 100%; max-width: none !important; padding: 26px clamp(16px, 2.2vw, 42px) 52px; display: block; }
.card-workspace { display: grid; grid-template-columns: minmax(300px, 26vw) minmax(0, 1fr); gap: clamp(18px, 2vw, 34px); align-items: start; }
.workspace-main { min-width: 0; }
.card-explorer { position: sticky; top: 96px; min-height: 510px; padding: 20px; border-radius: 22px; overflow: hidden; }
.card-explorer-empty { min-height: 460px; display: grid; align-content: center; text-align: center; }
.card-explorer-empty h2 { margin: 9px 0 4px; font-size: 28px; }
.card-explorer-empty p { color: var(--muted); }
.card-explorer-identity { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: start; }
.card-explorer-identity img { width: 112px; aspect-ratio: 5/7; border-radius: 10px; object-fit: cover; background: #080d13; box-shadow: 0 14px 30px rgba(0,0,0,.38); }
.card-explorer-identity h2 { margin: 7px 0 5px; font-size: clamp(20px, 2vw, 30px); line-height: 1.05; }
.card-explorer-identity p { margin: 0; color: var(--muted); }
.card-market-callout { margin: 18px 0 11px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(7, 16, 42, .72); }
.card-market-callout span, .card-market-callout small { display: block; color: var(--muted); }
.card-market-callout b { display: block; margin: 4px 0; color: var(--good); font-size: 22px; }
.printing-selector-button { width: 100%; }
.card-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 16px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.card-facts div { padding: 10px 12px; background: linear-gradient(145deg, #203d72, #1c285a); }
.card-facts dt { color: var(--muted); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.card-facts dd { margin: 2px 0 0; font-weight: 700; }
.card-rules { padding: 14px; border-left: 3px solid var(--accent-2); background: rgba(7, 16, 42, .64); white-space: pre-line; }
.card-rules p { margin: 7px 0 0; }
.card-history-block { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.card-history-title { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.card-history-title span { font-weight: 800; }
.card-history-title small { color: var(--muted); }
.price-disclaimer { margin-top: 15px; padding: 12px 14px; border: 1px solid rgba(255, 130, 53, .34); border-radius: 12px; background: rgba(255, 111, 44, .08); font-size: 11px; line-height: 1.55; }
.workspace-disclaimer { margin-bottom: 0; }
.collection-card-row { cursor: pointer; }
.collection-card-row:hover, .collection-card-row:focus, .portfolio-position-row:hover, .portfolio-position-row:focus { background: color-mix(in srgb, var(--accent-2) 11%, transparent); outline: none; }
.collection-table-wrap, .portfolio-panel .table-wrap { width: 100%; }
.collection-table-wrap table, .portfolio-panel table { min-width: 920px; }

.printing-selector-modal-card { display: flex; flex-direction: column; width: min(720px, calc(100vw - 28px)); max-height: min(86vh, 900px); max-height: min(86dvh, 900px); overflow: hidden; padding: 0; }
.printing-selector-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 12px; border-bottom: 1px solid var(--line); }
.printing-selector-head h2 { margin: 5px 0 0; }
.printing-selector-modal-card > .hint { flex: 0 0 auto; padding: 0 22px; }
.printing-selector-list { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 8px 14px 22px; }
.printing-option { display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; gap: 15px; align-items: center; padding: 13px 8px; border-bottom: 1px solid var(--line); }
.printing-option.selected { background: color-mix(in srgb, var(--accent-2) 9%, transparent); }
.printing-option img { width: 82px; aspect-ratio: 5/7; object-fit: cover; border-radius: 7px; background: #080d13; }
.printing-option h3, .printing-option p { margin: 0; }
.printing-option p, .printing-option small { color: var(--muted); }
.printing-price-source { display: block; width: fit-content; margin-top: 5px; color: var(--accent); font-size: 10px; }
.printing-price-source:hover { text-decoration: underline; }
.printing-prices { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 7px; }
.printing-prices b { color: var(--good); }
.printing-prices span { color: var(--muted); }
.search-printing-button {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px;
  min-width: min(310px, 100%); padding: 9px 12px; text-align: left;
  border-color: var(--line-hot);
}
.lorcana-finish-toggle {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  margin: 9px 0 12px; padding: 8px;
  border: 1px solid var(--line); border-radius: 12px;
  background: color-mix(in srgb, var(--panel-hot) 72%, transparent);
}
.lorcana-finish-toggle.hidden { display: none; }
.lorcana-finish-toggle > span {
  margin-right: auto; color: var(--muted); font-size: 9px;
  font-weight: 850; letter-spacing: .12em; text-transform: uppercase;
}
.lorcana-finish-toggle button {
  padding: 7px 10px; border-color: var(--line); font-size: 10px;
}
.lorcana-finish-toggle button.active {
  border-color: var(--line-hot); color: #07101c;
  background: var(--accent-2); box-shadow: 0 0 18px color-mix(in srgb, var(--accent-2) 35%, transparent);
}

/* Private user feedback channel */
.bug-report-trigger {
  position: fixed; right: 18px; bottom: 18px; z-index: 120;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 999px;
  border: 1px solid rgba(255,181,91,.55);
  background: rgba(7,13,27,.92); color: #fff;
  box-shadow: 0 12px 34px rgba(0,0,0,.38); backdrop-filter: blur(12px);
}
.bug-report-trigger span { display:grid; place-items:center; width:20px; height:20px; border-radius:50%; background:#f1843b; color:#10131b; font-weight:900; }
.bug-report-backdrop { position:fixed; inset:0; z-index:1000; display:grid; place-items:center; padding:18px; background:rgba(2,5,12,.76); backdrop-filter:blur(7px); }
.bug-report-backdrop.hidden { display:none; }
body.bug-report-open { overflow:hidden; }
.bug-report-dialog { width:min(610px, 100%); max-height:calc(100vh - 36px); overflow:auto; padding:24px; color:#f7f8fc; border:1px solid rgba(255,172,75,.45); border-radius:22px; background:linear-gradient(145deg,rgba(10,25,48,.98),rgba(28,12,34,.98)); box-shadow:0 30px 90px rgba(0,0,0,.62); }
.bug-report-dialog > header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.bug-report-dialog h2 { margin:.2rem 0 0; font-size:clamp(1.7rem,4vw,2.35rem); }
.bug-report-dialog > p { color:#c7cede; line-height:1.55; }
.bug-report-dialog form { display:grid; gap:14px; }
.bug-report-honeypot { position:absolute !important; left:-10000px !important; width:1px !important; height:1px !important; opacity:0 !important; }
.bug-report-dialog label { display:grid; gap:7px; font-weight:750; }
.bug-report-dialog label small { color:#aab4c8; font-weight:500; }
.bug-report-dialog input, .bug-report-dialog select, .bug-report-dialog textarea { width:100%; box-sizing:border-box; padding:11px 12px; color:#fff; background:#080e1c; border:1px solid #3d5574; border-radius:10px; }
.bug-report-dialog textarea { resize:vertical; min-height:112px; }
.bug-report-check { grid-template-columns:auto 1fr !important; align-items:start; font-weight:500 !important; color:#cbd3e2; font-size:.9rem; }
.bug-report-check input { width:auto; margin-top:3px; }
.bug-report-check.hidden { display:none; }
.bug-report-actions { display:flex; justify-content:flex-end; gap:10px; }
.bug-report-status { min-height:1.2em; margin:0; color:#f4c66d; }
.bug-report-status.success { color:#73e5b1; }.bug-report-status.error { color:#ff8f9b; }

/* Admin bug inbox */
.admin-bugs-main { max-width:1500px; }
.bug-inbox { display:grid; gap:16px; margin-top:24px; }
.bug-inbox-card { padding:20px; border:1px solid #253b63; border-left:4px solid #54c8e8; border-radius:16px; background:rgba(8,17,39,.9); box-shadow:0 16px 42px rgba(0,0,0,.22); }
.bug-inbox-card.status-in_progress { border-left-color:#f0ad4e; }.bug-inbox-card.status-resolved { border-left-color:#59d19a; opacity:.88; }.bug-inbox-card.status-dismissed { border-left-color:#71809b; opacity:.72; }
.bug-inbox-card > header { display:flex; justify-content:space-between; gap:16px; align-items:center; padding-bottom:12px; border-bottom:1px solid #243353; }
.bug-number { font-size:1.15rem; font-weight:900; }.bug-status,.bug-category { display:inline-block; margin-left:8px; padding:4px 9px; border-radius:999px; background:#172c4c; text-transform:capitalize; font-size:.75rem; font-weight:800; }
.bug-inbox-card time { color:#99a8c2; font-size:.85rem; }
.bug-inbox-content { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(280px,.7fr); gap:24px; padding-top:16px; }
.bug-description { white-space:pre-wrap; font-size:1.02rem; line-height:1.55; }
.bug-inbox-card dl { display:grid; gap:7px; margin:16px 0; }.bug-inbox-card dl div { display:grid; grid-template-columns:72px 1fr; gap:10px; }.bug-inbox-card dt { color:#8798b7; font-weight:800; }.bug-inbox-card dd { margin:0; overflow-wrap:anywhere; }
.bug-inbox-content form { display:grid; gap:12px; align-content:start; padding:15px; border-radius:12px; background:#0c1428; }.bug-inbox-content form label { display:grid; gap:6px; font-weight:800; }.bug-inbox-content select,.bug-inbox-content textarea { width:100%; box-sizing:border-box; padding:10px; color:#fff; background:#071020; border:1px solid #344c72; border-radius:8px; }
.bug-screenshot-link { display:inline-block; padding:8px 11px; border-radius:8px; background:#15345b; font-weight:800; }
@media (max-width:760px) {
  .bug-report-trigger { right:12px; bottom:12px; }
  .bug-report-dialog { padding:18px; border-radius:16px; }
  .bug-inbox-content { grid-template-columns:1fr; }
  .bug-inbox-card > header { align-items:flex-start; flex-direction:column; }
}
.search-printing-button span { grid-column: 1 / -1; color: var(--muted); font-size: 8px; letter-spacing: .14em; }
.search-printing-button b { overflow: hidden; color: var(--text); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.search-printing-button i { color: var(--accent); font-size: 10px; font-style: normal; white-space: nowrap; }
.search-printing-any { display: flex; align-items: center; gap: 12px; padding: 14px 22px 8px; }
.search-printing-any span, .printing-selector-loading { color: var(--muted); font-size: 11px; }
.printing-finish-choices { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.printing-finish-reference { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.printing-finish-reference .printing-price-source { margin-top: 0; }
.printing-finish-choice { padding: 7px 10px; font-size: 10px; }
.printing-selector-loading { padding: 22px; }

/* The progress layer occupies the search input itself, preventing edits while
   a request is in flight without hiding the rest of the page. */
.ta-wrap { position: relative; }
.search-input-overlay:not(.hidden),
body[data-realm="mtg"] .search-input-overlay:not(.hidden) {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: grid;
  width: auto;
  margin: 0;
  padding: 15px 17px;
  transform: none;
  border: 1px solid var(--line-hot);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(12, 24, 59, .98), rgba(36, 20, 66, .98));
  box-shadow: 0 14px 35px rgba(0,0,0,.35), inset 0 0 30px color-mix(in srgb, var(--accent-2) 8%, transparent);
}

@media (max-width: 980px) {
  .card-workspace { grid-template-columns: 1fr; }
  .card-explorer { position: relative; top: auto; min-height: 0; }
  .card-explorer-empty { min-height: 180px; }
}
@media (max-width: 700px) {
  .dashboard-wide { padding: 14px 11px 40px; }
  .card-explorer-identity { grid-template-columns: 86px 1fr; }
  .card-explorer-identity img { width: 86px; }
  .printing-option { grid-template-columns: 62px 1fr; }
  .printing-option img { width: 62px; }
  .printing-option button { grid-column: 2; justify-self: start; }
  .printing-option .printing-finish-choices { grid-column: auto; }
  .comparison-card-head .search-printing-button { width: 100%; }
  .search-input-overlay:not(.hidden), body[data-realm="mtg"] .search-input-overlay:not(.hidden) { grid-template-columns: 38px 1fr auto; padding: 11px; }
}

/* Realm identities: high-contrast cyberpunk blue for Riftbound and an
   antique-gold gothic treatment for Magic. These deliberately sit last so
   older prototype palettes cannot wash out labels or navigation. */
body[data-realm="riftbound"] {
  --accent: #297cff;
  --accent-2: #21d4ff;
  --toxic: #21d4ff;
  --panel: rgba(7, 24, 58, .97);
  --panel-2: rgba(10, 39, 82, .97);
  --panel-hot: rgba(14, 57, 112, .98);
  --line: rgba(55, 185, 255, .34);
  --line-hot: rgba(78, 224, 255, .82);
  --good: #61f0d2;
  background:
    linear-gradient(rgba(24, 168, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 168, 255, .035) 1px, transparent 1px),
    radial-gradient(circle at 16% 12%, rgba(21, 114, 235, .48), transparent 33%),
    radial-gradient(circle at 86% 30%, rgba(0, 199, 255, .18), transparent 31%),
    linear-gradient(145deg, #020611 0%, #071630 47%, #031026 76%, #02050d 100%) fixed;
  background-size: 36px 36px, 36px 36px, auto, auto, auto;
}
body[data-realm="mtg"] {
  --accent: #d2a650;
  --accent-2: #a93657;
  --toxic: #d2a650;
  --panel: rgba(24, 10, 18, .98);
  --panel-2: rgba(44, 15, 28, .97);
  --panel-hot: rgba(68, 23, 39, .98);
  --line: rgba(205, 158, 77, .30);
  --line-hot: rgba(232, 192, 111, .75);
  --good: #d9bd75;
  --muted: #f1edf0;
  background:
    radial-gradient(ellipse at 50% -12%, rgba(147, 39, 69, .40), transparent 40%),
    radial-gradient(ellipse at 14% 74%, rgba(77, 25, 54, .34), transparent 36%),
    linear-gradient(155deg, #050406 0%, #160b12 43%, #260d1c 72%, #070508 100%) fixed;
}
body[data-realm="riftbound"] header,
body[data-realm="riftbound"] .search-header,
body[data-realm="riftbound"] .simple-header { background: rgba(2, 11, 29, .97); border-color: rgba(45, 192, 255, .42); }
body[data-realm="mtg"] header,
body[data-realm="mtg"] .search-header,
body[data-realm="mtg"] .simple-header { background: rgba(10, 5, 8, .98); border-color: rgba(207, 163, 87, .35); }
body[data-realm="riftbound"] .panel-static,
body[data-realm="riftbound"] .search-panel,
body[data-realm="riftbound"] .results,
body[data-realm="riftbound"] .tier-strip,
body[data-realm="riftbound"] .saved,
body[data-realm="riftbound"] .modal-card { background: linear-gradient(145deg, rgba(7, 27, 65, .98), rgba(7, 18, 47, .98)); }
body[data-realm="mtg"] .panel-static,
body[data-realm="mtg"] .search-panel,
body[data-realm="mtg"] .results,
body[data-realm="mtg"] .tier-strip,
body[data-realm="mtg"] .saved,
body[data-realm="mtg"] .modal-card { background: linear-gradient(145deg, rgba(37, 14, 27, .98), rgba(15, 8, 14, .98)); }
body[data-realm="riftbound"] .brand h1,
body[data-realm="riftbound"] .search-panel h2,
body[data-realm="riftbound"] .results-intro h2,
body[data-realm="riftbound"] .featured-cards h2 {
  font-family: Bahnschrift, "Arial Narrow", "Segoe UI", sans-serif;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}
body[data-realm="mtg"] .brand h1,
body[data-realm="mtg"] .search-panel h2,
body[data-realm="mtg"] .results-intro h2,
body[data-realm="mtg"] .featured-cards h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: -.018em;
  text-transform: none;
}
body[data-realm="riftbound"] .brand-mascot { filter: drop-shadow(0 0 12px rgba(44, 210, 255, .65)); }
body[data-realm="mtg"] .brand-mascot { filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .75)) drop-shadow(0 0 7px rgba(210, 166, 80, .28)); }
body[data-realm="riftbound"] th { color: #dffaff; background: #0c376c; }
body[data-realm="mtg"] th { color: #fff1cf; background: #4a192d; }
body[data-realm="riftbound"] .world-switcher button.active { color: #fff; background: #1354a6; }
body[data-realm="mtg"] .world-switcher button.active { color: #fff4d7; background: #5a1c32; }
body[data-realm="riftbound"] .search-input-overlay:not(.hidden) { background: linear-gradient(145deg, rgba(5, 37, 82, .99), rgba(3, 17, 43, .99)); }
body[data-realm="mtg"] .search-input-overlay:not(.hidden) { background: linear-gradient(145deg, rgba(62, 17, 37, .99), rgba(17, 8, 15, .99)); }
body[data-realm="mtg"] .hint,
body[data-realm="mtg"] .sub,
body[data-realm="mtg"] .cmeta,
body[data-realm="mtg"] .method-note,
body[data-realm="mtg"] .price-disclaimer,
body[data-realm="mtg"] .saved-empty,
body[data-realm="mtg"] .featured-cards-copy,
body[data-realm="mtg"] .results-copy,
body[data-realm="mtg"] label,
body[data-realm="mtg"] small {
  color: #f1edf0;
}
body[data-realm="mtg"] input::placeholder,
body[data-realm="mtg"] textarea::placeholder { color: rgba(241, 237, 240, .72); }

/* Realm backdrops — approved concepts from the art-direction pitch (see
   MINUTES.md): "Neon Ward" for Riftbound, a lit skyline behind a stable
   signal, and "Ash Chapel" for MTG, a broken ruin under ash and a cold
   moss glow. Both live on the existing ::before/::after pseudo-elements
   (already `position: fixed; inset: 0; z-index: -1;` from the generic
   grain rule near the top of this file), so no new markup is needed and
   the search panel/results keep their own opaque backgrounds untouched.
   Kept static (no animated sweep/embers) — this sits behind a page
   people search on repeatedly, not a one-time pitch mockup. */
body[data-realm="riftbound"]::before {
  /* Window-glints and skyline sit in the bottom ~16% band on purpose —
     that's the strip of body background that's actually visible below
     the search panel/results on typical viewports (the panels are tall
     enough to cover almost everything above it). Sized and saturated to
     read clearly in that narrow strip rather than disappear into it: big
     soft-glow dots, a lighter/bluer silhouette fill than the near-black
     gradient tail behind it, and a wide, strong horizon glow for contrast. */
  opacity: 1;
  background:
    radial-gradient(circle 7px at 8% 89%, #23e6ff, transparent 75%) no-repeat,
    radial-gradient(circle 7px at 15% 94%, #ff2e6a, transparent 75%) no-repeat,
    radial-gradient(circle 6px at 23% 87%, #a55bff, transparent 75%) no-repeat,
    radial-gradient(circle 7px at 33% 96%, #23e6ff, transparent 75%) no-repeat,
    radial-gradient(circle 6px at 41% 88%, #ffb020, transparent 75%) no-repeat,
    radial-gradient(circle 7px at 52% 93%, #ff2e6a, transparent 75%) no-repeat,
    radial-gradient(circle 6px at 61% 97%, #23e6ff, transparent 75%) no-repeat,
    radial-gradient(circle 7px at 69% 87%, #a55bff, transparent 75%) no-repeat,
    radial-gradient(circle 6px at 78% 95%, #23e6ff, transparent 75%) no-repeat,
    radial-gradient(circle 7px at 87% 89%, #ff2e6a, transparent 75%) no-repeat,
    radial-gradient(circle 5px at 94% 94%, #ffb020, transparent 75%) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 90'%3E%3Cpolygon points='0,90 0,56 24,56 24,36 48,36 48,50 80,50 80,27 104,27 104,45 136,45 136,18 160,18 160,41 192,41 192,31 224,31 224,47 256,47 256,22 288,22 288,43 320,43 320,32 352,32 352,52 400,52 400,90' fill='%232f5aa8'/%3E%3C/svg%3E") bottom / 620px 220px repeat-x,
    radial-gradient(80% 70% at 50% 100%, rgba(150, 90, 255, .78), transparent 72%) no-repeat;
}
body[data-realm="riftbound"]::after {
  background:
    repeating-linear-gradient(to bottom, rgba(120, 230, 255, .06) 0 1px, transparent 2px 3px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: auto, 180px 180px;
  opacity: .07;
}
body[data-realm="riftbound"] header,
body[data-realm="riftbound"] .search-header,
body[data-realm="riftbound"] .simple-header {
  box-shadow: 0 1px 0 rgba(35, 230, 255, .55), 0 3px 34px rgba(255, 46, 106, .22);
}
body[data-realm="mtg"]::before {
  /* Same reasoning as Riftbound's ::before: the ash motes and ruin
     silhouette sit low, in the band that's actually clear of the search
     panel/results, sized and lightened to actually read there, with a
     stronger cold moss glow behind the silhouette for contrast. The
     vignette (last layer, a plain darkening radial with no silhouette) is
     full-viewport on purpose — it reads at any scroll position, not just
     the bottom strip. */
  opacity: 1;
  background:
    radial-gradient(circle 6px at 12% 90%, rgba(225, 230, 222, .92), transparent 75%) no-repeat,
    radial-gradient(circle 5px at 20% 95%, rgba(225, 230, 222, .75), transparent 75%) no-repeat,
    radial-gradient(circle 6px at 31% 88%, rgba(224, 168, 110, .85), transparent 75%) no-repeat,
    radial-gradient(circle 5px at 44% 96%, rgba(225, 230, 222, .7), transparent 75%) no-repeat,
    radial-gradient(circle 6px at 58% 89%, rgba(224, 168, 110, .8), transparent 75%) no-repeat,
    radial-gradient(circle 5px at 67% 94%, rgba(225, 230, 222, .7), transparent 75%) no-repeat,
    radial-gradient(circle 6px at 79% 87%, rgba(224, 168, 110, .85), transparent 75%) no-repeat,
    radial-gradient(circle 5px at 89% 93%, rgba(225, 230, 222, .75), transparent 75%) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 90'%3E%3Cpolygon points='0,90 0,59 24,59 24,36 36,36 36,52 56,52 56,18 68,18 68,11 80,11 80,18 92,18 92,52 120,52 120,40 160,40 160,56 200,56 200,27 212,16 224,27 224,56 264,56 264,41 304,41 304,58 344,58 344,45 400,45 400,90' fill='%235a4231'/%3E%3C/svg%3E") bottom / 620px 220px repeat-x,
    radial-gradient(70% 45% at 50% 100%, rgba(120, 165, 135, .68), transparent 72%) no-repeat,
    radial-gradient(120% 90% at 50% 42%, transparent 40%, rgba(0, 0, 0, .5) 100%) no-repeat;
}
body[data-realm="mtg"] header,
body[data-realm="mtg"] .search-header,
body[data-realm="mtg"] .simple-header {
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .4), 0 12px 26px rgba(0, 0, 0, .5);
}

/* Keep typed search text readable through focus, browser autofill and mobile
   tap states. The higher realm specificity intentionally beats the retired
   light prototype focus rule above. */
body[data-realm="riftbound"] input,
body[data-realm="riftbound"] textarea,
body[data-realm="riftbound"] select,
body[data-realm="mtg"] input,
body[data-realm="mtg"] textarea,
body[data-realm="mtg"] select {
  color-scheme: dark;
  color: #fff;
  caret-color: var(--accent-2);
  -webkit-text-fill-color: #fff;
}
body[data-realm="riftbound"] input:focus,
body[data-realm="riftbound"] textarea:focus,
body[data-realm="riftbound"] select:focus {
  color: #fff;
  background: #041631;
  border-color: #21d4ff;
  box-shadow: 0 0 0 3px rgba(33, 212, 255, .20), inset 3px 0 #21d4ff;
}
body[data-realm="mtg"] input:focus,
body[data-realm="mtg"] textarea:focus,
body[data-realm="mtg"] select:focus {
  color: #fff;
  background: #190b13;
  border-color: #d2a650;
  box-shadow: 0 0 0 3px rgba(210, 166, 80, .20), inset 3px 0 #d2a650;
}
body[data-realm="riftbound"] input:-webkit-autofill,
body[data-realm="riftbound"] textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #041631 inset;
  box-shadow: 0 0 0 1000px #041631 inset;
}
body[data-realm="mtg"] input:-webkit-autofill,
body[data-realm="mtg"] textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #190b13 inset;
  box-shadow: 0 0 0 1000px #190b13 inset;
}

/* Choose-game cards use the same identities as their destination realms. */
.gateway-card { color: #fff; }
.gateway-riftbound {
  background:
    linear-gradient(rgba(59, 202, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 202, 255, .06) 1px, transparent 1px),
    linear-gradient(135deg, #06152f, #0a3a76 62%, #071327);
  background-size: 24px 24px, 24px 24px, auto;
  border-color: rgba(43, 200, 255, .50);
  box-shadow: 0 22px 50px rgba(0, 65, 145, .28), inset 0 0 0 1px rgba(104, 230, 255, .08);
}
.gateway-riftbound::before { background: radial-gradient(circle at 12% 8%, rgba(38, 213, 255, .34), transparent 45%); }
.gateway-mtg {
  background:
    radial-gradient(circle at 78% 16%, rgba(180, 45, 79, .24), transparent 31%),
    linear-gradient(135deg, #090609, #321120 60%, #12090e);
  border-color: rgba(213, 171, 91, .46);
  box-shadow: 0 22px 50px rgba(24, 0, 10, .50), inset 0 0 0 1px rgba(235, 196, 111, .08);
}
.gateway-mtg::before { background: radial-gradient(circle at 9% 9%, rgba(216, 170, 83, .22), transparent 43%); }
.gateway-riftbound .gateway-art { background: rgba(2, 18, 45, .78); border-color: rgba(64, 214, 255, .42); box-shadow: inset 0 0 35px rgba(24, 147, 255, .15), 0 15px 32px rgba(0, 0, 0, .38); }
.gateway-mtg .gateway-art { background: rgba(13, 6, 10, .82); border-color: rgba(215, 174, 92, .36); box-shadow: inset 0 0 35px rgba(127, 32, 61, .20), 0 15px 32px rgba(0, 0, 0, .48); }
.gateway-card .gateway-copy h2 { color: #fff; }
.gateway-card .gateway-copy p { color: rgba(246, 247, 255, .90); }
.gateway-mtg .gateway-copy p { color: #fff; }
.gateway-riftbound .gateway-copy > span,
.gateway-riftbound .gateway-copy b { color: #65e8ff; }
.gateway-mtg .gateway-copy > span,
.gateway-mtg .gateway-copy b { color: #efd18c; }
.gateway-riftbound .gateway-copy h2 { font-family: Bahnschrift, "Arial Narrow", "Segoe UI", sans-serif; letter-spacing: .045em; text-transform: uppercase; }
.gateway-mtg .gateway-copy h2 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -.02em; }

/* Give the parent CardSuDon brand clear visual priority over the realm mark. */
@media (min-width: 701px) {
  .search-header { min-height: 164px; }
  .search-header .cardsu-home-link img { width: 81px; height: 81px; }
  .search-header .cardsu-home-link span { font-size: 41px; }
  .simple-header .cardsu-home-link img { width: 69px; height: 69px; }
  .simple-header .cardsu-home-link span { font-size: 33px; }
  .portal-mini-brand img { width: 63px; height: 63px; }
  .portal-mini-brand { font-size: 25px; }
}
@media (max-width: 700px) {
  .search-header .cardsu-home-link img { width: 52px; height: 52px; }
  .search-header .cardsu-home-link span { font-size: 26px; }
}

/* August 2026 cohesion sweep
   ---------------------------
   Retire the visible café/pastel prototype colours from every application
   surface. Components inherit one of the two realm systems, while shared
   CardSuDon, account and billing pages use the neutral cosmic shell. */
body[data-realm="riftbound"] { --text: #f7fbff; --muted: #c7def2; --magenta: #6e7dff; --warn: #8edcff; }
body[data-realm="mtg"] { --text: #fff; --muted: #f1edf0; --magenta: #d2a650; --warn: #efd18c; }

/* Shared CardSuDon pages */
body.portal-page,
body.pricing-page,
body.account-action-page {
  color: var(--text);
  background:
    radial-gradient(ellipse at 20% 4%, rgba(22, 118, 190, .34), transparent 34%),
    radial-gradient(ellipse at 82% 18%, rgba(120, 31, 100, .28), transparent 36%),
    linear-gradient(150deg, #060811 0%, #111633 48%, #24132f 78%, #080910 100%) fixed;
}

/* Portal "Neon Ward" backdrop — the front door gets the full, animated
   version of the concept that stays static on /search (that one sits
   behind a page people search on repeatedly; this one is seen once per
   visit, so motion earns its keep). ::before is the atmosphere: a
   skyline silhouette + scattered glints + a horizon glow, full height
   here rather than confined to a bottom band, since there's no search
   panel covering most of the viewport. ::after is the "digital rain" —
   thin neon streaks scrolling continuously downward. */
body.portal-page::before {
  z-index: 0;
  opacity: .85;
  background:
    radial-gradient(circle 4px at 6% 30%, #23e6ff, transparent 75%) no-repeat,
    radial-gradient(circle 3px at 13% 62%, #ff2e6a, transparent 75%) no-repeat,
    radial-gradient(circle 4px at 22% 12%, #7b2ff7, transparent 75%) no-repeat,
    radial-gradient(circle 3px at 31% 78%, #ffb020, transparent 75%) no-repeat,
    radial-gradient(circle 4px at 42% 40%, #23e6ff, transparent 75%) no-repeat,
    radial-gradient(circle 3px at 58% 20%, #7b2ff7, transparent 75%) no-repeat,
    radial-gradient(circle 4px at 67% 68%, #ff2e6a, transparent 75%) no-repeat,
    radial-gradient(circle 3px at 76% 35%, #ffb020, transparent 75%) no-repeat,
    radial-gradient(circle 4px at 85% 58%, #23e6ff, transparent 75%) no-repeat,
    radial-gradient(circle 3px at 93% 22%, #7b2ff7, transparent 75%) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 90'%3E%3Cpolygon points='0,90 0,56 24,56 24,36 48,36 48,50 80,50 80,27 104,27 104,45 136,45 136,18 160,18 160,41 192,41 192,31 224,31 224,47 256,47 256,22 288,22 288,43 320,43 320,32 352,32 352,52 400,52 400,90' fill='%232f5aa8'/%3E%3C/svg%3E") bottom / 900px 220px repeat-x,
    radial-gradient(90% 65% at 50% 100%, rgba(150, 90, 255, .55), transparent 70%) no-repeat,
    linear-gradient(rgba(255,255,255,.018) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.018) 1px,transparent 1px);
  background-size: auto, auto, auto, auto, auto, auto, auto, auto, auto, auto,
    900px 220px, 100% 100%, 52px 52px, 52px 52px;
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
  animation: portal-glint-drift 14s ease-in-out infinite;
}
@keyframes portal-glint-drift {
  0%, 100% { background-position: 6% 30%, 13% 62%, 22% 12%, 31% 78%, 42% 40%, 58% 20%, 67% 68%, 76% 35%, 85% 58%, 93% 22%, bottom, center, 0 0, 0 0; }
  50% { background-position: 6% 33%, 13% 58%, 22% 16%, 31% 74%, 42% 44%, 58% 24%, 67% 64%, 76% 39%, 85% 54%, 93% 26%, bottom, center, 0 0, 0 0; }
}
/* Each streak is one repeating-linear-gradient with a soft-glow-to-
   bright-core-to-soft-glow color ramp (not a flat line) so it actually
   reads as a neon trail, not a hairline that vanishes against a busy
   background. */
body.portal-page::after {
  z-index: 0;
  opacity: .8;
  background-image:
    repeating-linear-gradient(180deg,
      transparent 0, rgba(35,230,255,0) 34px, rgba(35,230,255,.5) 40px,
      rgba(35,230,255,1) 45px, rgba(35,230,255,1) 51px, rgba(35,230,255,.5) 56px,
      rgba(35,230,255,0) 62px, transparent 150px),
    repeating-linear-gradient(180deg,
      transparent 0, rgba(255,46,106,0) 46px, rgba(255,46,106,.5) 52px,
      rgba(255,46,106,1) 57px, rgba(255,46,106,1) 63px, rgba(255,46,106,.5) 68px,
      rgba(255,46,106,0) 74px, transparent 190px),
    repeating-linear-gradient(180deg,
      transparent 0, rgba(123,47,247,0) 58px, rgba(123,47,247,.55) 64px,
      rgba(123,47,247,1) 69px, rgba(123,47,247,1) 75px, rgba(123,47,247,.55) 80px,
      rgba(123,47,247,0) 86px, transparent 230px),
    repeating-linear-gradient(180deg,
      transparent 0, rgba(255,176,32,0) 70px, rgba(255,176,32,.5) 76px,
      rgba(255,176,32,1) 81px, rgba(255,176,32,1) 87px, rgba(255,176,32,.5) 92px,
      rgba(255,176,32,0) 98px, transparent 270px),
    repeating-linear-gradient(180deg,
      transparent 0, rgba(123,47,247,0) 34px, rgba(123,47,247,.5) 40px,
      rgba(123,47,247,1) 45px, rgba(123,47,247,1) 51px, rgba(123,47,247,.5) 56px,
      rgba(123,47,247,0) 62px, transparent 150px),
    repeating-linear-gradient(180deg,
      transparent 0, rgba(35,230,255,0) 46px, rgba(35,230,255,.55) 52px,
      rgba(35,230,255,1) 57px, rgba(35,230,255,1) 63px, rgba(35,230,255,.55) 68px,
      rgba(35,230,255,0) 74px, transparent 190px),
    repeating-linear-gradient(180deg,
      transparent 0, rgba(255,46,106,0) 58px, rgba(255,46,106,.5) 64px,
      rgba(255,46,106,1) 69px, rgba(255,46,106,1) 75px, rgba(255,46,106,.5) 80px,
      rgba(255,46,106,0) 86px, transparent 230px),
    repeating-linear-gradient(180deg,
      transparent 0, rgba(35,230,255,0) 70px, rgba(35,230,255,.55) 76px,
      rgba(35,230,255,1) 81px, rgba(35,230,255,1) 87px, rgba(35,230,255,.55) 92px,
      rgba(35,230,255,0) 98px, transparent 270px);
  background-size: 3px 150px, 3px 190px, 3px 230px, 3px 270px,
    3px 150px, 3px 190px, 3px 230px, 3px 270px;
  background-position: 4% 0, 17% 0, 29% 0, 40% 0, 52% 0, 64% 0, 77% 0, 90% 0;
  background-repeat: repeat-y;
  mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 100%);
  animation: portal-digital-rain 9s linear infinite;
}
/* Each "to" offset is a whole multiple of that layer's own repeat
   period (150/190/230/270px) so the loop never visibly jumps — four
   distinct periods reused across eight streaks keeps the math simple
   while the streaks themselves still fall at visibly different speeds. */
@keyframes portal-digital-rain {
  to {
    background-position: 4% 1500px, 17% 1900px, 29% 2300px, 40% 2700px,
      52% 1500px, 64% 1900px, 77% 2300px, 90% 2700px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.portal-page::before, body.portal-page::after { animation: none; }
}
.portal-header,
.pricing-page .simple-header { color: var(--text); background: rgba(3, 5, 13, .96); border-color: rgba(92, 151, 215, .30); }
.portal-mini-brand,
.portal-mini-brand:visited,
.cardsu-home-link,
.cardsudon-logo h1,
.gateway-heading h1,
.pricing-page h1,
.pricing-page h2,
.pricing-page h3,
.account-action-card h1,
.account-action-brand { color: #fff; }
.portal-local-note,
.portal-intro > p,
.gateway-heading p,
.gateway-memory,
.portal-footer,
.portal-footer a,
.pricing-intro p,
.pricing-fineprint,
.pricing-card > p,
.pricing-card small,
.account-action-card > p { color: #c7d0e5; }
.realm-gateway,
.pricing-card,
.pricing-card-featured,
.account-action-card {
  color: #f7f8ff;
  background: linear-gradient(145deg, rgba(20, 29, 67, .97), rgba(27, 20, 56, .97));
  border-color: rgba(92, 151, 215, .30);
  box-shadow: var(--shadow);
}
.pricing-card-featured { border-color: #45b8ee; box-shadow: 0 24px 70px rgba(2, 4, 14, .58), 0 0 0 1px rgba(69, 184, 238, .18); }
.plan-current,
.billing-notice { color: #d9f3ff; background: rgba(69, 184, 238, .13); border: 1px solid rgba(69, 184, 238, .28); }
.account-action-page input,
.pricing-page input { color-scheme: dark; color: #fff; -webkit-text-fill-color: #fff; background: rgba(5, 8, 22, .90); }
.account-action-page input:focus,
.pricing-page input:focus { color: #fff; background: #09132d; border-color: #45b8ee; }
.auth-success,
.account-action-message.success { color: #8ee7ce; background: rgba(99, 216, 196, .12); }
.account-action-message.error { color: #ff98a7; }

/* Common realm component surfaces */
body[data-realm="riftbound"] .panel,
body[data-realm="riftbound"] .panel-static,
body[data-realm="riftbound"] .results,
body[data-realm="riftbound"] .featured-watchlist,
body[data-realm="riftbound"] .saved-searches,
body[data-realm="riftbound"] .comparison-card,
body[data-realm="riftbound"] .plan-row,
body[data-realm="riftbound"] .coll-stat,
body[data-realm="riftbound"] .portfolio-stat,
body[data-realm="riftbound"] .analytics-lock,
body[data-realm="riftbound"] .analytics-lock.analytics-open,
body[data-realm="riftbound"] .card-facts div,
body[data-realm="riftbound"] .news-list a,
body[data-realm="riftbound"] .pulse-card-soft,
body[data-realm="riftbound"] .pulse-method-grid div {
  color: #f7fbff;
  background: linear-gradient(145deg, rgba(8, 31, 70, .98), rgba(5, 18, 45, .98));
  border-color: rgba(55, 185, 255, .34);
}
body[data-realm="mtg"] .panel,
body[data-realm="mtg"] .panel-static,
body[data-realm="mtg"] .results,
body[data-realm="mtg"] .featured-watchlist,
body[data-realm="mtg"] .saved-searches,
body[data-realm="mtg"] .comparison-card,
body[data-realm="mtg"] .plan-row,
body[data-realm="mtg"] .coll-stat,
body[data-realm="mtg"] .portfolio-stat,
body[data-realm="mtg"] .analytics-lock,
body[data-realm="mtg"] .analytics-lock.analytics-open,
body[data-realm="mtg"] .card-facts div,
body[data-realm="mtg"] .news-list a,
body[data-realm="mtg"] .pulse-card-soft,
body[data-realm="mtg"] .pulse-method-grid div {
  color: #fff;
  background: linear-gradient(145deg, rgba(42, 15, 29, .98), rgba(16, 8, 14, .98));
  border-color: rgba(205, 158, 77, .30);
}
body[data-realm="riftbound"] .panel,
body[data-realm="riftbound"] .panel-static,
body[data-realm="riftbound"] .results { border-top-color: #21d4ff; }
body[data-realm="mtg"] .panel,
body[data-realm="mtg"] .panel-static,
body[data-realm="mtg"] .results { border-top-color: #d2a650; }

/* Controls and navigation */
body[data-realm="riftbound"] button.primary,
body[data-realm="riftbound"] .btn-link.primary {
  color: #fff;
  background: linear-gradient(115deg, #174fbe, #087ed1 56%, #0aaed1);
  border-color: rgba(104, 231, 255, .52);
  box-shadow: 0 9px 26px rgba(0, 110, 216, .30);
}
body[data-realm="mtg"] button.primary,
body[data-realm="mtg"] .btn-link.primary {
  color: #fff;
  background: linear-gradient(115deg, #641d38, #8f2948 58%, #a46f32);
  border-color: rgba(226, 187, 108, .52);
  box-shadow: 0 9px 26px rgba(83, 11, 37, .38);
}
body[data-realm="riftbound"] .ghost,
body[data-realm="riftbound"] .account-btn,
body[data-realm="riftbound"] .world-switcher,
body[data-realm="riftbound"] .world-switcher button { color: #eefaff; background: rgba(8, 39, 83, .88); border-color: rgba(55, 185, 255, .34); }
body[data-realm="mtg"] .ghost,
body[data-realm="mtg"] .account-btn,
body[data-realm="mtg"] .world-switcher,
body[data-realm="mtg"] .world-switcher button { color: #fff; background: rgba(43, 15, 29, .92); border-color: rgba(205, 158, 77, .30); }
body[data-realm="riftbound"] .tier-strip,
body[data-realm="riftbound"] .plan-modal-controls,
body[data-realm="riftbound"] .sample-report { color: #eefaff; background: rgba(9, 42, 88, .88); }
body[data-realm="mtg"] .tier-strip,
body[data-realm="mtg"] .plan-modal-controls,
body[data-realm="mtg"] .sample-report { color: #fff; background: rgba(53, 17, 33, .90); }
.tier-dot.free { background: var(--accent-2); }
.tier-dot.member { background: var(--good); box-shadow: 0 0 8px var(--good); }
.tier-dot.pro { background: var(--accent); }

/* Search, offers, saved lists and autocomplete */
body[data-realm] .ac { color: var(--text); background: var(--panel); border-color: var(--line-hot); box-shadow: var(--shadow); }
body[data-realm] .ac div:hover,
body[data-realm] .ac div.sel { color: #fff; background: color-mix(in srgb, var(--accent-2) 24%, var(--panel)); }
body[data-realm] .ac div:hover .k,
body[data-realm] .ac div.sel .k { color: #fff; }
body[data-realm] .search-page .plan-row,
body[data-realm] .featured-card-market,
body[data-realm] .saved-list-chips li,
body[data-realm] .watchlist-card {
  color: var(--text);
  background: color-mix(in srgb, var(--panel-2) 88%, #05060c);
  border-color: var(--line);
}
body[data-realm] .offer-row:nth-child(even) { background: color-mix(in srgb, var(--panel-2) 55%, #05060c); }
body[data-realm] .offer-row.best { background: color-mix(in srgb, var(--good) 16%, #05060c); }
body[data-realm] .comparison-card-head { background: color-mix(in srgb, var(--panel-2) 92%, #05060c); }
body[data-realm] .featured-card-market { border-top-color: var(--line); }
body[data-realm] .featured-card { border-color: var(--line); box-shadow: 0 12px 30px rgba(0, 0, 0, .38); }
body[data-realm] .featured-card-caption span { color: color-mix(in srgb, var(--accent) 76%, white); }
body[data-realm] .featured-price-trend.trend-up { color: var(--good); }
body[data-realm] .featured-price-trend.trend-down { color: var(--bad); }
body[data-realm="riftbound"] .search-energy-track { background: rgba(9, 42, 88, .90); }
body[data-realm="riftbound"] .search-energy-track i { background: linear-gradient(90deg, #1657d3, #21d4ff); box-shadow: 0 0 16px #21d4ff; }
body[data-realm="mtg"] .search-energy-track { background: rgba(53, 17, 33, .92); }
body[data-realm="mtg"] .search-energy-track i { background: linear-gradient(90deg, #7d2442, #d2a650); box-shadow: 0 0 16px rgba(210, 166, 80, .75); }

/* Collection, portfolio and dialogs */
body[data-realm] .allocation-track { background: color-mix(in srgb, var(--panel-2) 82%, #03040a); }
body[data-realm] .analytics-preview b,
body[data-realm] .allocation-row strong { color: var(--accent); }
body[data-realm] .modal-card,
body[data-realm] .auth-card,
body[data-realm] .plan-modal-card,
body[data-realm] .printing-selector-modal-card { color: var(--text); background: var(--panel); border-color: var(--line-hot); }
body[data-realm] .analytics-choice label,
body[data-realm] .realm-preference-options span { color: var(--text); background: var(--panel-2); border-color: var(--line); }
body[data-realm] .analytics-choice input:checked + span,
body[data-realm] .realm-preference-options input:checked + span { background: color-mix(in srgb, var(--accent-2) 14%, var(--panel-2)); }
body[data-realm] table { color: var(--text); }
body[data-realm] tbody tr { border-color: var(--line); }
body[data-realm] tbody tr:hover { background: color-mix(in srgb, var(--accent-2) 9%, transparent); }
body[data-realm="riftbound"] .price-disclaimer { color: #d9edff; border-color: rgba(33, 212, 255, .30); background: rgba(33, 212, 255, .07); }
body[data-realm="mtg"] .price-disclaimer { color: #fff; border-color: rgba(210, 166, 80, .32); background: rgba(210, 166, 80, .07); }

/* Realm typography details and semantic accents */
body[data-realm="riftbound"] .eyebrow,
body[data-realm="riftbound"] .section-code,
body[data-realm="riftbound"] .text-link { color: #64e6ff; }
body[data-realm="mtg"] .eyebrow,
body[data-realm="mtg"] .section-code,
body[data-realm="mtg"] .text-link { color: #efd18c; }
body[data-realm="riftbound"] .results-intro::after { background: linear-gradient(90deg, #21d4ff, transparent); }
body[data-realm="mtg"] .results-intro::after { background: linear-gradient(90deg, #d2a650, #8f2948, transparent); }
body[data-realm="riftbound"] .brand h1 span { color: #21d4ff; }
body[data-realm="mtg"] .brand h1 span { color: #efd18c; }

/* Final contrast guards for legacy utility selectors. */
body.portal-page .primary,
body.pricing-page .primary,
body.account-action-page .primary {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  background: linear-gradient(115deg, #285cae, #68448f);
  border-color: rgba(128, 184, 238, .44);
}
body[data-realm="riftbound"] .primary,
body[data-realm="mtg"] .primary {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}
body[data-realm] .search-input-overlay,
body[data-realm] .search-input-overlay b,
body[data-realm] .search-input-overlay strong,
body[data-realm] .search-input-overlay span { color: #fff; }
body[data-realm="mtg"] .xlsx-explainer summary,
body[data-realm="mtg"] .auth-help-link,
body[data-realm="mtg"] .consent-check a,
body[data-realm="mtg"] .site-footer a,
body[data-realm="mtg"] .prose-card a,
body[data-realm="mtg"] .auth-perks span,
body[data-realm="mtg"] .privacy-status { color: #efd18c; }
body[data-realm="mtg"] .auth-form label,
body[data-realm="mtg"] .inventory-form label { color: #fff; }
body[data-realm="riftbound"] .auth-form label,
body[data-realm="riftbound"] .inventory-form label { color: #c7def2; }

/* Landing page — every world meets around one bowl
   -------------------------------------------------
   The realm cards are deliberately typographic: their destination art and
   colour do the identification, without a second set of game badges. */
body.portal-page {
  background:
    linear-gradient(180deg, rgba(2, 5, 12, .56), rgba(4, 6, 14, .28) 36%, rgba(4, 5, 12, .68)),
    url("cardsudon-multiverse-kitchen-v1.png") center top / cover fixed no-repeat;
}
body.portal-page::before {
  opacity: 1;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(3, 5, 12, .20), rgba(3, 5, 12, .56) 72%),
    linear-gradient(90deg, rgba(2, 8, 9, .14), transparent 24%, transparent 76%, rgba(11, 5, 9, .16));
  background-size: cover;
  mask-image: none;
  animation: none;
}
body.portal-page::after { display: none; animation: none; }
.portal-header {
  background: linear-gradient(90deg, rgba(3, 7, 14, .94), rgba(8, 7, 17, .84), rgba(3, 7, 14, .94));
  backdrop-filter: blur(16px) saturate(118%);
}
.portal-main { max-width: 1340px; padding-top: 24px; }
.portal-intro {
  margin-bottom: 30px;
  padding: 20px 26px 24px;
  border-radius: 28px;
  background: radial-gradient(ellipse at center, rgba(4, 7, 16, .72), rgba(4, 7, 16, .16) 72%, transparent);
}
.portal-intro > p { color: #f2f4fa; text-shadow: 0 2px 12px #000; }
.realm-gateway {
  background: linear-gradient(145deg, rgba(8, 13, 28, .34), rgba(22, 14, 34, .26));
  border-color: rgba(255, 232, 185, .32);
  box-shadow: 0 28px 72px rgba(0, 0, 0, .30), inset 0 1px rgba(255, 255, 255, .10);
  backdrop-filter: blur(3px) saturate(110%);
}
.gateway-heading p,
.gateway-memory { color: #e3e7f2; }
.gateway-card {
  grid-template-columns: minmax(0, 1fr);
  min-height: 218px;
  padding: clamp(24px, 3vw, 36px);
}
.gateway-copy { align-self: end; max-width: 520px; }
.gateway-copy p { min-height: 0; max-width: 450px; }
.gateway-riftbound {
  background:
    linear-gradient(135deg, rgba(2, 23, 55, .94), rgba(4, 75, 124, .79)),
    url("cardsudon-riftbound-kitchen-v1.png") center / cover no-repeat;
}
.gateway-mtg {
  background:
    linear-gradient(135deg, rgba(16, 5, 13, .95), rgba(72, 18, 52, .76)),
    url("cardsudon-mtg-arcane-kitchen-v1.png") center / cover no-repeat;
}
.gateway-riftbound::after,
.gateway-mtg::after {
  content: "";
  position: absolute;
  inset: 14px auto 14px 14px;
  width: 3px;
  border-radius: 10px;
}
.gateway-riftbound::after { background: linear-gradient(#63eaff, #ff9a38); box-shadow: 0 0 22px rgba(62, 216, 255, .65); }
.gateway-mtg::after { background: linear-gradient(#efd18c, #9b4be0); box-shadow: 0 0 22px rgba(190, 119, 255, .50); }
.portal-footer {
  background: rgba(3, 6, 13, .78);
  backdrop-filter: blur(14px);
}
@media (max-width: 820px) {
  body.portal-page { background-position: 50% top; background-attachment: scroll; }
  .portal-main { padding-top: 16px; }
  .portal-intro { padding-inline: 8px; }
  .gateway-card { grid-template-columns: minmax(0, 1fr); min-height: 190px; padding: 24px 22px 22px 28px; }
}

/* Everything in a bowl — realm art direction
   -------------------------------------------
   The search worlds now share a food-led visual idea while keeping clearly
   different identities: a bright battlefield kitchen for Riftbound and a
   candlelit arcane kitchen for Magic.  These final overrides intentionally
   replace the older skyline/ruin experiments above without deleting their
   history from the stylesheet. */
body[data-realm="riftbound"] {
  --accent: #ff9a2f;
  --accent-2: #50ddff;
  --toxic: #50ddff;
  --line: rgba(103, 222, 255, .42);
  --line-hot: rgba(255, 177, 74, .86);
  --panel: rgba(4, 19, 43, .91);
  --panel-2: rgba(6, 37, 74, .90);
  --panel-hot: rgba(12, 57, 99, .94);
  --good: #79f1cf;
  background:
    linear-gradient(90deg, rgba(1, 7, 19, .68), rgba(2, 16, 40, .22) 46%, rgba(1, 7, 19, .66)),
    linear-gradient(180deg, rgba(2, 8, 22, .18), rgba(2, 8, 22, .58)),
    url("cardsudon-riftbound-kitchen-v1.png") center / cover fixed no-repeat;
}
body[data-realm="mtg"] {
  --accent: #ddb866;
  --accent-2: #9c77dd;
  --toxic: #ddb866;
  --line: rgba(219, 180, 103, .36);
  --line-hot: rgba(236, 205, 137, .82);
  --panel: rgba(15, 8, 18, .93);
  --panel-2: rgba(34, 17, 43, .92);
  --panel-hot: rgba(55, 27, 58, .95);
  --good: #d8bd7e;
  background:
    linear-gradient(90deg, rgba(4, 2, 7, .64), rgba(18, 8, 24, .26) 48%, rgba(4, 2, 7, .62)),
    linear-gradient(180deg, rgba(5, 2, 8, .22), rgba(5, 2, 8, .67)),
    url("cardsudon-mtg-arcane-kitchen-v1.png") center / cover fixed no-repeat;
}

/* Remove the retired procedural skyline and chapel silhouette, keeping only
   a restrained vignette that protects text at the page edges. */
body[data-realm="riftbound"]::before,
body[data-realm="mtg"]::before {
  opacity: 1;
  background: radial-gradient(ellipse at center, transparent 36%, rgba(0, 0, 0, .40) 100%);
}
body[data-realm="riftbound"]::after {
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* Panels read as serving trays: angular enamel and orange heat for
   Riftbound; dark carved wood, brass and violet magic for MTG. */
body[data-realm="riftbound"] .panel,
body[data-realm="riftbound"] .panel-static,
body[data-realm="riftbound"] .results,
body[data-realm="riftbound"] .featured-watchlist,
body[data-realm="riftbound"] .saved-searches,
body[data-realm="riftbound"] .comparison-card,
body[data-realm="riftbound"] .modal-card {
  background:
    linear-gradient(135deg, rgba(17, 66, 106, .18), transparent 42%),
    linear-gradient(155deg, rgba(5, 28, 60, .94), rgba(2, 14, 34, .92));
  border-color: rgba(100, 221, 255, .46);
  border-top-color: #ff9a2f;
  border-radius: 19px 4px 19px 4px;
  box-shadow:
    0 22px 60px rgba(0, 4, 18, .52),
    inset 0 1px rgba(255, 194, 105, .22),
    inset 3px 0 rgba(80, 221, 255, .12);
  backdrop-filter: blur(18px) saturate(122%);
}
body[data-realm="mtg"] .panel,
body[data-realm="mtg"] .panel-static,
body[data-realm="mtg"] .results,
body[data-realm="mtg"] .featured-watchlist,
body[data-realm="mtg"] .saved-searches,
body[data-realm="mtg"] .comparison-card,
body[data-realm="mtg"] .modal-card {
  background:
    radial-gradient(circle at 92% 0, rgba(134, 88, 185, .12), transparent 35%),
    linear-gradient(150deg, rgba(34, 17, 40, .96), rgba(11, 6, 14, .94));
  border-color: rgba(220, 183, 105, .38);
  border-top-color: #ddb866;
  border-radius: 5px 21px 5px 21px;
  box-shadow:
    0 24px 66px rgba(0, 0, 0, .62),
    inset 0 0 0 1px rgba(238, 205, 137, .08),
    inset 0 18px 35px rgba(104, 67, 145, .055);
  backdrop-filter: blur(20px) saturate(112%);
}

body[data-realm="riftbound"] .search-page .panel,
body[data-realm="mtg"] .search-page .panel { overflow: visible; }
body[data-realm="riftbound"] .search-page .panel::before,
body[data-realm="mtg"] .search-page .panel::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -1px;
  left: 22px;
  right: 22px;
  height: 3px;
  border-radius: 99px;
  pointer-events: none;
}
body[data-realm="riftbound"] .search-page .panel::before {
  background: linear-gradient(90deg, transparent, #ff9a2f 18%, #ffe0a9 48%, #50ddff 82%, transparent);
  box-shadow: 0 0 18px rgba(255, 154, 47, .55);
}
body[data-realm="mtg"] .search-page .panel::before {
  background: linear-gradient(90deg, transparent, #7956ad 17%, #ddb866 50%, #7956ad 83%, transparent);
  box-shadow: 0 0 17px rgba(221, 184, 102, .38);
}

/* Bowl-rim inputs: deep interiors, a double rim, and a warm focus glow. */
body[data-realm="riftbound"] input,
body[data-realm="riftbound"] textarea,
body[data-realm="riftbound"] select {
  background: linear-gradient(180deg, rgba(1, 13, 33, .97), rgba(4, 30, 61, .94));
  border: 1px solid rgba(91, 216, 255, .48);
  border-radius: 15px 4px 15px 4px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025), inset 4px 0 rgba(255, 154, 47, .20);
}
body[data-realm="mtg"] input,
body[data-realm="mtg"] textarea,
body[data-realm="mtg"] select {
  background: linear-gradient(180deg, rgba(8, 4, 11, .98), rgba(27, 13, 34, .96));
  border: 1px solid rgba(221, 184, 102, .40);
  border-radius: 4px 16px 4px 16px;
  box-shadow: inset 0 0 0 1px rgba(239, 207, 139, .055), inset 4px 0 rgba(126, 83, 174, .20);
}
body[data-realm="riftbound"] input:focus,
body[data-realm="riftbound"] textarea:focus,
body[data-realm="riftbound"] select:focus {
  background: #031b3c;
  border-color: #ffad4a;
  box-shadow: 0 0 0 3px rgba(255, 154, 47, .22), inset 4px 0 #50ddff;
}
body[data-realm="mtg"] input:focus,
body[data-realm="mtg"] textarea:focus,
body[data-realm="mtg"] select:focus {
  background: #170b1c;
  border-color: #e5c77f;
  box-shadow: 0 0 0 3px rgba(221, 184, 102, .18), inset 4px 0 #8d68c5;
}

body[data-realm="riftbound"] button.primary,
body[data-realm="riftbound"] .btn-link.primary {
  background: linear-gradient(115deg, #c44c16, #f18724 52%, #ffb64f);
  border-color: rgba(255, 222, 160, .74);
  box-shadow: 0 10px 27px rgba(210, 77, 15, .34), inset 0 1px rgba(255,255,255,.22);
}
body[data-realm="mtg"] button.primary,
body[data-realm="mtg"] .btn-link.primary {
  background: linear-gradient(115deg, #452044, #76519b 46%, #a56d35 100%);
  border-color: rgba(236, 205, 137, .60);
  box-shadow: 0 10px 29px rgba(0, 0, 0, .43), inset 0 1px rgba(255, 239, 199, .17);
}

/* Carry the new worlds onto the landing-page realm choices. */
.gateway-riftbound {
  background:
    linear-gradient(115deg, rgba(1, 13, 34, .90), rgba(3, 24, 52, .48)),
    url("cardsudon-riftbound-kitchen-v1.png") 22% center / cover no-repeat;
  border-color: rgba(255, 164, 58, .55);
}
.gateway-mtg {
  background:
    linear-gradient(115deg, rgba(8, 4, 12, .90), rgba(25, 10, 31, .50)),
    url("cardsudon-mtg-arcane-kitchen-v1.png") 78% center / cover no-repeat;
  border-color: rgba(222, 185, 107, .52);
}

@media (max-width: 700px) {
  body[data-realm="riftbound"] {
    background-position: 36% center;
    background-attachment: scroll;
  }
  body[data-realm="mtg"] {
    background-position: 67% center;
    background-attachment: scroll;
  }
  body[data-realm="riftbound"] .panel,
  body[data-realm="riftbound"] .results { border-radius: 15px 3px 15px 3px; }
  body[data-realm="mtg"] .panel,
  body[data-realm="mtg"] .results { border-radius: 3px 15px 3px 15px; }
}

/* Lorcana — a moonlit storybook stage
   ------------------------------------
   The generated background keeps the working side of the canvas quiet and
   moves the sorcerer-mouse and spell light to the right. Translucent indigo
   glass, warm gold and turquoise carry that painting into the interface. */
body[data-realm="lorcana"] {
  --bg: #070b24;
  --text: #fffaf0;
  --muted: #d7d7ec;
  --accent: #ffd67a;
  --accent-2: #71e8ff;
  --toxic: #ba9cff;
  --magenta: #c873e8;
  --good: #8cf0d3;
  --warn: #ffc978;
  --line: rgba(132, 218, 255, .34);
  --line-hot: rgba(255, 214, 122, .82);
  --panel: rgba(8, 17, 49, .91);
  --panel-2: rgba(17, 31, 76, .91);
  --panel-hot: rgba(28, 46, 101, .94);
  background:
    linear-gradient(90deg, rgba(3, 8, 30, .84) 0%, rgba(4, 11, 36, .58) 42%, rgba(5, 9, 30, .22) 72%, rgba(3, 6, 24, .42) 100%),
    linear-gradient(180deg, rgba(5, 8, 31, .12), rgba(5, 7, 25, .66)),
    url("cardsudon-lorcana-whimsy-v1.png") center / cover fixed no-repeat;
}
body[data-realm="lorcana"]::before {
  opacity: 1;
  background:
    radial-gradient(circle at 78% 25%, rgba(113, 232, 255, .12), transparent 28%),
    radial-gradient(circle at 70% 58%, rgba(255, 205, 107, .10), transparent 24%),
    radial-gradient(ellipse at center, transparent 39%, rgba(2, 5, 20, .46) 100%);
}
body[data-realm="lorcana"]::after {
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}
body[data-realm="lorcana"] .search-header {
  background:
    linear-gradient(90deg, rgba(4, 10, 34, .97), rgba(15, 19, 61, .88), rgba(6, 10, 34, .94));
  border-bottom-color: rgba(255, 214, 122, .44);
  box-shadow: 0 12px 42px rgba(1, 3, 18, .42), inset 0 -1px rgba(113, 232, 255, .10);
  backdrop-filter: blur(18px) saturate(125%);
}
body[data-realm="lorcana"] .brand-copy h1 {
  color: #fff2b2;
  text-shadow: 0 0 24px rgba(255, 214, 122, .28);
}
body[data-realm="lorcana"] .preview-realm-banner {
  border-color: rgba(255, 214, 122, .46);
  background: linear-gradient(100deg, rgba(8, 16, 48, .94), rgba(37, 24, 76, .87));
  box-shadow: 0 16px 42px rgba(2, 4, 22, .42), inset 0 1px rgba(113, 232, 255, .08);
}
body[data-realm="lorcana"] .preview-realm-banner > span {
  color: #17102e;
  background: linear-gradient(120deg, #ffe49a, #ffd06a);
}
body[data-realm="lorcana"] .panel,
body[data-realm="lorcana"] .panel-static,
body[data-realm="lorcana"] .results,
body[data-realm="lorcana"] .featured-watchlist,
body[data-realm="lorcana"] .saved-searches,
body[data-realm="lorcana"] .comparison-card,
body[data-realm="lorcana"] .modal-card {
  background:
    radial-gradient(circle at 100% 0, rgba(152, 93, 218, .15), transparent 35%),
    linear-gradient(145deg, rgba(14, 28, 73, .94), rgba(7, 14, 44, .92));
  border-color: rgba(119, 221, 255, .36);
  border-top-color: rgba(255, 214, 122, .80);
  border-radius: 22px 8px 22px 8px;
  box-shadow:
    0 24px 64px rgba(1, 3, 18, .52),
    inset 0 1px rgba(255, 235, 176, .15),
    inset 3px 0 rgba(113, 232, 255, .08);
  backdrop-filter: blur(19px) saturate(122%);
}
body[data-realm="lorcana"] .search-page .panel { overflow: visible; }
body[data-realm="lorcana"] .search-page .panel::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -1px;
  left: 20px;
  right: 20px;
  height: 3px;
  border-radius: 99px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #71e8ff 18%, #c873e8 50%, #ffd67a 82%, transparent);
  box-shadow: 0 0 20px rgba(113, 232, 255, .34);
}
body[data-realm="lorcana"] #buylist,
body[data-realm="lorcana"] input,
body[data-realm="lorcana"] textarea,
body[data-realm="lorcana"] select {
  color-scheme: dark;
  color: #fffaf0;
  -webkit-text-fill-color: #fffaf0;
  caret-color: #ffd67a;
  background: linear-gradient(180deg, rgba(5, 12, 39, .98), rgba(13, 25, 65, .97)) !important;
  border: 1px solid rgba(113, 232, 255, .46);
  border-radius: 16px 6px 16px 6px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025), inset 4px 0 rgba(200, 115, 232, .24);
}
body[data-realm="lorcana"] #buylist:focus,
body[data-realm="lorcana"] input:focus,
body[data-realm="lorcana"] textarea:focus,
body[data-realm="lorcana"] select:focus {
  color: #fff;
  -webkit-text-fill-color: #fff;
  background: #101f54 !important;
  border-color: #ffd67a;
  box-shadow: 0 0 0 3px rgba(255, 214, 122, .17), inset 4px 0 #71e8ff;
}
body[data-realm="lorcana"] #buylist::placeholder,
body[data-realm="lorcana"] input::placeholder,
body[data-realm="lorcana"] textarea::placeholder {
  color: #aebbdc;
  -webkit-text-fill-color: #aebbdc;
  opacity: 1;
}
body[data-realm="lorcana"] button.primary,
body[data-realm="lorcana"] .btn-link.primary {
  color: #16102d;
  background: linear-gradient(118deg, #71e8ff, #ba9cff 48%, #ffd67a 100%);
  border-color: rgba(255, 239, 184, .72);
  box-shadow: 0 11px 30px rgba(70, 111, 215, .30), inset 0 1px rgba(255,255,255,.34);
}
body[data-realm="lorcana"] .lorcana-finish-toggle {
  border-color: rgba(255, 214, 122, .30);
  background: linear-gradient(110deg, rgba(17, 34, 82, .88), rgba(53, 31, 91, .76));
}
body[data-realm="lorcana"] .lorcana-finish-toggle button.active {
  color: #17102d;
  border-color: #ffe5a0;
  background: linear-gradient(115deg, #71e8ff, #ffd67a);
  box-shadow: 0 0 20px rgba(113, 232, 255, .26);
}
body[data-realm="lorcana"] .finish-foil {
  color: #fff2b6;
  border-color: rgba(255, 214, 122, .55);
  background: rgba(200, 115, 232, .16);
}

@media (max-width: 700px) {
  body[data-realm="lorcana"] {
    background-position: 65% center;
    background-attachment: scroll;
  }
  body[data-realm="lorcana"] .panel,
  body[data-realm="lorcana"] .results { border-radius: 18px 6px 18px 6px; }
}

/* Search performance (admin). Reuses .admin-panel and .admin-daily-table;
   only the few states this page introduces are defined here. */
.admin-perf-main { max-width: 1500px; }
.admin-perf-main .perf-panel { margin-top: 20px; }
.admin-perf-main .admin-daily-table td:first-child,
.admin-perf-main .admin-daily-table th:first-child { text-align: left; }
.admin-perf-main .admin-daily-table td { text-align: right; }
/* The panels are a fixed-width grid cell; without this the table's own
   min-content width wins and the whole page scrolls sideways on a phone
   instead of the table scrolling inside its panel. */
.admin-perf-main .perf-panel { overflow: hidden; }
.admin-perf-main .admin-table-scroll { max-width: 100%; overflow-x: auto; }
.admin-perf-main .admin-daily-table { min-width: 620px; }
.admin-callout {
  margin: 16px 0 0; padding: 14px 16px; border: 1px solid rgba(89,209,154,.32);
  border-radius: 12px; background: rgba(28,72,56,.28); color: #dbe5fa;
  font-size: 12px; line-height: 1.6;
}
.admin-callout code, .perf-panel code { color: #8fd6ff; font-size: 11px; }
.admin-tag {
  display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 999px;
  background: #172c4c; color: #9ec5f0; font-size: 10px; font-weight: 800;
}
/* A shop at the pace ceiling is being rate-limited, not merely slow: the two
   read identically in a duration column and need opposite fixes. */
.admin-daily-table td.warn { color: #f0ad4e; font-weight: 800; }
.admin-daily-table tr.warn-row td { background: rgba(160,86,50,.16); }
.admin-daily-table tr.muted td, td.muted { color: #71809b; }
