/* ==============================================================
   ПЕРЕМИРИЕ — НАСТРАИВАЕМЫЕ СТИЛИ (V8)
   --------------------------------------------------------------
   Здесь собраны изменения, которые ты чаще всего будешь править:
   - размеры двух маскотов;
   - расположение блоков с рекордами и бонусами;
   - читаемость текста.

   Общие стили остальных элементов лежат в styles.css.
   Этот файл подключается ПОСЛЕ styles.css и переопределяет их.
   ============================================================== */

/* Общий фон — оставили из V7, НЕ используем картинку с макета. */

/* --- Секция «УВЕКОВЕЧЕНО В КАМНЕ» --- */
.stone-panel {
  grid-template-columns: 30% 24% minmax(0, 46%);
}

.stone-art {
  isolation: isolate;
}

.stone-scene {
  position: relative;
}

/* Большая картинка короля: никакой сетки на фоне, никакого поворота. */
.stone-scene img {
  position: absolute;
  left: -4%;
  bottom: 0;
  width: 109%;
  height: auto;
  max-width: none;
  max-height: 98%;
  object-fit: contain;
  transform: none;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.42));
}

/* Убираем затемнение справа, чтобы корона и монеты были чистыми. */
.stone-art::after {
  background: linear-gradient(90deg, transparent 82%, #0a180e 100%);
}

.stone-scene .stone-slogan {
  top: 13px;
  left: 15px;
  z-index: 2;
}

/* --- Правый блок «ПОПОЛНЯЙ БАЛАНС» --- */
.topup-panel {
  position: relative;
  min-height: 355px;
  overflow: hidden;
  padding: 19px 17px 16px;
  isolation: isolate;
  background: linear-gradient(145deg, #102218, #07150d 80%);
}

.topup-panel::after {
  z-index: 0;
  background: radial-gradient(ellipse at 92% 66%, rgba(173, 246, 34, .18), transparent 62%);
}

.topup-copy {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: none;
}

.topup-copy h2 {
  position: relative;
  z-index: 3;
  font-size: clamp(29px, 2.3vw, 36px);
  line-height: 1.05;
  margin-bottom: 15px;
  text-shadow: 0 4px 9px #000a;
}

/* Слева остаются бонусы, справа виден ЗОМБИ ЦЕЛИКОМ. */
.topup-panel .bonus-list {
  width: 73%;
  max-width: 270px;
  position: relative;
  z-index: 4;
  gap: 9px;
}

.topup-panel .bonus-row {
  width: 100%;
  min-height: 58px;
  padding: 10px 8px;
  background: rgba(12, 28, 14, 0.92);
  box-shadow: 0 5px 15px #0005;
}

.topup-panel .bonus-emoji {
  min-width: 28px;
  font-size: 18px;
}

.topup-panel .bonus-row strong {
  font-size: 12px;
  white-space: normal;
}

.topup-panel .bonus-row small {
  font-size: 11px;
  line-height: 1.35;
}

.topup-panel #topupAction {
  position: relative;
  z-index: 4;
  width: 73%;
  max-width: 270px;
  padding: 13px 8px;
  font-size: 12px;
  text-align: center;
  white-space: normal;
}

.topup-disclaimer {
  position: relative;
  z-index: 4;
  font-size: 10px;
}

/* Самое важное: подарочный зомби БЕЗ ОБРЕЗКИ и без фона. */
.topup-panel img.gift-mascot {
  position: absolute;
  z-index: 2;
  right: -2%;
  bottom: 1px;
  height: 79%;
  width: 50%;
  max-width: none;
  object-fit: contain;
  object-position: center bottom;
  transform: none;
  opacity: 1;
  filter: drop-shadow(-11px 7px 15px #0009);
  pointer-events: none;
}

/* Большие мониторы: даём персонажу чуть больше пространства. */
@media (min-width: 1600px) {
  .topup-panel img.gift-mascot {
    right: 0;
    width: 51%;
    height: 84%;
  }
}

/* Ноутбуки и небольшие мониторы. */
@media (max-width: 1300px) {
  .stone-panel {
    grid-template-columns: 27% 26% 47%;
  }

  .topup-panel {
    min-height: 335px;
    padding: 16px 12px;
  }

  .topup-panel .bonus-list,
  .topup-panel #topupAction {
    width: 74%;
  }

  .topup-panel .bonus-row strong {
    font-size: 11px;
  }
}

/* Планшеты: блоки становятся один под другим. */
@media (max-width: 1100px) {
  .topup-panel {
    min-height: 330px;
  }

  .topup-panel .bonus-list,
  .topup-panel #topupAction {
    width: 62%;
    max-width: 390px;
  }

  .topup-panel img.gift-mascot {
    right: 3%;
    width: 36%;
    height: 92%;
  }
}

@media (max-width: 800px) {
  .stone-panel {
    grid-template-columns: 1fr 1fr;
  }

  .stone-scene img {
    left: 0;
    width: 100%;
    height: auto;
    max-height: 98%;
  }

  .topup-panel img.gift-mascot {
    height: 95%;
    width: 37%;
    right: 3%;
  }
}

@media (max-width: 520px) {
  .topup-panel {
    min-height: 370px;
  }

  .topup-copy h2 {
    font-size: 30px;
  }

  .topup-panel .bonus-list,
  .topup-panel #topupAction {
    width: 70%;
  }

  .topup-panel img.gift-mascot {
    width: 42%;
    height: 70%;
    right: -1%;
    bottom: 0;
  }
}

/* ==============================================================
   FINAL DESKTOP REFINEMENT — two real characters, no overlap
   ============================================================== */
@media (min-width: 1101px) {
  /* Give the gift hero its own readable portion of the page. */
  .bottom-grid {
    grid-template-columns: minmax(0, 2.45fr) minmax(365px, 1fr);
  }

  .stone-panel {
    grid-template-columns: 28% 28% minmax(0, 44%);
  }

  .stone-info {
    min-width: 0;
  }

  .stone-title {
    gap: 7px;
  }

  .stone-title span {
    font-size: 30px;
  }

  .stone-title h2 {
    font-size: clamp(24px, 1.75vw, 30px);
    letter-spacing: 0.1px;
  }

  .topup-copy {
    width: 52%;
  }

  .topup-panel .bonus-list,
  .topup-panel #topupAction {
    width: 100%;
    max-width: none;
  }

  .topup-panel img.gift-mascot {
    width: 46%;
    height: auto;
    max-height: 86%;
    right: 1%;
    bottom: 8px;
    object-fit: contain;
    object-position: center bottom;
  }
}

/* Король заметнее, но не закрывает рейтинг и заголовок. */
@media (min-width: 1101px) {
  .stone-scene img {
    left: -10%;
    width: 124%;
    max-height: 99%;
  }
}

/* Shop catalog and persistent reward inventory. */
.offer-icon {
  display: grid;
  place-items: center;
  height: 100%;
  color: #e5c46d;
  font-size: 52px;
  text-shadow: 0 0 22px #7bf5a055;
}

.offer-meta,
.offer-status {
  display: block;
  margin-top: 5px;
  color: #b6c4b1;
  font-size: 10px;
}

.offer-status { color: #e5c46d; }

.case-card h3 {
  overflow: hidden;
  text-overflow: ellipsis;
}

.upgrade-modes {
  display: flex;
  gap: 7px;
  margin: 12px 0;
}

.upgrade-modes button {
  flex: 1;
  border: 1px solid #304c26;
  border-radius: 8px;
  padding: 9px 6px;
  color: #c0c6bb;
  background: #101d14;
  font-size: 11px;
  font-weight: 800;
}

.upgrade-modes button.active {
  color: #152207;
  background: #7bf5a0;
  border-color: #7bf5a0;
}

.upgrade-panel button:disabled {
  cursor: not-allowed;
  opacity: .58;
}

.live-empty {
  align-self: center;
  padding: 12px 18px;
  color: #aab6a8;
  font-size: 12px;
}

.reward-inventory {
  margin: 20px 0;
  padding: 22px;
}

.reward-inventory .panel-heading h2 { margin: 5px 0 0; }

.reward-inventory-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.reward-instance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px;
  border: 1px solid #263e2a;
  border-radius: 10px;
  background: #09140d;
}

.reward-instance-info,
.reward-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reward-instance-info { flex: 1; flex-wrap: wrap; }
.reward-instance-info strong { color: #f0f2ef; }
.reward-instance-info small { color: #aab6a8; font-size: 11px; }

.reward-actions { flex-wrap: wrap; justify-content: flex-end; }

.reward-actions button {
  padding: 7px 9px;
  border: 1px solid #36533a;
  border-radius: 7px;
  color: #c8d3c5;
  background: #101d14;
  font-size: 10px;
}

.reward-actions button:disabled { cursor: not-allowed; opacity: .45; }

@media (max-width: 720px) {
  .reward-instance { align-items: stretch; flex-direction: column; }
  .reward-actions { justify-content: flex-start; }
  .reward-inventory { padding: 15px; }
}


/* V8 section layout: focused in-page views with the shop as the landing panel. */
#shop { padding-bottom: 32px; }
.section-nav {
  position: sticky;
  top: 8px;
  z-index: 20;
  display: flex;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 8px auto 22px;
  padding: 7px;
  border: 1px solid #2c482e;
  border-radius: 13px;
  background: rgba(7, 17, 10, .94);
  box-shadow: 0 12px 30px #0008;
  backdrop-filter: blur(12px);
}
.section-tab {
  min-width: 132px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 12px 19px;
  color: #b8c5b5;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  transition: background .18s, color .18s, border-color .18s, box-shadow .18s;
}
.section-tab:hover { color: #f0f2ef; border-color: #38553a; }
.section-tab.is-active {
  color: #102014;
  background: #7bf5a0;
  border-color: #a6ffc0;
  box-shadow: 0 0 18px #7bf5a033;
}
.site-view { min-width: 0; animation: view-in .2s ease-out; }
.site-view[hidden] { display: none !important; }
@keyframes view-in { from { opacity: .65; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.live-strip {
  display: grid;
  grid-template-columns: minmax(220px, .55fr) minmax(0, 1.45fr);
  height: auto;
  min-height: 110px;
  margin: 0 0 16px;
  overflow: hidden;
  border: 1px solid #304b30;
  border-radius: 13px;
  background: linear-gradient(110deg, #102016, #09130d 72%);
}
.live-label {
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border: 0;
  border-right: 1px solid #293e2b;
  border-radius: 0;
  box-shadow: none;
}
.live-label strong { white-space: normal; line-height: 1.2; font-size: 15px; letter-spacing: .04em; }
.live-window {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 108px;
  padding: 10px 18px;
  mask-image: none;
}
.live-track { display:flex; align-items:center; width:max-content; min-width:100%; animation:none; }
.live-feed-sequence { display:flex; flex:none; align-items:center; gap:10px; padding-right:10px; }
.live-track.is-moving { animation:case-feed-marquee var(--feed-duration,36s) linear infinite; }
.live-track.is-moving:hover { animation-play-state:paused; }
.live-event { box-sizing:border-box; display:grid; grid-template-columns:60px minmax(0,1fr); align-items:center; gap:10px; flex:0 0 236px; min-width:0; min-height:80px; padding:8px 11px; border:1px solid #304b37; border-radius:9px; background:linear-gradient(135deg,#14251a,#0c1710); box-shadow:inset 0 0 12px #7bf5a008; }
.live-event img { width:60px; height:60px; object-fit:contain; }
.live-event-copy { display:grid; min-width:0; gap:5px; }
.live-event-copy strong { overflow:hidden; color:#e5eee7; font:750 13px/1.2 "Segoe UI",sans-serif; text-overflow:ellipsis; white-space:nowrap; }
.live-event-copy small { overflow:hidden; color:#9ab09e; font:600 11px/1.2 "Segoe UI",sans-serif; text-overflow:ellipsis; white-space:nowrap; }
@keyframes case-feed-marquee { to { transform:translateX(-50%); } }
@media (prefers-reduced-motion:reduce) { .live-track.is-moving { animation:none; transform:none; } }
.live-empty { padding: 0; line-height: 1.5; }
.shop-panel { min-height: 0; margin: 0 0 18px; padding: 22px; }
.shop-panel .filters { margin-bottom: 19px; }
.case-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.case-card {
  min-height: 326px;
  padding: 0 13px 14px;
  border-radius: 12px;
}
.case-picture {
  height: clamp(170px, 16vw, 230px);
  width: calc(100% + 26px);
  margin-left: -13px;
}
.case-picture img { object-fit: contain; padding: 7px; mix-blend-mode: normal; }
.case-card h3 {
  min-height: 38px;
  margin: 9px 0 5px;
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
  font-size: 13px;
  line-height: 1.35;
}
.case-foot { margin-top: auto; }
.case-price { font-size: 23px; }
.offer-meta, .offer-status { font-size: 10px; line-height: 1.35; }
.shop-promo-panel {
  min-height: 245px;
  margin: 0 0 8px;
  padding: 20px 24px;
}
.shop-promo-panel .topup-copy { width: 58%; max-width: 620px; }
.shop-promo-panel .topup-copy h2 { font-size: clamp(25px, 2.1vw, 34px); margin: 0 0 10px; }
.shop-promo-panel .bonus-list, .shop-promo-panel #topupAction { width: min(100%, 360px); }
.shop-promo-panel .bonus-row { min-height: 48px; padding: 7px 9px; }
.shop-promo-panel .gift-mascot { width: auto; height: 92%; max-height: 92%; right: 4%; bottom: 0; object-fit: contain; }
.view-content { width: min(100%, 1260px); margin: 0 auto; }
.view-content-narrow { width: min(100%, 1080px); }
.upgrade-panel { min-height: 0; }
.reward-inventory { margin: 0; }
.ratings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 16px;
}
.ratings-grid > .current-board,
.ratings-grid > .stone-panel { min-width: 0; min-height: 100%; margin: 0; }
.ratings-grid > .current-board { grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 14px; padding: 20px; }
.ratings-grid > .stone-panel { grid-template-columns: minmax(125px, .7fr) minmax(145px, .8fr) minmax(0, 1.5fr); min-height: 360px; }
.ratings-grid .stone-scene { min-height: 360px; }
.ratings-grid .stone-info { padding: 18px 8px; }
.ratings-grid .stone-title h2 { font-size: clamp(21px, 1.7vw, 28px); }

@media (max-width: 1180px) {
  .case-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ratings-grid { grid-template-columns: 1fr; }
  .ratings-grid > .stone-panel { grid-template-columns: minmax(190px, .8fr) minmax(210px, .8fr) minmax(0, 1.4fr); }
}
@media (max-width: 800px) {
  .section-nav { position: static; width: 100%; justify-content: flex-start; overflow-x: auto; margin: 8px 0 16px; }
  .section-tab { flex: 1 0 auto; min-width: 112px; padding: 11px 13px; }
  .live-strip { grid-template-columns: minmax(0, 1fr); }
  .live-label { border-right: 0; border-bottom: 1px solid #293e2b; padding: 14px 17px; }
  .live-label span { margin-top: 4px; }
  .live-window { min-height: 70px; padding: 10px 17px; }
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .case-card { min-height: 300px; }
  .case-picture { height: clamp(150px, 32vw, 210px); }
  .shop-panel { padding: 16px; }
  .ratings-grid > .current-board { grid-template-columns: 1fr; }
  .ratings-grid > .stone-panel { grid-template-columns: 30% 25% minmax(0, 45%); }
}
@media (max-width: 560px) {
  .section-nav { gap: 5px; padding: 5px; }
  .section-tab { min-width: 102px; padding: 10px 9px; font-size: 10px; }
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .case-card { min-height: 265px; padding: 0 9px 11px; }
  .case-picture { width: calc(100% + 18px); margin-left: -9px; height: 140px; }
  .case-picture img { padding: 4px; }
  .case-card h3 { min-height: 42px; font-size: 12px; }
  .case-price { font-size: 20px; }
  .shop-panel { padding: 12px; }
  .shop-promo-panel { min-height: 260px; padding: 17px 14px; }
  .shop-promo-panel .topup-copy { width: 68%; }
  .shop-promo-panel .topup-copy h2 { font-size: 23px; }
  .shop-promo-panel .bonus-row strong, .shop-promo-panel .bonus-row small { font-size: 10px; }
  .shop-promo-panel .gift-mascot { height: 76%; max-height: 76%; right: -3%; }
  .ratings-grid > .stone-panel { grid-template-columns: 1fr 1fr; }
  .ratings-grid > .stone-panel .stone-art { min-height: 180px; }
  .ratings-grid > .stone-panel .stone-info { min-width: 0; }
  .ratings-grid > .stone-panel .stone-history { grid-column: 1 / -1; padding: 12px; }
}
@media (max-width: 370px) {
  .case-grid { grid-template-columns: 1fr; }
  .case-card { min-height: 290px; }
  .case-picture { height: 190px; }
  .shop-promo-panel .topup-copy { width: 72%; }
}


/* Compact V8 game client: fixed desktop viewport, scroll only inside work areas. */
.inventory-shortcut {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid #344d35;
  border-radius: 10px;
  color: #dce7d8;
  background: linear-gradient(135deg, #142319, #0a150e);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  white-space: nowrap;
}
.inventory-shortcut:hover { border-color: #7bf5a0; color: #7bf5a0; }
.inventory-shortcut svg { color: #7bf5a0; flex: 0 0 auto; }
.promo-mascot { width: 37px; height: 42px; object-fit: contain; flex: 0 0 auto; }
.inventory-dialog {
  width: min(900px, calc(100vw - 28px));
  max-width: none;
  max-height: min(820px, calc(100dvh - 28px));
  padding: 0;
  overflow: hidden;
  border: 1px solid #426442;
  border-radius: 16px;
  color: #f0f2ef;
  background: linear-gradient(145deg, #0c1910, #07110b 78%);
  box-shadow: 0 24px 90px #000c, 0 0 35px #7bf5a018;
}
.inventory-dialog::backdrop { background: #020704c9; backdrop-filter: blur(5px); }
.inventory-dialog-shell { display: flex; flex-direction: column; max-height: min(820px, calc(100dvh - 28px)); min-height: 260px; }
.inventory-dialog-head { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px 16px; border-bottom: 1px solid #29412d; }
.inventory-eyebrow { color: #7bf5a0; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.inventory-dialog-head h2 { margin: 5px 0 3px; color: #f0f2ef; font-size: 23px; }
.inventory-dialog-head p { margin: 0; color: #aab6a8; font-size: 12px; }
.inventory-dialog-close { flex: 0 0 38px; width: 38px; height: 38px; border: 1px solid #405743; border-radius: 9px; color: #e5c46d; background: #111e14; font-size: 22px; }
.inventory-dialog-close:hover { border-color: #e5c46d; }
.inventory-dialog #reward-inventory { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 18px 18px; }
.inventory-dialog .reward-inventory-list { margin-top: 0; padding: 0 3px 4px 0; }
.inventory-dialog .reward-instance { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 13px; }
.reward-thumbnail { width: 62px; height: 62px; display: grid; place-items: center; overflow: hidden; border: 1px solid #304b32; border-radius: 9px; background: radial-gradient(circle, #273e29, #0a140d 76%); color: #e5c46d; font-size: 24px; }
.reward-thumbnail img { width: 100%; height: 100%; object-fit: contain; }
.inventory-dialog .reward-instance-info { display: grid; grid-template-columns: 1fr; gap: 4px; min-width: 0; }
.inventory-dialog .reward-instance-info strong { overflow-wrap: anywhere; }
.inventory-dialog .reward-actions { gap: 6px; }
.inventory-dialog .reward-actions button { padding: 8px 10px; font-size: 11px; }
.inventory-dialog .reward-actions button:disabled { opacity: .48; }
.inventory-empty { padding: 28px 16px; line-height: 1.6; }
.inventory-login { display: block; margin: 0 auto 12px; }

@media (min-width: 801px) {
  html, body { width: 100%; height: 100%; min-height: 0; overflow: hidden; }
  body { height: 100dvh; display: flex; flex-direction: column; }
  .topbar.wrap { flex: 0 0 96px; height: 96px; min-height: 96px; margin: 0 auto; }
  main#shop.wrap { flex: 1 1 auto; width: min(1530px, calc(100% - 66px)); height: calc(100dvh - 120px); min-height: 0; margin: 0 auto; padding: 0 0 4px; display: flex; flex-direction: column; overflow: hidden; }
  .section-nav { position: static; flex: 0 0 48px; width: fit-content; min-height: 48px; margin: 0 auto 10px; padding: 5px; gap: 6px; }
  .section-tab { min-width: 150px; padding: 10px 20px; }
  .site-view { display: none; min-height: 0; }
  .site-view:not([hidden]) { display: flex; flex: 1 1 auto; flex-direction: column; overflow: hidden; }
  .site-view[hidden] { display: none !important; }
  #view-shop { gap: 10px; }
  .live-strip { flex: 0 0 110px; min-height: 110px; grid-template-columns: 225px minmax(0, 1fr); margin: 0; }
  .live-label { padding: 10px 15px; }
  .live-label strong { font-size: 14px; }
  .live-label span { margin-top: 3px; font-size: 10px; }
  .live-label small { font-size: 8px; }
  .live-window { min-height: 0; padding: 8px 16px; }
  .shop-panel { flex: 1 1 auto; min-height: 0; margin: 0; padding: 13px 16px 9px; display: flex; flex-direction: column; overflow: hidden; }
  .shop-panel .filters { flex: 0 0 auto; margin-bottom: 9px; gap: 7px; }
  .filter { flex: 0 0 auto; padding: 9px 17px; font-size: 11px; }
  .case-grid { flex: 1 1 auto; min-height: 0; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(250px, max-content)); grid-auto-rows: minmax(250px, max-content); align-content: start; gap: 12px; overflow-y: auto; overscroll-behavior: contain; padding: 2px 4px 4px 0; }
  .case-card { box-sizing: border-box; min-height: 250px; height: auto; overflow: hidden; padding: 0 10px 10px; }
  .case-picture { flex: 0 0 clamp(112px, 14.5vh, 156px); height: clamp(112px, 14.5vh, 156px); width: calc(100% + 20px); margin-left: -10px; }
  .case-picture img { padding: 5px; }
  .case-card h3 { min-height: 34px; margin: 6px 0 3px; font-size: clamp(12px, .82vw, 14px); line-height: 1.28; }
  .case-price { font-size: 20px; }
  .offer-meta, .offer-status { margin-top: 3px; font-size: 9px; }
  .shop-panel > .panel-hint { flex: 0 0 auto; margin-top: 5px; font-size: 9px; }
  .shop-promo-panel { display: none; }
  #view-upgrader, #view-ratings { justify-content: center; }
  .view-content-narrow { width: min(100%, 1080px); max-height: 100%; overflow: auto; }
  .upgrade-panel { width: 100%; min-height: 0; }
  .upgrade-stage { grid-template-columns: 1fr minmax(130px, .7fr) 1fr; }
  #view-ratings { justify-content: stretch; }
  .ratings-grid { width: 100%; min-height: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .ratings-grid > .current-board, .ratings-grid > .stone-panel { min-height: 0; height: 100%; }
  .ratings-grid > .current-board { grid-template-columns: minmax(155px, .7fr) minmax(0, 1.3fr); gap: 10px; padding: 15px; }
  .current-board-copy h2 { font-size: clamp(20px, 1.5vw, 26px); }
  .ratings-grid > .stone-panel { grid-template-columns: minmax(110px, .65fr) minmax(130px, .75fr) minmax(0, 1.6fr); }
  .ratings-grid .stone-scene { min-height: 0; }
  .ratings-grid .stone-info { padding: 12px 7px; }
  .ratings-grid .stone-title h2 { font-size: clamp(19px, 1.4vw, 25px); }
  .stone-history { padding: 12px 10px 8px 3px; }
  footer { flex: 0 0 20px; height: 20px; margin-top: 3px; padding: 0 5px; font-size: 8px; }
}
@media (min-width: 801px) and (max-height: 900px) {
  .topbar.wrap { flex-basis: 82px; height: 82px; min-height: 82px; }
  .brand img { width: 62px; height: 62px; }
  .brand span { font-size: 30px; }
  main#shop.wrap { height: calc(100dvh - 106px); }
  .case-picture { flex-basis: clamp(100px, 13vh, 130px); height: clamp(100px, 13vh, 130px); }
}
@media (max-width: 800px) {
  html, body { height: auto; min-height: 100%; overflow-x: hidden; overflow-y: auto; }
  body { display: block; min-height: 100dvh; }
  .topbar.wrap { height: auto; min-height: 88px; }
  main#shop.wrap { display: block; width: calc(100% - 22px); height: auto; min-height: 0; overflow: visible; padding-bottom: 16px; }
  .section-nav { position: static; width: 100%; justify-content: flex-start; overflow-x: auto; margin: 8px 0 14px; }
  .section-tab { flex: 1 0 auto; min-width: 112px; }
  .site-view:not([hidden]) { display: block; overflow: visible; }
  #view-shop .live-strip { margin-bottom: 10px; }
  #view-shop .shop-panel { display: block; max-height: none; overflow: visible; }
  .case-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: auto; overflow: visible; }
  .case-card { min-height: 260px; height: auto; }
  .case-picture { flex-basis: auto; height: clamp(140px, 27vw, 205px); }
  .shop-promo-panel { display: none; }
  .ratings-grid { grid-template-columns: 1fr; }
  .ratings-grid > .current-board, .ratings-grid > .stone-panel { height: auto; }
  .ratings-grid > .stone-panel { min-height: 340px; }
  footer { margin-top: 14px; }
}
@media (max-width: 560px) {
  .inventory-shortcut { min-height: 38px; padding: 6px 8px; gap: 5px; font-size: 9px; }
  .inventory-shortcut svg { width: 18px; height: 18px; }
  .promo-mascot { width: 30px; height: 34px; }
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .case-card { min-height: 248px; padding: 0 9px 10px; }
  .case-picture { width: calc(100% + 18px); margin-left: -9px; height: 138px; }
  .ratings-grid > .stone-panel { grid-template-columns: 1fr 1fr; }
  .inventory-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .inventory-dialog-shell { max-height: calc(100dvh - 16px); }
  .inventory-dialog-head { padding: 16px 15px 12px; }
  .inventory-dialog #reward-inventory { padding: 8px 10px 12px; }
  .inventory-dialog .reward-instance { grid-template-columns: 48px minmax(0, 1fr); gap: 9px; padding: 10px; }
  .reward-thumbnail { width: 48px; height: 48px; }
  .inventory-dialog .reward-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 370px) {
  .case-grid { grid-template-columns: 1fr; }
}


/* Desktop header sizing and balanced product cards, verified at 1920x1080. */
@media (min-width: 1101px) {
  .topbar.wrap { justify-content: flex-start; gap: 10px; }
  .topbar .brand { flex: 0 0 290px; min-width: 0; }
  .topbar .cart-shortcut { flex: 0 0 188px; width: 188px; max-width: 188px; margin: 0; }
  .topbar .inventory-shortcut { flex: 0 0 142px; width: 142px; max-width: 142px; min-width: 142px; margin: 0; }
  .topbar .account { flex: 0 1 auto; min-width: 0; margin-left: auto; flex-wrap: nowrap; gap: 8px; }
  .topbar .steam { flex: 0 0 122px; min-width: 122px; }
  .topbar .promo-chip { flex: 0 1 302px; min-width: 270px; max-width: 302px; }
  .topbar .balance { flex: 0 0 163px; min-width: 163px; }
  .case-grid { flex: 0 1 auto; align-content: center; grid-template-rows: repeat(2, clamp(270px, 28vh, 320px)); grid-auto-rows: clamp(270px, 28vh, 320px); }
}
@media (min-width: 1101px) and (max-width: 1400px) {
  .topbar .brand { flex-basis: 230px; }
  .topbar .inventory-shortcut { flex-basis: 126px; width: 126px; min-width: 126px; }
  .topbar .promo-chip { flex-basis: 245px; min-width: 225px; }
  .topbar .cart-shortcut { flex-basis: 160px; width: 160px; max-width: 160px; }
  .topbar .account { gap: 6px; }
}

@media (min-width: 1101px) {
  .topbar.wrap { display: flex; }
  .topbar .account { display: flex; align-items: center; justify-content: flex-end; width: auto; }
}


/* V8 one-screen dashboard: shop, upgrader and both leaderboards stay visible together. */
@media (min-width: 1400px) {
  html, body { width: 100%; height: 100%; min-height: 0; overflow: hidden; }
  body { height: 100dvh; display: flex; flex-direction: column; }
  .topbar.wrap { flex: 0 0 78px; height: 78px; min-height: 78px; width: calc(100% - 64px); max-width: 2200px; margin: 0 auto; }
  main#shop.game-dashboard {
    flex: 1 1 auto; width: calc(100% - 64px); max-width: 2200px; height: auto; min-height: 0;
    margin: 0 auto; padding: 0 0 3px; display: grid;
    grid-template-columns: minmax(0, 1.62fr) minmax(560px, 1fr);
    grid-template-rows: minmax(0, 1fr) 18px; gap: 9px; overflow: hidden;
  }
  #view-shop, .side-rail, #view-upgrader, #view-ratings { min-width: 0; min-height: 0; }
  #view-shop { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
  .side-rail { grid-column: 2; grid-row: 1; min-height: 0; display: grid; grid-template-rows: minmax(0, 1.08fr) minmax(0, .92fr); gap: 9px; }
  #view-upgrader, #view-ratings { display: flex; overflow: hidden; }
  #view-upgrader > .view-content-narrow { width: 100%; max-height: none; height: 100%; margin: 0; overflow: hidden; }
  #upgrader { height: 100%; min-height: 0; padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
  #upgrader .panel-heading { flex: 0 0 auto; margin: 0; }
  #upgrader .panel-heading h2 { font-size: clamp(18px, 1.2vw, 23px); }
  #upgradeModes { flex: 0 0 auto; margin: 0; }
  #upgradeModes button { padding: 8px 13px; }
  #upgradeDescription { flex: 0 0 auto; margin: 0; line-height: 1.35; }
  #upgrader .upgrade-stage { flex: 0 0 auto; grid-template-columns: minmax(0, 1fr) 66px minmax(0, 1fr); gap: 7px; }
  #upgrader .item-slot { height: clamp(96px, 12vh, 126px); padding: 7px; }
  #upgrader .item-icon { font-size: 32px; line-height: 1.1; }
  #upgrader .item-slot strong { font-size: 11px; }
  #upgrader .item-slot b { font-size: 10px; }
  #upgrader .chance { width: 58px; height: 58px; }
  #multipliers { flex: 0 0 auto; margin: 0; }
  #upgradeAction { flex: 0 0 auto; min-height: 38px; }
  #upgrader > .panel-hint { margin: auto 0 0; font-size: 9px; line-height: 1.35; }
  #view-ratings .ratings-grid { width: 100%; height: 100%; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px; }
  #current-leaderboard { min-width: 0; min-height: 0; margin: 0; padding: 11px; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
  #current-leaderboard .current-board-copy { flex: 0 0 auto; }
  #current-leaderboard .current-board-eyebrow { font-size: 8px; }
  #current-leaderboard .current-board-copy h2 { margin: 3px 0; font-size: clamp(14px, 1vw, 18px); }
  #current-leaderboard .current-board-copy p { font-size: 9px; line-height: 1.3; }
  #current-leaderboard .current-board-content { min-width: 0; min-height: 0; flex: 1 1 auto; display: flex; flex-direction: column; overflow: hidden; }
  #current-leaderboard .leader-tabs { flex: 0 0 auto; margin: 0 0 5px; gap: 4px; }
  #current-leaderboard .leader-tabs button, #stone .leader-tabs button { padding: 6px 7px; font-size: 9px; }
  #current-leaderboard .leader-rows { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; margin: 0; }
  #current-leaderboard .leader-row, #stone .leader-row { grid-template-columns: 21px 23px minmax(0,1fr) auto; gap: 5px; padding: 4px 0; font-size: 9px; }
  #current-leaderboard .leader-row .rank, #stone .leader-row .rank { width: 19px; height: 19px; }
  #current-leaderboard .leader-note, #stone .leader-note { flex: 0 0 auto; margin-top: 4px; font-size: 7px; line-height: 1.2; }
  #stone {
    min-width: 0; min-height: 0; margin: 0; overflow: hidden; padding: 8px;
    display: grid; grid-template-columns: 54px minmax(0,1fr); grid-template-rows: 73px minmax(0,1fr); gap: 3px 7px;
  }
  #stone .stone-art { grid-column: 1; grid-row: 1; min-width: 0; min-height: 0; border-radius: 8px; }
  #stone .stone-scene { min-height: 0; height: 73px; }
  #stone .stone-scene img { object-fit: contain; object-position: center; padding: 3px; }
  #stone .stone-scene .stone-slogan { display: none; }
  #stone .stone-art::after { background: none; }
  #stone .stone-info { grid-column: 2; grid-row: 1; min-width: 0; padding: 3px 0; justify-content: center; }
  #stone .stone-title { gap: 5px; }
  #stone .stone-title h2 { font-size: clamp(12px, .9vw, 16px); line-height: 1.05; }
  #stone .stone-title span, #stone .stone-permanent span { font-size: 12px; }
  #stone .stone-description { margin: 3px 0; font-size: 8px; line-height: 1.2; }
  #stone .stone-permanent { margin: 0; font-size: 7px; line-height: 1.15; }
  #stone .stone-history { grid-column: 1 / -1; grid-row: 2; min-height: 0; display: flex; flex-direction: column; overflow: hidden; padding: 4px 0 0; }
  #stone .leader-tabs { flex: 0 0 auto; margin: 0 0 4px; gap: 4px; }
  #stone .leader-rows { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0; }
  .live-strip { flex: 0 0 110px; min-height: 110px; margin: 0; grid-template-columns: 190px minmax(0,1fr); border-radius: 10px; }
  .live-label { padding: 6px 12px; }
  .live-label strong { font-size: 11px; }
  .live-label span { margin-top: 1px; font-size: 8px; }
  .live-label small { font-size: 7px; }
  .live-window { min-height: 0; padding: 5px 12px; font-size: 9px; }
  .shop-panel { flex: 1 1 auto; min-height: 0; margin: 0; padding: 9px 11px 7px; display: flex; flex-direction: column; overflow: hidden; }
  .shop-panel .filters { flex: 0 0 auto; margin: 0 0 7px; gap: 5px; }
  .shop-panel .filter { padding: 6px 12px; font-size: 9px; }
  .case-grid { flex: 1 1 auto; min-height: 0; grid-template-columns: repeat(5,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(250px,max-content)); grid-auto-rows: minmax(250px,max-content); align-content: start; gap: 12px; overflow-y: auto; padding: 1px 3px 2px 0; }
  .case-card { box-sizing: border-box; height: auto; min-height: 250px; overflow: hidden; padding: 0 9px 10px; border-radius: 9px; }
  .case-picture { flex: 0 0 clamp(112px,19vh,248px); height: clamp(112px,19vh,248px); width: calc(100% + 16px); margin-left: -8px; }
  .case-picture img { padding: 3px; object-fit: contain; }
  .case-card h3 { min-height: 28px; margin: 4px 0 2px; font-size: clamp(10px,.72vw,14px); line-height: 1.18; }
  .case-price { font-size: clamp(16px,1.15vw,23px); }
  .offer-meta, .offer-status { margin-top: 2px; font-size: clamp(7px,.5vw,10px); }
  .shop-panel > .panel-hint { flex: 0 0 auto; margin: 4px 0 0; font-size: 7px; }
  .case-card.rank-vip { --glow: #7bf5a0 !important; border-color: #477853; }
  .case-card.rank-epic { --glow: #c66bff !important; border-color: #704296; }
  .case-card.rank-legend { --glow: #e5c46d !important; border-color: #866c34; }
  .case-card.rank-titan { --glow: #ff5f62 !important; border-color: #843a3b; }
  .case-card.rank-vip:hover { border-color: #7bf5a0; box-shadow: 0 0 20px #7bf5a033; }
  .case-card.rank-epic:hover { border-color: #c66bff; box-shadow: 0 0 20px #c66bff33; }
  .case-card.rank-legend:hover { border-color: #e5c46d; box-shadow: 0 0 20px #e5c46d33; }
  .case-card.rank-titan:hover { border-color: #ff5f62; box-shadow: 0 0 20px #ff5f6233; }
  footer { grid-column: 1 / -1; grid-row: 2; min-height: 0; padding: 0 2px; align-items: center; font-size: 8px; }
}

@media (min-width: 801px) and (max-width: 1399px) {
  html, body { height: auto; min-height: 100%; overflow-x: hidden; overflow-y: auto; }
  body { display: block; }
  main#shop.game-dashboard { display: block; width: min(100% - 36px, 1180px); height: auto; min-height: 0; overflow: visible; }
  #view-shop, #view-upgrader, #view-ratings { display: flex; flex-direction: column; margin-bottom: 14px; }
  .side-rail { display: grid; grid-template-columns: 1fr; gap: 14px; }
  #upgrader { min-height: 350px; }
  #view-ratings .ratings-grid { grid-template-columns: 1fr 1fr; }
  footer { padding: 15px 2px 20px; }
}

@media (max-width: 800px) {
  main#shop.game-dashboard { display: block; height: auto; min-height: 0; overflow: visible; }
  #view-shop, #view-upgrader, #view-ratings { display: flex; flex-direction: column; margin-bottom: 12px; }
  .side-rail { display: flex; flex-direction: column; gap: 12px; }
  #view-ratings .ratings-grid { grid-template-columns: 1fr; }
  #upgrader { min-height: 350px; }
}

@media (min-width: 1400px) {
  .topbar .balance { flex: 0 0 175px; min-width: 175px; }
  .topbar .balance small { white-space: nowrap; font-size: 8px; }
}


/* Targeted V8 desktop refinements: aligned header and two-column leaderboard layout. */
@media (min-width: 1400px) {
  .topbar.wrap { align-items: center; gap: 10px; }
  .topbar .account { align-items: center; gap: 8px; }
  .topbar .steam,
  .topbar .promo-chip,
  .topbar .balance,
  .topbar .cart-shortcut,
  .topbar .inventory-shortcut {
    height: 50px; min-height: 50px; max-height: 50px; align-self: center;
    box-sizing: border-box; margin-top: 0; margin-bottom: 0;
  }
  .topbar .steam { justify-content: center; padding: 5px 10px; }
  .topbar .promo-chip {
    position: relative; display: flex; align-items: center; justify-content: center;
    gap: 9px; padding: 5px 12px; border-color: #648b35;
    background: linear-gradient(100deg, rgba(30,55,26,.98), rgba(11,25,15,.98));
    box-shadow: inset 0 0 18px rgba(123,245,160,.12), 0 0 13px rgba(123,245,160,.12);
    overflow: hidden;
  }
  .topbar .promo-chip::before {
    content: ""; position: absolute; inset: 5px auto 5px 4px; width: 3px;
    border-radius: 3px; background: #7bf5a0; box-shadow: 0 0 10px #7bf5a0;
  }
  .topbar .promo-chip > span { min-width: 0; display: flex; flex-direction: column; justify-content: center; line-height: 1.1; }
  .topbar .promo-chip strong { color: #7bf5a0; font-size: 14px; font-weight: 1000; letter-spacing: .035em; white-space: nowrap; text-shadow: 0 0 12px rgba(123,245,160,.3); }
  .topbar .promo-chip small { margin-top: 3px; color: #e5c46d; font-size: 9px; line-height: 1.05; white-space: nowrap; }
  .topbar .promo-chip .promo-mascot { width: 35px; height: 39px; object-fit: contain; flex: 0 0 auto; }
  .topbar .balance { align-items: center; justify-content: space-between; padding-top: 4px; padding-bottom: 4px; }
  .topbar .balance > span { line-height: 1.1; white-space: nowrap; }
  .topbar .balance small { margin-top: 3px; font-size: 8px; }
  .topbar .balance b { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; font-size: 22px; }

  main#shop.game-dashboard {
    grid-template-columns: minmax(0, 1.62fr) minmax(560px, 1fr);
    grid-template-rows: minmax(0, 1.6fr) minmax(250px, 1fr) 18px;
    gap: 9px;
  }
  #view-shop { grid-column: 1; grid-row: 1; }
  #current-leaderboard { grid-column: 1; grid-row: 2; }
  .side-rail { grid-column: 2; grid-row: 1 / 3; grid-template-rows: minmax(0, 1.08fr) minmax(0, .92fr); }
  #view-ratings { grid-column: auto; grid-row: auto; width: 100%; min-width: 0; min-height: 0; }
  #view-ratings #stone { width: 100%; height: 100%; }
  footer { grid-column: 1 / -1; grid-row: 3; }

  #current-leaderboard {
    min-width: 0; min-height: 0; margin: 0; padding: 10px 13px;
    display: grid; grid-template-columns: minmax(180px, .36fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr); align-items: center; gap: 12px; overflow: hidden;
  }
  #current-leaderboard .current-board-copy { min-width: 0; }
  #current-leaderboard .current-board-eyebrow { font-size: 8px; }
  #current-leaderboard .current-board-copy h2 { margin: 4px 0; font-size: clamp(15px, 1.05vw, 19px); }
  #current-leaderboard .current-board-copy p { font-size: 9px; line-height: 1.3; }
  #current-leaderboard .current-board-content { min-width: 0; min-height: 0; height: 100%; display: grid; grid-template-rows: auto minmax(0,1fr) auto; gap: 5px; overflow: hidden; }
  #current-leaderboard .leader-tabs { display: flex; flex: 0 0 auto; margin: 0; gap: 5px; }
  #current-leaderboard .leader-tabs button { padding: 6px 10px; font-size: 9px; }
  #current-leaderboard .leader-rows {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(132px, 1fr);
    align-items: stretch; gap: 7px; min-width: 0; min-height: 0; max-height: none;
    margin: 0; padding: 1px 1px 4px; overflow-x: auto; overflow-y: hidden;
    overscroll-behavior-x: contain;
  }
  #current-leaderboard .leader-row {
    min-width: 0; min-height: 55px; align-self: center;
    display: grid; grid-template-columns: 21px 23px minmax(0,1fr);
    grid-template-rows: minmax(0,1fr) auto; align-items: center; gap: 3px 5px;
    padding: 7px; border: 1px solid rgba(123,245,160,.2); border-radius: 9px;
    background: rgba(10,24,14,.72); font-size: 9px;
  }
  #current-leaderboard .leader-row .rank { grid-row: 1 / 3; width: 20px; height: 20px; }
  #current-leaderboard .leader-row .avatar { grid-column: 2; grid-row: 1 / 3; width: 22px; height: 22px; }
  #current-leaderboard .leader-row .player { grid-column: 3; grid-row: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #current-leaderboard .leader-row .score { grid-column: 3; grid-row: 2; justify-self: start; font-size: 10px; }
  #current-leaderboard .leader-note { margin: 0; font-size: 7px; line-height: 1.1; }

  .shop-panel { padding: 8px 10px 6px; }
  .shop-panel .filters { margin-bottom: 5px; gap: 5px; }
  .shop-panel .filter { padding: 5px 10px; font-size: 9px; }
  .case-grid {
    flex: 1 1 0; align-content: stretch; grid-template-columns: repeat(5, minmax(0,1fr));
    grid-template-rows: repeat(2, minmax(250px,max-content)); grid-auto-rows: minmax(250px,max-content); align-content:start;
    gap: 10px; overflow-x: hidden; overflow-y: auto; padding: 1px 3px 2px 0;
  }
  .case-card { box-sizing:border-box; justify-content:flex-start; min-height:250px; height:auto; overflow:hidden; padding:0 9px 10px; }
  .case-picture { flex: 0 0 clamp(116px, 14vh, 150px); height: clamp(116px, 14vh, 150px); width: calc(100% + 14px); margin-left: -7px; }
  .case-picture img { padding: 3px; object-fit: contain; }
  .case-card h3 { flex: 0 0 auto; min-height: 25px; margin: 3px 0 1px; font-size: clamp(10px,.7vw,13px); line-height: 1.14; }
  .case-card .case-foot { flex: 0 0 auto; margin-top: 2px; }
  .case-price { font-size: clamp(16px,1.05vw,20px); line-height: 1.1; }
  .offer-meta, .offer-status { display: block; margin-top: 2px; font-size: clamp(7px,.47vw,9px); line-height: 1.1; }
  .shop-panel > .panel-hint { margin-top: 3px; font-size: 7px; line-height: 1.15; }
}

@media (min-width: 1400px) {
  /* Match the side-rail split to the dashboard's top/bottom row proportions. */
  .side-rail { grid-template-rows: minmax(0, 1.6fr) minmax(250px, 1fr); }
  #current-leaderboard { align-items: stretch; }
  #current-leaderboard .current-board-copy { align-self: center; }
  #current-leaderboard .leader-rows { align-items: center; }
  #current-leaderboard .leader-row { height: 62px; }
  #stone {
    grid-template-columns: 72px minmax(170px, .82fr) minmax(0, 1.45fr);
    grid-template-rows: minmax(0, 1fr); gap: 6px 10px; padding: 10px;
  }
  #stone .stone-art { grid-column: 1; grid-row: 1; height: 100%; }
  #stone .stone-scene { height: 100%; min-height: 0; }
  #stone .stone-info { grid-column: 2; grid-row: 1; min-width: 0; }
  #stone .stone-history { grid-column: 3; grid-row: 1; min-width: 0; padding: 4px 0 0 8px; border-left: 1px solid rgba(123,245,160,.16); }
  .case-picture { flex-basis: clamp(116px, 12.5vh, 136px); height: clamp(116px, 12.5vh, 136px); }
  .case-card h3 { min-height: 23px; }
}

@media (min-width: 1400px) {
  #stone .stone-art { align-self: center; height: 148px; }
  #stone .stone-scene { height: 148px; }
  #stone .stone-info { align-self: stretch; justify-content: center; }
  #historyRows:has(.leader-empty) { display: flex; align-items: center; justify-content: center; }
  #historyRows .leader-empty { text-align: center; }
}

@media (min-width: 1400px) and (min-height: 1200px) {
  .case-grid { grid-template-rows: repeat(2, clamp(250px, 20vh, 290px)); grid-auto-rows: clamp(250px, 20vh, 290px); }
  .case-picture { flex-basis: clamp(150px, 14vh, 185px); height: clamp(150px, 14vh, 185px); }
}


/* V8 visual pass: stronger type scale, content-sized bottom boards, balanced dashboard. */
@media (min-width: 1400px) {
  html, body { overflow: hidden; }
  body { font-family: Arial, "Segoe UI", sans-serif; }
  main#shop.game-dashboard {
    grid-template-columns: minmax(0, 1.62fr) minmax(560px, 1fr);
    grid-template-rows: minmax(0, 1fr) 230px 20px;
    gap: 10px;
  }
  #view-shop { grid-column: 1; grid-row: 1; }
  .side-rail { display: contents; }
  #view-upgrader { grid-column: 2; grid-row: 1; align-self: stretch; }
  #view-ratings { grid-column: 2; grid-row: 2; align-self: stretch; }
  #current-leaderboard { grid-column: 1; grid-row: 2; }
  footer { grid-column: 1 / -1; grid-row: 3; height: 20px; min-height: 20px; font-size: 10px; }

  .topbar .steam, .topbar .promo-chip, .topbar .balance,
  .topbar .cart-shortcut, .topbar .inventory-shortcut {
    height: 52px; min-height: 52px; max-height: 52px;
  }
  .topbar .steam { font-size: 15px; }
  .topbar .steam small { font-size: 11px; }
  .topbar .promo-chip { gap: 11px; padding: 6px 14px; }
  .topbar .promo-chip strong { font-size: 16px; letter-spacing: .025em; }
  .topbar .promo-chip small { font-size: 11px; }
  .topbar .promo-chip .promo-mascot { width: 38px; height: 42px; }
  .topbar .balance { font-size: 18px; }
  .topbar .balance small { font-size: 9px; }
  .topbar .cart-shortcut, .topbar .inventory-shortcut { font-size: 12px; }

  #view-shop { gap: 9px; }
  .live-strip { flex-basis: 110px; min-height: 110px; grid-template-columns: 215px minmax(0,1fr); }
  .live-label { padding: 8px 13px; }
  .live-label strong { font-size: 13px; }
  .live-label span { margin-top: 2px; font-size: 10px; }
  .live-label small { font-size: 9px; }
  .live-window { padding: 8px 14px; font-size: 12px; }
  .shop-panel { padding: 11px 13px 9px; }
  .shop-panel .filters { gap: 7px; margin-bottom: 9px; }
  .shop-panel .filter { padding: 8px 13px; font-size: 12px; }
  .case-grid {
    flex:1 1 0; min-height:0; grid-template-columns:repeat(5,minmax(0,1fr));
    grid-template-rows:repeat(2,minmax(250px,max-content)); grid-auto-rows:minmax(250px,max-content);
    align-content:start; gap:12px; overflow-x:hidden; overflow-y:auto; padding:5px 5px 9px;
  }
  .case-card { box-sizing:border-box; min-width:0; min-height:250px; height:auto; overflow:hidden; padding:0 9px 10px; justify-content:flex-start; }
  .case-picture { flex: 0 0 clamp(138px,14vh,164px); height: clamp(138px,14vh,164px); width: calc(100% + 18px); margin-left: -9px; }
  .case-picture img { padding: 5px; object-fit: contain; }
  .case-card h3 { min-height: 34px; margin: 6px 0 3px; font-size: clamp(13px,.78vw,16px); line-height: 1.2; }
  .case-card .case-foot { flex: 0 0 auto; margin-top: 2px; }
  .case-price { font-size: 22px; line-height: 1.15; }
  .offer-meta, .offer-status { display: block; margin-top: 4px; font-size: 11px; line-height: 1.2; }
  .case-view { width: 34px; height: 34px; font-size: 15px; }
  .shop-panel > .panel-hint { margin-top: 7px; font-size: 10px; line-height: 1.2; }

  #upgrader {
    height: 100%; padding: 16px 18px 14px; gap: 10px;
    justify-content: flex-start; border-radius: 16px;
  }
  #upgrader .panel-heading { margin: 0; }
  #upgrader .panel-heading h2 { font-size: clamp(22px,1.35vw,27px); }
  #upgrader .help { width: 32px; height: 32px; font-size: 16px; }
  #upgradeModes { margin: 0; gap: 8px; }
  #upgradeModes button { min-height: 40px; padding: 9px 15px; font-size: 13px; }
  #upgradeDescription { margin: 0; font-size: 12px; line-height: 1.4; }
  #upgrader .upgrade-stage { grid-template-columns: minmax(0,1fr) 72px minmax(0,1fr); gap: 10px; }
  #upgrader .item-slot { height: clamp(118px,14vh,146px); padding: 10px; gap: 6px; }
  #upgrader .item-icon { font-size: 40px; }
  #upgrader .item-slot strong { font-size: 13px; line-height: 1.25; }
  #upgrader .item-slot b { font-size: 12px; }
  #upgrader .chance { width: 66px; height: 66px; }
  #upgrader .chance strong { font-size: 22px; }
  #multipliers { margin: 0; gap: 7px; }
  #multipliers button { min-height: 40px; padding: 8px 11px; font-size: 12px; }
  #upgradeAction { min-height: 46px; font-size: 13px; }
  #upgrader > .panel-hint { margin: auto 0 0; font-size: 11px; line-height: 1.35; }

  #current-leaderboard {
    min-height: 0; height: 100%; padding: 15px 17px;
    grid-template-columns: minmax(225px,.36fr) minmax(0,1fr); gap: 16px; align-items: center;
    border-radius: 16px;
  }
  #current-leaderboard .current-board-eyebrow { font-size: 10px; letter-spacing: .08em; }
  #current-leaderboard .current-board-copy h2 { margin: 7px 0; font-size: clamp(20px,1.3vw,25px); line-height: 1.15; }
  #current-leaderboard .current-board-copy p { font-size: 12px; line-height: 1.4; }
  #current-leaderboard .current-board-content { height: 100%; gap: 9px; }
  #current-leaderboard .leader-tabs { gap: 7px; }
  #current-leaderboard .leader-tabs button { min-height: 36px; padding: 8px 13px; font-size: 12px; }
  #current-leaderboard .leader-rows {
    grid-auto-columns: minmax(142px,1fr); gap: 8px; padding: 2px 2px 5px;
  }
  #current-leaderboard .leader-row {
    height: 72px; min-height: 72px; padding: 9px; grid-template-columns: 26px 29px minmax(0,1fr);
    gap: 4px 7px; border-radius: 11px; font-size: 12px;
  }
  #current-leaderboard .leader-row .rank { width: 25px; height: 25px; font-size: 12px; }
  #current-leaderboard .leader-row .avatar { width: 28px; height: 28px; font-size: 13px; }
  #current-leaderboard .leader-row .player { font-size: 12px; }
  #current-leaderboard .leader-row .score { font-size: 13px; }
  #current-leaderboard .leader-note { font-size: 10px; }

  #stone {
    height: 100%; min-height: 0; padding: 12px 14px;
    grid-template-columns: minmax(92px,.52fr) minmax(178px,.92fr) minmax(0,1.6fr);
    grid-template-rows: minmax(0,1fr); gap: 8px 12px; border-radius: 16px;
  }
  #stone .stone-art { grid-column: 1; grid-row: 1; align-self: stretch; height: auto; border-radius: 11px; }
  #stone .stone-scene { height: 100%; min-height: 0; }
  #stone .stone-scene img { width: 100%; height: 100%; max-height: 100%; left: 0; bottom: 0; object-fit: contain; object-position: center bottom; padding: 5px; }
  #stone .stone-info { grid-column: 2; grid-row: 1; justify-content: center; padding: 5px 0; }
  #stone .stone-title { gap: 8px; }
  #stone .stone-title h2 { font-size: clamp(17px,1.08vw,21px); line-height: 1.08; }
  #stone .stone-title span, #stone .stone-permanent span { font-size: 17px; }
  #stone .stone-description { margin: 9px 0; font-size: 12px; line-height: 1.35; }
  #stone .stone-permanent { margin: 0; font-size: 10px; line-height: 1.3; }
  #stone .stone-history { grid-column: 3; grid-row: 1; min-width: 0; padding: 2px 0 2px 12px; border-left: 1px solid rgba(123,245,160,.2); }
  #stone .leader-tabs { gap: 7px; margin: 0 0 8px; }
  #stone .leader-tabs button { min-height: 36px; padding: 8px 13px; font-size: 12px; }
  #stone .leader-rows { gap: 6px; overflow-y: auto; }
  #stone .leader-row { grid-template-columns: 26px 29px minmax(0,1fr) auto; gap: 7px; padding: 6px 0; font-size: 12px; }
  #stone .leader-row .rank { width: 25px; height: 25px; font-size: 12px; }
  #stone .leader-note { margin-top: 6px; font-size: 10px; line-height: 1.25; }
  #historyRows:has(.leader-empty) { display: flex; align-items: center; justify-content: center; }
  #historyRows .leader-empty { max-width: 360px; text-align: center; font-size: 13px; line-height: 1.45; }
}

@media (min-width: 1400px) {
  main#shop.game-dashboard {
    grid-template-rows: max-content 230px 20px;
    align-content: space-between;
  }
  .case-grid {
    flex: 1 1 0; min-height:0;
    grid-template-rows: repeat(2, minmax(250px, max-content));
    grid-auto-rows: minmax(250px, max-content);
    align-content: start;
    overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain;
  }
  .shop-panel { flex: 1 1 auto; min-height:0; overflow:hidden; }
  #view-shop { flex: 1 1 auto; min-height:0; }
  #view-upgrader { align-self: start; align-items: flex-start; }
  #view-upgrader > .view-content-narrow { height: auto; max-height: none; }
  #upgrader { height: auto; min-height: 0; flex: 0 0 auto; }
  #upgrader > .panel-hint { margin: 2px 0 0; }
}

@media (min-width: 1400px) {
  main#shop.game-dashboard { grid-template-rows: max-content 210px 20px; }
  .case-grid { grid-template-rows:repeat(2,minmax(250px,max-content)); grid-auto-rows:minmax(250px,max-content); overflow-y:auto; }
  .case-picture { flex-basis:clamp(138px,14vh,164px); height:clamp(138px,14vh,164px); }
}


/* Owner follow-up: profile width, compact lower-row placement, tidy archive, aligned strip. */
@media (min-width: 1400px) {
  .topbar .steam {
    flex: 0 1 clamp(184px, 13vw, 260px);
    width: clamp(184px, 13vw, 260px); min-width: 184px; max-width: 260px;
    overflow: hidden; gap: 10px;
  }
  .topbar .steammark { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; }
  .topbar .steam > span:last-child { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
  .topbar .steam > span:last-child > span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .steam > span:last-child small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  main#shop.game-dashboard {
    grid-template-rows: max-content 210px minmax(0,1fr) 20px;
    align-content: start;
    row-gap: 10px;
  }
  #view-shop { grid-row: 1; }
  #current-leaderboard { grid-column: 1; grid-row: 2; }
  #view-ratings { grid-column: 2; grid-row: 2; }
  footer { grid-row: 4; }

  .case-card h3 { width: 100%; text-align: center; white-space: normal; overflow-wrap: anywhere; }
  .case-card .case-foot { justify-content: space-between; }
  .offer-status { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }

  .live-strip { display: grid; align-items: stretch; }
  .live-label { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
  .live-label span { margin-top: 4px; }
  .live-label small { margin-top: 2px; }
  .live-window { display:flex; align-items:center; justify-content:flex-start; text-align:left; overflow:hidden; }
  .live-track { justify-content:flex-start; }
  .live-empty { margin:0 auto; text-align:center; }

  #stone { min-width: 0; }
  #stone .stone-info { min-width: 0; overflow: hidden; }
  #stone .stone-title { align-items: center; min-width: 0; }
  #stone .stone-title > span,
  #stone .stone-permanent > span {
    flex: 0 0 24px; width: 24px; height: 24px; display: grid; place-items: center;
    border: 1px solid rgba(123,245,160,.38); border-radius: 50%;
    font-size: 14px; line-height: 1; color: #7bf5a0;
  }
  #stone .stone-title h2 { min-width: 0; overflow-wrap: anywhere; }
  #stone .stone-permanent { display: flex; align-items: flex-start; gap: 8px; white-space: normal; overflow-wrap: anywhere; }
}

/* Focused owner refinements: upgrader fill and consistent readable rating typography. */
@media (min-width: 1400px) {
  /* Fill the existing shop row; keep all upgrader controls at their natural size. */
  #view-upgrader {
    align-self: stretch;
    align-items: stretch;
    min-height: 0;
  }
  #view-upgrader > .view-content-narrow {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    display: flex;
    align-items: stretch;
    overflow: hidden;
  }
  #upgrader {
    width: 100%;
    height: 100%;
    min-height: 0;
    flex: 1 1 auto;
    align-self: stretch;
    justify-content: flex-start;
  }
  #upgrader > .panel-hint { margin: 2px 0 0; }

  /* Shared system font stack avoids condensed display lettering and supports Cyrillic. */
  #current-leaderboard,
  #stone {
    font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
    font-stretch: normal;
    letter-spacing: normal;
  }
  #current-leaderboard .current-board-eyebrow {
    font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-shadow: none;
  }
  #current-leaderboard .current-board-copy h2,
  #stone .stone-title h2 {
    font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
    font-stretch: normal;
    font-size: clamp(21px, 1.35vw, 26px);
    font-weight: 750;
    letter-spacing: .025em;
    line-height: 1.16;
    text-shadow: none;
    transform: none;
  }
  #current-leaderboard .current-board-copy p,
  #stone .stone-description {
    font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.42;
    text-shadow: none;
  }
  #current-leaderboard .leader-tabs button,
  #stone .leader-tabs button {
    font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0;
    text-shadow: none;
  }
  #current-leaderboard .leader-row,
  #stone .leader-row {
    font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
    letter-spacing: 0;
    text-shadow: none;
  }
  #current-leaderboard .leader-row .player,
  #stone .leader-row .player { font-size: 14px; font-weight: 650; }
  #current-leaderboard .leader-row .score,
  #stone .leader-row .score { font-size: 14px; font-weight: 700; }
  #current-leaderboard .leader-note,
  #stone .leader-note { font-size: 11px; line-height: 1.3; text-shadow: none; }

  /* Remove literal question-mark ornaments without altering the archive content or artwork. */
  #stone .stone-title > span,
  #stone .stone-permanent > span { display: none; }
  #stone .stone-title { gap: 0; }
  #stone .stone-title h2 { overflow-wrap: normal; }
  #stone .stone-permanent {
    display: block;
    font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .025em;
    line-height: 1.35;
    text-shadow: none;
  }
}

/* Current rating title: clear three-line hierarchy without condensed lettering. */
#current-leaderboard .current-board-title { display:flex; flex-direction:column; gap:0; margin:0; font-family:"Segoe UI Variable","Segoe UI",Arial,sans-serif; letter-spacing:.015em; line-height:.99; text-shadow:none; }
#current-leaderboard .current-board-title span { display:block; font-size:clamp(19px,1.35vw,25px); font-weight:750; }
#current-leaderboard .current-board-title .current-board-title-lead { color:#7bf5a0; font-size:clamp(32px,2.25vw,42px); font-weight:850; }
/* The live success arc and stationary center are defined with the dial component below. */
/* Compact inventory selection rows retain scrolling inside the existing dialog only. */
.reward-entry { display:flex; align-items:center; gap:12px; min-width:0; }
.reward-entry > img { width:56px; height:56px; object-fit:contain; flex:none; }
.reward-entry > div { display:grid; gap:3px; min-width:0; }
.reward-entry > div strong { overflow:hidden; text-overflow:ellipsis; }
.reward-entry > button, .reward-actions { margin-left:auto; flex:none; }
.reward-actions { display:flex; align-items:center; gap:8px; }@media (min-width:801px) {
  /* The existing fixed dashboard presents its three work areas together; no tab shell is required. */
  #view-shop, #view-upgrader, #view-ratings { display:flex; }
  .site-view[hidden] { display:none !important; }
}@media (min-width:801px) {
  main#shop .site-view:not([hidden]) { display:flex !important; visibility:visible !important; opacity:1 !important; }
}
/* Emergency recovery: show the fixed dashboard immediately, including without animation support. */
main#shop .reveal { opacity: 1; transform: none; }
.steammark .steam-avatar { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Focused interface refinements, 2026-10-12. No transaction controls enabled. */
.coin-icon { width: 17px; height: 17px; object-fit: contain; vertical-align: -4px; margin-right: 5px; }
.case-card { position: relative; z-index: 1; transform-origin: center; transition: transform .28s cubic-bezier(.2,.7,.2,1), box-shadow .28s, border-color .28s; }
.case-card:hover, .case-card:focus-visible { z-index: 20; transform: translateY(-3px) scale(1.01); border-color: #7bf5a0; box-shadow: 0 18px 30px #0009, 0 0 22px #7bf5a033; }
.case-grid { isolation: isolate; }
.resource-dialog { width: min(480px, calc(100vw - 32px)); padding: 28px; background: #141d18; border: 1px solid #7bf5a04d; border-radius: 20px; color: #f0f2ef; }
.resource-dialog::backdrop { background: #030906bb; backdrop-filter: blur(5px); }
.resource-dialog h2 { margin: 0 30px 10px 0; font: 700 23px/1.2 "Segoe UI", sans-serif; }
.resource-dialog p { color: #a8b8ad; font-size: 14px; line-height: 1.5; }
.resource-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.resource-options button { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 12px; border: 1px solid #7bf5a044; border-radius: 14px; background: #1c2a20; color: #7bf5a0; cursor: pointer; }
.resource-options button:hover:not(:disabled) { background: #263a2b; border-color: #7bf5a0; }
.resource-options button:disabled { color: #a49b80; background: #1e211c; cursor: not-allowed; }
.resource-options img { width: 34px; height: 34px; }
.resource-options span { font-size: 30px; line-height: 34px; }
.resource-options small { font: 12px/1.4 "Segoe UI", sans-serif; color: #b0bdb3; }
.resource-note { margin-bottom: 0; }
#upgrader .upgrade-stage { grid-template-columns: minmax(0, 1fr) 180px minmax(0, 1fr); gap: 16px; align-items: center; margin: 12px 0; }
#upgrader .item-slot { min-width: 0; height: 154px; padding: 12px 8px; border-radius: 14px; }
#upgrader .slot-label { font: 700 10px/1.3 "Segoe UI", sans-serif; letter-spacing: .06em; color: #93ab9a; }
#upgrader .item-slot strong { overflow-wrap: anywhere; font-size: 13px; }
#upgrader .item-slot b { font-size: 12px; font-weight: 500; }
#upgrader .item-icon { font-size: 30px; }
.upgrade-dial { position:relative; width:min(100%,190px); aspect-ratio:1; display:grid; place-items:center; margin:4px auto 12px; overflow:visible; }
#upgrader #chanceRing { --upgrade-success-angle:0deg; --upgrade-success-start:180deg; --upgrade-success-end:180deg; box-sizing:border-box; position:relative; display:block; width:180px; height:180px; padding:0; border:1px solid #7bf5a066; border-radius:50%; background:conic-gradient(from 0deg,#33463a 0deg var(--upgrade-success-start),#7bf5a0 var(--upgrade-success-start) var(--upgrade-success-end),#33463a var(--upgrade-success-end) 360deg) !important; box-shadow:0 0 28px #7bf5a019,inset 0 0 16px #0008 !important; transform:none; }
#chanceRing::before, #chanceRing::after { content:none; animation:none; }

#upgrader #chanceRing > div { box-sizing:border-box; position:absolute; z-index:2; inset:9px; display:flex; flex-direction:column; align-items:center; justify-content:center; width:auto; height:auto; padding:0; border:1px solid #45614b; border-radius:50%; background:radial-gradient(circle,#1e3024,#0c1610); transform:none; }
#upgrader #chanceRing strong { font: 700 44px/1.1 "Segoe UI", sans-serif; color: #7bf5a0; }
.upgrade-pointer-orbit { position:absolute; z-index:6; inset:0; border-radius:50%; transform:rotate(0deg); transform-origin:50% 50%; pointer-events:none; }
#upgrader .upgrade-pointer { position:absolute; left:50%; top:-8px; width:0; height:0; transform:translateX(-50%); border:0; border-left:11px solid transparent; border-right:11px solid transparent; border-top:19px solid #e5c46d; filter:drop-shadow(0 2px 5px #000b) drop-shadow(0 0 7px #e5c46d99); pointer-events:none; }
#chanceRing.is-rolling-fallback + .upgrade-pointer-orbit { animation:upgrade-pointer-spin .86s linear infinite; }
@keyframes upgrade-pointer-spin { to { transform:rotate(360deg); } }
#upgrader .upgrade-zone-caption { display:flex; align-items:center; gap:6px; margin:-5px 0 8px; color:#a9cdb2; font:800 9px/1.2 "Segoe UI",sans-serif; letter-spacing:.12em; }
#upgrader .upgrade-zone-caption i { width:8px; height:8px; border-radius:50%; background:#7bf5a0; box-shadow:0 0 8px #7bf5a0aa; }
#upgrader .upgrade-chance-control label { width:100%; text-align:center; font-size:10px; }
#upgrader .upgrade-chance-control input[type="range"] { width:min(100%,190px); }
#chanceRing small { font: 600 12px/1.4 "Segoe UI", sans-serif; letter-spacing: .15em; color: #a8b8ad; }

/* Case detail view stays inside the existing shop workspace. */
#cases [hidden] { display: none !important; }
#cases.showing-case { min-height: 0; overflow: hidden; flex: 0 0 auto; }
.case-screen { width: 100%; min-height: 0; flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: 2px 8px 12px 2px; scrollbar-width: thin; scrollbar-color: #345440 #101b13; }
.case-back { padding: 8px 14px; border: 1px solid #7bf5a04d; border-radius: 9px; background: #18281d; color: #ccebd5; font: 600 13px "Segoe UI", sans-serif; cursor: pointer; }
.case-back:hover { border-color: #7bf5a0; background: #233c2a; }
.case-screen-heading { display: flex; align-items: center; gap: 20px; margin: 10px 0; }
.case-screen-heading > img { width: 125px; height: 106px; object-fit: contain; flex: none; }
.case-screen-heading h2 { font: 800 29px/1.1 "Segoe UI", sans-serif; letter-spacing: .015em; margin: 0 0 8px; color: #f0f2ef; }
#caseScreenPrice { color: #7bf5a0; font: 700 17px/1.4 "Segoe UI", sans-serif; }
#caseScreenNote { margin: 7px 0 0; color: #aab9af; font: 12px/1.4 "Segoe UI", sans-serif; max-width: 690px; }
.case-roulette { position: relative; width: 100%; height: 142px; overflow: hidden; border: 1px solid #7bf5a05c; border-radius: 15px; background: #0c1710; box-shadow: inset 0 0 25px #0008, 0 0 25px #7bf5a011; }
.case-roulette::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #0c1710 0%, transparent 14%, transparent 86%, #0c1710 100%); pointer-events: none; }
.case-roulette-track { display: flex; gap: 9px; padding: 10px; width: max-content; height: 100%; box-sizing: border-box; }
.case-pointer { position: absolute; z-index: 2; top: 0; left: 50%; bottom: 0; width: 2px; transform: translateX(-50%); background: linear-gradient(#e5c46d, #e5c46d44, #e5c46d); box-shadow: 0 0 12px #e5c46d77; pointer-events: none; }
.case-pointer::before { content: ""; position: absolute; top: 0; left: -6px; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 10px solid #e5c46d; }
.case-opening { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 12px 0; }
.case-opening button { min-width: 210px; height: 40px; }
.case-opening > span { color: #91a397; font: 12px/1.4 "Segoe UI", sans-serif; }
.case-opening { flex-direction: row; flex-wrap: wrap; gap: 12px; }
.case-opening button { min-width: min(245px,100%); height: 48px; padding: 0 22px; border-radius: 12px; font: 700 16px/1.2 "Segoe UI",sans-serif; cursor: pointer; transition: background .2s, box-shadow .2s, transform .2s; }
.case-open-coins { color: #102017; border: 1px solid #a0ffba; background: linear-gradient(135deg,#7bf5a0,#54d981); box-shadow: 0 6px 23px #7bf5a026; }
.case-open-rub { color: #c6f8d6; border: 2px solid #7bf5a0; background: linear-gradient(135deg,#1c3926,#102319); box-shadow: inset 0 0 20px #7bf5a010; }
.case-opening button:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 7px 24px #7bf5a045; }
.case-opening button:disabled { cursor: not-allowed; opacity: .56; }
.case-opening-status { margin: 7px auto 12px; max-width: 760px; color: #a8bbb0; font: 13px/1.5 "Segoe UI",sans-serif; text-align: center; overflow-wrap: anywhere; }
.case-resume,.case-result-inventory { display: block; margin: 10px auto; padding: 10px 16px; border: 1px solid #e5c46d; border-radius: 9px; background: #2a281a; color: #f4de9c; font: 600 14px/1.3 "Segoe UI",sans-serif; cursor: pointer; }
.case-resume[hidden],.case-result-inventory[hidden] { display: none; }
.case-resume:disabled { cursor: wait; opacity: .6; }
.case-reward.is-winner { border-color: #e5c46d; background: #233627; box-shadow: inset 0 0 20px #e5c46d25,0 0 22px #e5c46d55; }
.case-reward-placeholder > img { max-width: 100%; width: auto; max-height: 100px; object-fit: contain; }
.case-result h3 { margin: 0 0 12px; color: #e5c46d; font: 700 20px/1.25 "Segoe UI",sans-serif; }
.case-result p { color: #c3d5c8; font: 14px/1.5 "Segoe UI",sans-serif; }
.case-result #caseResultReward { max-width: 340px; margin: auto; }
.case-result { text-align: center; }
@media(max-width:600px) { .case-opening { flex-direction: column; } .case-opening button { width: 100%; min-width: 0; } }
@media(prefers-reduced-motion:reduce) { .case-opening button { transition: none; } }
.case-contents-title { margin: 15px 0 10px; font: 700 15px/1.2 "Segoe UI", sans-serif; letter-spacing: .05em; }
.case-reward-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.case-reward { min-width: 0; padding: 10px; border: 1px solid #345640; border-radius: 10px; background: linear-gradient(145deg, #1b2b20, #101b14); text-align: center; }
.case-reward-placeholder { display: flex; flex-direction: column; justify-content: center; gap: 7px; min-height: 74px; }
.reward-kind { color: #84998b; font: 600 9px/1.2 "Segoe UI", sans-serif; letter-spacing: .1em; }
.case-reward strong { color: #dce9e0; font: 600 12px/1.4 "Segoe UI", sans-serif; overflow-wrap: anywhere; }
.case-reward-chance { display: block; color: #7bf5a0; font: 700 15px/1.3 "Segoe UI", sans-serif; margin-top: 5px; }
.case-reward small { display: block; color: #e5c46d; font: 10px/1.3 "Segoe UI", sans-serif; margin-top: 4px; }
.case-reward.is-rare, .case-reward.is-premium { border-color: #e5c46d88; box-shadow: inset 0 0 15px #e5c46d0b; }
.roulette-reward { flex: 0 0 156px; width: 156px; padding: 7px 10px; }
.roulette-reward .case-reward-placeholder { min-height: 75px; }
.roulette-reward .case-reward-chance { font-size: 12px; }
.roulette-reward small { display: none; }
.case-result { padding: 15px; border: 1px solid #e5c46d; border-radius: 12px; }
@media (max-width: 1399px) {
  #cases.showing-case { height: auto !important; }
}
@media (max-width: 800px) {
  .case-screen { height: auto; max-height: none; overflow: visible; }
  .case-reward-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .case-screen-heading { gap: 10px; }
  .case-screen-heading > img { width: 80px; height: 90px; }
  .case-screen-heading h2 { font-size: 21px; overflow-wrap: anywhere; }
  #caseScreenPrice { font-size: 14px; }
  .case-opening { flex-direction: column; gap: 7px; }
}
#current-leaderboard .leader-row { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 7px; height: 92px; min-height: 92px; padding: 25px 8px 10px; text-align: center; }
#current-leaderboard .leader-row .avatar { display: none; }
#current-leaderboard .leader-row .rank { position: absolute; left: 8px; top: 6px; width: auto; min-width: 22px; height: 19px; border-radius: 6px; font-size: 11px; background: #273b2c; color: #aabdb0; }
#current-leaderboard .leader-row[data-place="1"] .rank { background: #e5c46d22; color: #e5c46d; }
#current-leaderboard .leader-row[data-place="2"] .rank { background: #c6d3df22; color: #c6d3df; }
#current-leaderboard .leader-row[data-place="3"] .rank { background: #d89b7222; color: #d89b72; }
#current-leaderboard .leader-row .player { width: 100%; text-align: center; font-size: 14px; line-height: 1.3; }
#current-leaderboard .leader-row .score { width: 100%; text-align: center; font-size: 17px; line-height: 1.2; color: #7bf5a0; }
@media (min-width: 1400px) {
  /* Keep the 2x5 catalogue inside its own scroll area; card hover stays within each row. */
  #view-shop, main#shop.game-dashboard .shop-panel { overflow: hidden; }
  main#shop .case-grid { overflow-x:hidden; overflow-y:auto; padding:7px 5px 9px; }
  #current-leaderboard { grid-template-columns: 200px minmax(0, 1fr); gap: 12px; }
  #current-leaderboard .current-board-title span { font-size: 28px; }
  #current-leaderboard .current-board-title .current-board-title-lead { font-size: 49px; }
  #current-leaderboard .current-board-copy p { font-size: 11px; line-height: 1.4; }
  #current-leaderboard .leader-rows { grid-auto-columns: minmax(140px, 1fr); }
  #stone { overflow: visible; grid-template-columns: 128px minmax(200px, 1fr) minmax(170px, .95fr); gap: 10px; }
  #stone .stone-art, #stone .stone-scene { overflow: visible; }
  #stone .stone-scene img { width: 400px; height: 560px; max-height: none; max-width: none; left: -112px; bottom: -48px; z-index: 0; padding: 0; object-fit: contain; opacity: .88; pointer-events: none; }
  #stone .stone-art { position: relative; z-index: 0; }
  #stone .stone-info, #stone .stone-history { position: relative; z-index: 2; }
  #stone .stone-title h2 { font-size: 29px; line-height: 1.1; letter-spacing: -.015em; }
  #stone .stone-description { font-size: 11px; color: #8e9d93; line-height: 1.4; margin: 10px 0 7px; }
  #stone .stone-permanent { font-size: 10px; color: #b6c4ba; }
}
@media (max-width: 1399px) {
  #upgrader .upgrade-stage { grid-template-columns: minmax(0, 1fr) 140px minmax(0, 1fr); gap: 10px; }
  #upgrader #chanceRing { width:140px; height:140px; }
  #upgrader .upgrade-dial { width:140px; }
  #stone .stone-scene img { width: 225px; height: 315px; max-width: none; max-height: none; left: -34px; bottom: -22px; object-fit: contain; opacity: .82; pointer-events: none; }
  #stone .stone-info, #stone .stone-history { position: relative; z-index: 2; }
}
@media (max-width: 480px) {
  #upgrader .upgrade-stage { grid-template-columns: minmax(0, 1fr) 100px minmax(0, 1fr); gap: 7px; }
  #upgrader #chanceRing { width:100px; height:100px; }
  #upgrader .upgrade-dial { width:100px; }
  #upgrader .item-slot { height: 160px; padding: 8px 5px; }
  #upgrader .item-slot strong { font-size: 11px; }
  #upgrader .item-slot b { font-size: 10px; }
  #upgrader .slot-label { font-size: 9px; }
  #upgrader #chanceRing strong { font-size:32px; }
  #upgrader .upgrade-pointer { border-left-width:8px; border-right-width:8px; border-top-width:14px; }
}
@media (prefers-reduced-motion: reduce) {
  #chanceRing::before, #chanceRing::after { animation: none; }
  .case-card { transition: none; }
}

/* Site SFX, truthful coin-wallet state, complete kit cards and larger stone mascot. */
.coin-balance {
  display:flex; align-items:center; gap:8px; flex:0 1 152px; min-width:118px; max-width:166px;
  min-height:50px; padding:5px 9px; border:1px solid #8a7137; border-radius:11px;
  color:#f1e8c9; background:linear-gradient(130deg,#332d1b,#111b13 75%);
  box-shadow:inset 0 0 16px #e5c46d0d;
}
.coin-balance > img { flex:0 0 25px; width:25px; height:25px; object-fit:contain; filter:drop-shadow(0 0 5px #e5c46d77); }
.coin-balance > span { display:block; min-width:0; }
.coin-balance strong { display:block; max-width:100%; overflow:hidden; color:#f6d675; font:800 17px/1.05 "Segoe UI",sans-serif; text-overflow:ellipsis; white-space:nowrap; }
.coin-balance small { display:block; margin-top:3px; color:#b7a66f; font:700 8px/1.15 "Segoe UI",sans-serif; letter-spacing:.035em; overflow-wrap:anywhere; }
.coin-balance[data-state="available"] { border-color:#e5c46d; box-shadow:0 0 13px #e5c46d20,inset 0 0 16px #e5c46d10; }
.sound-control { display:flex; align-items:center; justify-content:center; gap:6px; flex:0 0 110px; min-width:92px; height:50px; padding:4px 6px; border:1px solid #304b37; border-radius:11px; background:linear-gradient(140deg,#14231a,#0b130e); }
.sound-toggle { display:grid; place-items:center; flex:0 0 34px; width:34px; height:34px; padding:0; border:1px solid #577246; border-radius:9px; color:#7bf5a0; background:#15251a; font:700 20px/1 Arial,sans-serif; cursor:pointer; transition:color .18s,border-color .18s,background .18s; }
.sound-toggle:hover { border-color:#7bf5a0; background:#1b3323; }
.sound-control.is-muted .sound-toggle { color:#98a49a; border-color:#455148; }
.sound-volume { display:grid; justify-items:center; gap:1px; min-width:0; color:#93a497; font:700 7px/1 "Segoe UI",sans-serif; letter-spacing:.08em; }
.sound-volume input { width:57px; height:15px; margin:0; accent-color:#7bf5a0; cursor:pointer; }
.case-picture { position:relative; }
.case-picture::after { content:""; position:absolute; z-index:3; left:10px; right:10px; bottom:0; height:2px; border-radius:2px; background:linear-gradient(90deg,transparent,#52765b 15%,#7bf5a0 50%,#52765b 85%,transparent); box-shadow:0 0 8px #7bf5a022; pointer-events:none; }
.offer-kind-badge { position:absolute; z-index:2; top:8px; left:8px; padding:4px 7px; border:1px solid #7bf5a077; border-radius:6px; color:#c8f5d4; background:#07140dcc; font:800 8px/1 "Segoe UI",sans-serif; letter-spacing:.09em; box-shadow:0 2px 8px #0007; pointer-events:none; }
.case-card[data-offer="kit_medical"] { --glow:#7bf5a0; border-color:#477853; }
.case-card[data-offer="kit_construction"] { --glow:#e5c46d; border-color:#806d3f; }
.case-card[data-offer="kit_medical"] .offer-kind-badge { border-color:#7bf5a088; color:#b5f9ca; }
.case-card[data-offer="kit_construction"] .offer-kind-badge { border-color:#e5c46d99; color:#f1d894; }
.case-image-fallback { display:grid; place-items:center; width:100%; height:100%; min-height:90px; padding:12px; color:#a9b8ac; background:radial-gradient(ellipse,#203328,#0c150f); font:700 13px/1.35 "Segoe UI",sans-serif; text-align:center; }

@media (min-width:1400px) {
  .topbar .account { display:flex; gap:7px; }
  .topbar .coin-balance { flex:0 1 145px; max-width:155px; min-width:116px; }
  .topbar .sound-control { flex:0 0 102px; min-width:102px; }
  #view-upgrader { position:relative; z-index:2; }
  #view-ratings { position:relative; z-index:1; }
  #stone { isolation:isolate; }
  #stone .stone-art { position:static; z-index:auto; overflow:visible; }
  #stone .stone-scene { position:static; z-index:auto; overflow:visible; }
  #stone .stone-scene:before { display:none; }
  #stone .stone-scene img {
    position:absolute; z-index:1; left:-112px; bottom:-42px; width:420px; height:560px;
    max-width:none; max-height:none; object-fit:contain; object-position:center bottom;
    padding:0; pointer-events:none; transform:rotate(-4deg);
    filter:drop-shadow(0 15px 24px #000b);
  }
  #stone .stone-info, #stone .stone-history { position:relative; z-index:2; }
  #stone .stone-info { border-radius:10px; background:linear-gradient(90deg,#0b150ff0 0%,#0b150fd9 72%,#0b150f80 100%); }
}
@media (min-width:1400px) and (max-width:1540px) {
  .topbar.wrap { gap:7px; }
  .topbar .brand { flex-basis:245px; }
  .topbar .cart-shortcut { flex-basis:160px; width:160px; }
  .topbar .inventory-shortcut { flex-basis:125px; width:125px; min-width:125px; }
  .topbar .account { gap:5px; }
  .topbar .steam { flex-basis:108px; min-width:108px; }
  .topbar .promo-chip { min-width:210px; flex-basis:225px; }
  .topbar .coin-balance { flex-basis:108px; min-width:108px; padding:4px 6px; gap:5px; }
  .topbar .coin-balance small { font-size:7px; }
  .topbar .sound-control { flex-basis:80px; min-width:80px; gap:3px; padding:3px; }
  .topbar .sound-volume input { width:39px; }
  .topbar .sound-volume { font-size:6px; }
  .topbar .balance { flex-basis:148px; min-width:148px; }
}
@media (min-width:801px) and (max-width:1399px) {
  #view-upgrader { position:relative; z-index:2; }
  #view-ratings { position:relative; z-index:1; }
  .coin-balance { flex:1 1 112px; min-width:100px; max-width:none; }
  .coin-balance small { font-size:7px; }
  .sound-control { flex:0 1 96px; min-width:82px; }
  .sound-volume input { width:42px; }
  #stone .stone-art, #stone .stone-scene { overflow:visible; position:relative; z-index:1; }
  #stone .stone-scene img { width:min(27vw,260px); height:auto; max-height:none; max-width:none; object-fit:contain; }
  #stone .stone-info, #stone .stone-history { position:relative; z-index:2; }
}
@media (min-width:1181px) and (max-width:1399px) {
  .topbar .account { grid-template-columns:minmax(96px,.86fr) minmax(185px,1.65fr) minmax(120px,1fr) minmax(96px,.86fr) minmax(82px,.72fr); gap:6px; }
  .topbar .coin-balance { padding:4px 6px; gap:5px; }
  .topbar .coin-balance > img { width:22px; height:22px; flex-basis:22px; }
  .topbar .coin-balance small { font-size:6px; }
  .topbar .sound-control { padding:3px; gap:3px; }
  .topbar .sound-volume input { width:38px; }
}
@media (max-width:800px) {
  .coin-balance { min-height:43px; flex:1 1 125px; max-width:none; }
  .sound-control { min-height:43px; flex:1 1 115px; }
  .sound-volume input { width:min(22vw,92px); }
  .stone-panel .stone-art, .stone-panel .stone-scene { overflow:visible; position:relative; z-index:1; }
  .stone-panel .stone-scene img { position:relative; z-index:1; width:min(55vw,245px); height:auto; max-width:none; max-height:none; object-fit:contain; }
  .stone-panel .stone-info, .stone-panel .stone-history { position:relative; z-index:2; }
}
@media (prefers-reduced-motion:reduce) { .sound-toggle { transition:none; } }

/* The Web Animations API drives the dial; this class only adds a pending glow. */
#chanceRing.is-rolling { animation:none; filter:drop-shadow(0 0 16px rgba(123,245,160,.6)); will-change:auto; transform:none; }
#chanceRing.is-rolling > div { will-change:auto; transform:none; }
#chanceRing.is-rolling-fallback { animation:none; filter:drop-shadow(0 0 16px rgba(123,245,160,.6)); transform:none; }
#chanceRing.is-rolling-fallback > div { animation:none; transform:none; }
#chanceRing.is-result-settling { filter:drop-shadow(0 0 20px rgba(123,245,160,.35)); transform:none; }
#chanceRing.is-win { color: #7BF5A0; border-color: #7BF5A0; box-shadow: 0 0 28px rgba(123,245,160,.38), inset 0 0 22px rgba(123,245,160,.13); }
#chanceRing.is-loss { color: #E5C46D; border-color: #E5C46D; box-shadow: 0 0 24px rgba(229,196,109,.32), inset 0 0 18px rgba(229,196,109,.1); }


@media (prefers-reduced-motion: reduce) {
  #chanceRing.is-rolling-fallback, #chanceRing.is-rolling-fallback > div { animation:none; }
  #chanceRing.is-rolling-fallback + .upgrade-pointer-orbit { animation:none !important; }
  #chanceRing.is-rolling { will-change: auto; }
}


/* Inline upgrader inventory and target catalog. */
#upgrader { min-height:0; }
#upgrader .upgrade-stage { grid-template-columns:minmax(0,1fr) minmax(205px,.78fr) minmax(0,1fr); gap:12px; align-items:stretch; }
#upgrader .item-slot { position:relative; display:flex; flex-direction:column; justify-content:center; gap:7px; min-width:0; height:170px; cursor:pointer; overflow:hidden; }
#upgrader .item-slot:focus-visible,#upgrader .upgrade-choice-card:focus-visible { outline:2px solid #7bf5a0; outline-offset:2px; }
#upgrader .upgrade-item-image { width:80px; height:68px; object-fit:contain; object-position:center; }
#upgrader .item-slot strong { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
#upgrader .upgrade-chance-control { min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; }
#upgrader .upgrade-chance-control label { color:#a9b9ad; font:700 10px/1.3 "Segoe UI",sans-serif; letter-spacing:.08em; text-align:center; }
#upgradeChanceDesired { color:#7bf5a0; font-size:13px; margin-left:5px; }
#upgradeChanceSlider { width:min(100%,230px); accent-color:#7bf5a0; cursor:pointer; }
#upgradeChanceHint { min-height:28px; color:#9aaca0; font:11px/1.35 "Segoe UI",sans-serif; text-align:center; }
#upgradeAction { flex:0 0 auto; min-height:44px; }
.upgrade-operation-note { flex:0 0 auto; margin:0; color:#9bada1; font:11px/1.35 "Segoe UI",sans-serif; text-align:center; }
.upgrade-pickers { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; flex:1 1 230px; min-height:165px; }
.upgrade-picker { display:flex; flex-direction:column; min-width:0; min-height:0; padding:10px; border:1px solid #294331; border-radius:12px; background:linear-gradient(150deg,#111d15,#0b130e); }
.upgrade-picker > header { display:flex; align-items:center; justify-content:space-between; gap:8px; flex:0 0 auto; margin-bottom:8px; }
.upgrade-picker h3 { margin:0; color:#dce9df; font:800 13px/1.2 "Segoe UI",sans-serif; letter-spacing:.04em; }
#upgradeInventoryRefresh { width:30px; height:30px; flex:0 0 30px; border:1px solid #36563c; border-radius:8px; color:#7bf5a0; background:#14231a; cursor:pointer; }
.upgrade-target-tools { display:flex; justify-content:flex-end; gap:6px; min-width:0; }
.upgrade-target-tools input,.upgrade-target-tools select { max-width:42%; min-width:0; height:30px; padding:4px 7px; border:1px solid #34513a; border-radius:7px; color:#dce9df; background:#0c1710; font:11px "Segoe UI",sans-serif; }
.upgrade-card-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(145px,1fr)); align-content:start; gap:7px; min-height:0; flex:1 1 auto; overflow:auto; overscroll-behavior:contain; padding:2px 4px 4px 1px; scrollbar-width:thin; scrollbar-color:#365a3d #101812; }
.upgrade-choice-card { box-sizing:border-box; display:grid; grid-template-columns:clamp(48px,5vw,72px) minmax(0,1fr); align-items:center; gap:8px; min-width:0; min-height:104px; padding:8px; border:1px solid #2d4633; border-radius:9px; color:#e5ece7; text-align:left; background:linear-gradient(145deg,#19281d,#101a13); cursor:pointer; transition:border-color .16s,background .16s,box-shadow .16s,transform .16s; }
.upgrade-choice-card:hover:not(:disabled) { transform:translateY(-1px); border-color:#7bf5a0a8; box-shadow:0 4px 15px #7bf5a018; }
.upgrade-choice-card.is-selected { border-color:#7bf5a0; background:linear-gradient(145deg,#203a28,#14251a); box-shadow:inset 0 0 13px #7bf5a015,0 0 12px #7bf5a016; }
.upgrade-choice-card:disabled { opacity:.38; cursor:not-allowed; filter:saturate(.45); }
.upgrade-choice-art { display:grid; place-items:center; width:48px; height:48px; overflow:hidden; border:1px solid #2d4933; border-radius:7px; color:#7bf5a0; background:#0b140e; font-size:24px; }
.upgrade-choice-art img { width:100%; height:100%; object-fit:contain; object-position:center; }
.upgrade-choice-card.is-unavailable { cursor:not-allowed; opacity:.72; border-style:dashed; border-color:#695c37; }
.upgrade-choice-card.is-unavailable .upgrade-choice-art { border-color:#695c37; }
.upgrade-choice-unavailable { color:#e5c46d; font:600 10px/1.3 "Segoe UI",sans-serif; white-space:normal; }
.upgrade-target-unavailable-note { grid-column:1/-1; margin:2px 0; padding:7px 9px; border-left:2px solid #e5c46d; color:#c6b98c; font:11px/1.35 "Segoe UI",sans-serif; }
.upgrade-choice-copy { display:flex; flex-direction:column; justify-content:center; align-self:stretch; min-width:0; gap:3px; padding:2px 0; }
.upgrade-choice-copy strong { overflow:hidden; color:#e2ebe5; font:650 11px/1.25 "Segoe UI",sans-serif; text-overflow:ellipsis; }
.upgrade-choice-copy small { overflow:hidden; color:#899c8e; font:10px/1.2 "Segoe UI",sans-serif; text-overflow:ellipsis; white-space:nowrap; }
.upgrade-choice-copy b { color:#7bf5a0; font:700 11px/1.2 "Segoe UI",sans-serif; }
.upgrade-picker .leader-empty { grid-column:1/-1; margin:auto; padding:14px; color:#9aaca0; font-size:12px; text-align:center; }
.upgrade-recovery { flex:0 0 auto; display:flex; flex-wrap:wrap; justify-content:center; gap:6px; }
.upgrade-recovery[hidden] { display:none; }
.upgrade-resume { padding:7px 11px; border:1px solid #e5c46d99; border-radius:8px; color:#f1d98f; background:#2a281a; font:600 11px "Segoe UI",sans-serif; cursor:pointer; }
.upgrade-resume:disabled { opacity:.6; cursor:wait; }
@media (min-width:801px) {
  #upgrader { gap:7px; }
  #upgrader .upgrade-stage { flex:0 0 auto; }
  .upgrade-pickers { max-height:clamp(175px,27vh,275px); }
}
@media (max-width:800px) {
  #upgrader { height:auto; overflow:visible; }
  #upgrader .upgrade-stage { grid-template-columns:minmax(0,1fr) 118px minmax(0,1fr); gap:7px; }
  #upgrader .item-slot { height:145px; padding:8px 5px; }
  #upgrader .upgrade-item-image { width:64px; height:54px; }
  #upgrader #chanceRing { width:104px; height:104px; }
  #upgrader #chanceRing strong { font-size:29px; }
  .upgrade-pickers { grid-template-columns:1fr; min-height:0; }
  .upgrade-card-list { max-height:250px; min-height:100px; }
  .upgrade-target-tools input,.upgrade-target-tools select { max-width:48%; }
}
@media (max-width:480px) {
  #upgrader .upgrade-stage { grid-template-columns:minmax(0,1fr) 88px minmax(0,1fr); gap:5px; }
  #upgrader .item-slot { height:134px; }
  #upgrader #chanceRing { width:80px; height:80px; padding:5px; }
  #upgrader #chanceRing strong { font-size:22px; }
  #upgrader #chanceRing small { font-size:9px; }
  .upgrade-picker > header { align-items:flex-start; flex-direction:column; }
  .upgrade-target-tools { width:100%; }
  .upgrade-target-tools input,.upgrade-target-tools select { max-width:none; flex:1; }
  .upgrade-card-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (prefers-reduced-motion:reduce) { .upgrade-choice-card { transition:none; } }

/* Case reward artwork stays fully visible; only the roulette viewport clips its track. */
#caseRewardGrid .case-reward-placeholder > img,
#caseResultReward .case-reward-placeholder > img,
#caseRouletteTrack .case-reward-placeholder > img { display:block; flex:0 0 auto; width:min(100%,112px); height:72px; max-width:100%; max-height:none; object-fit:contain; object-position:center; }
#caseRouletteTrack .case-reward-placeholder > img { width:100%; height:58px; }
#caseRouletteTrack { will-change:transform; }

/* Reward cards: larger contain-scaled art and separate short title/composition. */
#caseRewardGrid .case-reward-placeholder { align-items:center; min-height:0; gap:6px; }
#caseRewardGrid .case-reward-placeholder > img { width:min(100%,176px); height:116px; }
#caseRewardGrid .case-reward strong { display:block; max-width:100%; line-height:1.25; overflow-wrap:anywhere; }
#caseRewardGrid .case-reward-details { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; color:#9eafa3; font:10px/1.3 "Segoe UI",sans-serif; overflow-wrap:anywhere; }
#caseRouletteTrack .case-reward-placeholder { align-items:center; min-height:0; gap:5px; }
#caseRouletteTrack .case-reward-placeholder > img { width:100%; height:88px; }
#caseRouletteTrack .case-reward strong { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; max-width:100%; overflow:hidden; font-size:11px; line-height:1.2; overflow-wrap:anywhere; }
#caseRouletteTrack .case-reward-details { display:none; }
.case-result #caseResultReward { width:min(100%,520px); max-width:520px; margin:0 auto; }
.case-result #caseResultReward .case-reward { padding:20px; }
.case-result #caseResultReward .case-reward-placeholder { align-items:center; min-height:0; gap:10px; }
.case-result #caseResultReward .case-reward-placeholder > img { width:min(100%,260px); height:190px; }
.case-result #caseResultReward .case-reward strong { font-size:20px; line-height:1.25; }
.case-result #caseResultReward .case-reward-details { display:block; max-width:420px; margin:2px auto 0; color:#aebbb2; font:12px/1.45 "Segoe UI",sans-serif; overflow-wrap:anywhere; }
#upgrader .item-slot { align-items:center; height:190px; gap:5px; }
#upgrader .upgrade-item-image { width:128px; height:104px; flex:0 0 auto; }
#upgrader .item-slot strong { max-width:100%; text-align:center; }
#upgrader .upgrade-slot-details { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; max-width:100%; overflow:hidden; color:#9bac9f; font:10px/1.25 "Segoe UI",sans-serif; text-align:center; overflow-wrap:anywhere; }
#upgrader .item-slot b { margin-top:auto; }
.upgrade-card-list { grid-template-columns:repeat(auto-fill,minmax(165px,1fr)); }
.upgrade-choice-card { box-sizing:border-box; grid-template-columns:72px minmax(0,1fr); min-height:140px; gap:9px; padding:8px; }
.upgrade-choice-art { width:72px; height:72px; }
.upgrade-choice-copy strong { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:12px; line-height:1.25; overflow-wrap:anywhere; }
.upgrade-choice-copy .upgrade-choice-details { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; color:#9cab9f; font:10px/1.25 "Segoe UI",sans-serif; overflow-wrap:anywhere; white-space:normal; }
.upgrade-choice-copy .upgrade-choice-category { white-space:nowrap; }
@media(max-width:800px) {
  #upgrader .item-slot { height:174px; }
  #upgrader .upgrade-item-image { width:106px; height:84px; }
  #upgrader .upgrade-card-list { grid-template-columns:repeat(auto-fill,minmax(155px,1fr)); }
  #upgrader .upgrade-choice-card { min-height:148px; }
  #caseRewardGrid .case-reward-placeholder > img { height:104px; }
  #caseRouletteTrack .case-reward-placeholder > img { height:76px; }
  .case-result #caseResultReward .case-reward-placeholder > img { height:160px; }
}
@media(max-width:480px) {
  #upgrader .item-slot { height:158px; }
  #upgrader .upgrade-item-image { width:88px; height:70px; }
  .upgrade-choice-card { grid-template-columns:58px minmax(0,1fr); min-height:148px; }
  .upgrade-choice-art { width:58px; height:58px; }
  #caseRouletteTrack .case-reward-placeholder > img { height:64px; }
  #caseResultReward .case-reward-details { font-size:11px; }
}

/* Keep the same readable reward title/art treatment in the inventory popover. */
.inventory-dialog .reward-thumbnail { width:78px; height:78px; }
.inventory-dialog .reward-instance { grid-template-columns:78px minmax(0,1fr) auto; }
.inventory-dialog .reward-instance-details { color:#92a497; font-size:10px; line-height:1.35; overflow-wrap:anywhere; }
@media (min-width:801px) {
  .inventory-dialog .reward-instance { grid-template-columns:78px minmax(0,1fr); }
}

/* Upgrade recovery is one persistent control, with inline diagnostics. */
.upgrade-recovery { flex-direction:column; align-items:center; }
.upgrade-recovery-status { max-width:min(100%,620px); color:#aebbb2; font:12px/1.4 "Segoe UI",sans-serif; text-align:center; overflow-wrap:anywhere; }
/* Let source/target slots grow with title and package details instead of clipping them. */
#upgrader .item-slot { height:auto; min-height:210px; padding:12px 10px; justify-content:flex-start; overflow:visible; }
#upgrader .item-slot strong { display:block; max-width:100%; overflow:visible; white-space:normal; line-height:1.3; overflow-wrap:anywhere; }
#upgrader .upgrade-slot-details { display:block; max-width:100%; overflow:visible; -webkit-line-clamp:unset; -webkit-box-orient:initial; white-space:normal; line-height:1.4; overflow-wrap:anywhere; }
#upgrader .upgrade-item-image { flex:0 0 auto; object-fit:contain; }
#upgrader .item-slot b { margin-top:auto; }
@media (max-width:800px) { #upgrader .item-slot { height:auto; min-height:194px; } }
@media (max-width:480px) { #upgrader .item-slot { height:auto; min-height:178px; padding:9px 6px; } }


/* PEREMIRIE_TASK_UX_20261012 */
/* Archive artwork has its own visual lane so its overhang never collides with copy. */
#stone { position:relative; isolation:isolate; overflow:hidden; grid-template-columns:minmax(138px,.78fr) minmax(152px,.96fr) minmax(0,1.66fr); gap:clamp(10px,1vw,17px); }
#stone .stone-art { position:relative; z-index:0; min-width:0; overflow:visible; }
#stone .stone-scene { position:relative; height:100%; min-height:0; overflow:visible; }
#stone .stone-scene img { position:absolute; z-index:1; left:50%; bottom:-8px; width:clamp(218px,19vw,315px); height:calc(100% + 24px); max-width:none; max-height:none; padding:0; transform:translateX(-43%); object-fit:contain; object-position:center bottom; pointer-events:none; }
#stone .stone-scene .stone-slogan { z-index:2; max-width:90%; }
#stone .stone-info { position:relative; z-index:2; align-self:stretch; min-width:0; padding:14px clamp(10px,1.1vw,18px); border-radius:12px; background:linear-gradient(90deg,rgba(8,17,11,.94),rgba(8,17,11,.78)); }
#stone .stone-history { position:relative; z-index:2; min-width:0; }

/* Product details stay inside the existing shop panel and use only live catalog data. */
.offer-detail-screen { flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; padding:clamp(12px,2vw,24px); border:1px solid #304b35; border-radius:14px; background:linear-gradient(145deg,#101c14,#09120c 78%); scrollbar-width:thin; scrollbar-color:#365a3d #101812; }
.offer-detail-screen[hidden] { display:none !important; }
.offer-detail-back { min-height:38px; margin:0 0 12px; padding:7px 12px; border:1px solid #38583f; border-radius:9px; color:#cfe3d2; background:#122017; font:700 13px/1.2 "Segoe UI",sans-serif; cursor:pointer; }
.offer-detail-back:hover { color:#7bf5a0; border-color:#7bf5a0; }
.offer-detail-hero { display:grid; grid-template-columns:minmax(180px,.72fr) minmax(0,1.28fr); align-items:center; gap:clamp(16px,2.4vw,32px); }
.offer-detail-art { min-height:190px; display:grid; place-items:center; position:relative; overflow:hidden; border:1px solid #314a35; border-radius:13px; background:radial-gradient(ellipse at 50% 45%,#40582a66,transparent 66%),linear-gradient(145deg,#16251a,#0a120c); }
.offer-detail-art img { display:block; width:100%; height:clamp(170px,28vh,300px); padding:10px; object-fit:contain; object-position:center; }
.offer-detail-art-fallback { padding:18px; color:#bfcebF; font:700 15px/1.35 "Segoe UI",sans-serif; text-align:center; overflow-wrap:anywhere; }
.offer-detail-category { color:#7bf5a0; font:800 11px/1.3 "Segoe UI",sans-serif; letter-spacing:.11em; text-transform:uppercase; }
.offer-detail-copy h2 { margin:5px 0 8px; color:#eef4ee; font:900 clamp(24px,3vw,38px)/1.05 "Segoe UI",sans-serif; letter-spacing:.025em; }
.offer-detail-summary { min-height:0; margin:0 0 10px; color:#aab9ae; font:13px/1.5 "Segoe UI",sans-serif; }
.offer-detail-prices { display:flex; flex-wrap:wrap; gap:8px; }
.offer-detail-pill { display:flex; flex-direction:column; gap:2px; min-width:100px; padding:8px 12px; border:1px solid #314a37; border-radius:10px; background:#0d1911; }
.offer-detail-pill small { color:#91a396; font:700 10px/1.2 "Segoe UI",sans-serif; text-transform:uppercase; letter-spacing:.06em; }
.offer-detail-pill b { color:#edf4ee; font:800 17px/1.2 "Segoe UI",sans-serif; }
.offer-detail-pill.is-rub b { color:#7bf5a0; }
.offer-detail-pill.is-coins b { color:#e5c46d; }
.offer-detail-lower { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(210px,.7fr); align-items:start; gap:14px; margin-top:15px; }
.offer-detail-content,.offer-detail-purchase { padding:13px; border:1px solid #263e2d; border-radius:12px; background:linear-gradient(145deg,#111d15,#0b130e); }
.offer-detail-content h3 { margin:0 0 10px; color:#dce9df; font:800 13px/1.3 "Segoe UI",sans-serif; letter-spacing:.06em; }
.offer-detail-content-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(175px,1fr)); gap:8px; }
.offer-component-card { min-width:0; min-height:58px; display:flex; align-items:center; gap:10px; padding:9px; border:1px solid #2b4431; border-radius:9px; background:#0b160e; }
.offer-component-icon { flex:0 0 35px; width:35px; height:35px; display:grid; place-items:center; border-radius:9px; color:#e5c46d; background:#1c2b1e; font:800 12px/1 "Segoe UI",sans-serif; }
.offer-component-copy { min-width:0; display:grid; gap:4px; }
.offer-component-copy strong { color:#e5ece7; font:700 12px/1.3 "Segoe UI",sans-serif; overflow-wrap:anywhere; }
.offer-component-copy small { color:#7f9285; font:10px/1.2 "Segoe UI",sans-serif; }
.offer-benefit-card .offer-component-icon { color:#7bf5a0; }
.offer-detail-empty { grid-column:1/-1; margin:0; color:#9eafa3; font:12px/1.5 "Segoe UI",sans-serif; }
.offer-detail-purchase { display:grid; gap:9px; }
.offer-detail-purchase button { min-height:44px; border:1px solid #52603b; border-radius:9px; color:#b5bea9; background:#182219; font:800 12px/1.2 "Segoe UI",sans-serif; }
.offer-detail-purchase button:disabled { cursor:not-allowed; opacity:.72; }
.offer-detail-purchase-note { margin:0; color:#9eaa9e; font:11px/1.5 "Segoe UI",sans-serif; }

/* The web inventory is a compact scrollable collection of readable reward cards. */
.inventory-dialog { width:min(1040px,calc(100vw - 24px)); }
.inventory-dialog-shell { max-height:min(820px,calc(100dvh - 24px)); }
.inventory-dialog-head { align-items:center; padding:18px 20px 14px; }
.inventory-dialog-head h2 { margin-top:6px; }
.inventory-dialog #reward-inventory { padding:14px 18px 18px; }
.inventory-dialog .reward-inventory-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr)); align-content:start; gap:11px; padding:0 2px 4px; }
.inventory-dialog .reward-instance { min-width:0; display:grid; grid-template-columns:88px minmax(0,1fr); grid-template-rows:minmax(88px,auto) auto; align-items:start; gap:8px 12px; padding:11px; border:1px solid #2b4431; border-radius:12px; background:linear-gradient(145deg,#142219,#0c160f); transition:border-color .16s,box-shadow .16s,transform .16s; }
.inventory-dialog .reward-instance[data-status="IN_WEB_INVENTORY"] { border-color:#3a6344; }
.inventory-dialog .reward-thumbnail { grid-column:1; grid-row:1; width:88px; height:88px; border-radius:11px; }
.inventory-dialog .reward-instance-info { grid-column:2; grid-row:1; align-content:start; gap:5px; }
.inventory-dialog .reward-instance-info strong { color:#f0f3ef; font:800 14px/1.25 "Segoe UI",sans-serif; }
.inventory-dialog .reward-instance-info > small { color:#8fa195; font:11px/1.35 "Segoe UI",sans-serif; white-space:normal; }
.inventory-dialog .reward-instance-info .reward-instance-status { width:fit-content; padding:3px 7px; border:1px solid #425747; border-radius:999px; color:#c2d6c6; background:#142219; font-size:10px; font-weight:700; }
.inventory-dialog .reward-instance-status[data-status="IN_WEB_INVENTORY"] { color:#7bf5a0; border-color:#477e54; }
.inventory-dialog .reward-instance-status[data-status="SOLD"],.inventory-dialog .reward-instance-status[data-status="UPGRADED"],.inventory-dialog .reward-instance-status[data-status="REDEEMED"] { color:#9aa69d; border-color:#3a443d; }
.inventory-dialog .reward-instance-info > b { color:#e5c46d; font:800 14px/1.2 "Segoe UI",sans-serif; }
.inventory-dialog .reward-actions { grid-column:1/-1; width:100%; display:grid; grid-template-columns:repeat(auto-fit,minmax(94px,1fr)); align-items:stretch; gap:7px; margin:1px 0 0; }
.inventory-dialog .reward-actions button { min-height:36px; padding:7px 9px; border:1px solid #35563d; border-radius:8px; color:#d5e5d8; background:#15251a; font:700 11px/1.25 "Segoe UI",sans-serif; white-space:normal; }
.inventory-dialog .reward-actions button:not(:disabled):hover { border-color:#7bf5a0; color:#7bf5a0; }
.inventory-dialog .reward-actions button:disabled { opacity:.5; cursor:not-allowed; }
.inventory-dialog .reward-actions .reward-disabled-note { grid-column:1/-1; color:#829187; font:10px/1.35 "Segoe UI",sans-serif; }
.inventory-dialog .reward-inventory-list > .leader-empty { grid-column:1/-1; }

/* Make item selection explicit; the backend still decides eligibility and outcome. */
.upgrade-choice-action { display:inline-flex; align-self:flex-start; align-items:center; justify-content:center; box-sizing:border-box; min-height:28px; max-width:100%; width:fit-content; margin:2px 0 0; padding:5px 12px; border:1px solid #65966e; border-radius:7px; color:#baffc9 !important; background:#173321; font:800 12px/1.2 "Segoe UI",sans-serif !important; white-space:nowrap; }
.upgrade-choice-card.is-selected .upgrade-choice-action { color:#09140c !important; border-color:#7bf5a0; background:#7bf5a0; }

@media (max-width:800px) {
  #stone { grid-template-columns:minmax(112px,.72fr) minmax(0,1.28fr); grid-auto-rows:auto; }
  #stone .stone-art { grid-column:1; grid-row:1; min-height:190px; }
  #stone .stone-scene { min-height:190px; }
  #stone .stone-scene img { width:210px; height:220px; left:-15px; bottom:-6px; transform:none; }
  #stone .stone-info { grid-column:2; grid-row:1; }
  #stone .stone-history { grid-column:1/-1; }
  .offer-detail-hero { grid-template-columns:minmax(130px,.65fr) minmax(0,1.35fr); gap:13px; }
  .offer-detail-art { min-height:150px; }
  .offer-detail-art img { height:180px; }
  .offer-detail-lower { grid-template-columns:1fr; }
  .offer-detail-purchase { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:480px) {
  #stone { grid-template-columns:100px minmax(0,1fr); gap:8px; }
  #stone .stone-art,#stone .stone-scene { min-height:155px; }
  #stone .stone-scene img { width:176px; height:190px; left:-30px; }
  #stone .stone-info { padding:10px 8px; }
  .offer-detail-screen { padding:10px; }
  .offer-detail-hero { grid-template-columns:1fr; }
  .offer-detail-art { min-height:140px; }
  .offer-detail-art img { height:170px; }
  .offer-detail-copy h2 { font-size:26px; }
  .offer-detail-content-grid { grid-template-columns:1fr; }
  .inventory-dialog-head { padding:14px; }
  .inventory-dialog #reward-inventory { padding:10px; }
  .inventory-dialog .reward-inventory-list { grid-template-columns:1fr; }
}
@media (prefers-reduced-motion:reduce) {
  .inventory-dialog .reward-instance,.offer-detail-back { transition:none; }
}


/* Kit component art and quantities: V8 kit detail screen. */
.offer-component-card { min-height:74px; gap:11px; padding:9px 10px; }
.offer-component-icon { flex-basis:52px; width:52px; height:52px; overflow:hidden; border:1px solid #314a37; background:linear-gradient(145deg,#1a2a1d,#0d1710); }
.offer-component-icon img { display:block; width:100%; height:100%; object-fit:contain; }
.offer-component-icon.is-image-missing { color:#7bf5a0; font-size:20px; }
.offer-component-copy { flex:1 1 auto; }
.offer-component-copy strong { font-size:13px; line-height:1.3; }
.offer-component-quantity { flex:0 0 auto; min-width:38px; padding:6px 8px; border:1px solid #36563c; border-radius:999px; background:#14231a; color:#b5f9ca; text-align:center; font:800 12px/1 ""Segoe UI"",sans-serif; }
.offer-benefit-card .offer-component-quantity { display:none; }

/* Catalog reference prices are informational and never used for checkout. */
.case-price-stack { min-width:0; display:grid; justify-items:start; gap:3px; }
.case-reference-line { display:flex; align-items:center; gap:6px; color:#91a092; font:600 10px/1.15 "Segoe UI",sans-serif; }
.case-reference-line s { color:#859187; text-decoration-color:#b1785d; }
.offer-discount-badge { display:inline-flex; align-items:center; padding:2px 5px; border:1px solid rgba(123,245,160,.35); border-radius:999px; color:#a2f6b6; background:rgba(57,112,69,.2); font:800 9px/1.1 "Segoe UI",sans-serif; }
.offer-detail-pill.is-reference b { color:#a2afa5; font-size:14px; text-decoration:line-through; text-decoration-color:#a67259; }
.offer-detail-pill.is-discount b { color:#9af0ad; }
.case-card .case-foot { align-items:center; }
.case-card .case-price-stack { max-width:calc(100% - 40px); }
.case-card .case-reference-line { flex-wrap:wrap; }
@media (max-width:800px) { .case-reference-line { font-size:9px; } }

/* Denser V8 shop cards with larger product art and stronger price hierarchy. */
.case-card { min-height:300px; padding:0 12px 13px; }
.case-picture { height:clamp(166px,13vw,205px); width:calc(100% + 24px); margin-left:-12px; }
.case-picture img { width:100%; height:100%; padding:2px; object-fit:contain; }
.case-card h3 { min-height:36px; margin:7px 0 5px; font-size:14px; line-height:1.25; }
.case-card .case-foot { min-height:34px; }
.case-card .case-price { font-size:clamp(23px,1.55vw,29px); line-height:1.05; font-weight:900; color:#f1e2ae; text-shadow:0 0 12px #e5c46d22; }
.case-card .case-price-stack { max-width:calc(100% - 34px); gap:4px; }
.case-card .case-reference-line { gap:7px; font-size:11px; }
.case-card .case-reference-line s { font-size:12px; }
.case-card .offer-discount-badge { padding:3px 7px; font-size:10px; }
.case-card .offer-meta { display:flex; align-items:center; gap:4px; margin-top:4px; color:#b7c5b9; font-size:12px; font-weight:700; line-height:1.25; }
.case-card .coin-icon { width:18px; height:18px; margin:0; vertical-align:middle; }
.offer-detail-pill.is-discount b { font-size:16px; }
@media (min-width:1400px) { .case-grid { gap:13px; } }
@media (max-width:800px) {
  #upgrader .upgrade-stage { grid-template-columns:minmax(0,1fr) minmax(112px,.72fr) minmax(0,1fr); gap:7px; }
  #upgrader .item-slot { min-height:190px; padding:10px 7px; }
  #upgrader .item-slot .upgrade-slot-details { font-size:9px; }
  .case-card { min-height:270px; }
  .case-picture { height:clamp(140px,32vw,190px); }
}
@media (max-width:520px) {
  #upgrader .upgrade-stage { grid-template-columns:minmax(0,1fr) minmax(94px,.72fr) minmax(0,1fr); gap:5px; }
  #upgrader .item-slot { min-height:164px; padding:8px 5px; gap:5px; }
  #upgrader .upgrade-item-image,#upgrader .item-icon { width:58px; height:58px; }
  #upgrader .item-slot .slot-label { font-size:8px; }
  #upgrader .item-slot strong { font-size:12px; }
  #upgrader .item-slot b { font-size:12px; }
}

/* Keep the fixed-height desktop catalogue grid inside its two available rows. */
@media (min-width:801px) {
  .case-card { min-height:0; height:100%; padding:0 10px 9px; }
  .case-picture { flex:0 0 clamp(112px,14.5vh,156px); height:clamp(112px,14.5vh,156px); width:calc(100% + 20px); margin-left:-10px; }
  .case-picture img { padding:2px; }
  .case-card h3 { min-height:34px; margin:6px 0 3px; font-size:clamp(12px,.82vw,14px); }
  .case-card .case-price { font-size:clamp(20px,1.25vw,25px); }
  .case-card .case-reference-line { font-size:10px; }
  .case-card .offer-meta { font-size:10px; }
  .case-card .coin-icon { width:16px; height:16px; }
}
.offer-detail-pill.is-reference small { color:#a7b2a9; font-size:10px; letter-spacing:.06em; }

/* Compact store cards reserve enough room for all price rows and coin labels. */
.case-card { box-sizing:border-box; overflow:hidden; justify-content:flex-start; padding:0 9px 10px; }
.case-picture { box-sizing:border-box; flex:0 0 clamp(156px,15vh,166px); min-height:0; height:clamp(156px,15vh,166px); }
.case-card h3 { box-sizing:border-box; align-self:center; display:flex; align-items:center; justify-content:center; width:fit-content; max-width:100%; min-height:28px; margin:4px 0 3px; padding:4px 9px; border:1px solid #52765b; border-radius:7px; background:linear-gradient(135deg,#17271c,#101a13); box-shadow:inset 0 0 9px #7bf5a00b; text-align:center; overflow-wrap:anywhere; }
.case-card .case-foot { flex:0 0 auto; min-height:31px; margin-top:0; }
.case-card .case-price-stack { max-width:calc(100% - 30px); gap:2px; }
.case-card .case-price { font-size:clamp(19px,1.1vw,23px); line-height:1.05; }
.case-card .case-reference-line { display:flex; flex-wrap:nowrap; align-items:center; gap:5px; font-size:9px; line-height:1.15; white-space:nowrap; }
.case-card .case-reference-line s { font-size:10px; }
.case-card .offer-discount-badge { flex:0 0 auto; padding:2px 5px; font-size:9px; line-height:1.15; }
.case-card .offer-meta { flex:0 0 auto; min-height:17px; margin-top:2px; font-size:10px; line-height:17px; white-space:nowrap; }
.case-card .coin-icon { flex:0 0 15px; width:15px; height:15px; }
@media (max-width:800px) { .case-card { padding-bottom:9px; } .case-picture { flex-basis:clamp(140px,27vw,190px); height:clamp(140px,27vw,190px); } }
@media (max-width:520px) { .case-picture { flex-basis:138px; height:138px; } }

/* Reserve the final catalogue footprint while its API response is in flight. */
@media (min-width:561px) and (max-width:800px) { .case-grid.catalog-loading { min-height:1125px; } }
@media (min-width:371px) and (max-width:560px) { .case-grid.catalog-loading { min-height:1386px; } }
@media (max-width:370px) { .case-grid.catalog-loading { min-height:2781px; } }
