:root {
  --bg: #090b12;
  --bg-deep: #05060a;
  --surface: rgba(20, 23, 35, 0.92);
  --surface-2: #181c29;
  --surface-3: #202536;
  --surface-glass: rgba(23, 27, 41, 0.76);
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.15);
  --text: #f5f7ff;
  --muted: #9aa2ba;
  --faint: #6c748a;
  --accent: #8b5cf6;
  --accent-rgb: 139, 92, 246;
  --accent-2: #c084fc;
  --good: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --info: #38bdf8;
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.32);
  --topbar: 64px;
  --nav: 86px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* AI Card Forge ----------------------------------------------------------- */
.ai-forge-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), .28);
  background:
    radial-gradient(circle at 92% 0%, rgba(var(--accent-rgb), .18), transparent 35%),
    linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  box-shadow: inset 0 1px rgba(255,255,255,.06), 0 18px 55px rgba(0,0,0,.2);
}

.ai-forge-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 15%, rgba(var(--accent-rgb), .08), transparent 65%);
  transform: translateX(-100%);
  animation: ai-scan 7s ease-in-out infinite;
}

.ai-forge-heading,
.ai-selected-card,
.ai-meta-radar,
.ai-result-top,
.ai-result-hero,
.ai-preview-hero {
  display: flex;
  align-items: center;
}

.ai-forge-heading {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.ai-forge-heading span,
.ai-selected-card > span,
.ai-result-hero > div,
.ai-preview-hero > div {
  display: grid;
  gap: 3px;
}

.ai-forge-heading small,
.ai-selected-card small,
.ai-selected-card em,
.ai-result-hero small,
.ai-result-hero em,
.ai-preview-hero small {
  color: var(--muted);
  font-size: .73rem;
  font-style: normal;
}

.ai-status-dot {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), .6);
  border-radius: 50%;
  background: rgba(var(--accent-rgb), .12);
  color: var(--accent);
  font-size: .7rem;
  font-style: normal;
  font-weight: 900;
  box-shadow: 0 0 24px rgba(var(--accent-rgb), .25);
}

.ai-empty-selection {
  display: grid;
  min-height: 116px;
  margin-bottom: 14px;
  padding: 18px;
  place-items: center;
  gap: 5px;
  border: 1px dashed rgba(var(--accent-rgb), .35);
  border-radius: 18px;
  text-align: center;
}

.ai-empty-selection > span {
  color: var(--accent);
  font-size: 1.6rem;
  filter: drop-shadow(0 0 9px rgba(var(--accent-rgb), .6));
}

.ai-empty-selection small { color: var(--muted); max-width: 390px; }

.ai-selected-card {
  position: relative;
  min-height: 122px;
  margin-bottom: 14px;
  padding: 12px 12px 12px 8px;
  gap: 13px;
  border: 1px solid color-mix(in srgb, var(--set-accent) 68%, transparent);
  border-radius: 20px;
  background: linear-gradient(110deg, color-mix(in srgb, var(--set-accent) 18%, transparent), rgba(255,255,255,.025));
  box-shadow: 0 0 30px color-mix(in srgb, var(--set-accent) 18%, transparent);
}

.ai-selected-art {
  width: 78px;
  flex: 0 0 78px;
  padding: 0;
  border: 0;
  background: transparent;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.35));
}

.ai-selected-art img,
.ai-card-choice img,
.ai-result-hero img,
.ai-preview-hero img {
  display: block;
  width: 100%;
  border-radius: 7px;
}

.ai-selected-card > span { min-width: 0; flex: 1; }
.ai-selected-card strong { font-size: 1.08rem; }

.ai-card-search { margin-bottom: 10px; }

.ai-card-catalog-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 9px;
}

.ai-card-catalog-head > span { display: grid; gap: 2px; }
.ai-card-catalog-head small { color: var(--muted); font-size: .62rem; }

.ai-card-view-tabs {
  display: flex;
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,.025);
}

.ai-card-view-tabs button {
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: .62rem;
  font-weight: 800;
}

.ai-card-view-tabs button.active {
  background: rgba(var(--accent-rgb), .17);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .25);
}

.ai-card-results {
  display: flex;
  min-height: 116px;
  margin: 0 -4px 19px;
  padding: 4px 4px 8px;
  gap: 9px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}

.ai-card-results.all-ex {
  display: grid;
  max-height: 445px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: none;
  scrollbar-width: thin;
}

.ai-card-results.all-ex .ai-card-choice {
  width: auto;
  min-width: 0;
}

.ai-load-more-ex {
  display: grid;
  min-height: 116px;
  place-content: center;
  gap: 3px;
  border: 1px dashed rgba(var(--accent-rgb), .38);
  border-radius: 14px;
  background: rgba(var(--accent-rgb), .055);
  color: var(--text);
  text-align: center;
}

.ai-load-more-ex b { color: var(--accent); font-size: 1.1rem; }
.ai-load-more-ex span { color: var(--muted); font-size: .62rem; }

.ai-card-choice {
  width: 88px;
  flex: 0 0 88px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  color: var(--text);
  text-align: left;
  scroll-snap-align: start;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.ai-card-choice span {
  display: block;
  width: 54px;
  margin: 0 auto 6px;
}

.ai-card-choice b,
.ai-card-choice small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-card-choice b { font-size: .69rem; }
.ai-card-choice small { margin-top: 2px; color: var(--muted); font-size: .6rem; }
.ai-card-choice.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .28), 0 0 22px rgba(var(--accent-rgb), .28);
  transform: translateY(-2px);
}

.ai-no-results {
  display: grid;
  width: 100%;
  place-content: center;
  text-align: center;
}
.ai-no-results small { color: var(--muted); }

.ai-toggle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 16px 0;
}

.ai-option-toggle {
  display: grid;
  min-height: 86px;
  padding: 11px;
  grid-template-columns: 28px 1fr;
  column-gap: 7px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.025);
  color: var(--text);
  text-align: left;
}

.ai-option-toggle > span {
  display: grid;
  width: 27px;
  height: 27px;
  grid-row: 1 / 3;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
}

.ai-option-toggle b { align-self: end; font-size: .78rem; }
.ai-option-toggle small { color: var(--muted); font-size: .64rem; }
.ai-option-toggle.active {
  border-color: rgba(var(--accent-rgb), .55);
  background: rgba(var(--accent-rgb), .09);
}
.ai-option-toggle.active > span { background: var(--accent); color: var(--button-text, #080a0e); }

.ai-meta-radar {
  justify-content: space-between;
  gap: 14px;
  margin: 15px 0;
  padding: 12px 0;
  border-block: 1px solid var(--line);
}

.ai-meta-radar > span { display: grid; gap: 2px; flex: 0 0 auto; }
.ai-meta-radar small { color: var(--muted); font-size: .66rem; }
.ai-meta-radar > div { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }
.ai-meta-radar i,
.ai-matchup-row i {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .59rem;
  font-style: normal;
}

.ai-build-button,
.ai-build-from-card {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ai-build-button svg { width: 19px; }
.ai-build-from-card {
  margin-top: 12px;
  padding: 12px 15px;
  border: 1px solid rgba(var(--accent-rgb), .45);
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(var(--accent-rgb), .16), rgba(var(--accent-rgb), .05));
  color: var(--text);
  text-align: left;
}
.ai-build-from-card span { color: var(--accent); font-size: 1.35rem; }
.ai-build-from-card strong,
.ai-build-from-card small { display: block; }
.ai-build-from-card small { color: var(--muted); font-size: .68rem; }

/* Meta 250 tournament-only Forge preview --------------------------------- */
.meta250-hero {
  border-color: rgba(56, 189, 248, .32);
  background: radial-gradient(circle at 92% 0%, rgba(56, 189, 248, .17), transparent 35%), linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
}
.meta250-status { width: 44px; height: 44px; border-color: rgba(52,211,153,.58); color: var(--good); background: rgba(52,211,153,.1); box-shadow: 0 0 24px rgba(52,211,153,.22); }
.meta250-trust-strip { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 7px; margin: 0 0 14px; }
.meta250-trust-strip span { display: grid; padding: 9px 7px; gap: 1px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); text-align: center; }
.meta250-trust-strip b { font-size: .9rem; }
.meta250-trust-strip small { color: var(--muted); font-size: .55rem; text-transform: uppercase; }
.meta250-ranking-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.meta250-ranking { display: grid; min-height: 66px; padding: 10px; align-content: center; gap: 3px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: rgba(255,255,255,.025); text-align: left; }
.meta250-ranking b { font-size: .72rem; }
.meta250-ranking small { color: var(--muted); font-size: .59rem; line-height: 1.35; }
.meta250-ranking.active { border-color: rgba(56,189,248,.62); background: rgba(56,189,248,.1); box-shadow: inset 0 0 20px rgba(56,189,248,.07), 0 0 18px rgba(56,189,248,.1); }
.meta250-forge-button { margin-top: 16px; background: linear-gradient(120deg, #0ea5e9, #6366f1); }
.meta250-disclaimer { margin: 10px 2px 0; color: var(--muted); font-size: .62rem; line-height: 1.5; text-align: center; }
.meta250-evidence { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
.meta250-evidence span, .meta250-rule-row span { padding: 4px 7px; border-radius: 999px; background: rgba(52,211,153,.08); color: #9ae6c5; font-size: .55rem; }
.meta250-empty { margin-top: 24px; padding: 25px; text-align: center; scroll-margin-top: calc(var(--topbar) + 16px); }
.meta250-empty h2 { margin: 5px auto 7px; max-width: 560px; }
.meta250-empty > p { max-width: 620px; margin: 0 auto 17px; color: var(--muted); }
.meta250-empty-icon { display: grid; width: 55px; height: 55px; margin: 0 auto 10px; place-items: center; border: 1px solid rgba(56,189,248,.38); border-radius: 50%; color: var(--info); font-size: 1.6rem; background: rgba(56,189,248,.08); }
.meta250-empty-actions { display: flex; justify-content: center; gap: 8px; }
.meta250-empty-actions a { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.meta250-rule-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 15px; }

@media (max-width: 560px) {
  .meta250-ranking-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .meta250-trust-strip { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .meta250-empty-actions { display: grid; }
  .meta250-empty { padding: 18px 13px; }
}

.subsection-title { margin: 25px 2px 10px; }
.subsection-title span { display: grid; gap: 2px; }
.subsection-title small { color: var(--muted); }

.legacy-forge { margin-top: 10px; padding: 0; overflow: hidden; }
.legacy-forge summary {
  padding: 15px;
  color: var(--muted);
  cursor: pointer;
  font-size: .76rem;
  font-weight: 750;
}
.legacy-forge-fields { padding: 2px 15px 15px; }

.ai-results-section { margin-top: 24px; scroll-margin-top: calc(var(--topbar) + 16px); }
.ai-result-grid { display: grid; gap: 13px; }
.ai-result-card {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  box-shadow: 0 16px 45px rgba(0,0,0,.18);
}
.ai-result-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--deck-accent);
  box-shadow: 0 0 18px var(--deck-accent);
}
.ai-result-card.recommended { border-color: color-mix(in srgb, var(--deck-accent) 65%, transparent); }
.ai-result-top { justify-content: space-between; margin-bottom: 10px; color: var(--muted); font-size: .68rem; }
.ai-result-top b {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--deck-accent) 19%, transparent);
  color: var(--text);
  font-size: .92rem;
}
.ai-result-hero { gap: 12px; }
.ai-result-hero > span { width: 64px; flex: 0 0 64px; filter: drop-shadow(0 7px 10px rgba(0,0,0,.35)); }
.ai-result-hero strong { font-size: .97rem; line-height: 1.15; }
.ai-result-hero em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ai-score-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 13px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.ai-score-row > span { display: grid; padding: 9px 4px; place-items: center; border-right: 1px solid var(--line); }
.ai-score-row > span:last-child { border: 0; }
.ai-score-row b { font-size: .9rem; }
.ai-score-row small { color: var(--muted); font-size: .55rem; }

.ai-matchup-row { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 10px; }
.ai-matchup-row .strong { border-color: rgba(34,197,94,.35); color: #86efac; }
.ai-matchup-row .even { border-color: rgba(250,204,21,.32); color: #fde68a; }
.ai-matchup-row .watch { border-color: rgba(248,113,113,.35); color: #fca5a5; }
.ai-result-card ul { margin: 10px 0 14px; padding-left: 17px; color: var(--muted); font-size: .7rem; line-height: 1.45; }
.ai-warning { padding: 9px 10px; border: 1px solid rgba(250,204,21,.26); border-radius: 11px; background: rgba(250,204,21,.07); color: #fde68a; font-size: .67rem; }
.build-intelligence-note { display:block; margin-top:8px; color:var(--muted); font-size:.65rem; line-height:1.45; }
.ai-result-card.limitless-sourced {
  border-color:rgba(56,189,248,.78);
  background:
    radial-gradient(circle at 100% 0,rgba(56,189,248,.19),transparent 45%),
    linear-gradient(145deg,rgba(14,34,62,.9),rgba(4,12,27,.96));
  animation:limitlessBlueAura 2.3s ease-in-out infinite;
}
.ai-result-card.limitless-sourced::after { width:4px; background:#38bdf8; box-shadow:0 0 24px #38bdf8,0 0 46px rgba(56,189,248,.7); }
.source-deck-badge { display:flex; margin:0 0 11px; padding:8px 10px; align-items:center; gap:8px; border:1px solid rgba(125,211,252,.35); border-radius:12px; color:#bae6fd; background:rgba(14,165,233,.12); }
.source-deck-badge > i { display:grid; width:27px; height:27px; place-items:center; border-radius:9px; background:rgba(56,189,248,.18); font-style:normal; font-weight:900; }
.source-deck-badge span,.source-deck-badge b,.source-deck-badge small { display:block; }
.source-deck-badge b { font-size:.65rem; letter-spacing:.08em; }
.source-deck-badge small { margin-top:1px; color:rgba(186,230,253,.72); font-size:.56rem; }
.forge-deck-badge { display:inline-flex; margin:0 0 10px; padding:5px 8px; border-radius:8px; color:var(--muted); background:var(--surface-3); font-size:.58rem; font-weight:800; text-transform:uppercase; }
@keyframes limitlessBlueAura {
  0%,100% { box-shadow:0 0 0 1px rgba(56,189,248,.32),0 14px 38px rgba(14,165,233,.18); }
  50% { box-shadow:0 0 0 2px rgba(125,211,252,.72),0 0 34px rgba(56,189,248,.54),0 18px 55px rgba(14,165,233,.3); }
}
.limitless-source-link {
  display: inline-flex;
  min-height: 38px;
  margin: 0 0 12px;
  padding: 8px 11px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(56, 189, 248, .28);
  border-radius: 12px;
  color: #7dd3fc;
  background: rgba(56, 189, 248, .075);
  font-size: .67rem;
  font-weight: 800;
  text-decoration: none;
}
.ai-matchup-row .favored { border-color: rgba(34,197,94,.35); color: #86efac; }
.ai-matchup-row .unfavored { border-color: rgba(248,113,113,.35); color: #fca5a5; }

.ai-support-highlights {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(var(--accent-rgb), .24);
  border-radius: 15px;
  background: rgba(var(--accent-rgb), .055);
}

.ai-support-highlights > div:first-child { display: grid; gap: 2px; }
.ai-support-highlights > div:first-child small { color: var(--muted); font-size: .62rem; }
.ai-support-highlights article { display: flex; align-items: flex-start; gap: 9px; }
.ai-support-highlights article > span { width: 38px; flex: 0 0 38px; }
.ai-support-highlights article img { display: block; width: 100%; border-radius: 4px; }
.ai-support-highlights article > div { min-width: 0; }
.ai-support-highlights article b { display: block; margin-bottom: 2px; font-size: .72rem; }
.ai-support-highlights article p { margin: 0; color: var(--muted); font-size: .66rem; line-height: 1.38; }
.ai-support-highlights.compact { padding: 10px; }
.ai-support-highlights.compact article { padding-top: 7px; border-top: 1px solid rgba(255,255,255,.055); }
.ai-support-highlights.compact article p { font-size: .63rem; }

.ai-preview-hero { gap: 14px; margin-bottom: 13px; }
.ai-preview-hero > span { width: 95px; flex: 0 0 95px; }
.ai-preview-hero strong { font-size: 1.05rem; }
.modal-scores { margin-bottom: 14px; }
.ai-preview-matchups { display: grid; gap: 7px; margin-bottom: 13px; }
.ai-preview-matchups > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 11px; }
.ai-preview-matchups span { display: grid; gap: 2px; }
.ai-preview-matchups small { color: var(--muted); font-size: .62rem; text-transform: capitalize; }
.ai-preview-matchups strong { font-size: .7rem; }
.ai-preview-matchups .strong { color: #86efac; }
.ai-preview-matchups .even { color: #fde68a; }
.ai-preview-matchups .watch { color: #fca5a5; }
.ai-preview-list { display: grid; gap: 10px; margin: 13px 0; }
.ai-preview-group { padding: 11px; border: 1px solid var(--line); border-radius: 13px; }
.ai-preview-group h3 { margin: 0 0 7px; font-size: .78rem; }
.ai-preview-group > div { display: flex; gap: 9px; padding: 5px 0; border-top: 1px solid rgba(255,255,255,.045); font-size: .7rem; }
.ai-preview-group > div > b { width: 24px; color: var(--accent); }
.ai-preview-group > div > span { display: grid; }
.ai-preview-group small { color: var(--muted); font-size: .6rem; }

body[data-theme="eink"] .ai-forge-hero,
body[data-theme="eink"] .ai-result-card {
  box-shadow: none;
  background: var(--panel);
}
body[data-theme="eink"] .ai-forge-hero::before { display: none; }
body[data-theme="eink"] .ai-matchup-row .strong,
body[data-theme="eink"] .ai-preview-matchups .strong,
body[data-theme="eink"] .ai-matchup-row .even,
body[data-theme="eink"] .ai-preview-matchups .even,
body[data-theme="eink"] .ai-matchup-row .watch,
body[data-theme="eink"] .ai-preview-matchups .watch { color: var(--text); }

@media (min-width: 860px) {
  .ai-result-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .ai-card-catalog-head { align-items: stretch; flex-direction: column; }
  .ai-card-view-tabs { align-self: stretch; }
  .ai-card-view-tabs button { flex: 1; }
  .ai-card-results.all-ex { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ai-meta-radar { align-items: flex-start; flex-direction: column; }
  .ai-meta-radar > div { justify-content: flex-start; }
  .ai-selected-card .text-button { align-self: flex-start; }
  .ai-score-row small { font-size: .5rem; }
}

@keyframes ai-scan {
  0%, 68%, 100% { transform: translateX(-110%); }
  82% { transform: translateX(110%); }
}

body[data-accent="blue"] {
  --accent: #0ea5e9;
  --accent-rgb: 14, 165, 233;
  --accent-2: #67e8f9;
}

body[data-accent="green"] {
  --accent: #22c55e;
  --accent-rgb: 34, 197, 94;
  --accent-2: #a3e635;
}

body[data-accent="ember"] {
  --accent: #f97316;
  --accent-rgb: 249, 115, 22;
  --accent-2: #facc15;
}

body[data-theme="light"] {
  --bg: #f4f5fb;
  --bg-deep: #e8eaf3;
  --surface: rgba(255, 255, 255, 0.95);
  --surface-2: #ffffff;
  --surface-3: #eef0f7;
  --surface-glass: rgba(255, 255, 255, 0.83);
  --line: rgba(31, 38, 59, 0.09);
  --line-strong: rgba(31, 38, 59, 0.16);
  --text: #161a28;
  --muted: #5f6679;
  --faint: #8a91a3;
  --shadow: 0 18px 55px rgba(52, 52, 80, 0.13);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  min-height: 100%;
  background: var(--bg-deep);
  overscroll-behavior: none;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 40% -20%, rgba(var(--accent-rgb), .13), transparent 42%),
    linear-gradient(180deg, var(--bg-deep), var(--bg));
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  transition: color .35s ease, background-color .35s ease;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a {
  color: inherit;
}

svg {
  display: block;
}

.app-shell {
  position: relative;
  width: min(100%, 680px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .08;
  pointer-events: none;
  background: var(--accent);
}

.ambient-one {
  top: 8%;
  right: -120px;
}

.ambient-two {
  bottom: 4%;
  left: -160px;
  background: var(--accent-2);
}

.topbar {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 50%;
  display: flex;
  width: min(100%, 680px);
  height: calc(var(--topbar) + env(safe-area-inset-top));
  padding: calc(9px + env(safe-area-inset-top)) 18px 9px;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 81%, transparent);
  backdrop-filter: blur(22px) saturate(150%);
}

.brand-button {
  display: flex;
  padding: 0;
  align-items: center;
  gap: 10px;
  color: var(--text);
  background: transparent;
}

.brand-mark {
  position: relative;
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), .6);
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 24px rgba(var(--accent-rgb), .24);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  content: "";
}

.brand-mark::before {
  width: 120%;
  height: 7px;
  background: var(--bg-deep);
  transform: rotate(-12deg);
}

.brand-mark::after {
  width: 11px;
  height: 11px;
  border: 3px solid var(--bg-deep);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .35);
}

.brand-mark span {
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: inherit;
}

.brand-type {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -.45px;
}

.brand-type b {
  color: var(--accent-2);
  font-weight: 850;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.format-pill,
.icon-button {
  display: inline-flex;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--surface-glass);
}

.format-pill {
  padding: 0 12px;
  gap: 7px;
  border-radius: 99px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .35px;
}

.format-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, .1);
  animation: pulse 2.2s infinite;
}

.icon-button {
  width: 38px;
  padding: 0;
  border-radius: 50%;
}

.icon-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-view {
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(var(--topbar) + env(safe-area-inset-top) + 16px) 16px calc(var(--nav) + env(safe-area-inset-bottom) + 32px);
}

.app-view.view-enter {
  animation: view-in .34s var(--ease) both;
}

.page-head {
  display: flex;
  margin: 5px 2px 18px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 6px;
  align-items: center;
  gap: 7px;
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.25px;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 16px;
  height: 1px;
  content: "";
  background: currentColor;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 5px;
  font-size: clamp(29px, 8vw, 40px);
  line-height: 1.02;
  letter-spacing: -1.25px;
}

h2 {
  margin-bottom: 5px;
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: -.65px;
}

h3 {
  margin-bottom: 6px;
  font-size: 16px;
  letter-spacing: -.25px;
}

p {
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.faint {
  color: var(--faint);
}

.tiny {
  font-size: 11px;
}

.small {
  font-size: 13px;
}

.strong {
  color: var(--text);
  font-weight: 700;
}

.section {
  margin-top: 25px;
}

.section-head {
  display: flex;
  margin: 0 2px 12px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 18px;
}

.text-button {
  padding: 6px 0;
  color: var(--accent-2);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.card,
.panel {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card {
  border-radius: var(--radius);
}

.panel {
  padding: 18px;
  border-radius: var(--radius);
}

.hero {
  position: relative;
  min-height: 285px;
  padding: 24px 20px;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), .28);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 85% 25%, rgba(var(--accent-rgb), .36), transparent 35%),
    linear-gradient(145deg, rgba(var(--accent-rgb), .17), var(--surface) 54%);
  box-shadow: var(--shadow);
}

.hero::after {
  position: absolute;
  right: -35px;
  bottom: -70px;
  width: 220px;
  height: 220px;
  content: "";
  border: 1px solid rgba(var(--accent-rgb), .18);
  border-radius: 50%;
  box-shadow:
    0 0 0 28px rgba(var(--accent-rgb), .045),
    0 0 0 58px rgba(var(--accent-rgb), .025);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 65%;
}

.hero h1 {
  max-width: 310px;
  margin: 5px 0 10px;
}

.hero h1 span {
  color: var(--accent-2);
}

.hero p {
  max-width: 320px;
  margin-bottom: 19px;
  font-size: 13px;
}

.hero-art {
  position: absolute;
  z-index: 1;
  right: -19px;
  bottom: -30px;
  width: 43%;
  max-width: 190px;
  transform: rotate(8deg);
  filter: drop-shadow(0 23px 25px rgba(0, 0, 0, .55));
  animation: card-float 5s ease-in-out infinite;
}

.hero-art img {
  display: block;
  width: 100%;
  aspect-ratio: 0.718;
  border-radius: 7% / 5%;
  object-fit: cover;
  background: var(--surface-3);
}

.hero-stats {
  position: absolute;
  z-index: 3;
  right: 15px;
  top: 18px;
  display: grid;
  gap: 6px;
}

.mini-stat {
  min-width: 66px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  background: rgba(8, 10, 17, .73);
  backdrop-filter: blur(10px);
}

body[data-theme="light"] .mini-stat {
  background: rgba(255, 255, 255, .82);
}

.mini-stat strong,
.mini-stat small {
  display: block;
}

.mini-stat strong {
  font-size: 14px;
}

.mini-stat small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .75px;
  text-transform: uppercase;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  min-height: 44px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 760;
  transition: transform .2s var(--ease), filter .2s ease, border-color .2s ease;
}

.primary-button:active,
.secondary-button:active,
.ghost-button:active,
.danger-button:active {
  transform: scale(.97);
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 68%, #fff));
  box-shadow: 0 10px 28px rgba(var(--accent-rgb), .25);
}

.primary-button svg,
.secondary-button svg,
.ghost-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
}

.ghost-button {
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
}

.danger-button {
  border: 1px solid rgba(251, 113, 133, .25);
  color: var(--danger);
  background: rgba(251, 113, 133, .1);
}

.full-button {
  width: 100%;
}

.button-badge {
  padding: 2px 6px;
  border-radius: 7px;
  color: var(--text);
  background: rgba(255, 255, 255, .16);
  font-size: 9px;
}

.dashboard-strip {
  display: grid;
  margin-top: 13px;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.dashboard-metric {
  padding: 13px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-glass);
}

.dashboard-metric strong,
.dashboard-metric span {
  display: block;
}

.dashboard-metric strong {
  margin-bottom: 2px;
  font-size: 17px;
}

.dashboard-metric span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-card {
  position: relative;
  min-height: 112px;
  padding: 15px;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: var(--surface);
}

.quick-card::after {
  position: absolute;
  right: -20px;
  bottom: -35px;
  width: 90px;
  height: 90px;
  content: "";
  border-radius: 50%;
  background: rgba(var(--accent-rgb), .1);
}

.quick-icon {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  place-items: center;
  border-radius: 11px;
  color: var(--accent-2);
  background: rgba(var(--accent-rgb), .12);
}

.quick-icon svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-card strong,
.quick-card small {
  position: relative;
  z-index: 1;
  display: block;
}

.quick-card strong {
  font-size: 13px;
}

.quick-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.horizontal-scroll {
  display: grid;
  margin: 0 -16px;
  padding: 2px 16px 16px;
  grid-auto-columns: minmax(250px, 78%);
  grid-auto-flow: column;
  gap: 11px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

.deck-card {
  position: relative;
  min-height: 174px;
  padding: 17px;
  overflow: hidden;
  scroll-snap-align: start;
  text-align: left;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 21px;
  background:
    radial-gradient(circle at 92% 17%, color-mix(in srgb, var(--deck-accent) 30%, transparent), transparent 37%),
    var(--surface);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}

.deck-card-art {
  position: absolute;
  right: -1px;
  bottom: -27px;
  width: 112px;
  transform: rotate(7deg);
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .55));
}

.deck-card-art img {
  width: 100%;
  aspect-ratio: .718;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-3);
}

.deck-card-copy {
  position: relative;
  z-index: 2;
  width: calc(100% - 86px);
}

.centerpiece-label {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: color-mix(in srgb, var(--deck-accent) 72%, var(--text));
  font-size: 8px;
  font-weight: 780;
  letter-spacing: .25px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  min-height: 23px;
  padding: 0 8px;
  align-items: center;
  gap: 5px;
  border: 1px solid color-mix(in srgb, var(--deck-accent, var(--accent)) 40%, transparent);
  border-radius: 99px;
  color: color-mix(in srgb, var(--deck-accent, var(--accent)) 72%, #fff);
  background: color-mix(in srgb, var(--deck-accent, var(--accent)) 10%, transparent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .45px;
  text-transform: uppercase;
}

.deck-card h3 {
  margin: 10px 0 5px;
  font-size: 17px;
  line-height: 1.12;
}

.deck-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 10px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.deck-mini-metrics {
  display: flex;
  margin-top: 12px;
  gap: 11px;
  color: var(--muted);
  font-size: 10px;
}

.deck-mini-metrics strong {
  color: var(--text);
}

.format-card {
  display: grid;
  padding: 17px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
}

.format-ring {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid rgba(52, 211, 153, .24);
  border-radius: 50%;
  color: var(--good);
  background: rgba(52, 211, 153, .09);
  font-size: 12px;
  font-weight: 850;
}

.format-copy strong,
.format-copy small {
  display: block;
}

.format-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.chevron {
  color: var(--faint);
  font-size: 22px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.feature-chip {
  display: flex;
  min-height: 48px;
  padding: 10px 11px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: var(--surface-glass);
  font-size: 11px;
}

.feature-chip i {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: var(--accent-2);
  background: rgba(var(--accent-rgb), .12);
  font-style: normal;
  font-size: 12px;
}

.form-panel {
  padding: 18px;
}

.field {
  margin-bottom: 21px;
}

.field:last-child {
  margin-bottom: 0;
}

.field-label {
  display: flex;
  margin-bottom: 9px;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  font-size: 12px;
  font-weight: 730;
}

.field-label span:last-child {
  color: var(--accent-2);
  font-size: 11px;
}

.segmented {
  display: grid;
  padding: 4px;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-deep);
}

.segmented.two {
  grid-template-columns: repeat(2, 1fr);
}

.segmented.four {
  grid-template-columns: repeat(4, 1fr);
}

.segment {
  min-height: 37px;
  padding: 0 7px;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}

.segment.active {
  color: var(--text);
  background: var(--surface-3);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .2);
}

.select,
.search-input,
.text-input,
.import-area {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--text);
  background: var(--bg-deep);
}

.select,
.text-input {
  height: 46px;
  padding: 0 13px;
}

.select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 19px,
    calc(100% - 13px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.range-wrap {
  display: grid;
  grid-template-columns: 1fr 54px;
  align-items: center;
  gap: 12px;
}

input[type="range"] {
  width: 100%;
  height: 5px;
  appearance: none;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent) var(--range, 50%), var(--surface-3) var(--range, 50%));
}

input[type="range"]::-webkit-slider-thumb {
  width: 21px;
  height: 21px;
  appearance: none;
  border: 4px solid var(--surface-2);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}

.range-value {
  display: grid;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--accent-2);
  background: rgba(var(--accent-rgb), .09);
  font-size: 12px;
  font-weight: 800;
}

.toggle-row {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
}

.toggle-row:first-child {
  border-top: 0;
}

.toggle-copy strong,
.toggle-copy small {
  display: block;
}

.toggle-copy strong {
  font-size: 12px;
}

.toggle-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.switch {
  position: relative;
  width: 45px;
  height: 25px;
  flex: 0 0 auto;
  border-radius: 99px;
  background: var(--surface-3);
  transition: background .25s ease;
}

.switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  content: "";
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .3);
  transition: transform .25s var(--ease);
}

.switch.on {
  background: var(--accent);
}

.switch.on::after {
  transform: translateX(20px);
}

.forge-note {
  display: flex;
  margin: 12px 0 17px;
  padding: 12px;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid rgba(56, 189, 248, .18);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(56, 189, 248, .07);
  font-size: 10px;
}

.forge-note i {
  color: var(--info);
  font-style: normal;
}

.generator-button {
  position: relative;
  min-height: 55px;
  overflow: hidden;
  font-size: 14px;
}

.generator-button::before {
  position: absolute;
  top: -90%;
  left: -25%;
  width: 35%;
  height: 280%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent);
  transform: rotate(25deg);
  animation: shine 3.5s infinite;
}

.search-bar {
  position: relative;
  margin-bottom: 13px;
}

.search-input {
  height: 47px;
  padding: 0 42px 0 42px;
}

.search-bar svg {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
}

.search-clear {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
}

.filter-scroll {
  display: flex;
  margin: 0 -16px 15px;
  padding: 0 16px 3px;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-scroll::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  height: 34px;
  padding: 0 12px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  background: var(--surface);
  font-size: 10px;
  font-weight: 700;
}

.filter-chip.active {
  border-color: rgba(var(--accent-rgb), .45);
  color: var(--text);
  background: rgba(var(--accent-rgb), .13);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.meta-card {
  position: relative;
  min-height: 242px;
  padding: 13px;
  overflow: hidden;
  text-align: left;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 70% 5%, color-mix(in srgb, var(--deck-accent) 18%, transparent), transparent 43%),
    var(--surface);
}

.meta-art {
  display: flex;
  height: 114px;
  margin-bottom: 12px;
  align-items: flex-end;
  justify-content: center;
}

.meta-art img {
  width: 79px;
  max-height: 112px;
  border-radius: 6px;
  object-fit: cover;
  transform: rotate(3deg);
  filter: drop-shadow(0 12px 10px rgba(0, 0, 0, .45));
}

.meta-card h3 {
  margin-bottom: 3px;
  font-size: 13px;
  line-height: 1.15;
}

.meta-card p {
  margin-bottom: 10px;
  font-size: 9px;
}

.meta-card-stats {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

.meta-card-stats strong {
  display: block;
  color: var(--text);
  font-size: 11px;
}

.sort-row {
  display: flex;
  margin-bottom: 12px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sort-row > span {
  color: var(--muted);
  font-size: 10px;
}

.mini-select {
  height: 34px;
  padding: 0 29px 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background-color: var(--surface);
  font-size: 10px;
}

.deck-hero {
  position: relative;
  min-height: 246px;
  margin: 0 -16px;
  padding: 25px 18px 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 30%, color-mix(in srgb, var(--deck-accent) 35%, transparent), transparent 35%),
    linear-gradient(180deg, color-mix(in srgb, var(--deck-accent) 12%, transparent), transparent);
}

.deck-hero::after {
  position: absolute;
  right: -50px;
  bottom: -90px;
  width: 250px;
  height: 250px;
  content: "";
  border: 1px solid color-mix(in srgb, var(--deck-accent) 20%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 0 35px color-mix(in srgb, var(--deck-accent) 4%, transparent);
}

.deck-hero-copy {
  position: relative;
  z-index: 3;
  width: 60%;
}

.deck-hero h1 {
  margin: 8px 0 8px;
  font-size: 30px;
}

.deck-hero p {
  display: -webkit-box;
  margin-bottom: 15px;
  overflow: hidden;
  font-size: 11px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.deck-hero-art {
  position: absolute;
  z-index: 2;
  right: 13px;
  bottom: -17px;
  width: 132px;
  transform: rotate(6deg);
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .55));
}

.deck-hero-art img {
  width: 100%;
  border-radius: 8px;
  background: var(--surface-3);
}

.deck-total {
  display: inline-flex;
  height: 30px;
  padding: 0 10px;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  color: var(--muted);
  background: var(--surface-glass);
  font-size: 10px;
  font-weight: 700;
}

.deck-total strong {
  color: var(--text);
}

.deck-total.invalid {
  border-color: rgba(251, 113, 133, .4);
  color: var(--danger);
}

.deck-actions {
  display: grid;
  margin: 0 0 14px;
  grid-template-columns: 1fr 1fr 1fr 46px;
  gap: 8px;
}

.deck-actions button {
  padding-left: 8px;
  padding-right: 8px;
}

.tab-scroll {
  position: sticky;
  z-index: 20;
  top: calc(var(--topbar) + env(safe-area-inset-top) - 1px);
  display: flex;
  margin: 0 -16px 14px;
  padding: 8px 16px;
  gap: 5px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 87%, transparent);
  backdrop-filter: blur(18px);
  scrollbar-width: none;
}

.tab-scroll::-webkit-scrollbar {
  display: none;
}

.tab {
  height: 34px;
  padding: 0 12px;
  flex: 0 0 auto;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 730;
}

.tab.active {
  color: var(--text);
  background: var(--surface-3);
}

.validation-banner {
  display: flex;
  margin-bottom: 11px;
  padding: 12px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(52, 211, 153, .2);
  border-radius: 14px;
  background: rgba(52, 211, 153, .08);
}

.validation-banner.invalid {
  border-color: rgba(251, 113, 133, .2);
  background: rgba(251, 113, 133, .08);
}

.validation-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--good);
  background: rgba(52, 211, 153, .12);
  font-weight: 850;
}

.validation-banner.invalid .validation-icon {
  color: var(--danger);
  background: rgba(251, 113, 133, .12);
}

.validation-copy strong,
.validation-copy small {
  display: block;
}

.validation-copy strong {
  font-size: 11px;
}

.validation-copy small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
}

.category-block {
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}

.category-head {
  display: flex;
  height: 44px;
  padding: 0 13px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 760;
}

.category-count {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.card-row {
  display: grid;
  min-height: 62px;
  padding: 7px 9px;
  grid-template-columns: 35px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.card-row:last-child {
  border-bottom: 0;
}

.card-thumb {
  position: relative;
  width: 35px;
  height: 49px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background:
    linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .08), transparent 70%),
    var(--surface-3);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;
  transition: opacity .25s ease;
}

.card-thumb img.loaded {
  opacity: 1;
}

.card-row-copy {
  min-width: 0;
}

.card-row-copy strong,
.card-row-copy small {
  display: block;
}

.card-row-copy strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-row-copy small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.count-stepper {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-deep);
}

.count-stepper button {
  display: grid;
  width: 28px;
  height: 31px;
  place-items: center;
  color: var(--muted);
  background: transparent;
  font-size: 17px;
}

.count-stepper strong {
  width: 23px;
  text-align: center;
  font-size: 11px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.gallery-card {
  position: relative;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 9px;
  background: var(--surface-3);
  box-shadow: 0 7px 18px rgba(0, 0, 0, .25);
  aspect-ratio: .718;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;
  transition: opacity .3s ease, transform .3s var(--ease);
}

.gallery-card img.loaded {
  opacity: 1;
}

.gallery-card:active img {
  transform: scale(.97);
}

.gallery-count {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  color: #fff;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(8px);
  font-size: 10px;
  font-weight: 850;
}

.guide-hero {
  padding: 18px;
  border-left: 3px solid var(--deck-accent, var(--accent));
}

.guide-hero p {
  margin: 0;
  font-size: 12px;
}

.timeline {
  position: relative;
  margin: 17px 0 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: 13px;
  width: 1px;
  content: "";
  background: var(--line-strong);
}

.timeline li {
  position: relative;
  display: grid;
  min-height: 52px;
  padding-bottom: 12px;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline i {
  position: relative;
  z-index: 1;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), .35);
  border-radius: 50%;
  color: var(--accent-2);
  background: var(--surface-2);
  font-style: normal;
  font-size: 9px;
  font-weight: 850;
}

.sequence-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sequence-list li {
  display: flex;
  padding: 10px 0;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.sequence-list li:last-child {
  border-bottom: 0;
}

.sequence-list li::before {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  content: "✓";
  border-radius: 7px;
  color: var(--good);
  background: rgba(52, 211, 153, .1);
  font-size: 10px;
  font-weight: 800;
}

.matchup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.matchup-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.matchup-card.good {
  border-top-color: rgba(52, 211, 153, .45);
}

.matchup-card.bad {
  border-top-color: rgba(251, 113, 133, .45);
}

.matchup-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
}

.matchup-card span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.score-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.score-top {
  display: flex;
  margin-bottom: 8px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

.score-top strong {
  color: var(--text);
  font-size: 14px;
}

.bar {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-3);
}

.bar i {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.analytics-summary {
  display: grid;
  margin-bottom: 10px;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.analytics-stat {
  padding: 13px 8px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.analytics-stat strong,
.analytics-stat span {
  display: block;
}

.analytics-stat strong {
  color: var(--accent-2);
  font-size: 17px;
}

.analytics-stat span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.hand-grid {
  display: grid;
  margin-top: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.hand-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-3);
  aspect-ratio: .718;
}

.hand-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hand-card small {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 12px 4px 4px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .85));
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.distribution-row {
  display: grid;
  margin-top: 10px;
  grid-template-columns: 72px 1fr 34px;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 9px;
}

.distribution-row strong {
  color: var(--text);
  text-align: right;
  font-size: 10px;
}

.progress-wrap {
  margin-bottom: 16px;
}

.progress-copy {
  display: flex;
  margin-bottom: 7px;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.progress-copy span {
  color: var(--muted);
}

.progress-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-3);
}

.progress-bar i {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--good));
  transition: width .35s var(--ease);
}

.check-row {
  display: grid;
  min-height: 58px;
  padding: 7px 3px;
  grid-template-columns: 35px 1fr auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.check-row:last-child {
  border-bottom: 0;
}

.owned-step {
  display: flex;
  align-items: center;
  gap: 4px;
}

.owned-step button {
  display: grid;
  width: 26px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-3);
}

.owned-step strong {
  width: 21px;
  text-align: center;
  font-size: 10px;
}

.complete-row {
  opacity: .58;
}

.complete-row .card-row-copy strong {
  text-decoration: line-through;
}

.tool-tabs {
  display: grid;
  margin-bottom: 14px;
  padding: 4px;
  grid-auto-columns: minmax(74px, 1fr);
  grid-auto-flow: column;
  gap: 3px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-deep);
  scrollbar-width: none;
}

.tool-tabs::-webkit-scrollbar {
  display: none;
}

.tool-tab {
  min-height: 38px;
  padding: 0 4px;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 9px;
  font-weight: 730;
}

.tool-tab.active {
  color: var(--text);
  background: var(--surface-3);
}

.import-area {
  min-height: 180px;
  padding: 13px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  line-height: 1.55;
}

.result-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.result-list li {
  display: flex;
  padding: 8px 0;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.result-list li:last-child {
  border-bottom: 0;
}

.result-list i {
  font-style: normal;
}

.result-list .pass i {
  color: var(--good);
}

.result-list .fail i {
  color: var(--danger);
}

.result-list .warn i {
  color: var(--warn);
}

.compare-selects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.compare-table {
  width: 100%;
  margin-top: 13px;
  border-collapse: collapse;
}

.compare-table th,
.compare-table td {
  padding: 10px 5px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 10px;
}

.compare-table th:first-child,
.compare-table td:first-child {
  color: var(--muted);
  text-align: left;
}

.compare-table th {
  overflow: hidden;
  max-width: 110px;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.winner {
  color: var(--good);
  font-weight: 800;
}

.library-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.library-row {
  display: grid;
  min-height: 62px;
  padding: 7px 9px;
  grid-template-columns: 35px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.library-row:last-child {
  border-bottom: 0;
}

.add-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), .25);
  border-radius: 11px;
  color: var(--accent-2);
  background: rgba(var(--accent-rgb), .09);
  font-size: 18px;
}

.settings-group {
  margin-bottom: 13px;
  padding: 5px 15px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}

.accent-picker {
  display: flex;
  gap: 8px;
}

.accent-dot {
  width: 29px;
  height: 29px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--dot);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.accent-dot.active {
  box-shadow: 0 0 0 2px var(--text);
}

.empty-state {
  padding: 34px 20px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--muted);
}

.empty-state i {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  place-items: center;
  border-radius: 16px;
  color: var(--accent-2);
  background: rgba(var(--accent-rgb), .1);
  font-style: normal;
  font-size: 21px;
}

.empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.source-note {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--faint);
  background: var(--surface-glass);
  font-size: 9px;
}

.source-note a {
  color: var(--accent-2);
}

.bottom-nav {
  position: fixed;
  z-index: 60;
  bottom: 0;
  left: 50%;
  display: grid;
  width: min(100%, 680px);
  height: calc(var(--nav) + env(safe-area-inset-bottom));
  max-width: 100vw;
  padding: 6px max(6px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 2px;
  transform: translateX(-50%);
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(24px) saturate(155%);
}

.nav-item {
  position: relative;
  display: flex;
  min-width: 0;
  padding: 4px 1px;
  overflow: hidden;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  border-radius: 13px;
  color: var(--faint);
  background: transparent;
  font-size: 8px;
  font-weight: 700;
  transition: color .2s ease, background .2s ease, transform .2s var(--ease);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-item > span { display:-webkit-box; min-height:18px; max-width:100%; overflow:hidden; line-height:1.12; text-align:center; overflow-wrap:normal; word-break:normal; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2; }

.nav-item.active {
  color: var(--accent-2);
  background: rgba(var(--accent-rgb), .09);
}

.nav-item.active::before {
  position: absolute;
  top: 2px;
  width: 22px;
  height: 2px;
  content: "";
  border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 9px var(--accent);
}

.modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  visibility: hidden;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity .25s ease, visibility .25s ease;
}

.modal.open {
  visibility: visible;
  opacity: 1;
}

.modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(5px);
}

.modal-sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 680px);
  max-height: 91vh;
  max-height: 91dvh;
  padding: 10px 17px calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: 27px 27px 0 0;
  background: var(--surface-2);
  box-shadow: 0 -25px 70px rgba(0, 0, 0, .45);
  transform: translateY(105%);
  transition: transform .34s var(--ease);
}

.modal.open .modal-sheet {
  transform: translateY(0);
}

.sheet-handle {
  width: 42px;
  height: 4px;
  margin: 0 auto 16px;
  border-radius: 99px;
  background: var(--line-strong);
}

.sheet-head {
  display: flex;
  margin-bottom: 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sheet-head h2 {
  margin: 0;
  font-size: 20px;
}

.close-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface-3);
  font-size: 19px;
}

.card-modal-art {
  display: block;
  width: min(82%, 370px);
  margin: 0 auto 17px;
  border-radius: 12px;
  background: var(--surface-3);
  box-shadow: 0 22px 45px rgba(0, 0, 0, .4);
}

.card-modal-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.card-modal-meta div {
  padding: 11px 8px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.card-modal-meta strong,
.card-modal-meta small {
  display: block;
}

.card-modal-meta small {
  color: var(--muted);
  font-size: 8px;
}

.export-box {
  width: 100%;
  min-height: 330px;
  padding: 13px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--text);
  background: var(--bg-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  line-height: 1.5;
}

.format-marks {
  display: grid;
  margin: 13px 0;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.format-mark {
  display: grid;
  height: 62px;
  place-items: center;
  border: 1px solid rgba(52, 211, 153, .25);
  border-radius: 16px;
  color: var(--good);
  background: rgba(52, 211, 153, .08);
  font-size: 21px;
  font-weight: 900;
}

.toast {
  position: fixed;
  z-index: 150;
  right: 50%;
  bottom: calc(var(--nav) + env(safe-area-inset-bottom) + 14px);
  display: flex;
  visibility: hidden;
  min-width: 170px;
  max-width: min(90%, 420px);
  min-height: 43px;
  padding: 10px 14px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--text);
  background: rgba(23, 27, 41, .96);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(50%, 10px);
  backdrop-filter: blur(15px);
  font-size: 11px;
  font-weight: 680;
  transition: opacity .22s ease, transform .22s var(--ease), visibility .22s ease;
}

.toast.show {
  visibility: visible;
  opacity: 1;
  transform: translate(50%, 0);
}

.splash {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at center, rgba(var(--accent-rgb), .17), transparent 35%),
    var(--bg-deep);
  transition: opacity .5s ease, visibility .5s ease;
}

.splash.hidden {
  visibility: hidden;
  opacity: 0;
}

.splash-orbit {
  position: relative;
  display: grid;
  width: 95px;
  height: 95px;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), .15);
  border-radius: 50%;
  animation: orbit 4s linear infinite;
}

.splash-orbit::after {
  position: absolute;
  top: 5px;
  width: 8px;
  height: 8px;
  content: "";
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 13px var(--accent);
}

.brand-mark--large {
  width: 59px;
  height: 59px;
}

.brand-mark--large::before {
  height: 10px;
}

.brand-mark--large::after {
  width: 17px;
  height: 17px;
  border-width: 4px;
}

.splash-copy {
  margin-top: 19px;
  text-align: center;
}

.splash-copy strong,
.splash-copy small {
  display: block;
}

.splash-copy strong {
  font-size: 22px;
  letter-spacing: -.5px;
}

.splash-copy em {
  color: var(--accent-2);
  font-style: normal;
}

.splash-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.thinking {
  padding: 21px 0 9px;
  text-align: center;
}

.thinking-orb {
  position: relative;
  width: 74px;
  height: 74px;
  margin: 0 auto 17px;
  border: 1px solid rgba(var(--accent-rgb), .25);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), .3), transparent 65%);
  animation: orbit 2s linear infinite;
}

.thinking-orb::before,
.thinking-orb::after {
  position: absolute;
  content: "";
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent);
}

.thinking-orb::before {
  top: 4px;
  left: 31px;
  width: 8px;
  height: 8px;
}

.thinking-orb::after {
  right: 4px;
  bottom: 15px;
  width: 5px;
  height: 5px;
}

.thinking-steps {
  margin: 15px 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.thinking-steps li {
  display: flex;
  padding: 9px 4px;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.thinking-steps i {
  color: var(--good);
  font-style: normal;
}

.generated-result {
  padding: 15px;
  border: 1px solid rgba(var(--accent-rgb), .25);
  border-radius: 16px;
  background: rgba(var(--accent-rgb), .08);
}

.generated-result strong {
  color: var(--accent-2);
}

.generated-reasons {
  margin: 11px 0 0;
  padding-left: 17px;
  color: var(--muted);
  font-size: 10px;
}

.generated-reasons li {
  margin-top: 5px;
}

.synergy-quick {
  border-color: rgba(56, 189, 248, .25);
  background:
    radial-gradient(circle at 100% 100%, rgba(56, 189, 248, .16), transparent 54%),
    var(--surface);
}

.synergy-button {
  display: grid;
  min-height: 76px;
  margin-top: 10px;
  padding: 13px 15px;
  grid-template-columns: 38px 1fr;
  align-items: center;
  column-gap: 11px;
  text-align: left;
  border: 1px solid rgba(56, 189, 248, .27);
  border-radius: 17px;
  color: var(--text);
  background:
    radial-gradient(circle at 0 50%, rgba(56, 189, 248, .14), transparent 38%),
    var(--surface);
}

.synergy-button > span {
  display: grid;
  width: 38px;
  height: 38px;
  grid-row: 1 / 3;
  place-items: center;
  border-radius: 12px;
  color: #7dd3fc;
  background: rgba(56, 189, 248, .12);
  font-size: 22px;
}

.synergy-button strong,
.synergy-button small {
  display: block;
}

.synergy-button strong {
  align-self: end;
  font-size: 13px;
}

.synergy-button small {
  align-self: start;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.set-preview-row,
.set-strip {
  display: grid;
  margin-right: -16px;
  margin-left: -16px;
  padding: 2px 16px 12px;
  grid-auto-flow: column;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.set-preview-row {
  grid-auto-columns: minmax(178px, 53%);
}

.set-strip {
  grid-auto-columns: minmax(210px, 64%);
  margin-bottom: 12px;
}

.set-preview-row::-webkit-scrollbar,
.set-strip::-webkit-scrollbar {
  display: none;
}

.set-preview {
  display: grid;
  min-height: 118px;
  padding: 13px;
  scroll-snap-align: start;
  align-content: end;
  text-align: left;
  border: 1px solid color-mix(in srgb, var(--set-accent) 32%, var(--line));
  border-radius: 17px;
  color: var(--text);
  background:
    radial-gradient(circle at 85% 0, color-mix(in srgb, var(--set-accent) 28%, transparent), transparent 50%),
    var(--surface);
}

.set-logo-frame {
  position: relative;
  display: grid;
  min-width: 0;
  place-items: center;
}

.set-logo-frame > img,
.set-logo-frame > .set-logo-fallback {
  grid-area: 1 / 1;
}

.set-logo-frame > img {
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity .2s ease;
}

.set-logo-frame.logo-loaded > img { opacity: 1; }
.set-logo-frame.logo-loaded > .set-logo-fallback { opacity: 0; }

.set-logo-fallback {
  display: grid;
  width: 100%;
  min-height: 40px;
  padding: 5px 7px;
  place-content: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--set-accent, var(--accent)) 38%, var(--line));
  border-radius: 10px;
  color: var(--text);
  background: linear-gradient(135deg, color-mix(in srgb, var(--set-accent, var(--accent)) 23%, var(--surface-3)), var(--surface-2));
  text-align: center;
  transition: opacity .2s ease;
}

.set-logo-fallback b,
.set-logo-fallback small { display: block; }
.set-logo-fallback b { font-size: 12px; letter-spacing: .08em; }
.set-logo-fallback small { margin-top: 1px; overflow: hidden; color: var(--muted); font-size: 6px; text-overflow: ellipsis; white-space: nowrap; }

.set-preview img {
  width: 105px;
  height: 43px;
  margin-bottom: 9px;
  object-fit: contain;
  object-position: left center;
}

.set-preview .set-logo-frame { width: 105px; margin-bottom: 9px; }
.set-preview .set-logo-frame img { margin-bottom: 0; }

.set-preview strong,
.set-preview small {
  display: block;
}

.set-preview strong {
  font-size: 12px;
}

.set-preview small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.collector-dashboard {
  display: grid;
  margin-bottom: 15px;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.collector-dashboard > div {
  padding: 11px 5px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-glass);
}

.collector-dashboard strong,
.collector-dashboard span {
  display: block;
}

.collector-dashboard strong {
  color: var(--accent-2);
  font-size: 16px;
}

.collector-dashboard span {
  overflow: hidden;
  color: var(--muted);
  font-size: 7px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.set-chip-card {
  display: grid;
  min-height: 65px;
  padding: 9px 11px;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  scroll-snap-align: start;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--text);
  background: var(--surface);
  opacity: .72;
}

.set-chip-card.active {
  border-color: color-mix(in srgb, var(--set-accent) 60%, white 8%);
  box-shadow: inset 0 0 24px color-mix(in srgb, var(--set-accent) 12%, transparent);
  opacity: 1;
}

.set-chip-card img {
  width: 62px;
  height: 40px;
  object-fit: contain;
}

.set-chip-card .set-logo-frame { width: 62px; }

.set-chip-card strong,
.set-chip-card small {
  display: block;
}

.set-chip-card strong {
  font-size: 10px;
}

.set-chip-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.set-hero {
  position: relative;
  display: grid;
  min-height: 182px;
  padding: 17px;
  grid-template-columns: 35% minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--set-accent) 40%, var(--line));
  border-radius: 24px;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--set-accent-2) 20%, transparent), transparent 46%),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--set-accent) 18%, transparent), transparent 44%),
    var(--surface);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .18);
}

.set-hero-logo {
  display: grid;
  min-height: 115px;
  padding: 10px;
  place-items: center;
  border-radius: 17px;
  background: rgba(255, 255, 255, .055);
}

.set-hero-logo img {
  width: 100%;
  max-height: 88px;
  object-fit: contain;
}

.set-hero-logo .set-logo-frame { width: 100%; }
.set-hero-logo .set-logo-fallback { min-height: 82px; }
.set-hero-logo .set-logo-fallback b { font-size: clamp(18px, 4vw, 32px); }
.set-hero-logo .set-logo-fallback small { font-size: 9px; }

.set-hero-copy {
  min-width: 0;
}

.set-hero-copy h2 {
  margin: 8px 0 4px;
  font-size: 22px;
  line-height: 1.05;
}

.set-hero-copy p,
.set-hero-copy small {
  margin: 0;
  color: var(--muted);
  font-size: 8px;
}

.status-pill {
  display: inline-flex;
  min-height: 23px;
  padding: 0 8px;
  align-items: center;
  border: 1px solid rgba(52, 211, 153, .26);
  border-radius: 99px;
  color: var(--good);
  background: rgba(52, 211, 153, .09);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.status-pill.upcoming {
  border-color: rgba(251, 191, 36, .28);
  color: var(--warn);
  background: rgba(251, 191, 36, .09);
}

.collection-progress {
  height: 6px;
  margin: 13px 0 6px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-3);
}

.collection-progress span {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--set-accent), var(--set-accent-2));
  transition: width .35s var(--ease);
}

.legality-note {
  display: grid;
  margin: 12px 0;
  padding: 11px;
  grid-template-columns: 27px 1fr;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(251, 191, 36, .2);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(251, 191, 36, .06);
  font-size: 9px;
}

.legality-note i {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 9px;
  color: var(--warn);
  background: rgba(251, 191, 36, .11);
  font-style: normal;
}

.legality-note strong {
  color: var(--text);
}

.set-search {
  margin-top: 14px;
}

.set-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.set-card-tile {
  position: relative;
  min-width: 0;
  padding: 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  transition: transform .2s var(--ease), border-color .2s ease, opacity .2s ease;
}

.set-card-tile.owned {
  border-color: rgba(52, 211, 153, .4);
}

.set-card-tile.favorite::before {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  display: grid;
  width: 23px;
  height: 23px;
  content: "★";
  place-items: center;
  border-radius: 50%;
  color: #fde047;
  background: rgba(9, 11, 18, .82);
  font-size: 12px;
}

.set-card-image {
  display: block;
  width: 100%;
  padding: 0;
  aspect-ratio: .718;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-3);
}

.set-card-image img {
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;
  transition: opacity .22s ease, transform .25s var(--ease);
}

.set-card-image img.loaded {
  opacity: 1;
}

.set-card-tile:active {
  transform: scale(.98);
}

.set-card-tile.owned .set-card-image img {
  filter: saturate(1.04);
}

.set-card-meta {
  display: grid;
  min-height: 47px;
  padding: 8px 2px 1px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
}

.set-card-meta strong,
.set-card-meta small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.set-card-meta strong {
  font-size: 9px;
}

.set-card-meta small {
  color: var(--muted);
  font-size: 8px;
}

.set-owned-toggle {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface-3);
  font-size: 15px;
}

.set-owned-toggle.on {
  border-color: rgba(52, 211, 153, .35);
  color: var(--good);
  background: rgba(52, 211, 153, .1);
}

.load-more {
  margin-top: 13px;
}

.set-card-modal-art {
  width: min(280px, 82%);
  margin: 6px auto 15px;
  aspect-ratio: .718;
  overflow: hidden;
  border-radius: 15px;
  background: var(--surface-3);
  box-shadow: 0 22px 46px rgba(0, 0, 0, .45);
}

.set-card-modal-art img {
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;
  transition: opacity .25s ease;
}

.set-card-modal-art img.loaded {
  opacity: 1;
}

.set-modal-status {
  display: flex;
  margin-bottom: 13px;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  color: var(--muted);
  font-size: 9px;
}

.toolkit-lead {
  background:
    radial-gradient(circle at 100% 0, rgba(var(--accent-rgb), .2), transparent 45%),
    var(--surface);
}

.toolkit-lead h2,
.update-hero h2 {
  margin: 8px 0 6px;
}

.update-hero {
  background:
    radial-gradient(circle at 100% 0, rgba(52, 211, 153, .15), transparent 45%),
    var(--surface);
}

.update-facts {
  display: grid;
  margin-top: 15px;
  gap: 7px;
}

.update-facts > div {
  display: grid;
  padding: 10px;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-glass);
}

.update-facts strong {
  color: var(--accent-2);
  font-size: 9px;
  text-transform: uppercase;
}

.update-facts span {
  color: var(--muted);
  font-size: 9px;
}

.update-prompt {
  min-height: 290px;
  margin-bottom: 10px;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% { opacity: 1; }
  50% { opacity: .45; }
}

@keyframes card-float {
  0%,
  100% { transform: rotate(8deg) translateY(0); }
  50% { transform: rotate(6deg) translateY(-8px); }
}

@keyframes shine {
  0% { left: -45%; }
  50%,
  100% { left: 125%; }
}

@keyframes orbit {
  to { transform: rotate(360deg); }
}

@media (min-width: 540px) {
  .quick-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .meta-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .set-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 365px) {
  .app-view {
    padding-right: 12px;
    padding-left: 12px;
  }

  .horizontal-scroll,
  .filter-scroll {
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .hero-content {
    width: 70%;
  }

  .hero-art {
    right: -25px;
    width: 45%;
  }

  .hero-stats {
    display: none;
  }

  .deck-hero h1 {
    font-size: 26px;
  }

  .segmented.four {
    grid-template-columns: repeat(2, 1fr);
  }

  .bottom-nav {
    padding-right: 5px;
    padding-left: 5px;
  }

  .nav-item {
    font-size: 7px;
  }

  .nav-item svg {
    width: 18px;
    height: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .01ms !important;
}

.install-section {
  margin-top: 18px;
}

.install-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  padding: 14px;
  align-items: center;
  gap: 13px;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), .26);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 0 0, rgba(var(--accent-rgb), .2), transparent 50%),
    var(--surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .15);
}

.install-card img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(var(--accent-rgb), .24);
}

.install-copy {
  min-width: 0;
}

.install-copy strong,
.install-copy small {
  display: block;
}

.install-copy strong {
  margin-top: 2px;
  font-size: 13px;
}

.install-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.install-button {
  min-height: 38px;
  padding-right: 14px;
  padding-left: 14px;
}

.instruction-list {
  display: grid;
  margin: 16px 0;
  padding-left: 26px;
  gap: 12px;
  color: var(--muted);
}

.instruction-list li {
  padding-left: 4px;
}

.instruction-list strong {
  color: var(--text);
}

.install-tip {
  display: grid;
  padding: 13px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
}

.install-tip strong {
  color: var(--good);
  font-size: 11px;
}

.install-tip span {
  color: var(--muted);
  font-size: 10px;
}

@media (max-width: 430px) {
  .install-card {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .install-card img {
    width: 50px;
    height: 50px;
  }

  .install-button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

/* DeckForge 60 v1.3 themes */
body[data-theme="aurora"] {
  --bg: #07151a;
  --bg-deep: #030b10;
  --surface: rgba(12, 35, 40, .9);
  --surface-2: #0d272f;
  --surface-3: #12333c;
  --surface-glass: rgba(9, 29, 35, .76);
  --line: rgba(106, 236, 220, .13);
  --line-strong: rgba(106, 236, 220, .25);
  --text: #edfffd;
  --muted: #8fb9bb;
  --faint: #60898c;
  --accent: #22d3ee;
  --accent-rgb: 34, 211, 238;
  --accent-2: #f472b6;
}

body[data-theme="neon"] {
  --bg: #041017;
  --bg-deep: #01070c;
  --surface: rgba(5, 24, 31, .94);
  --surface-2: #071c26;
  --surface-3: #0b2833;
  --surface-glass: rgba(4, 20, 28, .8);
  --line: rgba(0, 245, 212, .15);
  --line-strong: rgba(0, 245, 212, .33);
  --text: #effffc;
  --muted: #86aaa9;
  --faint: #557877;
  --accent: #00f5d4;
  --accent-rgb: 0, 245, 212;
  --accent-2: #38bdf8;
  --shadow: 0 20px 65px rgba(0, 245, 212, .09);
}

body[data-theme="ember"] {
  --bg: #160b08;
  --bg-deep: #090403;
  --surface: rgba(42, 18, 12, .93);
  --surface-2: #35180f;
  --surface-3: #472116;
  --surface-glass: rgba(36, 14, 9, .79);
  --line: rgba(255, 165, 93, .14);
  --line-strong: rgba(255, 165, 93, .28);
  --text: #fff8f2;
  --muted: #c5a08c;
  --faint: #8c6958;
  --accent: #fb6a31;
  --accent-rgb: 251, 106, 49;
  --accent-2: #fbbf24;
}

body[data-theme="ocean"] {
  --bg: #061522;
  --bg-deep: #020912;
  --surface: rgba(8, 32, 52, .93);
  --surface-2: #0b2942;
  --surface-3: #103650;
  --surface-glass: rgba(6, 27, 45, .78);
  --line: rgba(94, 214, 255, .13);
  --line-strong: rgba(94, 214, 255, .27);
  --text: #effaff;
  --muted: #8fb7ca;
  --faint: #587f92;
  --accent: #38bdf8;
  --accent-rgb: 56, 189, 248;
  --accent-2: #2dd4bf;
}

body[data-theme="forest"] {
  --bg: #09140c;
  --bg-deep: #040904;
  --surface: rgba(17, 40, 22, .93);
  --surface-2: #142d19;
  --surface-3: #1b3b22;
  --surface-glass: rgba(13, 34, 17, .79);
  --line: rgba(173, 255, 111, .12);
  --line-strong: rgba(173, 255, 111, .25);
  --text: #f4ffef;
  --muted: #a2b99e;
  --faint: #6d8669;
  --accent: #65a30d;
  --accent-rgb: 101, 163, 13;
  --accent-2: #bef264;
}

body[data-theme="royal"] {
  --bg: #100d22;
  --bg-deep: #060510;
  --surface: rgba(27, 22, 58, .94);
  --surface-2: #211a47;
  --surface-3: #2c245c;
  --surface-glass: rgba(22, 17, 48, .8);
  --line: rgba(228, 200, 103, .14);
  --line-strong: rgba(228, 200, 103, .29);
  --text: #fffdf3;
  --muted: #b6accb;
  --faint: #7d7397;
  --accent: #d4af37;
  --accent-rgb: 212, 175, 55;
  --accent-2: #f5df8c;
}

body[data-theme="eink"] {
  --bg: #efeee8;
  --bg-deep: #d9d8d1;
  --surface: #f8f7f1;
  --surface-2: #ffffff;
  --surface-3: #e4e3dc;
  --surface-glass: rgba(248, 247, 241, .96);
  --line: rgba(20, 20, 18, .18);
  --line-strong: rgba(20, 20, 18, .42);
  --text: #161613;
  --muted: #55554e;
  --faint: #7a7970;
  --accent: #22221e;
  --accent-rgb: 34, 34, 30;
  --accent-2: #64635b;
  --good: #243c24;
  --warn: #5b4918;
  --danger: #5d2525;
  --info: #273c4c;
  --shadow: none;
  color-scheme: light;
}

body[data-theme="eink"] .ambient {
  display: none;
}

body[data-theme="eink"] .topbar,
body[data-theme="eink"] .bottom-nav,
body[data-theme="eink"] .modal-sheet {
  backdrop-filter: none;
}

body[data-theme="eink"] *,
body[data-theme="eink"] *::before,
body[data-theme="eink"] *::after {
  animation-duration: .01ms !important;
  transition-duration: .08s !important;
}

body[data-theme="eink"] .card,
body[data-theme="eink"] .panel,
body[data-theme="eink"] .quick-card,
body[data-theme="eink"] .meta-card,
body[data-theme="eink"] .set-card-tile {
  box-shadow: none !important;
}

.dynamic-deck-theme .ambient-one {
  background: var(--deck-live);
  opacity: .16;
}

.dynamic-deck-theme .deck-hero {
  border-color: color-mix(in srgb, var(--deck-live) 50%, var(--line));
  background:
    radial-gradient(circle at 84% 12%, color-mix(in srgb, var(--deck-live) 31%, transparent), transparent 42%),
    var(--surface);
}

.theme-ripple {
  position: fixed;
  z-index: 1000;
  width: 22px;
  height: 22px;
  pointer-events: none;
  border-radius: 50%;
  background: var(--ripple-color);
  opacity: .48;
  transform: translate(-50%, -50%) scale(0);
  mix-blend-mode: screen;
}

.theme-ripple.run {
  animation: theme-ripple .74s var(--ease) both;
}

@keyframes theme-ripple {
  0% { opacity: .52; transform: translate(-50%, -50%) scale(0); }
  70% { opacity: .14; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(115); }
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.theme-grid.compact {
  margin-top: 14px;
}

.theme-card {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  min-height: 68px;
  padding: 11px;
  align-items: center;
  gap: 9px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.theme-card.active {
  border-color: var(--theme-swatch);
  box-shadow: inset 0 0 0 1px var(--theme-swatch);
}

.theme-card > i {
  width: 28px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 9px;
  background:
    radial-gradient(circle at 25% 15%, #fff, transparent 38%),
    linear-gradient(145deg, var(--theme-swatch), #0b0c12);
}

.theme-card span,
.theme-card strong,
.theme-card small {
  display: block;
}

.theme-card strong {
  font-size: 11px;
}

.theme-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
}

.theme-card > b {
  color: var(--theme-swatch);
}

.dashboard-heading {
  display: flex;
  margin: 22px 0 6px;
  padding: 0 2px;
  align-items: end;
  justify-content: space-between;
}

.dashboard-heading span,
.dashboard-heading strong,
.dashboard-heading small {
  display: block;
}

.dashboard-heading small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.dashboard-widget {
  animation: widget-enter .42s var(--ease) both;
}

@keyframes widget-enter {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

.dashboard-editor {
  display: grid;
  margin: 14px 0;
  gap: 8px;
}

.dashboard-editor-row {
  display: flex;
  min-height: 54px;
  padding: 8px 10px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.dashboard-editor-row > span,
.dashboard-editor-row > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-editor-row > span i,
.dashboard-mini-list i {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 8px;
  color: var(--accent-2);
  background: rgba(var(--accent-rgb), .12);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.dashboard-editor-row > div > button:not(.switch) {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-3);
}

.dashboard-mini-list {
  display: grid;
  gap: 6px;
}

.dashboard-mini-list > div {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  padding: 7px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
}

.dashboard-mini-list small {
  color: var(--good);
  font-size: 8px;
}

.dashboard-mini-list .hidden-widget {
  opacity: .5;
}

.dashboard-mini-list .hidden-widget small {
  color: var(--muted);
}

.playbook-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--deck-accent) 45%, var(--line));
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 80% 0, color-mix(in srgb, var(--deck-accent) 25%, transparent), transparent 45%),
    var(--surface);
}

.playbook-board {
  position: relative;
  height: 290px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, transparent 49.6%, var(--line) 50%, transparent 50.4%),
    linear-gradient(0deg, transparent 49.6%, var(--line) 50%, transparent 50.4%),
    color-mix(in srgb, var(--surface-2) 89%, var(--deck-accent));
}

.playbook-board::after {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 122px;
  height: 122px;
  content: "";
  border: 1px solid color-mix(in srgb, var(--deck-accent) 55%, transparent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.board-zone.active {
  position: absolute;
  z-index: 2;
  top: 43px;
  left: 50%;
  width: 94px;
  transform: translateX(-50%);
}

.board-zone span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.board-zone img {
  width: 94px;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .34);
}

.board-bench {
  position: absolute;
  z-index: 2;
  bottom: 18px;
  left: 50%;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.board-bench img {
  width: 45px;
  border-radius: 5px;
  transform: rotate(-2deg);
}

.board-bench span:nth-child(2) img {
  transform: translateY(-5px);
}

.board-prizes {
  position: absolute;
  top: 82px;
  right: 20px;
  display: grid;
  grid-template-columns: repeat(2, 21px);
  gap: 5px;
}

.board-prizes i {
  width: 21px;
  height: 31px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: linear-gradient(145deg, var(--deck-accent), var(--surface-3));
}

.playbook-pulse {
  position: absolute;
  z-index: 1;
  top: calc(40% + var(--step) * 3%);
  left: 50%;
  width: 160px;
  height: 160px;
  border: 2px solid var(--deck-accent);
  border-radius: 50%;
  opacity: .24;
  transform: translate(-50%, -50%);
  animation: playbook-pulse 1.6s ease-out infinite;
}

@keyframes playbook-pulse {
  from { opacity: .35; transform: translate(-50%, -50%) scale(.45); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(1.25); }
}

.playbook-copy {
  min-height: 165px;
  padding: 20px;
  animation: playbook-copy .38s var(--ease) both;
}

@keyframes playbook-copy {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: translateX(0); }
}

.playbook-copy h2 {
  margin: 5px 0 8px;
}

.playbook-copy p {
  margin: 0;
  color: var(--muted);
}

.playbook-progress {
  display: flex;
  margin: 15px 0 10px;
  gap: 6px;
}

.playbook-progress button {
  height: 5px;
  flex: 1;
  border-radius: 99px;
  background: var(--surface-3);
}

.playbook-progress button.active {
  background: var(--accent);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), .4);
}

.playbook-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.playbook-controls .ghost-button {
  grid-column: 1 / -1;
}

.playbook-note {
  display: grid;
  margin-top: 12px;
  gap: 4px;
}

.playbook-note span {
  color: var(--muted);
  font-size: 10px;
}

.synergy-panel {
  padding: 16px;
}

.synergy-map {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--deck-accent) 20%, transparent), transparent 28%),
    radial-gradient(circle, var(--surface-3) 0 1px, transparent 1.5px) 0 0 / 14px 14px,
    var(--surface-2);
}

.synergy-map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.synergy-map line {
  stroke: var(--deck-accent);
  stroke-width: .8;
  stroke-dasharray: 3 2;
  opacity: .7;
  animation: synergy-dash 6s linear infinite;
}

.synergy-map .secondary-edge {
  stroke-width: .35;
  opacity: .24;
}

@keyframes synergy-dash {
  to { stroke-dashoffset: -40; }
}

.synergy-node {
  position: absolute;
  z-index: 2;
  top: var(--y);
  left: var(--x);
  display: grid;
  width: 74px;
  min-height: 48px;
  padding: 6px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  transform: translate(-50%, -50%);
}

.synergy-node span {
  max-width: 64px;
  overflow: hidden;
  font-size: 8px;
  font-weight: 750;
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
}

.synergy-node small {
  color: var(--muted);
  font-size: 7px;
}

.synergy-node.hero-node {
  width: 90px;
  min-height: 60px;
  border-color: var(--deck-accent);
  background: color-mix(in srgb, var(--surface) 78%, var(--deck-accent));
}

.synergy-node.selected {
  border-color: var(--deck-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--deck-accent) 20%, transparent), 0 10px 30px rgba(0, 0, 0, .28);
}

.synergy-inspector {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  min-height: 68px;
  padding: 8px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.synergy-mini-art img {
  width: 46px;
  border-radius: 5px;
}

.synergy-inspector span,
.synergy-inspector strong,
.synergy-inspector small {
  display: block;
}

.synergy-inspector small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.synergy-key {
  margin-top: 12px;
}

.synergy-key p {
  margin-bottom: 0;
}

.share-studio {
  display: grid;
  grid-template-columns: 152px minmax(0, 1fr);
  padding: 14px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.qr-card {
  display: grid;
  width: 152px;
  min-height: 152px;
  padding: 9px;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  color: #111;
  background: #fff;
}

.qr-card svg {
  width: 100%;
  height: auto;
}

.qr-fallback {
  color: #222;
  font-size: 10px;
  text-align: center;
}

.share-copy strong,
.share-copy small {
  display: block;
}

.share-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.share-action-grid,
.tool-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
  gap: 9px;
}

.share-action-grid button,
.tool-card-grid > button {
  display: grid;
  min-height: 108px;
  padding: 13px;
  gap: 3px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.tool-card-grid > button {
  grid-template-columns: 42px minmax(0, 1fr);
  align-content: center;
  align-items: center;
  gap: 10px;
}

.share-action-grid i,
.tool-card-grid i {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  color: var(--accent-2);
  background: rgba(var(--accent-rgb), .13);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.share-action-grid strong,
.share-action-grid small,
.tool-card-grid strong,
.tool-card-grid small {
  display: block;
}

.share-action-grid strong,
.tool-card-grid strong {
  font-size: 11px;
}

.share-action-grid small,
.tool-card-grid small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.compact-section {
  margin-top: 14px;
}

.deck-palette {
  display: flex;
  gap: 9px;
}

.deck-palette button {
  width: 34px;
  height: 34px;
  border: 3px solid var(--surface-2);
  border-radius: 50%;
  background: var(--deck-color);
  box-shadow: 0 0 0 1px var(--line);
}

.deck-palette button.active {
  box-shadow: 0 0 0 2px var(--text);
}

.converter-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 12px;
  align-items: center;
  gap: 10px;
}

.converter-preview strong,
.converter-preview small {
  display: block;
}

.converter-preview small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.share-url-box {
  min-height: 64px;
  max-height: 90px;
  margin-top: 12px;
  font-size: 8px;
}

.conversion-list {
  display: grid;
  margin: 14px 0;
  gap: 7px;
}

.conversion-list > div {
  display: flex;
  padding: 10px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.conversion-list span,
.conversion-list strong,
.conversion-list small {
  display: block;
}

.conversion-list small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.conversion-list b {
  color: var(--good);
  white-space: nowrap;
}

.shared-deck-preview {
  display: grid;
  margin: 10px 0;
  padding: 18px;
  gap: 3px;
  border: 1px solid color-mix(in srgb, var(--deck-accent) 60%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 83%, var(--deck-accent));
}

.shared-deck-preview strong {
  font-size: 25px;
}

.shared-deck-preview span {
  color: var(--muted);
  font-size: 10px;
}

.doctor-report {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(56, 189, 248, .28);
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, .07);
}

.doctor-report > strong {
  color: var(--info);
}

.doctor-report ul {
  display: grid;
  margin: 8px 0;
  padding-left: 18px;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
}

.trade-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 14px 0;
  gap: 10px;
}

.trade-input-grid label {
  display: grid;
  gap: 6px;
}

.trade-input-grid textarea {
  min-height: 145px;
}

.trade-result {
  margin-top: 13px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.trade-result.favorable {
  border-color: rgba(52, 211, 153, .32);
}

.trade-result.unfavorable {
  border-color: rgba(251, 113, 133, .32);
}

.trade-verdict {
  display: flex;
  padding-bottom: 12px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.trade-verdict i {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: var(--good);
  background: rgba(52, 211, 153, .12);
  font-size: 21px;
  font-style: normal;
}

.trade-result.unfavorable .trade-verdict i {
  color: var(--danger);
  background: rgba(251, 113, 133, .12);
}

.trade-verdict strong,
.trade-verdict small {
  display: block;
}

.trade-verdict small {
  margin-top: 2px;
  color: var(--muted);
}

.trade-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
  gap: 10px;
}

.trade-columns h3 {
  margin: 0 0 7px;
  font-size: 11px;
}

.trade-columns > div > div {
  display: flex;
  padding: 7px 0;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.trade-columns span,
.trade-columns strong,
.trade-columns small {
  display: block;
}

.trade-columns strong {
  font-size: 9px;
}

.trade-columns small {
  color: var(--muted);
  font-size: 7px;
}

.trade-columns b {
  font-size: 9px;
}

.trade-empty {
  color: var(--muted);
  font-size: 9px;
}

.data-hero {
  margin-bottom: 12px;
}

.data-stats {
  margin-top: 14px;
}

.device-sync-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  margin-top: 12px;
  align-items: center;
  gap: 10px;
}

.device-sync-card > i {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  color: var(--accent-2);
  background: rgba(var(--accent-rgb), .13);
  font-size: 20px;
  font-style: normal;
}

.device-sync-card strong,
.device-sync-card small {
  display: block;
}

.device-sync-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.device-sync-card button {
  grid-column: 1 / -1;
}

.set-year-filter {
  margin: 14px 0 10px;
}

@media (max-width: 430px) {
  .theme-grid {
    grid-template-columns: 1fr;
  }

  .deck-actions {
    grid-template-columns: 1fr 1fr;
  }

  .share-studio {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .qr-card {
    width: 116px;
    min-height: 116px;
  }

  .trade-input-grid,
  .trade-columns {
    grid-template-columns: 1fr;
  }

  .synergy-node {
    width: 62px;
    min-height: 44px;
  }

  .synergy-node.hero-node {
    width: 80px;
  }
}

@media (max-width: 355px) {
  .share-studio {
    grid-template-columns: 1fr;
  }

  .qr-card {
    width: 150px;
    min-height: 150px;
    margin: 0 auto;
  }

  .share-action-grid,
  .tool-card-grid {
    grid-template-columns: 1fr;
  }
}

/* N's DeckForge v1.4 visual system */
.brand-mark::before,
.brand-mark::after {
  display: none;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.brand-mark--large img {
  width: 100%;
  height: 100%;
}

.forge-action-grid {
  display: grid;
  margin-top: 14px;
  grid-template-columns: minmax(0, 1.45fr) minmax(135px, .8fr);
  gap: 10px;
}

.forge-action-grid > button {
  min-height: 54px;
}

.surprise-button {
  position: relative;
  display: flex;
  padding: 0 17px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), .48);
  border-radius: var(--radius-sm);
  color: var(--text);
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 255, 255, .19), transparent 30%),
    linear-gradient(135deg, rgba(var(--accent-rgb), .23), var(--surface-2));
  box-shadow: inset 0 0 24px rgba(var(--accent-rgb), .09), 0 0 25px rgba(var(--accent-rgb), .12);
}

.surprise-button span {
  color: var(--accent-2);
  font-size: 20px;
  filter: drop-shadow(0 0 8px var(--accent));
  animation: surprise-star 2s ease-in-out infinite;
}

.confetti-layer {
  position: fixed;
  z-index: 1200;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti-layer i {
  position: absolute;
  top: -8vh;
  left: var(--x);
  width: 8px;
  height: 15px;
  border-radius: 2px;
  background: var(--confetti);
  box-shadow: 0 0 12px color-mix(in srgb, var(--confetti) 65%, transparent);
  animation: confetti-fall 1.55s cubic-bezier(.12, .65, .3, 1) var(--delay) both;
}

.surprise-result {
  display: grid;
  min-height: 190px;
  margin-bottom: 14px;
  padding: 16px;
  grid-template-columns: 126px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--deck-accent) 62%, var(--line));
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 12% 20%, color-mix(in srgb, var(--deck-accent) 27%, transparent), transparent 43%),
    var(--surface);
  box-shadow: 0 0 30px color-mix(in srgb, var(--deck-accent) 16%, transparent);
}

.surprise-result img {
  width: 112px;
  border-radius: 8px;
  filter: drop-shadow(0 13px 14px rgba(0, 0, 0, .43));
  transform: rotate(-3deg);
}

.surprise-result span,
.surprise-result strong,
.surprise-result small {
  display: block;
}

.surprise-result strong {
  margin-bottom: 7px;
  font-size: 18px;
}

.surprise-result small {
  color: var(--muted);
  font-size: 10px;
}

.set-chip-card.active,
.set-hero {
  animation: selected-set-glow 2.5s ease-in-out infinite;
}

.meta-card {
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s var(--ease), opacity .2s ease;
}

.meta-card.selected {
  border-color: color-mix(in srgb, var(--deck-accent) 76%, white 12%);
  box-shadow:
    inset 0 0 30px color-mix(in srgb, var(--deck-accent) 13%, transparent),
    0 0 0 1px color-mix(in srgb, var(--deck-accent) 45%, transparent),
    0 0 27px color-mix(in srgb, var(--deck-accent) 23%, transparent);
  transform: translateY(-2px);
  animation: selected-deck-glow 2.35s ease-in-out infinite;
}

.deck-library-groups {
  display: grid;
  gap: 24px;
}

.deck-library-group .section-head {
  margin-bottom: 10px;
}

.library-preview {
  position: relative;
  display: grid;
  min-height: 260px;
  margin: 8px 0 22px;
  padding: 20px;
  grid-template-columns: 165px minmax(0, 1fr);
  align-items: center;
  gap: 23px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--deck-accent) 72%, white 8%);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 10% 50%, color-mix(in srgb, var(--deck-accent) 29%, transparent), transparent 38%),
    linear-gradient(135deg, color-mix(in srgb, var(--surface-2) 92%, var(--deck-accent)), var(--surface));
  box-shadow:
    inset 0 0 48px color-mix(in srgb, var(--deck-accent) 8%, transparent),
    0 0 34px color-mix(in srgb, var(--deck-accent) 18%, transparent);
  animation: selected-deck-glow 2.35s ease-in-out infinite;
}

.library-preview::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .075) 48%, transparent 64%);
  transform: translateX(-110%);
  animation: preview-sheen 4.8s ease-in-out infinite;
}

.library-preview-art {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}

.library-preview-art img {
  width: 145px;
  max-height: 205px;
  border-radius: 9px;
  object-fit: cover;
  filter: drop-shadow(0 18px 16px rgba(0, 0, 0, .44));
  transform: rotate(-3deg);
}

.library-preview-copy {
  position: relative;
  z-index: 1;
}

.library-preview-copy p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 11px;
}

.preview-stats {
  display: grid;
  margin-bottom: 15px;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.preview-stats span {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: rgba(0, 0, 0, .09);
  font-size: 8px;
}

.preview-stats strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.saved-deck-shelf {
  margin: 0 0 17px;
}

.saved-deck-scroll {
  display: grid;
  margin: 0 -16px;
  padding: 2px 16px 8px;
  grid-auto-columns: minmax(210px, 42%);
  grid-auto-flow: column;
  gap: 9px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.saved-deck-scroll::-webkit-scrollbar {
  display: none;
}

.saved-deck-card {
  position: relative;
  min-height: 118px;
  padding: 12px;
  overflow: hidden;
  scroll-snap-align: start;
  border: 1px solid var(--line);
  border-radius: 17px;
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--deck-accent) 16%, transparent), transparent 46%),
    var(--surface);
}

.saved-deck-card.selected {
  border-color: color-mix(in srgb, var(--deck-accent) 62%, var(--line));
  box-shadow: inset 0 0 26px color-mix(in srgb, var(--deck-accent) 10%, transparent);
}

.saved-deck-card > strong,
.saved-load strong {
  display: -webkit-box;
  overflow: hidden;
  margin: 7px 0 4px;
  color: var(--text);
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.saved-deck-card > small,
.saved-load small {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.saved-load {
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  background: transparent;
}

.saved-status {
  display: inline-flex;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--deck-accent) 35%, var(--line));
  border-radius: 99px;
  color: color-mix(in srgb, var(--deck-accent) 70%, white);
  background: color-mix(in srgb, var(--deck-accent) 9%, transparent);
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
}

.saved-progress {
  display: block;
  height: 4px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-3);
}

.saved-progress i {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: var(--deck-accent);
  box-shadow: 0 0 10px var(--deck-accent);
}

.saved-card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
}

.saved-card-actions button {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-3) 88%, transparent);
  font-size: 12px;
}

.strategy-turns {
  display: grid;
  gap: 12px;
}

.strategy-turn-card {
  display: grid;
  min-height: 205px;
  padding: 15px;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: start;
  gap: 17px;
  border: 1px solid color-mix(in srgb, var(--deck-accent) 30%, var(--line));
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--deck-accent) 15%, transparent), transparent 42%),
    var(--surface);
}

.strategy-card-art {
  display: grid;
  place-items: center;
}

.strategy-card-art img {
  width: 105px;
  border-radius: 7px;
  filter: drop-shadow(0 12px 12px rgba(0, 0, 0, .36));
}

.strategy-turn-copy h3 {
  margin-bottom: 7px;
  font-size: 15px;
}

.strategy-turn-copy > p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 10px;
}

.strategy-turn-copy dl {
  display: grid;
  margin: 0;
  gap: 6px;
}

.strategy-turn-copy dl > div {
  display: grid;
  padding-top: 6px;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  border-top: 1px solid var(--line);
}

.strategy-turn-copy dt {
  color: var(--accent-2);
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
}

.strategy-turn-copy dd {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.ability-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.ability-guide-grid article {
  display: grid;
  min-height: 150px;
  padding: 10px;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.ability-guide-grid article > button {
  padding: 0;
  background: transparent;
}

.ability-guide-grid img {
  width: 70px;
  border-radius: 5px;
}

.ability-guide-grid small,
.ability-guide-grid strong,
.ability-guide-grid b {
  display: block;
}

.ability-guide-grid small {
  color: var(--accent-2);
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
}

.ability-guide-grid strong {
  margin: 2px 0;
  font-size: 11px;
}

.ability-guide-grid b {
  color: var(--muted);
  font-size: 8px;
}

.ability-guide-grid p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.settings-group {
  padding: 15px;
}

.accent-picker.expanded {
  flex-wrap: wrap;
}

.custom-accent {
  position: relative;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  background: conic-gradient(#ec4899, #facc15, #22c55e, #22d3ee, #8b5cf6, #ec4899);
  cursor: pointer;
}

.custom-accent input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.custom-accent span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, .65);
  font-weight: 800;
}

.transition-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.transition-picker button {
  min-height: 42px;
  padding: 7px 5px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 8px;
  font-weight: 750;
}

.transition-picker button.active {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(var(--accent-rgb), .13);
  box-shadow: inset 0 0 16px rgba(var(--accent-rgb), .1), 0 0 14px rgba(var(--accent-rgb), .12);
}

.icon-variant-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.icon-variant-grid button {
  position: relative;
  display: grid;
  padding: 8px 5px;
  place-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 7px;
}

.icon-variant-grid button.active {
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 0 20px rgba(var(--accent-rgb), .18);
}

.icon-variant-grid img {
  width: 48px;
  height: 48px;
  border-radius: 13px;
}

.icon-note {
  margin: 10px 0 0;
}

.nav-item::after {
  position: absolute;
  z-index: -1;
  inset: 7px 11px;
  content: "";
  border-radius: 12px;
  background: rgba(var(--accent-rgb), .14);
  opacity: .12;
  filter: blur(7px);
  animation: nav-glow 3.1s ease-in-out infinite;
}

.nav-item:nth-child(2)::after { animation-delay: -.4s; }
.nav-item:nth-child(3)::after { animation-delay: -.8s; }
.nav-item:nth-child(4)::after { animation-delay: -1.2s; }
.nav-item:nth-child(5)::after { animation-delay: -1.6s; }
.nav-item:nth-child(6)::after { animation-delay: -2s; }

.nav-item.active {
  text-shadow: 0 0 12px rgba(var(--accent-rgb), .72);
  box-shadow: inset 0 0 17px rgba(var(--accent-rgb), .09);
}

.nav-item.active svg {
  filter: drop-shadow(0 0 7px rgba(var(--accent-rgb), .82));
}

.theme-ripple.effect-sweep {
  width: 14px;
  height: 180vh;
  border-radius: 0;
  transform: translate(-50%, -50%) rotate(18deg) scaleX(0);
  background: linear-gradient(90deg, transparent, var(--ripple-color), #fff, var(--ripple-color), transparent);
}

.theme-ripple.effect-sweep.run {
  animation: theme-sweep .72s var(--ease) both;
}

.theme-ripple.effect-prism {
  width: 34px;
  height: 34px;
  background: conic-gradient(from 90deg, #22d3ee, var(--ripple-color), #f472b6, #facc15, #22d3ee);
}

.theme-ripple.effect-prism.run {
  animation: theme-prism .72s var(--ease) both;
}

.theme-ripple.effect-pulse {
  border: 5px solid var(--ripple-color);
  background: transparent;
}

.theme-ripple.effect-pulse.run {
  animation: theme-energy-pulse .72s var(--ease) both;
}

.theme-ripple.effect-none {
  display: none;
}

body[data-transition="sweep"] .app-view.view-enter {
  animation: view-sweep .32s var(--ease) both;
}

body[data-transition="prism"] .app-view.view-enter {
  animation: view-prism .36s var(--ease) both;
}

body[data-transition="pulse"] .app-view.view-enter {
  animation: view-pulse .34s var(--ease) both;
}

body[data-transition="none"] .app-view.view-enter {
  animation: none;
}

body[data-theme="ultraviolet"] {
  --bg: #10051d; --bg-deep: #050108; --surface: rgba(33, 10, 55, .94);
  --surface-2: #2a0e46; --surface-3: #3c145f; --surface-glass: rgba(27, 7, 48, .8);
  --line: rgba(219, 94, 255, .15); --line-strong: rgba(219, 94, 255, .32);
  --text: #fff5ff; --muted: #c4a1cf; --faint: #876a93;
  --accent: #c026ff; --accent-rgb: 192, 38, 255; --accent-2: #f0abfc;
}

body[data-theme="cyberpunk"] {
  --bg: #120515; --bg-deep: #030104; --surface: rgba(35, 7, 41, .95);
  --surface-2: #290c30; --surface-3: #3c1045; --surface-glass: rgba(30, 5, 35, .82);
  --line: rgba(255, 43, 214, .16); --line-strong: rgba(0, 245, 212, .31);
  --text: #fff5fd; --muted: #c79bbc; --faint: #8b617f;
  --accent: #ff2bd6; --accent-rgb: 255, 43, 214; --accent-2: #00f5d4;
}

body[data-theme="toxic"] {
  --bg: #07120a; --bg-deep: #020603; --surface: rgba(12, 31, 16, .95);
  --surface-2: #10281a; --surface-3: #193722; --surface-glass: rgba(8, 25, 12, .82);
  --line: rgba(163, 255, 18, .15); --line-strong: rgba(163, 255, 18, .31);
  --text: #f7ffe9; --muted: #a9bf8c; --faint: #718159;
  --accent: #a3ff12; --accent-rgb: 163, 255, 18; --accent-2: #39ff88;
}

body[data-theme="plasma"] {
  --bg: #051126; --bg-deep: #010611; --surface: rgba(8, 27, 59, .95);
  --surface-2: #0b2347; --surface-3: #11315f; --surface-glass: rgba(5, 22, 50, .82);
  --line: rgba(96, 165, 250, .16); --line-strong: rgba(147, 197, 253, .31);
  --text: #f4f9ff; --muted: #9bb2d1; --faint: #617a9d;
  --accent: #60a5fa; --accent-rgb: 96, 165, 250; --accent-2: #e0f2fe;
}

body[data-theme="solar"] {
  --bg: #1c1003; --bg-deep: #080400; --surface: rgba(48, 27, 6, .95);
  --surface-2: #3e2407; --surface-3: #54310a; --surface-glass: rgba(40, 21, 3, .83);
  --line: rgba(250, 204, 21, .16); --line-strong: rgba(251, 146, 60, .31);
  --text: #fffbea; --muted: #c9ad7b; --faint: #8c744d;
  --accent: #facc15; --accent-rgb: 250, 204, 21; --accent-2: #fb7185;
}

body[data-theme="sakura"] {
  --bg: #1c0815; --bg-deep: #090307; --surface: rgba(49, 13, 38, .94);
  --surface-2: #3b102f; --surface-3: #501643; --surface-glass: rgba(41, 9, 31, .81);
  --line: rgba(251, 113, 133, .16); --line-strong: rgba(244, 114, 182, .31);
  --text: #fff6f9; --muted: #caa2b1; --faint: #8e6978;
  --accent: #fb7185; --accent-rgb: 251, 113, 133; --accent-2: #f9a8d4;
}

body[data-theme="glacier"] {
  --bg: #e8f5f8; --bg-deep: #cee7ee; --surface: rgba(248, 254, 255, .94);
  --surface-2: #ffffff; --surface-3: #dceff4; --surface-glass: rgba(242, 252, 254, .88);
  --line: rgba(14, 116, 144, .13); --line-strong: rgba(14, 116, 144, .27);
  --text: #102a32; --muted: #4d6f78; --faint: #79939a;
  --accent: #0ea5e9; --accent-rgb: 14, 165, 233; --accent-2: #0369a1;
  color-scheme: light;
}

body[data-theme="obsidian"] {
  --bg: #080a0d; --bg-deep: #020304; --surface: rgba(20, 23, 28, .96);
  --surface-2: #191d23; --surface-3: #252b33; --surface-glass: rgba(16, 19, 24, .84);
  --line: rgba(203, 213, 225, .13); --line-strong: rgba(203, 213, 225, .28);
  --text: #f8fafc; --muted: #a1aab7; --faint: #69727e;
  --accent: #cbd5e1; --accent-rgb: 203, 213, 225; --accent-2: #ffffff;
}

body[data-theme="rocket"] {
  --bg: #150405; --bg-deep: #050101; --surface: rgba(42, 8, 10, .95);
  --surface-2: #320b0e; --surface-3: #461015; --surface-glass: rgba(35, 6, 8, .82);
  --line: rgba(239, 68, 68, .16); --line-strong: rgba(248, 113, 113, .32);
  --text: #fff6f6; --muted: #c49a9d; --faint: #875f63;
  --accent: #ef4444; --accent-rgb: 239, 68, 68; --accent-2: #fca5a5;
}

body[data-theme="gameboy"] {
  --bg: #cad2c5; --bg-deep: #9fac96; --surface: #dfe5d8;
  --surface-2: #edf1e8; --surface-3: #b7c2af; --surface-glass: rgba(219, 226, 212, .94);
  --line: rgba(38, 58, 45, .2); --line-strong: rgba(38, 58, 45, .39);
  --text: #263a2d; --muted: #506555; --faint: #738275;
  --accent: #52796f; --accent-rgb: 82, 121, 111; --accent-2: #354f52;
  --shadow: none; color-scheme: light;
}

body[data-theme="synthwave"] {
  --bg: #17061e; --bg-deep: #07020a; --surface: rgba(39, 10, 50, .95);
  --surface-2: #30103d; --surface-3: #441654; --surface-glass: rgba(32, 7, 42, .82);
  --line: rgba(249, 115, 22, .15); --line-strong: rgba(217, 70, 239, .31);
  --text: #fff5ff; --muted: #c4a0c8; --faint: #88668e;
  --accent: #f97316; --accent-rgb: 249, 115, 22; --accent-2: #d946ef;
}

body[data-theme="cosmic"] {
  --bg: #080719; --bg-deep: #020208; --surface: rgba(18, 16, 49, .95);
  --surface-2: #171541; --surface-3: #211e58; --surface-glass: rgba(14, 12, 42, .82);
  --line: rgba(129, 140, 248, .16); --line-strong: rgba(167, 139, 250, .32);
  --text: #f7f7ff; --muted: #aaa9cd; --faint: #6e6d96;
  --accent: #818cf8; --accent-rgb: 129, 140, 248; --accent-2: #c4b5fd;
}

body[data-theme="candy"] {
  --bg: #fff1f7; --bg-deep: #fce7f3; --surface: rgba(255, 255, 255, .95);
  --surface-2: #ffffff; --surface-3: #fce0ec; --surface-glass: rgba(255, 246, 250, .9);
  --line: rgba(219, 39, 119, .12); --line-strong: rgba(8, 145, 178, .24);
  --text: #3b1730; --muted: #79566d; --faint: #a58298;
  --accent: #06b6d4; --accent-rgb: 6, 182, 212; --accent-2: #db2777;
  color-scheme: light;
}

body[data-theme="monochrome"] {
  --bg: #090909; --bg-deep: #020202; --surface: rgba(24, 24, 24, .96);
  --surface-2: #1d1d1d; --surface-3: #292929; --surface-glass: rgba(18, 18, 18, .86);
  --line: rgba(255, 255, 255, .12); --line-strong: rgba(255, 255, 255, .26);
  --text: #fafafa; --muted: #aaaaaa; --faint: #707070;
  --accent: #f8fafc; --accent-rgb: 248, 250, 252; --accent-2: #d4d4d4;
}

body[data-theme="champion"] {
  --bg: #120d03; --bg-deep: #050300; --surface: rgba(37, 27, 7, .95);
  --surface-2: #2d2109; --surface-3: #403010; --surface-glass: rgba(31, 22, 5, .83);
  --line: rgba(251, 191, 36, .16); --line-strong: rgba(251, 191, 36, .34);
  --text: #fffbea; --muted: #c7ae79; --faint: #8a7448;
  --accent: #fbbf24; --accent-rgb: 251, 191, 36; --accent-2: #fde68a;
}

body[data-accent="violet"] { --accent: #8b5cf6; --accent-rgb: 139, 92, 246; --accent-2: #c084fc; }
body[data-accent="blue"] { --accent: #0ea5e9; --accent-rgb: 14, 165, 233; --accent-2: #67e8f9; }
body[data-accent="cyan"] { --accent: #22d3ee; --accent-rgb: 34, 211, 238; --accent-2: #a5f3fc; }
body[data-accent="green"] { --accent: #22c55e; --accent-rgb: 34, 197, 94; --accent-2: #86efac; }
body[data-accent="lime"] { --accent: #a3e635; --accent-rgb: 163, 230, 53; --accent-2: #d9f99d; }
body[data-accent="gold"] { --accent: #facc15; --accent-rgb: 250, 204, 21; --accent-2: #fde68a; }
body[data-accent="ember"] { --accent: #f97316; --accent-rgb: 249, 115, 22; --accent-2: #fdba74; }
body[data-accent="red"] { --accent: #ef4444; --accent-rgb: 239, 68, 68; --accent-2: #fca5a5; }
body[data-accent="pink"] { --accent: #ec4899; --accent-rgb: 236, 72, 153; --accent-2: #f9a8d4; }
body[data-accent="silver"] { --accent: #cbd5e1; --accent-rgb: 203, 213, 225; --accent-2: #ffffff; }

body[data-theme="eink"] .set-chip-card.active,
body[data-theme="eink"] .set-hero,
body[data-theme="eink"] .meta-card.selected,
body[data-theme="eink"] .library-preview,
body[data-theme="eink"] .nav-item::after {
  animation: none;
  box-shadow: none;
}

.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
  scroll-behavior: auto !important;
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
}

@keyframes surprise-star {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  50% { transform: rotate(12deg) scale(1.17); }
}

@keyframes confetti-fall {
  0% { opacity: 0; transform: translate3d(0, -8vh, 0) rotate(0deg); }
  8% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(36px, 116vh, 0) rotate(calc(var(--spin) * 820deg)); }
}

@keyframes selected-set-glow {
  0%, 100% { box-shadow: inset 0 0 22px color-mix(in srgb, var(--set-accent) 9%, transparent), 0 0 0 color-mix(in srgb, var(--set-accent) 0%, transparent); }
  50% { box-shadow: inset 0 0 32px color-mix(in srgb, var(--set-accent) 15%, transparent), 0 0 25px color-mix(in srgb, var(--set-accent) 27%, transparent); }
}

@keyframes selected-deck-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.075); }
}

@keyframes preview-sheen {
  0%, 22% { transform: translateX(-120%); }
  62%, 100% { transform: translateX(130%); }
}

@keyframes nav-glow {
  0%, 100% { opacity: .08; transform: scale(.84); }
  50% { opacity: .42; transform: scale(1.04); }
}

@keyframes theme-sweep {
  from { opacity: .66; transform: translate(-170vw, -50%) rotate(18deg) scaleX(.25); }
  to { opacity: 0; transform: translate(170vw, -50%) rotate(18deg) scaleX(7); }
}

@keyframes theme-prism {
  from { opacity: .66; transform: translate(-50%, -50%) scale(0) rotate(0); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(110) rotate(135deg); }
}

@keyframes theme-energy-pulse {
  from { opacity: .72; transform: translate(-50%, -50%) scale(.1); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(95); }
}

@keyframes view-sweep {
  from { opacity: 0; transform: translateX(13px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes view-prism {
  from { opacity: 0; filter: saturate(1.8) hue-rotate(15deg); transform: scale(.985); }
  to { opacity: 1; filter: none; transform: scale(1); }
}

@keyframes view-pulse {
  from { opacity: 0; transform: scale(.975); }
  65% { transform: scale(1.008); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 520px) {
  .library-preview {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
  }

  .library-preview-art img {
    width: 105px;
  }

  .preview-stats {
    grid-template-columns: 1fr 1fr;
  }

  .saved-deck-scroll {
    grid-auto-columns: minmax(205px, 75%);
  }

  .icon-variant-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .transition-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 390px) {
  .forge-action-grid {
    grid-template-columns: 1fr;
  }

  .library-preview {
    padding: 15px;
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .library-preview-art img {
    width: 82px;
  }

  .library-preview-copy h2 {
    font-size: 17px;
  }

  .library-preview .button-row {
    grid-template-columns: 1fr;
  }

  .strategy-turn-card {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
  }

  .strategy-card-art img {
    width: 82px;
  }

  .ability-guide-grid {
    grid-template-columns: 1fr;
  }
}

/* DeckForge HTML preview v1.6 ------------------------------------------------ */
.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  justify-content: initial;
  gap: 9px;
}

.menu-button {
  flex: 0 0 auto;
}

.topbar .brand-button {
  min-width: 0;
}

.topbar-actions {
  justify-self: end;
}

.app-menu {
  position: fixed;
  z-index: 90;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-menu.open {
  visibility: visible;
  pointer-events: auto;
}

.app-menu-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  background: rgba(1, 3, 9, .68);
  opacity: 0;
  backdrop-filter: blur(5px);
  transition: opacity .28s ease;
}

.app-menu.open .app-menu-scrim {
  opacity: 1;
}

.app-menu-panel {
  position: absolute;
  inset: 0 auto 0 0;
  width: min(88vw, 355px);
  padding: calc(18px + env(safe-area-inset-top)) 15px calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto;
  border-right: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 0 0, rgba(var(--accent-rgb), .2), transparent 38%),
    color-mix(in srgb, var(--bg) 95%, transparent);
  box-shadow: 30px 0 70px rgba(0, 0, 0, .4);
  transform: translateX(-102%);
  transition: transform .34s var(--ease);
  backdrop-filter: blur(28px) saturate(140%);
}

.app-menu.open .app-menu-panel {
  transform: translateX(0);
}

.app-menu-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 11px;
  padding: 4px 2px 18px;
  border-bottom: 1px solid var(--line);
}

.app-menu-head .brand-mark {
  width: 42px;
  height: 42px;
}

.app-menu-head > span:not(.brand-mark),
.app-menu-head strong,
.app-menu-head small {
  display: block;
}

.app-menu-head strong { font-size: 15px; }
.app-menu-head small { margin-top: 2px; color: var(--muted); font-size: 9px; }

.app-menu-links {
  display: grid;
  padding: 14px 0;
  gap: 6px;
}

.app-menu-links > button {
  display: grid;
  min-height: 61px;
  padding: 8px 10px;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  border: 1px solid transparent;
  border-radius: 15px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.app-menu-links > button:hover,
.app-menu-links > button:focus-visible {
  border-color: rgba(var(--accent-rgb), .3);
  background: rgba(var(--accent-rgb), .1);
}

.app-menu-links > button > i {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--accent-2);
  background: var(--surface-2);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}
.app-menu-links > button > i svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

.app-menu-links span,
.app-menu-links strong,
.app-menu-links small { display: block; }
.app-menu-links strong { font-size: 12px; }
.app-menu-links small { margin-top: 3px; color: var(--muted); font-size: 8px; }
body.menu-open { overflow: hidden; }

.quick-grid--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-grid--compact .quick-card {
  min-height: 104px;
}

/* Local store finder */
.nearby-stores { margin-bottom: 18px; }
.store-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  background:
    radial-gradient(circle at 95% 0, rgba(var(--accent-rgb), .16), transparent 42%),
    var(--surface);
}
.store-search-panel > div:first-child,
.store-search-panel strong,
.store-search-panel small { display: block; }
.store-search-panel > div:first-child > small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.store-manual-search {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.store-manual-search .select { width: 100%; }
.store-link-grid { display: grid; margin-top: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.store-link-card {
  display: grid;
  min-height: 67px;
  padding: 10px;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
  transition: border-color .2s ease, transform .2s var(--ease);
}
.store-link-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.store-link-card > i { display:grid; width:31px; height:31px; place-items:center; border-radius:50%; color:var(--accent-2); background:rgba(var(--accent-rgb),.12); font-size:10px; font-style:normal; font-weight:850; }
.store-link-card span,.store-link-card strong,.store-link-card small { display:block; min-width:0; }
.store-link-card strong { overflow:hidden; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.store-link-card small { margin-top:3px; overflow:hidden; color:var(--muted); font-size:8px; text-overflow:ellipsis; white-space:nowrap; }
.store-link-card > b { color:var(--accent-2); }
.store-empty { display:flex; min-height:96px; margin-top:10px; padding:18px; align-items:center; gap:13px; border:1px dashed var(--line-strong); border-radius:17px; color:var(--muted); }
.store-empty > span { color:var(--accent-2); font-size:28px; }
.store-empty p { margin:0; font-size:10px; }

/* Verified HD poster export */
.poster-export-progress { display:grid; min-height:430px; place-items:center; align-content:center; text-align:center; }
.poster-export-progress > h2 { margin:18px 0 6px; font-size:22px; }
.poster-export-progress > p { max-width:390px; margin:0; color:var(--muted); font-size:11px; line-height:1.55; }
.poster-export-progress > .muted { margin-top:11px; font-size:8px; }
.poster-progress-ring { display:grid; width:176px; height:176px; margin-top:18px; place-items:center; border-radius:50%; background:conic-gradient(var(--accent-2) var(--poster-progress),rgba(255,255,255,.075) 0); box-shadow:0 0 40px rgba(var(--accent-rgb),.23); transition:background .22s linear; }
.poster-progress-ring::before { grid-area:1/1; width:142px; height:142px; content:""; border:1px solid var(--line); border-radius:50%; background:radial-gradient(circle,rgba(var(--accent-rgb),.12),transparent 62%),var(--bg); }
.poster-progress-ring > div { z-index:1; grid-area:1/1; }
.poster-progress-ring strong,.poster-progress-ring small { display:block; }
.poster-progress-ring strong { font-size:34px; line-height:1; }
.poster-progress-ring small { margin-top:6px; color:var(--accent-2); font-size:9px; font-weight:900; letter-spacing:.18em; }
.poster-progress-track { width:min(360px,82vw); height:7px; margin-top:20px; overflow:hidden; border-radius:99px; background:rgba(255,255,255,.08); }
.poster-progress-track i { display:block; width:100%; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--accent),var(--accent-2)); transform:scaleX(0); transform-origin:left; animation:posterTrack var(--progress-duration,25s) linear forwards; }
.store-progress-track { --progress-duration:15s; }
@keyframes posterTrack { to { transform:scaleX(1); } }

/* Standard legality guide */
.standard-legality-panel { margin-top:14px; }
.standard-rule-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.standard-rule-list article { display:grid; min-width:0; padding:12px; grid-template-columns:38px minmax(0,1fr); align-items:start; gap:10px; border:1px solid var(--line); border-radius:14px; background:var(--surface-2); }
.standard-rule-list article > i { display:grid; width:38px; height:38px; place-items:center; border-radius:11px; color:var(--accent-2); background:rgba(var(--accent-rgb),.12); font-size:9px; font-style:normal; font-weight:950; }
.standard-rule-list strong,.standard-rule-list p { display:block; }
.standard-rule-list strong { font-size:10px; }
.standard-rule-list p { margin:4px 0 0; color:var(--muted); font-size:8px; line-height:1.48; }
.official-rule-links { display:flex; margin-top:11px; flex-wrap:wrap; gap:8px; }
.official-rule-links a { display:inline-flex; min-height:38px; padding:0 12px; align-items:center; border:1px solid rgba(var(--accent-rgb),.26); border-radius:11px; color:var(--accent-2); background:rgba(var(--accent-rgb),.07); font-size:9px; font-weight:800; text-decoration:none; }
.learn-video-row { margin-top:12px; }
.learn-video-row .learn-video-card { min-height:180px; }

/* Set binder planner */
.set-view-switch {
  display: grid;
  margin: 14px 0;
  padding: 4px;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}
.set-view-switch button { min-height:43px; border-radius:11px; color:var(--muted); background:transparent; font-size:10px; font-weight:800; }
.set-view-switch button.active { color:#fff; background:linear-gradient(135deg,var(--accent),var(--accent-2)); box-shadow:0 8px 24px rgba(var(--accent-rgb),.23); }
.binder-guide { display:grid; gap:12px; }
.binder-toolbar { display:flex; align-items:center; justify-content:space-between; gap:14px; border-color:color-mix(in srgb,var(--set-accent) 38%,var(--line)); }
.binder-toolbar h2 { margin:0 0 3px; }
.binder-toolbar small { color:var(--muted); font-size:9px; }
.binder-layout-picker { display:flex; padding:3px; border:1px solid var(--line); border-radius:12px; background:var(--surface-2); }
.binder-layout-picker button { min-width:58px; min-height:35px; border-radius:9px; color:var(--muted); background:transparent; font-size:10px; font-weight:800; }
.binder-layout-picker button.active { color:var(--text); background:color-mix(in srgb,var(--set-accent) 28%,var(--surface-3)); }
.binder-note { display:grid; padding:12px; grid-template-columns:28px minmax(0,1fr); align-items:start; gap:9px; border:1px solid color-mix(in srgb,var(--set-accent) 28%,var(--line)); border-radius:15px; background:color-mix(in srgb,var(--set-accent) 8%,var(--surface)); color:var(--muted); font-size:9px; }
.binder-note i { display:grid; width:28px; height:28px; place-items:center; border-radius:50%; color:var(--set-accent); background:color-mix(in srgb,var(--set-accent) 14%,transparent); font-style:normal; font-weight:900; }
.binder-note strong { color:var(--text); }
.binder-promo-banner { display:grid; padding:13px 15px; grid-template-columns:34px minmax(0,1fr); align-items:center; gap:10px; border:1px solid rgba(248,200,75,.35); border-radius:16px; background:linear-gradient(135deg,rgba(248,200,75,.14),var(--surface)); }
.binder-promo-banner > span { display:grid; width:34px; height:34px; place-items:center; border-radius:11px; color:#231900; background:#f8c84b; box-shadow:0 0 18px rgba(248,200,75,.28); }
.binder-promo-banner strong,.binder-promo-banner small { display:block; }
.binder-promo-banner strong { font-size:11px; }
.binder-promo-banner small { margin-top:3px; color:var(--muted); font-size:8px; line-height:1.45; }
.binder-page-shell { position:relative; width:100%; max-width:880px; margin-inline:auto; padding:20px 16px 20px 29px; border:1px solid color-mix(in srgb,var(--set-accent) 34%,var(--line)); border-radius:21px; background:linear-gradient(145deg,color-mix(in srgb,var(--set-accent) 14%,#17130f),#0c0d12 62%); box-shadow:inset 0 0 35px rgba(0,0,0,.45),var(--shadow); }
.binder-rings { position:absolute; z-index:2; top:8%; bottom:8%; left:7px; display:flex; flex-direction:column; justify-content:space-around; }
.binder-rings i { width:31px; height:7px; border:1px solid rgba(255,255,255,.22); border-radius:99px; background:linear-gradient(#d9dde3,#666d76,#f5f6f8); box-shadow:0 2px 5px rgba(0,0,0,.5); }
.binder-pocket-grid { display:grid; gap:7px; }
.binder-pocket-grid.binder-3x3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.binder-pocket-grid.binder-4x3 { grid-template-columns:repeat(4,minmax(0,1fr)); }
.binder-pocket { position:relative; display:grid; min-width:0; padding:5px; gap:4px; overflow:hidden; border:1px solid rgba(255,255,255,.13); border-radius:10px; color:var(--text); background:linear-gradient(145deg,rgba(255,255,255,.08),rgba(255,255,255,.018)); box-shadow:inset 0 0 0 2px rgba(0,0,0,.22); text-align:left; }
.binder-pocket::after { position:absolute; inset:0; content:""; pointer-events:none; background:linear-gradient(115deg,transparent 30%,rgba(255,255,255,.12),transparent 64%); }
.binder-pocket > img { display:block; width:100%; height:auto; max-height:none; aspect-ratio:734/1024; border-radius:6px; object-fit:contain; opacity:.85; }
.binder-pocket.reverse-variant { border-color:color-mix(in srgb,var(--set-accent) 30%,rgba(255,255,255,.13)); background:linear-gradient(145deg,color-mix(in srgb,var(--set-accent) 13%,rgba(255,255,255,.08)),rgba(255,255,255,.018)); }
.binder-pocket.reverse-variant > img { filter:saturate(1.12) contrast(1.03); }
.binder-pocket.promo-variant { border-color:color-mix(in srgb,#f8c84b 55%,var(--line)); background:linear-gradient(145deg,rgba(248,200,75,.14),rgba(255,255,255,.02)); }
.binder-foil-badge { position:absolute; z-index:3; bottom:33px; left:9px; padding:3px 5px; border:1px solid rgba(255,255,255,.28); border-radius:6px; color:#fff; background:linear-gradient(135deg,#22d3ee,#8b5cf6,#f472b6); box-shadow:0 0 12px color-mix(in srgb,var(--set-accent) 48%,transparent); font-size:6px; font-weight:950; letter-spacing:.08em; }
.binder-foil-badge.promo-badge { color:#211800; background:linear-gradient(135deg,#fff0a8,#f8c84b); box-shadow:0 0 15px rgba(248,200,75,.36); }
.binder-promo-placeholder { display:grid; width:100%; aspect-ratio:734/1024; place-content:center; gap:4px; border:1px dashed rgba(248,200,75,.42); border-radius:6px; color:#f8c84b; background:radial-gradient(circle,rgba(248,200,75,.14),transparent 60%),rgba(0,0,0,.18); font-size:11px; font-weight:950; letter-spacing:.12em; text-align:center; }
.binder-promo-placeholder small { color:var(--muted); font-size:6px; letter-spacing:.04em; }
.binder-pocket.filled { border-color:var(--set-accent); box-shadow:0 0 0 1px var(--set-accent),0 0 22px color-mix(in srgb,var(--set-accent) 28%,transparent); }
.binder-pocket.filled > img { opacity:1; }
.binder-pocket-label,.binder-pocket-label strong,.binder-pocket-label small { display:block; min-width:0; }
.binder-pocket-label b { display:none; }
.binder-pocket-label strong { overflow:hidden; font-size:8px; text-overflow:ellipsis; white-space:nowrap; }
.binder-pocket-label small { margin-top:2px; overflow:hidden; color:rgba(255,255,255,.58); font-size:6px; text-overflow:ellipsis; white-space:nowrap; }
.binder-check { position:absolute; z-index:2; top:8px; right:8px; display:grid; width:22px; height:22px; place-items:center; border-radius:50%; color:white; background:rgba(5,7,12,.82); font-size:10px; font-style:normal; font-weight:900; }
.binder-pocket.filled .binder-check { background:var(--set-accent); }
.binder-pocket.empty { min-height:170px; place-items:center; border-style:dashed; color:rgba(255,255,255,.25); font-size:8px; }
.binder-pagination { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:10px; }
.binder-pagination > span,.binder-pagination strong,.binder-pagination small { display:block; text-align:center; }
.binder-pagination small { margin-top:2px; color:var(--muted); font-size:8px; }
.binder-pagination button:last-child { justify-self:end; }
.binder-page-jumps { display:flex; padding:10px; flex-wrap:wrap; align-items:center; justify-content:center; gap:6px; overflow:visible; border:1px solid color-mix(in srgb,var(--set-accent) 26%,var(--line)); border-radius:16px; background:var(--surface); }
.binder-page-jump-label { margin-right:4px; color:var(--muted); font-size:8px; font-weight:850; text-transform:uppercase; letter-spacing:.08em; }
.binder-page-jumps > button { position:relative; min-width:37px; min-height:34px; padding:0 9px; border:1px solid var(--line); border-radius:9px; color:var(--muted); background:var(--surface-2); font-size:8px; font-weight:900; }
.binder-page-jumps > button:hover,.binder-page-jumps > button.active { color:#fff; border-color:var(--set-accent); background:color-mix(in srgb,var(--set-accent) 28%,var(--surface-2)); box-shadow:0 0 15px color-mix(in srgb,var(--set-accent) 22%,transparent); }
.binder-page-jumps > button.promo-jump { min-width:62px; color:#f8c84b; border-color:rgba(248,200,75,.35); }
.binder-page-hover-preview { position:absolute; z-index:45; bottom:calc(100% + 9px); left:50%; display:grid; width:190px; padding:9px; pointer-events:none; grid-template-rows:auto 1fr; gap:7px; opacity:0; visibility:hidden; border:1px solid color-mix(in srgb,var(--set-accent) 42%,var(--line)); border-radius:13px; background:color-mix(in srgb,var(--bg) 96%,transparent); box-shadow:0 18px 48px rgba(0,0,0,.55); transform:translate(-50%,7px); transition:opacity .16s ease,transform .16s ease,visibility .16s ease; backdrop-filter:blur(18px); }
.binder-page-hover-preview > b { color:var(--text); font-size:8px; text-align:left; }
.binder-page-hover-preview > i { display:flex; min-height:72px; align-items:center; justify-content:center; gap:5px; font-style:normal; }
.binder-page-hover-preview img { width:48px; aspect-ratio:734/1024; border-radius:4px; object-fit:contain; box-shadow:0 5px 12px rgba(0,0,0,.35); }
.binder-page-hover-preview em { color:var(--muted); font-size:8px; font-style:normal; }

/* Current meta snapshot */
.meta-snapshot { display:flex; margin-bottom:12px; align-items:center; justify-content:space-between; gap:14px; border-color:rgba(var(--accent-rgb),.3); background:radial-gradient(circle at 100% 0,rgba(var(--accent-rgb),.16),transparent 45%),var(--surface); }
.meta-snapshot > div,.meta-snapshot strong,.meta-snapshot small { display:block; }
.meta-snapshot strong { font-size:14px; }
.meta-snapshot small { max-width:470px; margin-top:4px; color:var(--muted); font-size:9px; line-height:1.45; }
.meta-snapshot a { flex:0 0 auto; text-decoration:none; }

/* Deck editor flow */
.deck-editor-head { align-items:center; }
.editor-save-state { display:inline-flex; padding:7px 10px; align-items:center; gap:6px; border:1px solid var(--line); border-radius:99px; color:var(--muted); background:var(--surface); font-size:8px; font-weight:800; text-transform:uppercase; }
.editor-save-state i { width:7px; height:7px; border-radius:50%; background:var(--good); box-shadow:0 0 10px var(--good); }
.editor-save-state.dirty { color:var(--warn); }
.editor-save-state.dirty i { background:var(--warn); box-shadow:0 0 10px var(--warn); }
.deck-editor-layout { display:grid; gap:14px; }
.deck-editor-workspace { min-width:0; }
.saved-deck-tools { display:grid; margin-bottom:9px; gap:7px; }
.search-bar.compact { min-height:42px; margin:0; }
.saved-empty { display:grid; min-height:105px; padding:18px; place-content:center; text-align:center; border:1px dashed var(--line); border-radius:16px; color:var(--muted); }
.saved-empty strong,.saved-empty small { display:block; }
.saved-empty strong { color:var(--text); font-size:11px; }
.saved-empty small { margin-top:4px; font-size:8px; }
.editable-deck-title { display:flex; max-width:100%; padding:0; align-items:center; gap:9px; color:var(--text); background:transparent; text-align:left; }
.editable-deck-title h1 { margin:9px 0; }
.editable-deck-title > span { color:var(--accent-2); font-size:16px; }
.deck-build-progress { display:flex; flex-wrap:wrap; gap:7px; }
.deck-build-progress > span { display:inline-flex; min-height:34px; padding:0 10px; align-items:center; gap:4px; border:1px solid var(--line); border-radius:10px; color:var(--muted); background:rgba(0,0,0,.13); font-size:9px; }
.deck-build-progress strong { color:var(--text); }
.deck-build-progress .deck-total { margin:0; }
.deck-command-bar { position:sticky; z-index:20; top:calc(var(--topbar) + env(safe-area-inset-top) + 7px); margin:10px 0; padding:8px; border:1px solid var(--line); border-radius:17px; background:color-mix(in srgb,var(--bg) 88%,transparent); box-shadow:0 10px 30px rgba(0,0,0,.25); backdrop-filter:blur(18px); }
.editor-list-tools { display:grid; margin-bottom:10px; gap:9px; padding:10px; }
.editor-category-filter { display:flex; padding:3px; gap:3px; overflow-x:auto; border:1px solid var(--line); border-radius:12px; background:var(--surface-2); }
.editor-category-filter button { min-width:max-content; min-height:34px; padding:0 11px; border-radius:9px; color:var(--muted); background:transparent; font-size:9px; font-weight:800; }
.editor-category-filter button.active { color:var(--text); background:rgba(var(--accent-rgb),.16); }
.drag-hint { color:var(--faint); font-size:8px; }
.card-row { grid-template-columns:18px 35px minmax(0,1fr) auto; }
.drag-handle { color:var(--faint); cursor:grab; font-size:13px; letter-spacing:-3px; }
.card-row.dragging { opacity:.4; }
.card-row.drag-over { border-top:2px solid var(--accent); background:rgba(var(--accent-rgb),.09); }
.export-option-grid { display:grid; margin-top:12px; grid-template-columns:1fr 1fr; gap:8px; }
.export-option-grid > button { display:grid; min-height:78px; padding:10px; grid-template-columns:34px minmax(0,1fr); align-items:center; gap:9px; border:1px solid var(--line); border-radius:14px; color:var(--text); background:var(--surface-2); text-align:left; }
.export-option-grid > button:hover { border-color:var(--accent); }
.export-option-grid i { display:grid; width:34px; height:34px; place-items:center; border-radius:10px; color:var(--accent-2); background:rgba(var(--accent-rgb),.12); font-size:9px; font-style:normal; font-weight:900; }
.export-option-grid span,.export-option-grid strong,.export-option-grid small { display:block; }
.export-option-grid strong { font-size:10px; }
.export-option-grid small { margin-top:3px; color:var(--muted); font-size:7px; line-height:1.35; }

/* Learn to play */
.learn-step-tabs { display:grid; margin-bottom:12px; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; }
.learn-step-tabs button { display:grid; min-height:56px; padding:7px; grid-template-columns:26px minmax(0,1fr); align-items:center; gap:7px; border:1px solid var(--line); border-radius:14px; color:var(--muted); background:var(--surface); text-align:left; }
.learn-step-tabs i { display:grid; width:26px; height:26px; place-items:center; border-radius:50%; background:var(--surface-3); font-size:9px; font-style:normal; font-weight:900; }
.learn-step-tabs span { font-size:8px; font-weight:800; }
.learn-step-tabs button.active { border-color:var(--accent); color:var(--text); box-shadow:0 0 22px rgba(var(--accent-rgb),.18); }
.learn-step-tabs button.active i { color:#fff; background:var(--accent); }
.learn-stage { display:grid; padding:0; overflow:hidden; }
.learn-step-copy { padding:18px; }
.learn-step-copy h2 { margin:0 0 8px; }
.learn-step-copy p { margin:0; color:var(--muted); }
.learn-step-controls { display:flex; margin-top:14px; justify-content:space-between; gap:8px; }
.digital-playmat { position:relative; min-height:520px; overflow:hidden; border:1px solid color-mix(in srgb,var(--deck-accent) 42%,var(--line)); border-radius:20px; background:radial-gradient(circle at 50% 57%,color-mix(in srgb,var(--deck-accent) 20%,transparent),transparent 28%),linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px),#0b2324; background-size:auto,30px 30px,30px 30px,auto; box-shadow:inset 0 0 80px rgba(0,0,0,.45); }
.digital-playmat::before { position:absolute; inset:50% auto auto 50%; width:170px; height:170px; content:""; border:2px solid color-mix(in srgb,var(--deck-accent) 35%,rgba(255,255,255,.12)); border-radius:50%; transform:translate(-50%,-50%); }
.digital-playmat::after { position:absolute; top:50%; left:0; width:100%; height:1px; content:""; background:rgba(255,255,255,.13); }
.playmat-zone { position:absolute; z-index:2; }
.playmat-zone > span { display:block; margin-bottom:5px; color:rgba(255,255,255,.64); font-size:7px; font-weight:850; letter-spacing:.6px; text-align:center; text-transform:uppercase; }
.playmat-zone img { display:block; border-radius:7px; box-shadow:0 9px 22px rgba(0,0,0,.42); }
.playmat-zone.opponent { top:13px; left:50%; transform:translateX(-50%); }
.playmat-zone.stadium { top:45%; left:13px; transform:translateY(-50%); }
.playmat-zone.stadium i,.playmat-zone.discard > i { display:grid; width:46px; height:64px; place-items:center; border:1px dashed rgba(255,255,255,.25); border-radius:7px; color:rgba(255,255,255,.3); font-size:20px; font-style:normal; }
.playmat-zone.prizes { top:64px; right:14px; }
.playmat-zone.prizes > div { display:grid; grid-template-columns:repeat(2,25px); gap:4px; }
.playmat-zone.prizes i { width:25px; height:35px; border:1px solid rgba(255,255,255,.2); border-radius:4px; background:linear-gradient(145deg,var(--deck-accent),#101729); }
.playmat-zone.active-card { top:31%; left:50%; transform:translate(-50%,-50%); }
.playmat-zone.active-card img { width:104px; }
.playmat-zone.deck-stack { top:55%; right:15px; transform:translateY(-50%); }
.card-back { display:grid; width:48px; height:67px; place-items:center; border:3px solid #d4b83f; border-radius:6px; color:white; background:radial-gradient(circle,#b52d34 0 13%,#f4f5fa 14% 18%,#2757a5 19% 54%,#142f6d 55%); box-shadow:4px 4px 0 #101a2d; font-size:8px; font-weight:900; }
.playmat-zone.discard { top:72%; right:15px; transform:translateY(-50%); }
.playmat-zone.bench { bottom:70px; left:50%; width:76%; transform:translateX(-50%); }
.playmat-zone.bench > div { display:flex; justify-content:center; gap:7px; }
.playmat-zone.bench i { display:grid; width:54px; min-width:0; place-items:center; font-style:normal; }
.playmat-zone.bench img { width:54px; }
.playmat-zone.bench .empty-slot { height:75px; border:1px dashed rgba(255,255,255,.2); border-radius:7px; color:rgba(255,255,255,.2); }
.playmat-zone.hand { bottom:9px; left:50%; transform:translateX(-50%); }
.playmat-zone.hand > div { display:flex; justify-content:center; }
.playmat-zone.hand i { width:24px; height:35px; margin-left:-5px; border:1px solid rgba(255,255,255,.2); border-radius:4px; background:linear-gradient(145deg,#315eb0,#132c68); transform:rotate(calc((var(--card) - 3) * 3deg)) translateY(calc(abs(var(--card) - 3) * 1px)); }
.digital-playmat[data-focus="active"] .active-card img,.digital-playmat[data-focus="bench"] .bench { animation:zone-focus 1.8s ease-in-out infinite; filter:drop-shadow(0 0 13px var(--deck-accent)); }
@keyframes zone-focus { 50% { transform:translate(-50%,-50%) scale(1.045); } }
.digital-playmat[data-focus="bench"] .bench { animation-name:zone-focus-bench; }
@keyframes zone-focus-bench { 50% { transform:translateX(-50%) scale(1.03); } }
.digital-playmat.compact { min-height:390px; }
.digital-playmat.compact .playmat-zone.active-card img { width:80px; }
.digital-playmat.compact .playmat-zone.bench img,.digital-playmat.compact .playmat-zone.bench i { width:42px; }
.digital-playmat.compact .playmat-zone.bench .empty-slot { height:59px; }
.rule-card-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.rule-card-grid article { padding:14px; border:1px solid var(--line); border-radius:17px; background:var(--surface); }
.rule-card-grid i { display:grid; width:34px; height:34px; margin-bottom:10px; place-items:center; border-radius:11px; color:var(--accent-2); background:rgba(var(--accent-rgb),.12); font-style:normal; font-weight:900; }
.rule-card-grid strong { display:block; font-size:11px; }
.rule-card-grid p { margin:5px 0 0; color:var(--muted); font-size:8px; line-height:1.45; }
.learn-lower-grid { display:grid; margin-top:18px; gap:10px; }
.learn-checklist { display:grid; gap:6px; }
.learn-checklist > button { display:grid; min-height:44px; padding:7px; grid-template-columns:28px minmax(0,1fr); align-items:center; gap:9px; border-bottom:1px solid var(--line); color:var(--text); background:transparent; text-align:left; }
.learn-checklist > button > i { display:grid; width:24px; height:24px; place-items:center; border:1px solid var(--line-strong); border-radius:8px; color:white; font-size:10px; font-style:normal; }
.learn-checklist > button.checked > i { border-color:var(--good); background:var(--good); }
.learn-checklist > button.checked > span { color:var(--muted); text-decoration:line-through; }
.learn-video-card { position:relative; display:grid; min-height:220px; padding:22px; grid-template-columns:65px minmax(0,1fr); align-items:center; gap:17px; overflow:hidden; border:1px solid rgba(255,80,80,.32); border-radius:22px; color:white; background:radial-gradient(circle at 85% 0,rgba(255,50,50,.34),transparent 43%),linear-gradient(145deg,#15151b,#250a0d); text-decoration:none; }
.video-play { display:grid; width:65px; height:65px; place-items:center; border-radius:50%; color:white; background:#ff3030; box-shadow:0 0 35px rgba(255,48,48,.42); font-size:22px; }
.learn-video-card h2 { margin:2px 0 7px; }
.learn-video-card p { margin:0 0 12px; color:rgba(255,255,255,.68); font-size:10px; }
.learn-video-card b { font-size:10px; }
.first-turn-card { margin-top:10px; }
.first-turn-card ol { display:grid; padding-left:22px; gap:9px; color:var(--muted); font-size:10px; }
.first-turn-card strong { color:var(--text); }

/* Proxy builder */
.proxy-controls { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:14px; }
.proxy-controls h2 { margin:0 0 3px; }
.proxy-controls small { color:var(--muted); font-size:9px; }
.proxy-options { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:stretch; gap:7px; }
.proxy-options label { display:grid; gap:4px; color:var(--muted); font-size:8px; }
.proxy-size-lock { display:grid; min-height:48px; padding:7px 11px; align-content:center; border:1px solid var(--line); border-radius:13px; background:var(--surface-2); }
.proxy-size-lock strong,.proxy-size-lock small { display:block; }
.proxy-size-lock strong { font-size:10px; }
.proxy-size-lock small { margin-top:2px; color:var(--muted); font-size:7px; }
.toggle-option { display:grid; min-height:48px; padding:7px 9px; grid-template-columns:24px minmax(0,1fr); align-items:center; gap:8px; border:1px solid var(--line); border-radius:13px; color:var(--text); background:var(--surface-2); text-align:left; }
.toggle-option > i { display:grid; width:22px; height:22px; place-items:center; border:1px solid var(--line-strong); border-radius:7px; font-size:9px; font-style:normal; }
.toggle-option.active { border-color:var(--accent); }
.toggle-option.active > i { color:white; border-color:var(--accent); background:var(--accent); }
.toggle-option span,.toggle-option strong,.toggle-option small { display:block; }
.toggle-option strong { font-size:9px; }
.toggle-option small { margin-top:2px; font-size:7px; }
.proxy-print-button { grid-column:1 / -1; }
.proxy-screen-note { display:flex; margin:11px 0; padding:11px 14px; align-items:center; justify-content:space-between; gap:12px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.proxy-screen-note span { color:var(--muted); font-size:8px; text-align:right; }
.proxy-print-root { display:grid; gap:18px; }
.proxy-sheet { position:relative; width:min(100%,8.5in); min-width:8.5in; min-height:11in; margin:auto; padding:.25in .5in; overflow:auto; border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:var(--shadow); }
.proxy-grid { position:relative; z-index:2; display:grid; width:7.5in; height:10.5in; margin:auto; grid-template-columns:repeat(3,2.5in); grid-template-rows:repeat(3,3.5in); gap:0; }
.proxy-card { position:relative; width:2.5in; height:3.5in; overflow:hidden; border:.35mm dashed #555; border-radius:0; background:white; }
.proxy-card > img { width:100%; height:100%; object-fit:fill; }
.proxy-card > small { position:absolute; right:2px; bottom:2px; left:2px; padding:2px; overflow:hidden; border-radius:2px; color:#fff; background:rgba(0,0,0,.72); font-size:5px; text-align:center; text-overflow:ellipsis; white-space:nowrap; }
.proxy-watermark { position:absolute; inset:42% -12%; padding:5px; color:rgba(190,0,0,.82); background:rgba(255,255,255,.68); font-size:8px; font-weight:1000; letter-spacing:1px; line-height:1.2; text-align:center; transform:rotate(-24deg); }
.proxy-print-root.grayscale .proxy-card > img { filter:grayscale(1) contrast(1.06); }
.proxy-sheet-id { position:absolute; right:.08in; bottom:.05in; color:#555; font:6pt/1 sans-serif; writing-mode:vertical-rl; }
.proxy-cut-guides { position:absolute; z-index:3; inset:0; pointer-events:none; }
.proxy-cut-guides i { position:absolute; display:block; opacity:.75; }
.proxy-cut-guides .cut-v { top:0; bottom:0; border-left:1px dotted #555; }
.proxy-cut-guides .cut-h { right:0; left:0; border-top:1px dotted #555; }
.cut-v-1{left:.5in}.cut-v-2{left:3in}.cut-v-3{left:5.5in}.cut-v-4{left:8in}
.cut-h-1{top:.25in}.cut-h-2{top:3.75in}.cut-h-3{top:7.25in}.cut-h-4{top:10.75in}

/* Layout chooser */
.layout-mode-picker { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.layout-mode-picker button { display:grid; min-height:76px; padding:10px; grid-template-columns:32px minmax(0,1fr); align-items:center; gap:8px; border:1px solid var(--line); border-radius:14px; color:var(--text); background:var(--surface-2); text-align:left; }
.layout-mode-picker button.active { border-color:var(--accent); box-shadow:inset 0 0 20px rgba(var(--accent-rgb),.1); }
.layout-mode-picker i { display:grid; width:30px; height:30px; place-items:center; border-radius:9px; color:var(--accent-2); background:rgba(var(--accent-rgb),.12); font-style:normal; font-weight:900; }
.layout-mode-picker span,.layout-mode-picker strong,.layout-mode-picker small { display:block; }
.layout-mode-picker strong { font-size:10px; }
.layout-mode-picker small { margin-top:3px; color:var(--muted); font-size:7px; }

/* Wide-screen mode is automatic for a fine pointer and can be forced in Settings. */
body[data-layout="desktop"] .app-shell { width:100%; margin:0; }
body[data-layout="desktop"] .topbar { left:132px; width:calc(100% - 132px); padding-right:28px; padding-left:24px; transform:none; }
body[data-layout="desktop"] .bottom-nav { top:0; bottom:auto; left:0; width:132px; height:100vh; padding:82px 9px 18px; grid-template-columns:1fr; grid-template-rows:repeat(6,68px); align-content:start; gap:5px; transform:none; border-top:0; border-right:1px solid var(--line); }
body[data-layout="desktop"] .nav-item { flex-direction:row; justify-content:flex-start; padding:0 10px; gap:9px; font-size:9px; text-align:left; }
body[data-layout="desktop"] .nav-item > span { text-align:left; }
body[data-layout="desktop"] .nav-item.active::before { top:auto; right:auto; bottom:auto; left:0; width:3px; height:28px; }
body[data-layout="desktop"] .app-view { width:calc(100% - 132px); max-width:1560px; margin-left:132px; padding:calc(var(--topbar) + 28px) clamp(24px,3vw,48px) 48px; }
body[data-layout="desktop"] .deck-editor-layout { grid-template-columns:290px minmax(0,1fr); align-items:start; gap:18px; }
body[data-layout="desktop"] .deck-editor-sidebar { position:sticky; top:calc(var(--topbar) + 18px); min-width:0; }
body[data-layout="desktop"] .saved-deck-scroll { max-height:calc(100vh - 250px); margin:0; padding:0 4px 8px 0; grid-auto-columns:auto; grid-auto-flow:row; overflow-x:hidden; overflow-y:auto; scroll-snap-type:y proximity; scrollbar-width:thin; }
body[data-layout="desktop"] .saved-deck-card { min-height:112px; }
body[data-layout="desktop"] .deck-command-bar { top:calc(var(--topbar) + 11px); }
body[data-layout="desktop"] .hero { min-height:360px; }
body[data-layout="desktop"] .hero-content { padding:28px; }
body[data-layout="desktop"] .hero-art { right:6%; width:240px; max-width:240px; }
body[data-layout="desktop"] .quick-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
body[data-layout="desktop"] .quick-grid--compact { grid-template-columns:repeat(3,minmax(0,1fr)); }
body[data-layout="desktop"] .store-link-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
body[data-layout="desktop"] .meta-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
body[data-layout="desktop"] .set-card-grid { grid-template-columns:repeat(6,minmax(0,1fr)); }
body[data-layout="desktop"] .learn-stage { grid-template-columns:minmax(0,1.7fr) minmax(290px,.7fr); align-items:stretch; }
body[data-layout="desktop"] .learn-step-copy { display:flex; padding:26px; flex-direction:column; justify-content:center; }
body[data-layout="desktop"] .rule-card-grid { grid-template-columns:repeat(6,minmax(0,1fr)); }
body[data-layout="desktop"] .learn-lower-grid { grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); }
body[data-layout="desktop"] .digital-playmat { border-radius:20px 0 0 20px; }
body[data-layout="desktop"] .binder-guide { max-width:1040px; margin-inline:auto; }
body[data-layout="desktop"] .binder-page-shell { max-width:940px; padding:20px 17px 20px 31px; overflow:visible; }
body[data-layout="desktop"] .binder-pocket-grid { gap:8px; }
body[data-layout="desktop"] .binder-pocket-grid.binder-3x3 { grid-template-columns:repeat(3,minmax(0,220px)); justify-content:center; }
body[data-layout="desktop"] .binder-pocket-label strong { font-size:8px; }
body[data-layout="desktop"] .binder-pocket-label small { font-size:6px; }
body[data-layout="desktop"] .binder-page-jumps > button:hover .binder-page-hover-preview,
body[data-layout="desktop"] .binder-page-jumps > button:focus-visible .binder-page-hover-preview { opacity:1; visibility:visible; transform:translate(-50%,0); }

@media (max-width: 620px) {
  .app-view { padding-right:14px; padding-left:14px; }
  .bottom-nav { width:100%; border-radius:0; }
  .nav-item { min-height:0; gap:3px; font-size:clamp(6.5px,1.9vw,7.5px); }
  .nav-item svg { width:19px; height:19px; flex:0 0 auto; }
  .nav-item > span { min-height:17px; }
  .page-head { align-items:flex-start; flex-wrap:wrap; gap:9px; }
  .page-head > * { min-width:0; }
  .primary-button,.secondary-button,.ghost-button,.danger-button { max-width:100%; min-width:0; padding-right:11px; padding-left:11px; font-size:11px; line-height:1.15; text-align:center; }
  .button-row { display:grid; width:100%; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .button-row > button,.button-row > a { width:100%; min-width:0; }
  .brand-type { display:none; }
  .quick-grid--compact { grid-template-columns:1fr 1fr; }
  .quick-grid--compact .quick-card:last-child { grid-column:1 / -1; }
  .store-search-panel { grid-template-columns:1fr; }
  .store-search-panel > .primary-button { width:100%; }
  .store-link-grid { grid-template-columns:1fr; }
  .standard-rule-list { grid-template-columns:1fr; }
  .binder-toolbar { align-items:flex-start; flex-direction:column; }
  .binder-pocket-grid.binder-4x3 { grid-template-columns:repeat(4,minmax(66px,1fr)); }
  .binder-page-shell { overflow-x:auto; }
  .binder-pocket-grid.binder-4x3 { min-width:390px; }
  .binder-page-jumps { flex-wrap:nowrap; justify-content:flex-start; overflow-x:auto; overflow-y:hidden; scrollbar-width:thin; }
  .binder-page-jump-label { position:static; flex:0 0 auto; padding:8px 5px; background:transparent; }
  .binder-page-jumps > button { flex:0 0 auto; }
  .binder-page-hover-preview { display:none; }
  .binder-pagination { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .binder-pagination > span { grid-column:1 / -1; grid-row:1; padding:3px 0 6px; }
  .binder-pagination > button { grid-row:2; width:100%; min-width:0; padding-right:8px; padding-left:8px; }
  .binder-pagination button:last-child { justify-self:stretch; }
  .meta-snapshot { align-items:flex-start; flex-direction:column; }
  .meta-snapshot a { width:100%; }
  .deck-command-bar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .deck-command-bar button { min-width:0; padding-right:7px; padding-left:7px; font-size:10px; }
  .deck-command-bar .ghost-button { grid-column:1 / -1; }
  .editor-save-state { max-width:140px; }
  .export-option-grid { grid-template-columns:1fr; }
  .learn-step-tabs { display:flex; overflow-x:auto; }
  .learn-step-tabs button { min-width:115px; }
  .rule-card-grid { grid-template-columns:1fr 1fr; }
  .digital-playmat { min-height:440px; }
  .playmat-zone.active-card img { width:84px; }
  .playmat-zone.bench { width:86%; }
  .playmat-zone.bench i,.playmat-zone.bench img { width:42px; }
  .playmat-zone.bench .empty-slot { height:59px; }
  .learn-video-card { min-height:190px; padding:16px; grid-template-columns:52px minmax(0,1fr); }
  .video-play { width:52px; height:52px; }
  .proxy-controls { grid-template-columns:1fr; }
  .proxy-options { justify-content:flex-start; }
  .proxy-screen-note { align-items:flex-start; flex-direction:column; }
  .proxy-screen-note span { text-align:left; }
  .proxy-sheet { margin:0 -10px; padding:10px 2px; border-radius:12px; }
  .proxy-grid { transform-origin:top left; }
  .layout-mode-picker { grid-template-columns:1fr; }
  .card-row { grid-template-columns:14px 35px minmax(0,1fr) auto; gap:7px; }
  .poster-export-progress { min-height:min(390px,72dvh); }
  .poster-progress-ring { width:150px; height:150px; }
  .poster-progress-ring::before { width:120px; height:120px; }
  .poster-progress-ring strong { font-size:29px; }
  .poster-export-progress > h2 { font-size:19px; }
  .modal-sheet { width:100%; max-height:calc(100dvh - env(safe-area-inset-top) - 6px); }
}

@media (max-width: 390px) {
  :root { --nav:82px; }
  .format-pill { display:none; }
  .binder-pocket-grid.binder-3x3 { min-width:310px; }
  .binder-page-shell { padding-left:27px; }
  .rule-card-grid { grid-template-columns:1fr; }
  .digital-playmat { min-height:410px; }
  .playmat-zone.prizes { right:7px; }
  .playmat-zone.deck-stack,.playmat-zone.discard { right:7px; }
  .playmat-zone.stadium { left:7px; }
  .playmat-zone.bench i,.playmat-zone.bench img { width:38px; }
  .playmat-zone.bench .empty-slot { height:53px; }
  .button-row { grid-template-columns:1fr; }
  .nav-item { font-size:6.4px; }
  .nav-item svg { width:17px; height:17px; }
}

@media (max-height: 500px) and (orientation: landscape) {
  :root { --nav:64px; }
  .bottom-nav { padding-top:4px; padding-bottom:calc(4px + env(safe-area-inset-bottom)); }
  .nav-item { flex-direction:row; gap:5px; font-size:7px; }
  .nav-item svg { width:16px; height:16px; }
  .nav-item > span { display:block; min-height:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
}

/* v2.0 Meta 300 search, hybrid stores, and Steam-inspired library */
.meta300-card-results {
  display:grid;
  margin:10px 0 15px;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
}
.meta300-search-prompt,.meta300-card-results .ai-no-results {
  display:grid;
  min-height:76px;
  padding:15px;
  place-content:center;
  grid-column:1/-1;
  gap:4px;
  border:1px dashed var(--line-strong);
  border-radius:15px;
  color:var(--muted);
  text-align:center;
}
.meta300-search-prompt strong { color:var(--text); }
.meta300-card-choice {
  display:grid;
  min-width:0;
  min-height:62px;
  padding:7px;
  grid-template-columns:42px minmax(0,1fr);
  grid-template-rows:auto auto;
  align-items:center;
  column-gap:9px;
  border:1px solid var(--line);
  border-radius:13px;
  color:var(--text);
  background:rgba(255,255,255,.025);
  text-align:left;
}
.meta300-card-choice:hover,.meta300-card-choice.active { border-color:rgba(var(--accent-rgb),.7); background:rgba(var(--accent-rgb),.1); }
.meta300-card-choice > span { width:42px; height:48px; grid-row:1/3; overflow:hidden; border-radius:7px; }
.meta300-card-choice img { width:100%; height:100%; object-fit:contain; }
.meta300-card-choice b,.meta300-card-choice small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.meta300-card-choice b { align-self:end; font-size:10px; }
.meta300-card-choice small { align-self:start; color:var(--muted); font-size:8px; }
.store-more-link {
  display:flex;
  width:fit-content;
  margin:10px 0 0 auto;
  padding:8px 11px;
  border-radius:10px;
  color:var(--accent-2);
  background:rgba(var(--accent-rgb),.08);
  font-size:9px;
  font-weight:750;
  text-decoration:none;
}
.meta-spotlight {
  margin-bottom:14px;
  padding:15px;
  overflow:hidden;
  background:radial-gradient(circle at 8% 0,rgba(var(--accent-rgb),.22),transparent 38%),linear-gradient(145deg,rgba(255,255,255,.035),rgba(255,255,255,.01));
}
.spotlight-arrows { display:flex; gap:6px; }
.spotlight-arrows button {
  display:grid;
  width:34px;
  height:34px;
  place-items:center;
  border:1px solid var(--line);
  border-radius:10px;
  color:var(--text);
  background:rgba(255,255,255,.04);
  font-size:20px;
}
.meta-spotlight-track {
  display:grid;
  padding:8px calc(50% - min(260px,42vw)) 13px;
  grid-auto-columns:min(520px,84vw);
  grid-auto-flow:column;
  gap:12px;
  overflow-x:auto;
  overscroll-behavior-inline:contain;
  scroll-snap-type:x mandatory;
  scrollbar-width:thin;
}
.spotlight-card {
  position:relative;
  display:grid;
  min-height:210px;
  padding:20px 20px 20px 165px;
  align-items:center;
  scroll-snap-align:center;
  overflow:hidden;
  border:1px solid color-mix(in srgb,var(--deck-accent) 45%,var(--line));
  border-radius:21px;
  color:white;
  background:linear-gradient(115deg,color-mix(in srgb,var(--deck-accent) 32%,#0a0d16),#0a0d16 70%);
  text-align:left;
  box-shadow:0 18px 40px rgba(0,0,0,.28);
}
.spotlight-card::after { content:""; position:absolute; inset:0; pointer-events:none; background:linear-gradient(100deg,transparent,rgba(255,255,255,.07),transparent); transform:translateX(-110%); transition:transform .6s ease; }
.spotlight-card:hover::after { transform:translateX(110%); }
.spotlight-card.spotlight-confirm { animation:spotlightConfirm .32s ease; }
@keyframes spotlightConfirm { 50% { transform:scale(.985); box-shadow:0 0 32px color-mix(in srgb,var(--deck-accent) 42%,transparent); } }
.spotlight-rank { position:absolute; top:14px; right:14px; z-index:2; padding:6px 9px; border-radius:999px; background:rgba(5,8,15,.68); font-size:11px; font-weight:900; }
.spotlight-art { position:absolute; bottom:-30px; left:18px; width:135px; height:200px; transform:rotate(-4deg); filter:drop-shadow(0 18px 16px rgba(0,0,0,.45)); }
.spotlight-art img { width:100%; height:100%; object-fit:contain; }
.spotlight-card > span:last-child { display:grid; min-width:0; gap:5px; }
.spotlight-card small,.spotlight-card em { color:rgba(255,255,255,.72); font-size:9px; font-style:normal; }
.spotlight-card strong { font-size:clamp(18px,3vw,29px); line-height:1.02; }
.steam-library-shell { display:grid; grid-template-columns:1fr; gap:12px; }
.steam-library-sidebar {
  display:flex;
  padding:9px;
  gap:6px;
  overflow-x:auto;
  align-items:center;
  scrollbar-width:none;
}
.steam-library-sidebar > div { display:none; }
.steam-library-sidebar .filter-chip { flex:0 0 auto; margin:0; }
.steam-library-sidebar > a { flex:0 0 auto; padding:8px 10px; color:var(--muted); font-size:8px; text-decoration:none; }
.steam-library-main { min-width:0; }
.steam-library-toolbar { display:grid; margin-bottom:14px; padding:10px; grid-template-columns:minmax(0,1fr) auto; gap:9px; }
.steam-library-toolbar .search-bar { margin:0; }
.steam-library-toolbar .mini-select { min-width:160px; }
.steam-shelf { margin:0 0 20px; }
.steam-shelf-track {
  display:grid;
  padding:2px 2px 9px;
  grid-auto-columns:minmax(155px,190px);
  grid-auto-flow:column;
  gap:9px;
  overflow-x:auto;
  scroll-snap-type:x proximity;
  scrollbar-width:thin;
}
.steam-deck-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.steam-deck-card {
  display:grid;
  min-width:0;
  padding:0;
  grid-template-rows:150px auto;
  scroll-snap-align:start;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:15px;
  color:var(--text);
  background:linear-gradient(155deg,rgba(255,255,255,.045),rgba(255,255,255,.012));
  text-align:left;
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.steam-deck-card:hover,.steam-deck-card.selected { transform:translateY(-3px); border-color:var(--deck-accent); box-shadow:0 10px 30px rgba(0,0,0,.2),0 0 24px color-mix(in srgb,var(--deck-accent) 20%,transparent); }
.steam-cover { position:relative; display:grid; overflow:hidden; place-items:center; background:radial-gradient(circle at 50% 85%,color-mix(in srgb,var(--deck-accent) 45%,transparent),transparent 55%),#0b0e16; }
.steam-cover img { width:88%; height:145%; margin-top:40%; object-fit:contain; transform:rotate(-3deg); filter:drop-shadow(0 14px 10px rgba(0,0,0,.5)); }
.steam-cover i { position:absolute; top:8px; left:8px; padding:5px 7px; border-radius:8px; color:white; background:rgba(4,7,12,.72); font-size:9px; font-style:normal; font-weight:900; }
.steam-card-copy { display:grid; min-width:0; padding:10px; gap:3px; }
.steam-card-copy strong,.steam-card-copy small,.steam-card-copy em { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.steam-card-copy strong { font-size:10px; }
.steam-card-copy small { color:var(--muted); font-size:8px; }
.steam-card-copy em { color:var(--accent-2); font-size:7px; font-style:normal; }
.steam-all-decks { margin-top:8px; }

body[data-layout="desktop"] .steam-library-shell { grid-template-columns:210px minmax(0,1fr); align-items:start; gap:16px; }
body[data-layout="desktop"] .steam-library-sidebar { position:sticky; top:calc(var(--topbar) + 14px); display:grid; padding:15px; overflow:visible; }
body[data-layout="desktop"] .steam-library-sidebar > div { display:grid; padding:4px 7px 12px; gap:2px; border-bottom:1px solid var(--line); }
body[data-layout="desktop"] .steam-library-sidebar > div small { color:var(--muted); font-size:8px; }
body[data-layout="desktop"] .steam-library-sidebar .filter-chip { width:100%; justify-content:flex-start; text-align:left; }
body[data-layout="desktop"] .steam-library-sidebar > a { margin-top:8px; border-top:1px solid var(--line); }
body[data-layout="desktop"] .steam-deck-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
body[data-layout="desktop"] .meta300-card-results { grid-template-columns:repeat(3,minmax(0,1fr)); }
body[data-layout="desktop"] .spotlight-card { min-height:250px; padding-left:190px; }
body[data-layout="desktop"] .spotlight-art { width:160px; height:230px; }

@media (max-width:620px) {
  .meta300-card-results { grid-template-columns:1fr; }
  .steam-library-toolbar { grid-template-columns:1fr; }
  .steam-library-toolbar .mini-select { width:100%; }
  .meta-spotlight { margin-inline:-4px; padding-inline:8px; }
  .meta-spotlight-track { grid-auto-columns:86vw; padding-inline:7vw; }
  .spotlight-card { min-height:190px; padding:16px 14px 16px 125px; }
  .spotlight-art { left:8px; width:112px; height:175px; }
  .spotlight-card strong { font-size:18px; }
  .steam-deck-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .steam-deck-card { grid-template-rows:128px auto; }
}

@media (prefers-reduced-motion:reduce) {
  .meta-spotlight-track,.steam-shelf-track { scroll-behavior:auto; }
  .spotlight-card::after,.steam-deck-card { transition:none; }
  .spotlight-card.spotlight-confirm { animation:none; }
}

/* v2.1 unified Decks Hub */
.decks-hub-head { align-items:flex-end; }
.decks-hub-head h1 { margin-bottom:7px; }
.decks-hub-head p { max-width:670px; margin:0; color:var(--muted); font-size:10px; line-height:1.55; }
.meta-snapshot { display:grid; min-width:140px; padding:12px 15px; border:1px solid var(--line); border-radius:16px; background:var(--surface); font-size:9px; }
.meta-snapshot strong { color:var(--accent-2); font-size:24px; line-height:1; }
.meta-snapshot small { margin-top:4px; color:var(--muted); }
.decks-hub-toolbar { display:grid; margin:0 0 9px; padding:10px; grid-template-columns:minmax(0,1fr) auto; gap:9px; }
.decks-hub-toolbar .search-bar { margin:0; }
.decks-hub-toolbar .mini-select { min-width:185px; }
.deck-filter-row { display:flex; margin:0 0 19px; padding:2px 0 7px; gap:7px; overflow-x:auto; scrollbar-width:none; }
.deck-filter-row .filter-chip { flex:0 0 auto; }
.archetype-browser { margin-top:8px; }
.archetype-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; align-items:start; }
.archetype-group-card { min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:18px; background:linear-gradient(150deg,color-mix(in srgb,var(--deck-accent) 8%,var(--surface)),var(--surface)); transition:border-color .18s ease,box-shadow .18s ease; }
.archetype-group-card:hover,.archetype-group-card.expanded { border-color:color-mix(in srgb,var(--deck-accent) 65%,var(--line)); box-shadow:0 14px 34px rgba(0,0,0,.22),0 0 24px color-mix(in srgb,var(--deck-accent) 12%,transparent); }
.archetype-group-card.expanded { grid-column:1/-1; }
.archetype-group-summary { display:grid; width:100%; min-height:194px; padding:12px; grid-template-columns:118px minmax(0,1fr); align-items:center; gap:14px; color:var(--text); background:transparent; text-align:left; }
.archetype-cover { display:grid; width:112px; aspect-ratio:2.5/3.5; place-items:center; overflow:hidden; border-radius:9px; background:rgba(0,0,0,.22); box-shadow:0 13px 25px rgba(0,0,0,.34); }
.archetype-cover img { display:block; width:100%; height:100%; margin:0; object-fit:contain; transform:none; }
.archetype-summary-copy { display:grid; min-width:0; gap:5px; }
.archetype-summary-copy small,.archetype-summary-copy em { color:var(--muted); font-size:8px; font-style:normal; }
.archetype-summary-copy strong { font-size:clamp(15px,2vw,21px); line-height:1.08; }
.archetype-summary-copy b { margin-top:7px; color:var(--accent-2); font-size:9px; }
.archetype-summary-copy b i { display:inline-block; font-style:normal; transition:transform .18s ease; }
.archetype-group-card.expanded .archetype-summary-copy b i { transform:rotate(180deg); }
.archetype-variants { padding:0 14px 14px; border-top:1px solid var(--line); }
.variant-chip-row { display:flex; padding:12px 0 9px; gap:6px; overflow-x:auto; }
.variant-chip-row span { flex:0 0 auto; padding:5px 8px; border-radius:999px; color:var(--accent-2); background:rgba(var(--accent-rgb),.1); font-size:7px; font-weight:750; }
.variant-list { display:grid; gap:6px; }
.variant-row { display:grid; min-width:0; min-height:54px; padding:8px; grid-template-columns:36px minmax(0,1fr) auto auto; align-items:center; gap:9px; border:1px solid var(--line); border-radius:12px; color:var(--text); background:rgba(255,255,255,.025); text-align:left; }
.variant-row:hover { border-color:var(--deck-accent); background:rgba(var(--accent-rgb),.07); }
.variant-rank { display:grid; width:34px; height:34px; place-items:center; border-radius:10px; color:white; background:color-mix(in srgb,var(--deck-accent) 62%,#111827); font-size:9px; font-weight:900; }
.variant-row span,.variant-row strong,.variant-row small { display:block; min-width:0; }
.variant-row strong,.variant-row small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.variant-row strong { font-size:9px; }
.variant-row small { margin-top:3px; color:var(--muted); font-size:7px; }
.variant-row em { color:var(--accent-2); font-size:8px; font-style:normal; }
.variant-row b { font-size:8px; }
.meta-source-line { margin:20px 0 0; color:var(--muted); font-size:8px; text-align:center; }
.deck-preview-head p { margin:5px 0 0; color:var(--muted); font-size:9px; }
.deck-preview-meta { display:grid; margin:12px 0; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; }
.deck-preview-meta span { display:grid; padding:9px; border:1px solid var(--line); border-radius:11px; color:var(--muted); font-size:7px; }
.deck-preview-meta strong { color:var(--text); font-size:14px; }
.deck-preview-actions { display:flex; margin-bottom:18px; flex-wrap:wrap; gap:7px; }
.preview-card-section { margin:17px 0; }
.preview-card-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; }
.preview-card-tile { display:grid; min-width:0; gap:3px; }
.preview-card-tile > span { position:relative; display:grid; width:100%; aspect-ratio:2.5/3.5; overflow:hidden; place-items:center; border-radius:7px; background:rgba(0,0,0,.22); }
.preview-card-tile img { display:block; width:100%; height:100%; object-fit:contain; }
.preview-card-tile b { position:absolute; top:5px; right:5px; display:grid; min-width:24px; height:24px; padding:0 5px; place-items:center; border-radius:999px; color:white; background:rgba(5,7,12,.86); font-size:9px; }
.preview-card-tile small,.preview-card-tile em { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.preview-card-tile small { color:var(--text); font-size:7px; }
.preview-card-tile em { color:var(--muted); font-size:6px; font-style:normal; }
.preview-alternatives { margin-top:20px; padding-top:15px; border-top:1px solid var(--line); }
.preview-alternatives > div:last-child { display:flex; gap:6px; overflow-x:auto; }
.preview-alternatives button { flex:0 0 auto; padding:7px 9px; border:1px solid var(--line); border-radius:9px; color:var(--muted); background:var(--surface-2); font-size:7px; }
.preview-alternatives button.active { color:white; border-color:var(--accent); background:var(--accent); }
.steam-cover img,.library-preview-art img { width:100%; height:100%; margin:0; object-fit:contain; transform:none; }
body[data-layout="desktop"] .modal-sheet:has(.deck-preview-head) { width:min(1080px,calc(100vw - 48px)); max-width:1080px; }
body[data-layout="desktop"] .archetype-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
body[data-layout="desktop"] .archetype-group-card.expanded { grid-column:1/-1; }
.master-load-more { display:block; min-width:220px; margin:16px auto 0; }
.variant-rank { line-height:1; text-align:center; }

/* v2.2 Collection binder workspace */
.collection-head p { max-width:680px; margin:6px 0 0; color:var(--muted); font-size:10px; }
.collection-command-bar { display:flex; margin-bottom:14px; padding:10px; align-items:end; flex-wrap:wrap; gap:7px; }
.collection-command-bar label { display:grid; min-width:140px; gap:4px; color:var(--muted); font-size:7px; }
.collection-command-bar .ghost-button { color:#fca5a5; }
.collection-color-control { min-width:72px !important; }
.collection-color-control input { width:100%; height:36px; padding:2px; border:1px solid var(--line); border-radius:9px; background:var(--surface-2); }
.collection-workspace { display:grid; gap:14px; }
.collection-library { min-width:0; padding:13px; }
.collection-library .search-bar { margin:0 0 8px; }
.collection-filter-grid { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.collection-filter-grid label { display:grid; gap:4px; color:var(--muted); font-size:7px; }
.collection-filter-grid .mini-select { width:100%; min-width:0; height:30px; padding-right:24px; font-size:8px; }
.collection-fill-set { min-height:32px; margin-top:8px; }
.collection-card-results { display:grid; max-height:650px; margin-top:10px; padding-right:3px; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
.collection-library-card { display:grid; min-width:0; padding:6px; grid-template-columns:44px minmax(0,1fr); grid-template-rows:auto auto; align-items:center; column-gap:7px; border:1px solid var(--line); border-radius:11px; color:var(--text); background:rgba(255,255,255,.025); text-align:left; transition:border-color .15s ease,transform .15s ease,opacity .15s ease; }
.collection-library-card:hover,.collection-library-card.selected { border-color:var(--accent); transform:translateY(-1px); background:rgba(var(--accent-rgb),.08); }
.collection-library-card.dragging { opacity:.42; }
.collection-library-card > span { width:42px; height:58px; grid-row:1/3; overflow:hidden; border-radius:5px; }
.collection-library-card img { width:100%; height:100%; object-fit:contain; }
.collection-library-card strong,.collection-library-card small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.collection-library-card strong { align-self:end; font-size:8px; }
.collection-library-card small { align-self:start; color:var(--muted); font-size:6px; }
.collection-library-status { display:grid; min-height:170px; margin-top:10px; place-items:center; align-content:center; gap:9px; border:1px dashed var(--line-strong); border-radius:13px; color:var(--muted); font-size:9px; text-align:center; }
.collection-library-status i { width:28px; height:28px; border:3px solid var(--line); border-top-color:var(--accent); border-radius:50%; animation:collectionSpin 1s linear infinite; }
@keyframes collectionSpin { to { transform:rotate(360deg); } }
.collection-library-status.error { color:#fca5a5; }
.collection-binder-stage { min-width:0; padding:clamp(12px,2.5vw,26px); overflow:auto; border:1px solid color-mix(in srgb,var(--binder-color) 70%,var(--line)); border-radius:22px; background:linear-gradient(135deg,color-mix(in srgb,var(--binder-color) 78%,#0b0c12),color-mix(in srgb,var(--binder-color) 38%,#07080d)); box-shadow:inset 0 0 45px rgba(0,0,0,.4),0 20px 50px rgba(0,0,0,.25); }
.binder-spread { display:grid; min-width:690px; grid-template-columns:1fr 1fr; gap:16px; perspective:1200px; }
.collection-binder-column { min-width:0; }
.collection-page-navigation { margin-bottom:9px; padding:8px; }
.collection-desktop-pages,.collection-mobile-pages { display:grid; grid-template-columns:auto minmax(180px,1fr) auto; align-items:end; gap:8px; }
.collection-desktop-pages label,.collection-mobile-pages label { display:grid; gap:3px; color:var(--muted); font-size:7px; }
.collection-mobile-pages,.collection-mobile-page,.collection-mobile-selection { display:none; }
.collection-binder-page { position:relative; padding:16px; border:1px solid rgba(255,255,255,.14); border-radius:13px; background:rgba(10,12,18,.66); box-shadow:inset 0 0 22px rgba(0,0,0,.38),0 9px 25px rgba(0,0,0,.25); }
.collection-binder-page:first-child { transform:rotateY(1.2deg); transform-origin:right center; }
.collection-binder-page:last-child { transform:rotateY(-1.2deg); transform-origin:left center; }
.collection-page-label { margin-bottom:8px; color:rgba(255,255,255,.55); font-size:7px; font-weight:800; letter-spacing:.12em; text-align:center; text-transform:uppercase; }
.collection-pocket-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.collection-pocket { position:relative; display:grid; min-width:0; padding:5px; aspect-ratio:2.5/3.5; place-items:center; overflow:visible; border:1px solid rgba(255,255,255,.16); border-radius:8px; color:rgba(255,255,255,.48); background:linear-gradient(145deg,rgba(255,255,255,.08),rgba(0,0,0,.2)); text-align:center; transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease; }
.collection-pocket.drag-over,.collection-pocket:hover { z-index:3; border-color:var(--accent-2); transform:translateY(-2px); box-shadow:0 0 22px rgba(var(--accent-rgb),.38); }
.collection-pocket.dragging { opacity:.45; }
.collection-pocket .sleeve-frame { display:grid; width:100%; height:100%; padding:3.5%; place-items:center; overflow:hidden; border-radius:6px; background:var(--sleeve); box-shadow:0 5px 12px rgba(0,0,0,.38); }
.collection-pocket .sleeve-frame img { width:100%; height:100%; border-radius:4px; object-fit:contain; }
.collection-pocket > small { position:absolute; right:4px; bottom:4px; left:4px; padding:2px 3px; overflow:hidden; border-radius:4px; color:white; background:rgba(0,0,0,.7); font-size:5px; text-overflow:ellipsis; white-space:nowrap; }
.collection-pocket > i { position:absolute; z-index:4; top:-6px; right:-6px; display:grid; width:20px; height:20px; place-items:center; border-radius:50%; color:white; background:#dc2626; box-shadow:0 3px 8px rgba(0,0,0,.4); font-size:12px; font-style:normal; opacity:0; transition:opacity .15s ease; }
.collection-pocket:hover > i,.collection-pocket:focus-visible > i { opacity:1; }
.empty-pocket-mark { display:grid; width:36px; height:36px; place-items:center; border:1px dashed rgba(255,255,255,.22); border-radius:10px; font-size:10px; }
.secret-settings { display:grid; grid-template-columns:minmax(0,1fr) minmax(180px,300px); align-items:center; gap:14px; }
.secret-settings h2 { margin:2px 0; }
.secret-video { position:relative; width:100%; aspect-ratio:16/9; overflow:hidden; border-radius:16px; background:#000; }
.secret-video iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }
body[data-layout="desktop"] .collection-workspace { grid-template-columns:300px minmax(0,1fr); align-items:start; }
body[data-layout="desktop"] .collection-library { position:sticky; top:calc(var(--topbar) + 14px); }
body[data-layout="desktop"] .collection-filter-grid { grid-template-columns:minmax(0,1fr) 112px; }
.set-complete-button { width:max-content; margin-top:10px; }
.binder-complete-set { white-space:nowrap; }

@media (max-width:620px) {
  .decks-hub-head { align-items:flex-start; }
  .meta-snapshot { width:100%; grid-template-columns:auto 1fr; align-items:end; column-gap:8px; }
  .meta-snapshot small { text-align:right; }
  .decks-hub-toolbar { grid-template-columns:1fr; }
  .decks-hub-toolbar .mini-select { width:100%; }
  .archetype-grid { grid-template-columns:1fr; }
  .archetype-group-card.expanded { grid-column:auto; }
  .archetype-group-summary { min-height:160px; grid-template-columns:92px minmax(0,1fr); }
  .archetype-cover { width:88px; }
  .variant-row { grid-template-columns:34px minmax(0,1fr) auto; }
  .variant-row em { display:none; }
  .preview-card-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .deck-preview-meta { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .deck-preview-actions { display:grid; grid-template-columns:1fr; }
  .collection-command-bar { display:grid; grid-template-columns:1fr 1fr; align-items:end; }
  .collection-command-bar label:first-child { grid-column:1/-1; }
  .collection-command-bar .primary-button,.collection-command-bar .secondary-button,.collection-command-bar .ghost-button { width:100%; }
  .collection-card-results { max-height:340px; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .collection-filter-grid { grid-template-columns:minmax(0,1fr) 112px; }
  .collection-binder-stage { width:100%; margin:0; padding:8px; overflow:hidden; border-radius:16px; }
  .collection-desktop-pages,.collection-desktop-spread { display:none; }
  .collection-mobile-pages { display:grid; grid-template-columns:38px minmax(0,1fr) 38px; }
  .collection-mobile-pages .secondary-button { width:38px; min-width:0; padding:0; }
  .collection-mobile-page { display:block; width:100%; }
  .collection-mobile-page .collection-binder-page { width:100%; transform:none; }
  .collection-mobile-selection { position:sticky; z-index:12; top:calc(var(--topbar) + 5px); display:flex; min-height:48px; margin-bottom:8px; padding:7px 9px; align-items:center; gap:8px; border:1px solid var(--line); border-radius:12px; color:var(--muted); background:color-mix(in srgb,var(--surface) 94%,transparent); backdrop-filter:blur(16px); }
  .collection-mobile-selection.active { border-color:var(--accent); color:var(--text); box-shadow:0 7px 22px rgba(0,0,0,.28); }
  .collection-mobile-selection img { width:30px; height:42px; border-radius:3px; object-fit:contain; }
  .collection-mobile-selection span { display:grid; min-width:0; flex:1; gap:2px; }
  .collection-mobile-selection strong,.collection-mobile-selection small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .collection-mobile-selection strong { font-size:8px; }
  .collection-mobile-selection small { font-size:6px; }
  .collection-mobile-selection button { width:30px; height:30px; color:var(--muted); background:transparent; font-size:18px; }
  .collection-binder-page { padding:8px; }
  .collection-pocket-grid { width:100%; gap:5px; }
  .collection-pocket { width:100%; padding:3px; }
  .collection-pocket > small { display:none; }
  .collection-library-card { touch-action:manipulation; }
  .collection-pocket > i { opacity:1; }
  .secret-settings { grid-template-columns:1fr; }
}

@media print {
  @page { size:letter portrait; margin:0; }
  body * { visibility:hidden !important; }
  html,body { width:8.5in !important; min-width:8.5in !important; height:auto !important; margin:0 !important; padding:0 !important; background:white !important; }
  .app-shell,#app,body[data-layout="desktop"] .app-shell,body[data-layout="desktop"] #app { position:static !important; width:8.5in !important; min-width:8.5in !important; max-width:none !important; min-height:0 !important; margin:0 !important; padding:0 !important; transform:none !important; animation:none !important; }
  .proxy-print-root,.proxy-print-root * { visibility:visible !important; }
  .proxy-print-root { position:absolute !important; top:0 !important; left:0 !important; display:block; width:8.5in !important; margin:0 !important; padding:0 !important; color:#000; transform:none !important; }
  .proxy-sheet { width:8.5in; min-width:8.5in; height:11in; min-height:11in; margin:0; padding:.25in .5in; overflow:hidden; border:0; border-radius:0; background:white; box-shadow:none; break-after:page; page-break-after:always; }
  .proxy-sheet:last-child { break-after:auto; page-break-after:auto; }
  .proxy-grid { width:7.5in; height:10.5in; margin:0; gap:0; transform:none !important; }
  .proxy-card { width:2.5in; height:3.5in; break-inside:avoid; page-break-inside:avoid; }
}
