/* styles.css */
:root {
  --bg: #080e16;
  --surface: #101925;
  --surface-2: #151f2d;
  --line: #29364a;
  --text: #f4f7fb;
  --muted: #96a5ba;
  --purple: #8d46ff;
  --purple-2: #bd64ff;
  --cyan: #26c7f4;
  --gold: #ffc62c;
  --danger: #ff5470;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 78% 13%, rgba(75, 89, 220, .11), transparent 29rem),
    radial-gradient(circle at 22% 55%, rgba(139, 52, 226, .07), transparent 32rem),
    var(--bg);
  overflow-x: hidden;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; }

.topbar {
  height: 62px;
  padding: 0 29px;
  display: grid;
  grid-template-columns: auto minmax(430px, 1fr) minmax(190px, .9fr) auto auto auto auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #273143;
  background: rgba(8, 14, 23, .94);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
}

.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; border: 0; background: transparent; padding: 0; cursor: pointer; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; font-size: 29px; filter: drop-shadow(0 0 10px rgba(143, 79, 255, .55)); }
.top-mark { position: relative; overflow: hidden; }
.top-mark img { position: absolute; width: 42px; max-width: none; left: 0; top: 0; }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: -.045em; }
.beta { font-size: 11px; color: #bdc9db; background: #252e3d; border: 1px solid #354052; padding: 3px 7px; border-radius: 5px; }

.nav { height: 100%; display: flex; justify-content: center; gap: 25px; }
.nav-link { position: relative; display: flex; align-items: center; color: #c7cfdb; background: none; border: 0; padding: 0; font-size: 13px; cursor: pointer; white-space: nowrap; }
.nav-link:hover, .nav-link.active { color: #c381ff; }
.nav-link.active::after { content: ""; height: 2px; background: #8d58ff; left: 0; right: 0; bottom: 0; position: absolute; box-shadow: 0 0 10px #7b44ff; }

.search { height: 38px; border: 1px solid #2c3749; border-radius: 9px; display: flex; align-items: center; gap: 10px; background: #111925; padding: 0 12px; min-width: 190px; }
.search svg, .topbar svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.search svg { color: #7f90a9; }
.search input { width: 100%; min-width: 0; border: 0; outline: 0; color: #dce4f0; background: transparent; font-size: 13px; }
.search input::placeholder { color: #748198; }

.mini-profile { border: 0; background: transparent; display: flex; align-items: center; gap: 10px; padding: 0 12px; cursor: pointer; border-right: 1px solid #273143; }
.mini-profile strong, .mini-profile small { display: block; text-align: left; }
.mini-profile strong { font-size: 12px; }.mini-profile small { color: var(--muted); margin-top: 3px; font-size: 11px; }
.avatar { width: 39px; height: 39px; border-radius: 50%; border: 2px solid #e8ad44; overflow: hidden; display: block; flex: 0 0 auto; }
.balance { height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 12px; background: #131c29; border: 1px solid #2a3547; border-radius: 9px; white-space: nowrap; }
.coin, .price i { width: 18px; height: 18px; border-radius: 50%; background: #e6a51b; color: #fff2a8; display: inline-grid; place-items: center; font-style: normal; box-shadow: inset 0 0 0 2px #ffc83c; }
.balance strong { font-size: 14px; }.balance button { border: 0; background: #2a3547; color: #cbd5e4; width: 23px; height: 23px; border-radius: 50%; cursor: pointer; }

.primary, .secondary { border-radius: 8px; font-weight: 700; cursor: pointer; border: 1px solid transparent; transition: transform .18s ease, filter .18s ease, box-shadow .18s ease; }
.primary { color: white; background: linear-gradient(100deg, #9138ed, #743dff 60%, #315ff0); box-shadow: 0 7px 22px rgba(118, 60, 255, .25); }
.secondary { color: #eef2f8; border-color: #35445a; background: linear-gradient(180deg, #1b2636, #121a27); }
.primary:hover, .secondary:hover { transform: translateY(-1px); filter: brightness(1.1); }
.primary:active, .secondary:active { transform: translateY(0); }

main { width: min(1489px, calc(100% - 40px)); margin: 0 auto; }

.view { display: none; min-height: 700px; }.view.active { display: block; animation: viewIn .25s ease; }
@keyframes viewIn { from { opacity: .35; transform: translateY(6px); } to { opacity: 1; transform: none; } }
body:not([data-view="wall"]) main { padding-top: 34px; }

.wall-card { grid-area: wall; }
.wall-viewport { aspect-ratio: 1035 / 675; border: 1px solid #2b3c54; border-radius: 9px; overflow: hidden; position: relative; background: #0c1420; box-shadow: 0 16px 40px rgba(0,0,0,.25); }
.wall-viewport::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 55% 35%, rgba(71, 104, 170, .12), transparent 42%), linear-gradient(rgba(255,255,255,.018), rgba(255,255,255,0)); z-index: 1; }

.wall-topline { position: absolute; z-index: 7; top: 15px; left: 75px; right: 16px; height: 42px; display: flex; align-items: center; gap: 12px; pointer-events: none; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; color: #bac6d8; background: rgba(12,19,30,.82); border: 1px solid #334158; border-radius: 6px; padding: 7px 9px; font-size: 10px; font-weight: 800; letter-spacing: .09em; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: #40e6a0; box-shadow: 0 0 10px #40e6a0; }
.wall-controls { position: absolute; z-index: 8; top: 14px; left: 12px; width: 43px; overflow: hidden; border: 1px solid #354055; border-radius: 9px; background: rgba(10, 15, 24, .92); box-shadow: 0 6px 20px rgba(0,0,0,.38); }
.wall-controls button { display: grid; place-items: center; width: 100%; height: 38px; border: 0; border-bottom: 1px solid #313d50; background: transparent; cursor: pointer; font-size: 27px; }
.wall-controls button:last-child { margin-top: 8px; border: 0; border-top: 1px solid #313d50; }.wall-controls button:hover { background: #253147; }
.wall-controls svg { width: 20px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.sidebar { grid-area: side; display: flex; flex-direction: column; gap: 14px; }
.panel, .collection-card, .case-card { background: linear-gradient(135deg, rgba(18, 27, 39, .98), rgba(13, 21, 31, .98)); border: 1px solid #253144; border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.13); }
.panel { padding: 16px 15px; }.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }.panel-heading h2 { font-size: 16px; margin: 0; letter-spacing: -.02em; }.panel-heading button { border: 0; background: transparent; color: #b66bff; font-size: 11px; cursor: pointer; }
.case-feature { display: grid; grid-template-columns: 48% 1fr; align-items: center; gap: 10px; min-height: 160px; overflow: hidden; }
.case-render { height: 160px; position: relative; overflow: hidden; border-radius: 8px; background: radial-gradient(circle, rgba(128,54,245,.22), transparent 68%); }
.case-render img { position: absolute; width: 1640px; max-width: none; left: -1162px; top: -253px; filter: saturate(1.12) contrast(1.04); }
.case-copy { min-width: 0; }.case-copy h3 { margin: 0 0 8px; font-size: 14px; }.case-copy p { margin: 0 0 16px; color: #9eacc0; font-size: 12px; line-height: 1.45; }.case-actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }.case-actions .primary { padding: 11px 13px; font-size: 12px; white-space: nowrap; }
.price { height: 41px; padding: 0 12px; border: 1px solid #344157; background: #192332; border-radius: 7px; display: inline-flex; align-items: center; gap: 7px; font-weight: 800; font-size: 13px; white-space: nowrap; }.price i { width: 17px; height: 17px; font-size: 11px; }
.subheading { font-size: 13px; margin: 3px 0 11px; }.odds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.odds article { min-width: 0; text-align: center; }
.rarity { display: block; margin: -18px auto 7px; position: relative; width: fit-content; border: 1px solid; padding: 2px 7px; border-radius: 5px; font-size: 9px; background: #172131; }.common { color: #dce5f1; border-color: #718097; }.rare { color: #68bfff; border-color: #3b8ee6; }.epic { color: #e16aff; border-color: #a13ed1; }.legendary { color: #ffd33e; border-color: #d39b16; }.mythic { color: #ff5bb5; border-color: #c42a7e; }
.odds strong, .odds small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.odds strong { font-size: 10px; font-weight: 500; }.odds small { color: #8898ad; font-size: 10px; margin-top: 6px; }

.favorite-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }.favorite-card { padding: 4px; border: 1px solid #344158; border-radius: 7px; background: #101824; overflow: hidden; }.favorite-art { height: 84px; display: grid; place-items: center; border-radius: 5px; background: radial-gradient(circle, #293c56, #0b131d 72%); }.favorite-art img { width: 90%; height: 90%; object-fit: contain; }.favorite-card h3 { margin: 7px 2px 3px; font-size: 11px; }.favorite-card p { margin: 0 2px 7px; color: #8e9cb0; font-size: 10px; }.favorite-card > div:last-child { padding: 0 2px 3px; display: flex; justify-content: space-between; color: #8492a7; font-size: 9px; }

.activity-panel { padding-bottom: 12px; }

.page-heading { min-height: 126px; display: flex; justify-content: space-between; align-items: center; gap: 30px; }.eyebrow { color: #ad6eff; font-size: 10px; font-weight: 800; letter-spacing: .16em; }.page-heading h1 { margin: 6px 0 7px; font-size: 36px; letter-spacing: -.04em; }.page-heading p { margin: 0; color: #94a4b8; font-size: 13px; }.collection-actions { display: flex; align-items: center; gap: 18px; color: #94a4b8; font-size: 13px; }.collection-actions b { color: white; }.collection-actions .primary { padding: 13px 18px; }
.collection-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 13px; padding-bottom: 34px; }.collection-card { padding: 8px; cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; position: relative; overflow: hidden; }.collection-card:hover { transform: translateY(-3px); border-color: #685099; }.collection-art { aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px; background: radial-gradient(circle, #26374f, #0d1521 74%); border: 1px solid #2a3c56; }.collection-art img { width: 88%; height: 88%; object-fit: contain; filter: drop-shadow(0 8px 8px rgba(0,0,0,.5)); }.collection-card h3 { margin: 10px 3px 4px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.collection-card p { margin: 0 3px 7px; color: #8494a9; font-size: 10px; }.collection-card footer { width: auto; min-height: 0; margin: 0 3px 2px; display: flex; justify-content: space-between; gap: 5px; font-size: 9px; color: #8d9aae; }.collection-card .rarity { position: absolute; top: 15px; left: 14px; margin: 0; z-index: 2; backdrop-filter: blur(6px); }.copy-count { position: absolute; top: 15px; right: 14px; padding: 3px 6px; border-radius: 5px; background: rgba(8,13,21,.76); border: 1px solid #38475c; font-size: 9px; }

.cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; padding-bottom: 38px; }.case-card { min-height: 330px; padding: 18px; position: relative; overflow: hidden; }.case-card::before { content: ""; position: absolute; width: 240px; height: 240px; top: -100px; right: -80px; border-radius: 50%; background: var(--case-glow); filter: blur(55px); opacity: .35; }.case-card h2 { position: relative; margin: 3px 0 5px; font-size: 20px; }.case-card > p { position: relative; margin: 0; color: #92a2b7; font-size: 11px; }.case-card .case-render { width: 230px; height: 165px; margin: 5px auto 3px; }.case-card .case-render img { filter: var(--case-filter) saturate(1.15); }.case-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.case-card-bottom .primary { padding: 12px 15px; }.drop-miniatures { display: flex; margin-top: 9px; }.drop-miniatures img { width: 27px; height: 27px; object-fit: contain; background: #172131; border: 1px solid #36435a; border-radius: 50%; margin-left: -5px; }.drop-miniatures img:first-child { margin-left: 0; }

.case-dialog { width: min(900px, calc(100% - 32px)); border: 1px solid #43516a; border-radius: 16px; padding: 0 0 24px; color: white; background: linear-gradient(145deg, #151f2f, #0b121d); box-shadow: 0 30px 100px #000; overflow: hidden; }.case-dialog::backdrop { background: rgba(3, 7, 13, .86); backdrop-filter: blur(8px); }.dialog-head { padding: 22px 24px 17px; display: flex; align-items: flex-start; justify-content: space-between; }.dialog-head h2 { margin: 5px 0 0; font-size: 24px; }.dialog-close { border: 0; background: transparent; color: #aab7c8; font-size: 28px; cursor: pointer; }.roulette-shell { height: 194px; position: relative; overflow: hidden; border-block: 1px solid #344157; background: radial-gradient(circle at center, rgba(123,66,216,.16), transparent 32%), #080e17; box-shadow: inset 0 0 34px #000; }.roulette-shell::before, .roulette-shell::after { content: ""; position: absolute; top: 0; bottom: 0; width: 150px; z-index: 3; pointer-events: none; }.roulette-shell::before { left: 0; background: linear-gradient(90deg, #080e17, transparent); }.roulette-shell::after { right: 0; background: linear-gradient(-90deg, #080e17, transparent); }.roulette-marker { position: absolute; z-index: 5; left: 50%; top: 0; bottom: 0; width: 2px; background: #b66cff; box-shadow: 0 0 12px #b66cff; }.roulette-marker::before, .roulette-marker::after { content: ""; position: absolute; left: -7px; border-left: 8px solid transparent; border-right: 8px solid transparent; }.roulette-marker::before { top: 0; border-top: 12px solid #c67aff; }.roulette-marker::after { bottom: 0; border-bottom: 12px solid #c67aff; }.reel-track { display: flex; align-items: center; gap: 10px; height: 100%; width: max-content; padding-left: calc(50% - 64px); transform: translateX(0); will-change: transform; }.reel-item { width: 128px; height: 148px; flex: 0 0 128px; padding: 7px; border: 1px solid #354258; border-bottom: 3px solid var(--rarity-color); border-radius: 9px; background: linear-gradient(160deg, #1a2535, #0d151f); display: flex; flex-direction: column; align-items: center; justify-content: space-between; }.reel-item img { width: 102px; height: 102px; object-fit: contain; filter: drop-shadow(0 7px 7px rgba(0,0,0,.5)); }.reel-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: #c7d1df; }.case-result { min-height: 50px; padding: 14px 24px 0; text-align: center; }.case-result p { margin: 0; color: #99a8bb; font-size: 12px; }.case-result strong { color: white; font-size: 16px; }.dialog-action { display: block; min-width: 190px; margin: 8px auto 0; padding: 13px 24px; }.dialog-action:disabled { opacity: .55; cursor: wait; }

.toast { position: fixed; z-index: 90; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: #1d2736; border: 1px solid #3a4860; border-radius: 10px; padding: 12px 17px; box-shadow: 0 15px 45px rgba(0,0,0,.45); color: #eaf0f8; font-size: 12px; opacity: 0; pointer-events: none; transition: .25s ease; }.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1260px) {
  .topbar { grid-template-columns: auto 1fr minmax(170px, .8fr) auto auto; padding: 0 18px; }.mini-profile, .balance { display: none; }.nav { gap: 18px; }
  .collection-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 940px) {
  .topbar { grid-template-columns: auto 1fr auto; }.nav { display: none; }.search { margin-left: auto; max-width: 320px; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }.activity-panel { grid-column: 1 / -1; }
  .case-feature { grid-template-columns: minmax(210px, 38%) 1fr; }.case-render { min-width: 0; }
  .collection-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }.cases-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .topbar { height: 58px; padding: 0 12px; gap: 8px; }.brand-name { font-size: 17px; }.brand-mark { width: 34px; height: 34px; font-size: 25px; }.top-mark img { left: -4px; top: -3px; }.beta { display: none; }.search { height: 36px; }
  main { width: min(100% - 20px, 1490px); }
  .wall-viewport { aspect-ratio: 1 / 1.08; }.wall-topline { left: 66px; }.sidebar { display: flex; }.panel { padding: 14px 12px; }.case-feature { grid-template-columns: 44% 1fr; min-height: 150px; }.case-render { height: 145px; }.odds { overflow-x: auto; grid-template-columns: repeat(5, 82px); padding-bottom: 6px; }
  .page-heading { min-height: 150px; align-items: flex-start; padding-top: 10px; flex-direction: column; justify-content: center; gap: 16px; }.page-heading h1 { font-size: 30px; }.collection-actions { width: 100%; justify-content: space-between; }.collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }.cases-grid { grid-template-columns: 1fr; }.case-card { min-height: 315px; }.favorite-grid { gap: 5px; }
  .case-dialog { width: calc(100% - 18px); }.roulette-shell { height: 176px; }.reel-item { width: 112px; height: 134px; flex-basis: 112px; }.reel-item img { width: 90px; height: 90px; }.reel-track { padding-left: calc(50% - 56px); }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
/* theme.css */
/* Radix Colors: Slate surfaces / Indigo actions. Rarity colors remain semantic.
   https://www.radix-ui.com/colors/docs/palette-composition/understanding-the-scale */
:root {
  --bg: #111113;
  --surface: #18191b;
  --surface-2: #212225;
  --surface-hover: #272a2d;
  --line: #363a3f;
  --control-line: #43484e;
  --text: #edeef0;
  --muted: #b0b4ba;
  --accent: #3e63dd;
  --accent-hover: #5472e4;
  --accent-text: #9eb1ff;
  --accent-soft: #182449;
}

body { background: var(--bg); }
.topbar { background: var(--bg); border-color: var(--line); }
.nav-link { color: var(--muted); }
.nav-link:hover, .nav-link.active { color: var(--accent-text); }
.nav-link.active::after { background: var(--accent); box-shadow: none; }
.brand-mark { filter: none; }
.mini-profile, .balance, .search { border-color: var(--line); }
.mini-profile .avatar { border-color: var(--control-line); }
.search, .balance, .balance button, .price { background: var(--surface-2); }
.search input { color: var(--text); }
.primary { background: var(--accent); box-shadow: none; }
.primary:hover { background: var(--accent-hover); filter: none; }
.secondary { background: var(--surface-2); border-color: var(--control-line); box-shadow: none; }
.secondary:hover { background: var(--surface-hover); filter: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, canvas:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}
.panel, .collection-card, .case-card {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
}
.panel-heading button, .text-button, .source-note a { color: var(--accent-text); }
.eyebrow { color: var(--accent-text); }
.event-log { color: var(--muted); }
.event-log li { border-color: var(--control-line); }
.favorite-card { background: var(--surface-2); border-color: var(--control-line); }
.favorite-art, .collection-card .collection-art { background: var(--surface); }
.favorite-card.active { border-color: var(--accent-text); outline-color: var(--accent-text); }
.favorite-card p, .favorite-card .favorite-meta, .empty-favorites { color: var(--muted); }
.favorite-grid { scrollbar-color: var(--control-line) var(--surface); }
.collection-card:hover { border-color: var(--control-line); }
.collection-art img, .case-art img, .winner-reveal img { filter: none; }
.card-action { background: var(--accent-soft); border-color: #304384; color: #d6e1ff; }
.catalog-filters input, .catalog-filters select, .report-dialog select {
  background: var(--surface-2); border-color: var(--control-line); color: var(--text);
}
.pagination button { background: var(--surface-2); border-color: var(--control-line); }
.source-link, .source-note, .report-button { color: var(--muted); }
.report-button:hover { color: var(--accent-text); }
.case-card::before, .stage-halo, .stage-sparks { display: none; }
.featured-case .case-render { background: none; }
.featured-case .case-copy p { color: var(--muted); }
.odds-art { background: var(--surface-2); border-color: var(--control-line); }
.case-dialog, .rules-dialog { background: var(--surface); border-color: var(--control-line); box-shadow: 0 24px 80px #0008; }
.case-wallet { display: flex; justify-content: center; gap: 7px; padding: 4px 20px 12px; color: var(--muted); font-size: 13px; }
.case-wallet strong { color: #ffcf61; font-variant-numeric: tabular-nums; }
.case-dialog.won #revealButton { background: var(--surface-2); border: 1px solid var(--control-line); }
.rules-content { color: var(--muted); }
.placement-tools { background: #18191bf5; border-color: var(--accent); box-shadow: 0 6px 20px #0002; }
.placement-tools small { color: #d6e1ff; }
.live-pill { background: #eaf7ef; border-color: #c8e8d2; color: #24683d; box-shadow: none; }

/* No extra dashboard row above the wall. The picker spans BOTH columns. */
#view-wall.active { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; }
.play-layout { align-items: stretch; min-width: 0; }
.sidebar { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr) auto; height: 100%; min-height: 0; gap: 12px; }
.sidebar .featured-case { display: flex; flex-direction: column; min-height: 0; height: auto; }
.featured-case .case-feature { flex: 1; }
.sidebar .activity-panel { min-height: 86px; }
#view-wall>.favorites-panel { height: auto; min-height: 0; max-height: none; padding: 12px 16px; }
.favorites-panel .panel-heading { margin-bottom: 8px; }
.favorite-grid { grid-auto-columns: 120px; }

/* Self-contained case picker. Controls stay mounted when the slide changes. */
.case-carousel-heading { min-height: 22px; }
.case-carousel-status { display: flex; align-items: center; gap: 8px; }
.case-carousel-heading .case-carousel-auto { width: 24px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); color: var(--muted); font-size: 10px; cursor: pointer; }
.case-carousel-auto:hover { color: var(--text); }
.case-carousel-progress-track { width: 38px; height: 2px; background: var(--line); overflow: hidden; }
#featuredCaseProgress { display: block; height: 100%; background: var(--accent-text); transform-origin: left; transform: scaleX(0); }
#featuredCaseProgress[data-playing="false"] { background: var(--muted); }
.case-render .case-illustration,
.featured-case .case-render .case-illustration,
.case-art .case-illustration {
  display: block;
  position: static;
  width: 100%;
  height: 100%;
  max-width: 100%;
  left: auto;
  top: auto;
  object-fit: contain;
  object-position: center;
  filter: none;
}
.case-stage .case-render { background: none; }
.case-art .case-illustration { width: 100%; max-width: 100%; height: 100%; }
#featuredCasePosition { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.case-carousel { position: relative; flex: 1; min-height: 0; display: flex; }
.case-carousel-window { position: relative; flex: 1; min-width: 0; display: flex; overflow: hidden; }
.case-carousel-slide { min-width: 0; width: 100%; display: flex; flex-direction: column; }
.case-carousel-outgoing { position: absolute; inset: 0; pointer-events: none; }
.case-carousel-arrow { position: absolute; top: 42%; transform: translateY(-50%); width: 30px; height: 44px; padding: 0; border: 1px solid var(--control-line); border-radius: 7px; background: var(--surface-2); color: var(--text); font-size: 28px; line-height: 1; cursor: pointer; z-index: 1; }
.case-carousel-arrow:hover { background: var(--surface-hover); }
.case-carousel-arrow.previous { left: -29px; }
.case-carousel-arrow.next { right: -29px; }
.case-carousel:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }
@media (max-width: 900px) {
 .case-carousel-arrow.previous { left: -14px; }
 .case-carousel-arrow.next { right: -14px; }
}

@media (min-width: 1081px) {
  body[data-view="wall"] main { height: calc(100dvh - 62px); min-height: 760px; display: flex; flex-direction: column; }
  #view-wall.active { flex: 1; min-height: 0; grid-template-rows: minmax(420px,1fr) auto; padding-bottom: 14px; }
  .play-layout { min-height: 0; }
  .play-layout { grid-template-rows: minmax(0,1fr); }
  .wall-card { height: 100%; min-height: 0; }
  .wall-viewport { height: 100%; min-height: 0; }
}
@media (max-width: 1080px) {
  .wall-viewport { height: clamp(480px,65vh,740px); min-height: 0; }
  .sidebar { height: auto; }
}
@media (max-width: 900px) {
  .sidebar { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: auto; align-items: start; }
  .sidebar .activity-panel { grid-column: auto; }
  .play-layout { display: contents; }
  .play-layout>.wall-card { grid-row: 1; }
  #view-wall>.favorites-panel { grid-row: 2; }
  .play-layout>.sidebar { grid-row: 3; }
}
@media (max-width: 650px) {
  .wall-viewport { height: 65vh; min-height: 430px; }
  .sidebar { grid-template-columns: minmax(0,1fr); }
  #view-wall>.favorites-panel { padding: 12px; }
  .favorite-grid { grid-auto-columns: 104px; }
}

/* Open-case series: identical dark stage, metal-inspired card trim. */
.cases-grid { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 14px; }
.case-card { --case-accent: #dfc7a5; --case-art-bg: #141619; background: #141619; border: 1px solid color-mix(in srgb,var(--case-accent) 26%,#24282e); border-radius: 12px; padding: 14px; min-width: 0; box-shadow: inset 0 1px 0 #ffffff08,0 8px 24px #0002; }
.case-card .eyebrow { color: var(--case-accent); }
.case-card h2 { color: #f0f0ee; font-size: 18px; line-height: 1.25; min-height: 2.5em; overflow-wrap: anywhere; }
.case-card > p, .case-tier { color: #b0b4ba; font-size: 11px; }
.case-card .case-art { height: auto; aspect-ratio: 1; width: 100%; margin: 12px 0; border-radius: 10px; background: none; }
/* Case art blends into its surface: transparent PNG areas show the panel, and any baked-in black (e.g. classic-4) is lifted to the same colour by `lighten`. */
.case-image-frame { display: block; position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--case-art-bg,var(--surface)); isolation: isolate; }
.case-image-frame img.case-illustration { position: absolute; width: var(--art-size,100%); height: var(--art-size,100%); max-width: none; left: var(--art-left,0%); top: var(--art-top,0%); object-fit: contain; filter: none; mix-blend-mode: lighten; }
.case-card .drop-miniatures { gap: 5px; margin-bottom: 12px; }
.case-card .drop-miniatures img { width: 27px; height: 27px; background: #101114; border-color: #393e45; border-radius: 6px; }
.case-card .case-card-bottom { gap: 8px; padding-top: 10px; border-top: 1px solid #30343a; }
.case-card .case-card-bottom .price { color: #f0ece5; font-size: 20px; white-space: nowrap; }
.case-card .primary { background: #e7d2ae; color: #191713; border: 1px solid #f2e3c6; border-radius: 8px; padding: 10px 12px; font-size: 12px; white-space: nowrap; box-shadow: inset 0 1px 0 #fff4; }
.case-card .primary:hover { background: #f3dfba; }
.case-card > .text-button { color: var(--case-accent); font-size: 11px; margin-top: 12px; white-space: normal; }
.featured-case .case-render, .case-stage .case-render { background: none; }
@media (max-width: 1199px) { .cases-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media (max-width: 979px) { .cases-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 759px) { .cases-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 479px) { .cases-grid { grid-template-columns: minmax(0,1fr); } .case-card { padding: 16px; } }
