:root {
  color-scheme: dark;
  --bg: #101113;
  --surface: #191b1f;
  --line: #ffffff0e;
  --text: #f0f1f3;
  --muted: #858990;
  --gold: #f3d169;
  --accent: #f3d169;
  --accent-2: #78dbc0;
  --success: #78dbc0;
  --danger: #ef7481;
}
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-family: Inter, system-ui, sans-serif; font-size: 13px; }
button, input, select { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; }
button, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, [role=button]:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
svg { width: 18px; height: 18px; stroke-width: 1.8; flex-shrink: 0; }
h1, h2, p { margin: 0; }
.is-hidden, .view { display: none !important; }
.view.is-active { display: block !important; }
.sidebar { min-height: 84px; display: flex; align-items: center; gap: 42px; padding: 0 36px; border-bottom: 1px solid var(--line); background: #151619; }
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 44px; color: var(--gold); }
.brand-mark svg { width: 40px; height: 40px; stroke-width: 3.5; filter: drop-shadow(0 0 8px #f3d16922); }
.brand strong { display: block; font-size: 19px; font-weight: 800; }
.brand small { display: flex; align-items: center; gap: 8px; margin-top: 5px; color: #858990; font-size: 9px; font-weight: 600; }
.demo-tag { color: var(--gold); border: 1px solid #f3d16940; padding: 2px 4px; border-radius: 3px; font-size: 8px; }
.nav-tabs { display: flex; gap: 28px; align-self: stretch; flex: 1; }
.nav-tab { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 3px; border: 0; background: transparent; color: #858990; font-size: 12px; font-weight: 600; transition: color 160ms; }
.nav-tab:hover { color: #f4f4f5; }
.nav-tab.is-active { color: var(--gold); }
.nav-tab.is-active::after { content: ''; position: absolute; height: 2px; bottom: 0; left: 0; right: 0; background: var(--gold); box-shadow: 0 -6px 20px #f3d16930; }
.profile-panel { display: none; }
.balance-panel { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 20px; flex-shrink: 0; }
.balance-panel small { color: var(--muted); font-size: 9px; }
.balance-panel strong { grid-column: 1; font-size: 19px; font-variant-numeric: tabular-nums; }
.balance-panel button { grid-column: 2; grid-row: 1 / 3; }
.ghost-button, .icon-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; border: 1px solid #ffffff12; border-radius: 6px; background: #222429; color: #afb2b8; transition: background 160ms, color 160ms; }
.ghost-button { padding: 12px; min-height: 40px; font-size: 11px; font-weight: 600; }
.balance-panel .ghost-button { border-color: #f3d16925; background: #f3d1690b; color: var(--gold); }
.icon-button { width: 34px; height: 34px; }
.icon-button svg { width: 15px; height: 15px; }
.icon-button:hover, .ghost-button:hover { background: #303239; color: #fff; }
.icon-button.is-on { color: var(--gold); }
.icon-button:disabled { opacity: .3; }
.main-area { max-width: 1450px; margin: auto; padding: 30px 38px 70px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.eyebrow { color: #6d727c; font-size: 9px; font-weight: 600; margin-bottom: 8px; }
.topbar h1 { font-size: 26px; font-weight: 800; line-height: 1.3; }
.topbar-actions { display: flex; gap: 8px; }
.data-status { display: flex; align-items: center; gap: 6px; color: #6f8e84; font-size: 10px; margin-bottom: 20px; min-height: 18px; }
.data-status svg { width: 10px; height: 10px; }
.data-status.is-error { color: var(--danger); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; min-height: 24px; }
.section-heading h2 { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #c8cbd1; }
.section-heading h2 svg { width: 16px; height: 16px; color: var(--gold); }
.section-heading .eyebrow { display: none; }
.price-pill { color: #f2d991; font-weight: 700; font-size: 17px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.step-index { color: #777b83; font-size: 9px; border: 1px solid #ffffff12; border-radius: 4px; padding: 5px; margin-right: 4px; }
.upgrader-layout { display: grid; grid-template-columns: minmax(0,1fr) 352px minmax(0,1fr); gap: 28px; align-items: start; }
.source-panel { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; }
.target-panel { grid-column: 3; grid-row: 1; }
.source-panel, .target-panel { min-width: 0; padding-top: 35px; }
.source-panel .section-heading { order: 0; }
.source-panel .selected-preview { order: 1; }
.source-panel .segmented { order: 2; margin-top: 16px; }
.source-panel .field { order: 3; margin-top: 12px; }
.source-panel .field > span { display: none; }
.selected-preview { position: relative; display: grid; grid-template-columns: minmax(0,1fr); align-items: center; gap: 8px; height: 266px; padding: 10px 14px 18px; isolation: isolate; }
.selected-preview::before { content: ''; position: absolute; z-index: -1; inset: 30% 4% 22%; border: 1px solid #ffffff0b; border-radius: 50%; transform: perspective(300px) rotateX(65deg); background: repeating-linear-gradient(90deg, transparent 0 35px, #ffffff06 35px 36px); }
.selected-preview::after { content: ''; position: absolute; left: 12%; right: 12%; bottom: 3px; height: 1px; background: linear-gradient(90deg, transparent, #f3d1695c, transparent); }
.selected-preview figure { margin: 0; text-align: center; min-width: 0; }
.selected-preview img { display: block; width: 100%; height: 172px; object-fit: contain; filter: drop-shadow(0 16px 12px #0008); transform: rotate(-7deg); transition: transform 220ms; }
.selected-preview:hover img { transform: rotate(-4deg) translateY(-4px); }
.selected-preview figcaption { display: grid; gap: 4px; margin-top: 4px; }
.selected-preview figcaption small { color: var(--muted); font-size: 10px; }
.selected-preview figcaption strong { font-size: 18px; color: #eff0f2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-preview figcaption span { font-size: 9px; color: #626873; }
.selected-preview.multiple { grid-template-columns: repeat(var(--preview-count),minmax(0,1fr)); }
.selected-preview.multiple.few-items img { height: 122px; }
.selected-preview.multiple img { height: 65px; }
.selected-preview.multiple figcaption strong { font-size: 10px; }
.selected-preview.multiple figcaption span { display: none; }
.selected-preview.multiple figcaption small { font-size: 8px; }
.selected-preview.is-empty { display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.selected-preview.is-empty > svg { width: 48px; height: 48px; padding: 12px; box-sizing: content-box; color: #f3d16988; border: 1px solid #f3d16922; border-radius: 8px; background: #f3d16905; stroke-width: 1; }
.preview-placeholder { color: #80858e; font-size: 12px; text-align: center; }
.segmented { display: flex; padding: 4px; gap: 4px; border: 1px solid #ffffff0c; border-radius: 6px; background: #17191d; }
.segment { flex: 1; height: 34px; border: 0; border-radius: 4px; background: transparent; color: #767c86; font-size: 11px; font-weight: 600; }
.segment.is-active { color: #e8e9ec; background: #282b31; box-shadow: 0 1px 4px #0003; }
.multiplier-row { display: flex; gap: 8px; margin-top: 16px; height: 44px; padding: 0; }
.multiplier-row button { flex: 1; min-width: 0; border: 1px solid #ffffff0c; border-radius: 5px; color: #969ca7; background: #1b1e23; font-size: 12px; font-weight: 600; transition: color 180ms, border-color 180ms; }
.multiplier-row button:hover { color: var(--gold); border-color: #f3d16966; }
.multiplier-row button:disabled, .segment:disabled { opacity: .45; }
.upgrade-machine { display: grid; grid-column: 2; grid-row: 1; justify-items: center; gap: 18px; min-width: 0; padding-top: 4px; }
.upgrade-track-wrap { position: relative; width: 336px; height: 336px; }
.upgrade-track { position: absolute; inset: 0; border-radius: 50%; border: 1px solid #ffffff0c; background: repeating-conic-gradient(from 0deg, #42464f 0deg .5deg, transparent .5deg 6deg); box-shadow: inset 0 0 0 10px #101113; }
.upgrade-track::before { content: ''; position: absolute; inset: 23px; border-radius: 50%; border: 1px solid #40444c; background: #1b1e24; }
.upgrade-track::after { content: ''; position: absolute; z-index: 2; inset: 54px; border-radius: 50%; background: #131519; border: 1px solid #ffffff0c; box-shadow: 0 0 28px #0005, inset 0 0 24px #0003; }
.success-zone { position: absolute; z-index: 1; inset: 26px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0deg calc(180deg - var(--chance-success-deg,0deg)), #78dbc0 calc(180deg - var(--chance-success-deg,0deg)) calc(180deg + var(--chance-success-deg,0deg)), transparent calc(180deg + var(--chance-success-deg,0deg)) 360deg); mask: radial-gradient(circle closest-side, transparent 0 80%, #000 81%); filter: drop-shadow(0 0 8px #78dbc044); }
.upgrade-ticks { position: absolute; inset: 31px; z-index: 2; border-radius: 50%; background: repeating-conic-gradient(transparent 0deg 5.2deg, #101113aa 5.2deg 6deg); mask: radial-gradient(circle closest-side, transparent 0 88%, #000 89%); }
.upgrade-needle { position: absolute; z-index: 7; left: calc(50% - 8px); top: 10px; width: 16px; height: calc(50% - 10px); transform: rotate(var(--roll-deg,180deg)); transform-origin: 50% 100%; pointer-events: none; }
.upgrade-needle::before { content: ''; position: absolute; top: 2px; left: 0; width: 16px; height: 25px; background: #ffe7a0; clip-path: polygon(0 0, 50% 22%, 100% 0, 50% 100%); filter: drop-shadow(0 0 6px #f3d169aa); }
.upgrade-needle::after { content: ''; position: absolute; top: 31px; left: 7px; width: 2px; height: 12px; background: var(--gold); box-shadow: 0 0 12px #f3d169; }
.scale-label { position: absolute; z-index: 5; color: #767e8c; font-size: 9px; font-weight: 500; }
.scale-label.top { left: 50%; top: 43px; transform: translateX(-50%); }
.scale-label.bottom { left: 50%; bottom: 43px; transform: translateX(-50%); }
.scale-label.left { left: 39px; top: 50%; transform: translateY(-50%); }
.scale-label.right { right: 39px; top: 50%; transform: translateY(-50%); }
.upgrade-readout { position: absolute; z-index: 4; inset: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; pointer-events: none; }
.upgrade-emblem { width: 36px; height: 36px; stroke-width: 3; color: var(--gold); filter: drop-shadow(0 3px 10px #f3d16925); }
.upgrade-readout > span { display: grid; gap: 6px; text-align: center; }
.upgrade-readout small { color: #737b88; font-size: 8px; font-weight: 600; }
.upgrade-readout strong { font-size: 36px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.upgrade-readout > span:last-child { display: flex; align-items: center; gap: 8px; }
.upgrade-readout > span:last-child strong { font-size: 11px; color: #a3aab6; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; padding: 12px 20px; border: 1px solid #ffe5a2; border-radius: 6px; background: linear-gradient(110deg,#f6db8c,#eec156); color: #322918; font-weight: 800; font-size: 13px; box-shadow: 0 4px 0 #8f6b28, 0 8px 28px #f3d16915, inset 0 1px #fff6; transition: filter 180ms, transform 180ms, box-shadow 180ms; }
.primary-button svg { stroke-width: 2.8; }
.primary-button:hover:not(:disabled) { filter: brightness(1.1); box-shadow: 0 4px 0 #8f6b28, 0 8px 32px #f3d16930; }
.primary-button:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 #8f6b28; }
.primary-button:disabled { border-color: #ffffff0c; background: #25272c; color: #777d87; box-shadow: 0 3px 0 #17191c; }
.upgrade-machine .primary-button { width: 286px; }
.upgrade-machine.is-spinning .upgrade-emblem { animation: emblem-pulse 1400ms ease-in-out infinite; }
.upgrade-machine.is-spinning .primary-button { color: var(--gold); background: #302b20; border-color: #f3d16925; }
.upgrade-machine.has-result.is-win .upgrade-readout strong { color: var(--success); }
.upgrade-machine.has-result:not(.is-win) .upgrade-readout > span:last-child strong { color: var(--danger); }
@keyframes emblem-pulse { 50% { opacity: .4; transform: translateY(-3px); } }
.result-strip { width: 100%; min-height: 36px; padding: 10px; font-size: 11px; line-height: 1.5; text-align: center; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; }
.result-strip:empty { display: none; }
.result-strip.win { background: #78dbc008; border-color: #78dbc025; color: var(--success); }
.result-strip.loss { background: #ef748108; border-color: #ef748125; color: var(--danger); }
.inventory-browser, .target-browser { grid-column: 1 / 4; grid-row: 2; width: calc(50% - 14px); border-top: 1px solid #ffffff0d; padding-top: 22px; min-width: 0; }
.target-browser { justify-self: end; }
.selection-limit, #sourceCount, #targetCount { font-size: 10px; color: #717885; font-weight: 400; }
.catalog-search, .target-filters input, .target-filters select, .field input { min-width: 0; width: 100%; height: 40px; border: 1px solid #ffffff0e; border-radius: 5px; padding: 0 12px; background: #191c21; color: #ccd1da; font-size: 11px; outline: none; }
input::placeholder { color: #646c79; }
.catalog-search { margin-bottom: 14px; }
.target-filters { display: grid; grid-template-columns: minmax(90px,1fr) 68px 68px 132px; gap: 7px; margin-bottom: 14px; }
.target-filters select { padding: 0 6px; font-size: 10px; }
.mini-inventory, .target-grid, .inventory-grid, .loot-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; align-content: start; }
.mini-inventory { max-height: 650px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #383d46 transparent; }
.skin-card { --rarity: #78dbc0; position: relative; min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #ffffff09; border-radius: 6px; background: linear-gradient(160deg,color-mix(in srgb,var(--rarity) 7%,#1a1d23),#191c21 70%); transition: border-color 170ms, background 170ms; }
.skin-card::after { content: ''; position: absolute; bottom: 0; left: 15%; right: 15%; height: 2px; background: var(--rarity); opacity: .65; }
.skin-card[role=button] { cursor: pointer; }
.skin-card[role=button]:hover { border-color: #ffffff30; background: #24282f; }
.skin-card.is-selected { border-color: #f3d169a0; background: #29271f; }
.skin-card.is-selected::before { content: '\2713'; position: absolute; z-index: 3; top: 8px; right: 8px; width: 17px; height: 17px; display: grid; place-items: center; color: #27231a; border-radius: 4px; font-size: 11px; background: var(--gold); }
.skin-art { position: relative; height: 106px; margin: 0 6px; }
.wear-tag { position: absolute; left: 4px; top: 9px; font-size: 8px; color: #8a929f; }
.skin-art img { width: 100%; height: 100%; object-fit: contain; padding: 7px 2px 0; filter: drop-shadow(0 9px 7px #0005); transition: transform 220ms; }
.skin-card:hover .skin-art img { transform: translateY(-3px) rotate(-3deg); }
.weapon-shape { display: none; }
.skin-meta { padding: 4px 10px 13px; display: flex; flex-direction: column; gap: 4px; min-height: 89px; }
.skin-meta small { color: #747d8b; font-size: 9px; font-weight: 500; }
.skin-meta strong { font-size: 11px; font-weight: 600; line-height: 1.4; min-height: 30px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.skin-meta > span { color: #d4d8df; font-size: 12px; font-weight: 600; margin-top: auto; }
.skin-actions { display: flex; gap: 6px; padding: 0 8px 12px; }
.skin-actions:empty { display: none; }
.mini-button { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 5px; min-width: 0; padding: 9px 4px; border: 1px solid #ffffff10; border-radius: 4px; background: #ffffff06; color: #cdd2db; font-size: 10px; }
.mini-button svg { width: 12px; height: 12px; }
.mini-button:hover { color: var(--gold); background: #ffffff0d; }
.inventory-empty { grid-column: 1 / -1; display: grid; place-items: center; min-height: 210px; padding: 24px; color: #707885; border: 1px dashed #ffffff12; border-radius: 6px; text-align: center; font-size: 12px; }
.pagination { display: flex; justify-content: center; gap: 18px; align-items: center; margin-top: 20px; font-size: 11px; color: #9098a6; }
.cases-layout { display: grid; gap: 32px; }
.case-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; }
.case-tile { display: flex; flex-direction: column; justify-content: end; gap: 6px; position: relative; min-width: 0; height: 198px; padding: 14px; text-align: left; border: 1px solid #ffffff0e; border-radius: 6px; background: #191c21; overflow: hidden; }
.case-tile.is-selected { border-color: #f3d16980; background: #24231d; }
.case-tile img { width: 88% !important; height: 110px !important; top: 8px !important; left: 6% !important; opacity: 1 !important; object-fit: contain; }
.case-tile small { font-size: 9px; color: #77808e; }
.case-tile span { font-size: 14px; color: var(--gold); font-weight: 700; }
.case-tile strong { font-size: 11px; font-weight: 500; }
.quantity-row { display: grid; grid-template-columns: repeat(5,1fr); gap: 6px; width: min(100%,320px); margin: 18px auto; }
.qty-chip { height: 36px; border: 1px solid #ffffff0e; border-radius: 4px; color: #9ba3af; background: #1c2026; }
.qty-chip.is-active { border-color: #f3d16966; color: var(--gold); background: #f3d1690c; }
.case-reels { display: grid; gap: 12px; }
.open-reel-lane { position: relative; overflow: hidden; border-top: 1px solid #ffffff0c; border-bottom: 1px solid #ffffff0c; background: #14161a; }
.open-reel-lane::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; z-index: 5; background: var(--gold); box-shadow: 0 0 16px #f3d16955; transform: translateX(-50%); }
.open-reel-lane::before { content: ''; position: absolute; z-index: 6; inset: 0; pointer-events: none; background: linear-gradient(90deg,#101113bb,transparent 18% 82%,#101113bb); }
.case-reel { display: flex; gap: 12px; }
.case-reel .skin-card { flex: 0 0 156px; width: 156px; border-radius: 0; }
.case-reel .skin-art { height: 110px; }
.opening-panel > .primary-button { max-width: 320px; margin: 20px auto; }
.loot-grid { grid-template-columns: repeat(auto-fill,minmax(185px,1fr)); margin-top: 24px; }
.inventory-grid { grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); }
.battle-layout { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 28px; }
.battle-layout .case-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.control-grid { display: grid; gap: 16px; margin: 18px 0; }
.field { display: grid; gap: 8px; }
.field > span { color: var(--muted); font-size: 11px; }
.stepper { display: flex; align-items: center; justify-content: space-between; }
.arena-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 10px; }
.fighter { padding: 10px; border: 1px solid #ffffff12; border-radius: 6px; background: #191c21; }
.fighter.is-winner { border-color: var(--gold); }
.fighter-head { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 14px; }
.fighter-head span { color: var(--gold); }
.slot { height: 310px; overflow: hidden; position: relative; }
.slot-strip { display: grid; gap: 8px; }
.slot.is-spinning .slot-strip { animation: slot-spin 800ms linear infinite; }
@keyframes slot-spin { from { transform: translateY(-200px); } to { transform: translateY(0); } }
.auth-gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: #090b10d9; backdrop-filter: blur(14px); }
.auth-box { width: min(100%,390px); border: 1px solid #ffffff15; border-radius: 8px; background: #191c21; padding: 32px; }
.auth-box h1 { font-size: 30px; margin-bottom: 24px; }
.auth-box .brand-mark { color: var(--gold); font-size: 22px; font-weight: 800; margin-bottom: 16px; }
.auth-form { display: grid; gap: 22px; }
@media (min-width: 1400px) { .mini-inventory, .target-grid { grid-template-columns: repeat(5,minmax(0,1fr)); } }
@media (max-width: 1150px) {
  .sidebar { padding: 0 22px; gap: 24px; }
  .nav-tabs { gap: 18px; }
  .nav-tab { font-size: 11px; }
  .balance-panel { column-gap: 10px; }
  .balance-panel button span { max-width: 80px; font-size: 9px; }
  .main-area { padding: 26px 24px 50px; }
  .upgrader-layout { grid-template-columns: minmax(0,1fr) 300px minmax(0,1fr); gap: 20px; }
  .upgrade-track-wrap { width: 300px; height: 300px; }
  .upgrade-readout { inset: 60px; gap: 12px; }
  .upgrade-readout strong { font-size: 30px; }
  .selected-preview { height: 230px; padding-left: 0; padding-right: 0; }
  .selected-preview img { height: 148px; }
  .selected-preview figcaption strong { font-size: 15px; }
  .section-heading h2 { font-size: 11px; gap: 5px; }
  .price-pill { font-size: 14px; }
  .target-filters { grid-template-columns: minmax(80px,1fr) 60px 60px; }
  .target-filters select { grid-column: 1 / -1; height: 28px; }
  .inventory-browser .catalog-search { margin-bottom: 49px; }
  .case-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 850px) {
  .sidebar { flex-wrap: wrap; justify-content: space-between; gap: 0 15px; padding-top: 14px; }
  .nav-tabs { order: 3; flex: 1 0 100%; justify-content: space-around; min-height: 50px; }
  .main-area { padding: 22px 16px 50px; }
  .upgrader-layout { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px 16px; }
  .upgrade-machine { grid-column: 1 / 3; grid-row: 1; padding-top: 0; }
  .source-panel { grid-column: 1; grid-row: 2; }
  .target-panel { grid-column: 2; grid-row: 2; }
  .source-panel, .target-panel { padding-top: 0; }
  .selected-preview { height: 220px; }
  .inventory-browser { grid-column: 1 / 3; grid-row: 3; width: 100%; }
  .target-browser { grid-column: 1 / 3; grid-row: 4; width: 100%; }
  .inventory-browser .catalog-search { margin-bottom: 14px; }
  .target-filters { grid-template-columns: minmax(80px,1fr) 70px 70px 130px; }
  .target-filters select { grid-column: auto; height: 40px; }
  .mini-inventory, .target-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .battle-layout { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 480px) {
  .sidebar { padding: 12px 14px 0; }
  .brand { gap: 6px; }
  .brand strong { font-size: 15px; }
  .brand-mark, .brand-mark svg { width: 30px; }
  .brand small { font-size: 8px; }
  .balance-panel { column-gap: 8px; }
  .balance-panel strong { font-size: 16px; }
  .balance-panel button { width: 32px; min-height: 34px; padding: 6px; }
  .balance-panel button span { display: none; }
  .nav-tabs { gap: 12px; min-height: 48px; }
  .nav-tab { font-size: 10px; gap: 5px; }
  .nav-tab svg { width: 14px; height: 14px; }
  .topbar h1 { font-size: 23px; }
  .main-area { padding: 20px 12px 40px; }
  .data-status { font-size: 8px; margin-bottom: 18px; }
  .upgrader-layout { gap: 24px 14px; }
  .source-panel .section-heading, .target-panel .section-heading { flex-wrap: wrap; gap: 8px; margin-bottom: 0; }
  .step-index { display: none; }
  .source-panel .section-heading .price-pill, .target-panel .section-heading .price-pill { width: 100%; font-size: 15px; }
  .selected-preview { height: 182px; padding: 0 0 12px; }
  .selected-preview img { height: 112px; }
  .selected-preview figcaption strong { font-size: 13px; }
  .selected-preview figcaption small, .selected-preview figcaption span { font-size: 8px; }
  .selected-preview.multiple { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .selected-preview.multiple img, .selected-preview.multiple.few-items img { height: 35px; }
  .selected-preview.multiple figcaption small { display: none; }
  .selected-preview.multiple figcaption strong { font-size: 8px; }
  .selected-preview.is-empty > svg { width: 28px; height: 28px; }
  .preview-placeholder { font-size: 10px; }
  .segment { font-size: 10px; }
  .multiplier-row { gap: 4px; }
  .multiplier-row button { font-size: 10px; }
  .target-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .target-filters > input:first-child { grid-column: 1 / -1; }
  .target-filters select { grid-column: 1 / -1; height: 32px; }
  .mini-inventory, .target-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
  .skin-art { height: 87px; margin: 0 2px; }
  .skin-meta { padding: 3px 7px 12px; min-height: 83px; }
  .skin-meta strong { font-size: 10px; }
  .skin-meta small { font-size: 8px; }
  .skin-meta > span { font-size: 11px; }
  .case-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .loot-grid, .inventory-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) { .skin-art img, .selected-preview img { transition: none; } .upgrade-machine.is-spinning .upgrade-emblem { animation: none; } }

.case-browser .section-heading { margin: 12px 0 26px; }
.case-browser .catalog-search { width: min(50%,280px); margin: 0; }
.case-browser .case-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.case-browser .case-tile { height: 310px; align-items: center; padding: 22px; border: 1px solid #ffffff0a; background: linear-gradient(145deg,color-mix(in srgb,var(--case-color) 10%,#15171b),#15171b 60%); text-align: center; }
.case-browser .case-tile:hover { border-color: #f3d16970; background-color: #202228; }
.case-browser .case-tile img { top: 28px !important; left: 10% !important; width: 80% !important; height: 164px !important; filter: drop-shadow(0 12px 16px #0008); transition: transform 200ms; }
.case-browser .case-tile .case-prize { top: 10px !important; left: 23% !important; width: 66% !important; height: 135px !important; transform: rotate(-12deg); z-index: 1; }
.case-browser .case-tile:hover img { transform: translateY(-5px); }
.case-browser .case-tile:hover .case-prize { transform: rotate(-8deg) translateY(-7px); }
.case-browser .case-tile small { order: 2; }
.case-browser .case-tile strong { font-size: 16px; order: 1; }
.case-browser .case-tile span { order: 3; margin-top: 8px; padding: 8px 20px; border: 1px solid #f3d16940; border-radius: 4px; color: var(--gold); background: #f3d16908; font-size: 16px; }
.case-hero { display: flex; justify-content: center; align-items: center; gap: 30px; min-height: 230px; }
.case-hero > img { width: 220px; height: 210px; object-fit: contain; filter: drop-shadow(0 18px 18px #0008); }
.case-hero .section-heading { display: grid; gap: 12px; }
.case-hero h2 { font-size: 25px; color: var(--text); }
.case-hero .price-pill { font-size: 20px; }
.open-options { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 12px 0 22px; font-size: 11px; color: var(--muted); }
.open-options .price-pill { margin-left: 18px; }
#instantToggle.is-on { background: #f3d1691c; border-color: #f3d16999; color: var(--gold); }
.contents-heading { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); }
#caseItemCount { color: var(--muted); font-size: 11px; }
.case-contents { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 10px; }
.drop-chance { display: block; padding: 0 10px 12px; color: var(--gold); font-size: 10px; }
.qty-chip:disabled { opacity: .3; }
.admin-note { color: var(--gold); border-bottom: 1px solid var(--line); padding: 8px 0 20px; margin-bottom: 20px; }
.admin-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.admin-controls .primary-button { width: auto; min-height: 40px; box-shadow: none; }
.admin-controls .field { flex: 1; min-width: 160px; }
.admin-controls select { height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--text); width: 100%; }
.admin-metrics { margin: 22px 0 8px; padding: 16px 0; border-block: 1px solid var(--line); line-height: 1.8; color: var(--success); font-variant-numeric: tabular-nums; }
.admin-metrics.invalid { color: var(--danger); }
.admin-message { min-height: 24px; margin: 8px 0; color: var(--gold); font-size: 12px; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 580px; text-align: left; }
.admin-table th { color: var(--muted); font-size: 11px; font-weight: 500; padding: 12px; background: var(--surface); }
.admin-table td { border-bottom: 1px solid var(--line); padding: 8px 12px; font-size: 12px; }
.admin-table td:first-child { display: flex; align-items: center; gap: 12px; }
.admin-table img { width: 68px; height: 48px; object-fit: contain; }
.admin-table input { width: 105px; height: 36px; padding: 0 8px; border: 1px solid #ffffff18; border-radius: 4px; color: var(--text); background: #191c21; }
.promo-banner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 26px; margin: 0 0 28px; border-block: 1px solid #f3d16930; background: linear-gradient(105deg,#343021,#1a211f 60%,#141a19); }
.main-area:has(#adminView.is-active) .promo-banner { display: none; }
.promo-offer { display: grid; grid-template-columns: 40px auto; gap: 4px 14px; align-items: center; }
.promo-offer svg { grid-row: 1 / 3; width: 38px; height: 38px; color: var(--gold); transform: rotate(-12deg); }
.promo-offer strong { font-size: 34px; line-height: 1; color: var(--gold); }
.promo-offer span { font-size: 8px; color: #b5ad91; }
.promo-code-block, .promo-time { display: grid; gap: 7px; }
.promo-code-block small, .promo-time small { color: #949c96; font-size: 8px; }
.promo-code-block strong { font-size: 20px; color: #eff5ed; }
.promo-code-block > span { color: #949c96; font-size: 9px; max-width: 275px; line-height: 1.5; }
.promo-time strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.promo-banner .primary-button { width: auto; min-height: 42px; font-size: 11px; white-space: nowrap; }
.admin-tabs { display: flex; gap: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.admin-tabs button { padding: 14px 4px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 13px; }
.admin-tabs button[aria-selected=true] { border-bottom-color: var(--gold); color: var(--gold); }
.analytics-toolbar { display: flex; align-items: center; gap: 10px; }
.analytics-toolbar select { height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--text); font-size: 11px; }
.stats-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; margin: 24px 0 32px; }
.stat-card { display: grid; gap: 14px; padding: 18px; background: #1b1e23; border: 1px solid var(--line); border-radius: 6px; }
.stat-card small { color: #9da5b1; font-size: 11px; }
.stat-card strong { font-size: 29px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-card span { font-size: 9px; line-height: 1.5; color: var(--muted); }
.analytics-columns { display: grid; grid-template-columns: 3fr 2fr; gap: 36px; }
.analytics-columns > section { min-width: 0; }
.traffic-chart { display: flex; gap: 5px; align-items: end; height: 190px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.traffic-day { display: flex; flex: 1; min-width: 12px; flex-direction: column; justify-content: end; align-items: center; gap: 8px; height: 100%; }
.traffic-day strong, .traffic-day small { font-size: 8px; color: var(--muted); font-weight: 400; }
.traffic-day i { display: block; width: 70%; max-width: 40px; background: #79cbb4; border-radius: 3px 3px 0 0; }
.payment-stats { display: grid; }
.payment-stats > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.payment-stats span { color: var(--muted); }
.payment-stats strong { font-variant-numeric: tabular-nums; }
.promo-settings { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; max-width: 780px; }
.promo-settings .admin-note, .promo-settings .toggle-field, #promoAdminMessage { grid-column: 1 / -1; }
.toggle-field { display: flex; align-items: center; gap: 10px; }
.toggle-field input { width: 18px; height: 18px; accent-color: var(--gold); }
.promo-settings .primary-button { width: auto; }
.topup-dialog { width: min(440px,calc(100% - 32px)); padding: 28px; background: #191c21; color: var(--text); border: 1px solid #ffffff20; border-radius: 8px; }
.topup-dialog::backdrop { background: #080a0ed9; backdrop-filter: blur(8px); }
.topup-dialog .section-heading h2 { font-size: 18px; }
.topup-dialog .admin-note { font-size: 11px; line-height: 1.6; }
.topup-preview { padding: 12px 0; color: var(--success); font-size: 12px; }

/* Public shell and local administration are deliberately separate surfaces. */
body:not(.admin-mode) .admin-only, body:not(.admin-mode) #adminView { display: none !important; }
.admin-mode .live-bar, .admin-mode .nav-tabs, .admin-mode .balance-panel, .admin-mode .account-button, .admin-mode .bonus-button, .admin-mode .promo-banner { display: none !important; }
.admin-mode .main-area { min-height: 75vh; }
.admin-session-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.admin-session-bar a, .admin-back { color: var(--muted); font-size: 12px; }
.admin-login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.admin-login-page .auth-box h1 { font-size: 22px; margin-top: 28px; }
.admin-back { display: inline-block; margin-top: 24px; }
#loginMessage { color: var(--danger); line-height: 1.6; }
.sidebar { gap: 28px; }
.brand { color: inherit; text-decoration: none; }
.brand strong { font-size: 25px; }
.brand-dot { color: #fc7f72; }
.brand-mark, .brand-mark svg { color: #fc7f72; }
.brand-mark svg { stroke-width: 2.2; filter: none; }
.brand small { margin-top: 2px; }
.nav-tabs { gap: 24px; }
.nav-tab.is-active { color: #fff; }
.nav-tab.is-active::after { background: #fc7f72; box-shadow: none; }
.balance-panel { column-gap: 12px; margin-left: auto; }
.balance-panel #headerTopup { width: 36px; height: 36px; color: #121b18; background: #86e5bf; border: 0; }
.account-button { max-width: 145px; min-width: 40px; background: transparent; }
.account-button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth-box { position: relative; }
.auth-close { position: absolute; top: 14px; right: 14px; }
.live-bar { display: grid; grid-template-columns: 130px minmax(0,1fr) 90px; min-height: 112px; border-bottom: 1px solid #ffffff0b; background: #131518; }
.live-caption { display: grid; align-content: center; grid-template-columns: 7px auto; gap: 8px; padding: 12px 16px; border-right: 1px solid var(--line); }
.live-caption strong { font-size: 10px; }
.live-caption small { grid-column: 1 / -1; font-size: 9px; color: var(--muted); }
.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #86e5bf; align-self: center; }
.live-drops { display: flex; align-items: stretch; gap: 3px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #383d44 transparent; }
.live-empty { align-self: center; margin: 0 24px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.live-drop { position: relative; display: grid; grid-template-columns: 1fr auto; align-content: end; gap: 4px; flex: 0 0 150px; height: 108px; padding: 8px 10px; text-align: left; border: 0; border-bottom: 2px solid var(--drop-color); background: linear-gradient(145deg,color-mix(in srgb,var(--drop-color) 12%,#17191d),#17191d 80%); }
.live-drop:hover { background: #272b32; }
.live-drop img { position: absolute; top: 0; left: 20px; width: 110px; height: 66px; object-fit: contain; transition: transform 180ms; }
.live-drop:hover img { transform: translateY(-3px); }
.live-drop strong { grid-column: 1 / -1; font-size: 10px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.live-drop small { color: var(--muted); font-size: 9px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.live-drop span { font-size: 9px; color: #d7dce2; }
.online-indicator { display: grid; grid-template-columns: 6px auto; align-content: center; justify-content: center; gap: 7px; border-left: 1px solid var(--line); }
.online-indicator strong { color: #86e5bf; font-size: 17px; font-variant-numeric: tabular-nums; }
.online-indicator small { grid-column: 1 / -1; color: var(--muted); text-align: center; font-size: 10px; }
.data-status.is-ready { display: none; }
.topbar { margin-bottom: 24px; }
.topbar .eyebrow { display: none; }
.bonus-button { border-color: #86e5bf25; color: #86e5bf; background: #86e5bf08; }
.promo-banner { background: linear-gradient(110deg,#322125,#1b2024 65%); border-block-color: #fc7f7230; }
.promo-offer strong, .promo-offer svg { color: #fc998a; }
.promo-offer span { color: #c6a4a0; }
.promo-banner .primary-button { background: #fc8f7c; border-color: #ffa18f; box-shadow: none; color: #281816; }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 26px 36px; border-top: 1px solid var(--line); color: #858990; font-size: 10px; line-height: 1.6; }
.footer-brand { color: #eee; font-size: 23px; font-weight: 800; text-decoration: none; }
@media (max-width: 1150px) { .sidebar { gap: 16px; } .nav-tabs { gap: 14px; } .account-button { width: 38px; padding: 8px; } .account-button span { display: none; } }
@media (max-width: 800px) { .sidebar { gap: 0 12px; } .brand strong { font-size: 23px; } .brand-mark { width: 30px; } .brand-mark svg { width: 30px; } .live-bar { grid-template-columns: 94px minmax(0,1fr) 66px; } .live-caption { padding: 10px; gap: 6px; } .live-caption strong { font-size: 9px; } .live-caption small { font-size: 8px; } .live-drop { flex-basis: 138px; } .site-footer { padding: 24px 16px; } }
@media (max-width: 480px) { .sidebar .nav-tabs { gap: 8px; } .sidebar .nav-tab { font-size: 10px; } .brand { gap: 5px; } .sidebar .balance-panel { column-gap: 7px; } .sidebar .balance-panel strong { font-size: 14px; } .sidebar #headerTopup { width: 30px; height: 32px; } .sidebar .account-button { width: 32px; min-width: 32px; } .live-bar { min-height: 102px; grid-template-columns: minmax(0,1fr) 58px; } .live-caption { display: none; } .live-drop { height: 98px; flex-basis: 132px; } .live-drop img { height: 58px; left: 12px; } .topbar h1 { font-size: 23px; } .bonus-button { font-size: 10px; padding: 8px; min-height: 34px; } .bonus-button svg { width: 15px; } }
@media (max-width: 360px) {
  .sidebar { column-gap: 8px; }
  .sidebar .brand strong { font-size: 20px; }
  .sidebar .brand-mark, .sidebar .brand-mark svg { width: 25px; }
  .sidebar .balance-panel { column-gap: 5px; }
  .topbar h1 { font-size: 20px; }
  .topbar-actions { gap: 5px; }
  .bonus-button { gap: 5px; padding: 7px; font-size: 9px; }
}
#topupMessage, #promoAdminMessage { color: var(--gold); line-height: 1.6; font-size: 12px; }
@media (max-width: 1100px) { .stats-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } .promo-banner { gap: 15px; padding: 18px; } }
@media (max-width: 650px) { .promo-banner { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 10px; padding: 16px 12px; } .promo-code-block strong { font-size: 15px; } .promo-offer { grid-template-columns: 24px auto; gap: 5px; } .promo-offer svg { width: 24px; } .promo-offer strong { font-size: 28px; } .promo-offer span { font-size: 7px; } .promo-time { display: grid; } .promo-time strong { font-size: 18px; } .promo-banner .primary-button { padding: 10px 6px; font-size: 10px; } .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; } .stat-card { padding: 14px; } .analytics-columns { grid-template-columns: 1fr; } .promo-settings { grid-template-columns: 1fr; } }
@media (max-width: 1000px) { .case-browser .case-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .case-contents { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media (max-width: 600px) { .case-browser .case-grid { gap: 10px; } .case-browser .case-tile { height: 235px; padding: 12px; } .case-browser .case-tile strong { font-size: 12px; } .case-browser .case-tile span { font-size: 13px; padding: 6px 14px; } .case-browser .case-tile img { top: 28px !important; height: 125px !important; } .case-browser .case-tile .case-prize { top: 8px !important; height: 87px !important; } .case-hero { gap: 10px; min-height: 180px; } .case-hero > img { width: 140px; height: 160px; } .case-hero h2 { font-size: 17px; } .case-contents { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; } .nav-tabs { gap: 5px; } .nav-tab { font-size: 9px; gap: 4px; } .admin-controls .field { min-width: 140px; } }
