/* ==========================================================
   Пиратыч Заносит — пираты, золото и казино
   Светлая «пергаментная» тема по умолчанию, тёмная «ночная» по переключателю.
   Анимации: Apple (размытие, слова, 3D-наклон, Dynamic Island),
   старые телефоны (LCD-экран, пиксельный шрифт), Windows XP (заставка, окно).
   ========================================================== */

:root {
  --bg: #fbf6ea;
  --bg-elev: #fffdf7;
  --surface: #ffffff;
  --surface-2: #f8f0dd;
  --surface-3: #efe2c4;
  --border: rgba(92, 62, 20, .12);
  --border-strong: rgba(92, 62, 20, .24);
  --text: #2a1d0c;
  --muted: #7d6849;
  --gold: #e2a523;
  --gold-hi: #f6d37a;
  --gold-deep: #a8711c;
  --gold-text: #94610c;
  --gold-ink: #2a1606;
  --gold-soft: rgba(226, 165, 35, .12);
  --gold-line: rgba(196, 136, 26, .5);
  --red: #b3142c;
  --felt: #145c3d;
  --up: #1f7a4a;
  --down: #b3142c;
  --header-bg: rgba(251, 246, 234, .82);
  --suit: rgba(140, 96, 30, .07);
  --glow-a: rgba(242, 193, 78, .22);
  --glow-b: rgba(179, 20, 44, .08);
  --lcd-bg: #c4d3a2;
  --lcd-ink: #233019;
  --xp-body: #f4f1e6;
  --shadow: 0 1px 2px rgba(60, 40, 10, .05), 0 10px 28px -18px rgba(60, 40, 10, .3);
  --shadow-hover: 0 0 0 1.5px var(--gold-line), 0 22px 40px -22px rgba(168, 113, 28, .55);
  --radius: 20px;
  --ease: cubic-bezier(.2, .75, .2, 1);
  --spring: cubic-bezier(.34, 1.5, .64, 1);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-display: "Yeseva One", Georgia, "Times New Roman", serif;
  --font-brand: "Rubik Distressed", "Yeseva One", Georgia, serif;
  --font-xp: Tahoma, Verdana, "Segoe UI", sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0e0b10;
  --bg-elev: #141016;
  --surface: #19141c;
  --surface-2: #221b25;
  --surface-3: #2e2530;
  --border: rgba(246, 211, 122, .1);
  --border-strong: rgba(246, 211, 122, .2);
  --text: #f6eedb;
  --muted: #b3a283;
  --gold-text: #f2c55c;
  --gold-soft: rgba(242, 197, 92, .1);
  --gold-line: rgba(242, 197, 92, .45);
  --up: #6fd48f;
  --down: #ff6b7d;
  --header-bg: rgba(14, 11, 16, .78);
  --suit: rgba(246, 211, 122, .045);
  --glow-a: rgba(242, 193, 78, .13);
  --glow-b: rgba(179, 20, 44, .14);
  --lcd-bg: #1d2914;
  --lcd-ink: #b8d98a;
  --xp-body: #24202a;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 30px -18px rgba(0, 0, 0, .8);
  --shadow-hover: 0 0 0 1.5px var(--gold-line), 0 22px 44px -22px rgba(242, 193, 78, .35);
  color-scheme: dark;
}

@property --angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 500;
  line-height: 1.45;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
/* Едва заметный узор из мастей */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cg font-family='Georgia,serif' font-size='22' fill='%23000'%3E%3Ctext x='14' y='36'%3E%E2%99%A0%3C/text%3E%3Ctext x='94' y='56'%3E%E2%99%A5%3C/text%3E%3Ctext x='44' y='116'%3E%E2%99%A6%3C/text%3E%3Ctext x='120' y='140'%3E%E2%99%A3%3C/text%3E%3C/g%3E%3C/svg%3E");
  background-size: 160px 160px;
  opacity: 1;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 10%, #000 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 10%, #000 20%, transparent 80%);
  filter: opacity(.06);
}
:root[data-theme="dark"] body::before { filter: invert(1) opacity(.05); }
.bg-glow { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-glow span {
  position: absolute; width: 60vw; height: 60vw; max-width: 820px; max-height: 820px; border-radius: 50%;
  filter: blur(90px); will-change: transform;
}
.bg-glow span:nth-child(1) { top: -25%; left: -12%; background: var(--glow-a); animation: drift-a 28s ease-in-out infinite alternate; }
.bg-glow span:nth-child(2) { top: 15%; right: -22%; background: var(--glow-b); animation: drift-b 34s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(18vw, 12vh) scale(1.1); } }
@keyframes drift-b { to { transform: translate(-16vw, 18vh) scale(.92); } }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 10px; }
::selection { background: var(--gold-hi); color: var(--gold-ink); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- Заставка (Windows XP boot) ---------- */
.splash { display: none; }
.js:not(.no-splash) .splash {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 45%, #2b1d0a 0%, #0b0805 60%, #000 100%);
  color: #f6eedb;
  animation: splash-out .7s 1.7s var(--ease) forwards;
}
.splash__inner { display: flex; flex-direction: column; align-items: center; gap: 18px; animation: splash-in .8s var(--ease) both; }
.splash__logo { width: 86px; height: 86px; filter: drop-shadow(0 10px 30px rgba(242, 193, 78, .45)); animation: coin-spin 1.6s var(--ease) both; }
.splash__name { font-family: var(--font-brand); font-size: 36px; letter-spacing: .03em; text-transform: uppercase; }
.splash__name span { background: linear-gradient(180deg, #fff1b8, #e2a523); -webkit-background-clip: text; background-clip: text; color: transparent; }
.splash__bar {
  position: relative; overflow: hidden; width: 168px; height: 18px; margin-top: 8px; padding: 2px;
  border: 2px solid #7a6545; border-radius: 6px; background: #000;
}
.splash__bar i {
  position: absolute; top: 3px; width: 9px; height: 10px; border-radius: 2px;
  background: linear-gradient(180deg, #fff1b8, #e2a523 45%, #a8711c);
  animation: xp-blocks 1.3s linear infinite;
}
.splash__bar i:nth-child(2) { animation-delay: .1s; }
.splash__bar i:nth-child(3) { animation-delay: .2s; }
.splash__copy { position: absolute; left: 24px; bottom: 20px; font-family: var(--font-xp); font-size: 12px; color: #8f7d5d; }
@keyframes xp-blocks { from { left: -30px; } to { left: 180px; } }
@keyframes splash-in { from { opacity: 0; transform: scale(.94); filter: blur(8px); } }
@keyframes splash-out { to { opacity: 0; visibility: hidden; transform: scale(1.06); filter: blur(6px); } }
@keyframes coin-spin { from { transform: rotateY(-540deg) scale(.6); opacity: 0; } }

/* ---------- Появление (Apple: из размытия) ---------- */
.js .reveal {
  opacity: 0; transform: translateY(28px) scale(.985); filter: blur(10px);
  transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  transition-delay: calc(var(--d, 0) * 80ms), calc(var(--d, 0) * 80ms), calc(var(--d, 0) * 80ms), 0s, 0s;
}
.js .reveal.is-in { opacity: 1; transform: none; filter: none; }
.section-title .w {
  display: inline-block; white-space: pre;
}
.js .section-title .w {
  opacity: 0; transform: translateY(.45em); filter: blur(8px);
  transition: opacity .8s var(--ease), transform .8s var(--ease), filter .8s var(--ease);
  transition-delay: calc(var(--i) * 70ms);
}
.js .section-title.is-in .w { opacity: 1; transform: none; filter: none; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .3s;
}
.header.is-scrolled { border-bottom-color: var(--border); }
.header__inner { display: flex; align-items: center; gap: 12px; height: 72px; }

.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; perspective: 400px; }
.brand__icon { width: 44px; height: 44px; filter: drop-shadow(0 6px 14px rgba(196, 136, 26, .4)); transition: transform .9s var(--ease); }
.brand:hover .brand__icon { transform: rotateY(360deg); }
/* Название — потёртый «пиратский» шрифт, как на старой карте сокровищ */
.brand__text { font-family: var(--font-brand); font-weight: 400; font-size: 17px; line-height: .98; letter-spacing: .02em; text-transform: uppercase; color: var(--text); }
.brand__text span {
  font-size: 19px;
  background: linear-gradient(180deg, #f6d37a 0%, #e2a523 50%, #a8711c 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 0 rgba(90, 55, 5, .35));
}

.search {
  position: relative; display: flex; align-items: center; gap: 10px;
  margin-left: auto; width: 250px; height: 44px; padding: 0 14px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px;
  color: var(--muted);
  transition: width .45s var(--ease), border-color .2s, box-shadow .2s;
}
.search svg { width: 17px; height: 17px; flex-shrink: 0; }
/* 16px — меньше iOS автоматически приближает страницу при фокусе */
.search input { width: 100%; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: var(--text); }
.search input::placeholder { color: var(--muted); }
.search:focus-within { width: 300px; border-color: var(--gold-line); box-shadow: 0 0 0 4px var(--gold-soft); }

.icon-btn {
  width: 44px; height: 44px; flex-shrink: 0; position: relative; overflow: hidden;
  display: grid; place-items: center;
  border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface); color: var(--text);
  transition: border-color .2s, transform .2s;
}
.icon-btn:hover { border-color: var(--gold-line); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { grid-area: 1 / 1; width: 20px; height: 20px; transition: transform .5s var(--ease), opacity .3s; }
/* На кнопке — тема, в которую переключит: в светлой луна, в тёмной солнце */
.icon-btn .i-moon { opacity: 0; transform: rotate(90deg) scale(.4); }
:root[data-theme="light"] .icon-btn .i-moon { opacity: 1; transform: none; }
:root[data-theme="light"] .icon-btn .i-sun { opacity: 0; transform: rotate(-90deg) scale(.4); }

.cta {
  position: relative; display: flex; align-items: center; gap: 12px; flex-shrink: 0;
  height: 48px; padding: 0 5px 0 16px; border-radius: 14px;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(110deg, var(--red), var(--gold)) border-box;
  border: 1.5px solid transparent;
  transition: transform .25s var(--ease);
}
.cta:hover { transform: translateY(-1px); }
.cta__text { font-size: 11.5px; font-weight: 600; line-height: 1.2; color: var(--muted); }
.cta__text b { color: var(--text); font-weight: 800; }
.cta__btn {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 16px; border-radius: 10px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, #c4881a); color: var(--gold-ink);
  font-weight: 800; font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}
.cta__btn svg { width: 17px; height: 17px; }

/* ---------- Баннеры ---------- */
.banners { display: grid; grid-template-columns: 1fr 1fr .5fr; gap: 16px; margin: 26px 0 46px; padding-top: 10px; }
.banner {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: center;
  min-height: 120px; padding: 20px 22px;
  border-radius: var(--radius); color: #fff;
  border: 1.5px solid rgba(246, 211, 122, .35);
  background-size: cover; background-position: center;
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, .12), 0 14px 30px -22px rgba(60, 40, 10, .6);
}
.banner::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 240, 200, .22) 50%, transparent 65%);
  transform: translateX(-120%);
}
a.banner { transition: opacity .9s var(--ease), transform .45s var(--ease), box-shadow .45s var(--ease), filter .9s var(--ease); }
a.banner:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 4px rgba(0, 0, 0, .12), 0 22px 40px -20px rgba(60, 40, 10, .7); }
a.banner:hover::after { transform: translateX(120%); transition: transform .9s var(--ease); }
/* Сукно стола, бархат и ночное море */
.banner--gold { background-color: #0e4a31; background-image: radial-gradient(120% 140% at 70% 30%, #1d7a52 0%, #0e4a31 55%, #072a1c 100%); }
.banner--dark { background-color: #4a0c18; background-image: radial-gradient(120% 140% at 75% 40%, #8a1a2c 0%, #4a0c18 55%, #22050b 100%); }
.banner--blue { background-color: #0b2441; background-image: radial-gradient(120% 120% at 80% 20%, #1c4b7d 0%, #0b2441 60%, #050f1f 100%); }
.banner--image { background-image: none; }
.banner__art { position: absolute; right: 6px; bottom: 0; z-index: -1; width: 50%; max-width: 230px; height: auto; transition: transform .6s var(--spring); }
a.banner:hover .banner__art { transform: translateY(-5px) rotate(-2deg); }
/* На телефонах «наведения» нет — баннер не подпрыгивает от касания */
@media (hover: none) {
  a.banner:hover, a.banner:hover .banner__art { transform: none; }
}
.banner--blue .banner__art { width: 62%; right: -14px; opacity: .55; }
.banner__dice { animation: dice-bob 4s ease-in-out infinite; }
@keyframes dice-bob { 50% { transform: translateY(-4px) rotate(2deg); } }
.banner__title { position: relative; font-family: var(--font-display); font-size: 23px; line-height: 1.15; max-width: 60%; text-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.banner__subtitle { position: relative; margin-top: 8px; font-size: 14px; font-weight: 700; color: #f6d37a; max-width: 60%; }
.banner--blue .banner__title, .banner--blue .banner__subtitle { max-width: 85%; }
.banner__badge {
  position: relative; z-index: 1; align-self: flex-start; margin-bottom: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--gold-ink);
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.banner__badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); animation: ping 1.8s infinite; }

/* ---------- Заголовок секции ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 24px; }
.section-title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 32px; letter-spacing: .005em; line-height: 1.15; }
.live {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600;
}
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: ping 1.8s infinite; }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(179, 20, 44, .55); }
  80%, 100% { box-shadow: 0 0 0 8px rgba(179, 20, 44, 0); }
}
.empty { padding: 48px 0; text-align: center; color: var(--muted); font-size: 16px; }
.empty__dice { display: block; font-size: 40px; margin-bottom: 8px; animation: roll 1.2s var(--spring) both; }
@keyframes roll { from { transform: rotate(-540deg) translateX(-60px); opacity: 0; } }

/* ---------- Фишки рейтинга ---------- */
.rank {
  --chip: #1c1a22; --chip-ink: #fff;
  position: relative; flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: repeating-conic-gradient(var(--chip) 0 22.5deg, #fffaf0 22.5deg 45deg);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .25), 0 6px 12px -4px rgba(0, 0, 0, .35);
  transition: transform .7s var(--spring);
}
.rank::before {
  content: ""; position: absolute; inset: 5px; border-radius: 50%;
  background: var(--chip); border: 1.5px dashed rgba(255, 250, 240, .75);
}
.rank b { position: relative; font-size: 13px; font-weight: 800; color: var(--chip-ink); }
.rank--gold { --chip: #d9a22b; --chip-ink: #2a1606; }
.rank--red { --chip: #b3142c; }
.rank--blue { --chip: #2b4fb3; }
.rank--green { --chip: #1f7a4a; }
.rank--violet { --chip: #6b2fb3; }
.rank--sm { width: 32px; height: 32px; }
.rank--sm::before { inset: 4px; }
.rank--sm b { font-size: 11px; }
.card:hover .rank, .row:hover .rank, .featured:hover .rank { transform: rotate(360deg); }

/* ---------- Общие элементы ---------- */
.info-btn {
  width: 30px; height: 30px; flex-shrink: 0; padding: 0;
  display: grid; place-items: center;
  border: 1px solid var(--border-strong); border-radius: 9px; background: transparent; color: var(--muted);
  transition: color .2s, border-color .2s, background-color .2s;
}
.info-btn svg { width: 17px; height: 17px; }
.info-btn:hover { color: var(--gold-text); border-color: var(--gold-line); background: var(--gold-soft); }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 14.5px; }
.checks li { display: flex; align-items: flex-start; gap: 9px; }
/* Галочка в золотой монетке */
.checks svg {
  width: 20px; height: 20px; flex-shrink: 0; padding: 4px; margin-top: -1px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff1b8, #f2c14e 50%, #c4881a);
  color: #4a2c06; box-shadow: 0 1px 0 #8a5a0b;
}
.checks--lg { gap: 14px; font-size: 17px; }
.checks--lg svg { width: 24px; height: 24px; padding: 5px; }

.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 26px; border-radius: 14px;
  font-weight: 800; font-size: 15px; text-align: center; letter-spacing: .01em;
  border: 1px solid transparent;
  transition: transform .3s var(--spring), box-shadow .3s var(--ease), background-color .25s, border-color .25s, color .25s;
}
.btn:active { transform: scale(.96); }
.btn .i-arrow { width: 17px; height: 17px; transition: transform .35s var(--ease); }
.btn:hover .i-arrow { transform: translate(2px, -2px); }
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  transform: translateX(-120%);
}
.btn:hover::after { transform: translateX(120%); transition: transform .8s var(--ease); }
/* Глянцевая золотая кнопка — привет кнопкам XP */
.btn--accent {
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 50%, #c4881a 51%, #e0a22a 100%);
  color: var(--gold-ink); border-color: #a8711c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 10px 26px -10px rgba(196, 136, 26, .7);
  text-shadow: 0 1px 0 rgba(255, 241, 184, .6);
}
.btn--accent:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 16px 32px -10px rgba(196, 136, 26, .8); }
.btn--lg { height: 58px; padding: 0 34px; font-size: 17px; }
.btn--outline { background: transparent; border: 1.5px solid var(--gold-line); color: var(--text); }
.btn--outline::after { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); transform: translateY(101%); transition: transform .4s var(--ease); }
.btn--outline:hover { color: var(--gold-ink); border-color: var(--gold); }
.btn--outline:hover::after { transform: none; transition: transform .4s var(--ease); }
.btn--sm { height: 42px; padding: 0 18px; font-size: 14px; }
.btn--ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); min-width: 220px; }
.btn--ghost:hover { border-color: var(--gold-line); box-shadow: 0 0 0 4px var(--gold-soft); }
.more__count { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--red); color: #fff; }

.logo-text { font-family: var(--font-display); font-weight: 400; letter-spacing: .005em; line-height: 1; }
.logo-img { display: block; flex-shrink: 0; max-width: 100%; object-fit: contain; }
/* Карточки целиком кликабельны, название — ссылка */
[data-card] { cursor: pointer; }
[data-card] .checks, [data-card] .stat { cursor: pointer; }
a.featured__logo, a.card__logo, a.row__logo { color: inherit; text-decoration: none; transition: opacity .2s, transform .3s var(--spring); }
a.card__logo:hover .logo-text, a.row__logo:hover .logo-text { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--gold); }
a.featured__logo:hover { transform: translateX(4px); }
/* Картинка и название площадки стоят рядом */
.featured__logo, .card__logo, .row__logo, .modal__logo, .wheel-result__logo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.featured__logo .logo-img ~ .logo-text, .card__logo .logo-img ~ .logo-text, .row__logo .logo-img ~ .logo-text, .modal__logo .logo-img ~ .logo-text, .wheel-result__logo .logo-img ~ .logo-text {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Копирование промокода: иконка меняется на галочку */
.i-copy, .i-done { transition: transform .35s var(--spring), opacity .25s; }
.i-done { position: absolute; opacity: 0; transform: scale(.3); }
.is-copied .i-copy { opacity: 0; transform: scale(.3); }
.is-copied .i-done { opacity: 1; transform: none; color: var(--up); }

/* ---------- Главная карточка: каюта капитана ---------- */
.featured {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; justify-content: space-between; align-items: stretch; gap: 28px;
  padding: 40px; margin-bottom: 26px;
  border-radius: 28px; color: #f6eedb;
  border: 1.5px solid transparent;
  background:
    radial-gradient(80% 120% at 85% 50%, rgba(242, 193, 78, .2), transparent 60%) padding-box,
    radial-gradient(60% 90% at 0% 100%, rgba(179, 20, 44, .22), transparent 60%) padding-box,
    linear-gradient(135deg, #22170b, #120c07) padding-box,
    conic-gradient(from var(--angle), rgba(246, 211, 122, .25) 0deg, rgba(246, 211, 122, .25) 200deg, #fff1b8 260deg, #e2a523 290deg, rgba(246, 211, 122, .25) 330deg) border-box;
  animation: spin 8s linear infinite;
  box-shadow: 0 34px 60px -32px rgba(40, 25, 5, .7);
}
@keyframes spin { to { --angle: 360deg; } }
.js .featured.reveal.is-in {
  transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: opacity .9s var(--ease), transform .6s var(--ease), filter .9s var(--ease);
}
.js .featured.reveal.is-in.is-tilting { transition: opacity .9s var(--ease), transform .12s linear, filter .9s var(--ease); }
/* Блик за курсором, как на карточках Apple */
.featured::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 241, 184, .12), transparent 45%);
  opacity: 0; transition: opacity .4s;
}
.featured.is-tilting::after { opacity: 1; }
.featured__bg { position: absolute; right: -60px; top: 50%; z-index: -1; width: 460px; height: 460px; margin-top: -230px; opacity: .2; pointer-events: none; }
.roulette { width: 100%; height: 100%; }
.roulette__wheel { transform-box: fill-box; transform-origin: center; animation: wheel 40s linear infinite; }
.roulette__ball { transform-box: fill-box; transform-origin: center; animation: wheel 7s linear infinite reverse; }
@keyframes wheel { to { transform: rotate(360deg); } }
.featured > .info-btn { position: absolute; top: 18px; right: 18px; z-index: 2; border-color: rgba(246, 211, 122, .25); color: #d9c49a; }
.featured__left { position: relative; z-index: 2; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.featured__tags { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.featured__badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px; border-radius: 999px; border: 1px solid rgba(246, 211, 122, .4);
  background: rgba(246, 211, 122, .08); color: #f6d37a;
  font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.featured__badge span { font-size: 15px; }
.featured__logo .logo-text {
  display: block; font-size: 64px;
  background: linear-gradient(180deg, #fff6d8 10%, #f2c14e 55%, #b57a12);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 16px rgba(242, 193, 78, .3));
}
/* Длинное название переносится и уменьшается под ширину, а не залезает под автомат */
.featured__logo { gap: 16px; align-self: stretch; max-width: 100%; }
.featured__logo .logo-text, .featured__logo .logo-img ~ .logo-text {
  font-size: clamp(34px, 4.4vw, 64px); line-height: 1.05; padding-bottom: .08em;
  white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word;
}
.featured__logo .logo-img { max-height: 64px; max-width: 120px; border-radius: 14px; }
.featured .checks li { color: #e7dcc3; }
.featured__right { position: relative; z-index: 2; flex-shrink: 0; min-width: 0; display: flex; gap: 16px; align-items: center; padding-top: 34px; }

/* Промокод в главной карточке: понятная панель с билетом и подсказкой */
.promo-panel {
  width: 320px; display: flex; flex-direction: column; gap: 10px; padding: 18px;
  border-radius: 22px; background: rgba(255, 241, 184, .06); border: 1px solid rgba(246, 211, 122, .3);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.promo-panel__label { color: #f6d37a; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
/* Иконки «копировать» и «готово» сменяют друг друга в одной ячейке */
.ico { position: relative; display: inline-grid; flex-shrink: 0; width: 16px; height: 16px; }
.ico svg { grid-area: 1 / 1; }
.ico .i-done { position: static; }

.bonus-card {
  position: relative; width: 230px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  padding: 22px; border-radius: 22px;
  background: rgba(255, 241, 184, .06); border: 1px solid rgba(246, 211, 122, .22);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.bonus-card__coins { width: 96px; margin-bottom: auto; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .4)); animation: coins-float 3.5s ease-in-out infinite; }
@keyframes coins-float { 50% { transform: translateY(-5px); } }
.bonus-card__label { color: #c9b48a; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.bonus-card__value { font-family: var(--font-display); font-size: 28px; line-height: 1.1; color: #f6d37a; }

/* ---------- Карточки ---------- */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 26px; }
.cards:last-child, .featured:last-child { margin-bottom: 0; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0;
  padding: 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.card::before {
  content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: 3px; border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .7;
}
.card:hover, .row:hover { border-color: transparent; box-shadow: var(--shadow-hover); }
.js .card.reveal.is-in:hover { transform: translateY(-5px); transition-delay: 0s; transition-timing-function: var(--spring); }
.card__head { display: flex; align-items: center; gap: 10px; min-height: 42px; }
.card__logo { flex: 1; min-width: 0; }
.card__logo .logo-text { font-size: 24px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__logo .logo-img { max-height: 34px; max-width: 60px; border-radius: 8px; }

.stats { display: flex; gap: 8px; }
.stat {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 3px;
  padding: 10px 12px; border-radius: 12px; background: var(--surface-2);
}
.stat span { color: var(--muted); font-size: 12px; font-weight: 600; }
.stat b { font-size: 14.5px; font-weight: 800; overflow-wrap: anywhere; }

.promo-strip {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%;
  padding: 11px 46px 11px 20px; border-radius: 10px; cursor: pointer; text-align: left;
  border: 0; background: linear-gradient(180deg, #fff3cf, #f7e1a1); color: var(--gold-ink);
  -webkit-mask: radial-gradient(circle 7px at 0 50%, transparent 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 7px at 100% 50%, transparent 97%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 7px at 0 50%, transparent 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 7px at 100% 50%, transparent 97%, #000) right / 51% 100% no-repeat;
  transition: transform .35s var(--spring), filter .25s;
}
.promo-strip::before { content: ""; position: absolute; inset: 4px 10px; border: 1.5px dashed rgba(138, 90, 11, .45); border-radius: 6px; pointer-events: none; }
.promo-strip__label { color: #8a6a35; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
/* Код — крупный, жирный и с разрядкой, чтобы легко прочитать и переписать */
.promo-strip b { max-width: 100%; font-family: var(--font); font-size: 18px; font-weight: 800; line-height: 1.2; letter-spacing: .06em; overflow-wrap: anywhere; color: #3a2406; }
:root[data-theme="dark"] .promo-strip b { color: #fff3cf; }
.promo-strip svg { position: absolute; right: 20px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: #8a5a0b; }
.promo-strip:hover { filter: brightness(1.04) saturate(1.1); transform: translateY(-1px) rotate(-.6deg); }
.promo-strip:active, .chip--promo:active { transform: scale(.97); }
:root[data-theme="dark"] .promo-strip { background: linear-gradient(180deg, #3a2c12, #2b200d); color: #f6d37a; }
:root[data-theme="dark"] .promo-strip::before { border-color: rgba(246, 211, 122, .35); }
:root[data-theme="dark"] .promo-strip__label { color: #c9b48a; }
:root[data-theme="dark"] .promo-strip svg { color: #f6d37a; }
.card .checks { flex: 1; }
.card .btn { width: 100%; }

/* ---------- Подставка под промокодом: скопируй → введи при регистрации → бонус ---------- */
.promo-box {
  display: flex; flex-direction: column; gap: 8px; padding: 0 0 10px;
  border-radius: 12px; background: var(--gold-soft);
  box-shadow: inset 0 0 0 1px rgba(196, 136, 26, .18);
}
.promo-box .promo-strip { box-shadow: 0 6px 12px -8px rgba(90, 55, 5, .45); }
.promo-strip--lg { padding: 14px 52px 14px 22px; }
.promo-strip--lg b { font-size: 22px; }
.promo-strip--lg svg { width: 20px; height: 20px; margin-top: -10px; }
.how { display: flex; align-items: center; justify-content: space-between; gap: 2px; padding: 0 8px; }
.how__step {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px;
  border-radius: 10px; text-align: center; font-size: 11px; font-weight: 700; line-height: 1.2; color: var(--muted);
  animation: how-glow 3.6s ease-in-out infinite;
}
.how__step--2 { animation-delay: 1.2s; }
.how__step--3 { animation-delay: 2.4s; }
.how__num {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--gold-ink);
  font-style: normal; font-size: 11px; font-weight: 800; box-shadow: 0 2px 0 #a8711c;
}
.how__step--3 .how__num { background: none; box-shadow: none; font-size: 16px; }
@keyframes how-glow {
  0%, 30%, 100% { background: transparent; color: var(--muted); transform: none; }
  10%, 22% { background: rgba(255, 255, 255, .7); color: var(--text); transform: translateY(-2px); }
}
:root[data-theme="dark"] .how__step { animation-name: how-glow-dark; }
@keyframes how-glow-dark {
  0%, 30%, 100% { background: transparent; color: var(--muted); transform: none; }
  10%, 22% { background: rgba(246, 211, 122, .14); color: var(--text); transform: translateY(-2px); }
}
/* Бегущие стрелки между шагами */
.how__arrow { flex-shrink: 0; display: flex; gap: 0; color: var(--gold-deep); }
.how__arrow i {
  width: 7px; height: 7px; margin-left: -2px; border-top: 2px solid currentColor; border-right: 2px solid currentColor;
  transform: rotate(45deg); opacity: .2; animation: chev 1.2s linear infinite;
}
.how__arrow i:nth-child(2) { animation-delay: .2s; }
.how__arrow i:nth-child(3) { animation-delay: .4s; }
@keyframes chev { 0%, 100% { opacity: .2; } 40% { opacity: 1; } }
.how__t-done { display: none; }
/* После копирования: шаг 1 выполнен, пульсирует шаг 2 — «введи при регистрации» */
.promo-box.is-done .how__step { animation: none; }
.promo-box.is-done .how__step--1 { color: var(--up); }
.promo-box.is-done .how__step--1 .how__num { background: var(--up); color: #fff; box-shadow: none; font-size: 0; }
.promo-box.is-done .how__step--1 .how__num::before { content: "✓"; font-size: 12px; }
.promo-box.is-done .how__step--1 .how__t { display: none; }
.promo-box.is-done .how__step--1 .how__t-done { display: inline; }
.promo-box.is-done .how__step--2 { color: var(--text); animation: how-next 1.2s ease-in-out infinite; }
@keyframes how-next { 50% { background: rgba(226, 165, 35, .22); transform: translateY(-2px) scale(1.04); } }
/* В тёмной главной карточке и окне рулетки — светлый текст */
.featured .promo-box, .wheel-result .promo-box { background: rgba(255, 241, 184, .07); box-shadow: inset 0 0 0 1px rgba(246, 211, 122, .2); }
.featured .how__step, .wheel-result .how__step { color: #e7dcc3; animation-name: how-glow-night; }
@keyframes how-glow-night {
  0%, 30%, 100% { background: transparent; transform: none; }
  10%, 22% { background: rgba(246, 211, 122, .16); transform: translateY(-2px); }
}
.featured .promo-box.is-done .how__step--2, .wheel-result .promo-box.is-done .how__step--2 { color: #fff6d8; animation-name: how-next; }
.featured .how__arrow, .wheel-result .how__arrow { color: #f6d37a; }
.featured .promo-box.is-done .how__step--1, .wheel-result .promo-box.is-done .how__step--1 { color: #7ee2a0; }
.featured .promo-box.is-done .how__step--1 .how__num, .wheel-result .promo-box.is-done .how__step--1 .how__num { background: #2f9e5b; }
.wheel-result .promo-box { width: 100%; max-width: 340px; }

/* ---------- Список ---------- */
.rows { display: grid; gap: 10px; }
.row {
  position: relative; display: flex; align-items: center; gap: 14px;
  min-height: 84px; padding: 10px 16px 10px 14px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.row.is-collapsed { display: none; }
.row__logo {
  min-width: 132px; max-width: 280px; height: 60px; flex-shrink: 0;
  justify-content: center; padding: 8px 14px;
  border-radius: 13px; background: var(--surface-2); border: 1px solid var(--border);
}
.row__logo .logo-text { font-size: 20px; text-align: center; }
.row__logo .logo-img { max-height: 40px; max-width: 60px; border-radius: 8px; }
.row__chips { flex: 1; min-width: 0; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 14px; border-radius: 12px;
  background: var(--surface-2); font-size: 14px; white-space: nowrap;
}
.chip span { color: var(--muted); font-weight: 600; font-size: 13px; }
.chip b { font-weight: 800; font-size: 14px; }
.chip--promo {
  flex-shrink: 0; cursor: pointer; border: 0; padding: 0 20px; border-radius: 8px;
  background: linear-gradient(180deg, #fff3cf, #f7e1a1); color: var(--gold-ink);
  -webkit-mask: radial-gradient(circle 6px at 0 50%, transparent 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 6px at 100% 50%, transparent 97%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 6px at 0 50%, transparent 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 6px at 100% 50%, transparent 97%, #000) right / 51% 100% no-repeat;
  transition: transform .35s var(--spring), filter .25s;
}
.chip--promo::before { content: ""; position: absolute; inset: 4px 10px; border: 1.5px dashed rgba(138, 90, 11, .45); border-radius: 5px; pointer-events: none; }
.chip--promo span { color: #8a6a35; }
.chip--promo b { font-family: var(--font); font-size: 15px; font-weight: 800; letter-spacing: .05em; }
.chip--promo svg { width: 16px; height: 16px; color: #8a5a0b; }
.chip--promo .i-done { right: 20px; }
.chip--promo:hover { filter: brightness(1.04) saturate(1.1); transform: translateY(-1px) rotate(-.6deg); }
:root[data-theme="dark"] .chip--promo { background: linear-gradient(180deg, #3a2c12, #2b200d); color: #f6d37a; }
:root[data-theme="dark"] .chip--promo::before { border-color: rgba(246, 211, 122, .35); }
:root[data-theme="dark"] .chip--promo span { color: #c9b48a; }
:root[data-theme="dark"] .chip--promo svg { color: #f6d37a; }
.row .btn { flex-shrink: 0; }
main.container { padding-bottom: 64px; }
.more { display: flex; justify-content: center; margin-top: 28px; }
.row.is-revealing { animation: deal .6s var(--spring) both; animation-delay: calc(var(--i, 0) * 70ms); }
/* Строки «раздаются», как карты */
@keyframes deal { from { opacity: 0; transform: translate(-30px, 18px) rotate(-2deg); } }

/* ---------- Подвал ---------- */
.footer { position: relative; padding: 30px 0 30px; border-top: 1px solid var(--border); background: var(--bg-elev); }
.suits { display: flex; justify-content: center; gap: 22px; margin-bottom: 26px; font-size: 20px; color: var(--gold-deep); }
.suits span { transition: transform .5s var(--spring); }
.suits span:nth-child(2), .suits span:nth-child(4) { color: var(--red); }
.suits span:nth-child(3) { color: var(--text); }
.suits:hover span { transform: translateY(-6px) rotate(-12deg); }
.suits span:nth-child(2) { transition-delay: .04s; } .suits span:nth-child(3) { transition-delay: .08s; }
.suits span:nth-child(4) { transition-delay: .12s; } .suits span:nth-child(5) { transition-delay: .16s; }
.footer__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.socials { display: flex; gap: 10px; }
.social {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted);
  transition: color .2s, border-color .2s, transform .3s var(--spring);
}
.social svg { width: 20px; height: 20px; }
.social:hover { color: var(--gold-text); border-color: var(--gold-line); transform: translateY(-3px); }
.footer__notes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.note { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.note h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 15px; font-weight: 800; }
.note__icon {
  width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%;
  background: var(--gold-soft); color: var(--gold-text); font-size: 12px; font-weight: 800;
}
.note__icon--warn { background: rgba(179, 20, 44, .1); color: var(--red); }
.note p, .note ol { margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.note ol { padding-left: 18px; }
.footer__copy { margin: 24px 0 0; color: var(--muted); font-size: 12.5px; }

/* ---------- Окно «Подробнее» в стиле Windows XP ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(20, 12, 2, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s var(--ease); }
.modal__box {
  position: relative; display: flex; flex-direction: column;
  width: 100%; max-width: 460px; max-height: calc(100vh - 32px);
  border-radius: 9px 9px 4px 4px; overflow: hidden;
  background: var(--xp-body); color: var(--text);
  border: 1px solid #0831d9;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .15), 0 40px 80px -30px rgba(0, 0, 0, .7);
  opacity: 0; transform: translateY(14px) scale(.9);
  transition: opacity .25s var(--ease), transform .45s var(--spring);
}
.modal.is-open .modal__backdrop { opacity: 1; }
.modal.is-open .modal__box { opacity: 1; transform: none; }
.xp-bar {
  display: flex; align-items: center; gap: 7px; flex-shrink: 0;
  height: 32px; padding: 0 4px 0 8px;
  background: linear-gradient(180deg, #0a5fe8 0%, #3e8ff9 7%, #1666ea 22%, #0c58df 55%, #0b52d4 85%, #0848bf 100%);
  color: #fff; font-family: var(--font-xp); user-select: none;
}
.xp-bar__icon { width: 18px; height: 18px; }
.xp-bar__title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; text-shadow: 1px 1px 0 #0a2a7a; }
.xp-bar__btns { display: flex; gap: 2px; }
.xp-bar__btn {
  position: relative; width: 22px; height: 22px; padding: 0; display: grid; place-items: center;
  border: 1px solid #fff; border-radius: 3px;
  background: linear-gradient(180deg, #5a9bff, #2a6cf0 50%, #1a57dc);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.xp-min { position: absolute; left: 5px; bottom: 5px; width: 7px; height: 3px; background: #fff; }
.xp-max { width: 10px; height: 10px; border: 1px solid #fff; border-top-width: 3px; }
.xp-bar__btn--close { background: linear-gradient(180deg, #ee8a6b, #d9532b 50%, #c23a10); color: #fff; cursor: pointer; transition: filter .15s; }
.xp-bar__btn--close:hover { filter: brightness(1.15); }
.xp-bar__btn--close svg { width: 14px; height: 14px; }
.modal__content { display: flex; flex-direction: column; gap: 16px; padding: 22px; overflow: auto; }
.modal__content .stats { flex-wrap: wrap; }
.modal__content .stat { background: var(--surface); border: 1px solid var(--border); }
.modal__logo .logo-text { font-size: 30px; }
.modal__logo .logo-img { max-height: 44px; max-width: 80px; border-radius: 10px; }
.modal__text { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.65; }
.modal__content .btn { width: 100%; }

/* ---------- Уведомление: Dynamic Island ---------- */
.island {
  /* Центрируем отступами, а не translate(-50%): ширина растёт в анимации,
     и Safari на iPhone иначе сначала показывает капсулу правее центра */
  position: fixed; left: 0; right: 0; top: 12px; z-index: 200; margin: 0 auto;
  display: flex; align-items: center; gap: 10px; overflow: hidden;
  width: max-content; max-width: 120px; height: 36px; padding: 0 14px 0 6px; border-radius: 999px;
  background: #000; color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap;
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .55);
  transform: translateY(-70px) scale(.7); opacity: 0; pointer-events: none;
  transition: transform .5s var(--spring), opacity .25s, max-width .55s var(--spring), height .45s var(--spring);
}
.island.is-visible { transform: none; opacity: 1; max-width: min(560px, calc(100vw - 24px)); height: 46px; }
.island > * { opacity: 0; transition: opacity .25s .18s; }
.island.is-visible > * { opacity: 1; }
.island__icon { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; animation: coin-spin .9s var(--ease) both; }
.island__text { overflow: hidden; text-overflow: ellipsis; }
.island b { color: #f6d37a; }

/* Монетки, разлетающиеся при копировании («занос»!) */
.coin-fly {
  position: fixed; z-index: 300; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, #fff1b8, #f2c14e 50%, #b57a12);
  box-shadow: 0 0 0 1px #8a5a0b;
  animation: coin-fly .9s cubic-bezier(.2, .6, .4, 1) forwards;
}
@keyframes coin-fly {
  0% { transform: translate(0, 0) scale(.5) rotateY(0); opacity: 1; }
  40% { transform: translate(calc(var(--dx) * .6), var(--up)) scale(1) rotateY(360deg); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(.8) rotateY(900deg); opacity: 0; }
}

/* ---------- Кнопка «наверх»: штурвал ---------- */
.to-top {
  position: fixed; right: 20px; bottom: 24px; z-index: 90;
  width: 60px; height: 60px; padding: 0; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: none;
  filter: drop-shadow(0 10px 16px rgba(60, 40, 10, .35));
  opacity: 0; visibility: hidden; transform: translateY(20px) scale(.8);
  transition: opacity .3s var(--ease), transform .45s var(--spring), visibility .3s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:active { transform: scale(.92); }
.to-top__wheel { width: 60px; height: 60px; transform: rotate(var(--rot, 0deg)); }
/* Центр штурвала со стрелкой — поверх и не вращается */
.to-top__hub {
  position: absolute; left: 50%; top: 50%; z-index: 2;
  width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #4a2c06, #2a1606);
  border: 2px solid #f6d37a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.to-top__arrow { width: 17px; height: 17px; color: #f6d37a; transition: transform .3s var(--spring); }
.to-top.is-visible .to-top__arrow { animation: arrow-hint 1.4s .4s var(--ease) 2; }
.to-top:hover .to-top__arrow { transform: translateY(-3px); }
@keyframes arrow-hint { 0%, 100% { transform: none; } 30% { transform: translateY(-4px); } 60% { transform: translateY(1px); } }
.to-top__label {
  position: absolute; right: calc(100% + 8px); top: 50%;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
  background: #2a1606; color: #f6d37a; font-size: 13px; font-weight: 800;
  opacity: 0; transform: translate(8px, -50%); pointer-events: none;
  transition: opacity .2s, transform .3s var(--spring);
}
.to-top:hover .to-top__label, .to-top:focus-visible .to-top__label { opacity: 1; transform: translate(0, -50%); }

/* ---------- Рулетка удачи ---------- */
.wheel-modal { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.wheel-modal__backdrop { position: fixed; inset: 0; background: rgba(15, 9, 2, .62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity .35s var(--ease); }
.wheel-modal__box {
  position: relative; width: 100%; max-width: 420px; padding: 26px 22px 22px; border-radius: 28px; text-align: center; color: #f6eedb;
  border: 1.5px solid rgba(246, 211, 122, .45);
  background: radial-gradient(90% 60% at 50% 0%, rgba(242, 193, 78, .22), transparent 60%), linear-gradient(180deg, #24180b, #120c07);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8);
  opacity: 0; transform: translateY(24px) scale(.9);
  transition: opacity .3s var(--ease), transform .55s var(--spring);
}
.wheel-modal.is-open .wheel-modal__backdrop { opacity: 1; }
.wheel-modal.is-open .wheel-modal__box { opacity: 1; transform: none; }
.wheel-modal__close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; padding: 0; display: grid; place-items: center;
  border: 1px solid rgba(246, 211, 122, .3); border-radius: 50%; background: rgba(0, 0, 0, .25); color: #d9c49a;
  transition: transform .3s var(--spring), color .2s;
}
.wheel-modal__close svg { width: 15px; height: 15px; }
.wheel-modal__close:hover { color: #fff; transform: rotate(90deg); }
.wheel-modal__badge {
  display: inline-block; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(246, 211, 122, .4);
  color: #f6d37a; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.wheel-modal__intro h2 { margin: 12px 0 6px; font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 1.15; }
.wheel-modal__intro p { margin: 0 auto 18px; max-width: 320px; color: #cdbb95; font-size: 14px; }
.wheel { position: relative; width: min(300px, 76vw); aspect-ratio: 1; margin: 0 auto; }
.wheel__svg {
  width: 100%; height: 100%; border-radius: 50%;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .55));
  transition: transform 5.2s cubic-bezier(.12, .62, .1, 1);
}
.wheel__bulbs circle { fill: #fff1b8; animation: lights 1s steps(2) infinite; }
.wheel__bulbs circle:nth-child(2n) { animation-delay: .5s; }
.is-spinning .wheel__bulbs circle { animation-duration: .25s; }
.wheel__pointer {
  position: absolute; left: 50%; top: -10px; z-index: 2; width: 30px; height: 38px; margin-left: -15px;
  background: linear-gradient(180deg, #fff1b8, #e2a523 60%, #a8711c);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .5));
  transform-origin: 50% 0;
}
.is-spinning .wheel__pointer { animation: pointer-tick .12s ease-in-out infinite alternate; }
@keyframes pointer-tick { to { transform: rotate(-9deg); } }
.wheel__hub {
  position: absolute; left: 50%; top: 50%; z-index: 2; width: 34%; height: 34%; transform: translate(-50%, -50%);
  border: 3px solid #6b4310; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #fff1b8, #f2c14e 45%, #b57a12);
  color: #2a1606; font-family: var(--font-brand); font-size: 15px; text-transform: uppercase; letter-spacing: .03em;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .45), inset 0 2px 0 rgba(255, 255, 255, .6);
  transition: transform .3s var(--spring);
}
.wheel__hub:hover { transform: translate(-50%, -50%) scale(1.06); }
.wheel__hub:active { transform: translate(-50%, -50%) scale(.95); }
.is-spinning .wheel__hub { pointer-events: none; opacity: .85; }
.wheel-result { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 20px; animation: result-in .6s var(--spring) both; }
@keyframes result-in { from { opacity: 0; transform: translateY(16px) scale(.95); filter: blur(6px); } }
.wheel-result__label { color: #cdbb95; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.wheel-result__logo .logo-text { font-size: 34px; background: linear-gradient(180deg, #fff6d8, #f2c14e 55%, #b57a12); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wheel-result__logo { justify-content: center; }
.wheel-result__logo .logo-img { max-height: 44px; max-width: 80px; border-radius: 10px; }
.wheel-result .promo-strip { max-width: 320px; }
.wheel-result__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; width: 100%; }
.wheel-result__actions .btn { flex: 1 1 140px; }
.wheel-result .btn--ghost { background: transparent; color: #f6eedb; border-color: rgba(246, 211, 122, .35); }

/* ---------- Панель снизу: экран «Домой», закладки, уведомления ---------- */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 16px; z-index: 95; margin: 0 auto;
  display: flex; align-items: flex-start; gap: 14px;
  width: calc(100% - 24px); max-width: 520px; padding: 18px 48px 18px 18px; border-radius: 22px;
  background: var(--surface); color: var(--text); border: 1.5px solid var(--gold-line);
  box-shadow: 0 24px 50px -20px rgba(40, 25, 5, .55);
  opacity: 0; transform: translateY(120%);
  transition: opacity .3s var(--ease), transform .55s var(--spring);
}
.sheet.is-open { opacity: 1; transform: none; }
.sheet__icon { flex-shrink: 0; width: 52px; height: 52px; border-radius: 14px; box-shadow: 0 4px 10px rgba(0, 0, 0, .25); }
.sheet__body { flex: 1; min-width: 0; }
.sheet__body h3 { margin: 2px 0 6px; font-family: var(--font-display); font-weight: 400; font-size: 19px; line-height: 1.2; }
.sheet__note { margin: 0 0 12px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.sheet__steps { margin: 0 0 12px; padding-left: 18px; font-size: 14px; line-height: 1.7; }
.sheet__share { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; color: #0a7aff; }
.sheet kbd { padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--surface-2); font-family: inherit; font-size: 12px; font-weight: 800; }
.sheet__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sheet__close {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; padding: 0; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 50%; background: var(--surface-2); color: var(--muted);
}
.sheet__close svg { width: 14px; height: 14px; }
/* Кнопка «наверх» не должна прятаться под панелью */
body:has(.sheet.is-open) .to-top { bottom: 190px; }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured { flex-direction: column; padding: 32px; }
  .featured__right { padding-top: 0; }
  .featured__bg { right: -120px; top: 30%; }
  .cta__text { display: none; }
  .row { flex-wrap: wrap; }
  .row__chips { justify-content: flex-start; }
}
@media (max-width: 860px) {
  /* Карусель листается только вбок: вертикальный свайп прокручивает страницу */
  .banners {
    display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none;
    overscroll-behavior-x: contain; touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch;
    margin-left: -16px; margin-right: -16px; padding: 10px 16px 14px; scroll-padding: 0 16px;
  }
  .banner { scroll-snap-stop: always; }
  .js .banners .banner.reveal { transform: none; }
  .banners::-webkit-scrollbar { display: none; }
  .banner { flex: 0 0 82%; scroll-snap-align: start; }
  .row { padding: 12px; gap: 10px 12px; }
  .row__logo { min-width: 110px; height: 52px; }
  .row__chips { order: 3; flex-basis: 100%; }
  .row .chip--promo { order: 4; flex: 1; justify-content: center; }
  .row .btn { order: 5; }
  .row .info-btn { margin-left: auto; }
  .footer__notes { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header__inner { height: 62px; gap: 8px; }
  .brand__text { display: none; }
  .search { width: auto; min-width: 0; flex: 1; height: 42px; }
  .search:focus-within { width: auto; }
  .icon-btn { width: 42px; height: 42px; }
  .cta { height: 42px; padding: 0 3px; border-radius: 13px; }
  .cta__btn { height: 34px; padding: 0 11px; font-size: 13px; }
  .cta__label { display: none; }
  .section-title { font-size: 25px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .featured { padding: 24px 18px; border-radius: 22px; }
  .featured__bg { width: 340px; height: 340px; right: -150px; top: 18%; }
  .featured__left { gap: 20px; width: 100%; }
  .featured__logo .logo-text, .featured__logo .logo-img ~ .logo-text { font-size: clamp(28px, 9vw, 46px); }
  .featured__logo .logo-img { max-height: 52px; max-width: 52px; }
  .checks--lg { font-size: 15px; gap: 11px; }
  .featured .btn--lg { width: 100%; }
  .featured__right { flex-direction: column; width: 100%; }
  .promo-panel, .bonus-card { width: 100%; }
  .row .btn { flex: 1 1 100%; }
  .row .chip--promo { flex: 1 1 100%; }
  .footer__top { flex-wrap: wrap; }
  .to-top { right: 12px; bottom: 14px; width: 52px; height: 52px; }
  .to-top__wheel { width: 52px; height: 52px; }
  .to-top__hub { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
  .splash__name { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal, .js .section-title .w { opacity: 1; transform: none; filter: none; }
  .js:not(.no-splash) .splash { display: none; }
  .roulette__wheel, .roulette__ball { animation: none; }
}
