/* ==========================================================================
   Woplay — console UI
   ========================================================================== */

/* --- tokens ------------------------------------------------------------- */
:root {
  /* surfaces */
  --bg:          #07060e;
  --bg-deep:     #050409;
  --surface-1:   rgba(255, 255, 255, .034);
  --surface-2:   rgba(255, 255, 255, .055);
  --surface-3:   rgba(255, 255, 255, .085);
  --sunken:      rgba(0, 0, 0, .28);
  --edge:        rgba(255, 255, 255, .07);
  --edge-soft:   rgba(255, 255, 255, .045);
  --hairline:    inset 0 1px 0 rgba(255, 255, 255, .07);

  /* ink */
  --text:        #f2effc;
  --text-2:      #b6aed0;
  --text-3:      #7d7597;

  /* accents */
  --violet:      #8b5cf6;
  --violet-lo:   #6d3ff0;
  --magenta:     #f0448c;
  --cyan:        #2ee6d6;
  --lime:        #a3e635;
  --gold:        #ffc94d;
  --danger:      #ff4d5e;
  --accent:      var(--violet);
  --glow:        124, 92, 255;

  /* geometry */
  --sidebar:     266px;
  --chat:        322px;
  --r-xs:        10px;
  --r-sm:        14px;
  --r-md:        20px;
  --r-lg:        28px;
  --r-xl:        36px;
  --gut:         clamp(16px, 2.2vw, 34px);

  /* elevation */
  --lift-1: 0 1px 3px rgba(0,0,0,.3);
  --lift-2: 0 8px 20px -10px rgba(0,0,0,.5);
  --lift-3: 0 18px 40px -18px rgba(0,0,0,.6);

  /* motion */
  --spring: cubic-bezier(.22, 1, .36, 1);
  --swift:  cubic-bezier(.4, 0, .2, 1);

  /* type */
  --font:    "Rubik", ui-sans-serif, system-ui, sans-serif;
  --display: "Baloo 2", "Rubik", sans-serif;
  --mono:    ui-monospace, "SF Mono", Menlo, monospace;
}

/* --- reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -.022em; margin: 0; line-height: 1.12; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: rgba(var(--glow), .4); }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 6px;
}

/* thin scrollbars everywhere */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.12); border-radius: 99px;
  border: 3px solid transparent; background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.22); background-clip: content-box; }

.ico { flex: none; display: block; }
.ico-fill { stroke: none; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* --- ambient background -------------------------------------------------- */
.app-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1100px 620px at 12% -12%, rgba(109, 63, 240, .30), transparent 62%),
    radial-gradient(880px 520px at 96% -6%,  rgba(240, 68, 140, .16), transparent 58%),
    radial-gradient(760px 620px at 78% 106%, rgba(46, 230, 214, .10), transparent 60%),
    var(--bg);
}
.app-bg::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(900px 700px at 50% 0%, #000 10%, transparent 80%);
}

/* --- shell --------------------------------------------------------------- */
.app {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--chat);
  min-height: 100vh;
  min-height: 100dvh;
}

.sidebar, .chat-panel {
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(14, 11, 26, .72), rgba(8, 6, 16, .86));
  backdrop-filter: blur(26px) saturate(140%);
  -webkit-backdrop-filter: blur(26px) saturate(140%);
}
.sidebar { border-inline-end: 1px solid var(--edge-soft); }
.chat-panel { border-inline-start: 1px solid var(--edge-soft); }

/* --- brand --------------------------------------------------------------- */
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px 14px;
  font-family: var(--display); font-weight: 800; font-size: 25px;
  letter-spacing: -.03em;
}
.brand-mark {
  position: relative;
  width: 40px; height: 40px; border-radius: 13px;
  display: grid; place-items: center; flex: none;
  font-size: 20px; color: #fff;
  background: linear-gradient(145deg, #a78bfa, #7c3aed 45%, #e0369a);
  box-shadow: var(--hairline);
  transition: transform .5s var(--spring);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.brand-text { background: linear-gradient(92deg, #fff, #d8c9ff); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* --- loot card ----------------------------------------------------------- */
.loot-card {
  position: relative; overflow: hidden;
  margin: 4px 16px 18px; padding: 14px;
  display: flex; gap: 12px; align-items: center;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(255, 201, 77, .14), rgba(240, 68, 140, .1)), var(--surface-1);
  box-shadow: var(--hairline);
}
.loot-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.14) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: sheen 5.5s ease-in-out infinite;
}
@keyframes sheen { 0%, 62% { transform: translateX(-120%); } 88%, 100% { transform: translateX(120%); } }
.loot-icon {
  width: 40px; height: 40px; border-radius: 13px; flex: none;
  display: grid; place-items: center; color: var(--gold);
  background: rgba(255, 201, 77, .13);
}
.loot-kicker { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.loot-timer {
  font-family: var(--mono); font-weight: 700; font-size: 17px;
  color: var(--gold); font-variant-numeric: tabular-nums; letter-spacing: .01em;
}

/* --- side nav ------------------------------------------------------------ */
.side-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px 20px; display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  margin: 20px 12px 8px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-3);
}
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-sm);
  color: var(--text-2); font-weight: 500; font-size: 14.5px;
  transition: color .18s var(--swift), background .18s var(--swift), transform .18s var(--spring);
}
.nav-item .ico { color: var(--text-3); transition: color .18s var(--swift), transform .3s var(--spring); }
.nav-item:hover { background: var(--surface-1); color: var(--text); }
.nav-item:hover .ico { color: var(--accent-c, var(--violet)); transform: scale(1.12); }
.nav-item.is-active {
  color: #fff; font-weight: 600;
  background: linear-gradient(90deg, rgba(var(--glow), .22), rgba(var(--glow), .04));
}
.nav-item.is-active .ico { color: var(--accent-c, #c4b5fd); }
.nav-item.is-active::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 50%;
  width: 3px; height: 20px; border-radius: 99px; transform: translateY(-50%);
  background: linear-gradient(180deg, var(--violet), var(--magenta));
}
.nav-count { margin-inline-start: auto; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.side-foot { padding: 12px 18px 18px; }
.side-mascot { padding: 0 18px 16px; }
.side-mascot img { width: 132px; margin-inline-start: auto; }

/* --- topbar -------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  padding: 14px var(--gut);
  background: linear-gradient(180deg, rgba(7, 6, 14, .9), rgba(7, 6, 14, .55) 70%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.icon-btn {
  width: 42px; height: 42px; border-radius: var(--r-sm); flex: none;
  display: grid; place-items: center; color: var(--text-2);
  background: var(--surface-1); box-shadow: var(--hairline);
  transition: background .18s var(--swift), color .18s var(--swift), transform .18s var(--spring);
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); transform: translateY(-1px); }
.icon-btn:active { transform: scale(.95); }
.only-mobile { display: none; }

/* --- search -------------------------------------------------------------- */
.search-wrap { position: relative; flex: 1; min-width: 0; max-width: 620px; }
.search {
  display: flex; align-items: center; gap: 12px;
  height: 50px; padding: 0 16px;
  border-radius: var(--r-md);
  background: var(--surface-1);
  box-shadow: var(--hairline), inset 0 0 0 1px transparent;
  transition: background .2s var(--swift), box-shadow .25s var(--swift), transform .2s var(--spring);
}
.search:hover { background: var(--surface-2); }
.search-wrap.is-active .search {
  background: rgba(16, 12, 30, .96);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), var(--lift-2);
}
.search-ico { color: var(--text-3); transition: color .2s; }
.search-wrap.is-active .search-ico { color: var(--violet); }
.search input {
  flex: 1; min-width: 0; height: 100%;
  background: none; border: 0; outline: 0;
  font-size: 15.5px; font-weight: 500;
}
.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { display: none; }
.search-kbd {
  display: inline-flex; gap: 3px; align-items: center; flex: none;
  font-family: var(--mono); font-size: 11px; color: var(--text-3);
  padding: 4px 8px; border-radius: 7px;
  background: var(--sunken); box-shadow: inset 0 0 0 1px var(--edge);
}
.search-clear { flex: none; color: var(--text-3); display: none; padding: 4px; border-radius: 50%; }
.search-clear:hover { color: var(--text); background: var(--surface-2); }
.search-wrap.has-text .search-kbd { display: none; }
.search-wrap.has-text .search-clear { display: block; }
.search-spin { flex: none; width: 16px; height: 16px; display: none; }
.search-wrap.is-loading .search-spin { display: block; }
.search-wrap.is-loading .search-kbd, .search-wrap.is-loading .search-clear { display: none; }
.search-spin::after {
  content: ""; display: block; width: 100%; height: 100%; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.18); border-top-color: var(--violet);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* results panel */
.search-panel {
  position: absolute; inset-inline: 0; top: calc(100% + 10px);
  z-index: 60; overflow: hidden;
  border-radius: var(--r-md);
  background: rgba(13, 10, 24, .97);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  box-shadow: var(--lift-3), inset 0 0 0 1px var(--edge);
  opacity: 0; transform: translateY(-8px) scale(.985); pointer-events: none;
  transition: opacity .2s var(--swift), transform .26s var(--spring);
}
.search-wrap.is-open .search-panel { opacity: 1; transform: none; pointer-events: auto; }
.sp-section { padding: 8px; }
.sp-section + .sp-section { border-top: 1px solid var(--edge-soft); }
.sp-label {
  padding: 6px 12px 8px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: var(--text-3);
}
.sp-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: var(--r-sm);
  transition: background .14s var(--swift);
}
.sp-item:hover, .sp-item.is-cursor { background: var(--surface-2); }
.sp-item.is-cursor { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.sp-thumb {
  width: 46px; height: 46px; border-radius: 11px; flex: none;
  background: var(--sunken) center/cover no-repeat;
  box-shadow: var(--hairline);
}
.sp-ico {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--c, var(--violet)) 20%, transparent);
  color: var(--c, var(--violet));
}
.sp-body { min-width: 0; flex: 1; }
.sp-name { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-name mark { background: rgba(var(--glow), .3); color: #fff; border-radius: 4px; padding: 0 2px; }
.sp-sub { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 7px; }
.sp-go { color: var(--text-3); opacity: 0; transition: opacity .16s; }
.sp-item:hover .sp-go, .sp-item.is-cursor .sp-go { opacity: 1; }
.sp-all {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; font-size: 13.5px; font-weight: 600; color: #cfc2ff;
  background: var(--surface-1); border-top: 1px solid var(--edge-soft);
}
.sp-all:hover { background: var(--surface-2); }
.sp-empty { padding: 26px 18px; text-align: center; color: var(--text-3); font-size: 14px; }
.sp-empty .ico { margin: 0 auto 10px; color: var(--text-3); opacity: .5; }

/* --- top actions --------------------------------------------------------- */
.top-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 42px; padding: 0 14px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 600; color: var(--text-2);
  background: var(--surface-1); box-shadow: var(--hairline);
  transition: background .18s var(--swift), color .18s var(--swift), transform .18s var(--spring);
}
.chip:hover { background: var(--surface-3); color: var(--text); }
.chip:active { transform: scale(.97); }
.chip .ico { color: var(--text-3); transition: color .18s; }
.chip:hover .ico { color: currentColor; }
.chip.is-on { color: var(--magenta); background: rgba(240, 68, 140, .14); }
.chip.is-on .ico { color: var(--magenta); }

.rewards {
  color: #ffe6a8; font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, rgba(255, 201, 77, .18), rgba(240, 68, 140, .14));
}
.rewards .ico { color: var(--gold); }
.rewards:hover { color: #fff3d4; }

.lang-switch { position: relative; }
.lang-menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 180px; padding: 6px; overflow: hidden;
  border-radius: var(--r-sm);
  background: rgba(15, 12, 28, .97); backdrop-filter: blur(24px);
  box-shadow: var(--lift-3), inset 0 0 0 1px var(--edge);
  display: grid; gap: 2px;
  opacity: 0; transform: translateY(-6px) scale(.97); pointer-events: none;
  transition: opacity .18s var(--swift), transform .24s var(--spring);
}
.lang-switch.is-open .lang-menu { opacity: 1; transform: none; pointer-events: auto; }
.lang-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 10px; font-size: 14px; color: var(--text-2);
}
.lang-menu a:hover { background: var(--surface-2); color: var(--text); }
.lang-menu a[aria-current="page"] { color: #fff; background: rgba(var(--glow), .18); }
.lang-menu a[aria-current="page"]::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }

/* --- content ------------------------------------------------------------- */
.content {
  padding: 6px var(--gut) 48px;
  display: flex; flex-direction: column; gap: clamp(30px, 3.4vw, 46px);
}
.stage { min-width: 0; display: flex; flex-direction: column; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 16px;
}
.section-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.section-title > div { min-width: 0; }
.section-title h2 { font-size: clamp(19px, 1.6vw, 25px); font-weight: 700; }
.section-badge {
  width: 34px; height: 34px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  color: var(--c, var(--violet));
  background: color-mix(in srgb, var(--c, var(--violet)) 18%, transparent);
  box-shadow: var(--hairline);
}
.section-sub { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.section-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; color: var(--text-2);
  padding: 7px 12px; border-radius: 99px; flex: none;
  transition: background .18s, color .18s, gap .2s var(--spring);
}
.section-link:hover { background: var(--surface-2); color: #fff; gap: 10px; }
.section-link .ico { transition: transform .2s var(--spring); }
[dir="rtl"] .section-link .ico { transform: scaleX(-1); }

.rail-nav { display: flex; gap: 6px; }
.rail-btn {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; color: var(--text-2);
  background: var(--surface-1); box-shadow: var(--hairline);
  transition: background .16s, color .16s, opacity .2s;
}
.rail-btn:hover { background: var(--surface-3); color: #fff; }
.rail-btn[disabled] { opacity: .32; pointer-events: none; }

/* --- hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  min-height: clamp(280px, 30vw, 390px);
  background: #0d0a1a;
  box-shadow: var(--lift-3), inset 0 0 0 1px var(--edge);
  isolation: isolate;
}
.hero-slide {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .88fr);
  align-items: center;
  opacity: 0; visibility: hidden;
  transition: opacity .7s var(--swift), visibility .7s;
}
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-slide::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(120% 130% at 8% 40%, color-mix(in srgb, var(--accent) 62%, #100a22) 0%, rgba(11, 8, 22, .94) 58%, #090714 100%);
}
.hero-visual {
  position: absolute; inset-inline-end: 0; top: 0; bottom: 0; width: 58%; z-index: 1;
  background-size: cover; background-position: center;
  mask-image: linear-gradient(to left, #000 38%, transparent 92%);
  -webkit-mask-image: linear-gradient(to left, #000 38%, transparent 92%);
  transform: scale(1.06);
  transition: transform 9s linear;
}
[dir="rtl"] .hero-visual {
  mask-image: linear-gradient(to right, #000 38%, transparent 92%);
  -webkit-mask-image: linear-gradient(to right, #000 38%, transparent 92%);
}
.hero-slide.is-active .hero-visual { transform: scale(1); }
.hero-copy {
  position: relative; z-index: 2; grid-column: 1;
  padding: clamp(24px, 3.4vw, 52px);
  max-width: 660px;
  transform: translateY(14px); opacity: 0;
  transition: transform .75s var(--spring) .1s, opacity .6s var(--swift) .1s;
}
.hero-slide.is-active .hero-copy { transform: none; opacity: 1; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px 6px 9px; border-radius: 99px; margin-bottom: 14px;
  font-size: 11px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase;
  color: #ffe6a8; background: rgba(255, 201, 77, .13);
  box-shadow: inset 0 0 0 1px rgba(255, 201, 77, .22);
}
.hero-kicker .ico { color: var(--gold); }
.hero-copy h1, .hero-copy h2 {
  font-size: clamp(30px, 4vw, 54px); font-weight: 800;
  letter-spacing: -.035em; margin-bottom: 12px;
  background: linear-gradient(180deg, #fff, #cbbcf0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-desc { color: var(--text-2); font-size: clamp(14px, 1.1vw, 16.5px); max-width: 46ch; }
.hero-cta { display: flex; align-items: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.hero-tags { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 99px; font-size: 12px; font-weight: 600;
  color: var(--text-2); background: rgba(255,255,255,.07);
  backdrop-filter: blur(8px);
}

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  height: 48px; padding: 0 22px; border-radius: 99px;
  font-weight: 700; font-size: 15px; white-space: nowrap;
  transition: transform .2s var(--spring), box-shadow .24s var(--swift), background .2s;
}
.btn:active { transform: scale(.96); }
.btn-play {
  color: #1a0d00;
  background: linear-gradient(100deg, #ffd66b, #ffab2e);
  box-shadow: var(--lift-1), var(--hairline);
}
.btn-play:hover { transform: translateY(-2px); box-shadow: var(--lift-2), var(--hairline); }
.btn-ghost {
  color: var(--text); background: rgba(255,255,255,.09);
  backdrop-filter: blur(10px); box-shadow: var(--hairline);
}
.btn-ghost:hover { background: rgba(255,255,255,.16); transform: translateY(-2px); }

.hero-controls {
  position: absolute; z-index: 5; bottom: 22px; inset-inline-end: 24px;
  display: flex; align-items: center; gap: 10px;
}
.hero-dots { display: flex; gap: 7px; align-items: center; }
.hero-dot {
  width: 9px; height: 9px; border-radius: 99px; padding: 0;
  background: rgba(255,255,255,.28);
  transition: width .4s var(--spring), background .3s;
}
.hero-dot.is-active { width: 30px; background: #fff; }
.hero-arrows { display: flex; gap: 6px; }
.hero-arrow {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: rgba(0,0,0,.35); backdrop-filter: blur(10px);
  box-shadow: var(--hairline);
  transition: background .18s, transform .2s var(--spring);
}
.hero-arrow:hover { background: rgba(0,0,0,.6); transform: scale(1.08); }
[dir="rtl"] .hero-arrow .ico,
[dir="rtl"] .rail-btn .ico { transform: scaleX(-1); }
.hero-progress {
  position: absolute; bottom: 0; inset-inline: 0; height: 3px; z-index: 5;
  background: rgba(255,255,255,.08);
}
.hero-progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--violet), var(--magenta));
}

/* --- category chips row --------------------------------------------------- */
.cat-rail {
  display: flex; gap: 10px; overflow-x: auto;
  padding: 6px 2px 14px; margin: -6px -2px -10px;
  scroll-snap-type: x proximity; scrollbar-width: none;
}
.cat-rail::-webkit-scrollbar { display: none; }
.cat-tile {
  position: relative; overflow: hidden;
  flex: 0 0 auto; scroll-snap-align: start;
  min-width: 124px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: 16px; border-radius: var(--r-md);
  font-size: 13.5px; font-weight: 600;
  background: var(--surface-1); box-shadow: var(--hairline);
  transition: transform .26s var(--spring), background .2s, box-shadow .26s;
}
.cat-tile::after {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(120% 90% at 50% 120%, color-mix(in srgb, var(--c) 42%, transparent), transparent 70%);
  transition: opacity .3s;
}
.cat-tile:hover {
  transform: translateY(-3px);
  background: var(--surface-2);
  box-shadow: var(--hairline), var(--lift-2);
}
.cat-tile:hover::after { opacity: 1; }
.cat-ico {
  position: relative; z-index: 1;
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 17%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 26%, transparent);
  transition: transform .34s var(--spring);
}
.cat-tile:hover .cat-ico { transform: scale(1.1) rotate(-6deg); }
.cat-tile span:last-child { position: relative; z-index: 1; }

/* --- game grid / rail ----------------------------------------------------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: clamp(12px, 1.2vw, 18px);
}
.game-rail {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: minmax(166px, 1fr);
  gap: clamp(12px, 1.2vw, 18px);
  overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding-inline: 2px;
  /* room for the hover lift, which overflow-x:auto would otherwise clip */
  padding: 8px 2px 16px;
  margin: -8px -2px -10px;
  scrollbar-width: none;
}
.game-rail::-webkit-scrollbar { display: none; }
.game-rail .game-card { scroll-snap-align: start; }

.game-card { position: relative; display: flex; flex-direction: column; gap: 10px; }
.game-art {
  position: relative; aspect-ratio: 1; overflow: hidden;
  border-radius: var(--r-md);
  background: #1a1330 center/cover no-repeat var(--art);
  box-shadow: var(--lift-1), var(--hairline);
  transition: transform .34s var(--spring), box-shadow .34s var(--swift);
  will-change: transform;
}
.game-art::after {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background: linear-gradient(to top, rgba(6, 4, 14, .88) 0%, rgba(6, 4, 14, .25) 45%, transparent 70%);
  transition: opacity .3s var(--swift);
}
.game-card:hover .game-art {
  transform: translateY(-4px) scale(1.015);
  box-shadow: var(--lift-2), inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.game-card:hover .game-art::after { opacity: 1; }

.game-hover {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 2;
  padding: 12px; display: flex; align-items: center; gap: 8px;
  opacity: 0; transform: translateY(10px);
  transition: opacity .26s var(--swift), transform .3s var(--spring);
}
.game-card:hover .game-hover { opacity: 1; transform: none; }
.play-fab {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #170a00;
  background: linear-gradient(140deg, #ffd66b, #ffab2e);
  box-shadow: var(--lift-1);
  transform: scale(.85);
  transition: transform .34s var(--spring) .04s;
}
.game-card:hover .play-fab { transform: scale(1); }
.play-fab .ico { margin-inline-start: 2px; }
.game-quick { font-size: 12px; font-weight: 600; color: #e8dfff; text-shadow: 0 1px 6px rgba(0,0,0,.8); }

.fav-dot {
  position: absolute; z-index: 3; top: 9px; inset-inline-end: 9px;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: rgba(8, 5, 18, .5); backdrop-filter: blur(8px);
  box-shadow: var(--hairline);
  opacity: 0; transform: scale(.7);
  transition: opacity .22s, transform .3s var(--spring), color .2s, background .2s;
}
.game-card:hover .fav-dot, .fav-dot.is-on { opacity: 1; transform: none; }
.fav-dot:hover { background: rgba(240, 68, 140, .35); }
.fav-dot.is-on { color: var(--magenta); background: rgba(240, 68, 140, .2); }
.fav-dot.is-on .ico { fill: currentColor; stroke: currentColor; }

.badges { position: absolute; z-index: 3; top: 9px; inset-inline-start: 9px; display: flex; gap: 5px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 99px; color: #fff;
  backdrop-filter: blur(8px); box-shadow: var(--hairline);
}
.badge .ico { width: 12px; height: 12px; }
.badge.hot { background: linear-gradient(120deg, #ff5f3a, #ff2d6f); }
.badge.new { background: linear-gradient(120deg, #34d399, #06b6d4); color: #04231d; }

.game-meta { display: flex; flex-direction: column; gap: 2px; padding: 0 3px; }
.game-meta h3 {
  font-family: var(--font); font-size: 14px; font-weight: 600; letter-spacing: -.005em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .18s;
}
.game-card:hover .game-meta h3 { color: #d9caff; }
.game-meta small { color: var(--text-3); font-size: 12px; display: flex; align-items: center; gap: 5px; }
.game-meta small .ico { width: 13px; height: 13px; }

/* skeletons */
.skel { position: relative; overflow: hidden; background: var(--surface-1); border-radius: var(--r-md); }
.skel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.07), transparent);
  transform: translateX(-100%); animation: skel 1.4s infinite;
}
@keyframes skel { to { transform: translateX(100%); } }
.skel-card { display: flex; flex-direction: column; gap: 10px; }
.skel-card .skel-art { aspect-ratio: 1; border-radius: var(--r-md); }
.skel-card .skel-line { height: 11px; border-radius: 6px; }
.skel-card .skel-line.short { width: 55%; }

/* --- page hero ------------------------------------------------------------ */
.page-hero {
  padding: clamp(22px, 2.6vw, 38px);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 160% at 100% 0%, color-mix(in srgb, var(--c, var(--violet)) 26%, transparent), transparent 60%),
    var(--surface-1);
  box-shadow: var(--hairline);
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
}
.page-hero h1 { font-size: clamp(28px, 3.4vw, 44px); font-weight: 800; letter-spacing: -.035em; }
.page-hero p { color: var(--text-2); max-width: 70ch; }
.page-hero .hero-kicker { margin-bottom: 2px; }
.page-ico {
  width: 56px; height: 56px; border-radius: 18px;
  display: grid; place-items: center; color: var(--c, var(--violet));
  background: color-mix(in srgb, var(--c, var(--violet)) 18%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, var(--violet)) 28%, transparent);
  margin-bottom: 4px;
}
.stat-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.stat {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 99px; font-size: 13px; font-weight: 600;
  color: var(--text-2); background: var(--surface-2); box-shadow: var(--hairline);
}
.stat .ico { color: var(--text-3); }

.crumbs {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-3);
}
.crumbs a:hover { color: var(--text); }
.crumbs .ico { opacity: .5; }
[dir="rtl"] .crumbs .sep .ico { transform: scaleX(-1); }

/* --- player --------------------------------------------------------------- */
.game-page { display: flex; flex-direction: column; gap: clamp(20px, 2.4vw, 32px); }
.player-shell {
  border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(180deg, rgba(20, 15, 38, .8), rgba(9, 7, 18, .9));
  box-shadow: var(--lift-3), inset 0 0 0 1px var(--edge);
}
.player-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--edge-soft);
}
.player-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-thumb {
  width: 44px; height: 44px; border-radius: 13px; flex: none;
  background: var(--sunken) center/cover no-repeat;
  box-shadow: var(--hairline);
}
.player-title { min-width: 0; }
.player-title h1 {
  font-size: clamp(16px, 1.5vw, 21px); font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-title small { color: var(--text-3); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.player-actions { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.tool {
  position: relative;
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; color: var(--text-2);
  background: transparent;
  transition: background .16s, color .16s, transform .18s var(--spring);
}
.tool:hover { background: var(--surface-2); color: #fff; }
.tool:active { transform: scale(.92); }
.tool.is-on { color: var(--magenta); background: rgba(240, 68, 140, .16); }
.tool.is-on .ico { fill: currentColor; stroke: currentColor; }
.tool[data-tip]::after {
  content: attr(data-tip);
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
  padding: 6px 10px; border-radius: 8px; white-space: nowrap;
  font-size: 12px; font-weight: 500; color: var(--text);
  background: rgba(20, 15, 38, .98); box-shadow: var(--lift-2), inset 0 0 0 1px var(--edge);
  opacity: 0; pointer-events: none; transform: translateY(-4px);
  transition: opacity .16s, transform .2s var(--spring);
  z-index: 20;
}
.tool:hover::after { opacity: 1; transform: none; }
.tool-sep { width: 1px; height: 22px; background: var(--edge); margin: 0 4px; }

.iframe-wrap { position: relative; background: #000; aspect-ratio: 16 / 9; }
.iframe-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.iframe-wrap.is-loading::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, #0d0a1a, #0d0a1a 12px, #120e22 12px, #120e22 24px);
  animation: fadeout .4s ease 1.2s forwards;
}
@keyframes fadeout { to { opacity: 0; visibility: hidden; } }

/* cinema mode */
body.is-cinema .app-bg { filter: brightness(.35); }
body.is-cinema .sidebar,
body.is-cinema .chat-panel,
body.is-cinema .topbar,
body.is-cinema .site-foot,
body.is-cinema .pill-row,
body.is-cinema .prose,
body.is-cinema .crumbs { opacity: .12; filter: blur(1px); transition: opacity .4s, filter .4s; }
body.is-cinema .sidebar:hover,
body.is-cinema .chat-panel:hover,
body.is-cinema .topbar:hover { opacity: 1; filter: none; }
body.is-cinema .player-shell { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), var(--lift-3); }

.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 99px; font-size: 13.5px; font-weight: 600;
  color: var(--text-2); background: var(--surface-1); box-shadow: var(--hairline);
  transition: background .18s, color .18s, transform .18s var(--spring);
}
.pill:hover { background: var(--surface-3); color: #fff; transform: translateY(-2px); }
.pill .ico { color: var(--c, var(--violet)); }

.prose {
  padding: clamp(22px, 2.4vw, 34px);
  border-radius: var(--r-lg); line-height: 1.75; color: #e2dbf3;
  background: var(--surface-1); box-shadow: var(--hairline);
}
.prose h2 { font-size: clamp(19px, 1.7vw, 24px); margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.prose h2 .ico { color: var(--violet); }
.prose h3 { font-size: 18px; margin: 22px 0 8px; }
.prose p + p { margin-top: 12px; }
.prose ul { padding-inline-start: 20px; list-style: disc; }
.prose li { margin: 6px 0; }
.prose a { color: #c4b5fd; text-decoration: underline; text-underline-offset: 3px; }
.prose.cms { max-width: 820px; }

/* --- chat ----------------------------------------------------------------- */
.chat-head {
  padding: 18px 18px 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--edge-soft);
}
.chat-head strong { font-family: var(--display); font-size: 17px; font-weight: 700; }
.chat-online { color: var(--text-3); font-size: 12px; display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); animation: pulse 2.4s infinite; }

.chat-stream {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 14px; display: flex; flex-direction: column; gap: 3px;
  overscroll-behavior: contain;
}
.chat-msg { display: flex; gap: 10px; padding: 3px 0; animation: msgIn .4s var(--spring); }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
.chat-avatar {
  width: 32px; height: 32px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700; color: #fff;
  background: linear-gradient(140deg, hsl(var(--h) 72% 58%), hsl(calc(var(--h) + 42) 68% 46%));
  box-shadow: var(--hairline);
}
.chat-body { min-width: 0; flex: 1; }
.chat-name {
  display: flex; align-items: baseline; gap: 7px;
  font-size: 12.5px; font-weight: 700; color: hsl(var(--h) 70% 74%);
}
.chat-time { font-size: 10.5px; color: var(--text-3); font-weight: 400; }
.chat-text { font-size: 13.8px; color: #ddd5ee; word-break: break-word; line-height: 1.5; }
.chat-msg.is-grouped { padding-top: 0; }
.chat-msg.is-grouped .chat-avatar { visibility: hidden; height: 0; }
.chat-msg.is-grouped .chat-name { display: none; }
.chat-msg.is-me .chat-text { color: #fff; }
.chat-msg.is-me .chat-name::after {
  content: "•"; color: var(--cyan);
}
.chat-empty { margin: auto; text-align: center; color: var(--text-3); font-size: 13.5px; padding: 24px; }
.chat-empty .ico { margin: 0 auto 12px; opacity: .45; }

.chat-jump {
  position: absolute; inset-inline: 0; bottom: 14px; margin: 0 auto; width: fit-content;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 99px; font-size: 12.5px; font-weight: 600;
  color: #fff; background: rgba(var(--glow), .9);
  box-shadow: var(--lift-2);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .2s, transform .28s var(--spring);
  z-index: 5;
}
.chat-jump.is-on { opacity: 1; transform: none; pointer-events: auto; }
.chat-jump { box-shadow: var(--lift-1); }
.chat-panel { position: sticky; }
.chat-panel > .chat-wrap { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }

.chat-form { padding: 12px 14px 16px; display: grid; gap: 8px; border-top: 1px solid var(--edge-soft); }
.chat-nick-row { display: flex; align-items: center; gap: 8px; }
.chat-nick-row .ico { color: var(--text-3); flex: none; }
.chat-form input {
  width: 100%; min-width: 0;
  background: var(--sunken); border: 0; outline: 0;
  border-radius: var(--r-sm); padding: 11px 14px; font-size: 14px;
  box-shadow: inset 0 0 0 1px var(--edge);
  transition: box-shadow .2s var(--swift), background .2s;
}
.chat-form input::placeholder { color: var(--text-3); }
.chat-form input:focus { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.chat-row { display: flex; gap: 8px; align-items: center; }
.chat-send {
  width: 44px; height: 44px; flex: none; border-radius: var(--r-sm);
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--magenta));
  box-shadow: var(--hairline);
  transition: transform .2s var(--spring), filter .2s, opacity .2s;
}
.chat-send:hover { transform: translateY(-2px) scale(1.04); }
.chat-send:active { transform: scale(.93); }
.chat-send[disabled] { opacity: .4; pointer-events: none; }
[dir="rtl"] .chat-send .ico { transform: scaleX(-1); }
.chat-count { font-size: 10.5px; color: var(--text-3); text-align: end; font-variant-numeric: tabular-nums; }

/* --- footer --------------------------------------------------------------- */
.site-foot {
  margin: auto var(--gut) 28px; padding: 26px 28px;
  border-radius: var(--r-lg);
  background: var(--surface-1); box-shadow: var(--hairline);
  display: grid; gap: 18px;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
}
.foot-brand { display: flex; flex-direction: column; gap: 6px; }
.foot-brand strong { font-family: var(--display); font-size: 20px; }
.foot-brand p { color: var(--text-3); font-size: 13.5px; max-width: 46ch; }
.site-foot nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-foot nav a {
  padding: 7px 13px; border-radius: 99px; font-size: 13.5px; color: var(--text-2);
  transition: background .18s, color .18s;
}
.site-foot nav a:hover { background: var(--surface-2); color: #fff; }
.foot-legal { grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid var(--edge-soft); color: var(--text-3); font-size: 12.5px; }

/* --- toasts --------------------------------------------------------------- */
.toasts {
  position: fixed; z-index: 90; bottom: 20px; inset-inline-start: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
[dir="rtl"] .toasts { transform: translateX(50%); }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 99px;
  font-size: 13.5px; font-weight: 600;
  color: #fff; background: rgba(20, 15, 38, .97);
  backdrop-filter: blur(20px);
  box-shadow: var(--lift-3), inset 0 0 0 1px var(--edge);
  animation: toastIn .4s var(--spring);
}
.toast.is-out { animation: toastOut .3s var(--swift) forwards; }
.toast .ico { color: var(--cyan); }
.toast.warn .ico { color: var(--gold); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.94); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.96); } }

/* --- misc ----------------------------------------------------------------- */
.empty {
  grid-column: 1 / -1; padding: 46px 20px; text-align: center;
  color: var(--text-3); font-size: 14.5px;
  border-radius: var(--r-lg); background: var(--surface-1);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty .ico { opacity: .4; }

.pager { display: flex; gap: 10px; align-items: center; justify-content: center; padding-top: 6px; }
.pager a, .pager span {
  display: inline-flex; align-items: center; gap: 7px;
  height: 42px; padding: 0 18px; border-radius: 99px; font-weight: 600; font-size: 14px;
  background: var(--surface-1); box-shadow: var(--hairline); color: var(--text-2);
  transition: background .18s, color .18s;
}
.pager a:hover { background: var(--surface-3); color: #fff; }
.pager .pager-now { background: none; box-shadow: none; color: var(--text-3); font-variant-numeric: tabular-nums; }
[dir="rtl"] .pager .ico { transform: scaleX(-1); }

.scrim {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(4, 3, 10, .62); backdrop-filter: blur(4px);
  animation: fade .25s var(--swift);
}
@keyframes fade { from { opacity: 0; } }

/* Game names, nicknames and chat lines are user/feed content that may be in a
   different script than the UI — let each string pick its own direction. */
.game-meta h3, .sp-name, .chat-text, .chat-name > span:first-child,
.player-title h1, .hero-copy h1, .hero-copy h2, .hero-desc,
.cat-tile > span:last-child, .page-hero h1, .section-title h2 {
  unicode-bidi: plaintext;
}

[dir="rtl"] body { font-family: "Heebo", "Rubik", sans-serif; }
[dir="rtl"] .loot-timer { direction: ltr; }

/* --- category blocks, two per row ---------------------------------------- */
.cat-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(26px, 2.8vw, 40px) clamp(18px, 2vw, 30px);
}
.cat-block { min-width: 0; }
.cat-block .section-head { margin-bottom: 12px; }
.cat-block .section-title h2 { font-size: clamp(17px, 1.25vw, 20px); }
.cat-block .section-badge { width: 30px; height: 30px; border-radius: 10px; }
/* In a half-width column the description only ever truncates, so it earns its
   place back once the viewport is wide enough to show it whole. */
.cat-block .section-sub { display: none; }
@media (min-width: 1560px) {
  .cat-block .section-sub {
    display: block; font-size: 12.5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
}
.cat-block .section-link { font-size: 13px; padding: 6px 10px; }
/* Half-width rails need a smaller card so more than two peek into view. */
.cat-block .game-rail { grid-auto-columns: minmax(126px, 1fr); gap: 12px; }
.cat-block .game-meta h3 { font-size: 13px; }
.cat-block .game-meta small { font-size: 11.5px; }
.cat-block .fav-dot { width: 28px; height: 28px; top: 7px; inset-inline-end: 7px; }
.cat-block .play-fab { width: 36px; height: 36px; }
.cat-block .game-hover { padding: 9px; }
.cat-block .game-quick { display: none; }

/* Single column again: the block is full width, so it behaves like any other
   section and the description fits. */
@media (max-width: 860px) {
  .cat-columns { grid-template-columns: 1fr; }
  .cat-block .game-rail { grid-auto-columns: minmax(138px, 1fr); }
  .cat-block .section-sub { display: block; white-space: normal; font-size: 12.5px; }
}

/* --- cookie consent ------------------------------------------------------- */
.cookie-bar {
  position: fixed; z-index: 80;
  inset-inline: max(16px, calc(50% - 470px)); bottom: 16px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 20px; border-radius: var(--r-md);
  background: rgba(15, 12, 28, .97);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: var(--lift-3), inset 0 0 0 1px var(--edge);
  animation: cookieIn .45s var(--spring);
}
@keyframes cookieIn { from { opacity: 0; transform: translateY(18px); } }
.cookie-ico {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  display: grid; place-items: center; color: var(--cyan);
  background: rgba(46, 230, 214, .12);
}
.cookie-copy { flex: 1 1 280px; min-width: 0; }
.cookie-copy strong { display: block; font-family: var(--display); font-size: 16px; margin-bottom: 3px; }
.cookie-copy p { font-size: 13.5px; color: var(--text-2); line-height: 1.55; }
.cookie-copy a { color: #c4b5fd; text-decoration: underline; text-underline-offset: 3px; }
.cookie-actions { display: flex; gap: 8px; flex: none; margin-inline-start: auto; }
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; }

.link-btn {
  color: inherit; padding: 0; font: inherit;
  text-decoration: underline; text-underline-offset: 3px;
  transition: color .16s;
}
.link-btn:hover { color: var(--text); }

/* --- legal documents ------------------------------------------------------ */
.prose .legal-lead {
  font-size: 15.5px; color: var(--text); line-height: 1.7;
  padding: 16px 18px; margin-bottom: 8px;
  border-radius: var(--r-sm); background: var(--surface-1);
}
.prose h2 { margin-top: 30px; font-size: 19px; }
.prose h2:first-of-type { margin-top: 22px; }
.prose code {
  font-family: var(--mono); font-size: 12.5px;
  padding: 2px 7px; border-radius: 6px;
  background: var(--sunken); color: #d8c9ff;
  unicode-bidi: plaintext;
}
.prose strong { color: #fff; }

@media (max-width: 680px) {
  .cookie-bar { inset-inline: 10px; bottom: 10px; padding: 14px; gap: 12px; }
  .cookie-ico { display: none; }
  .cookie-actions { width: 100%; margin-inline-start: 0; }
  .cookie-actions .btn { flex: 1; justify-content: center; }
}

/* --- responsive ----------------------------------------------------------- */
@media (max-width: 1380px) {
  :root { --chat: 300px; --sidebar: 250px; }
}
@media (max-width: 1240px) {
  .app { grid-template-columns: var(--sidebar) minmax(0, 1fr); }
  .chat-panel {
    position: fixed; z-index: 35; top: 0; bottom: 0; height: 100dvh;
    inset-inline-end: 0; width: min(340px, 90vw);
    transform: translateX(110%);
    transition: transform .4s var(--spring);
  }
  [dir="rtl"] .chat-panel { transform: translateX(-110%); }
  .chat-panel.is-open { transform: none; }
  .only-chat { display: inline-grid; place-items: center; }
  .hero-slide { grid-template-columns: 1fr; }
  .hero-visual { width: 72%; opacity: .55; }
}
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; z-index: 35; top: 0; bottom: 0; height: 100dvh;
    inset-inline-start: 0; width: min(300px, 86vw);
    transform: translateX(-110%);
    transition: transform .4s var(--spring);
  }
  [dir="rtl"] .sidebar { transform: translateX(110%); }
  .sidebar.is-open { transform: none; }
  .only-mobile { display: inline-grid; place-items: center; }
  .search-kbd { display: none; }
  .site-foot { grid-template-columns: 1fr; }
  .player-bar { flex-wrap: wrap; }
  .player-actions { margin-inline-start: 0; width: 100%; justify-content: space-between; }
}
@media (max-width: 680px) {
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 11px; }
  .game-rail { grid-auto-columns: minmax(138px, 1fr); }

  /* Give the search its own full-width row instead of fighting the actions. */
  .topbar { flex-wrap: wrap; row-gap: 10px; }
  .search-wrap { order: 3; flex: 1 0 100%; max-width: none; }
  .search { height: 46px; }
  .top-actions { margin-inline-start: auto; }
  .lang-btn span { display: none; }

  .hero { min-height: 420px; border-radius: var(--r-lg); }
  .hero-desc {
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .hero-copy { padding-bottom: 60px; }
  .hero-visual { width: 100%; opacity: .3; mask-image: linear-gradient(to top, #000 10%, transparent 85%); -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 85%); }
  .hero-controls { inset-inline-end: 16px; bottom: 16px; }
  .hero-arrows { display: none; }
  .topbar { padding: 12px 14px; gap: 8px; }
  .chip { padding: 0 11px; }
  .iframe-wrap { aspect-ratio: 4 / 3; }
  .tool[data-tip]::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}
