/* Homepage theme based on the approved cyan/navy desktop and mobile references.
   This file changes presentation only. API hooks and existing controls stay intact. */

body.home-reference {
  --ref-bg: #020a12;
  --ref-panel: rgba(5, 19, 30, .94);
  --ref-panel-soft: rgba(8, 28, 42, .78);
  --ref-cyan: #1de9df;
  --ref-cyan-bright: #72fff3;
  --ref-green: #69e54f;
  --ref-line: rgba(58, 226, 222, .28);
  --ref-violet: rgba(110, 53, 164, .34);
  color: #f4fbff;
  background-color: var(--ref-bg) !important;
  background-image:
    radial-gradient(circle at 76% 13%, rgba(11, 118, 129, .14), transparent 34%),
    radial-gradient(circle at 42% 52%, rgba(35, 54, 118, .12), transparent 38%),
    linear-gradient(180deg, rgba(1, 9, 16, .96), rgba(2, 10, 18, .985)),
    var(--site-bg-image, none) !important;
  background-attachment: fixed;
  background-size: cover;
}

body.home-reference::before {
  background: linear-gradient(180deg, rgba(1, 8, 14, .72), rgba(1, 9, 16, .9)) !important;
}

/* An uploaded site background must remain visible below the cyan/navy tint. */
body.home-reference.site-custom-background {
  background-image:
    radial-gradient(circle at 76% 13%, rgba(11, 118, 129, .1), transparent 34%),
    linear-gradient(180deg, rgba(1, 9, 16, .38), rgba(2, 10, 18, .58)),
    var(--site-bg-image) !important;
  background-position: center, center, center !important;
  background-repeat: no-repeat, no-repeat, no-repeat !important;
  background-size: cover, cover, cover !important;
  background-attachment: fixed, fixed, fixed !important;
}

body.home-reference.site-custom-background::before {
  background: linear-gradient(180deg, rgba(1, 8, 14, .08), rgba(1, 9, 16, .22)) !important;
}

@media (max-width: 760px) {
  body.home-reference.site-custom-background {
    background-color: #020a12 !important;
    background-image: none !important;
  }

  body.home-reference.site-custom-background::before {
    background-image:
      linear-gradient(180deg, rgba(1, 8, 14, .14), rgba(1, 9, 16, .34)),
      var(--site-bg-image) !important;
    background-position: center, center top !important;
    background-repeat: no-repeat, no-repeat !important;
    background-size: cover, cover !important;
  }
}

/* Keep paid-case prices compact on the storefront. */
html body.home-reference article.case-card.unified-case-card:not(.free-case-card) .case-open > em {
  display: inline-flex !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: calc(100% - 20px) !important;
  min-height: 38px !important;
  padding: 8px 22px !important;
  justify-self: center !important;
  align-self: center !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  border-radius: 11px !important;
}

@media (max-width: 760px) {
  html body.home-reference article.case-card.unified-case-card:not(.free-case-card) .case-open > em {
    min-height: 32px !important;
    padding: 6px 15px !important;
    border-radius: 9px !important;
  }
}

.home-reference .site-header {
  position: relative;
  z-index: 40;
  background: rgba(2, 9, 15, .97);
  border-bottom: 1px solid rgba(72, 222, 220, .12);
  /* A filtered ancestor becomes the containing block for position:fixed in
     Chromium.  Keep the sidebar attached to the viewport, not to the header. */
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.home-reference .topbar { display: none !important; }

.home-reference .live-strip-viewport {
  height: 96px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  background: linear-gradient(180deg, #020a12, #04111d) !important;
  border-block: 1px solid rgba(66, 232, 224, .13);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .42);
  scroll-snap-type: none !important;
}

.home-reference .live-strip-viewport::after { height: 96px; margin-top: -96px; }
.home-reference .live-strip { min-height: 96px !important; }
.home-reference .live-strip {
  width: max-content !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
}
.home-reference .live-strip .live-card {
  width: 164px !important;
  min-width: 164px !important;
  flex-basis: 164px !important;
  height: 96px !important;
  padding: 6px 12px 7px !important;
  background: linear-gradient(145deg, rgba(7, 26, 40, .96), rgba(4, 13, 25, .98)) !important;
  border-right: 1px solid rgba(58, 226, 222, .18) !important;
  box-shadow: inset 0 -2px 0 rgba(68, 225, 218, .08);
  align-self: stretch !important;
  transform-origin: top center !important;
  scroll-snap-align: none !important;
}
.home-reference .live-strip .live-card.is-center-win {
  transform: scale(1.08) !important;
}
.home-reference .live-strip .live-card:nth-child(3n + 2) { background: linear-gradient(145deg, rgba(21, 18, 48, .96), rgba(5, 16, 28, .98)) !important; }
.home-reference .live-strip .live-card:nth-child(3n) { background: linear-gradient(145deg, rgba(25, 11, 42, .92), rgba(5, 16, 28, .98)) !important; }
.home-reference .live-strip .live-card img { height: 48px !important; filter: drop-shadow(0 6px 10px rgba(22, 236, 226, .15)); }
.home-reference .live-strip .live-card b { color: #e9f8fc; font-size: 10px !important; }
.home-reference .live-strip .live-card strong { color: var(--ref-green); font-size: 11px !important; }

/* Desktop sidebar. */
.home-reference .main-nav {
  position: fixed !important;
  z-index: 45;
  top: 116px;
  bottom: 0;
  left: 0;
  width: 192px;
  height: calc(100vh - 116px);
  padding: 22px 16px 92px !important;
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 24px;
  background: transparent;
  backdrop-filter: none;
  border: 0 !important;
  box-shadow: none;
  transition: transform .34s cubic-bezier(.22, .78, .24, 1), box-shadow .34s ease;
}

.home-reference .sidebar-toggle {
  position: absolute;
  z-index: 4;
  top: 18px;
  right: -42px;
  width: 34px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(56, 221, 215, .3);
  border-left-color: rgba(56, 221, 215, .16);
  border-radius: 0 11px 11px 0;
  color: #bffdfa;
  background: rgba(4, 23, 34, .96);
  box-shadow: 9px 5px 22px rgba(0, 0, 0, .28);
  cursor: pointer;
}
.home-reference .sidebar-toggle:hover,
.home-reference .sidebar-toggle:focus-visible {
  color: #fff;
  border-color: rgba(93, 244, 235, .58);
  background: rgba(9, 55, 64, .98);
  outline: none;
}
.home-reference .sidebar-toggle span {
  width: 9px;
  height: 9px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateX(2px) rotate(45deg);
  transition: transform .34s ease;
}

.home-reference .main-nav .brand {
  width: 100%;
  min-width: 0;
  height: auto;
  padding: 2px 4px 17px;
  display: grid;
  justify-items: center;
  gap: 7px;
  border: 0 !important;
}
.home-reference .main-nav .brand img { width: 76px; height: 62px; object-fit: contain; filter: drop-shadow(0 0 13px rgba(29, 233, 223, .18)); }
.home-reference .main-nav .brand strong { color: #e9fbff; font-size: 15px; letter-spacing: .02em; }

.home-reference .main-nav .main-tabs {
  width: 100%;
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.home-reference .main-nav .main-tabs > a {
  min-height: 44px !important;
  padding: 0 13px !important;
  justify-content: flex-start;
  gap: 11px;
  border-radius: 12px !important;
  color: #aebfca !important;
  font-size: 13px;
  font-weight: 750;
}
.home-reference .main-nav .main-tabs > a::before {
  display: inline-grid !important;
  width: 20px;
  color: #8da7b4;
  font-size: 15px;
  text-align: center;
}
.home-reference .main-nav .main-tabs > a:nth-child(1)::before { content: "▣"; }
.home-reference .main-nav .main-tabs > a:nth-child(2)::before { content: "↟"; }
.home-reference .main-nav .main-tabs > a:nth-child(3)::before { content: "◇"; }
.home-reference .main-nav .main-tabs > a:nth-child(4)::before { content: "◈"; }
.home-reference .main-nav .main-tabs > a:nth-child(5)::before { content: "▤"; }
.home-reference .main-nav .main-tabs > a:hover,
.home-reference .main-nav .main-tabs > a.active {
  color: var(--ref-cyan-bright) !important;
  background: linear-gradient(90deg, rgba(22, 197, 192, .19), rgba(17, 100, 113, .05)) !important;
  box-shadow: inset 0 0 0 1px rgba(50, 225, 218, .17) !important;
}
.home-reference .main-nav .main-tabs > a:hover::before,
.home-reference .main-nav .main-tabs > a.active::before { color: var(--ref-cyan); }

.home-reference .header-account {
  width: 100%;
  margin-top: auto;
  display: grid;
  gap: 6px;
}
.home-reference .header-account.authenticated {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.home-reference .header-account .login,
.home-reference .header-account.authenticated .login {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border: 0 !important;
  border-radius: 0;
  color: #eafcff;
  background: transparent !important;
  box-shadow: none !important;
}
.home-reference .header-account.authenticated .login {
  grid-column: 1 / -1;
}
.home-reference .header-account.authenticated .header-wallet {
  display: flex !important;
  min-width: 0;
  min-height: 42px;
  padding: 7px 8px;
  border: 0 !important;
  border-radius: 0;
  align-items: center;
  text-align: center;
  background: transparent !important;
}
.home-reference .header-account.authenticated .header-wallet-rub {
  background: transparent !important;
}
.home-reference .header-account.authenticated .header-wallet-fc {
  background: transparent !important;
}
.home-reference .header-account.authenticated .header-wallet small {
  color: #79939e;
  font-size: 7px;
}
.home-reference .header-account.authenticated .header-wallet b {
  color: #effdff;
  font-size: 11px;
}
.home-reference .header-account.authenticated .header-wallet-rub b { color: var(--ref-cyan-bright); }
.home-reference .main-nav .account-picture-button {
  display: grid !important;
  width: 48px;
  height: 48px;
  margin-inline: auto;
  border: 0 !important;
  border-radius: 50%;
  background: transparent !important;
  box-shadow: none !important;
}

.home-reference .page {
  width: calc(100% - 192px);
  max-width: none;
  margin: 0 0 0 192px;
  padding: 24px clamp(22px, 2vw, 38px) 108px;
  box-sizing: border-box;
  transition: width .34s cubic-bezier(.22, .78, .24, 1), margin-left .34s cubic-bezier(.22, .78, .24, 1), padding .34s ease;
}

.home-reference.sidebar-collapsed .main-nav {
  transform: translateX(-100%);
  box-shadow: none;
}
.home-reference.sidebar-collapsed .sidebar-toggle span {
  transform: translateX(-2px) rotate(225deg);
}
.home-reference.sidebar-collapsed .page {
  width: 100%;
  margin-left: 0;
  padding-inline: clamp(22px, 2.5vw, 44px);
}

/* Approved compact promo + free-case composition. */
.home-reference .mobile-showcase {
  display: grid !important;
  gap: 16px;
}
.home-reference .mobile-promo {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  padding: 34px 38px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(64, 225, 219, .28);
  border-radius: 22px;
  background:
    radial-gradient(circle at 75% 45%, rgba(43, 218, 212, .22), transparent 28%),
    linear-gradient(115deg, rgba(3, 20, 31, .98) 5%, rgba(6, 42, 54, .93) 56%, rgba(4, 18, 31, .96));
  box-shadow: 0 20px 52px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(111, 255, 247, .08);
}
.home-reference .mobile-promo::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(2, 13, 22, .82) 0 38%, transparent 72%);
  z-index: 1;
}
.home-reference .mobile-promo::after {
  content: "";
  position: absolute;
  inset: auto 6% -65% 43%;
  height: 160%;
  background: radial-gradient(circle, rgba(31, 230, 220, .16), transparent 60%);
  z-index: 0;
}
.home-reference .mobile-promo > img {
  position: absolute;
  z-index: 0;
  inset: 0 0 0 auto;
  width: 62%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: .93;
  filter: hue-rotate(-72deg) saturate(.82) contrast(1.04);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 30%);
  mask-image: linear-gradient(90deg, transparent 0, #000 30%);
}
.home-reference .mobile-promo > div { position: relative; z-index: 2; width: min(520px, 52%); }
.home-reference .mobile-promo h1 { margin: 0; color: #fff; font-size: clamp(29px, 3vw, 44px); line-height: 1.02; letter-spacing: -.035em; }
.home-reference .mobile-promo p { max-width: 430px; margin: 12px 0 0; color: #b6cad3; font-size: 16px; font-weight: 600; }
.home-reference .promo-row {
  width: min(390px, 100%);
  margin-top: 22px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  background: transparent;
}
.home-reference .promo-row span,
.home-reference .promo-row button {
  min-height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}
.home-reference .promo-row span {
  padding: 0 18px;
  color: #e9fbff;
  border: 1px solid rgba(67, 221, 216, .28);
  background: rgba(4, 17, 28, .78);
}
.home-reference .promo-row button {
  min-width: 136px;
  padding: 0 18px;
  color: #03201f;
  border: 1px solid rgba(101, 255, 243, .44);
  background: linear-gradient(135deg, #28ddd5, #58e57c);
  box-shadow: 0 8px 22px rgba(36, 222, 210, .2);
}

.home-reference .deposit-ribbon {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #d9f8f7;
  background: transparent;
  box-shadow: none;
}
.home-reference .deposit-ribbon::before,
.home-reference .deposit-ribbon::after { content: "◆"; color: var(--ref-cyan); font-size: 9px; text-shadow: 0 0 12px var(--ref-cyan); }
.home-reference .deposit-ribbon span { font-size: 18px; font-weight: 900; letter-spacing: .03em; text-align: center; text-transform: uppercase; }

.home-reference .mobile-case-duo {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
  padding: 0;
}
.home-reference .mobile-case-duo .case-card {
  min-height: 285px !important;
  overflow: hidden;
  border: 1px solid rgba(59, 209, 209, .25) !important;
  border-radius: 19px;
  background: linear-gradient(160deg, rgba(12, 31, 47, .95), rgba(4, 13, 25, .98)) !important;
  box-shadow: none !important;
}
.home-reference .mobile-case-duo .case-open {
  min-height: 285px !important;
  padding: 12px 14px 14px !important;
  grid-template-rows: 190px 36px 38px !important;
  gap: 4px !important;
  background:
    radial-gradient(circle at 50% 36%, rgba(41, 210, 206, .2), transparent 47%),
    linear-gradient(180deg, rgba(18, 43, 62, .22), rgba(3, 11, 21, .2)) !important;
}
.home-reference .mobile-case-duo .case-art { min-height: 190px !important; }
.home-reference .mobile-case-duo .case-art img { height: 190px !important; filter: none !important; }
.home-reference .mobile-case-duo .case-meta { min-height: 36px; }
.home-reference .mobile-case-duo .case-meta b { color: #f3fbff; font-size: 15px; }
.home-reference .mobile-case-duo .case-open > em {
  width: min(170px, 92%);
  justify-self: center;
  padding: 9px 12px !important;
  border: 1px solid rgba(68, 247, 233, .3);
  border-radius: 9px;
  color: #dffffc !important;
  background: linear-gradient(135deg, rgba(9, 129, 128, .88), rgba(16, 94, 94, .92)) !important;
  box-shadow: 0 0 22px rgba(26, 224, 215, .13);
}

/* Keep home-page cases consistent with every other storefront section. */
.home-reference .case-card {
  position: relative;
  z-index: 1;
  box-shadow: none !important;
  transform: none !important;
  transition: border-color .28s ease !important;
}
.home-reference .case-card .case-art img {
  filter: none !important;
  transform: translateY(0) scale(1);
  transform-origin: center bottom;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), filter .3s ease !important;
}
.home-reference .case-open[data-paid-case] > em {
  font-size: 17.55px !important;
  line-height: 1.05 !important;
}
@media (hover: hover) and (pointer: fine) {
  .home-reference .case-card:hover {
    z-index: 12;
    transform: none !important;
    box-shadow: none !important;
  }
  .home-reference .case-card:hover .case-art img {
    transform: translateY(-10px) scale(1.045);
    filter: drop-shadow(0 18px 12px rgba(0,0,0,.5)) !important;
  }
}
@media (hover: none) {
  .home-reference .case-card:active {
    transform: none !important;
    box-shadow: none !important;
  }
  .home-reference .case-card:active .case-art img {
    transform: translateY(-6px) scale(1.03);
    filter: drop-shadow(0 13px 9px rgba(0,0,0,.45)) !important;
  }
}

/* Final home override: never lift the case card itself. */
.home-reference .case-card,
.home-reference .case-card:hover,
.home-reference .case-card:focus-within,
.home-reference .case-card .case-open,
.home-reference .case-card:hover .case-open,
.home-reference .case-card:focus-within .case-open {
  transform: none !important;
  translate: none !important;
  scale: 1 !important;
  box-shadow: none !important;
}

/* Loaded after the shared theme: keep the rectangle pinned on the homepage. */
html body.home-reference .case-grid > article.case-card,
html body.home-reference .free-case-grid > article.case-card,
html body.home-reference #mobileFreeCases > article.case-card,
html body.home-reference .case-grid > article.case-card:hover,
html body.home-reference .free-case-grid > article.case-card:hover,
html body.home-reference #mobileFreeCases > article.case-card:hover,
html body.home-reference .case-grid > article.case-card:active,
html body.home-reference .free-case-grid > article.case-card:active,
html body.home-reference #mobileFreeCases > article.case-card:active {
  top: auto !important;
  margin-top: 0 !important;
  transform: none !important;
  translate: none !important;
  scale: 1 !important;
  animation: none !important;
  box-shadow: none !important;
}

/* The mobile composition replaces duplicate legacy hero/free-case copies only. */
.home-reference .hero-grid,
.home-reference .free-case-head,
.home-reference #freeCases { display: none !important; }

.home-reference .section-head { margin-top: 38px; }
.home-reference .section-head h2 { color: #ecfaff; }
.home-reference .case-card,
.home-reference .skin-card,
.home-reference .tool-panel,
.home-reference .promo-activate-form {
  border-color: rgba(58, 226, 222, .18) !important;
  background-color: rgba(5, 19, 30, .84);
}

.home-reference .bottom-nav {
  position: fixed;
  z-index: 80;
  right: 24px;
  bottom: 18px;
  left: 216px;
  width: min(620px, calc(100vw - 260px));
  min-height: 60px;
  margin-inline: auto;
  padding: 6px;
  display: grid !important;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: stretch;
  border: 1px solid rgba(61, 222, 215, .24);
  border-radius: 15px;
  background: rgba(3, 16, 25, .94);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .44), inset 0 1px 0 rgba(107, 255, 247, .05);
  backdrop-filter: blur(14px);
  transform: none !important;
  transition: left .34s cubic-bezier(.22, .78, .24, 1), width .34s cubic-bezier(.22, .78, .24, 1), border-color .2s ease;
}
.home-reference.sidebar-collapsed .bottom-nav {
  left: 24px;
  width: min(620px, calc(100vw - 48px));
}
.home-reference .bottom-nav a,
.home-reference .bottom-nav button {
  min-width: 0;
  padding: 0 12px;
  display: grid;
  place-items: center;
  color: #8ba2ad;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}
.home-reference .bottom-nav a.active,
.home-reference .bottom-nav a:hover { color: var(--ref-cyan-bright); background: rgba(21, 199, 192, .1); }

@media (max-width: 980px) {
  .home-reference .sidebar-toggle { display: none !important; }
  .home-reference.sidebar-collapsed .main-nav { transform: none; }
  .home-reference .live-strip-viewport,
  .home-reference .live-strip { height: 82px !important; min-height: 82px !important; }
  .home-reference .live-strip-viewport::after { height: 82px; margin-top: -82px; }
  .home-reference .live-strip .live-card {
    width: 112px !important;
    min-width: 112px !important;
    flex-basis: 112px !important;
    height: 82px !important;
    padding: 5px 7px !important;
  }
  .home-reference .live-strip .live-card.is-center-win {
    transform: scale(1.07) !important;
    transform-origin: top center !important;
  }
  .home-reference .live-strip .live-card img { height: 39px !important; }
  .home-reference .live-strip .live-card b { font-size: 9px !important; }

  .home-reference .main-nav {
    position: relative !important;
    top: auto;
    bottom: auto;
    width: 100%;
    height: 82px;
    padding: 10px 16px !important;
    display: grid !important;
    grid-template-columns: 62px minmax(0, 1fr) 52px;
    align-items: center;
    gap: 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(58, 226, 222, .14);
  }
  .home-reference .main-nav .brand {
    width: 62px;
    height: 62px;
    padding: 0;
    border: 0 !important;
  }
  .home-reference .main-nav .brand img { width: 62px; height: 62px; }
  .home-reference .main-nav .brand strong { display: none; }
  .home-reference .main-nav .main-tabs { display: none !important; }
  .home-reference .header-account,
  .home-reference .header-account.authenticated {
    width: 100%;
    margin: 0;
    display: grid;
    align-items: center;
    gap: 5px;
  }
  .home-reference .header-account { grid-template-columns: minmax(0, 1fr) !important; }
  .home-reference .header-account.authenticated { grid-template-columns: minmax(0, 1fr) auto auto !important; }
  .home-reference .header-account .login,
  .home-reference .header-account.authenticated .login {
    min-height: 48px;
    font-size: 15px;
    background: linear-gradient(90deg, rgba(7, 40, 48, .94), rgba(15, 58, 65, .82));
  }
  .home-reference .header-account.authenticated .login {
    grid-column: auto;
    min-width: 0;
  }
  .home-reference .header-account.authenticated .header-wallet {
    width: auto;
    min-width: 68px;
    min-height: 44px;
    padding: 5px 7px;
  }
  .home-reference .header-account.authenticated .header-wallet small { font-size: 6px; }
  .home-reference .header-account.authenticated .header-wallet b { font-size: 10px; }
  .home-reference .main-nav .account-picture-button { width: 50px; height: 50px; margin: 0; }
  .home-reference .page {
    width: min(100% - 24px, 760px);
    margin: 0 auto;
    padding: 16px 0 96px;
  }
  .home-reference.sidebar-collapsed .page {
    width: min(100% - 24px, 760px);
    margin-inline: auto;
    padding-inline: 0;
  }
  .home-reference .mobile-promo { min-height: 230px; padding: 26px; }
  .home-reference .mobile-promo > div { width: 58%; }
  .home-reference .mobile-promo h1 { font-size: 30px; }
  .home-reference .mobile-case-duo { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .home-reference .bottom-nav {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
  }
  .home-reference.sidebar-collapsed .bottom-nav {
    right: 12px;
    left: 12px;
    width: auto;
  }
}


@media (max-width: 600px) {
  .home-reference .main-nav { height: 74px; padding: 8px 12px !important; grid-template-columns: 54px minmax(0, 1fr) 48px; gap: 9px; }
  .home-reference .main-nav .brand,
  .home-reference .main-nav .brand img { width: 54px; height: 54px; }
  .home-reference .main-nav .account-picture-button { width: 46px; height: 46px; }
  .home-reference .header-account .login,
  .home-reference .header-account.authenticated .login { min-height: 45px; padding: 0 8px; font-size: 14px; }
  .home-reference .header-account.authenticated .login { font-size: 11px; }
  .home-reference .header-account.authenticated .header-wallet {
    min-width: 57px;
    min-height: 42px;
    padding-inline: 4px;
  }
  .home-reference .header-account.authenticated .header-wallet small { display: none; }
  .home-reference .header-account.authenticated .header-wallet b { margin: 0; font-size: 9px; }

  .home-reference .page { width: calc(100% - 24px); padding-top: 12px; }
  .home-reference .mobile-showcase { gap: 11px; }
  .home-reference .mobile-promo {
    min-height: 180px;
    padding: 20px 17px;
    border: 0;
    border-radius: 15px;
    box-shadow: none;
  }
  .home-reference .mobile-promo::before { background: linear-gradient(90deg, rgba(3, 10, 20, .9) 0 42%, rgba(7, 19, 29, .08) 82%); }
  .home-reference .mobile-promo > img { width: 68%; object-position: 62% center; opacity: .86; }
  .home-reference .mobile-promo > div { width: 64%; }
  .home-reference .mobile-promo h1 { max-width: 220px; font-size: clamp(23px, 7vw, 31px); line-height: 1.04; }
  .home-reference .mobile-promo p { max-width: 210px; margin-top: 7px; font-size: 12px; line-height: 1.28; }
  .home-reference .promo-row { width: 245px; max-width: 100%; margin-top: 13px; gap: 7px; }
  .home-reference .promo-row span,
  .home-reference .promo-row button { min-height: 36px; padding: 0 10px; border-radius: 9px; font-size: 10px; }
  .home-reference .promo-row button { min-width: 94px; }
  .home-reference .deposit-ribbon { min-height: 35px; gap: 9px; }
  .home-reference .deposit-ribbon span { font-size: 13px; }

  .home-reference .mobile-case-duo { gap: 8px !important; }
  .home-reference .mobile-case-duo .case-card { min-height: 198px !important; border-radius: 13px; }
  .home-reference .mobile-case-duo .case-open {
    min-height: 198px !important;
    padding: 7px 7px 9px !important;
    grid-template-rows: 125px 29px 29px !important;
    gap: 3px !important;
  }
  .home-reference .mobile-case-duo .case-art { min-height: 125px !important; }
  .home-reference .mobile-case-duo .case-art img { height: 125px !important; }
  .home-reference .mobile-case-duo .case-meta { min-height: 29px; }
  .home-reference .mobile-case-duo .case-meta b { font-size: 11px; }
  .home-reference .mobile-case-duo .case-open[data-paid-case] > em { padding: 6px 7px !important; border-radius: 7px; font-size: 13.5px !important; }
  .home-reference .bottom-nav { min-height: 58px; padding: 5px; border-radius: 13px; }
  .home-reference .bottom-nav a,
  .home-reference .bottom-nav button { padding: 0 5px; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-reference *, .home-reference *::before, .home-reference *::after { scroll-behavior: auto !important; }
}

/* Final header cleanup. Keep these rules last so legacy header styles cannot
   restore decorative lines or hide the account balances. */
@media (min-width: 981px) {
  .home-reference .main-nav {
    gap: 12px !important;
    padding: 14px 16px 18px !important;
    border: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
  }
  .home-reference .main-nav .brand {
    padding: 0 4px 7px !important;
    gap: 2px !important;
    border: 0 !important;
  }
  .home-reference .main-nav .main-tabs { gap: 2px !important; }
  .home-reference .main-nav .main-tabs > a { min-height: 38px !important; }
  .home-reference .header-account,
  .home-reference .header-account.authenticated {
    margin-top: 0 !important;
    padding: 0 !important;
    gap: 2px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .home-reference .header-account.authenticated {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .home-reference .header-account.authenticated .login {
    grid-column: 1 / -1 !important;
    min-height: 30px !important;
    height: 30px !important;
    padding: 0 4px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .home-reference .header-account.authenticated .header-wallet {
    display: flex !important;
    min-width: 0 !important;
    min-height: 34px !important;
    height: 34px !important;
    padding: 2px 3px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .home-reference .header-account.authenticated .header-wallet small { display: none !important; }
  .home-reference .header-account.authenticated .header-wallet b { font-size: 10px !important; }
  .home-reference .main-nav .account-picture-button {
    display: grid !important;
    width: 54px !important;
    height: 54px !important;
    margin: 2px auto 8px !important;
    overflow: hidden !important;
    border: 1px solid rgba(114, 255, 243, .22) !important;
    border-radius: 50% !important;
    background: rgba(5, 24, 34, .92) !important;
  }
  .home-reference .main-nav .account-picture-button img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: inherit !important;
  }

  .home-reference .sidebar-toggle {
    position: absolute !important;
    top: 14px !important;
    right: -38px !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 9px 9px 0 !important;
    background: rgba(5, 31, 42, .96) !important;
    box-shadow: 7px 5px 18px rgba(0, 0, 0, .25) !important;
  }
  .home-reference .sidebar-toggle span {
    width: auto !important;
    height: auto !important;
    display: block !important;
    border: 0 !important;
    color: #72fff3 !important;
    font: 800 25px/1 Arial, sans-serif !important;
    transform: translateY(-1px) !important;
    transition: transform .25s ease !important;
  }
  .home-reference.sidebar-collapsed .sidebar-toggle span {
    transform: translateY(-1px) rotate(180deg) !important;
  }
}

@media (max-width: 980px) {
  .home-reference .site-header,
  .home-reference .main-nav {
    border: 0 !important;
    box-shadow: none !important;
  }
  .home-reference .main-nav {
    height: 64px !important;
    min-height: 64px !important;
    padding: 7px 10px !important;
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 42px !important;
    gap: 8px !important;
  }
  .home-reference .main-nav .brand {
    display: grid !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    place-items: center !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .home-reference .main-nav .brand img,
  .home-reference .main-nav .brand span {
    display: block !important;
    width: 42px !important;
    height: 42px !important;
    object-fit: contain !important;
  }
  .home-reference .main-nav .brand strong { display: none !important; }
  .home-reference .main-nav .account-picture-button {
    display: grid !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    place-items: center !important;
    overflow: hidden !important;
    border: 1px solid rgba(114, 255, 243, .28) !important;
    border-radius: 50% !important;
    background: rgba(5, 24, 34, .92) !important;
    box-shadow: none !important;
  }
  .home-reference .main-nav .account-picture-button img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: inherit !important;
  }
  .home-reference .sidebar-toggle { display: none !important; }
  .home-reference .header-account,
  .home-reference .header-account.authenticated {
    width: 100% !important;
    min-width: 0 !important;
    height: 50px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    align-items: center !important;
    gap: 4px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .home-reference .header-account .login,
  .home-reference .header-account.authenticated .login {
    grid-column: 1 !important;
    min-width: 0 !important;
    min-height: 42px !important;
    height: 42px !important;
    padding: 0 6px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: left !important;
  }
  .home-reference .header-account.authenticated .header-wallet {
    display: flex !important;
    width: auto !important;
    min-width: 52px !important;
    min-height: 42px !important;
    height: 42px !important;
    padding: 4px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .home-reference .header-account.authenticated .header-wallet small { display: none !important; }
  .home-reference .header-account.authenticated .header-wallet b { font-size: 11px !important; }
}

/* Free-case showcase: keep the artwork and controls, remove the card shell. */
html body.home-reference #mobileFreeCases > article.free-case-card,
html body.home-reference #mobileFreeCases > article.free-case-card:hover,
html body.home-reference #mobileFreeCases > article.free-case-card:focus-within,
html body.home-reference .free-case-grid > article.free-case-card,
html body.home-reference .free-case-grid > article.free-case-card:hover,
html body.home-reference .free-case-grid > article.free-case-card:focus-within {
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body.home-reference #mobileFreeCases > article.free-case-card > .case-open,
html body.home-reference #mobileFreeCases > article.free-case-card > .case-open:hover,
html body.home-reference #mobileFreeCases > article.free-case-card > .case-open:focus-visible,
html body.home-reference .free-case-grid > article.free-case-card > .case-open,
html body.home-reference .free-case-grid > article.free-case-card > .case-open:hover,
html body.home-reference .free-case-grid > article.free-case-card > .case-open:focus-visible {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline-offset: 4px;
}

/* One frameless case layout for free, paid and admin-created sections. */
html body.home-reference #mobileFreeCases.case-grid,
html body.home-reference #cases.case-grid,
html body.home-reference #customCaseSections .case-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

html body.home-reference #mobileFreeCases > article.case-card,
html body.home-reference #cases > article.case-card,
html body.home-reference #customCaseSections .case-grid > article.case-card,
html body.home-reference #mobileFreeCases > article.case-card:hover,
html body.home-reference #cases > article.case-card:hover,
html body.home-reference #customCaseSections .case-grid > article.case-card:hover {
  min-height: 285px !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body.home-reference #mobileFreeCases > article.case-card > .case-open,
html body.home-reference #cases > article.case-card > .case-open,
html body.home-reference #customCaseSections .case-grid > article.case-card > .case-open {
  min-height: 285px !important;
  padding: 12px 14px 14px !important;
  grid-template-rows: 190px 36px 38px !important;
  gap: 4px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body.home-reference #mobileFreeCases .case-art,
html body.home-reference #cases .case-art,
html body.home-reference #customCaseSections .case-grid .case-art {
  min-height: 190px !important;
  height: 190px !important;
}

html body.home-reference #mobileFreeCases .case-art img,
html body.home-reference #cases .case-art img,
html body.home-reference #customCaseSections .case-grid .case-art img {
  width: 100% !important;
  height: 190px !important;
  max-height: none !important;
  object-fit: contain !important;
  transform: translateY(0) scale(1) !important;
}

html body.home-reference #mobileFreeCases .case-open > em,
html body.home-reference #cases .case-open > em,
html body.home-reference #customCaseSections .case-grid .case-open > em {
  border: 0 !important;
  box-shadow: none !important;
}

html body.home-reference #mobileFreeCases .free-case-card.is-locked .case-open > em {
  color: #aeb4bd !important;
  background: transparent !important;
}

@media (hover: hover) and (pointer: fine) {
  html body.home-reference #mobileFreeCases .case-card:hover .case-art img,
  html body.home-reference #cases .case-card:hover .case-art img,
  html body.home-reference #customCaseSections .case-grid .case-card:hover .case-art img {
    transform: translateY(-10px) scale(1.045) !important;
  }
}

@media (max-width: 760px) {
  html body.home-reference #mobileFreeCases.case-grid,
  html body.home-reference #cases.case-grid,
  html body.home-reference #customCaseSections .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  html body.home-reference #mobileFreeCases > article.case-card,
  html body.home-reference #cases > article.case-card,
  html body.home-reference #customCaseSections .case-grid > article.case-card,
  html body.home-reference #mobileFreeCases > article.case-card > .case-open,
  html body.home-reference #cases > article.case-card > .case-open,
  html body.home-reference #customCaseSections .case-grid > article.case-card > .case-open {
    min-height: 198px !important;
  }

  html body.home-reference #mobileFreeCases > article.case-card > .case-open,
  html body.home-reference #cases > article.case-card > .case-open,
  html body.home-reference #customCaseSections .case-grid > article.case-card > .case-open {
    padding: 7px 7px 9px !important;
    grid-template-rows: 125px 29px 29px !important;
    gap: 3px !important;
  }

  html body.home-reference #mobileFreeCases .case-art,
  html body.home-reference #mobileFreeCases .case-art img,
  html body.home-reference #cases .case-art,
  html body.home-reference #cases .case-art img,
  html body.home-reference #customCaseSections .case-grid .case-art,
  html body.home-reference #customCaseSections .case-grid .case-art img {
    min-height: 125px !important;
    height: 125px !important;
  }
}

/* Final storefront contract: every case source (free, paid, limited and
   admin-created) shares the same frameless dimensions. */
html body.home-reference .unified-case-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
  align-items: stretch !important;
}

html body.home-reference article.case-card.unified-case-card,
html body.home-reference article.case-card.unified-case-card:hover,
html body.home-reference article.case-card.unified-case-card:focus-within {
  min-height: 285px !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body.home-reference article.case-card.unified-case-card > .case-open,
html body.home-reference article.case-card.unified-case-card > .case-open:hover,
html body.home-reference article.case-card.unified-case-card > .case-open:focus-visible {
  min-height: 285px !important;
  padding: 12px 14px 14px !important;
  grid-template-rows: 190px 36px 38px !important;
  gap: 4px !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body.home-reference article.case-card.unified-case-card .case-art,
html body.home-reference article.case-card.unified-case-card .case-art img {
  min-height: 190px !important;
  height: 190px !important;
}

html body.home-reference article.case-card.unified-case-card .case-art img {
  width: 100% !important;
  max-height: none !important;
  object-fit: contain !important;
}

html body.home-reference article.case-card.unified-case-card .case-open > em {
  border: 0 !important;
  box-shadow: none !important;
}

html body.home-reference article.case-card.unified-case-card.free-case-card.is-locked .case-open > em {
  color: #aeb4bd !important;
  background: transparent !important;
}

@media (max-width: 760px) {
  html body.home-reference .unified-case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  html body.home-reference article.case-card.unified-case-card,
  html body.home-reference article.case-card.unified-case-card > .case-open {
    min-height: 198px !important;
  }

  html body.home-reference article.case-card.unified-case-card > .case-open {
    padding: 7px 7px 9px !important;
    grid-template-rows: 125px 29px 29px !important;
    gap: 3px !important;
  }

  html body.home-reference article.case-card.unified-case-card .case-art,
  html body.home-reference article.case-card.unified-case-card .case-art img {
    min-height: 125px !important;
    height: 125px !important;
  }
}

/* 2026-08-25: compact storefront layout.
   Five cases occupy a full desktop row; tablet and phone layouts remain
   bounded by the viewport. This block intentionally stays last in the file. */
@media (min-width: 1180px) {
  html body.home-reference #mobileFreeCases.unified-case-grid,
  html body.home-reference #cases.unified-case-grid,
  html body.home-reference #limitedCases.unified-case-grid,
  html body.home-reference #customCaseSections .unified-case-grid,
  html body.home-reference .unified-case-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: clamp(10px, .9vw, 16px) !important;
    align-items: start !important;
  }

  html body.home-reference article.case-card.unified-case-card,
  html body.home-reference article.case-card.unified-case-card > .case-open {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 338px !important;
  }

  html body.home-reference article.case-card.unified-case-card > .case-open {
    padding: 8px 6px 12px !important;
    grid-template-rows: 242px 36px 40px !important;
    gap: 5px !important;
  }

  html body.home-reference article.case-card.unified-case-card .case-art,
  html body.home-reference article.case-card.unified-case-card .case-art img {
    min-height: 242px !important;
    height: 242px !important;
  }
}

@media (min-width: 761px) and (max-width: 1179px) {
  html body.home-reference #mobileFreeCases.unified-case-grid,
  html body.home-reference #cases.unified-case-grid,
  html body.home-reference #limitedCases.unified-case-grid,
  html body.home-reference #customCaseSections .unified-case-grid,
  html body.home-reference .unified-case-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}

@media (max-width: 760px) {
  html body.home-reference #mobileFreeCases.unified-case-grid,
  html body.home-reference #cases.unified-case-grid,
  html body.home-reference #limitedCases.unified-case-grid,
  html body.home-reference #customCaseSections .unified-case-grid,
  html body.home-reference .unified-case-grid {
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  html body.home-reference article.case-card.unified-case-card,
  html body.home-reference article.case-card.unified-case-card > .case-open {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 218px !important;
  }

  html body.home-reference article.case-card.unified-case-card > .case-open {
    padding: 5px 3px 8px !important;
    grid-template-rows: 145px 30px 30px !important;
    gap: 3px !important;
  }

  html body.home-reference article.case-card.unified-case-card .case-art,
  html body.home-reference article.case-card.unified-case-card .case-art img {
    min-height: 145px !important;
    height: 145px !important;
  }
}

/* Price pills keep their compact text-sized geometry, with the turquoise fill
   softened by roughly twenty percent. */
html body.home-reference article.case-card.unified-case-card:not(.free-case-card) .case-open > em,
html body.home-reference article.case-card.unified-case-card:not(.free-case-card) .case-open > em.case-price-pill {
  background: linear-gradient(90deg, rgba(31, 207, 211, .80), rgba(63, 229, 137, .80)) !important;
}
