/* UPRUST visual pass: same layout, brighter materials and controlled depth. */
:root {
  --scene: #15151c;
  --scene-deep: #0d0d13;
  --surface: #242532;
  --surface-raised: #303342;
  --edge: #4a4b63;
  --edge-soft: #343545;
  --ink: #f8f8fb;
  --muted: #a2a2b4;
  --accent: #c084fc;
  --accent-strong: #c084fc;
  --violet: #a339ff;
  --accent-shadow: rgba(135, 225, 175, .24);
  --depth: 0 22px 45px rgba(0, 0, 0, .42), 0 4px 10px rgba(0, 0, 0, .32);
}

html { background: var(--scene-deep); }

main.app {
  position: fixed !important;
  top: 68px;
  right: 0;
  bottom: 0;
  left: 250px;
  z-index: 2;
  display: block !important;
  width: auto !important;
  margin: 0 !important;
  padding-top: 36px !important;
  overflow-y: auto;
  visibility: visible !important;
  opacity: 1 !important;
}

main.app > .main-mark,
main.app > .toolbar,
main.app > .arena,
main.app > .bottom,
main.app > .seo-content {
  position: relative;
  z-index: 3;
  visibility: visible !important;
  opacity: 1 !important;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 52% 17%, rgba(163, 57, 255, .18), transparent 25%),
    radial-gradient(circle at 78% 72%, rgba(72, 188, 124, .12), transparent 30%),
    var(--scene-deep);
}

/* UPRUST currency token: compact faceted coin used in the header and totals. */
.metric-balance {
  position: relative;
  gap: 9px !important;
  padding-left: 8px !important;
}

.metric-balance::before {
  display: none;
  content: none;
}

.metric-balance strong {
  color: #d7b7ff !important;
}

/* Reference-style upgrade wheel: layered dark bezel and a warm-to-green chance ring. */
.upgrade-core .wheel {
  width: 330px !important;
  height: 330px !important;
  overflow: visible !important;
  background:
    repeating-conic-gradient(from -2deg, rgba(255,255,255,.12) 0deg 1deg, transparent 1deg 8deg),
    #17171b !important;
  border: 2px solid #26262b;
  filter: drop-shadow(0 14px 18px rgba(0,0,0,.6)) !important;
}

.upgrade-core .wheel::before {
  inset: 15px !important;
  background: #202024 !important;
  border: 10px solid #252529;
  box-shadow: inset 0 0 0 2px #0d0d10, 0 0 0 1px #34343a;
}

.upgrade-core .wheel::after {
  inset: 28px !important;
  background: conic-gradient(
    from calc(180deg - var(--half) * 1deg),
    #a339ff 0deg,
    #f0d51b calc(var(--chance) * 2.6deg),
    #edac18 calc(var(--chance) * 3.2deg),
    #df4026 calc(var(--chance) * 3.6deg),
    #26262a calc(var(--chance) * 3.6deg + 1deg) 360deg
  ) !important;
  border: 0;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 38px), #000 calc(100% - 37px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 38px), #000 calc(100% - 37px));
}

.upgrade-core .wheel-fill {
  inset: 68px !important;
  z-index: 2 !important;
  background: radial-gradient(circle at 35% 25%, #3c3c3f, #19191b 72%) !important;
  border: 1px solid #303035;
  box-shadow: inset 0 0 26px rgba(0,0,0,.55);
}

.upgrade-core .wheel-center {
  z-index: 4 !important;
  width: 185px !important;
  height: 185px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.upgrade-core .wheel-center strong {
  color: transparent !important;
  background: linear-gradient(180deg, #ffe02d, #53db42) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  font-size: 34px !important;
}

.upgrade-core .wheel-center small {
  color: #9bda3e !important;
  font-size: 12px !important;
  letter-spacing: 0 !important;
  text-transform: lowercase;
}

.upgrade-core .pointer {
  z-index: 8 !important;
  bottom: -15px !important;
  width: 28px !important;
  height: 28px !important;
  color: #ffd32b !important;
  filter: drop-shadow(0 2px 3px #000);
}

body::after {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: '';
  background:
    radial-gradient(circle at 15% 30%, rgba(163,57,255,.12), transparent 18%),
    radial-gradient(circle at 85% 70%, rgba(135,225,175,.08), transparent 22%);
  opacity: .7;
  animation: scene-drift 18s ease-in-out infinite alternate;
}

@keyframes scene-drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); opacity: .45; }
  to { transform: translate3d(2%, 1%, 0) scale(1.08); opacity: .82; }
}

.topbar {
  border-bottom-color: #343548;
  background: linear-gradient(180deg, rgba(37, 37, 51, .98), rgba(18, 18, 27, .96));
  box-shadow: 0 8px 25px rgba(0,0,0,.35), inset 0 -1px rgba(163,57,255,.18);
}

.recent-rail {
  border-right-color: #35364a;
  background: linear-gradient(180deg, #20202d, #101017 72%);
  box-shadow: 10px 0 28px rgba(0,0,0,.2);
}

.rail-card,
.selection-panel,
.inventory-box,
.catalog-box {
  border-color: var(--edge-soft);
  background: linear-gradient(145deg, rgba(60, 59, 78, .95), rgba(29, 29, 42, .99) 58%, rgba(17, 17, 25, .99));
  box-shadow: var(--depth), inset 0 1px rgba(237,255,224,.12), inset 0 -1px rgba(0,0,0,.34);
}

.rail-card {
  border-left-color: var(--violet);
  box-shadow: 0 8px 18px rgba(0,0,0,.28), inset 0 1px rgba(239,255,222,.1);
  transition: transform 180ms ease-out, border-color 180ms ease-out, filter 180ms ease-out;
}

.rail-card:hover { transform: translateX(3px) translateY(-1px); filter: brightness(1.1); }

.selection-panel { isolation: isolate; }
.selection-panel::before {
  position: absolute;
  z-index: -1;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  content: '';
  background: linear-gradient(120deg, rgba(211,174,255,.13), transparent 30% 70%, rgba(135,225,175,.1));
}

.selection-panel h2,
.box-head h2 { color: var(--ink); text-shadow: 0 1px 0 rgba(0,0,0,.45); }
.selection-panel > p, .panel-total, .catalog-status { color: var(--muted); }
.panel-total { border-top-color: rgba(186, 235, 157, .2); }
.panel-total b, .target-card b, .inv p { color: var(--accent) !important; }

.panel-pick,
.target-card,
.inv {
  border-color: #55566e;
  background: linear-gradient(145deg, #454459, #292a3b 62%, #1b1b28);
  box-shadow: 0 7px 13px rgba(0,0,0,.3), inset 0 1px rgba(242,255,234,.14);
  transition: transform 160ms ease-out, border-color 160ms ease-out, box-shadow 160ms ease-out;
}

.panel-pick:hover,
.target-card:hover,
.inv:hover,
.target-card.target,
.inv.selected {
  border-color: var(--accent);
  box-shadow: 0 10px 20px rgba(0,0,0,.34), 0 0 0 1px var(--accent-shadow), inset 0 1px rgba(255,255,255,.17);
  transform: translateY(-2px);
}

.upgrade-core { perspective: 900px; }
.wheel {
  transform: rotateX(3deg);
  box-shadow: 0 28px 44px rgba(0,0,0,.48), 0 0 0 8px rgba(163,57,255,.045), 0 0 34px rgba(135,225,175,.16);
}

.wheel-center {
  background: radial-gradient(circle at 35% 25%, #5c456d, #282638 62%, #161620);
  border-color: #665172;
  box-shadow: inset 0 8px 18px rgba(255,255,255,.08), inset 0 -18px 28px rgba(0,0,0,.42), 0 8px 22px rgba(0,0,0,.34);
}

.wheel-center strong, .zone-label { color: var(--accent); }
.upgrade, .login, .auth-state form button {
  color: #17121e;
  background: linear-gradient(145deg, #d9b5ff, #c084fc 48%, #4eae80);
  box-shadow: 0 10px 20px rgba(51, 133, 91, .3), inset 0 1px rgba(255,255,255,.56), inset 0 -2px rgba(37,91,63,.28);
  transition: transform 150ms ease-out, filter 150ms ease-out, box-shadow 150ms ease-out;
}
.upgrade:not(:disabled):hover, .login:hover, .auth-state form button:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 14px 26px rgba(51,133,91,.38), inset 0 1px rgba(255,255,255,.6); }
.upgrade:not(:disabled):active, .login:active, .auth-state form button:active { transform: translateY(1px); }

.quick button, .catalog-head button, .catalog-search, .range {
  border-color: #55566e;
  color: #e3e3ee;
  background: linear-gradient(145deg, #3a3a4e, #222230);
  box-shadow: inset 0 1px rgba(255,255,255,.1), 0 4px 10px rgba(0,0,0,.22);
}
.quick button:hover, .quick button.active { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 14px var(--accent-shadow), inset 0 1px rgba(255,255,255,.14); }

.tab-icon { box-shadow: 0 7px 15px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.45); }
.topup, .account-button, .language-toggle { box-shadow: inset 0 1px rgba(255,255,255,.1), 0 5px 12px rgba(0,0,0,.24); }

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

@media (hover: hover) and (pointer: fine) {
  .selection-panel:hover, .inventory-box:hover, .catalog-box:hover { box-shadow: 0 25px 50px rgba(0,0,0,.46), inset 0 1px rgba(237,255,224,.13); }
}

@media (prefers-reduced-motion: reduce) {
  .rail-card, .panel-pick, .target-card, .inv, .upgrade, .login, .auth-state form button { transition: none; }
}

/* Block redesign: denser game-surface treatment, layout intentionally unchanged. */
.selection-panel,
.inventory-box,
.catalog-box {
  position: relative;
  overflow: hidden;
  border: 1px solid #45465d;
  border-radius: 14px;
}

.selection-panel::after,
.inventory-box::after,
.catalog-box::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 42%;
  height: 2px;
  pointer-events: none;
  content: '';
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .8;
}

.selection-panel h2,
.box-head h2 {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: .02em;
}

.selection-panel h2::before,
.box-head h2::before {
  width: 5px;
  height: 18px;
  border-radius: 5px;
  content: '';
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent-shadow);
}

.selection-panel > p {
  letter-spacing: .03em;
}

.panel-items {
  position: relative;
  border: 1px solid rgba(163, 57, 255, .16);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 30%, rgba(163,57,255,.12), transparent 42%),
    linear-gradient(145deg, rgba(255,255,255,.04), transparent 45%),
    #171722;
  box-shadow: inset 0 1px rgba(255,255,255,.07), inset 0 -16px 30px rgba(0,0,0,.22);
}

.panel-items::before {
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(169,242,196,.13);
  border-radius: 7px;
  pointer-events: none;
  content: '';
}

.panel-pick,
.target-card,
.inv,
.store-card {
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 27%, rgba(169,242,196,.16), transparent 40%),
    linear-gradient(150deg, #49485f, #292a3c 58%, #171722);
}

.panel-pick img,
.target-card img,
.inv img,
.store-card img,
.rail-card img {
  filter: drop-shadow(0 11px 8px rgba(0,0,0,.58)) drop-shadow(0 0 12px rgba(169,242,196,.12));
}

.panel-total {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(169,242,196,.18);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.upgrade-core {
  position: relative;
  z-index: 1;
  align-self: start;
  justify-self: center;
  grid-row: 1 !important;
  grid-column: 2 !important;
  margin-top: 0;
}

.upgrade-core::before {
  position: absolute;
  top: 8%;
  left: 50%;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(163,57,255,.22);
  border-radius: 50%;
  pointer-events: none;
  content: '';
  transform: translateX(-50%);
  box-shadow: 0 0 0 18px rgba(163,57,255,.04), 0 0 0 36px rgba(135,225,175,.025);
}

.wheel {
  position: relative;
  z-index: 1;
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  border: 1px solid rgba(169,242,196,.28);
  background: linear-gradient(145deg, #343247, #161620 70%);
}

.wheel::after {
  background: conic-gradient(
    from calc(180deg - var(--half) * 1deg),
    #d9b5ff 0deg,
    #c084fc calc(var(--chance) * 3.6deg - 1deg),
    #4eae80 calc(var(--chance) * 3.6deg),
    #39334f calc(var(--chance) * 3.6deg + 2deg),
    #171722 360deg
  ) !important;
  box-shadow: inset 0 0 0 1px rgba(211,174,255,.22);
}

.wheel::before {
  background: radial-gradient(circle at 35% 25%, #3f3a55, #171722 72%) !important;
}

.brand-placeholder {
  position: relative;
  z-index: 1;
  padding: 22px;
  border: 1px dashed rgba(169,242,196,.18);
  border-radius: 12px;
  background: radial-gradient(circle, rgba(163,57,255,.14), transparent 68%);
}

.brand-placeholder img { filter: drop-shadow(0 0 18px rgba(169,242,196,.5)); }

.auth-state {
  margin: 8px;
  border: 1px solid rgba(169,242,196,.16);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(163,57,255,.12), rgba(17,17,26,.8));
}

.store-card,
.target-card {
  border-top-color: rgba(169,242,196,.65) !important;
}

.store-card:hover,
.target-card:hover,
.target-card.target {
  border-color: var(--accent) !important;
  box-shadow: 0 10px 20px rgba(0,0,0,.38), 0 0 0 1px var(--accent-shadow) !important;
}

.catalog-box .target-card {
  background:
    radial-gradient(circle at 50% 28%, rgba(163,57,255,.16), transparent 48%),
    linear-gradient(155deg, #3b394f, #1a1a27) !important;
}

.upgrade {
  min-height: 57px;
  border: 1px solid rgba(211,174,255,.5) !important;
  background: linear-gradient(145deg, #d9b5ff, #c084fc 48%, #4eae80) !important;
  box-shadow: 0 12px 25px rgba(51,133,91,.32), inset 0 1px rgba(255,255,255,.58) !important;
}

/* Final composition pass: compact game panels instead of oversized empty cards. */
@media (min-width: 821px) {
  .recent-rail { width: 200px !important; }

  main.app {
    left: 220px;
    padding-right: 40px !important;
    padding-left: 26px !important;
  }

  main.app > .main-mark,
  main.app > .toolbar,
  main.app > .arena,
  main.app > .bottom,
  main.app > .seo-content {
    width: min(1160px, 100%) !important;
    margin-right: auto !important;
    margin-left: auto !important;
  }

  main.app > .toolbar {
    width: max-content !important;
    margin: 0 0 12px 4px !important;
    padding: 4px !important;
    gap: 4px !important;
    transform: none !important;
    border: 1px solid rgba(211,174,255,.2) !important;
    border-radius: 10px !important;
    background: rgba(27,27,39,.86) !important;
    box-shadow: 0 8px 18px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.08) !important;
  }

  main.app > .toolbar .toolbar-action {
    width: 34px !important;
    height: 32px !important;
    padding: 0 !important;
    border: 1px solid transparent !important;
    border-radius: 7px !important;
    color: #a9a9ba !important;
  }

  main.app > .toolbar .toolbar-action:hover,
  main.app > .toolbar .toolbar-action:focus-visible {
    border-color: rgba(163,57,255,.55) !important;
    color: #f4f2fa !important;
    background: rgba(163,57,255,.18) !important;
  }

  main.app > .toolbar .toolbar-action.sound {
    color: #c084fc !important;
  }

  main.app > .toolbar .toolbar-action.fast.active {
    color: #fff !important;
    background: linear-gradient(145deg, #a339ff, #6714a9) !important;
    box-shadow: 0 0 14px rgba(163,57,255,.35) !important;
  }

  .selection-panel {
    min-height: 316px !important;
    padding: 16px 18px 12px;
  }

  .offer-panel .panel-items,
  .target-panel .panel-items {
    min-height: 176px !important;
    max-height: 176px;
  }

  .panel-items { margin-top: 12px; }
  .upgrade-core { padding-top: 2px; }
  .bottom { margin-top: 16px; }
  .inventory-box,
  .catalog-box { min-height: 292px; }
}

/* Remove the auxiliary chance marker; the wheel ring is the only win indicator. */
.upgrade-core .tiny-chance-marker,
.upgrade-core #zone-label,
.upgrade-core .zone-label {
  display: none !important;
  visibility: hidden !important;
}

/* Compact size must be the final rule in the cascade. */
.upgrade-core .wheel { width: 290px !important; height: 290px !important; }
.upgrade-core .wheel-center { width: 160px !important; height: 160px !important; }
.upgrade-core .wheel-center strong { font-size: 32px !important; }
.upgrade-core .wheel-center small { font-size: 11px !important; }
.upgrade-core .pointer { bottom: -13px !important; }

/* Extra-compact reference scale. */
.upgrade-core .wheel { width: 260px !important; height: 260px !important; }
.upgrade-core .wheel-center { width: 140px !important; height: 140px !important; }

/* Final visible lower win-zone arc. */
.upgrade-core .wheel-fill { z-index: 5 !important; }
.upgrade-core .wheel-fill::before {
  display: block !important;
  position: absolute !important;
  inset: -30px !important;
  z-index: 6 !important;
  border-radius: 50% !important;
  content: '' !important;
  background: conic-gradient(from 0deg, #a339ff 0deg, #ffe02d 34deg, #edb516 72deg, #df4125 108deg, transparent 109deg 360deg) !important;
  -webkit-mask: radial-gradient(farthest-side, transparent 0 88%, #000 89% 100%) !important;
  mask: radial-gradient(farthest-side, transparent 0 88%, #000 89% 100%) !important;
  opacity: .92 !important;
}

/* Ensure the chance ring sits above the inner disk and remains visible. */
.upgrade-core .wheel::after {
  z-index: 4 !important;
  display: block !important;
  opacity: 1 !important;
  content: '' !important;
  background: conic-gradient(from calc(180deg - var(--half) * 1deg), #a339ff 0deg, #ffe02d calc(var(--chance) * 2.1deg), #edb516 calc(var(--chance) * 3deg), #df4125 calc(var(--chance) * 3.6deg), #202021 calc(var(--chance) * 3.6deg + .8deg) 360deg) !important;
  -webkit-mask: radial-gradient(farthest-side, transparent 0 78%, #000 79% 100%) !important;
  mask: radial-gradient(farthest-side, transparent 0 78%, #000 79% 100%) !important;
}

/* Dedicated visible win-zone layer inside the wheel. */
.upgrade-core .wheel-fill {
  z-index: 5 !important;
}

.upgrade-core .wheel-fill::before {
  display: block !important;
  position: absolute !important;
  inset: -30px !important;
  z-index: 6 !important;
  border-radius: 50% !important;
  content: '' !important;
  background: conic-gradient(from 0deg, #a339ff 0deg, #ffe02d 34deg, #edb516 72deg, #df4125 108deg, transparent 109deg 360deg) !important;
  -webkit-mask: radial-gradient(farthest-side, transparent 0 88%, #000 89% 100%) !important;
  mask: radial-gradient(farthest-side, transparent 0 88%, #000 89% 100%) !important;
  opacity: .92 !important;
}

/* Show the win zone inside the compact inner ring. */
.upgrade-core .wheel::after {
  inset: 52px !important;
  background: conic-gradient(
    from calc(180deg - var(--half) * 1deg),
    #a339ff 0deg,
    #ffe02d calc(var(--chance) * 2.1deg),
    #edb516 calc(var(--chance) * 3deg),
    #df4125 calc(var(--chance) * 3.6deg),
    #202021 calc(var(--chance) * 3.6deg + .8deg) 360deg
  ) !important;
  -webkit-mask: radial-gradient(farthest-side, transparent 0 78%, #000 79% 100%) !important;
  mask: radial-gradient(farthest-side, transparent 0 78%, #000 79% 100%) !important;
}
.upgrade-core .wheel-center strong { font-size: 29px !important; }
.upgrade-core .wheel-center small { font-size: 10px !important; }
.upgrade-core .pointer { bottom: -11px !important; }

/* Final geometry: large outer wheel, smaller inner win zone. */
.upgrade-core .wheel { width: 330px !important; height: 330px !important; }
.upgrade-core .wheel::after { inset: 52px !important; }
.upgrade-core .wheel-fill { inset: 82px !important; z-index: 5 !important; }
.upgrade-core .wheel-center { width: 140px !important; height: 140px !important; }

/* Final visible lower win-zone arc. */
.upgrade-core .wheel-fill::before {
  display: block !important;
  position: absolute !important;
  inset: -30px !important;
  z-index: 6 !important;
  border-radius: 50% !important;
  content: '' !important;
  background: conic-gradient(from 0deg, #a339ff 0deg, #ffe02d 34deg, #edb516 72deg, #df4125 108deg, transparent 109deg 360deg) !important;
  -webkit-mask: radial-gradient(farthest-side, transparent 0 88%, #000 89% 100%) !important;
  mask: radial-gradient(farthest-side, transparent 0 88%, #000 89% 100%) !important;
  opacity: .92 !important;
}

/* Final visible lower win-zone arc. */
.upgrade-core .wheel-fill { z-index: 5 !important; }
.upgrade-core .wheel-fill::before {
  display: block !important;
  position: absolute !important;
  inset: -30px !important;
  z-index: 6 !important;
  border-radius: 50% !important;
  content: '' !important;
  background: conic-gradient(from 180deg, #a339ff 0deg, #ffe02d 34deg, #edb516 72deg, #df4125 108deg, transparent 109deg 360deg) !important;
  -webkit-mask: radial-gradient(farthest-side, transparent 0 88%, #000 89% 100%) !important;
  mask: radial-gradient(farthest-side, transparent 0 88%, #000 89% 100%) !important;
  opacity: .92 !important;
}

/* Final visible lower win-zone arc. */
.upgrade-core .wheel-fill { z-index: 5 !important; }
.upgrade-core .wheel-fill::before {
  display: block !important;
  position: absolute !important;
  inset: -30px !important;
  z-index: 6 !important;
  border-radius: 50% !important;
  content: '' !important;
  background: conic-gradient(from 180deg, #a339ff 0deg, #ffe02d 34deg, #edb516 72deg, #df4125 108deg, transparent 109deg 360deg) !important;
  -webkit-mask: radial-gradient(farthest-side, transparent 0 88%, #000 89% 100%) !important;
  mask: radial-gradient(farthest-side, transparent 0 88%, #000 89% 100%) !important;
  opacity: .92 !important;
}

/* Ensure the chance ring sits above the inner disk and remains visible. */
.upgrade-core .wheel::after {
  z-index: 4 !important;
  display: block !important;
  opacity: 1 !important;
  content: '' !important;
  background: conic-gradient(from calc(180deg - var(--half) * 1deg), #a339ff 0deg, #ffe02d calc(var(--chance) * 2.1deg), #edb516 calc(var(--chance) * 3deg), #df4125 calc(var(--chance) * 3.6deg), #202021 calc(var(--chance) * 3.6deg + .8deg) 360deg) !important;
  -webkit-mask: radial-gradient(farthest-side, transparent 0 78%, #000 79% 100%) !important;
  mask: radial-gradient(farthest-side, transparent 0 78%, #000 79% 100%) !important;
}

/* Final visible inner win-zone ring. */
.upgrade-core .wheel::after {
  z-index: 4 !important;
  display: block !important;
  opacity: 1 !important;
  content: '' !important;
  background: conic-gradient(from calc(180deg - var(--half) * 1deg), #a339ff 0deg, #ffe02d calc(var(--chance) * 2.1deg), #edb516 calc(var(--chance) * 3deg), #df4125 calc(var(--chance) * 3.6deg), #202021 calc(var(--chance) * 3.6deg + .8deg) 360deg) !important;
  -webkit-mask: radial-gradient(farthest-side, transparent 0 78%, #000 79% 100%) !important;
  mask: radial-gradient(farthest-side, transparent 0 78%, #000 79% 100%) !important;
}

/* Keep the outer wheel large; compact only the inner win zone. */
.upgrade-core .wheel { width: 330px !important; height: 330px !important; }
.upgrade-core .wheel::after {
  inset: 52px !important;
  -webkit-mask: radial-gradient(farthest-side, transparent 0 78%, #000 79% 100%) !important;
  mask: radial-gradient(farthest-side, transparent 0 78%, #000 79% 100%) !important;
}
.upgrade-core .wheel-fill {
  inset: 82px !important;
}
.upgrade-core .wheel-center {
  width: 140px !important;
  height: 140px !important;
}

/* Final reference lock. */
.upgrade-core .wheel {
  width: 330px !important;
  height: 330px !important;
  background: repeating-conic-gradient(from -2deg, #25282b 0deg 1deg, transparent 1deg 8deg) !important;
  border: 0 !important;
  filter: none !important;
  box-shadow: none !important;
}
.upgrade-core .wheel::before { display:block !important; inset:15px !important; border:1px solid #37383f !important; background:#242429 !important; box-shadow:inset 0 0 0 1px #111216 !important; }
.upgrade-core .wheel::after { inset:28px !important; background:#202126 !important; border:0 !important; -webkit-mask:radial-gradient(farthest-side,transparent 0 80%,#000 81% 100%) !important; mask:radial-gradient(farthest-side,transparent 0 80%,#000 81% 100%) !important; }
.upgrade-core .wheel-fill { display:block !important; inset:68px !important; z-index:3 !important; background:radial-gradient(circle at 50% 25%,#383a3e,#17181b 76%) !important; border:1px solid #303136 !important; box-shadow:inset 0 0 28px rgba(0,0,0,.6) !important; }
.upgrade-core .wheel-fill::before,.upgrade-core .wheel-fill::after { display:none !important; animation:none !important; }
.upgrade-core .wheel-center { z-index:8 !important; width:185px !important; height:185px !important; border:0 !important; border-radius:50% !important; background:transparent !important; box-shadow:none !important; }
.upgrade-core .wheel-center strong { margin:0 !important; color:#c684ff !important; background:none !important; -webkit-text-fill-color:#c684ff !important; font-size:36px !important; }
.upgrade-core .wheel-center small { margin-top:7px !important; color:#c084fca !important; font-size:12px !important; letter-spacing:0 !important; text-transform:lowercase !important; }
.upgrade-core .pointer { bottom:-15px !important; z-index:12 !important; color:#fff !important; filter:drop-shadow(0 2px 3px #000) !important; }

/* Compact wheel scale. */
.upgrade-core .wheel { width: 290px !important; height: 290px !important; }
.upgrade-core .wheel-center { width: 160px !important; height: 160px !important; }
.upgrade-core .wheel-center strong { font-size: 32px !important; }
.upgrade-core .wheel-center small { font-size: 11px !important; }
.upgrade-core .pointer { bottom: -13px !important; }

/* Restore only the bottom win strip without touching the wheel geometry. */
.upgrade-core .wheel-fill {
  display: block !important;
  inset: 0 !important;
  z-index: 5 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  pointer-events: none !important;
}

.upgrade-core .wheel-fill::before {
  display: block !important;
  position: absolute !important;
  right: 74px !important;
  bottom: 32px !important;
  left: 74px !important;
  z-index: 7 !important;
  height: 9px !important;
  border: 1px solid rgba(255,224,45,.45) !important;
  border-radius: 999px !important;
  content: '' !important;
  background:
    repeating-linear-gradient(112deg, rgba(255,255,255,.38) 0 7px, transparent 7px 17px),
    linear-gradient(90deg, #a339ff, #ffe02d 58%, #df4125) !important;
  background-size: 220% 100%, 100% 100% !important;
  background-position: 0 0, 0 0 !important;
  background-blend-mode: screen !important;
  box-shadow: 0 0 12px rgba(255,210,25,.3), inset 0 1px rgba(255,255,255,.5) !important;
  animation: win-water-flow-real 2.4s linear infinite !important;
}

.upgrade-core .wheel-fill::after {
  display: block !important;
  position: absolute !important;
  right: 82px !important;
  bottom: 35px !important;
  left: 82px !important;
  z-index: 8 !important;
  height: 3px !important;
  border-radius: 999px !important;
  content: '' !important;
  background: rgba(255,255,255,.7) !important;
  animation: win-water-glint 1.6s ease-in-out infinite !important;
}

.upgrade-core .wheel-center { z-index: 9 !important; }
.upgrade-core .pointer { z-index: 10 !important; }

.upgrade-core .wheel-center {
  width: 150px !important;
  height: 150px !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  box-shadow: inset 0 0 26px rgba(0,0,0,.6), 0 0 0 8px rgba(0,0,0,.12) !important;
}

.upgrade-core .wheel {
  width: 300px !important;
  height: 300px !important;
}

.upgrade-core .wheel-fill::before {
  right: 66px !important;
  bottom: 29px !important;
  left: 66px !important;
}

.upgrade-core .wheel-fill::after {
  right: 74px !important;
  bottom: 32px !important;
  left: 74px !important;
}

@keyframes win-water-flow-real {
  from { background-position: 0 0, 0 0; }
  to { background-position: 220% 0, 0 0; }
}

/* Match the latest wheel reference: dark rings, compact center, no win strip. */
.upgrade-core .wheel {
  width: 330px !important;
  height: 330px !important;
  background: repeating-conic-gradient(from -2deg, #25282b 0deg 1deg, transparent 1deg 8deg) !important;
  border: 0 !important;
  filter: none !important;
  box-shadow: none !important;
}

.upgrade-core .wheel::before {
  display: block !important;
  inset: 15px !important;
  border: 1px solid #37383f !important;
  background: #242429 !important;
  box-shadow: inset 0 0 0 1px #111216 !important;
}

.upgrade-core .wheel::after {
  inset: 28px !important;
  background: #202126 !important;
  border: 0 !important;
  -webkit-mask: radial-gradient(farthest-side, transparent 0 80%, #000 81% 100%) !important;
  mask: radial-gradient(farthest-side, transparent 0 80%, #000 81% 100%) !important;
}

.upgrade-core .wheel-fill {
  display: block !important;
  inset: 68px !important;
  z-index: 3 !important;
  background: radial-gradient(circle at 50% 25%, #383a3e, #17181b 76%) !important;
  border: 1px solid #303136 !important;
  box-shadow: inset 0 0 28px rgba(0,0,0,.6) !important;
}

.upgrade-core .wheel-fill::before,
.upgrade-core .wheel-fill::after {
  display: none !important;
  animation: none !important;
}

.upgrade-core .wheel-center {
  z-index: 8 !important;
  width: 185px !important;
  height: 185px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
}

.upgrade-core .wheel-center strong {
  margin: 0 !important;
  color: #c684ff !important;
  background: none !important;
  -webkit-text-fill-color: #c684ff !important;
  font-size: 36px !important;
}

.upgrade-core .wheel-center small {
  margin-top: 7px !important;
  color: #c084fca !important;
  font-size: 12px !important;
  letter-spacing: 0 !important;
  text-transform: lowercase !important;
}

.upgrade-core .pointer {
  bottom: -15px !important;
  z-index: 12 !important;
  color: #fff !important;
  filter: drop-shadow(0 2px 3px #000) !important;
}

/* The win indicator is a bottom strip, never a side arc. */
.upgrade-core .wheel::after {
  background: #202021 !important;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 21px), #000 calc(100% - 20px)) !important;
  mask: radial-gradient(farthest-side, transparent calc(100% - 21px), #000 calc(100% - 20px)) !important;
}

.upgrade-core .wheel {
  background:
    linear-gradient(90deg, #a339ff, #ffe02d 58%, #df4125) center 88% / 55% 9px no-repeat,
    url('https://s3.upgrader.pro/cdn/fa/images/game/circle-black.svg') center / 92% 92% no-repeat,
    url('https://s3.upgrader.pro/cdn/fa/images/game/upgrade-circle-bg.svg') center / 100% 100% no-repeat !important;
}

/* Final reference pass for the wheel geometry. */
.upgrade-core .wheel {
  background:
    linear-gradient(90deg, #a339ff, #ffe02d 58%, #df4125) center 88% / 55% 9px no-repeat,
    url('https://s3.upgrader.pro/cdn/fa/images/game/circle-black.svg') center / 92% 92% no-repeat,
    url('https://s3.upgrader.pro/cdn/fa/images/game/upgrade-circle-bg.svg') center / 100% 100% no-repeat !important;
  border: 0 !important;
  filter: none !important;
  box-shadow: none !important;
}

.upgrade-core .wheel::before {
  display: none !important;
}

.upgrade-core .wheel::after {
  inset: 27px !important;
  border-radius: 50% !important;
  background: conic-gradient(
    from 180deg,
    #a339ff 0deg,
    #ffe02d calc(var(--chance) * 2.1deg),
    #edb516 calc(var(--chance) * 3deg),
    #df4125 calc(var(--chance) * 3.6deg),
    #202021 calc(var(--chance) * 3.6deg + .8deg) 360deg
  ) !important;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 21px), #000 calc(100% - 20px)) !important;
  mask: radial-gradient(farthest-side, transparent calc(100% - 21px), #000 calc(100% - 20px)) !important;
}

.upgrade-core .wheel-fill {
  inset: 68px !important;
  background: #19191b !important;
  border: 0 !important;
  box-shadow: inset 0 0 0 1px #303035 !important;
}

/* Animated win-zone strip at the bottom of the wheel. */
.upgrade-core .wheel-fill::before {
  display: block !important;
  z-index: 9 !important;
  position: absolute;
  right: 18px;
  bottom: 14px;
  left: 18px;
  height: 9px;
  overflow: hidden;
  border: 1px solid rgba(255,224,45,.42);
  border-radius: 999px;
  content: '';
  pointer-events: none;
  background:
    linear-gradient(90deg, #a339ff, #ffe02d 58%, #df4125),
    repeating-linear-gradient(110deg, rgba(255,255,255,.35) 0 8px, transparent 8px 17px);
  background-size: 100% 100%, 220% 100%;
  background-blend-mode: screen;
  box-shadow: 0 0 12px rgba(255,210,25,.28), inset 0 1px rgba(255,255,255,.45);
  animation: win-water-flow 2.4s linear infinite;
}

.upgrade-core .wheel-fill::after {
  display: block !important;
  z-index: 10 !important;
  position: absolute;
  right: 25px;
  bottom: 16px;
  left: 25px;
  height: 4px;
  border-radius: 999px;
  content: '';
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.8), transparent);
  filter: blur(1px);
  animation: win-water-glint 1.6s ease-in-out infinite;
}

@keyframes win-water-flow {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 0, 220% 0; }
}

@keyframes win-water-glint {
  0%, 100% { opacity: .15; transform: translateX(-20%); }
  50% { opacity: .9; transform: translateX(20%); }
}

.upgrade-core .wheel-center {
  width: 185px !important;
  height: 185px !important;
  background: radial-gradient(circle at 50% 24%, #414145 0%, #252528 38%, #19191b 76%) !important;
  border: 0 !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  clip-path: circle(50% at 50% 50%) !important;
}

.upgrade-core .wheel-center::before,
.upgrade-core .wheel-center::after,
.upgrade-core #wheel-result {
  display: none !important;
  content: none !important;
}

.upgrade-core .wheel-center > .chevrons {
  display: none !important;
}

.upgrade-core > #zone-label {
  display: none !important;
}

#zone-label,
.zone-label {
  display: none !important;
  visibility: hidden !important;
}

/* Keep the wheel clean: no separate win-zone bar or water layer. */
.upgrade-core .wheel {
  background:
    url('https://s3.upgrader.pro/cdn/fa/images/game/circle-black.svg') center / 92% 92% no-repeat,
    url('https://s3.upgrader.pro/cdn/fa/images/game/upgrade-circle-bg.svg') center / 100% 100% no-repeat !important;
}

.upgrade-core .wheel-fill::before,
.upgrade-core .wheel-fill::after {
  display: none !important;
  animation: none !important;
}

.upgrade-core .wheel-center strong {
  margin-top: 0 !important;
  font-size: 36px !important;
  line-height: 1 !important;
}

.upgrade-core .wheel-center small {
  margin-top: 7px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

.upgrade-core .wheel-mark {
  position: absolute;
  z-index: 6;
  color: rgba(255,255,255,.48);
  font-size: 10px;
  line-height: 1;
}

.upgrade-core .mark-top { top: 38px; left: 50%; transform: translateX(-50%); }
.upgrade-core .mark-left { top: 50%; left: 39px; transform: translateY(-50%); }
.upgrade-core .mark-right { top: 50%; right: 39px; transform: translateY(-50%); }
.upgrade-core .mark-bottom { bottom: 38px; left: 50%; transform: translateX(-50%); }

.selection-panel > p { opacity: .78; }

.selection-panel .panel-total {
  font-size: 9px;
  font-weight: 700;
}

.wheel-center {
  border: 1px solid rgba(211,174,255,.18);
  background: radial-gradient(circle at 50% 25%, rgba(163,57,255,.18), transparent 58%), rgba(12,12,19,.84);
  box-shadow: inset 0 0 26px rgba(0,0,0,.5), 0 0 22px rgba(163,57,255,.12);
}

.wheel-center strong {
  color: #d9b5ff !important;
  text-shadow: 0 0 16px rgba(135,225,175,.46);
}

.quick {
  border: 1px solid rgba(169,242,196,.13);
  border-radius: 9px;
  padding: 4px;
  background: rgba(14,14,22,.76);
}

.auth-state h3 { color: #f4f2fa; }
.auth-state p { color: #aaa9bb; }

.catalog-box .box-head,
.inventory-box .box-head { min-height: 58px; }

/* UPGRADER reference direction: black graphite surfaces with one yellow action color. */
:root {
  --scene-deep: #090a0d;
  --scene: #101115;
  --surface: #1a1b20;
  --surface-raised: #24252b;
  --edge: #35363d;
  --edge-soft: #2a2b31;
  --accent: #ffd21a;
  --accent-strong: #ffbb00;
  --violet: #ffd21a;
  --accent-shadow: rgba(255,210,26,.23);
}

body {
  background:
    radial-gradient(circle at 50% 12%, rgba(255,210,26,.08), transparent 24%),
    linear-gradient(180deg, #0b0c0f, #111216 58%, #0b0c0f);
}

.topbar {
  border-bottom-color: #25262c;
  background: rgba(18,19,23,.96);
  box-shadow: 0 8px 24px rgba(0,0,0,.48);
}

.selection-panel,
.inventory-box,
.catalog-box {
  border-color: #34353c;
  background: linear-gradient(145deg, #24252b, #17181d 68%);
  box-shadow: 0 18px 40px rgba(0,0,0,.48), inset 0 1px rgba(255,255,255,.06);
}

.selection-panel::after,
.inventory-box::after,
.catalog-box::after { background: linear-gradient(90deg, transparent, #ffd21a, transparent); }

.selection-panel h2::before,
.box-head h2::before { background: #ffd21a; box-shadow: 0 0 12px rgba(255,210,26,.42); }

.panel-items {
  border-color: #292a31;
  background: radial-gradient(circle at 50% 30%, rgba(255,210,26,.08), transparent 45%), #111216;
}

.panel-items::before { border-color: rgba(255,210,26,.12); }

.brand-placeholder {
  border-color: rgba(255,210,26,.16);
  background: radial-gradient(circle, rgba(255,210,26,.1), transparent 68%);
}

.brand-placeholder img { filter: grayscale(.35) drop-shadow(0 0 14px rgba(255,210,26,.4)); }

.panel-pick,
.target-card,
.inv,
.store-card {
  border-color: #414249;
  background: linear-gradient(150deg, #292a30, #1a1b20 65%);
}

.catalog-head,
.skin-tabs { background: linear-gradient(90deg, rgba(255,210,26,.08), transparent 48%); }

.catalog-box .target-card {
  background: radial-gradient(circle at 50% 28%, rgba(255,210,26,.12), transparent 48%), linear-gradient(155deg, #292a30, #17181d) !important;
}

.wheel {
  background: linear-gradient(145deg, #303136, #111216 72%);
  box-shadow: 0 28px 44px rgba(0,0,0,.58), 0 0 0 8px rgba(255,210,26,.035), 0 0 34px rgba(255,210,26,.1);
}

.wheel::before { background: radial-gradient(circle at 35% 25%, #383940, #111216 72%) !important; }
.wheel::after { background: conic-gradient(from calc(180deg - var(--half) * 1deg), #ffe66a 0deg, #ffd21a calc(var(--chance) * 3.6deg), #b47e00 calc(var(--chance) * 3.6deg + 2deg), #202126 360deg) !important; }
.wheel-center { background: radial-gradient(circle at 50% 25%, rgba(255,210,26,.12), transparent 58%), #111216; border-color: #3d3e45; }
.wheel-center strong { color: #ffe66a !important; text-shadow: 0 0 16px rgba(255,210,26,.35); }

.upgrade,
.login,
.auth-state form button {
  color: #17130a !important;
  border-color: #ffe66a !important;
  background: linear-gradient(145deg, #ffe66a, #ffd21a 54%, #e0a900) !important;
  box-shadow: 0 12px 24px rgba(159,111,0,.28), inset 0 1px rgba(255,255,255,.55) !important;
}

.quick,
.upgrade-core .quick { border-color: #35363d; background: #15161a; }
.quick button:hover,
.quick button.active { border-color: #ffd21a; color: #ffe66a; box-shadow: 0 0 12px rgba(255,210,26,.2); }

.auth-state { border-color: #34353c; background: linear-gradient(145deg, rgba(255,210,26,.08), rgba(17,18,22,.9)); }
.recent-rail { border-right-color: #292a30; background: linear-gradient(180deg, #15161b, #0c0d10); }
.recent-rail .rail-card { border-left-color: #ffd21a !important; background: linear-gradient(145deg, #303137, #1a1b20 72%) !important; }
.recent-rail .rail-copy i,
.recent-rail .rail-copy b,
.recent-rail .rail-media b { color: #ffe66a !important; }

.brand-word b,
.metric strong,
.metric-online > i,
.toolbar .sound,
.panel-total b,
.target-card b,
.inv p,
.store-card b { color: #ffd21a !important; }

.topup,
.account-button,
.language-toggle,
.catalog-head button,
.filter-icon-button {
  border-color: #3b3c43 !important;
  color: #d8d9dd !important;
  background: #202126 !important;
}

.topup:hover,
.account-button:hover,
.language-toggle:hover,
.catalog-head button:hover,
.filter-icon-button:hover { border-color: #ffd21a !important; color: #ffe66a !important; }

.box-head,
.catalog-head { border-bottom-color: #303137 !important; }

.inventory-box,
.catalog-box { box-shadow: 0 18px 36px rgba(0,0,0,.46), inset 0 1px rgba(255,255,255,.05); }

.store-card,
.target-card { box-shadow: inset 0 1px rgba(255,255,255,.06), 0 6px 14px rgba(0,0,0,.28); }

.skin-tab.active,
.tab-icon { background: #ffd21a !important; color: #17130a !important; }

.selection-panel > p,
.catalog-status,
.rail-copy small { color: #92949d !important; }

.upgrade-core,
.upgrade-core > .wheel,
.upgrade-core > .upgrade,
.upgrade-core > .quick {
  visibility: visible;
}

.catalog-head,
.skin-tabs {
  border-bottom: 1px solid rgba(169,242,196,.14);
  background: linear-gradient(90deg, rgba(163,57,255,.12), transparent 45%, rgba(135,225,175,.08));
}

.catalog-search,
.range {
  border-radius: 7px;
}

.catalog-box .target-grid,
.store-box .inventory-list {
  background: rgba(10,10,16,.2);
}

.rail-card {
  border-radius: 9px;
  background: linear-gradient(145deg, #35354a, #1a1a26 72%);
}

/* Selected upgrade items stay in place instead of becoming a nested scroller. */
#offer-panel .panel-items {
  overflow: hidden !important;
  scrollbar-width: none !important;
}

#offer-panel .panel-items::-webkit-scrollbar {
  display: none !important;
}

.selection-panel .panel-items {
  border: 0 !important;
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 52%, rgba(163,57,255,.2), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.025), transparent 60%) !important;
}

.selection-panel .brand-placeholder {
  min-width: 190px !important;
  gap: 10px !important;
  padding: 18px 28px !important;
  opacity: 1 !important;
}

.selection-panel .brand-placeholder img {
  width: 116px !important;
  height: 116px !important;
  filter: drop-shadow(0 0 18px rgba(163,57,255,.48)) drop-shadow(0 12px 16px rgba(0,0,0,.55)) !important;
}

.selection-panel .brand-placeholder small {
  color: #f4f2fa !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 2.6px !important;
}

.rail-card b,
.target-card b,
.inv b,
.store-card b {
  color: var(--accent);
}

@media (max-width: 820px) {
  main.app { position: relative !important; inset: auto; width: calc(100% - 20px) !important; margin: 0 10px !important; padding-top: 25px !important; overflow: visible; }
  .upgrade-core {
    grid-row: 1 !important;
    grid-column: 1 !important;
    align-self: start;
    margin-top: 0;
    transform: translateY(-18px);
  }
  .selection-panel,
  .inventory-box,
  .catalog-box { border-radius: 11px; }
  .upgrade-core::before { opacity: .45; }
}

/* Keep the live feed docked directly below the desktop header. */
@media (min-width: 821px) {
  .recent-rail {
    position: fixed !important;
    top: 68px !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 5 !important;
    display: block !important;
    width: 200px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 7px 5px !important;
    overflow: hidden !important;
  }

  .recent-rail .rail-inner {
    height: 100% !important;
    overflow: hidden !important;
  }
}

@media (max-width: 820px) {
  .recent-rail {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
  }
}

/* Recent wins rail: match the purple event surface instead of the old green theme. */
.recent-rail {
  background:
    radial-gradient(circle at 20% 8%, rgba(163,57,255,.16), transparent 28%),
    linear-gradient(180deg, #20202d 0%, #111119 72%);
  border-right-color: #3d3d56;
  position: relative;
  overflow: hidden;
}

.recent-rail::before {
  position: absolute;
  top: -18%;
  left: -35%;
  width: 170%;
  height: 24%;
  pointer-events: none;
  content: '';
  background: linear-gradient(90deg, transparent, rgba(211,174,255,.14), transparent);
  filter: blur(12px);
  animation: rail-sweep 8s ease-in-out infinite;
}

@keyframes rail-sweep {
  0%, 18% { transform: translateY(0) rotate(-8deg); opacity: 0; }
  35% { opacity: 1; }
  72%, 100% { transform: translateY(520%) rotate(-8deg); opacity: 0; }
}

.recent-rail .rail-list {
  scrollbar-color: #7d5ca4 #171721;
}

.recent-rail .rail-card {
  border-color: #3d3d55 !important;
  border-left-color: #a339ff !important;
  background:
    radial-gradient(ellipse at 86% 24%, rgba(163,57,255,.22), transparent 48%),
    linear-gradient(145deg, #37364c, #1d1d2a 70%, #15151e) !important;
  box-shadow: 0 9px 22px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.1), inset 0 0 0 1px rgba(163,57,255,.1) !important;
  animation: rail-card-float 5s ease-in-out infinite;
}

.recent-rail .rail-card:nth-child(2n) { animation-delay: -1.7s; }
.recent-rail .rail-card:nth-child(3n) { animation-delay: -3.1s; }

@keyframes rail-card-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -2px, 0); }
}

.recent-rail .rail-card:nth-child(3n),
.recent-rail .rail-card:nth-child(4n) {
  border-left-color: #c084fc !important;
}

.recent-rail .rail-card::before {
  background: linear-gradient(100deg, rgba(255,255,255,.08), transparent 52%) !important;
}

.recent-rail .rail-copy i,
.recent-rail .rail-copy b,
.recent-rail .rail-media b {
  color: #c084fc !important;
}

.recent-rail .rail-copy strong { color: #f4f2fa !important; }
.recent-rail .rail-copy small { color: #aaa9bb !important; }

.recent-rail .rail-media::after {
  border-color: rgba(135,225,175,.55) !important;
  background: linear-gradient(135deg, #d9b5ff, #67bf94) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.55), 0 0 12px rgba(135,225,175,.16) !important;
}

.recent-rail .rail-media em {
  border-color: rgba(211,174,255,.7) !important;
  color: #fff !important;
  background: rgba(91,47,125,.92) !important;
}

@media (max-width: 820px) {
  .recent-rail .rail-card {
    border-top-color: #a339ff !important;
    background: linear-gradient(150deg, #37364c, #191923) !important;
  }
  .recent-rail .rail-card:nth-child(3n),
  .recent-rail .rail-card:nth-child(4n) { border-top-color: #c084fc !important; }
  .recent-rail .rail-list > p { color: #aaa9bb !important; }
  .rail-mobile-head { color: #f4f2fa !important; }
}

@media (prefers-reduced-motion: reduce) {
  body::after,
  .recent-rail::before,
  .recent-rail .rail-card { animation: none; }
}

@media (min-width: 821px) {
  .recent-rail {
    left: 6px !important;
    width: 208px !important;
  }

  .recent-rail .rail-list {
    gap: 8px !important;
    padding: 0 2px !important;
  }

  .recent-rail .rail-card {
    grid-template-columns: minmax(0, 1fr) 78px !important;
    min-height: 145px !important;
  }

  .recent-rail .rail-copy {
    gap: 5px !important;
    padding: 12px 2px 11px 10px !important;
  }

  .recent-rail .rail-copy strong {
    font-size: 9px !important;
    line-height: 1.2 !important;
  }

  .recent-rail .rail-copy small {
    font-size: 8px !important;
  }

  .recent-rail .rail-media {
    padding: 5px 3px 31px !important;
  }

  .recent-rail .rail-media img {
    width: 72px !important;
    height: 74px !important;
  }

  .recent-rail .rail-media b {
    right: 4px !important;
    left: 4px !important;
    font-size: 8px !important;
  }

  .arena {
    grid-template-columns: 374px 330px 374px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 41px !important;
  }

  .selection-panel {
    min-height: 347px !important;
    width: 100% !important;
    justify-content: center !important;
    padding: 26px 24px 18px !important;
    border: 1px solid rgba(211,174,255,.2) !important;
    background:
      radial-gradient(circle at 50% 34%, rgba(163,57,255,.18), transparent 42%),
      linear-gradient(160deg, #29283a, #171720 72%) !important;
    box-shadow: 0 18px 42px rgba(0,0,0,.35), inset 0 1px rgba(255,255,255,.08) !important;
  }

  .upgrade-core .wheel {
    width: 330px !important;
    height: 330px !important;
  }

  .upgrade-core .upgrade,
  .upgrade-core .quick {
    width: 306px !important;
  }

  main.app > .bottom {
    margin-top: 22px !important;
  }

  .selection-panel h2 {
    font-size: 15px !important;
    letter-spacing: .2px;
  }

  .selection-panel > p {
    margin-top: 8px !important;
    font-size: 11px !important;
  }

  .selection-panel .panel-items {
    min-height: 210px !important;
    max-height: 210px !important;
  }

  .panel-total {
    padding-top: 14px !important;
    font-size: 12px !important;
  }

  .panel-total b {
    font-size: 16px !important;
  }

  .upgrade-core {
    justify-self: center;
    transform: translateX(18px);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .upgrade-core .upgrade {
    margin-top: 16px !important;
    box-shadow: 0 10px 24px rgba(163,57,255,.22), inset 0 1px rgba(255,255,255,.25);
  }

  .upgrade-core .quick {
    margin-bottom: 0 !important;
  }
}

/* Last override: never render a side win-zone arc. */
.upgrade-core .wheel::after {
  background: #202021 !important;
  -webkit-mask: radial-gradient(farthest-side, transparent 0 72%, #000 73% 100%) !important;
  mask: radial-gradient(farthest-side, transparent 0 72%, #000 73% 100%) !important;
}

.upgrade-core .tiny-chance-marker,
.upgrade-core #zone-label,
.upgrade-core .zone-label {
  display: none !important;
  visibility: hidden !important;
}

/* Actual final compact size. */
.upgrade-core .wheel { width: 260px !important; height: 260px !important; }
.upgrade-core .wheel-center { width: 140px !important; height: 140px !important; }
.upgrade-core .wheel-center strong { font-size: 29px !important; }
.upgrade-core .wheel-center small { font-size: 10px !important; }
.upgrade-core .pointer { bottom: -11px !important; }

/* Final geometry: large outer wheel, smaller inner win zone. */
.upgrade-core .wheel { width: 330px !important; height: 330px !important; }
.upgrade-core .wheel::after { inset: 52px !important; }
.upgrade-core .wheel-fill { inset: 82px !important; z-index: 5 !important; }
.upgrade-core .wheel-center { width: 140px !important; height: 140px !important; }

.upgrade-core .wheel-fill::before {
  display: block !important;
  position: absolute !important;
  inset: -30px !important;
  z-index: 6 !important;
  border-radius: 50% !important;
  content: '' !important;
  background: conic-gradient(from 180deg, #a339ff 0deg, #ffe02d 34deg, #edb516 72deg, #df4125 108deg, transparent 109deg 360deg) !important;
  -webkit-mask: radial-gradient(farthest-side, transparent 0 88%, #000 89% 100%) !important;
  mask: radial-gradient(farthest-side, transparent 0 88%, #000 89% 100%) !important;
  opacity: .92 !important;
}
