/* ==========================================================
   Game Store — desktop-app design system
   Calm dark appearance, translucent materials, hairline
   separators, soft radii, one restrained purple accent.
   ========================================================== */
:root {
  --bg: #171719;
  --bg-2: #202024;
  --bg-3: #2a2a2f;
  --panel: rgba(45, 45, 50, 0.65);
  --panel-strong: rgba(48, 48, 54, 0.86);
  --sidebar: rgba(38, 38, 43, 0.58);
  --toolbar: rgba(34, 34, 38, 0.62);
  --fill: rgba(255, 255, 255, 0.07);
  --fill-2: rgba(255, 255, 255, 0.11);
  --fill-3: rgba(255, 255, 255, 0.16);
  --sep: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.09);

  --text: #f5f5f7;
  --text-2: #98989d;
  --text-3: #6c6c71;

  --accent: #b893f2;
  --accent-fill: #8a5bd6;
  --accent-fill-2: #9a6ce3;
  --accent-soft: rgba(184, 147, 242, 0.16);
  --heart: #ff6482;
  --danger: #ff6961;

  --blur: blur(30px) saturate(180%);
  --r-xs: 6px; --r-sm: 9px; --r: 12px; --r-lg: 16px; --r-xl: 22px;
  --shadow-1: 0 0 0 0.5px rgba(255, 255, 255, 0.1), 0 6px 18px rgba(0, 0, 0, 0.28);
  --shadow-2: 0 0 0 0.5px rgba(255, 255, 255, 0.14), 0 18px 36px rgba(0, 0, 0, 0.42);
  --shadow-win: 0 0 0 0.5px rgba(0, 0, 0, 0.6), inset 0 0.5px 0 rgba(255, 255, 255, 0.12), 0 24px 60px rgba(0, 0, 0, 0.5);
  --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
  --spring: cubic-bezier(0.2, 0.9, 0.25, 1.05);

  --sb-w: 268px;
  --gutter: 28px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "IBM Plex Sans Arabic", system-ui, "Segoe UI", sans-serif;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
html[lang="ar"] body { line-height: 1.7; }
/* Soft "wallpaper" behind the app so translucent materials have depth */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 620px at 8% -12%, rgba(138, 91, 214, 0.2), transparent 62%),
    radial-gradient(820px 620px at 105% 112%, rgba(64, 108, 196, 0.12), transparent 60%),
    var(--bg);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: default; }
a, button, select, label { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
img.img-err { opacity: 0; }
input, select { font: inherit; color: inherit; }
ol, ul { list-style: none; }
:focus-visible { outline: 3px solid rgba(184, 147, 242, 0.55); outline-offset: 1px; border-radius: 8px; }
::selection { background: rgba(138, 91, 214, 0.5); }
.no-scroll { overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 18px; height: 18px; flex-shrink: 0; }
.t-latin { unicode-bidi: isolate; }
[dir="rtl"] .t-latin { direction: ltr; text-align: right; }
.skip { position: fixed; top: -60px; inset-inline-start: 12px; z-index: 200; background: var(--accent-fill); color: #fff; padding: 8px 14px; border-radius: 9px; transition: top 0.2s; }
.skip:focus { top: 10px; }

[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
.view > * { animation: viewIn 0.32s var(--ease); } /* no fill: a lingering animation would create a stacking context */
/* opacity only: a transform here would trap position:fixed children (filter sheet, viewer) */
@keyframes viewIn { from { opacity: 0; } }

/* ==========================================================
   Controls
   ========================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 16px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: background 0.15s, filter 0.15s, transform 0.12s var(--ease), box-shadow 0.2s;
}
.btn:active { transform: scale(0.97); filter: brightness(0.92); }
.btn .ic { width: 17px; height: 17px; }
.btn-primary { color: #fff; background: linear-gradient(180deg, var(--accent-fill-2), var(--accent-fill)); box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.28), 0 1px 2px rgba(0, 0, 0, 0.35); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary.is-in { background: var(--fill-2); box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.12); }
.btn-primary.is-in .ic { color: var(--accent); }
.btn-secondary { color: var(--text); background: var(--fill-2); box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.1); }
.btn-secondary:hover { background: var(--fill-3); }
.btn-glass { color: #fff; background: rgba(40, 40, 46, 0.5); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.22); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.btn-glass:hover { background: rgba(60, 60, 68, 0.6); }
.btn-lg { height: 42px; padding: 0 20px; font-size: 15px; border-radius: 11px; }
.btn-lg .ic { width: 18px; height: 18px; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13.5px; border-radius: 8px; }
.btn-sm .ic { width: 15px; height: 15px; }
.btn-block { width: 100%; }
.wish.is-on, .wish.is-on .ic { color: var(--heart); }
.wish.is-on .ic { fill: currentColor; }

.mat-btn {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  color: #fff; background: rgba(28, 28, 32, 0.55); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.2);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  transition: background 0.15s, opacity 0.2s, transform 0.2s var(--ease);
}
.mat-btn .ic { width: 15px; height: 15px; }
.mat-btn:hover { background: rgba(60, 60, 68, 0.75); }
.mini-btn {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; cursor: pointer;
  background: var(--fill-2); color: var(--text); transition: background 0.15s, color 0.15s, transform 0.15s var(--ease);
}
.mini-btn .ic { width: 15px; height: 15px; }
.mini-btn:hover { background: var(--accent-fill); color: #fff; }
.mini-btn.is-in { background: var(--accent-fill); color: #fff; }
.pop { animation: pop 0.4s var(--spring); }
@keyframes pop { 45% { transform: scale(1.16); } }

/* Price + discount */
.price { display: inline-flex; align-items: baseline; flex-wrap: wrap; column-gap: 6px; min-width: 0; }
.price > * { white-space: nowrap; }
.price-old { font-size: 12.5px; color: var(--text-3); }
.price-now { font-size: 14.5px; font-weight: 600; }
.price.sm .price-now { font-size: 13.5px; }
.off { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: var(--r-xs); background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; line-height: 1.5; white-space: nowrap; }

/* Tags (Finder-style coloured dots) */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex-shrink: 0; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.25); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-bottom: 22px; padding: 2px; }
.tags-scroll::-webkit-scrollbar { display: none; }
.tag {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; white-space: nowrap;
  font-size: 13.5px; font-weight: 500; background: var(--fill); box-shadow: inset 0 0 0 0.5px var(--border);
  transition: background 0.15s;
}
.tag:hover { background: var(--fill-2); }
.tag.is-active { background: var(--accent-fill); color: #fff; box-shadow: none; }
.tag.is-active .dot { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85); }

/* Pop-up button (select) */
.popup select {
  appearance: none; height: 32px; padding-inline: 12px 32px; border: 0; border-radius: 8px; cursor: pointer;
  font-size: 14px; background: var(--fill-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f7' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 9 5-5 5 5M7 15l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 11px center;
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.1);
}
[dir="rtl"] .popup select { background-position: left 11px center; }
.popup option { background: var(--bg-3); }

/* Game logo with text fallback */
.glogo { display: inline-flex; }
.glogo img { width: auto; height: auto; filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.55)); }
.glogo-mono img { filter: brightness(0) invert(1) drop-shadow(0 6px 20px rgba(0, 0, 0, 0.55)); }
.glogo-text { display: none; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.glogo.no-logo img { display: none; }
.glogo.no-logo .glogo-text { display: block; }
[dir="rtl"] .glogo-text { direction: ltr; text-align: right; }

/* Windows 481–1279px wide show the full desktop layout scaled to fit
   (index.html sets html zoom and --z); the compact layouts are for phones (≤480px). */

/* ==========================================================
   Window shell: sidebar + toolbar
   ========================================================== */
.shell { display: grid; grid-template-columns: var(--sb-w) minmax(0, 1fr); min-height: calc(100vh / var(--z, 1)); transition: grid-template-columns 0.4s var(--ease); }
.shell.sb-collapsed { grid-template-columns: 0px minmax(0, 1fr); }

.sidebar { position: sticky; top: 0; height: calc(100vh / var(--z, 1)); padding: 10px; padding-inline-end: 0; overflow: hidden; z-index: 40; }
.sb-panel {
  width: calc(var(--sb-w) - 10px); height: 100%; display: flex; flex-direction: column; border-radius: 18px;
  background: var(--sidebar); box-shadow: inset 0 0 0 0.5px var(--border), inset 0 0.5px 0 rgba(255, 255, 255, 0.08), 0 12px 32px rgba(0, 0, 0, 0.25);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
}
.sb-collapsed .sb-panel { opacity: 0; transform: translateX(-16px); }
[dir="rtl"] .sb-collapsed .sb-panel { transform: translateX(16px); }
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 8px; font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.sb-brand .logo-mark { width: 30px; height: 30px; }
.logo-mark { width: 28px; height: 28px; flex-shrink: 0; }
.sb-scroll { flex: 1; overflow-y: auto; padding: 4px 10px 12px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.15) transparent; }
.sb-group + .sb-group { margin-top: 6px; }
.sb-group h3 { font-size: 12px; font-weight: 600; color: var(--text-3); padding: 14px 10px 5px; }
.sb-item {
  display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 8px;
  font-size: 14.5px; color: var(--text); transition: background 0.15s;
}
.sb-item .ic { width: 18px; height: 18px; color: var(--accent); }
.sb-item:hover { background: var(--fill); }
.sb-item.is-active { background: var(--fill-3); }
.sb-item.is-active .ic { color: var(--text); }
.sb-genre { height: 32px; font-size: 14px; color: rgba(245, 245, 247, 0.86); }
.sb-genre .dot { width: 10px; height: 10px; margin-inline: 4px 4px; }
.sb-count { margin-inline-start: auto; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.sb-foot { padding: 12px; border-top: 1px solid var(--sep); }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 2px; border-radius: 9px; background: var(--fill); }
.segmented button { height: 28px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--text-2); cursor: pointer; transition: background 0.2s, color 0.2s; }
.segmented button:hover { color: var(--text); }
.segmented button.is-on { background: var(--fill-3); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), inset 0 0.5px 0 rgba(255, 255, 255, 0.12); }

.scrim { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }

.toolbar { position: sticky; top: 0; z-index: 30; padding: 10px var(--gutter) 0 12px; }
[dir="rtl"] .toolbar { padding: 10px 12px 0 var(--gutter); }
.tb {
  height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 8px;
  border-radius: 14px; background: var(--toolbar);
  box-shadow: inset 0 0 0 0.5px var(--border), inset 0 0.5px 0 rgba(255, 255, 255, 0.07), 0 10px 26px rgba(0, 0, 0, 0.22);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); transition: background 0.3s;
}
.is-scrolled .tb { background: rgba(32, 32, 36, 0.82); }
.tb-start, .tb-end { display: flex; align-items: center; gap: 4px; min-width: 0; }
.tb-nav { display: flex; gap: 2px; margin-inline-start: 2px; }
.tb-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px; color: var(--text-2); cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tb-btn .ic { width: 19px; height: 19px; }
.tb-btn:hover { background: var(--fill); color: var(--text); }
.tb-btn:active { background: var(--fill-2); }
.tb-lang span { font-size: 13px; font-weight: 600; }
.tb-title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin-inline-start: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.count {
  position: absolute; top: 1px; inset-inline-end: 1px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--accent-fill); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center;
}
.count.bump { animation: pop 0.45s var(--spring); }

.tb-search {
  position: relative; display: flex; align-items: center; gap: 7px; width: 260px; height: 34px; padding: 0 9px; margin-inline-end: 4px;
  border-radius: var(--r-sm); background: var(--fill); box-shadow: inset 0 0 0 0.5px var(--border); color: var(--text-3);
  transition: background 0.15s, box-shadow 0.15s, width 0.3s var(--ease);
}
.tb-search:focus-within { background: var(--fill-2); box-shadow: 0 0 0 3px rgba(184, 147, 242, 0.45); width: 300px; }
.tb-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 14px; color: var(--text); }
.tb-search input::placeholder { color: var(--text-3); }
.tb-search input::-webkit-search-cancel-button { display: none; }
.tb-search kbd { font: 500 11.5px var(--font); color: var(--text-3); padding: 1px 5px; border-radius: 5px; background: var(--fill); direction: ltr; }
.tb-search-btn { display: none; }

/* Popover (search results) */
.popover {
  position: absolute; top: calc(100% + 8px); inset-inline-end: -4px; width: 400px; z-index: 50; padding: 6px;
  border-radius: 14px; background: var(--panel-strong); box-shadow: var(--shadow-win);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); transform-origin: top; animation: popIn 0.18s var(--ease);
}
.popover[hidden] { display: none; }
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.pop-label { font-size: 12px; font-weight: 600; color: var(--text-2); padding: 7px 9px 4px; }
.pop-item { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px; border-radius: 9px; color: var(--text); }
.pop-item.is-active, .pop-item:hover { background: var(--accent-fill); }
.pop-item.is-active :is(.pop-sub, .price-old), .pop-item:hover :is(.pop-sub, .price-old) { color: rgba(255, 255, 255, 0.78); }
.pop-img { width: 72px; height: 34px; border-radius: 6px; object-fit: cover; background: var(--bg-3); }
.pop-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.pop-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop-sub { font-size: 12.5px; color: var(--text-2); }
.pop-all { display: flex; align-items: center; justify-content: center; gap: 3px; padding: 9px; margin-top: 4px; border-top: 1px solid var(--sep); font-size: 13.5px; color: var(--accent); }
.pop-all .ic { width: 15px; height: 15px; }
.pop-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 12px; color: var(--text-2); font-size: 14px; }
.pop-empty .ic { width: 26px; height: 26px; color: var(--text-3); }

/* Content area */
.view { position: relative; width: 100%; max-width: 1480px; margin-inline: auto; padding: 22px var(--gutter) 24px; flex: 1; overflow-x: clip; }
.tabbar, .buybar { display: none; }

/* ==========================================================
   Home
   ========================================================== */
.feature { position: relative; height: clamp(380px, calc(44vw / var(--z, 1)), 560px); border-radius: var(--r-xl); overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow-win); isolation: isolate; }
.fx-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.9s var(--ease), visibility 0.9s; }
.fx-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.fx-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 28%; transform: scale(1.05); transition: transform 8s linear; }
.fx-slide.is-active .fx-art { transform: scale(1); }
.fx-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(12, 12, 14, 0.9) 0%, rgba(12, 12, 14, 0.45) 36%, rgba(12, 12, 14, 0) 64%), linear-gradient(90deg, rgba(12, 12, 14, 0.7) 0%, rgba(12, 12, 14, 0) 56%); }
[dir="rtl"] .fx-shade { background: linear-gradient(0deg, rgba(12, 12, 14, 0.9) 0%, rgba(12, 12, 14, 0.45) 36%, rgba(12, 12, 14, 0) 64%), linear-gradient(270deg, rgba(12, 12, 14, 0.7) 0%, rgba(12, 12, 14, 0) 56%); }
.fx-content { position: absolute; inset-inline-start: 40px; bottom: 36px; max-width: 520px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.fx-content > * { opacity: 0; transform: translateY(10px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.fx-slide.is-active .fx-content > * { opacity: 1; transform: none; }
.fx-slide.is-active .fx-content > :nth-child(2) { transition-delay: 0.07s; }
.fx-slide.is-active .fx-content > :nth-child(3) { transition-delay: 0.14s; }
.fx-slide.is-active .fx-content > :nth-child(4) { transition-delay: 0.21s; }
.fx-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.86); background: rgba(30, 30, 34, 0.45); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.18); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.fx-logo img { max-height: 120px; max-width: min(420px, calc(72vw / var(--z, 1))); }
.fx-logo .glogo-text { font-size: clamp(30px, calc(4vw / var(--z, 1)), 48px); }
.fx-desc { font-size: 16px; color: rgba(236, 236, 240, 0.86); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fx-buy { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.fx-price { display: inline-flex; align-items: center; gap: 8px; margin-inline-start: 6px; }
.fx-price .price-now { font-size: 18px; }
.fx-price .price-old { font-size: 13.5px; color: rgba(255, 255, 255, 0.55); }
.fx-pager { position: absolute; z-index: 2; bottom: 22px; inset-inline-end: 26px; display: flex; gap: 6px; padding: 7px 9px; border-radius: 999px; background: rgba(28, 28, 32, 0.45); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.15); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.fx-dot { position: relative; width: 8px; height: 8px; border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, 0.35); cursor: pointer; transition: width 0.35s var(--ease), background 0.2s; }
.fx-dot:hover { background: rgba(255, 255, 255, 0.55); }
.fx-dot.is-active { width: 36px; background: rgba(255, 255, 255, 0.25); }
.fx-dot i { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: #fff; border-radius: inherit; }
.fx-dot.is-active i { animation: fxFill var(--fx-ms, 7s) linear forwards; }
.feature.is-paused .fx-dot.is-active i { animation-play-state: paused; }
@keyframes fxFill { to { width: 100%; } }

/* Sections */
.sec { margin-top: 44px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.sec-title { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; }
html[lang="ar"] .sec-title, html[lang="ar"] .large-title { letter-spacing: 0; }
.sec-sub { font-size: 14px; color: var(--text-2); margin-top: 2px; }
.sec-tools { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.see-all { display: inline-flex; align-items: center; gap: 1px; font-size: 14.5px; color: var(--accent); transition: opacity 0.15s; }
.see-all .ic { width: 16px; height: 16px; }
.see-all:hover { opacity: 0.8; }
.pager { display: flex; gap: 4px; }
.pager-btn { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--fill); color: var(--text-2); cursor: pointer; transition: background 0.15s, color 0.15s; }
.pager-btn:hover { background: var(--fill-2); color: var(--text); }
.pager-btn .ic { width: 16px; height: 16px; }

/* Curated collections */
.colls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.coll {
  position: relative; display: flex; height: 176px; padding: 18px; border-radius: var(--r-lg); overflow: hidden; isolation: isolate;
  background: linear-gradient(140deg, color-mix(in srgb, var(--c) 26%, #26262b) 0%, #222226 72%);
  box-shadow: inset 0 0 0 0.5px var(--border), inset 0 0.5px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.coll:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.14), 0 16px 32px rgba(0, 0, 0, 0.35); }
.coll-text { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 5px; max-width: 54%; }
.coll-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: color-mix(in srgb, var(--c) 80%, white); }
.coll-title { font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
html[lang="ar"] .coll-title { letter-spacing: 0; }
.coll-sub { font-size: 13px; color: var(--text-2); margin-top: auto; }
.coll-stack { position: absolute; inset-inline-end: 14px; top: 22px; width: 150px; height: 170px; }
.coll-cover { position: absolute; top: 0; width: 80px; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--bg-3); box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.18), 0 10px 22px rgba(0, 0, 0, 0.45); transition: transform 0.45s var(--spring); }
.coll-cover img { width: 100%; height: 100%; object-fit: cover; }
.coll-cover.c0 { inset-inline-end: 0; top: 14px; z-index: 3; --r: 7deg; }
.coll-cover.c1 { inset-inline-end: 34px; top: 4px; z-index: 2; --r: -3deg; }
.coll-cover.c2 { inset-inline-end: 68px; top: 18px; z-index: 1; --r: -12deg; }
.coll-cover { transform: rotate(var(--r)); }
[dir="rtl"] .coll-cover { transform: rotate(calc(var(--r) * -1)); }
.coll:hover .coll-cover.c0 { transform: rotate(10deg) translate(6px, -4px); }
.coll:hover .coll-cover.c2 { transform: rotate(-16deg) translate(-6px, -2px); }
[dir="rtl"] .coll:hover .coll-cover.c0 { transform: rotate(-10deg) translate(-6px, -4px); }
[dir="rtl"] .coll:hover .coll-cover.c2 { transform: rotate(16deg) translate(6px, -2px); }

/* Carousels */
.carousel {
  display: grid; grid-auto-flow: column; gap: 18px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; padding: 6px 4px 12px; margin: -6px -4px 0;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: start; }
.tiles-row { grid-auto-columns: 172px; }
.wtiles-row { grid-auto-columns: 344px; }

/* Content tile */
.tile { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tile-art { position: relative; aspect-ratio: 2 / 3; border-radius: var(--r); overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow-1); transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.tile:hover .tile-art { transform: scale(1.03); box-shadow: var(--shadow-2); }
.tile-link { position: absolute; inset: 0; }
.tile-link img { width: 100%; height: 100%; object-fit: cover; }
.tile-off { position: absolute; top: 8px; inset-inline-start: 8px; background: rgba(24, 20, 34, 0.72); color: #dcc8ff; backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.tile-wish { position: absolute; top: 8px; inset-inline-end: 8px; }
@media (hover: hover) {
  .tile-wish:not(.is-on) { opacity: 0; transform: scale(0.9); }
  .tile:hover .tile-wish, .tile:focus-within .tile-wish { opacity: 1; transform: none; }
}
.tile-info { display: flex; flex-direction: column; gap: 1px; padding-inline: 2px; min-width: 0; }
.tile-title { font-size: 14.5px; font-weight: 600; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-sub { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-buy { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }

.wtile { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.wtile-art { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow-1); transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.wtile:hover .wtile-art { transform: scale(1.02); box-shadow: var(--shadow-2); }
.wtile-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wtile-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 10, 12, 0.78) 0%, rgba(10, 10, 12, 0) 55%); }
.wtile-logo { position: absolute; bottom: 12px; inset-inline-start: 14px; }
.wtile-logo img { max-height: 42px; max-width: 58%; }
.wtile-logo .glogo-text { font-size: 17px; }
.wtile-date { position: absolute; top: 10px; inset-inline-end: 10px; padding: 3px 9px; border-radius: 7px; font-size: 12.5px; font-weight: 500; background: rgba(28, 28, 32, 0.55); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.16); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.wtile-info { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-inline: 2px; }
.wtile-text { display: flex; flex-direction: column; min-width: 0; }
.wtile .tile-buy { margin: 0; flex-shrink: 0; gap: 8px; }
.wtile .price-old { display: none; }

/* Grouped inset list */
.group-list { border-radius: 14px; overflow: hidden; background: rgba(44, 44, 49, 0.5); box-shadow: inset 0 0 0 0.5px var(--border); }
.group-list > * + * { border-top: 1px solid var(--sep); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; }
.two-col > * { border-top: 0 !important; border-bottom: 1px solid var(--sep); }
.two-col > :nth-last-child(-n + 2) { border-bottom: 0; }
.two-col > :nth-child(odd) { border-inline-end: 1px solid var(--sep); }
.row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto 16px; align-items: center; gap: 14px; padding: 10px 14px; transition: background 0.15s; }
.row:hover { background: var(--fill); }
.row-img { width: 96px; height: 45px; border-radius: 7px; object-fit: cover; background: var(--bg-3); box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.1); }
.row-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.row-title { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 13px; color: var(--text-2); }
.row-end { display: flex; align-items: center; gap: 10px; }
.row-chev { width: 15px; height: 15px; color: var(--text-3); }

/* ==========================================================
   Pages
   ========================================================== */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 6px 0 18px; }
.large-title { display: flex; align-items: center; gap: 10px; font-size: 30px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; }
.large-title .dot { width: 13px; height: 13px; }
.page-sub { font-size: 14px; color: var(--text-2); margin-top: 3px; }
.page-tools { display: flex; align-items: center; gap: 8px; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 28px 18px; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 90px 16px 50px; }
.empty-ic { width: 54px; height: 54px; color: var(--text-3); stroke-width: 1.2; margin-bottom: 8px; }
.empty h2 { font-size: 20px; font-weight: 700; }
.empty p { font-size: 14.5px; color: var(--text-2); max-width: 36ch; margin-bottom: 10px; }

/* ---------- Game details ---------- */
.gp-art { position: relative; aspect-ratio: 1920 / 620; max-height: 460px; min-height: 240px; width: 100%; border-radius: var(--r-xl); overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow-win); }
.gp-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 28%; animation: artIn 0.9s var(--ease) both; }
@keyframes artIn { from { opacity: 0; transform: scale(1.03); } }
.gp-art-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(12, 12, 14, 0.75) 0%, rgba(12, 12, 14, 0) 50%); }
.gp-art-logo { position: absolute; bottom: 26px; inset-inline-end: 32px; }
.gp-art-logo img { max-height: 96px; max-width: min(360px, calc(38vw / var(--z, 1))); }
.gp-art-logo .glogo-text { font-size: 30px; }

.gp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.gp-head { position: relative; display: flex; align-items: flex-end; gap: 20px; margin-top: -60px; padding-inline-start: 24px; }
.gp-cover { width: 108px; aspect-ratio: 2 / 3; border-radius: var(--r); object-fit: cover; flex-shrink: 0; background: var(--bg-3); box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.2), 0 14px 30px rgba(0, 0, 0, 0.5); }
.gp-head-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding-bottom: 2px; }
.gp-title { font-size: 28px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; }
.gp-studio { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--text-2); }
.gp-studio i { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }
.gp-head .tags { margin-top: 4px; }
.gp-sec { margin-top: 36px; }
.gp-sec .sec-title { margin-bottom: 14px; }
.gp-sec .sec-head .sec-title { margin-bottom: 0; }
.shots { grid-auto-columns: 360px; gap: 14px; }
.shot { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow-1); cursor: zoom-in; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot:hover { transform: scale(1.025); box-shadow: var(--shadow-2); }
.shot-zoom { position: absolute; bottom: 8px; inset-inline-end: 8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(28, 28, 32, 0.55); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); opacity: 0; transition: opacity 0.2s; }
.shot-zoom .ic { width: 15px; height: 15px; }
.shot:hover .shot-zoom, .shot:focus-visible .shot-zoom { opacity: 1; }
.gp-lead { font-size: 16px; line-height: 1.75; color: #d9d9de; max-width: 70ch; }
html[lang="ar"] .gp-lead { line-height: 1.95; }
.info-row { display: grid; grid-template-columns: 20px minmax(110px, 180px) minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 16px; font-size: 14.5px; }
.info-ic { color: var(--accent); }
.info-label { color: var(--text-2); }
.info-value { text-align: end; overflow-wrap: anywhere; }
.steps { counter-reset: s; }
.step { display: flex; align-items: flex-start; gap: 14px; padding: 13px 16px; }
.step-n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; }
.step b { display: block; font-size: 14.5px; font-weight: 600; }
.step small { display: block; font-size: 13.5px; color: var(--text-2); margin-top: 1px; }

.gp-side { position: sticky; top: 76px; margin-top: 24px; }
.panel {
  padding: 20px; border-radius: 18px; background: var(--panel);
  box-shadow: inset 0 0 0 0.5px var(--border), inset 0 0.5px 0 rgba(255, 255, 255, 0.08), 0 16px 40px rgba(0, 0, 0, 0.3);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.buy-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.buy-label { font-size: 13px; color: var(--text-2); }
.buy-now { font-size: 34px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; margin: 4px 0 2px; }
.buy-was { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13.5px; }
.buy-was s { color: var(--text-3); }
.buy-was span { color: var(--accent); }
.buy-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.buy-facts { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--sep); }
.buy-facts li { display: flex; align-items: flex-start; gap: 11px; }
.buy-facts .ic { color: var(--accent); margin-top: 2px; }
.buy-facts span { display: flex; flex-direction: column; line-height: 1.4; }
.buy-facts small { font-size: 12.5px; color: var(--text-2); }
.buy-facts b { font-size: 14px; font-weight: 500; }
.buy-note { font-size: 12.5px; color: var(--text-3); margin-top: 12px; }

/* Screenshot viewer window */
.viewer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.2s; }
.viewer.is-open { opacity: 1; }
.viewer[hidden] { display: none; }
.viewer-win { width: min(1120px, 100%); border-radius: var(--r-lg); overflow: hidden; background: #232327; box-shadow: var(--shadow-win); transform: scale(0.95); transition: transform 0.25s var(--spring); }
.viewer.is-open .viewer-win { transform: none; }
.viewer-bar { display: flex; align-items: center; gap: 10px; height: 46px; padding-inline: 16px 6px; border-bottom: 1px solid var(--sep); background: rgba(44, 44, 49, 0.8); }
.viewer-title { flex: 1; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-count { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.viewer-stage { position: relative; background: #000; }
.viewer-stage img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; }
.viewer-nav .ic { width: 18px; height: 18px; }
.viewer-nav.prev { inset-inline-start: 12px; }
.viewer-nav.next { inset-inline-end: 12px; }

/* ---------- Cart ---------- */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.cart-layout .gp-side { margin-top: 0; }
.cart-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 16px; }
.cart-img img { width: 100%; aspect-ratio: 460 / 215; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.1); }
.cart-text { display: flex; flex-direction: column; min-width: 0; }
.cart-title { font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-sub { font-size: 13px; color: var(--text-2); margin: 2px 0 10px; }
.cart-ctrl { display: flex; align-items: center; gap: 16px; }
.stepper { display: inline-flex; align-items: center; height: 28px; border-radius: 8px; background: var(--fill-2); box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.1); }
.stepper button { width: 30px; height: 28px; display: grid; place-items: center; color: var(--text); cursor: pointer; border-radius: 8px; transition: background 0.15s; }
.stepper button:hover { background: var(--fill); }
.stepper button:active { background: var(--fill-3); }
.stepper .ic { width: 14px; height: 14px; }
.stepper output { min-width: 24px; text-align: center; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; border-inline: 1px solid var(--sep); line-height: 16px; }
.link-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; color: var(--text-2); cursor: pointer; transition: color 0.15s; }
.link-btn .ic { width: 15px; height: 15px; }
.link-btn.danger:hover { color: var(--danger); }
.cart-price { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.summary .btn { margin-top: 8px; }
.summary-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.sum-row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 14px; color: var(--text-2); }
.sum-row.is-save { color: var(--accent); }
.sum-row.is-total { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--sep); font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.sum-foot { display: flex; align-items: center; gap: 6px; }
.sum-foot .ic { width: 15px; height: 15px; }

/* ==========================================================
   Overlays: notification, alert, search sheet
   ========================================================== */
.notify {
  position: fixed; top: 14px; inset-inline-end: 14px; z-index: 110; width: 350px; max-width: calc(calc(100vw / var(--z, 1)) - 28px);
  display: flex; align-items: center; gap: 11px; padding: 10px 10px 10px 12px; border-radius: 16px;
  background: var(--panel-strong); box-shadow: var(--shadow-win); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  transform: translateX(calc(100% + 24px)); opacity: 0; pointer-events: none; transition: transform 0.5s var(--spring), opacity 0.3s;
}
[dir="rtl"] .notify { transform: translateX(calc(-100% - 24px)); padding: 10px 12px 10px 10px; }
.notify.show, [dir="rtl"] .notify.show { transform: none; opacity: 1; pointer-events: auto; }
.notify-img { width: 60px; height: 28px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.notify-app .logo-mark { width: 30px; height: 30px; }
.notify-body { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.notify-body b { font-size: 13.5px; font-weight: 600; }
.notify-body span { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notify-link { flex-shrink: 0; padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text); background: var(--fill-2); transition: background 0.15s; }
.notify-link:hover { background: var(--fill-3); }

.alert-layer { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, 0.38); opacity: 0; transition: opacity 0.18s; }
.alert-layer.is-open { opacity: 1; }
.alert-layer[hidden] { display: none; }
.alert {
  width: 300px; padding: 22px 18px 16px; border-radius: 16px; text-align: center;
  background: rgba(50, 50, 56, 0.9); box-shadow: var(--shadow-win); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  transform: scale(1.06); opacity: 0; transition: transform 0.22s var(--spring), opacity 0.18s;
}
.alert-layer.is-open .alert { transform: none; opacity: 1; }
.alert-icon { position: relative; display: inline-block; }
.alert-icon .logo-mark { width: 56px; height: 56px; }
.alert-badge { position: absolute; bottom: -4px; inset-inline-end: -8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #3a3a40; color: var(--accent); box-shadow: 0 0 0 2px rgba(50, 50, 56, 1); }
.alert-badge .ic { width: 16px; height: 16px; }
.alert h2 { font-size: 15px; font-weight: 700; margin: 14px 0 6px; }
.alert p { font-size: 13.5px; color: var(--text-2); line-height: 1.55; margin-bottom: 18px; }

.sheet { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; background: rgba(28, 28, 31, 0.96); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); opacity: 0; transform: translateY(14px); transition: opacity 0.2s, transform 0.25s var(--ease); }
.sheet.is-open { opacity: 1; transform: none; }
.sheet[hidden] { display: none; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; border-bottom: 1px solid var(--sep); }
.sheet-field { flex: 1; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px; border-radius: 11px; background: var(--fill-2); color: var(--text-3); }
.sheet-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; color: var(--text); }
.sheet-field input::-webkit-search-cancel-button { display: none; }
.sheet-cancel { font-size: 16px; color: var(--accent); cursor: pointer; }
.sheet-list { flex: 1; overflow-y: auto; padding: 8px; }

/* Footer */
.footer { margin: 52px var(--gutter) 0; padding: 20px 0 28px; border-top: 1px solid var(--sep); }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.foot-brand { display: inline-flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 600; }
.foot-brand .logo-mark { width: 24px; height: 24px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13.5px; color: var(--text-2); }
.foot-links a:hover { color: var(--text); }
.foot-note { margin-top: 12px; font-size: 12.5px; color: var(--text-3); }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1600px) {
  .colls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Tablet: sidebar becomes a sliding drawer */
@media (max-width: 480px) {
  .shell, .shell.sb-collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 90; width: 290px; padding: 8px; transform: translateX(-104%); transition: transform 0.38s var(--ease); }
  [dir="rtl"] .sidebar { transform: translateX(104%); }
  .sb-open .sidebar, [dir="rtl"] .sb-open .sidebar { transform: none; }
  .sb-panel, .sb-collapsed .sb-panel { width: 100%; opacity: 1; transform: none; background: rgba(36, 36, 41, 0.88); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, 0.35); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
  .sb-open .scrim { opacity: 1; pointer-events: auto; }
  .toolbar, [dir="rtl"] .toolbar { padding: 10px var(--gutter) 0; }
  .tb-search { width: 220px; }
  .tb-search:focus-within { width: 250px; }
  .gp-grid { grid-template-columns: minmax(0, 1fr); }
  .gp-side { position: static; }
  .cart-layout { grid-template-columns: minmax(0, 1fr); }
  body[data-route="game"] .buybar { display: flex; }
  body[data-route="game"] { padding-bottom: 88px; }
}

/* Buy bar (shared tablet + phone) */
.buybar {
  position: fixed; z-index: 70; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  align-items: center; gap: 14px; padding: 9px 9px 9px 16px; border-radius: 18px;
  background: var(--panel-strong); box-shadow: var(--shadow-win); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
[dir="rtl"] .buybar { padding: 9px 16px 9px 9px; }
.buybar-price { display: flex; flex-direction: column; line-height: 1.25; flex-shrink: 0; }
.buybar-price s, .buybar-price span { font-size: 12.5px; color: var(--text-2); }
.buybar-price b { font-size: 18px; font-weight: 700; }
.buybar .btn { flex: 1; }

/* Phone */
@media (max-width: 480px) {
  :root { --gutter: 16px; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); font-size: 15px; }
  body[data-route="game"], body[data-route="cart"] { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .toolbar, [dir="rtl"] .toolbar { padding: 8px 10px 0; }
  .tb { height: 50px; gap: 4px; padding: 0 5px; }
  .tb-nav [data-action="forward"], .tb-search, .hide-sm { display: none; }
  body[data-route="home"] .tb-nav { display: none; }
  .tb-search-btn { display: inline-flex; }
  .tb-title { font-size: 16px; margin-inline-start: 4px; }
  .view { padding: 14px var(--gutter) 20px; }

  .tabbar {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 70; display: grid; grid-template-columns: repeat(5, 1fr);
    height: calc(62px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(26, 26, 30, 0.8); border-top: 1px solid var(--sep); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  }
  .tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 500; color: var(--text-2); }
  .tab .ic { width: 24px; height: 24px; }
  .tab.is-active { color: var(--accent); }
  .tab .count { top: 5px; inset-inline-end: calc(50% - 22px); }
  body[data-route="game"] .tabbar, body[data-route="cart"] .tabbar { display: none; }
  body[data-route="cart"] .buybar { display: flex; }
  .notify { top: 8px; inset-inline: 8px; width: auto; transform: translateY(-130%); }
  [dir="rtl"] .notify { transform: translateY(-130%); }

  .feature { height: 470px; border-radius: 18px; }
  .fx-art { object-position: 58% center; }
  .fx-shade, [dir="rtl"] .fx-shade { background: linear-gradient(0deg, rgba(12, 12, 14, 0.94) 0%, rgba(12, 12, 14, 0.6) 42%, rgba(12, 12, 14, 0) 72%); }
  .fx-content { inset-inline: 18px; bottom: 50px; max-width: none; gap: 12px; }
  .fx-logo img { max-height: 78px; max-width: calc(74vw / var(--z, 1)); }
  .fx-desc { font-size: 14.5px; }
  .fx-buy { width: 100%; }
  .fx-price { order: -1; width: 100%; margin: 0; }
  .fx-buy .btn-primary { flex: 1; }
  .fx-buy .btn-glass { display: none; }
  .fx-pager { inset-inline: 0; margin-inline: auto; width: max-content; bottom: 16px; }

  .sec { margin-top: 34px; }
  .sec-title { font-size: 20px; }
  .pager { display: none; }
  .colls, .carousel { display: grid; grid-auto-flow: column; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .colls::-webkit-scrollbar { display: none; }
  .colls { grid-auto-columns: 84%; gap: 12px; padding-block: 2px 8px; }
  .colls > * { scroll-snap-align: start; }
  .tiles-row { grid-auto-columns: 40%; gap: 14px; }
  .wtiles-row { grid-auto-columns: 82%; gap: 14px; }
  .two-col { grid-template-columns: 1fr; }
  .two-col > :nth-child(odd) { border-inline-end: 0; }
  .two-col > :nth-last-child(2) { border-bottom: 1px solid var(--sep); }
  .row { grid-template-columns: 80px minmax(0, 1fr) auto; gap: 12px; padding: 10px 12px; }
  .row-img { width: 80px; height: 37px; }
  .row-chev { display: none; }
  .row-end { flex-direction: column; align-items: flex-end; gap: 3px; }
  .row .price-old { display: none; }

  .large-title { font-size: 26px; }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .tile-wish { opacity: 1; }

  .gp-art { aspect-ratio: 16 / 10; min-height: 0; border-radius: 18px; }
  .gp-art-logo { inset-inline-end: 18px; bottom: 70px; }
  .gp-art-logo img { max-height: 54px; max-width: calc(46vw / var(--z, 1)); }
  .gp-head { margin-top: -54px; padding-inline-start: 14px; gap: 14px; }
  .gp-cover { width: 86px; }
  .gp-title { font-size: 21px; }
  .gp-studio { font-size: 13.5px; }
  .shots { grid-auto-columns: 84%; }
  .gp-sec { margin-top: 30px; }
  .gp-lead { font-size: 15.5px; }
  .info-row { grid-template-columns: 20px minmax(0, 1fr); row-gap: 2px; padding: 11px 14px; }
  .info-value { grid-column: 2; text-align: start; }
  .gp-side .buy-actions .btn-primary { display: none; }
  .viewer { padding: 10px; }
  .viewer-nav { width: 34px; height: 34px; }

  .cart-row { grid-template-columns: 104px minmax(0, 1fr); padding: 12px; gap: 12px; }
  .cart-price { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--sep); }
  .cart-sub { margin-bottom: 8px; }
  .cart-ctrl { gap: 12px; }
  .summary [data-checkout] { display: none; }
  .footer { margin-top: 36px; }
  .foot-links { gap: 6px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  [data-reveal], .fx-content > * { opacity: 1; transform: none; }
}

/* ==========================================================
   v4 — Discovery, ratings, account, advanced search
   ========================================================== */

/* Image skeletons: containers shimmer until the image has loaded */
.tile-art, .wtile-art, .sc-stage, .gp-art, .shot, .coll-cover, .dp-hero, .dp-shots > span, .mini, .cart-img, .wrow-img, .sc-pick-img {
  background: linear-gradient(100deg, #222226 30%, #2b2b30 50%, #222226 70%) 0 0 / 220% 100%;
  animation: shimmer 1.5s linear infinite;
}
@keyframes shimmer { to { background-position: -220% 0; } }
:is(.tile-art, .wtile-art, .sc-slide, .gp-art, .shot, .coll-cover, .dp-hero, .dp-shots, .mini, .cart-img, .wrow-img, .sc-pick-img) img.lz { opacity: 0; transition: opacity 0.4s var(--ease); }
:is(.tile-art, .wtile-art, .sc-slide, .gp-art, .shot, .coll-cover, .dp-hero, .dp-shots, .mini, .cart-img, .wrow-img, .sc-pick-img) img.lz.is-loaded { opacity: 1; }

/* Ratings */
.rating-inline { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.mc { display: inline-grid; place-items: center; min-width: 24px; height: 18px; padding: 0 4px; border-radius: 4px; font-size: 11.5px; font-weight: 700; color: #101012; font-variant-numeric: tabular-nums; }
.mc-high { background: #5cc97b; } .mc-mid { background: #f2c94c; } .mc-low { background: #ff7a6e; }
.recs { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.recs .ic { width: 13px; height: 13px; }
.tile-sub { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tile-sub > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.row-sub { display: flex; align-items: center; gap: 8px; }

/* Showcase (cinematic stage + selectable rail) */
.showcase { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 14px; height: clamp(420px, calc(40vw / var(--z, 1)), 580px); }
.sc-stage { position: relative; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-win); isolation: isolate; }
.sc-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.9s var(--ease), visibility 0.9s; }
.sc-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.sc-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 28%; transform: scale(1.05); transition: transform 8s linear, opacity 0.5s; }
.sc-slide.is-active .sc-art { transform: scale(1); }
.sc-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(12, 12, 14, 0.92) 0%, rgba(12, 12, 14, 0.45) 38%, rgba(12, 12, 14, 0) 66%), linear-gradient(90deg, rgba(12, 12, 14, 0.66) 0%, rgba(12, 12, 14, 0) 55%); }
[dir="rtl"] .sc-shade { background: linear-gradient(0deg, rgba(12, 12, 14, 0.92) 0%, rgba(12, 12, 14, 0.45) 38%, rgba(12, 12, 14, 0) 66%), linear-gradient(270deg, rgba(12, 12, 14, 0.66) 0%, rgba(12, 12, 14, 0) 55%); }
.sc-content { position: absolute; inset-inline: 40px; bottom: 34px; max-width: 540px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.sc-content > * { opacity: 0; transform: translateY(10px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.sc-slide.is-active .sc-content > * { opacity: 1; transform: none; }
.sc-slide.is-active .sc-content > :nth-child(2) { transition-delay: 0.07s; }
.sc-slide.is-active .sc-content > :nth-child(3) { transition-delay: 0.14s; }
.sc-slide.is-active .sc-content > :nth-child(4) { transition-delay: 0.21s; }
.sc-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.88); background: rgba(30, 30, 34, 0.45); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.18); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
[dir="rtl"] .sc-kicker { padding: 4px 12px 4px 6px; }
.sc-logo img { max-height: 116px; max-width: min(420px, calc(70vw / var(--z, 1))); }
.sc-logo .glogo-text { font-size: clamp(30px, calc(4vw / var(--z, 1)), 46px); }
.sc-desc { font-size: 16px; color: rgba(236, 236, 240, 0.86); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sc-buy { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.sc-price { display: inline-flex; align-items: center; gap: 8px; }
.sc-price .price-now { font-size: 20px; font-weight: 700; }
.sc-price .price-old { font-size: 14px; color: rgba(255, 255, 255, 0.55); }
.sc-actions { display: flex; align-items: center; gap: 10px; }
.mat-lg { width: 42px; height: 42px; }
.mat-lg .ic { width: 18px; height: 18px; }
.sc-rail { display: flex; flex-direction: column; gap: 6px; }
.sc-pick { position: relative; flex: 1; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; text-align: start; cursor: pointer; color: var(--text-2); transition: background 0.2s, color 0.2s; overflow: hidden; }
.sc-pick:hover { background: var(--fill); color: var(--text); }
.sc-pick.is-active { background: var(--panel); color: var(--text); box-shadow: inset 0 0 0 0.5px var(--border); }
.sc-pick-img { width: 56px; aspect-ratio: 2 / 3; border-radius: 7px; overflow: hidden; flex-shrink: 0; box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.12); }
.sc-pick-img img { width: 100%; height: 100%; object-fit: cover; }
.sc-pick-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.sc-pick-title { font-size: 14px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sc-pick-sub { font-size: 12.5px; color: var(--text-3); }
.sc-bar { position: absolute; inset-inline: 10px; bottom: 5px; height: 2px; border-radius: 2px; overflow: hidden; opacity: 0; }
.sc-pick.is-active .sc-bar { opacity: 1; background: var(--fill-2); }
.sc-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.sc-pick.is-active .sc-bar i { animation: fxFill var(--sc-ms, 7s) linear forwards; }
.showcase.is-paused .sc-pick.is-active .sc-bar i { animation-play-state: paused; }

/* Recently viewed + hint */
.mini-row { grid-auto-columns: 196px; gap: 14px; }
.mini { display: flex; flex-direction: column; gap: 8px; border-radius: 10px; background: none; animation: none; }
.mini img { width: 100%; aspect-ratio: 460 / 215; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow-1); transition: transform 0.3s var(--ease); background: #222226; }
.mini:hover img { transform: scale(1.03); }
.mini span { font-size: 13.5px; font-weight: 500; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec.hint { display: flex; align-items: center; gap: 16px; }
.hint-ic { width: 28px; height: 28px; color: var(--accent); }
.hint-title { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.hint p { font-size: 14px; color: var(--text-2); max-width: 70ch; }

/* Segmented tabs */
.seg-tabs { display: inline-grid; grid-auto-flow: column; grid-auto-columns: auto; grid-template-columns: none; margin-bottom: 12px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg-tabs button, .seg-tabs a { padding: 0 14px; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; border-radius: 7px; font-size: 13.5px; font-weight: 500; color: var(--text-2); cursor: pointer; transition: background 0.2s, color 0.2s; }
.seg-tabs a .ic { width: 16px; height: 16px; }
.seg-tabs .is-on { background: var(--fill-3); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), inset 0 0.5px 0 rgba(255, 255, 255, 0.12); }
.seg-sm { display: inline-grid; grid-auto-flow: column; grid-template-columns: none; }
.seg-sm button { height: 26px; padding: 0 12px; font-size: 12.5px; }

/* Discovery panel */
.discover { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); padding: 0; overflow: hidden; }
.dl { padding: 6px; }
.dl-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 10px; transition: background 0.15s; }
.dl-row:hover { background: var(--fill); }
.dl-row.is-active { background: var(--fill-2); }
.dl-img { width: 120px; height: 56px; border-radius: 7px; object-fit: cover; background: var(--bg-3); box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.1); }
.dl-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.dl-title { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-sub { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; }
.dl-sub .dot { width: 7px; height: 7px; }
.dl-price { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.dp { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-inline-start: 1px solid var(--sep); background: rgba(0, 0, 0, 0.12); transition: opacity 0.12s; }
.dp.is-swapping { opacity: 0.35; }
.dp-hero { display: block; border-radius: 10px; overflow: hidden; }
.dp-hero img { width: 100%; aspect-ratio: 460 / 215; object-fit: cover; }
.dp-title { font-size: 18px; font-weight: 700; line-height: 1.3; }
.dp-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); margin: 4px 0 8px; }
.dp-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: none; animation: none; }
.dp-shots > span { aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; }
.dp-shots img { width: 100%; height: 100%; object-fit: cover; }

/* Game page additions */
.gp-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 2px; }
.score { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 500; background: var(--fill); }
.score .ic { width: 15px; height: 15px; color: var(--text-2); }
.score.is-accent, .feat.is-accent { background: var(--accent-soft); color: var(--accent); }
.score.is-accent .ic, .feat.is-accent .ic { color: var(--accent); }
.feats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.feat { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 8px; font-size: 13px; background: var(--fill); }
.feat .ic { width: 15px; height: 15px; color: var(--text-2); }
.panel-title { font-size: 14.5px; font-weight: 700; margin-bottom: 12px; }
.rev-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 14px; align-items: start; }
.rev-scores { display: flex; flex-wrap: wrap; gap: 14px 26px; }
.big-score { display: flex; align-items: center; gap: 10px; }
.big-score b { display: block; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.big-score small { display: block; font-size: 12.5px; color: var(--text-2); }
.mc-lg { min-width: 48px; height: 48px; border-radius: 10px; font-size: 20px; }
.recs-lg { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--fill); color: var(--accent); }
.recs-lg .ic { width: 22px; height: 22px; }
.muted-note { display: flex; align-items: flex-start; gap: 6px; font-size: 12.5px; color: var(--text-3); margin-top: 12px; line-height: 1.5; }
.muted-note .ic { width: 15px; height: 15px; margin-top: 1px; }
.gp-note { margin-top: 10px; }
.rev-empty .empty { padding: 14px 0 6px; }
.rev-empty .empty-ic { width: 36px; height: 36px; margin-bottom: 2px; }
.rev-empty .empty h2 { font-size: 16px; }
.rev-empty .empty p { font-size: 13.5px; }
.my-rev-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.my-rev-date { font-size: 12.5px; color: var(--text-3); }
.my-rev-actions { display: flex; gap: 12px; margin-inline-start: auto; }
.my-rev p:not(.muted-note) { font-size: 14.5px; margin-top: 8px; color: #dcdce0; }
.stars { display: inline-flex; gap: 1px; font-size: 15px; }
.stars i { font-style: normal; color: var(--text-3); }
.stars i.on { color: #f5c84c; }
.rev-form { display: flex; flex-direction: column; gap: 10px; }
.star-input { border: 0; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.star-input legend { font-size: 13px; color: var(--text-2); margin-bottom: 4px; width: 100%; }
.star-input label { position: relative; cursor: pointer; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label > span[aria-hidden] { font-size: 28px; line-height: 1; color: var(--text-3); transition: color 0.12s, transform 0.15s var(--spring); display: inline-block; }
.star-input label:hover > span[aria-hidden] { transform: scale(1.12); }
.star-input input:focus-visible + span { outline: 2px solid var(--accent); border-radius: 4px; }
.star-input:has(label:nth-of-type(1) input:checked) label:nth-of-type(-n + 1) > span[aria-hidden],
.star-input:has(label:nth-of-type(2) input:checked) label:nth-of-type(-n + 2) > span[aria-hidden],
.star-input:has(label:nth-of-type(3) input:checked) label:nth-of-type(-n + 3) > span[aria-hidden],
.star-input:has(label:nth-of-type(4) input:checked) label:nth-of-type(-n + 4) > span[aria-hidden],
.star-input:has(label:nth-of-type(5) input:checked) label:nth-of-type(-n + 5) > span[aria-hidden] { color: #f5c84c; }
.rev-form textarea { width: 100%; min-height: 96px; padding: 10px 12px; border: 0; border-radius: 10px; resize: vertical; font: inherit; font-size: 14.5px; color: var(--text); background: var(--fill); box-shadow: inset 0 0 0 0.5px var(--border); outline: none; }
.rev-form textarea:focus { box-shadow: 0 0 0 3px rgba(184, 147, 242, 0.45); }
.form-error { font-size: 13px; color: var(--danger); }
.form-error[hidden] { display: none; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.req-row { grid-template-columns: minmax(110px, 170px) minmax(0, 1fr); }
.req-row .info-value { text-align: start; }
.preview-inline { color: var(--accent); }

/* Sidebar preview badge */
.preview-badge { font-size: 12px; color: var(--text-2); line-height: 1.45; margin-bottom: 10px; padding: 8px 10px; border-radius: 9px; background: var(--fill); }
.preview-badge span { display: inline-block; font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 0 6px; border-radius: 5px; margin-inline-end: 6px; }

/* Alerts popover */
.tb-alerts { position: relative; }
.alerts-pop { width: 380px; }
.pop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px 6px 10px; }
.pop-head b { font-size: 14.5px; }
.alert-item.is-new { box-shadow: inset 3px 0 0 var(--accent); }
[dir="rtl"] .alert-item.is-new { box-shadow: inset -3px 0 0 var(--accent); }
.pop-note { font-size: 12px; color: var(--text-3); padding: 8px 10px 4px; border-top: 1px solid var(--sep); margin-top: 4px; }
.pop-empty b { color: var(--text); font-size: 14.5px; }
.pop-empty span { font-size: 13px; text-align: center; max-width: 30ch; }

/* Wishlist */
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 16px; margin-bottom: 14px; border-radius: 12px; background: var(--accent-soft); box-shadow: inset 0 0 0 0.5px rgba(184, 147, 242, 0.35); }
.banner > .ic { color: var(--accent); }
.banner > span:first-of-type { font-size: 14.5px; font-weight: 500; }
.banner-note { font-size: 12.5px; color: var(--text-2); margin-inline-start: auto; }
.wrow { display: grid; grid-template-columns: 184px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 16px; }
.wrow-img { display: block; border-radius: 8px; overflow: hidden; }
.wrow-img img { width: 100%; aspect-ratio: 460 / 215; object-fit: cover; }
.wrow-text { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.wrow-title { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wrow-sub { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.wrow-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--text-3); }
.drop { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 600; }
.drop .ic { width: 14px; height: 14px; }
.wrow-buy { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.wrow-price { display: flex; align-items: center; gap: 8px; }
.wrow-actions { display: flex; align-items: center; gap: 12px; }

/* Account */
.acc-tabs { margin-bottom: 18px; }
.acc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.nc { position: relative; }
.nc-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); background: var(--fill); padding: 4px 10px; border-radius: 999px; }
.nc-status .ic { width: 14px; height: 14px; }
.nc .empty { padding: 40px 10px 24px; }
.dsteps { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 14px; }
.dsteps li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.dnote { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-2); padding: 10px 12px; border-radius: 10px; background: var(--fill); line-height: 1.55; }
.dnote .ic { color: var(--accent); width: 16px; height: 16px; margin-top: 2px; }

/* Advanced search */
.browse { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 24px; align-items: start; }
.filters { position: sticky; top: 76px; max-height: calc(calc(100vh / var(--z, 1)) - 96px); overflow-y: auto; padding: 16px; scrollbar-width: thin; }
.f-sheet-head, .f-sheet-foot, .f-open, .f-scrim { display: none; }
.f-block + .f-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--sep); }
.f-title { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.f-search { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 9px; background: var(--fill); box-shadow: inset 0 0 0 0.5px var(--border); color: var(--text-3); }
.f-search:focus-within { box-shadow: 0 0 0 3px rgba(184, 147, 242, 0.45); }
.f-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 14px; color: var(--text); }
.f-search input::-webkit-search-cancel-button { display: none; }
.f-checks, .f-radios { display: flex; flex-direction: column; gap: 1px; }
.check, .radio { position: relative; display: flex; align-items: center; gap: 9px; min-height: 30px; padding: 0 6px; border-radius: 7px; font-size: 14px; cursor: pointer; transition: background 0.12s; }
.check:hover, .radio:hover { background: var(--fill); }
.check input, .radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.box, .dotbox { width: 16px; height: 16px; flex-shrink: 0; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.04); transition: background 0.15s, box-shadow 0.15s; display: grid; place-items: center; }
.box { border-radius: 4.5px; }
.dotbox { border-radius: 50%; }
.check input:checked + .box { background: var(--accent-fill); box-shadow: none; }
.check input:checked + .box::after { content: ""; width: 8px; height: 4.5px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); }
.radio input:checked + .dotbox { box-shadow: inset 0 0 0 5px var(--accent-fill); background: #fff; }
.check input:focus-visible + .box, .radio input:focus-visible + .dotbox { outline: 3px solid rgba(184, 147, 242, 0.5); outline-offset: 1px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; font-size: 14px; cursor: pointer; }
.switch-row > span { display: inline-flex; align-items: center; gap: 8px; }
.switch-row .ic { width: 16px; height: 16px; color: var(--text-2); }
.switch-row.is-locked { opacity: 0.6; cursor: default; }
.switch { appearance: none; -webkit-appearance: none; position: relative; width: 34px; height: 20px; border-radius: 10px; background: var(--fill-3); cursor: pointer; transition: background 0.2s; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); transition: transform 0.22s var(--spring); }
.switch:checked { background: var(--accent-fill); }
.switch:checked::after { transform: translateX(14px); }
[dir="rtl"] .switch:checked::after { transform: translateX(-14px); }
.switch:focus-visible { outline: 3px solid rgba(184, 147, 242, 0.5); outline-offset: 2px; }
.f-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent-fill); color: #fff; font-size: 11px; font-weight: 700; }
.f-badge[hidden] { display: none; }
.results { min-width: 0; }

/* ---------- v4 responsive ---------- */
@media (max-width: 480px) {
  .showcase { grid-template-columns: minmax(0, 1fr) 232px; }
  .acc-grid { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 480px) {
  .showcase { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; height: auto; }
  .sc-stage { height: clamp(400px, calc(52vw / var(--z, 1)), 520px); }
  .sc-rail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .acc-grid { grid-template-columns: minmax(0, 1fr); }
  .rev-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .discover { grid-template-columns: minmax(0, 1fr); }
  .dp { display: none; }
  .browse { grid-template-columns: minmax(0, 1fr); }
  .f-open { display: inline-flex; }
  .filters {
    position: fixed; inset-inline: 0; bottom: 0; top: auto; z-index: 96; max-height: calc(86vh / var(--z, 1)); padding: 0;
    display: flex; flex-direction: column; border-radius: 18px 18px 0 0; background: rgba(36, 36, 41, 0.97);
    transform: translateY(105%); transition: transform 0.35s var(--ease);
  }
  .browse.f-is-open .filters { transform: none; }
  .f-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 10px 18px; border-bottom: 1px solid var(--sep); font-size: 16px; }
  [dir="rtl"] .f-sheet-head { padding: 10px 18px 10px 10px; }
  .f-scroll { flex: 1; overflow-y: auto; padding: 16px 18px; }
  .f-sheet-foot { display: block; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--sep); }
  .f-scrim { display: block; position: fixed; inset: 0; z-index: 95; background: rgba(0, 0, 0, 0.4); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
  .browse.f-is-open ~ .f-scrim { opacity: 1; pointer-events: auto; }
  .check, .radio { min-height: 40px; font-size: 15px; }
  .switch-row { min-height: 44px; font-size: 15px; }
}
@media (max-width: 480px) {
  .sc-stage { height: 480px; border-radius: 18px; }
  .sc-art { object-position: 58% center; }
  .sc-shade, [dir="rtl"] .sc-shade { background: linear-gradient(0deg, rgba(12, 12, 14, 0.95) 0%, rgba(12, 12, 14, 0.6) 42%, rgba(12, 12, 14, 0) 72%); }
  .sc-content { inset-inline: 18px; bottom: 22px; gap: 11px; }
  .sc-logo img { max-height: 76px; max-width: calc(72vw / var(--z, 1)); }
  .sc-desc { font-size: 14.5px; }
  .sc-buy, .sc-actions { width: 100%; }
  .sc-actions .btn-primary { flex: 1; }
  .sc-actions .btn-glass { display: none; }
  .sc-rail { gap: 6px; }
  .sc-pick { height: 18px; padding: 0; background: none !important; box-shadow: none !important; }
  .sc-pick-img, .sc-pick-text { display: none; }
  .sc-bar { inset-inline: 0; bottom: 7px; height: 3px; opacity: 1; background: var(--fill-2); }
  .mini-row { grid-auto-columns: 58%; }
  .sec.hint { align-items: flex-start; }
  .dl-row { grid-template-columns: 96px minmax(0, 1fr) auto; gap: 10px; padding: 7px 6px; }
  .dl-img { width: 96px; height: 45px; }
  .dl .price-old { display: none; }
  .seg-tabs { display: flex; width: 100%; }
  .seg-tabs button, .seg-tabs a { flex: 1 0 auto; }
  .wrow { grid-template-columns: 104px minmax(0, 1fr); padding: 12px; gap: 12px; }
  .wrow-buy { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--sep); }
  .wrow-title { font-size: 15px; }
  .btn-label-static { display: none; }
  .banner-note { margin-inline-start: 0; width: 100%; }
  .alerts-pop { position: fixed; top: 64px; inset-inline: 8px; width: auto; }
  .rev-scores { gap: 14px 20px; }
}

/* ==========================================================
   v5 — Accounts
   ========================================================== */
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
.muted { font-size: 13.5px; color: var(--text-2); }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--accent); margin-bottom: 10px; }
.back-link .ic { width: 16px; height: 16px; }

/* Avatar */
.avatar { display: inline-grid; place-items: center; flex-shrink: 0; border-radius: 50%; overflow: hidden; background: var(--bg-3); box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.18); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.av-initials { color: #fff; font-weight: 600; letter-spacing: 0.02em; background: linear-gradient(160deg, hsl(var(--h) 45% 52%), hsl(calc(var(--h) + 30) 45% 36%)); }
.av-xs { width: 26px; height: 26px; font-size: 10.5px; }
.av-sm { width: 34px; height: 34px; font-size: 12.5px; }
.av-md { width: 44px; height: 44px; font-size: 15px; }
.av-xl { width: 92px; height: 92px; font-size: 30px; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08), 0 12px 28px rgba(0, 0, 0, 0.4); }

/* Tier + status */
.tier { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.tier .ic { width: 13px; height: 13px; fill: currentColor; }
.tier-bronze { color: #e5b48c; background: linear-gradient(180deg, rgba(205, 127, 70, 0.28), rgba(205, 127, 70, 0.14)); box-shadow: inset 0 0 0 0.5px rgba(229, 180, 140, 0.4); }
.tier-silver { color: #e4e7ee; background: linear-gradient(180deg, rgba(200, 206, 218, 0.28), rgba(200, 206, 218, 0.12)); box-shadow: inset 0 0 0 0.5px rgba(228, 231, 238, 0.45); }
.tier-gold { color: #f2d483; background: linear-gradient(180deg, rgba(230, 184, 70, 0.32), rgba(230, 184, 70, 0.14)); box-shadow: inset 0 0 0 0.5px rgba(242, 212, 131, 0.5); }
.status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--fill); }
.status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-pending_payment { color: #f2c94c; } .st-paid { color: #64b5ff; } .st-delivered { color: #5fd38a; }
.st-cancelled { color: var(--text-2); } .st-refunded { color: #ff8a80; }

/* Buttons */
.btn-danger { color: #fff; background: linear-gradient(180deg, #ff6a5f, #e5483d); box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.35); }
.btn-danger:hover { filter: brightness(1.08); }
.danger-text { color: #ff8a80; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.field-box { position: relative; display: flex; align-items: center; height: 40px; border-radius: 10px; background: var(--fill); box-shadow: inset 0 0 0 0.5px var(--border); transition: box-shadow 0.15s, background 0.15s; }
.field-box:focus-within { background: var(--fill-2); box-shadow: 0 0 0 3px rgba(184, 147, 242, 0.45); }
.field-box.is-invalid { box-shadow: 0 0 0 1.5px rgba(255, 105, 97, 0.8); }
.field-box input { flex: 1; min-width: 0; height: 100%; padding: 0 12px; border: 0; outline: 0; background: none; font-size: 15px; color: var(--text); }
.field-box input[readonly] { color: var(--text-2); }
.field-prefix { padding-inline-start: 12px; color: var(--text-3); font-size: 15px; }
.has-prefix input { padding-inline-start: 2px; }
.field-eye { flex-shrink: 0; height: 28px; padding: 0 10px; margin-inline-end: 6px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--accent); cursor: pointer; }
.field-eye:hover { background: var(--fill); }
.field-hint { font-size: 12.5px; color: var(--text-3); }
.field-error { font-size: 12.5px; color: #ff8a80; }
.field-error[hidden], .form-banner[hidden] { display: none; }
.field textarea { width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; resize: vertical; font: inherit; font-size: 15px; color: var(--text); background: var(--fill); box-shadow: inset 0 0 0 0.5px var(--border); outline: none; }
.field textarea:focus { background: var(--fill-2); box-shadow: 0 0 0 3px rgba(184, 147, 242, 0.45); }
.form-banner { padding: 10px 12px; border-radius: 10px; font-size: 13.5px; color: #ffb3ab; background: rgba(255, 105, 97, 0.12); box-shadow: inset 0 0 0 0.5px rgba(255, 105, 97, 0.35); }
.form-link { align-self: flex-end; margin-top: -6px; font-size: 13.5px; color: var(--accent); }
.strength { display: flex; align-items: center; gap: 10px; margin-top: -6px; }
.strength > span { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; flex: 1; }
.strength i { height: 4px; border-radius: 2px; background: var(--fill-2); transition: background 0.25s; }
.strength small { min-width: 48px; font-size: 12px; color: var(--text-2); text-align: end; }
.strength[data-strength="0"] i:nth-child(-n + 1) { background: #ff6961; }
.strength[data-strength="1"] i:nth-child(-n + 2) { background: #f2c94c; }
.strength[data-strength="2"] i:nth-child(-n + 3) { background: #9fd36a; }
.strength[data-strength="3"] i { background: #5fd38a; }
.notice-inline { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-2); padding: 10px 12px; border-radius: 10px; background: var(--fill); }
.notice-inline .ic { color: var(--accent); width: 16px; height: 16px; margin-top: 2px; }

/* Auth window */
.auth { position: relative; display: grid; place-items: center; min-height: calc(calc(100vh / var(--z, 1)) - 140px); padding: 24px 0 40px; }
.auth-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.auth-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(60px) saturate(1.2); opacity: 0.28; transform: scale(1.15); }
.auth-card { width: min(440px, 100%); padding: 30px 28px 22px; text-align: start; animation: winIn 0.4s var(--spring); }
@keyframes winIn { from { opacity: 0; transform: scale(0.97) translateY(6px); } }
.auth-icon { display: block; width: 56px; height: 56px; margin: 0 auto 14px; }
.auth-icon .logo-mark { width: 56px; height: 56px; filter: drop-shadow(0 8px 18px rgba(138, 91, 214, 0.35)); }
.auth-title { font-size: 22px; font-weight: 700; text-align: center; letter-spacing: -0.01em; }
.auth-sub { font-size: 14px; color: var(--text-2); text-align: center; margin: 6px 0 20px; }
.auth-switch { margin-top: 16px; text-align: center; font-size: 14px; color: var(--text-2); }
.auth-switch a { color: var(--accent); font-weight: 500; }
.auth-dev { display: flex; gap: 6px; align-items: flex-start; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--sep); font-size: 12px; color: var(--text-3); line-height: 1.5; }
.auth-dev .ic { width: 14px; height: 14px; margin-top: 2px; }
.auth .empty { padding: 10px 0; }

/* Account frame */
.acct { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 22px; align-items: start; }
.acct-nav { position: sticky; top: 76px; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.acct-me { display: flex; align-items: center; gap: 10px; padding: 8px 8px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--sep); }
.acct-me span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.acct-me b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-me small { font-size: 12.5px; color: var(--text-2); }
.acct-nav nav { display: flex; flex-direction: column; gap: 2px; }
.acct-link { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 8px; font-size: 14.5px; color: var(--text); cursor: pointer; transition: background 0.15s; text-align: start; width: 100%; }
.acct-link .ic { width: 18px; height: 18px; color: var(--accent); }
.acct-link:hover { background: var(--fill); }
.acct-link.is-active { background: var(--fill-3); }
.acct-link.is-active .ic { color: var(--text); }
.acct-out { margin-top: 6px; border-top: 1px solid var(--sep); border-radius: 0 0 8px 8px; color: var(--text-2); padding-top: 4px; height: 40px; }
.acct-out .ic { color: var(--text-2); }
.acct-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; animation: viewIn 0.3s var(--ease); }
.acct-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gate .empty { padding: 50px 10px 30px; }
.gate-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.panel-head .panel-title { margin: 0; }
.panel-title { display: flex; align-items: center; gap: 8px; }
.panel-title .ic { color: var(--accent); }
.panel .empty { padding: 26px 10px 18px; }
.panel .empty-ic { width: 40px; height: 40px; }
.panel .empty h2 { font-size: 16.5px; }
.panel .empty p { font-size: 13.5px; }

/* Overview */
.profile-hero, .pub-hero { display: flex; align-items: center; gap: 20px; padding: 22px; background: radial-gradient(600px 200px at 0% 0%, rgba(138, 91, 214, 0.2), transparent 70%), var(--panel); }
[dir="rtl"] .profile-hero, [dir="rtl"] .pub-hero { background: radial-gradient(600px 200px at 100% 0%, rgba(138, 91, 214, 0.2), transparent 70%), var(--panel); }
.ph-text { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; flex: 1; }
.ph-name { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
html[lang="ar"] .ph-name { letter-spacing: 0; }
.ph-handle { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); }
.ph-handle i { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }
.ph-bio { font-size: 14.5px; color: #dcdce0; max-width: 60ch; }
.ph-actions { display: flex; flex-direction: column; gap: 8px; align-self: flex-start; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 16px; background: var(--panel); box-shadow: inset 0 0 0 0.5px var(--border); }
.stat > .ic { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.stat span { display: flex; flex-direction: column; min-width: 0; }
.stat small { font-size: 12.5px; color: var(--text-2); }
.stat b { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tier-card { display: block; padding: 16px 18px; transition: background 0.2s; }
.tier-card:hover { background: rgba(52, 52, 58, 0.7); }
.tierbar { display: flex; flex-direction: column; gap: 10px; }
.tierbar-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--text-2); }
.tierbar-track { height: 8px; border-radius: 4px; background: var(--fill-2); overflow: hidden; }
.tierbar-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-fill), var(--accent)); transition: width 0.8s var(--ease); }
[dir="rtl"] .tierbar-track i { background: linear-gradient(270deg, var(--accent-fill), var(--accent)); }
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.mini-wish { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mini-wish a { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.mini-wish img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 9px; box-shadow: var(--shadow-1); background: var(--bg-3); }
.mini-wish span { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Orders */
.ord-list.compact .ord-row { padding: 9px 4px; }
.ord-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto auto 16px; align-items: center; gap: 14px; padding: 12px 14px; transition: background 0.15s; }
.ord-row:hover { background: var(--fill); }
.ord-list.compact .ord-row { grid-template-columns: 72px minmax(0, 1fr) auto 16px; }
.ord-list.compact .ord-total { display: none; }
.ord-thumb { width: 100%; aspect-ratio: 460 / 215; border-radius: 7px; object-fit: cover; background: var(--bg-3); display: block; }
.ord-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.ord-title { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ord-sub { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.ord-sub i { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }
.ord-total { font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.od-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.od-grid > div { display: flex; flex-direction: column; gap: 16px; }
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; position: relative; }
.timeline li { display: flex; align-items: flex-start; gap: 10px; color: var(--text-3); }
.timeline li.done { color: var(--text); }
.tl-dot { display: grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; background: var(--fill-2); box-shadow: inset 0 0 0 1.5px var(--fill-3); }
.timeline li.done .tl-dot { background: #3aa864; box-shadow: none; color: #fff; }
.tl-dot .ic { width: 14px; height: 14px; }
.timeline b { display: block; font-size: 13.5px; font-weight: 600; }
.timeline small { font-size: 12px; color: var(--text-2); }
.od-item { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 14px 16px; align-items: start; }
.od-img img { width: 100%; aspect-ratio: 460 / 215; object-fit: cover; border-radius: 8px; }
.od-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.od-text b { font-size: 15px; }
.od-text small { font-size: 13px; color: var(--text-2); }
.od-summary { position: sticky; top: 76px; }

/* Key field */
.keyfield { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 8px 8px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.22); box-shadow: inset 0 0 0 0.5px var(--border); }
[dir="rtl"] .keyfield { padding: 8px 12px 8px 8px; }
.kf-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.kf-label .ic { width: 15px; height: 15px; color: var(--accent); }
.kf-code { flex: 1; min-width: 150px; font: 600 14px ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.06em; color: var(--text); }
.keyfield.is-pending { background: var(--fill); }

/* Library */
.lib-search { width: 220px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.lib-card { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 12px; border-radius: 16px; background: var(--panel); box-shadow: inset 0 0 0 0.5px var(--border); }
.lib-cover { display: block; border-radius: 9px; overflow: hidden; aspect-ratio: 2 / 3; }
.lib-cover img { width: 100%; height: 100%; object-fit: cover; }
.lib-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lib-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-sub { font-size: 12.5px; color: var(--text-2); }
.lib-sub a { color: var(--accent); }

/* Points */
.points-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 28px; padding: 24px; }
.points-hero.tier-gold { background: radial-gradient(500px 220px at 0% 0%, rgba(230, 184, 70, 0.18), transparent 70%), var(--panel); }
.points-hero.tier-silver { background: radial-gradient(500px 220px at 0% 0%, rgba(200, 206, 218, 0.16), transparent 70%), var(--panel); }
.points-hero.tier-bronze { background: radial-gradient(500px 220px at 0% 0%, rgba(205, 127, 70, 0.18), transparent 70%), var(--panel); }
.pts-balance { display: flex; flex-direction: column; }
.pts-balance small { font-size: 13px; color: var(--text-2); }
.pts-balance b { font-size: 44px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pts-balance span { font-size: 13.5px; color: var(--text-2); }
.pts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.pts-rule { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.pts-rule .ic { color: var(--accent); margin-top: 2px; }
.tiers-title { margin-top: 18px; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tier-step { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; border-radius: 12px; background: var(--fill); box-shadow: inset 0 0 0 0.5px var(--border); }
.tier-step small { font-size: 12px; color: var(--text-2); }
.tier-step em { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--accent); }
.tier-step.is-current { background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(184, 147, 242, 0.4); }
.rewards { display: flex; flex-direction: column; gap: 8px; }
.reward { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--fill); }
.reward-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.reward-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.reward-text b { font-size: 14.5px; }
.reward-text small { font-size: 12.5px; color: var(--text-2); }
.reward.is-locked .reward-ic { background: var(--fill-2); color: var(--text-3); }
.reward-need { font-size: 12px; color: var(--text-3); text-align: end; }
.codes { display: flex; flex-direction: column; gap: 6px; }
.code-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 9px; background: var(--fill); font-size: 13.5px; }
.code-row code { font: 600 13.5px ui-monospace, "SF Mono", Menlo, monospace; flex: 1; }
.code-row small { color: var(--text-3); }
.ledger { display: flex; flex-direction: column; }
.ledger-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--sep); }
.ledger-row:first-child { border-top: 0; }
.lg-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; }
.lg-ic .ic { width: 14px; height: 14px; }
.lg-ic.pos { background: rgba(95, 211, 138, 0.14); color: #5fd38a; }
.lg-ic.neg { background: rgba(255, 138, 128, 0.14); color: #ff8a80; }
.lg-text { display: flex; flex-direction: column; min-width: 0; }
.lg-text b { font-size: 14px; font-weight: 500; }
.lg-text small { font-size: 12.5px; color: var(--text-2); }
.lg-delta { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lg-delta.pos { color: #5fd38a; } .lg-delta.neg { color: #ff8a80; }

/* Settings + security */
.set-photo { display: flex; align-items: center; gap: 20px; }
.set-photo .panel-title { margin-bottom: 2px; }
.photo-preview { position: relative; }
.photo-preview.is-busy::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.45) center / 24px no-repeat; animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: 0.5; } }
.photo-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.photo-actions label { cursor: pointer; }
.switch-row > span b { display: block; font-size: 14.5px; font-weight: 500; }
.switch-row > span small { display: block; font-size: 12.5px; color: var(--text-2); font-weight: 400; }
.switch-row > span:has(b) { display: block; }
.set-form .switch-row { padding: 6px 0; border-top: 1px solid var(--sep); }
.sessions { display: flex; flex-direction: column; }
.session { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--sep); }
.session:first-child { border-top: 0; }
.session-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--fill); color: var(--text-2); }
.session b { display: block; font-size: 14px; }
.session small { font-size: 12.5px; color: var(--text-2); }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 16px; box-shadow: inset 0 0 0 0.5px rgba(255, 105, 97, 0.35), 0 16px 40px rgba(0, 0, 0, 0.3); }
.danger-zone .panel-title { color: #ff8a80; margin-bottom: 4px; }
.signout-row { display: flex; justify-content: center; padding: 14px; }

/* Shell: sidebar user card, toolbar account */
.sb-user { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px; margin-bottom: 10px; border-radius: 12px; background: var(--fill); transition: background 0.15s; }
.sb-user:hover { background: var(--fill-2); }
.sb-user > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sb-user b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user small { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user .tier { height: 20px; padding: 0 7px; font-size: 11px; }
.sb-user .tier .ic { display: none; }
.sb-auth { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.tb-slot { display: contents; }
.tb-signin span { font-size: 13.5px; font-weight: 500; }
.tb-account { position: relative; }
.tb-avatar { padding: 0 4px; }
.acct-menu { width: 280px; padding: 6px; }
.am-head { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 9px; }
.am-head:hover { background: var(--fill); }
.am-head span { display: flex; flex-direction: column; min-width: 0; }
.am-head b { font-size: 14.5px; }
.am-head small { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-points { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 10px; font-size: 13px; color: var(--text-2); border-bottom: 1px solid var(--sep); margin-bottom: 4px; }
.acct-menu nav { display: flex; flex-direction: column; }
.acct-menu nav a, .am-out { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 8px; border-radius: 7px; font-size: 14px; cursor: pointer; width: 100%; text-align: start; }
.acct-menu nav a .ic, .am-out .ic { width: 16px; height: 16px; color: var(--text-2); }
.acct-menu nav a:hover, .am-out:hover { background: var(--accent-fill); color: #fff; }
.acct-menu nav a:hover .ic, .am-out:hover .ic { color: #fff; }
.am-out { margin-top: 4px; border-top: 1px solid var(--sep); border-radius: 0 0 7px 7px; padding-top: 2px; height: 36px; }
.alert-input { width: 100%; height: 36px; margin: -6px 0 10px; padding: 0 12px; border: 0; border-radius: 9px; background: rgba(0, 0, 0, 0.25); box-shadow: inset 0 0 0 0.5px var(--border); color: var(--text); font-size: 14px; outline: none; }
.alert-input:focus { box-shadow: 0 0 0 3px rgba(184, 147, 242, 0.45); }
.alert .field-error { margin: -4px 0 10px; }
.alert-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sync-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.sync-pill .ic { width: 15px; height: 15px; }
.sync-pill.is-on { color: #5fd38a; }
.sync-pill a { color: var(--accent); }
.pub-hero .tier { margin: 2px 0; }

/* Responsive */
@media (max-width: 480px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-grid, .pts-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .acct { grid-template-columns: minmax(0, 1fr); }
  .acct-nav { position: static; flex-direction: row; align-items: center; padding: 6px; overflow-x: auto; scrollbar-width: none; }
  .acct-nav::-webkit-scrollbar { display: none; }
  .acct-me { display: none; }
  .acct-nav nav { flex-direction: row; gap: 2px; }
  .acct-link { width: auto; white-space: nowrap; height: 32px; font-size: 13.5px; }
  .acct-out { margin: 0; border: 0; border-radius: 8px; height: 32px; padding-top: 0; white-space: nowrap; }
  .od-grid { grid-template-columns: minmax(0, 1fr); }
  .od-summary { position: static; }
}
@media (max-width: 480px) {
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .auth { min-height: 0; padding-top: 8px; }
  .auth-card { padding: 24px 18px 18px; }
  .profile-hero, .pub-hero { flex-direction: column; align-items: center; text-align: center; padding: 22px 16px; }
  .ph-text { align-items: center; }
  .ph-handle { justify-content: center; }
  .ph-actions { flex-direction: row; align-self: center; }
  .stats { gap: 8px; }
  .stat { padding: 12px; gap: 10px; }
  .stat > .ic { width: 32px; height: 32px; padding: 7px; }
  .stat b { font-size: 16.5px; }
  .mini-wish { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .ord-row { grid-template-columns: 72px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; }
  .ord-row .status { grid-column: 2; justify-self: start; }
  .ord-row .row-chev { display: none; }
  .ord-row .ord-total { grid-row: 1; grid-column: 3; }
  .ord-list.compact .ord-row { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .timeline { grid-template-columns: minmax(0, 1fr); }
  .od-item { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .lib-grid { grid-template-columns: minmax(0, 1fr); }
  .lib-search { width: 100%; }
  .acct-head .page-tools { width: 100%; }
  .points-hero { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .pts-balance b { font-size: 38px; }
  .tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .set-photo { flex-direction: column; text-align: center; }
  .photo-actions { justify-content: center; }
  .danger-zone { flex-direction: column; align-items: stretch; }
  .tb-signin span { display: none; }
  .sb-auth { grid-template-columns: 1fr; }
  .acct-menu { position: fixed; top: 64px; inset-inline: 8px; width: auto; }
}

/* ==========================================================
   v8 — Polish
   Ambient art backdrop (Epic / Apple TV), Steam-green discounts,
   livelier cards, clearer showcase rail, compact sidebar foot.
   ========================================================== */

/* Ambient backdrop: the game in focus, blurred and dimmed behind the window */
.ambient { position: fixed; inset: 0 0 auto; height: calc(78vh / var(--z, 1)); z-index: 0; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity 0.7s var(--ease); }
.ambient.is-on { opacity: 1; }
.ambient img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.25); filter: blur(72px) saturate(1.6); opacity: 0.42;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.7) 45%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.7) 45%, transparent 100%); }
.shell { position: relative; z-index: 1; }

/* Steam-style discount badge: green, high contrast, easy to scan */
.off { background: #4c6b22; color: #d2f45c; box-shadow: none; }
.tile-off { background: #4c6b22; color: #d2f45c; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
.price:has(.price-old) .price-now { color: #d2f45c; }
.pop-item:is(.is-active, :hover) .price-now { color: #fff; }

/* Cards: lift, glow and a clearer add-to-cart */
.tile-art { transition: transform 0.4s var(--spring), box-shadow 0.4s var(--ease); }
.tile:hover .tile-art { transform: translateY(-4px) scale(1.02); box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.18), 0 22px 40px -12px rgba(0, 0, 0, 0.65); }
.tile-link img { transition: transform 0.8s var(--ease); }
.tile:hover .tile-link img { transform: scale(1.05); }
.tile:hover .tile-title { color: #fff; }
.mini-btn { background: var(--accent-soft); color: var(--accent); }
.mini-btn:hover, .tile:hover .mini-btn { background: var(--accent-fill); color: #fff; }
.wtile-art img, .mini img, .coll-cover img { transition: transform 0.8s var(--ease); }
.wtile:hover .wtile-art img, .mini:hover img { transform: scale(1.05); }

/* Showcase: deeper stage, clearer rail with price */
.sc-stage { box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.12), 0 30px 70px -20px rgba(0, 0, 0, 0.7); }
.sc-pick { gap: 12px; }
.sc-pick-img { width: 62px; }
.sc-pick-text { gap: 2px; }
.sc-pick-price { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.sc-pick-price .price-old { display: none; }
.sc-pick:not(.is-active) .sc-pick-img { opacity: 0.75; transition: opacity 0.2s; }
.sc-pick:hover .sc-pick-img { opacity: 1; }
.sc-pick.is-active { background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.14), 0 10px 24px -12px rgba(0, 0, 0, 0.6); }

/* Section rhythm */
.sec-title { letter-spacing: -0.015em; }
html[lang="ar"] .sec-title { letter-spacing: 0; }

/* Sidebar foot: one-line preview badge so the genre list fits */
.preview-badge { display: flex; align-items: center; gap: 6px; padding: 6px 8px; white-space: nowrap; overflow: hidden; }
.preview-badge span { flex-shrink: 0; margin: 0; }
.preview-badge small { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 480px) {
  .ambient { height: calc(60vh / var(--z, 1)); }
}
@media (max-width: 480px) {
  .ambient img { filter: blur(48px) saturate(1.5); opacity: 0.35; }
  .tile:hover .tile-art { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ambient { transition: none; }
}

/* Currency menu under the language switch (prices are charged in SAR) */
.sb-currency { display: block; margin-top: 8px; }
.sb-currency select { width: 100%; height: 30px; font-size: 13px; }

/* Diamond level (4th tier) — same badge style as the others */
.tier-diamond { color: #a8ecff; background: linear-gradient(180deg, rgba(110, 210, 255, 0.3), rgba(110, 210, 255, 0.12)); box-shadow: inset 0 0 0 0.5px rgba(168, 236, 255, 0.5); }
.points-hero.tier-diamond { background: radial-gradient(500px 220px at 0% 0%, rgba(110, 210, 255, 0.18), transparent 70%), var(--panel); }

/* Every control answers the touch: a light press-down, smooth hover */
.btn, .tb-btn, .mat-btn, .mini-btn, .sb-item, .tab, .chip, .tag, .link-btn, .see-all, .pager-btn, .segmented button,
.sc-pick, .dl-row, .pop-item, .row, .mini, .coll, .wrow, .ord-row, .tier-card, .reward, .shot, .stepper button {
  transition-property: transform, background, background-color, color, box-shadow, opacity, filter;
  transition-duration: 0.16s; transition-timing-function: var(--ease);
}
.btn:active:not(:disabled), .tb-btn:active, .mat-btn:active, .mini-btn:active, .pager-btn:active, .segmented button:active,
.stepper button:active, .link-btn:active, .tab:active, .tag:active, .chip:active { transform: scale(0.95); }
.sb-item:active, .sc-pick:active, .dl-row:active, .pop-item:active, .row:active, .wrow:active, .ord-row:active,
.tier-card:active, .reward:active, .coll:active, .mini:active { transform: scale(0.985); }
.tile:active .tile-art, .wtile:active .wtile-art, .shot:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; cursor: progress; }
@media (hover: hover) {
  .row:hover, .ord-row:hover, .wrow:hover { background: var(--fill); }
  .mini:hover { filter: brightness(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .btn:active, .tb-btn:active, .sb-item:active, .tile:active .tile-art { transform: none; }
}
.tiers:has(> :nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Rewards: store credit + free game */
.reward-game { flex-wrap: wrap; }
.reward-pick { flex: 1 1 180px; min-width: 0; }
.reward-pick select { width: 100%; }
.code-row .pos { color: #5cc97b; }
.code-row .neg { color: var(--text-2); }
.points-hero { grid-template-columns: auto auto minmax(0, 1fr); }
.code-row > span:first-child { flex: 1; min-width: 0; }
@media (max-width: 480px) { .points-hero { grid-template-columns: 1fr 1fr; } .points-hero .tierbar { grid-column: 1 / -1; } }

/* ==========================================================
   v11 — Store features (same visual language)
   ========================================================== */
.segmented a { display: grid; place-items: center; height: 28px; padding: 0 10px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--text-2); white-space: nowrap; transition: background 0.2s, color 0.2s; }
.segmented a:hover { color: var(--text); }
.segmented a.is-on { background: var(--fill-3); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), inset 0 0.5px 0 rgba(255, 255, 255, 0.12); }
.pos { color: #5cc97b; } .neg { color: var(--text-3); }

/* Help, policies */
.info-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.faq { display: flex; flex-direction: column; gap: 6px; }
.faq-item { border-radius: 10px; background: var(--fill); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; cursor: pointer; font-weight: 600; font-size: 14.5px; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-chev { width: 16px; height: 16px; color: var(--text-3); transition: transform 0.2s var(--ease); }
.faq-item[open] .faq-chev { transform: rotate(90deg); }
[dir="rtl"] .faq-item[open] .faq-chev { transform: rotate(-90deg); }
.faq-item p { padding: 0 14px 14px; font-size: 14px; color: var(--text-2); line-height: 1.7; }
.contact-form, .adm-form { display: flex; flex-direction: column; gap: 12px; }
.contact-form .btn-primary, .adm-form .btn-primary { align-self: flex-start; }
.field-box.is-area { height: auto; }
.field-box textarea { flex: 1; min-width: 0; padding: 10px 12px; border: 0; outline: 0; background: none; font: inherit; font-size: 14.5px; color: var(--text); resize: vertical; }
.field .popup select { width: 100%; height: 40px; }
.prose h3 { font-size: 16px; margin: 18px 0 6px; }
.prose h3:first-child { margin-top: 0; }
.prose p { font-size: 14.5px; color: var(--text-2); line-height: 1.8; margin-bottom: 8px; }
.policy-draft { margin-bottom: 14px; }

/* Cart: discount code + gift */
.coupon-form { display: flex; gap: 8px; margin-top: 4px; }
.coupon-form .field-box { flex: 1; height: 36px; }
.gift-box { border-radius: 10px; background: var(--fill); }
.gift-box summary { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; font-size: 14px; font-weight: 500; list-style: none; }
.gift-box summary::-webkit-details-marker { display: none; }
.gift-box summary .ic { width: 17px; height: 17px; color: var(--accent); }
.gift-fields { display: flex; flex-direction: column; gap: 10px; padding: 0 12px 12px; }
.instant-badge { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0; font-size: 13px; font-weight: 600; color: #5cc97b; }
.instant-badge .ic { width: 15px; height: 15px; }

/* Admin */
.adm-tabs { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; margin-bottom: 14px; }
.adm-filter { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; margin-bottom: 10px; }
.adm-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.adm-stat { display: flex; align-items: center; gap: 12px; padding: 14px; }
.adm-stat > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.adm-stat small { font-size: 12.5px; color: var(--text-2); }
.adm-stat b { font-size: 20px; }
.adm-stat .stat-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.adm-list { padding: 6px; }
.adm-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) minmax(0, 1.4fr) auto auto auto; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; font-size: 13.5px; }
.adm-row + .adm-row { border-top: 1px solid var(--sep); }
a.adm-row:hover { background: var(--fill); }
.adm-row small { color: var(--text-3); font-size: 12px; }
.adm-who { display: flex; flex-direction: column; min-width: 0; }
.adm-who small, .adm-cust small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-items { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.adm-items .ic { width: 14px; height: 14px; vertical-align: -2px; color: var(--accent); }
.adm-num { font-weight: 600; }
.adm-stock { grid-template-columns: minmax(0, 1fr) auto 110px 90px; }
.adm-code { grid-template-columns: 140px minmax(0, 1fr) auto auto; }
.adm-code code { font-weight: 700; }
.adm-cust { grid-template-columns: minmax(0, 1.4fr) 80px 110px auto auto; }
.adm-cust > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.adm-code-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.adm-code-form .form-banner, .adm-code-form .btn-primary { grid-column: 1 / -1; }
.adm-msg { padding: 12px; border-radius: 10px; }
.adm-msg + .adm-msg { border-top: 1px solid var(--sep); }
.adm-msg.is-closed { opacity: 0.6; }
.adm-msg-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; }
.adm-msg-top small { color: var(--text-3); margin-inline-start: auto; }
.adm-msg p { margin: 8px 0; font-size: 14px; white-space: pre-wrap; color: var(--text-2); }
.adm-items-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.adm-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: var(--fill); }
.adm-item > span:first-child { display: flex; flex-direction: column; }
.adm-item small { font-size: 12px; color: var(--text-3); }
.adm-item code { font-size: 13px; word-break: break-all; }
.adm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.danger { color: var(--danger); }
@media (max-width: 480px) {
  .info-grid, .adm-code-form { grid-template-columns: minmax(0, 1fr); }
  .adm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-row, .adm-stock, .adm-code, .adm-cust { grid-template-columns: minmax(0, 1fr) auto; }
  .adm-row > :nth-child(n + 3):not(.status) { display: none; }
  .adm-item { grid-template-columns: minmax(0, 1fr); }
}

/* Security + full admin */
.tfa-steps { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 12px; padding-inline-start: 20px; font-size: 14px; color: var(--text-2); }
.tfa-secret { display: block; margin: 6px 0; padding: 8px 10px; border-radius: 8px; background: var(--fill-2); color: var(--text); font: 600 14px ui-monospace, Menlo, monospace; letter-spacing: 0.04em; word-break: break-all; }
.adm-verify { max-width: 420px; margin-inline: auto; }
.adm-verify .form { display: flex; flex-direction: column; gap: 12px; }
.adm-bars { display: flex; flex-direction: column; gap: 6px; }
.adm-bar { position: relative; display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; font-size: 13px; overflow: hidden; }
.adm-bar-fill { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--accent-soft); border-radius: 8px; z-index: 0; }
.adm-bar > :not(.adm-bar-fill) { position: relative; z-index: 1; }
.adm-export { margin-top: 12px; }
.adm-product { grid-template-columns: minmax(0, 1.4fr) 110px 90px 100px auto auto; }
.adm-product > span:first-child { display: flex; flex-direction: column; }
.adm-product label { display: flex; flex-direction: column; gap: 3px; }
.adm-product .field-box { height: 34px; }
.adm-product.is-hidden { opacity: 0.55; }
.adm-check { flex-direction: row !important; align-items: center; gap: 6px !important; }
.adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.adm-reward { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 10px; background: var(--fill); }
.adm-checklist { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--text-2); }
.adm-checklist li { display: flex; gap: 8px; align-items: flex-start; }
.adm-checklist .ic { width: 16px; height: 16px; color: #5cc97b; flex-shrink: 0; margin-top: 2px; }
.adm-log { grid-template-columns: 190px 110px 120px minmax(0, 1fr) auto; }
.adm-log small[dir="auto"] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-log.is-bad code { color: #ff8a80; }
.adm-stock { grid-template-columns: minmax(0, 1fr) auto 110px 90px auto; }
.adm-keys { padding: 4px 10px 10px; }
.adm-key { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 8px; background: var(--fill); font-size: 13px; }
.adm-key + .adm-key { margin-top: 4px; }
.adm-key code { flex: 1; }
.adm-adjust { margin-top: 14px; }
@media (max-width: 480px) {
  .adm-product, .adm-log { grid-template-columns: minmax(0, 1fr) auto; }
  .adm-bar { grid-template-columns: 1fr auto; }
}
.adm-bans .info-label { display: flex; flex-direction: column; gap: 2px; }
.adm-bans .info-label small { color: var(--text-3); font-size: 12px; }
.adm-ban-form { margin-top: 12px; }
