/* UNCRATE — armory manifest aesthetic.
   Steel surfaces stay desaturated; the only saturated color on the page
   comes from item rarity. Brass is reserved for the needle and money actions. */

:root {
  --steel-950: #0c0f14;
  --steel-900: #171b21;
  --steel-800: #1f2530;
  --steel-700: #2d3542;
  --steel-600: #3d4757;
  --bone: #e8e4da;
  --ash: #8f97a6;
  --brass: #d9a13d;
  --brass-bright: #f0bc55;
  --gain: #8fbf7a;
  --loss: #d0705f;
  --st-orange: #cf6a32;
  --gold: #e4ae39;

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius: 4px;
  --pad: clamp(16px, 3vw, 32px);
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--steel-950);
  color: var(--bone);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
}

img { max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}
main:focus, main:focus-visible { outline: none; }

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 32px);
  padding: 10px var(--pad);
  border-bottom: 1px solid rgba(217, 161, 61, 0.16);
  background: rgba(17, 21, 27, 0.78);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  position: sticky;
  top: 0;
  z-index: 20;
  flex-wrap: wrap;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--bone);
}
.wordmark .logo-mark { height: 26px; width: 26px; filter: drop-shadow(0 0 7px rgba(217, 161, 61, 0.55)); }
.wordmark span { color: var(--brass); }

.nav { display: flex; gap: 18px; }
.nav a {
  text-decoration: none;
  color: var(--ash);
  font-weight: 500;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav a.active { color: var(--bone); border-bottom-color: var(--brass); }
.nav-count { color: var(--brass); font-family: var(--mono); font-size: 12px; }

.ledger {
  margin-left: auto;
  display: flex;
  gap: clamp(10px, 2vw, 24px);
  font-family: var(--mono);
  font-size: 13px;
}
.ledger .cell { text-align: right; }
.ledger .cell b {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--ash);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--body);
}
.ledger .cell:last-child { padding-left: clamp(10px, 2vw, 22px); border-left: 1px solid var(--steel-700); }
.ledger .gain { color: var(--gain); }
.ledger .loss { color: var(--loss); }

.sound-toggle {
  background: none;
  border: 1px solid var(--steel-700);
  border-radius: var(--radius);
  color: var(--ash);
  padding: 4px 10px;
  font-size: 13px;
}
.sound-toggle[data-on="true"] { color: var(--bone); border-color: var(--steel-600); }

/* ---------- layout ---------- */

main {
  flex: 1;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: var(--pad);
}

.manifest-line {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ash);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--steel-700);
  padding-bottom: 10px;
  margin-bottom: 20px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.toolbar input, .toolbar select {
  background: var(--steel-900);
  border: 1px solid var(--steel-700);
  border-radius: var(--radius);
  color: var(--bone);
  padding: 8px 12px;
  font: inherit;
}
.toolbar input { flex: 1; min-width: 180px; }
.toolbar input::placeholder { color: var(--ash); }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.chip {
  background: var(--steel-900);
  border: 1px solid var(--steel-700);
  border-radius: 999px;
  color: var(--ash);
  font-size: 13px;
  padding: 6px 14px;
  transition: border-color 0.15s, color 0.15s;
}
.chip:hover { color: var(--bone); border-color: var(--steel-600); }
.chip.on { color: var(--brass); border-color: var(--brass); background: var(--steel-800); }

.case-group { margin-bottom: 30px; }
.group-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 14px;
  border-bottom: 1px solid var(--steel-700);
  padding-bottom: 7px;
}
.group-head::before {
  content: "";
  align-self: center;
  width: 8px;
  height: 16px;
  background: linear-gradient(180deg, var(--brass), rgba(217, 161, 61, 0.25));
  clip-path: polygon(0 0, 100% 4px, 100% 100%, 0 calc(100% - 4px));
}
.group-head span { font-family: var(--mono); font-size: 13px; color: var(--ash); margin-left: 8px; }

/* ---------- case grid ---------- */

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.case-card {
  background: linear-gradient(180deg, #1c222c, #12161d);
  border: 1px solid var(--steel-700);
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 16px 14px 12px;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.case-card:hover {
  border-color: rgba(217, 161, 61, 0.55);
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 28px -10px rgba(0, 0, 0, 0.7), 0 0 22px -8px rgba(217, 161, 61, 0.35);
}
.case-card img { height: 96px; object-fit: contain; align-self: center; }
.case-card .name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.15;
}
.case-card .cost {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ash);
  margin-top: auto;
}
.case-card .cost b { color: var(--bone); font-weight: 500; }

/* ---------- case view ---------- */

.case-head {
  display: flex;
  gap: clamp(16px, 4vw, 48px);
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.case-head img { height: 150px; object-fit: contain; }
.case-head h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.case-head .cost-line {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ash);
  margin-bottom: 16px;
}
.case-head .cost-line b { color: var(--bone); font-weight: 500; }

.open-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.btn-open {
  background: linear-gradient(180deg, var(--brass-bright), var(--brass) 55%, #b8842e);
  border: none;
  border-radius: 0;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  color: #16130a;
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 13px 38px;
  transition: filter 0.15s;
}
.btn-open:hover { filter: brightness(1.12); }

.terminal-note {
  max-width: 620px;
  margin: 0;
  padding: 10px 14px;
  color: var(--ash);
  font-size: 14px;
  border-left: 3px solid var(--brass);
  background: var(--steel-900);
  border-radius: var(--radius);
}

.count-seg {
  display: flex;
  border: 1px solid var(--steel-600);
  border-radius: var(--radius);
  overflow: hidden;
}
.count-seg button {
  background: var(--steel-900);
  border: none;
  color: var(--ash);
  font-family: var(--mono);
  font-size: 13px;
  padding: 10px 12px;
  border-right: 1px solid var(--steel-700);
}
.count-seg button:last-child { border-right: none; }
.count-seg button:hover { color: var(--bone); }
.count-seg button.on { background: var(--steel-700); color: var(--brass); }

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ash);
  font-size: 13px;
  user-select: none;
}
.check input { accent-color: var(--brass); }

.tier-section { margin-bottom: 26px; }
.tier-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1px solid var(--steel-700);
  padding-bottom: 6px;
  margin-bottom: 12px;
}
.tier-head .dot { width: 10px; height: 10px; border-radius: 2px; align-self: center; }
.tier-head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}
.tier-head .odds { font-family: var(--mono); font-size: 13px; color: var(--ash); margin-left: auto; }

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}

.item-card {
  background: var(--steel-900);
  border: 1px solid var(--steel-700);
  border-left: 3px solid var(--rarity, var(--steel-600));
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s;
}
.item-card:hover { border-color: var(--ash); }
.item-card img { height: 64px; object-fit: contain; align-self: center; }
.item-card .iname { font-size: 13px; font-weight: 600; line-height: 1.25; }
.item-card .iprice { font-family: var(--mono); font-size: 12px; color: var(--ash); margin-top: auto; }

/* ---------- overlay / reel ---------- */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 15, 0.92);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--pad);
}
.overlay[hidden] { display: none; }

.reel-stage { width: min(1100px, 100%); }
.reel-title {
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
  color: var(--ash);
}

.reel-window {
  position: relative;
  overflow: hidden;
  border-block: 1px solid rgba(217, 161, 61, 0.35);
  background: linear-gradient(180deg, #191f28, #10141a 50%, #191f28);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.05), inset 0 -2px 0 rgba(0, 0, 0, 0.5);
  padding: 18px 0;
}
.reel-window::before, .reel-window::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 90px;
  z-index: 3;
  pointer-events: none;
}
.reel-window::before { left: 0; background: linear-gradient(90deg, var(--steel-950), transparent); }
.reel-window::after { right: 0; background: linear-gradient(-90deg, var(--steel-950), transparent); }

.reel-needle {
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--brass);
  z-index: 4;
  box-shadow: 0 0 8px rgba(217, 161, 61, 0.8);
}
.reel-needle::before, .reel-needle::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
}
.reel-needle::before { top: -1px; border-top-color: var(--brass); }
.reel-needle::after { bottom: -1px; border-bottom-color: var(--brass); }

.reel-strip {
  display: flex;
  gap: 8px;
  will-change: transform;
}

.reel-tile {
  flex: 0 0 150px;
  height: 130px;
  background: var(--steel-800);
  border-radius: var(--radius);
  border-bottom: 4px solid var(--rarity, var(--steel-600));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px;
}
.reel-tile img { height: 72px; object-fit: contain; }
.reel-tile .tname {
  font-size: 11px;
  color: var(--ash);
  text-align: center;
  line-height: 1.2;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* multi-reel: shallower rows so five fit on screen */
.reel-multi .reel-window { padding: 8px 0; }
.reel-multi .reel-window + .reel-window { margin-top: 8px; }
.reel-multi .reel-tile { height: 78px; }
.reel-multi .reel-tile img { height: 52px; }
.reel-multi .tname { display: none; }

/* ---------- result ---------- */

.result {
  width: min(640px, 100%);
  background: linear-gradient(180deg, #1b212b, #12161d);
  border: 1px solid var(--steel-700);
  border-top: 4px solid var(--rarity, var(--steel-600));
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 30px 80px -20px rgba(0, 0, 0, 0.8);
  padding: clamp(20px, 4vw, 36px);
  text-align: center;
}
.result::before, .result::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  pointer-events: none;
}
.result::before { top: 10px; left: 10px; border-top: 2px solid var(--brass); border-left: 2px solid var(--brass); }
.result::after { bottom: 10px; right: 10px; border-bottom: 2px solid var(--brass); border-right: 2px solid var(--brass); }

.result .halo {
  position: relative;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.result .halo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 70% at center, var(--rarity-glow, transparent), transparent 70%);
}
.result .halo img { position: relative; height: 150px; object-fit: contain; }

.result h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 5vw, 38px);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.05;
  margin: 0 0 10px;
}

.badges { display: flex; gap: 8px; justify-content: center; margin-bottom: 20px; flex-wrap: wrap; }
.badge {
  font-family: var(--mono);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 2px;
  border: 1px solid var(--steel-600);
  color: var(--ash);
}
.badge.st { color: var(--st-orange); border-color: var(--st-orange); }
.badge.est { color: var(--brass); border-color: var(--brass); }

/* float ruler — the signature: your exact roll on the wear spectrum */
.ruler { margin: 0 auto 22px; max-width: 460px; }
.ruler-float {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--bone);
  margin-bottom: 6px;
}
.ruler-float .lbl { color: var(--ash); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; }
.ruler-track {
  position: relative;
  height: 14px;
  border-radius: 2px;
  overflow: hidden;
  display: flex;
  background: var(--steel-800);
}
.ruler-seg { height: 100%; }
.ruler-seg:nth-child(odd) { background: var(--steel-700); }
.ruler-seg:nth-child(even) { background: var(--steel-600); }
.ruler-range {
  position: absolute;
  top: 0; bottom: 0;
  background: rgba(217, 161, 61, 0.25);
  border-inline: 1px solid rgba(217, 161, 61, 0.6);
}
.ruler-needle-mark {
  position: absolute;
  top: -2px; bottom: -2px;
  width: 2px;
  background: var(--bone);
  box-shadow: 0 0 6px rgba(232, 228, 218, 0.9);
}
.ruler-scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ash);
  margin-top: 4px;
}

.result .price {
  font-family: var(--mono);
  font-size: 30px;
  margin-bottom: 22px;
}
.result .price .none { font-size: 15px; color: var(--ash); }

.result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* multi-open results */
.result.multi { width: min(860px, 100%); }
.result.multi h2 { font-size: clamp(22px, 4vw, 30px); }
#multi-total { font-family: var(--mono); color: var(--brass); }
.multi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 18px 0 22px;
}
.mini-result {
  background: var(--steel-800);
  border: 1px solid var(--steel-700);
  border-top: 3px solid var(--rarity, var(--steel-600));
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  animation: rise 0.4s ease-out both;
}
.mini-result img { height: 58px; object-fit: contain; }
.mini-result .mname { font-size: 12px; font-weight: 600; line-height: 1.2; text-align: center; }
.mini-result .mmeta { font-family: var(--mono); font-size: 10px; color: var(--ash); }
.mini-result .mprice { font-family: var(--mono); font-size: 14px; }
.mini-result .btn { padding: 3px 14px; font-size: 12px; margin-top: 3px; }
.mini-result.sold { opacity: 0.45; }
.mini-result .st-tag { color: var(--st-orange); }

.btn {
  border-radius: 2px;
  padding: 10px 22px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid var(--steel-600);
  background: linear-gradient(180deg, #262e3b, #1c222c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.15s, filter 0.15s;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { border-color: var(--ash); filter: brightness(1.1); }
.btn.brass {
  background: linear-gradient(180deg, var(--brass-bright), var(--brass) 60%, #b8842e);
  border: none;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  color: #16130a;
}
.btn.brass:hover { filter: brightness(1.12); }
.btn.danger:hover { border-color: var(--loss); color: var(--loss); }

/* ---------- item detail ---------- */

.result { position: relative; }

.detail-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: var(--ash);
  font-size: 24px;
  line-height: 1;
  padding: 4px 8px;
}
.detail-close:hover { color: var(--bone); }

.detail-odds {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ash);
  margin-bottom: 18px;
}
.detail-odds b { color: var(--bone); font-weight: 500; }

.price-table {
  width: 100%;
  max-width: 420px;
  margin: 0 auto 10px;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 13px;
}
.price-table th {
  font-family: var(--body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brass);
  text-align: right;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(217, 161, 61, 0.3);
}
.price-table td {
  padding: 7px 10px;
  text-align: right;
  border-bottom: 1px solid var(--steel-800);
}
.price-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.02); }
.price-table tbody tr:hover { background: rgba(217, 161, 61, 0.05); }
.price-table th:first-child, .price-table td:first-child { text-align: left; }

.detail-note {
  font-size: 11px;
  color: var(--ash);
  font-family: var(--mono);
}

/* ---------- hero + content pages ---------- */

.page-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 0.98;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 12px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--brass);
}
.hero { margin: 8px 0 26px; }
.hero-intro, .fineprint {
  color: var(--ash);
  max-width: 720px;
  margin: 0 0 8px;
}
.hero-intro a, .fineprint a { color: var(--brass); }
.fineprint { font-size: 13px; margin-top: 14px; }

.best { max-width: 880px; margin-inline: auto; }
.best .hero-intro, .best .fineprint { max-width: none; }
.best .table-wrap { overflow-x: auto; }
.best-table { max-width: none; width: 100%; margin: 12px 0; }
.best-table td a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--body);
  font-weight: 600;
}
.best-table td a:hover { color: var(--brass); }
.best-table td img { height: 34px; width: 46px; object-fit: contain; }
.best-table th:first-child, .best-table td:first-child { width: 30px; color: var(--ash); }
.best-table th:nth-child(2), .best-table td:nth-child(2) { text-align: left; }
.best-table .roi-hi { color: var(--gain); }
.best-table .roi-lo { color: var(--loss); }

/* ---------- FAQ ---------- */

.faq {
  margin-top: 36px;
  scroll-margin-top: 70px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: 10px 14px;
  align-items: start;
}
.faq-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 4vw, 36px);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--steel-700);
  padding-bottom: 8px;
  margin: 0;
}
.faq-title::before {
  content: "";
  align-self: center;
  width: 8px;
  height: 18px;
  background: linear-gradient(180deg, var(--brass), rgba(217, 161, 61, 0.25));
  clip-path: polygon(0 0, 100% 4px, 100% 100%, 0 calc(100% - 4px));
}
.faq-intro { grid-column: 1 / -1; color: var(--ash); max-width: 760px; margin: 0 0 8px; }
.faq details {
  background: linear-gradient(180deg, #181e27, #12161d);
  border: 1px solid var(--steel-700);
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  margin: 0;
  align-self: start;
  transition: border-color 0.15s;
}
.faq details:hover { border-color: var(--steel-600); }
.faq summary {
  cursor: pointer;
  padding: 13px 16px;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+";
  color: var(--brass);
  font-family: var(--mono);
  font-weight: 600;
  width: 14px;
}
.faq details[open] summary::before { content: "−"; }
.faq .a { padding: 0 16px 16px 40px; color: #c4c0b6; }
.faq .a p { margin: 0 0 10px; }
.faq .a p:last-child { margin-bottom: 0; }
.faq .a a { color: var(--brass); }
.faq .price-table { margin: 12px 0; max-width: 340px; }
.faq .price-table th, .faq .price-table td { text-align: left; }
.faq .price-table th:last-child, .faq .price-table td:last-child { text-align: right; }

/* ---------- inventory ---------- */

.inv-head {
  display: flex;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.inv-head h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(30px, 5vw, 44px);
  text-transform: uppercase;
  margin: 0;
}
.inv-head .totals { font-family: var(--mono); font-size: 14px; color: var(--ash); }
.inv-head .totals b { color: var(--bone); font-weight: 500; }
.inv-head .actions { margin-left: auto; display: flex; gap: 10px; }

.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.inv-card {
  background: var(--steel-900);
  border: 1px solid var(--steel-700);
  border-left: 3px solid var(--rarity, var(--steel-600));
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.inv-card:hover { border-color: var(--ash); }
.inv-card img { height: 70px; object-fit: contain; align-self: center; }
.inv-card .iname { font-size: 13px; font-weight: 600; line-height: 1.25; }
.inv-card .imeta { font-family: var(--mono); font-size: 11px; color: var(--ash); }
.inv-card .st-tag { color: var(--st-orange); }
.inv-card .sell-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}
.inv-card .iprice { font-family: var(--mono); font-size: 14px; }
.inv-card .btn { padding: 4px 12px; font-size: 12px; }

.empty {
  text-align: center;
  color: var(--ash);
  padding: 60px 20px;
  font-size: 15px;
}
.empty a { color: var(--brass); }

/* ---------- home content blocks ---------- */

.home-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 36px;
}
.content-block {
  background: linear-gradient(180deg, #191f28, #12161d);
  border: 1px solid var(--steel-700);
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 16px 18px;
}
.content-block h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
}
.content-block p { margin: 0; color: var(--ash); font-size: 14px; line-height: 1.55; }
.content-block a { color: var(--brass); }

/* ---------- trade-up ---------- */

.tu-layout {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 380px);
  gap: 16px;
  align-items: start;
  margin-bottom: 10px;
}
@media (max-width: 900px) { .tu-layout { grid-template-columns: 1fr; } }

.tu-items-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--ash);
  font-size: 13px;
  margin-bottom: 10px;
}
.tu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.tu-item {
  background: var(--steel-900);
  border: 1px solid var(--steel-700);
  border-left: 3px solid var(--rarity, var(--steel-600));
  border-radius: var(--radius);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tu-item img { height: 44px; object-fit: contain; }
.tu-item .tname { font-size: 11px; font-weight: 600; line-height: 1.2; text-align: center; }
.tu-item .tmeta { font-family: var(--mono); font-size: 10px; color: var(--ash); }
.tu-item:hover { border-color: var(--ash); }
.tu-item.sel { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass), 0 0 12px -4px var(--brass); }

.tu-panel {
  background: linear-gradient(180deg, #191f28, #12161d);
  border: 1px solid var(--steel-700);
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 14px;
  position: sticky;
  top: 70px;
}
.tu-slots { font-family: var(--mono); font-size: 13px; color: var(--ash); margin-bottom: 8px; }
.tu-slots b, .tu-ev b { color: var(--bone); font-weight: 500; }
.tu-ev { font-family: var(--mono); font-size: 13px; color: var(--ash); margin-bottom: 10px; }
.tu-outcomes { max-height: 320px; overflow-y: auto; margin-bottom: 12px; }
.tu-outcome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  border-bottom: 1px solid var(--steel-800);
  border-left: 3px solid var(--rarity, var(--steel-600));
  padding-left: 8px;
}
.tu-outcome img { height: 30px; width: 44px; object-fit: contain; }
.tu-o-name { font-size: 12px; font-weight: 600; line-height: 1.25; flex: 1; }
.tu-o-name span { display: block; font-family: var(--mono); font-weight: 400; font-size: 10px; color: var(--ash); }
.tu-o-price { font-family: var(--mono); font-size: 12px; }
.tu-go { width: 100%; padding: 12px; font-size: 15px; }
.tu-tier-note { display: block; font-family: var(--mono); font-size: 10px; color: var(--ash); }
.tu-go:disabled { opacity: 0.45; cursor: default; }

/* ---------- footer ---------- */

.foot {
  padding: 22px var(--pad) 14px;
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(217, 161, 61, 0.35), transparent) 1;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ash);
}
.foot-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
  max-width: 1000px;
  margin: 0 auto 18px;
  font-family: var(--body);
  font-size: 13px;
}
.foot-nav h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bone);
  margin: 0 0 6px;
}
.foot-nav a { display: block; color: var(--ash); text-decoration: none; padding: 2px 0; }
.foot-nav a:hover { color: var(--brass); }
.foot-legal {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  border-top: 1px solid var(--steel-800);
  padding-top: 12px;
}

/* ---------- juice: ambient atmosphere ---------- */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1000px 560px at 85% -10%, rgba(217, 161, 61, 0.10), transparent 62%),
    radial-gradient(900px 640px at 8% 112%, rgba(75, 105, 255, 0.09), transparent 62%),
    radial-gradient(140% 100% at 50% 40%, transparent 55%, rgba(4, 6, 9, 0.55) 100%),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(255, 255, 255, 0.022) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(255, 255, 255, 0.022) 39px 40px);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.014) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

::selection { background: var(--brass); color: #16130a; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--steel-950); }
::-webkit-scrollbar-thumb { background: var(--steel-600); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--brass); }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.case-card, .item-card, .inv-card { animation: rise 0.45s ease-out both; }

/* ---------- juice: case cards ---------- */

.case-card {
  position: relative;
  will-change: transform;
}
/* HUD corner brackets — the signature */
.case-card::before, .case-card::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  opacity: 0;
  transition: opacity 0.18s;
  pointer-events: none;
}
.case-card::before { top: 5px; left: 5px; border-top: 2px solid var(--brass); border-left: 2px solid var(--brass); }
.case-card::after { bottom: 5px; right: 5px; border-bottom: 2px solid var(--brass); border-right: 2px solid var(--brass); }
.case-card:hover::before, .case-card:hover::after,
.case-card:focus-visible::before, .case-card:focus-visible::after { opacity: 1; }
.case-card img { transition: transform 0.25s ease, filter 0.25s ease; }
.case-card:hover img {
  transform: translateY(-6px) scale(1.07);
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.55));
}

/* ---------- juice: case view ---------- */

.btn-open {
  position: relative;
  overflow: hidden;
  animation: openPulse 2.4s ease-in-out infinite;
}
@keyframes openPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.1); }
}
.btn-open::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -70%;
  width: 40%;
  transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: left 0.4s ease;
}
.btn-open:hover::after { left: 140%; }
.btn-open:active { transform: scale(0.97); }

.tier-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--tier-color, var(--steel-600)), transparent 65%);
  opacity: 0.7;
}
.tier-head { position: relative; border-bottom-color: transparent; }

.item-card:hover {
  border-color: color-mix(in srgb, var(--rarity) 65%, var(--steel-600));
  box-shadow: 0 0 16px -5px var(--rarity);
}
.item-card img { transition: transform 0.2s ease; }
.item-card:hover img { transform: scale(1.1); }
.inv-card:hover {
  border-color: color-mix(in srgb, var(--rarity) 65%, var(--steel-600));
  box-shadow: 0 0 16px -5px var(--rarity);
}

/* ---------- juice: reel ---------- */

.reel-tile { box-shadow: inset 0 -18px 22px -20px var(--rarity, transparent); }
.reel-needle { animation: needlePulse 0.9s ease-in-out infinite; }
@keyframes needlePulse {
  0%, 100% { box-shadow: 0 0 8px rgba(217, 161, 61, 0.8); }
  50% { box-shadow: 0 0 18px 2px rgba(217, 161, 61, 1); }
}

/* ---------- juice: result reveal ---------- */

.result { animation: resultIn 0.4s cubic-bezier(0.18, 1.35, 0.4, 1) both; }
@keyframes resultIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}
.result.shake { animation: resultIn 0.4s cubic-bezier(0.18, 1.35, 0.4, 1) both, shake 0.5s 0.1s; }
@keyframes shake {
  15% { transform: translate(-7px, 3px); }
  30% { transform: translate(6px, -4px); }
  45% { transform: translate(-5px, -2px); }
  60% { transform: translate(4px, 3px); }
  75% { transform: translate(-2px, 1px); }
}

.result .halo::before { animation: bloom 0.9s ease-out both; }
@keyframes bloom {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: scale(1); }
}
.result .halo img { animation: itemPop 0.55s cubic-bezier(0.2, 1.6, 0.4, 1) 0.05s both; }
@keyframes itemPop {
  from { opacity: 0; transform: scale(0.5) translateY(16px); }
  to { opacity: 1; transform: none; }
}

.rare-banner {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(228, 174, 57, 0.7);
  animation: bannerIn 0.7s cubic-bezier(0.2, 1.2, 0.4, 1) both;
}
@keyframes bannerIn {
  from { opacity: 0; letter-spacing: 0.9em; }
  to { opacity: 1; letter-spacing: 0.35em; }
}

.ruler-needle-mark { transition: left 0.9s cubic-bezier(0.2, 0.9, 0.25, 1); }

.particle {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: var(--pc, var(--brass));
  animation: burst 1s ease-out both;
  pointer-events: none;
  z-index: 60;
}
@keyframes burst {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translate(var(--dx, 0), var(--dy, -120px)) rotate(540deg); }
}

/* ---------- juice: ledger ---------- */

.ledger .cell.bump { animation: bump 0.4s ease-out; }
@keyframes bump {
  30% { transform: scale(1.2); }
}

/* ---------- misc ---------- */

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media (max-width: 640px) {
  .ledger { order: 3; width: 100%; justify-content: space-between; margin-left: 0; }
  .reel-tile { flex-basis: 110px; height: 104px; }
  .reel-tile img { height: 52px; }
}

/* anonymous gold card in the reel — the knife stays secret until the reveal */
.gold-tile {
  background: linear-gradient(160deg, #2a2415, #1f1a10);
  justify-content: center;
}
.gold-star {
  font-size: 38px;
  color: var(--gold);
  text-shadow: 0 0 16px rgba(228, 174, 57, 0.8);
  animation: goldPulse 1s ease-in-out infinite;
}
@keyframes goldPulse {
  0%, 100% { text-shadow: 0 0 10px rgba(228, 174, 57, 0.6); }
  50% { text-shadow: 0 0 22px rgba(228, 174, 57, 1); }
}
.gold-tile .tname { color: var(--gold); display: block; }
.reel-multi .gold-tile .tname { display: none; }

/* trade-up market picker */
.tu-market { margin-top: 20px; border-top: 1px solid var(--steel-700); padding-top: 14px; }
.tu-market input {
  width: 100%;
  background: var(--steel-900);
  border: 1px solid var(--steel-700);
  border-radius: 2px;
  color: var(--bone);
  padding: 8px 12px;
  font: inherit;
  margin-bottom: 10px;
}
.tu-market input::placeholder { color: var(--ash); }

/* ---------- mobile ---------- */

@media (max-width: 860px) {
  .topbar { gap: 8px 14px; padding: 8px 14px; }
  .wordmark { font-size: 22px; gap: 7px; }
  .wordmark .logo-mark { height: 21px; width: 21px; }
  .sound-toggle { order: 2; padding: 3px 8px; font-size: 12px; }
  .ledger { font-size: 11px; gap: 12px; }
  .nav {
    order: 4;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 18px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; font-size: 13px; }
}

@media (max-width: 640px) {
  .eyebrow { letter-spacing: 0.18em; font-size: 10px; }
  .hero-intro { font-size: 14px; }
  .group-head { font-size: 20px; }

  .chip-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: calc(-1 * var(--pad));
    padding-inline: var(--pad);
    scrollbar-width: none;
  }
  .chip-row::-webkit-scrollbar { display: none; }
  .chip { white-space: nowrap; flex-shrink: 0; }

  .case-head { gap: 14px; }
  .case-head img { height: 104px; }
  .open-row { align-items: stretch; flex-direction: column; }
  .btn-open { width: 100%; }
  .count-seg { display: flex; }
  .count-seg button { flex: 1; }

  .tier-head h2 { font-size: 18px; }
  .tier-head .odds { font-size: 11px; }
  .item-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

  .result .halo { height: 128px; }
  .result .halo img { height: 112px; }
  .result .price { font-size: 24px; }
  .result-actions .btn { flex: 1 1 auto; }
  .multi-grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); }

  .tu-panel { position: static; }
  .tu-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }

  .inv-head .actions { width: 100%; }
  .inv-head .actions .btn { flex: 1 1 auto; text-align: center; }

  .best-table { font-size: 12px; }
  .best-table th, .best-table td { padding: 5px 6px; }
  .best-table td img { height: 26px; width: 34px; }

  .foot-nav { gap: 14px; font-size: 12px; }
}

/* inline yes/cancel confirm pair (replaces the reset button on click) */
.confirm-pair {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  animation: armedPop 0.25s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.confirm-q { font-family: var(--mono); font-size: 12px; color: var(--loss); white-space: nowrap; }

/* ---------- cookie consent ---------- */

.consent {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  max-width: 360px;
  background: linear-gradient(180deg, #1b212b, #12161d);
  border: 1px solid var(--steel-700);
  border-top: 2px solid var(--brass);
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 16px 44px -12px rgba(0, 0, 0, 0.8);
  padding: 14px 16px;
  animation: rise 0.4s ease-out both;
}
.consent-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.consent p { margin: 0 0 12px; font-size: 13px; color: var(--ash); line-height: 1.5; }
.consent-actions { display: flex; gap: 8px; }
.consent-actions .btn { padding: 8px 16px; font-size: 13px; }

@media (max-width: 640px) {
  .consent { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}
