/* ==========================================================================
   Cheese SMP store — redesign layer (cheese-theme.css)
   Loaded after shared.css / light.css / the Tebex theme CSS.
   Remove the <link> to this file in head.twig to fall back to plain Mount.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root,
html[data-theme="light"] {
  --ch-bg: #FAF8F1;
  --ch-bg-2: #F3EFE2;
  --ch-surface: #FFFFFF;
  --ch-surface-2: #FFF9EA;
  --ch-surface-3: #FFF3D1;
  --ch-sidebar: #FFFDF7;
  --ch-glass: rgba(255, 255, 255, .78);
  --ch-border: rgba(58, 42, 18, .09);
  --ch-border-strong: rgba(58, 42, 18, .17);
  --ch-text: #2B2113;
  --ch-text-2: #6B5A44;
  --ch-muted: #9A8770;
  --ch-primary: #FFC800;
  --ch-primary-hover: #FFD53F;
  --ch-primary-edge: #C99600;
  --ch-on-primary: #2A1A05;
  --ch-tint: rgba(255, 200, 0, .14);
  --ch-tint-strong: rgba(255, 200, 0, .26);
  --ch-good: #1F9D55;
  --ch-bad: #E5484D;
  --ch-shadow-sm: 0 1px 2px rgba(40, 28, 10, .05);
  --ch-shadow: 0 1px 1px rgba(40, 28, 10, .04), 0 6px 18px -8px rgba(40, 28, 10, .14), 0 18px 40px -20px rgba(40, 28, 10, .12);
  --ch-shadow-lift: 0 2px 2px rgba(40, 28, 10, .05), 0 14px 30px -12px rgba(40, 28, 10, .22);
  --ch-inset: inset 0 1px 0 rgba(255, 255, 255, .7);
  --ch-hero-a: #FFF7DA;
  --ch-hero-b: #FFE9A3;
  --ch-hero-c: #FFD15C;

  /* Mount variables, re-pointed at the tokens above */
  --c-bg: var(--ch-bg);
  --c-sidebar: var(--ch-sidebar);
  --c-sidebar-rgb: 255, 253, 247;
  --c-sidebar-dark: var(--ch-surface-3);
  --c-sidebar-dark-hover: var(--ch-tint-strong);
  --c-block: var(--ch-surface);
  --c-block-border: var(--ch-border);
  --c-block-dark: var(--ch-surface-2);
  --c-block-dark-border: var(--ch-border);
  --c-block-inner: var(--ch-surface-2);
  --c-block-inner-hover: var(--ch-surface-3);
  --c-text: var(--ch-text-2);
  --c-text-highlighted: var(--ch-text);
  --c-text-light: var(--ch-text);

  --ch-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ch-display: "Fredoka", "Inter", ui-sans-serif, sans-serif;
  --ch-radius: 16px;
  --ch-radius-sm: 10px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --ch-bg: #12100B;
  --ch-bg-2: #17140E;
  --ch-surface: #1C1912;
  --ch-surface-2: #231F16;
  --ch-surface-3: #2D271A;
  --ch-sidebar: #15130D;
  --ch-glass: rgba(28, 25, 18, .78);
  --ch-border: rgba(255, 226, 150, .08);
  --ch-border-strong: rgba(255, 226, 150, .16);
  --ch-text: #F6EEDB;
  --ch-text-2: #C9B996;
  --ch-muted: #8E8064;
  --ch-tint: rgba(255, 200, 0, .09);
  --ch-tint-strong: rgba(255, 200, 0, .18);
  --ch-good: #3CCB7F;
  --ch-bad: #FF6369;
  --ch-shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --ch-shadow: 0 1px 1px rgba(0, 0, 0, .25), 0 10px 28px -14px rgba(0, 0, 0, .7);
  --ch-shadow-lift: 0 2px 2px rgba(0, 0, 0, .3), 0 18px 36px -14px rgba(0, 0, 0, .8);
  --ch-inset: inset 0 1px 0 rgba(255, 240, 200, .05);
  --ch-hero-a: #2A2311;
  --ch-hero-b: #221C0E;
  --ch-hero-c: #3A2C09;
  --c-sidebar-rgb: 21, 19, 13;
  color-scheme: dark;
}

/* smooth colour change only while switching theme (never on page load) */
html.ch-theme-anim *,
html.ch-theme-anim *::before,
html.ch-theme-anim *::after {
  transition: background-color .3s ease, border-color .3s ease, color .2s ease, box-shadow .3s ease !important;
}

/* ---------- 2. Base ---------- */
html { scrollbar-color: var(--ch-border-strong) var(--ch-bg); }
body.ch-redesign {
  font-family: var(--ch-font);
  color: var(--ch-text-2);
  background: var(--ch-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.ch-redesign .layout-content {
  background:
    radial-gradient(1200px 500px at 70% -200px, var(--ch-tint), transparent 70%),
    var(--ch-bg);
}
.ch-redesign h1, .ch-redesign h2, .ch-redesign h3, .ch-redesign h4 { color: var(--ch-text); }
.ch-redesign a { color: inherit; }
.ch-redesign ::selection { background: var(--ch-primary); color: var(--ch-on-primary); }
.ch-redesign :focus-visible { outline: 2px solid var(--ch-primary-edge); outline-offset: 2px; border-radius: 6px; }

.ch-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ch-cap { text-transform: capitalize; }
.ch-muted { color: var(--ch-muted); font-size: 13px; }
.ch-skip {
  position: fixed; left: 12px; top: -60px; z-index: 1000;
  background: var(--ch-primary); color: var(--ch-on-primary) !important;
  padding: 10px 14px; border-radius: 8px; font-weight: 700; text-decoration: none;
}
.ch-skip:focus { top: 12px; }

.ch-redesign .site > * { min-width: 0; max-width: 100%; }
.ch-redesign .layout-content { min-width: 0; }
.ch-redesign .site {
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 32px;
  padding-bottom: 24px;
  gap: 40px;
}

/* ---------- 3. Buttons ---------- */
.ch-redesign .button {
  font-family: var(--ch-display);
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  font-size: 14px;
  height: 46px;
  border-radius: 7px;
  gap: 8px;
  text-decoration: none;
  position: relative;
  transition: transform .12s ease, box-shadow .12s ease, background-color .15s ease, color .15s ease;
}
.ch-redesign .button .il { margin-right: 0; }
.ch-redesign .button .ir { margin-left: 0; }
.ch-redesign .button-primary,
.ch-redesign .ch-btn:not(.ch-btn-ghost) {
  background: var(--ch-primary);
  color: var(--ch-on-primary) !important;
  border: 1px solid var(--ch-primary-edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 3px 0 var(--ch-primary-edge), 0 8px 16px -8px rgba(80, 55, 0, .45);
}
.ch-redesign .button-primary:hover,
.ch-redesign .ch-btn:not(.ch-btn-ghost):hover {
  background: var(--ch-primary-hover);
  color: var(--ch-on-primary) !important;
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 4px 0 var(--ch-primary-edge), 0 12px 20px -10px rgba(80, 55, 0, .5);
}
.ch-redesign .button-primary:active,
.ch-redesign .ch-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 1px 0 var(--ch-primary-edge) !important;
}
.ch-redesign .ch-btn-ghost,
.ch-redesign .button-added,
.ch-redesign .button-inner {
  background: var(--ch-surface);
  color: var(--ch-text) !important;
  border: 1px solid var(--ch-border-strong);
  box-shadow: var(--ch-inset), 0 3px 0 var(--ch-border-strong);
}
.ch-redesign .ch-btn-ghost:hover,
.ch-redesign .button-added:hover,
.ch-redesign .button-inner:hover {
  background: var(--ch-surface-2);
  transform: translateY(-1px);
  box-shadow: var(--ch-inset), 0 4px 0 var(--ch-border-strong);
}
.ch-redesign .button-added i { color: var(--ch-good); }
.ch-redesign .ch-btn-sm { height: 40px; font-size: 13px; padding: 0 18px; width: auto; }
.ch-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: none;
  border-radius: 9px;
  border: 1px solid var(--ch-border);
  background: var(--ch-surface-2);
  color: var(--ch-text-2) !important;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s, color .15s;
}
.ch-icon-btn:hover { background: var(--ch-surface-3); color: var(--ch-text) !important; }
.ch-redesign .logout-button.ch-icon-btn { line-height: 1; font-size: 13px; }
.ch-redesign .logout-button.ch-icon-btn:hover { background: var(--ch-bad); color: #fff !important; border-color: transparent; }

/* ---------- 4. Sidebar ---------- */
.ch-redesign .layout-sidebar {
  background: var(--ch-sidebar);
  border-right: 1px solid var(--ch-border);
  padding: 22px 18px 18px;
  max-width: 290px;
  width: 290px;
  color: var(--ch-text);
}
.ch-redesign .sidebar-header { margin-bottom: 18px; }
.ch-redesign .sidebar-logo { max-width: 78%; margin-bottom: 0; }
.ch-redesign .sidebar-logo img { max-height: 88px; filter: drop-shadow(0 6px 10px rgba(80, 55, 0, .18)); }
.ch-redesign .sidebar-content {
  padding: 0 2px 18px; margin: 0 -2px;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent);
}

.ch-nav-label {
  font-family: var(--ch-font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ch-muted);
  margin: 16px 10px 8px;
}
.ch-nav .ch-nav-label:first-child { margin-top: 4px; }
.ch-redesign .ch-nav .navbar-menu { gap: 4px; }
.ch-redesign .ch-nav .navbar-item { display: block; }
.ch-redesign .ch-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 10px;
  border-radius: 12px;
  color: var(--ch-text) !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  transition: background-color .15s ease, transform .15s ease;
}
.ch-redesign .ch-nav-link:hover { background: var(--ch-surface-2); }
/* neutralise Mount's sidebar hover effects (underline bar, yellow icon tile) */
.ch-redesign .ch-nav .navbar-main::after { display: none !important; }
.ch-redesign .ch-nav .navbar-square:hover { background: var(--ch-surface); }
.ch-redesign .ch-nav-link:hover .navbar-square { border-color: var(--ch-border-strong); }
.ch-redesign .ch-nav .navbar-square i,
.ch-redesign .ch-nav .navbar-square img { transition: transform .2s ease; }
.ch-redesign .ch-nav .navbar-square:hover i,
.ch-redesign .ch-nav .navbar-square:hover img.navbar-category-img { transform: none; }
.ch-redesign .ch-nav-link:hover .navbar-square i,
.ch-redesign .ch-nav-link:hover .navbar-square img { transform: scale(1.12) rotate(-4deg); }
.ch-redesign .ch-nav-link.is-active { background: var(--ch-tint-strong); }
.ch-redesign .ch-nav-link .navbar-square {
  width: 34px; height: 34px;
  flex: none;
  border-radius: 10px;
  background: var(--ch-surface);
  border: 1px solid var(--ch-border);
  box-shadow: var(--ch-shadow-sm);
  color: var(--ch-text-2);
  font-size: 14px;
}
.ch-redesign .ch-nav-link.is-active .navbar-square { border-color: var(--ch-border-strong); color: var(--ch-text); }
.ch-redesign .ch-nav-link .navbar-category-img { width: 24px; height: 24px; object-fit: contain; border-radius: 4px; image-rendering: pixelated; }
.ch-redesign .ch-nav-link .navbar-main {
  height: auto; padding: 0; font-size: inherit; font-weight: inherit;
  flex: 1; display: flex; align-items: center; justify-content: space-between;
  background: none;
}
.ch-redesign .ch-nav .navbar-content { background: none; }
.ch-redesign .navbar-submenu { padding-left: 46px; }
.ch-redesign .navbar-submenu li a { color: var(--ch-text-2); border-radius: 8px; }
.ch-redesign .navbar-submenu li a:hover { background: var(--ch-surface-2); color: var(--ch-text); }
.ch-redesign .navbar-submenu-toggle { color: var(--ch-muted); }

/* featured card (Tebex "featured package" module) */
.ch-sidebar-featured { margin-top: 16px; }
.ch-featured.widget { background: none; padding: 0; border: 0; margin: 0; }
.ch-featured-card {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--ch-text) !important;
  border: 1px solid var(--ch-border-strong);
  background:
    linear-gradient(140deg, var(--ch-tint-strong), transparent 70%),
    var(--ch-surface);
  box-shadow: var(--ch-shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ch-featured-card:hover { transform: translateY(-2px); box-shadow: var(--ch-shadow-lift); }
.ch-featured-top {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ch-primary-edge);
  margin-bottom: 8px;
}
html[data-theme="dark"] .ch-featured-top { color: var(--ch-primary); }
.ch-featured-top i { transition: transform .15s ease; }
.ch-featured-card:hover .ch-featured-top i { transform: translateX(3px); }
.ch-featured-body { display: flex; align-items: center; gap: 12px; }
.ch-featured-body img { width: 46px; height: 46px; object-fit: contain; image-rendering: pixelated; flex: none; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .15)); }
.ch-featured-name { font-family: var(--ch-display); font-weight: 600; font-size: 14px; line-height: 1.2; color: var(--ch-text); }
.ch-featured-price { margin-top: 3px; font-size: 13px; color: var(--ch-text-2); display: flex; gap: 6px; align-items: baseline; }
.ch-featured-price del { color: var(--ch-muted); }
.ch-featured-price b { color: var(--ch-text); }

/* skin dock + account card */
.ch-redesign .sidebar-footer { position: relative; padding-top: 6px; }
.ch-skin-dock { position: relative; height: 128px; pointer-events: none; }
.ch-skin {
  position: absolute;
  left: 4px;
  bottom: -40px;
  width: 136px;
  height: 172px;
  pointer-events: auto;
  cursor: pointer;
  z-index: 1;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s ease, transform .5s ease;
}
.ch-skin.is-ready, .ch-skin-peek.is-ready { opacity: 1; transform: none; }
@media (max-height: 780px) {
  .ch-redesign .layout-sidebar { padding-top: 14px; }
  .ch-redesign .sidebar-header { margin-bottom: 8px; }
  .ch-redesign .ch-nav-link { padding: 5px 10px; }
  .ch-redesign .ch-nav-link .navbar-square { width: 30px; height: 30px; }
  .ch-nav-label { margin: 10px 10px 6px; }
  .ch-sidebar-featured { margin-top: 10px; }
  .ch-redesign .ch-user-block { padding: 10px; gap: 8px; }
  .ch-redesign .ch-user-block .button { height: 42px; }
  .ch-skin-dock { height: 92px; }
  .ch-skin { width: 104px; height: 132px; bottom: -32px; }
  .ch-skin-bubble { left: 70px; }
  .ch-redesign .sidebar-logo img { max-height: 70px; }
}
.ch-skin-canvas { width: 100% !important; height: 100% !important; display: block; }
.ch-skin-fallback { width: 100%; height: 100%; object-fit: contain; object-position: bottom; image-rendering: pixelated; }
.ch-skin-bubble {
  position: absolute;
  left: 88px;
  top: 6px;
  white-space: nowrap;
  background: var(--ch-surface);
  color: var(--ch-text);
  border: 1px solid var(--ch-border-strong);
  box-shadow: var(--ch-shadow);
  font-family: var(--ch-display);
  font-weight: 600;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 10px 10px 10px 2px;
  opacity: 0;
  transform: translateY(6px) scale(.96);
  transform-origin: bottom left;
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.ch-skin-bubble.is-on { opacity: 1; transform: none; }
.ch-redesign .ch-user-block {
  position: relative;
  z-index: 2;
  padding: 12px;
  border-radius: 16px;
  background: var(--ch-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--ch-border);
  box-shadow: var(--ch-shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ch-account {
  display: flex; align-items: center; gap: 11px;
  padding: 8px;
  border-radius: 12px;
  background: var(--ch-surface);
  border: 1px solid var(--ch-border);
  text-decoration: none;
  color: var(--ch-text) !important;
  min-width: 0;
}
a.ch-account { transition: background-color .15s ease; }
a.ch-account:hover { background: var(--ch-surface-2); }
.ch-redesign .ch-account-avatar { width: 40px; height: 40px; border-radius: 9px; image-rendering: pixelated; flex: none; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.ch-account-text { min-width: 0; flex: 1; text-align: left; }
.ch-redesign .ch-account-name { font-weight: 700; font-size: 14.5px; color: var(--ch-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-account-sub { font-size: 12px; color: var(--ch-muted); display: flex; gap: 5px; align-items: center; }
.ch-account-sub i { font-size: 10px; }
.ch-account-chev { color: var(--ch-muted); font-size: 12px; margin-right: 4px; }
.ch-creator { display: flex; gap: 6px; align-items: center; margin: 0; }
.ch-redesign .creator-code-field {
  flex: 1; height: 38px; min-width: 0;
  border-radius: 9px;
  background: var(--ch-surface);
  border: 1px solid var(--ch-border);
  color: var(--ch-text);
  padding: 0 12px;
  font-family: var(--ch-font);
  font-size: 13px;
}
.ch-redesign .creator-code-field::placeholder { color: var(--ch-muted); }
.ch-redesign .creator-code-field:focus { outline: none; border-color: var(--ch-primary-edge); box-shadow: 0 0 0 3px var(--ch-tint-strong); }
.ch-redesign .creator-code-add {
  width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--ch-primary-edge);
  background: var(--ch-primary); color: var(--ch-on-primary) !important; cursor: pointer; flex: none;
}
.ch-redesign .creator-code-current {
  flex: 1; height: 38px; display: flex; align-items: center; padding: 0 12px; gap: 6px;
  border-radius: 9px; background: var(--ch-tint); color: var(--ch-text); font-weight: 600; font-size: 13px;
}
.ch-cart-btn { position: relative; }
.ch-cart-count {
  min-width: 22px; height: 22px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--ch-on-primary); color: var(--ch-primary);
  font-family: var(--ch-font); font-size: 12px; font-weight: 800;
}

/* ---------- 5. Top bar (mobile header / non-desktop) ---------- */
@media (min-width: 1101px) {
  .ch-redesign .header-block { display: none; }
}
.ch-redesign .mobile-header {
  background: rgba(var(--c-sidebar-rgb), .86);
  border-bottom: 1px solid var(--ch-border);
  padding: 10px 0;
}
.ch-topbar { flex-wrap: nowrap; }
.ch-topbar .toggle-sidebar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--ch-surface); border: 1px solid var(--ch-border);
  color: var(--ch-text) !important; cursor: pointer;
}
.ch-topbar-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ch-topbar-logo img { height: 32px; width: auto; display: block; }
.ch-topbar-info { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-redesign .ch-topbar-dc {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px;
  border-radius: 9px; background: var(--ch-surface); border: 1px solid var(--ch-border);
  color: var(--ch-text) !important; font-weight: 700; font-size: 13px; text-decoration: none;
}
.ch-redesign .ch-topbar-dc i { color: #5865F2; }
.ch-theme-cycle .ch-ico-dark { display: none; }
html[data-theme="dark"] .ch-theme-cycle .ch-ico-dark { display: inline; }
html[data-theme="dark"] .ch-theme-cycle .ch-ico-light { display: none; }
.ch-status.widget { background: none; padding: 0; border: 0; margin: 0; }
.ch-modal-theme { margin-top: 18px; padding: 0 10px; }
.ch-redesign .sidebar-modal { background: var(--ch-sidebar); }
.ch-redesign .sidebar-modal-overlay.active { background: rgba(10, 8, 4, .45); }

/* ---------- 6. Pills ---------- */
.ch-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.ch-pill {
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--ch-border);
  background: var(--ch-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ch-text-2) !important;
  font-family: var(--ch-font);
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--ch-shadow-sm);
  transition: transform .15s ease, background-color .15s ease;
}
.ch-pill:hover { transform: translateY(-1px); background: var(--ch-surface); }
.ch-pill b { color: var(--ch-text); font-weight: 700; }
.ch-pill-sm { height: 34px; padding: 0 10px; gap: 6px; font-size: 13px; border-radius: 9px; }
.ch-pill-sep { width: 1px; align-self: stretch; margin: 10px 0; background: var(--ch-border-strong); }
.ch-pill-action { display: inline-flex; gap: 6px; align-items: center; color: var(--ch-muted); }
.ch-pill.is-copied .ch-pill-action { color: var(--ch-good); }
.ch-pill-dc i { color: #5865F2; font-size: 16px; }
.ch-pill-dc b:first-of-type { color: #5865F2; }
.ch-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ch-good); flex: none;
  box-shadow: 0 0 0 0 rgba(31, 157, 85, .55);
  animation: ch-pulse 2s infinite;
}
.is-offline .ch-dot { background: var(--ch-bad); animation: none; }
@keyframes ch-pulse {
  0% { box-shadow: 0 0 0 0 rgba(31, 157, 85, .5); }
  70% { box-shadow: 0 0 0 7px rgba(31, 157, 85, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 157, 85, 0); }
}
@media (max-width: 480px) { .ch-hide-xs { display: none; } }

/* ---------- 7. Hero ---------- */
.ch-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  align-items: center;
  gap: 24px;
  padding: 44px 48px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--ch-border-strong);
  background:
    radial-gradient(600px 300px at 85% 30%, rgba(255, 255, 255, .55), transparent 70%),
    linear-gradient(135deg, var(--ch-hero-a) 0%, var(--ch-hero-b) 55%, var(--ch-hero-c) 100%);
  box-shadow: var(--ch-shadow);
  isolation: isolate;
}
html[data-theme="dark"] .ch-hero {
  background:
    radial-gradient(600px 300px at 85% 30%, rgba(255, 200, 0, .14), transparent 70%),
    linear-gradient(135deg, var(--ch-hero-a) 0%, var(--ch-hero-b) 55%, var(--ch-hero-c) 100%);
}
.ch-hero-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 80, 0, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 80, 0, .06) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
  mask-image: linear-gradient(90deg, transparent, #000 60%);
}
html[data-theme="dark"] .ch-hero-bg {
  background-image:
    linear-gradient(rgba(255, 210, 90, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 210, 90, .05) 1px, transparent 1px);
}
.ch-hero-bg span {
  position: absolute; display: block;
  width: 22px; height: 22px;
  background: var(--ch-primary);
  box-shadow: inset -4px -4px 0 rgba(0, 0, 0, .14), inset 4px 4px 0 rgba(255, 255, 255, .35);
  opacity: .55;
  animation: ch-float 9s ease-in-out infinite;
}
.ch-hero-bg span:nth-child(1) { right: 8%; top: 14%; }
.ch-hero-bg span:nth-child(2) { right: 40%; bottom: 12%; width: 14px; height: 14px; animation-delay: -3s; }
.ch-hero-bg span:nth-child(3) { right: 26%; top: 8%; width: 10px; height: 10px; animation-delay: -6s; }
@keyframes ch-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(12deg); }
}
.ch-eyebrow {
  font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: #B7741A;
}
html[data-theme="dark"] .ch-eyebrow { color: var(--ch-primary); }
.ch-hero-title {
  font-family: var(--ch-display);
  font-weight: 700;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.06;
  letter-spacing: -.01em;
  margin: 10px 0 12px;
  color: var(--ch-text);
}
.ch-hero-title span {
  background: linear-gradient(transparent 62%, rgba(255, 200, 0, .55) 62%);
  padding: 0 .08em;
}
html[data-theme="dark"] .ch-hero-title span { color: var(--ch-primary); background: none; }
.ch-hero-sub { font-size: 16px; line-height: 1.55; color: var(--ch-text-2); max-width: 520px; margin: 0; }
.ch-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.ch-hero-actions .button { width: auto; padding: 0 22px; }
.ch-hero-art { display: flex; justify-content: center; align-items: center; }
.ch-hero-logo {
  width: 100%;
  max-width: 330px;
  height: auto;
  filter: drop-shadow(0 18px 24px rgba(80, 50, 0, .28));
  animation: ch-bob 6s ease-in-out infinite;
  image-rendering: pixelated;
}
@keyframes ch-bob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-10px) rotate(1.5deg); } }

/* ---------- 8. Sections ---------- */
.ch-section { min-width: 0; }
.ch-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ch-section-head h2 {
  font-family: var(--ch-display);
  font-weight: 700;
  font-size: 24px;
  margin: 0;
  color: var(--ch-text);
}
.ch-live { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ch-good); font-weight: 600; }
#browse { scroll-margin-top: 24px; }

/* ---------- 9. Browse cards ---------- */
.ch-browse { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
@media (min-width: 1360px) {
  .ch-browse { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ch-cat--ranks { grid-column: span 2; }
}
.ch-cat {
  --cat: #FFC800;
  position: relative;
  display: flex; flex-direction: column; gap: 18px;
  padding: 24px;
  border-radius: var(--ch-radius);
  background: var(--ch-surface);
  border: 1px solid var(--ch-border);
  box-shadow: var(--ch-shadow), var(--ch-inset);
  text-decoration: none;
  color: var(--ch-text-2) !important;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.ch-cat::before {
  content: ""; position: absolute; left: 0; top: 24px; bottom: 24px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--cat); opacity: 0; transition: opacity .2s ease;
}
.ch-cat:hover { transform: translateY(-3px); box-shadow: var(--ch-shadow-lift); border-color: color-mix(in srgb, var(--cat) 35%, transparent); }
.ch-cat:hover::before { opacity: 1; }
.ch-cat--ranks { --cat: #FFC800; background: linear-gradient(160deg, rgba(255, 200, 0, .16), var(--ch-surface) 62%); border-color: rgba(255, 200, 0, .35); }
.ch-cat--keys { --cat: #C26BFF; }
.ch-cat--cheese-plus { --cat: #FF4FA3; }
.ch-cat--shards { --cat: #8B6CFF; }
.ch-cat--keyalls { --cat: #FF8A3D; }
.ch-cat-top { display: flex; align-items: center; gap: 16px; }
.ch-cat-icon {
  width: 60px; height: 60px; flex: none;
  display: grid; place-items: center;
  border-radius: 16px;
  background: color-mix(in srgb, var(--cat) 14%, var(--ch-surface));
  border: 1px solid color-mix(in srgb, var(--cat) 30%, transparent);
}
.ch-cat-icon img { width: 40px; height: 40px; object-fit: contain; image-rendering: pixelated; transition: transform .25s ease; }
.ch-cat:hover .ch-cat-icon img { transform: scale(1.12) rotate(-4deg); }
.ch-cat-text { min-width: 0; flex: 1; }
.ch-cat-text h3 { font-family: var(--ch-display); font-weight: 700; font-size: 22px; margin: 0 0 3px; color: var(--ch-text); }
.ch-cat-text p { margin: 0; font-size: 14px; color: var(--ch-text-2); }
.ch-cat:has(.ch-cat-badge:not([hidden])) .ch-cat-text h3 { padding-right: 104px; }
.ch-cat-badge {
  position: absolute; top: 18px; right: 18px;
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--cat) 16%, transparent);
  color: color-mix(in srgb, var(--cat) 75%, var(--ch-text));
  white-space: nowrap;
}
.ch-chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 30px; }
.ch-chip {
  height: 30px; padding: 0 12px; display: inline-flex; align-items: center;
  border-radius: 999px; border: 1px solid var(--ch-border-strong);
  background: var(--ch-surface); color: var(--ch-text);
  font-size: 13px; font-weight: 600;
  animation: ch-in .35s ease backwards;
}
.ch-chip-more { align-self: center; font-size: 13px; font-weight: 700; color: var(--ch-good); }
.ch-cat-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ch-from { display: flex; align-items: baseline; gap: 6px; min-height: 26px; font-size: 14px; }
.ch-from-lbl { color: var(--ch-muted); }
.ch-from del { color: var(--ch-muted); font-size: 14px; }
.ch-from b { font-family: var(--ch-display); font-size: 22px; font-weight: 700; color: var(--ch-text); }
.ch-cat .ch-btn-sm { pointer-events: none; }
.ch-cat:hover .ch-btn-sm { background: var(--ch-primary-hover); }

/* ---------- 10. Community ---------- */
.ch-community {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(260px, 1fr);
  gap: 24px;
  padding: 28px;
  margin: 0 -28px;
  border-radius: 24px;
  background: var(--ch-bg-2);
  border: 1px solid var(--ch-border);
}
.ch-recent.widget, .ch-top.widget { background: none; padding: 0; border: 0; margin: 0; }
.ch-recent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ch-recent-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--ch-surface);
  border: 1px solid var(--ch-border);
  box-shadow: var(--ch-shadow-sm);
  min-width: 0;
  animation: ch-in .4s ease backwards;
  animation-delay: calc(var(--i, 0) * 50ms);
}
.ch-recent-row:last-child:nth-child(odd) { grid-column: 1 / -1; }
.ch-recent-avatar { width: 40px; height: 40px; border-radius: 9px; image-rendering: pixelated; flex: none; }
.ch-recent-info { min-width: 0; flex: 1; }
.ch-recent-name { font-weight: 700; color: var(--ch-text); font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-recent-meta { font-size: 13px; color: var(--ch-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-recent-sep { margin: 0 4px; }
.ch-recent-time { font-size: 12px; color: var(--ch-muted); white-space: nowrap; }
.ch-empty {
  display: flex; align-items: center; gap: 14px;
  padding: 18px;
  border-radius: 14px;
  background: var(--ch-surface);
  border: 1px dashed var(--ch-border-strong);
  color: var(--ch-text-2);
}
.ch-empty i { font-size: 26px; color: var(--ch-primary); }
.ch-empty b { display: block; color: var(--ch-text); font-size: 15px; }
.ch-empty span { font-size: 13px; }
.ch-community-side { display: flex; flex-direction: column; }
.ch-community-side > .ch-top-card, .ch-community-side > .widget { flex: 1; }
.ch-top.widget { display: flex; }
.ch-top.widget > .ch-top-card { flex: 1; }
.ch-top-card {
  display: flex; align-items: center; gap: 18px;
  min-height: 190px;
  padding: 18px 22px;
  border-radius: 16px;
  background:
    radial-gradient(220px 160px at 25% 60%, var(--ch-tint-strong), transparent 70%),
    var(--ch-surface);
  border: 1px solid var(--ch-border);
  box-shadow: var(--ch-shadow);
}
.ch-top-render { flex: none; width: 92px; display: flex; justify-content: center; }
.ch-top-render img { height: 150px; width: auto; image-rendering: pixelated; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .25)); animation: ch-bob 5s ease-in-out infinite; }
.ch-top-card.is-empty .ch-top-render img { filter: grayscale(1) brightness(.35) drop-shadow(0 10px 12px rgba(0, 0, 0, .2)); opacity: .55; animation: none; }
.ch-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  background: var(--ch-tint-strong); color: #9A6400;
}
html[data-theme="dark"] .ch-badge { color: var(--ch-primary); }
.ch-top-name { font-family: var(--ch-display); font-weight: 700; font-size: 24px; color: var(--ch-text); margin: 8px 0 4px; word-break: break-word; }
.ch-top-info p { margin: 0; font-size: 14px; color: var(--ch-text-2); line-height: 1.45; }
.ch-top-info strong { color: var(--ch-text); }

/* ---------- 11. Goals, text blocks ---------- */
.ch-goals:empty { display: none; }
.ch-goals { display: grid; gap: 18px; }
.ch-redesign .widget-community-goal,
.ch-redesign .widget-goal {
  padding: 22px 24px;
  border-radius: var(--ch-radius);
  background: var(--ch-surface);
  border: 1px solid var(--ch-border);
  box-shadow: var(--ch-shadow);
  color: var(--ch-text-2);
}
.ch-redesign .widget-community-goal .widget-title,
.ch-redesign .widget-goal .widget-title {
  font-family: var(--ch-display); font-weight: 700; font-size: 20px; color: var(--ch-text); text-align: left; margin: 0 0 8px;
}
.ch-redesign .widget-community-goal .goal-image { max-height: 64px; float: right; margin-left: 16px; image-rendering: pixelated; }
.ch-redesign .widget-community-goal .descr { font-size: 14px; line-height: 1.55; margin-bottom: 14px; }
.ch-redesign .widget .progress {
  height: 12px; border-radius: 999px; overflow: hidden;
  background: var(--ch-surface-3);
  border: 1px solid var(--ch-border);
}
.ch-redesign .widget .progress-bar {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #FFB800, var(--ch-primary));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
  background-size: 28px 28px;
}
.ch-redesign .widget .progress-bar.striped {
  background-image: linear-gradient(45deg, rgba(255, 255, 255, .25) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .25) 50%, rgba(255, 255, 255, .25) 75%, transparent 75%), linear-gradient(90deg, #FFB800, var(--ch-primary));
  background-size: 28px 28px, 100% 100%;
}
.ch-redesign .widget .progress-bar.animated { animation: ch-stripes 1s linear infinite; }
@keyframes ch-stripes { to { background-position: 28px 0, 0 0; } }
.ch-redesign .widget-community-goal p, .ch-redesign .widget-goal p { margin: 10px 0 0; font-size: 13px; }
.ch-redesign .widget-community-goal, .ch-redesign .widget-community-goal *, .ch-redesign .widget-goal, .ch-redesign .widget-goal * { text-align: left; }

.ch-redesign .text-block {
  padding: 26px 28px;
  border-radius: var(--ch-radius);
  background: var(--ch-surface);
  border: 1px solid var(--ch-border);
  box-shadow: var(--ch-shadow);
  color: var(--ch-text-2);
  font-size: 15px;
  line-height: 1.65;
}
.ch-redesign .text-block h1, .ch-redesign .text-block h2, .ch-redesign .text-block h3 { font-family: var(--ch-display); color: var(--ch-text); }
.ch-redesign .text-block strong, .ch-redesign .text-block b { color: var(--ch-text); }
.ch-redesign .text-block a { color: #B7741A; }
html[data-theme="dark"] .text-block a { color: var(--ch-primary); }

/* ---------- 12. Category page header ---------- */
.ch-page-head {
  display: flex; align-items: center; gap: 20px;
  padding: 28px 32px;
  border-radius: 22px;
  border: 1px solid var(--ch-border-strong);
  background:
    linear-gradient(120deg, var(--ch-hero-a), var(--ch-hero-b) 60%, var(--ch-hero-c));
  box-shadow: var(--ch-shadow);
  position: relative;
  overflow: hidden;
}
.ch-page-head::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 80, 0, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 80, 0, .06) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000);
  mask-image: linear-gradient(90deg, transparent 30%, #000);
}
.ch-page-head-icon {
  width: 68px; height: 68px; flex: none; display: grid; place-items: center;
  border-radius: 18px; background: var(--ch-glass); border: 1px solid var(--ch-border);
  box-shadow: var(--ch-shadow-sm);
}
.ch-page-head-icon img { width: 46px; height: 46px; object-fit: contain; image-rendering: pixelated; }
.ch-page-head-text { position: relative; z-index: 1; }
.ch-page-head h1 { font-family: var(--ch-display); font-weight: 700; font-size: clamp(28px, 3vw, 38px); margin: 0; color: var(--ch-text); }
.ch-page-head p { margin: 6px 0 0; color: var(--ch-text-2); font-size: 15px; max-width: 640px; }
.ch-redesign .block-warning { border-radius: 12px; }

/* ---------- 13. Package cards (Mount markup, restyled) ---------- */
.ch-redesign .store-package-grid { gap: 18px; }
.ch-redesign .store-package-item { margin-top: 0; }
.ch-redesign .store-package-item > .block {
  height: 100%;
  padding: 18px;
  border-radius: var(--ch-radius);
  background: var(--ch-surface);
  border: 1px solid var(--ch-border);
  box-shadow: var(--ch-shadow), var(--ch-inset);
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.ch-redesign .store-package-item:hover > .block {
  transform: translateY(-3px);
  box-shadow: var(--ch-shadow-lift);
  border-color: rgba(255, 200, 0, .45);
}
.ch-redesign .store-package-item .product-actions { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.ch-redesign .store-package-item .product-actions > .row { min-height: 26px; }
.ch-redesign .package-img {
  display: grid; place-items: center;
  margin: 2px auto 10px;
  padding: 10px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 60%, var(--ch-tint-strong), transparent 70%);
  width: 100%;
}
.ch-redesign .package-img img { max-height: 120px; width: auto; max-width: 100%; object-fit: contain; image-rendering: pixelated; transition: transform .25s ease; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .18)); }
.ch-redesign .store-package-item:hover .package-img img { transform: scale(1.07) translateY(-2px); }
.ch-redesign .package-name { font-family: var(--ch-display); font-weight: 600; font-size: 17px; color: var(--ch-text); line-height: 1.2; }
.ch-redesign .package-price { font-size: 15px; font-weight: 700; color: var(--ch-text); margin-bottom: 6px; text-transform: none; }
.ch-redesign .package-original-price { color: var(--ch-muted); font-weight: 500; margin-right: 4px; }
/* discount + popular tags float on the card corners (no layout shift) */
.ch-redesign .store-package-item > .block { position: relative; }
.ch-redesign .store-package-item .product-actions > .row { min-height: 0; margin: 0; }
.ch-redesign .store-package-item .product-actions > .row > .col-auto { margin: 0 !important; padding: 0; }
.ch-redesign .package-discount {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  height: auto; line-height: 1; width: auto;
  padding: 6px 10px 6px 9px;
  border-radius: 8px;
  background: linear-gradient(180deg, #FF5A5F, #E0353B);
  color: #fff;
  font-family: var(--ch-display); font-size: 14px; font-weight: 700; letter-spacing: .01em;
  border: 1px solid rgba(150, 20, 25, .35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 0 #B3262B, 0 6px 12px -6px rgba(200, 40, 45, .8);
  transform: rotate(-4deg);
  transition: transform .2s ease;
}
.ch-redesign .package-discount::before { content: "SAVE"; font-size: 10px; letter-spacing: .08em; opacity: .9; }
.ch-redesign .store-package-item:hover .package-discount { transform: rotate(-2deg) scale(1.06); }
.ch-redesign .package-popular {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: var(--ch-primary); color: var(--ch-on-primary);
  border: 1px solid var(--ch-primary-edge);
  box-shadow: 0 2px 0 var(--ch-primary-edge);
  border-radius: 999px; width: 30px; height: 30px; line-height: 1; display: grid; place-items: center; font-size: 13px;
}
.ch-redesign .store-package-item .package-img { margin-top: 18px; }
.ch-redesign .package-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 8px; }
.ch-redesign .package-tag {
  background: var(--ch-tint); color: var(--ch-text-2) !important;
  border: 1px solid var(--ch-border);
  border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600;
}
.ch-redesign .store-package-item .product-actions > .button,
.ch-redesign .store-package-item .product-actions > a.button { margin-top: auto; }
.ch-redesign .quantity-field-new,
.ch-redesign .store-product .quantity-field {
  border-radius: 9px; overflow: hidden; border: 1px solid var(--ch-border-strong); background: var(--ch-surface);
}
.ch-redesign .quantity-btn-new { background: var(--ch-surface-2); color: var(--ch-text); }
.ch-redesign .quantity-input-new { background: var(--ch-surface); color: var(--ch-text); }
/* crate (keys) amount selector */
.ch-redesign .amount-option { background: var(--ch-surface-2); color: var(--ch-text); border: 1px solid var(--ch-border); border-radius: 9px; }
.ch-redesign .amount-option.active { background: var(--ch-primary); color: var(--ch-on-primary); border-color: var(--ch-primary-edge); }
.ch-redesign .crate-tag { border-radius: 8px; }
.ch-redesign .crate-tag-base { border-radius: 8px; background: var(--ch-surface-2); }

/* ---------- 14. Rank comparison ---------- */
.ch-ranks { --rank: #FFC800; min-width: 0; max-width: 100%; }
.ch-rt-card { max-width: 100%; }
.ch-rank-pills { display: none; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.ch-rank-pills::-webkit-scrollbar { display: none; }
.ch-rank-pill {
  flex: none; height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--rank) 45%, transparent);
  background: color-mix(in srgb, var(--rank) 10%, var(--ch-surface));
  color: var(--ch-text); font-family: var(--ch-display); font-weight: 600; font-size: 14px;
}
.ch-rank-pill.is-active { background: var(--rank); color: #fff; border-color: transparent; text-shadow: 0 1px 0 rgba(0, 0, 0, .2); }
.ch-rt-card {
  border-radius: 20px;
  background: var(--ch-surface);
  border: 1px solid var(--ch-border);
  box-shadow: var(--ch-shadow);
  overflow: hidden;
}
.ch-rt-scroll { overflow-x: auto; scrollbar-width: thin; }
.ch-rt { width: 100%; min-width: 860px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.ch-rt th, .ch-rt td { padding: 0; border-bottom: 1px solid var(--ch-border); }
.ch-rt-corner { width: 230px; position: sticky; left: 0; z-index: 3; background: var(--ch-surface); vertical-align: bottom; text-align: left; }
.ch-rt-corner-inner { padding: 22px; color: var(--ch-text-2); font-size: 13.5px; line-height: 1.5; font-weight: 400; }
.ch-rt-corner-inner > i { font-size: 22px; color: var(--ch-primary); margin-bottom: 10px; display: block; }
.ch-rt-corner-inner p { margin: 0 0 10px; }
.ch-rt-corner-inner b { color: var(--ch-text); }
.ch-rt-you { font-size: 12px; color: var(--ch-muted); display: flex; gap: 6px; align-items: center; }
.ch-rt-col {
  position: relative;
  vertical-align: top;
  background: color-mix(in srgb, var(--rank) 7%, var(--ch-surface));
  cursor: pointer;
  transition: opacity .2s ease, background-color .2s ease;
}
.ch-rt-col::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; height: 5px; border-radius: 0 0 6px 6px; background: var(--rank); }
.ch-rt-head { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 12px 16px; text-align: center; }
.ch-rt-ribbon {
  position: absolute; top: 12px; right: 10px;
  font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  background: var(--rank); color: var(--rank-ink, #fff);
  padding: 3px 8px; border-radius: 999px;
}
.ch-rt-wordmark { height: 30px; display: flex; align-items: center; justify-content: center; width: 100%; }
.ch-rt-wordmark img { max-height: 28px; max-width: 100%; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .12)); }
.ch-rt-wordmark span { font-family: var(--ch-display); font-weight: 700; font-size: 20px; color: var(--rank); }
.ch-rt-model {
  height: 128px; width: 100%; display: flex; align-items: flex-end; justify-content: center;
  background: radial-gradient(70px 60px at 50% 72%, color-mix(in srgb, var(--rank) 35%, transparent), transparent 70%);
}
.ch-rt-model img { height: 118px; width: auto; image-rendering: pixelated; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .25)); transition: transform .25s ease; }
.ch-rt-col:hover .ch-rt-model img { transform: translateY(-4px) rotate(-2deg); }
.ch-rt-price { display: flex; gap: 6px; align-items: baseline; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
.ch-rt-price del { color: var(--ch-muted); font-size: 13px; }
.ch-rt-price b { font-family: var(--ch-display); font-size: 22px; font-weight: 700; color: color-mix(in srgb, var(--rank) 70%, var(--ch-text)); }
.ch-rt-term { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ch-muted); }
.ch-rt-actions { width: 100%; margin-top: 6px; }
.ch-redesign .ch-rt-buy.button-primary {
  background: var(--rank);
  border-color: color-mix(in srgb, var(--rank) 72%, #000);
  color: var(--rank-ink, #fff) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 3px 0 color-mix(in srgb, var(--rank) 65%, #000), 0 8px 16px -8px color-mix(in srgb, var(--rank) 70%, #000);
  height: 40px; font-size: 13px; padding: 0 8px;
  white-space: nowrap; letter-spacing: .01em; gap: 6px;
}
@media (max-width: 1500px) { .ch-rt-buy .il { display: none; } }
.ch-redesign .ch-rt-buy.button-primary:hover {
  background: color-mix(in srgb, var(--rank) 85%, #fff);
  color: var(--rank-ink, #fff) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 4px 0 color-mix(in srgb, var(--rank) 65%, #000), 0 10px 18px -8px color-mix(in srgb, var(--rank) 70%, #000);
}
.ch-redesign .ch-rt-buy.button-primary:active { box-shadow: 0 1px 0 color-mix(in srgb, var(--rank) 65%, #000) !important; }
.ch-rt-actions .ch-btn-ghost { height: 40px; font-size: 13px; }
.ch-rt-details { font-size: 12px; color: var(--ch-muted) !important; text-decoration: underline; text-underline-offset: 3px; margin-top: 2px; }
.ch-rt-details:hover { color: var(--ch-text) !important; }
.ch-rt tbody th, .ch-rt tbody td { height: 44px; vertical-align: middle; }
.ch-rt-label {
  position: sticky; left: 0; z-index: 2;
  background: var(--ch-surface);
  text-align: left; padding: 0 22px !important;
  font-size: 14px; font-weight: 500; color: var(--ch-text);
}
.ch-rt-label span { color: var(--ch-muted); font-size: 12px; font-weight: 500; }
.ch-rt tbody td {
  text-align: center; font-size: 14px; font-weight: 700; color: var(--ch-text);
  background: color-mix(in srgb, var(--rank) 5%, var(--ch-surface));
  transition: opacity .2s ease, background-color .2s ease;
  padding: 0 8px;
}
.ch-rt tbody tr:hover td, .ch-rt tbody tr:hover .ch-rt-label { background: color-mix(in srgb, var(--rank) 11%, var(--ch-surface)); }
.ch-rt tbody tr:hover .ch-rt-label { background: var(--ch-surface-2); }
.ch-rt-group th, .ch-rt-group td {
  height: 34px !important;
  background: var(--ch-surface-2) !important;
  font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ch-muted);
  text-align: left; padding: 0 22px !important;
}
.ch-rt-group th { position: sticky; left: 0; z-index: 2; }
.ch-yes { color: var(--ch-good); font-size: 16px; }
.ch-no { color: var(--ch-muted); opacity: .6; font-weight: 400; }
.ch-val { white-space: normal; line-height: 1.25; display: inline-block; }
.ch-ranks[data-focus] .ch-rt-col:not(.is-focus),
.ch-ranks[data-focus] tbody td:not(.is-focus) { opacity: .38; }
.ch-rt-col.is-focus { background: color-mix(in srgb, var(--rank) 16%, var(--ch-surface)); box-shadow: inset 2px 0 0 var(--rank), inset -2px 0 0 var(--rank); }
.ch-rt tbody td.is-focus { box-shadow: inset 2px 0 0 var(--rank), inset -2px 0 0 var(--rank); background: color-mix(in srgb, var(--rank) 12%, var(--ch-surface)); }
.ch-rt tbody tr:last-child td.is-focus { box-shadow: inset 2px 0 0 var(--rank), inset -2px 0 0 var(--rank), inset 0 -2px 0 var(--rank); }
.ch-rt tbody tr:last-child th, .ch-rt tbody tr:last-child td { border-bottom: 0; }
.ch-rt-extras-head { margin-top: 30px; }
.ch-rt-extras:not(:has(.store-package-item)) { display: none; }
@media (max-width: 900px) {
  .ch-rank-pills { display: flex; }
  .ch-rt-corner { width: 150px; }
  .ch-rt-corner-inner { padding: 14px; font-size: 12px; }
  .ch-rt-label { padding: 0 14px !important; font-size: 13px; }
  .ch-rt { min-width: 760px; }
}

/* ---------- 15. Footer ---------- */
.ch-redesign .ch-footer {
  margin-top: 24px;
  padding-top: 26px;
  border-top: 1px solid var(--ch-border);
  background: none;
}
.ch-footer-main { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.ch-footer-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ch-footer-logo { width: 40px; height: 40px; border-radius: 10px; image-rendering: pixelated; box-shadow: var(--ch-shadow-sm); }
.ch-footer-title { color: var(--ch-text-2); font-size: 14px; }
.ch-footer-title b { color: var(--ch-text); }
.ch-redesign .ch-footer .disclaimer { font-size: 12px; color: var(--ch-muted); margin-top: 3px; }
.ch-footer-side { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ch-footer-links { display: flex; gap: 16px; font-size: 14px; }
.ch-footer-links a { color: var(--ch-text-2) !important; text-decoration: none; }
.ch-footer-links a:hover { color: var(--ch-text) !important; text-decoration: underline; text-underline-offset: 3px; }
.ch-footer-sub { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--ch-border); }
.ch-redesign .payment-method { color: var(--ch-muted); font-size: 22px; }
.ch-util-row { align-items: center; }
.ch-redesign .currency-button {
  background: var(--ch-surface); border: 1px solid var(--ch-border); color: var(--ch-text);
  border-radius: 9px; height: 36px; padding: 0 12px; font-weight: 700;
}
.ch-redesign .currency-dropdown { background: var(--ch-surface); border: 1px solid var(--ch-border); border-radius: 10px; box-shadow: var(--ch-shadow); }
.ch-redesign .currency-dropdown a { color: var(--ch-text-2); }
.ch-redesign .currency-dropdown a:hover { background: var(--ch-surface-2); color: var(--ch-text); }

/* theme switch */
.ch-theme-switch {
  display: inline-flex; gap: 2px; padding: 3px;
  border-radius: 11px;
  background: var(--ch-surface-2);
  border: 1px solid var(--ch-border);
}
.ch-theme-btn {
  width: 34px; height: 30px; border: 0; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--ch-muted); font-size: 13px;
  display: grid; place-items: center;
  transition: background-color .15s, color .15s, box-shadow .15s;
}
.ch-theme-btn:hover { color: var(--ch-text); }
.ch-theme-btn.is-active {
  background: var(--ch-primary); color: var(--ch-on-primary);
  box-shadow: 0 2px 0 var(--ch-primary-edge);
}

/* ---------- 16. Popups, basket, misc Mount bits in dark mode ---------- */
.ch-redesign .popup-content,
.ch-redesign .basket-popup-content,
.ch-redesign .login-popup-content {
  background: var(--ch-surface);
  color: var(--ch-text-2);
  border: 1px solid var(--ch-border);
}
.ch-redesign .popup-content h1, .ch-redesign .popup-content h2, .ch-redesign .popup-content h3,
.ch-redesign .product-title { color: var(--ch-text); font-family: var(--ch-display); }
.ch-redesign .basket .basket-item { background: var(--ch-surface-2); border: 1px solid var(--ch-border); border-radius: 12px; }
.ch-redesign .basket-quantity { background: var(--ch-surface); color: var(--ch-text); }
.ch-redesign .login-username-field,
.ch-redesign .gift-card-input,
.ch-redesign .giftcard-field,
.ch-redesign .basket-code input,
.ch-redesign .field input {
  background: var(--ch-surface); color: var(--ch-text); border: 1px solid var(--ch-border-strong); border-radius: 9px;
}
.ch-redesign .toast { background: var(--ch-surface); color: var(--ch-text); border: 1px solid var(--ch-border); box-shadow: var(--ch-shadow-lift); }
.ch-redesign .announcement-banner { border-radius: 20px; overflow: hidden; }
.ch-redesign .widget-gift-card {
  padding: 14px 16px; border-radius: 14px; background: var(--ch-surface); border: 1px solid var(--ch-border);
}
.ch-redesign .widget-gift-card .widget-title { font-family: var(--ch-display); color: var(--ch-text); text-align: left; font-size: 16px; }
.ch-redesign .widget-text { padding: 22px 24px; border-radius: var(--ch-radius); background: var(--ch-surface); border: 1px solid var(--ch-border); }
.ch-redesign .mobile-featured .ch-featured-card { margin-bottom: 4px; }

/* ---------- 17. Mobile ---------- */
.ch-skin-peek { display: none; }
@media (max-width: 1100px) {
  .ch-redesign .site { padding-top: 8px; gap: 28px; }
  .ch-redesign .mobile-user-panel {
    background: rgba(var(--c-sidebar-rgb), .9);
    border-top: 1px solid var(--ch-border);
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  }
  .ch-redesign .mobile-panel-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    max-width: 640px;
    margin: 0 auto;
    padding-left: 70px;
  }
  .ch-redesign .mobile-panel-inner .ch-account { padding: 6px; }
  .ch-redesign .mobile-panel-inner .ch-account-avatar { display: none; }
  .ch-redesign .mobile-panel-inner .ch-creator { display: none; }
  .ch-redesign .mobile-panel-inner .ch-cart-btn { width: auto; padding: 0 16px; height: 44px; }
  .ch-skin-peek {
    display: block;
    position: absolute;
    left: 6px;
    bottom: 10px;
    width: 74px;
    height: 104px;
    opacity: 0;
    transition: opacity .5s ease;
    pointer-events: auto;
  }
  .ch-skin-peek .ch-skin-bubble { left: 60px; top: -4px; }
  .ch-hero { grid-template-columns: minmax(0, 1fr); padding: 30px 24px; }
  .ch-hero-art { display: none; }
  .ch-community { grid-template-columns: 1fr; margin: 0; padding: 20px; }
}
@media (max-width: 1100px) and (min-width: 700px) {
  .ch-hero { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); }
  .ch-hero-art { display: flex; }
}
@media (max-width: 640px) {
  .ch-hero { padding: 26px 20px; border-radius: 20px; }
  .ch-pill { height: auto; min-height: 44px; flex-wrap: wrap; padding: 8px 12px; }
  .ch-recent-grid { grid-template-columns: 1fr; }
  .ch-recent-row:last-child:nth-child(odd) { grid-column: auto; }
  .ch-hero-actions .button { flex: 1 1 auto; }
  .ch-pills { flex-direction: column; align-items: stretch; }
  .ch-pill { justify-content: flex-start; }
  .ch-page-head { padding: 20px; gap: 14px; }
  .ch-page-head-icon { width: 52px; height: 52px; border-radius: 14px; }
  .ch-page-head-icon img { width: 34px; height: 34px; }
  .ch-cat { padding: 18px; }
  .ch-top-card { min-height: 0; }
  .ch-footer-main, .ch-footer-side { flex-direction: column; align-items: flex-start; }
}

/* ---------- 18. Motion ---------- */
@keyframes ch-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ch-js .ch-stagger > * { animation: ch-in .45s ease backwards; animation-delay: calc(var(--i, 0) * 70ms); }
.ch-hero, .ch-page-head { animation: ch-in .5s ease backwards; }
@media (prefers-reduced-motion: reduce) {
  .ch-hero-bg span, .ch-hero-logo, .ch-top-render img, .ch-dot, .ch-js .ch-stagger > *, .ch-hero, .ch-page-head, .ch-chip, .ch-recent-row { animation: none !important; }
  .ch-cat, .store-package-item > .block, .button { transition: none !important; }
}

/* ---------- 19. Product popup polish ---------- */
.ch-redesign .store-product-full .image,
.ch-redesign .store-product-full > img.image {
  display: block;
  max-height: 240px;
  width: auto;
  max-width: 100%;
  margin: 8px auto 16px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .2));
}
.ch-redesign .popup-close {
  border-radius: 10px;
  background-color: var(--ch-surface-2);
  border: 1px solid var(--ch-border);
}
.ch-redesign .store-product-full .descr { color: var(--ch-text-2); line-height: 1.6; }
.ch-redesign .store-product-full .descr strong, .ch-redesign .store-product-full .descr b { color: var(--ch-text); }
.ch-redesign .widget-gift-card .btn-secondary,
.ch-redesign .widget-gift-card .check {
  width: 100%; height: 42px; margin-top: 8px; cursor: pointer;
  border-radius: 9px; border: 1px solid var(--ch-border-strong);
  background: var(--ch-surface-2); color: var(--ch-text);
  font-family: var(--ch-display); font-weight: 600; text-transform: uppercase; letter-spacing: .02em;
  box-shadow: 0 3px 0 var(--ch-border-strong);
  transition: transform .12s ease, background-color .15s ease;
}
.ch-redesign .widget-gift-card .btn-secondary:hover { background: var(--ch-surface-3); transform: translateY(-1px); }
.ch-redesign .widget-gift-card .btn-secondary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ch-border-strong); }
