/* Карточки как дорогая чёрная карта: монохром, гильош как на банкнотах, крупный QR и адрес под ним. Листаются вбок. */
@font-face { font-family: "Geologica"; src: url(fonts/geo-lat.woff2) format("woff2"); font-weight: 300 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geologica"; src: url(fonts/geo-cyr.woff2) format("woff2"); font-weight: 300 700; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono-latin.woff2) format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  --bg: #0c0c0d;
  --text: #ececea;
  --mute: #8b8b90;
  --dim: #56565b;
  --line: rgba(255, 255, 255, .09);
  --plate: #ebebe8;
  --ui: "Geologica", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --cw: clamp(190px, min(80vw, calc((100svh - 330px) * .63)), 360px);
  --guilloche: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'><g fill='none' stroke='%23fff' stroke-opacity='.055' stroke-width='.7'><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(0 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(3 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(6 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(9 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(12 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(15 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(18 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(21 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(24 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(27 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(30 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(33 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(36 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(39 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(42 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(45 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(48 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(51 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(54 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(57 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(60 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(63 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(66 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(69 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(72 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(75 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(78 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(81 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(84 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(87 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(90 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(93 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(96 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(99 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(102 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(105 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(108 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(111 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(114 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(117 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(120 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(123 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(126 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(129 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(132 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(135 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(138 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(141 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(144 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(147 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(150 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(153 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(156 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(159 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(162 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(165 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(168 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(171 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(174 200 200)'/><ellipse cx='200' cy='200' rx='196' ry='64' transform='rotate(177 200 200)'/><circle cx='200' cy='200' r='40'/><circle cx='200' cy='200' r='46'/><circle cx='200' cy='200' r='52'/></g></svg>");
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 400 15px/1.5 var(--ui); overflow-x: hidden;
  background: #040404;
}
/* Фон: прожектор сверху на карту, пыль в луче, затемнение по краям */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(34% 46% at 50% 34%, rgba(255, 255, 255, .11), transparent 70%),
    conic-gradient(from 180deg at 50% -12%, transparent 160deg, rgba(255, 255, 255, .035) 170deg, rgba(255, 255, 255, .075) 180deg, rgba(255, 255, 255, .035) 190deg, transparent 200deg); }
.dust { position: fixed; inset: 0; z-index: -1; width: 100vw; height: 100vh; pointer-events: none; }
body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(80% 70% at 50% 45%, transparent 40%, rgba(0, 0, 0, .7)); }
a { color: inherit; text-decoration-color: var(--dim); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--text); }
:focus-visible { outline: 1.5px solid var(--text); outline-offset: 4px; border-radius: 6px; }

/* Шапка */
.top { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 1100px; margin: 0 auto; padding: 16px 20px 0; text-align: center; }
.brand { font-weight: 600; font-size: 18px; letter-spacing: .7em; margin-right: -.7em; }
/* Telegram — главная кнопка шапки: по нему со мной связываются */
.tg { position: relative; display: inline-flex; align-items: center; gap: 12px; padding: 9px 22px 9px 9px; overflow: hidden; border-radius: 999px; text-decoration: none; color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .04)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 10px 30px -12px rgba(0, 0, 0, .9);
  transition: box-shadow .2s, transform .15s; }
.tg:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45), 0 10px 30px -12px rgba(0, 0, 0, .9); }
.tg:active { transform: scale(.98); }
.tg::after { content: ""; position: absolute; inset: 0; translate: -120% 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .22) 50%, transparent 65%); animation: sheen 5s ease-in-out 1.2s infinite; }
@keyframes sheen { 0%, 70% { translate: -120% 0; } 100% { translate: 120% 0; } }
.tg-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--text); color: var(--bg); }
.tg-ic svg { width: 20px; height: 20px; fill: currentColor; translate: -1px 1px; }
.tg-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.tg-txt b { font-weight: 600; font-size: 17px; letter-spacing: .01em; }
.tg-txt small { color: var(--mute); font-size: 12px; }
.warn { margin: 0; max-width: 360px; color: var(--mute); font-size: 13px; line-height: 1.45; }

/* Колода */
.deck { display: flex; flex-direction: column; align-items: center; margin-top: 14px; }
.tabs { position: relative; display: flex; gap: 4px; max-width: calc(100vw - 24px); padding: 4px; border: 1px solid var(--line); border-radius: 999px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs::after { content: ""; flex: 0 0 2px; }
.tabs button { flex: none; padding: 8px 10px; border: 0; border-radius: 999px; background: none; color: var(--mute); font: 500 13px/1 var(--ui); cursor: pointer; transition: background .25s, color .25s; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); }

.stage { position: relative; width: 100%; margin-top: 4px; }
.track {
  display: flex; gap: 18px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 12px calc(50% - var(--cw) / 2) 30px; outline: none;
}
.track::-webkit-scrollbar { display: none; }

.card { flex: none; width: var(--cw); scroll-snap-align: center; perspective: 900px; cursor: pointer;
  opacity: .32; scale: .9; transition: opacity .35s, scale .35s cubic-bezier(.2, .8, .2, 1); }
.card.on { opacity: 1; scale: 1; }
.stage::after { content: ""; position: absolute; left: 50%; bottom: 0; width: calc(var(--cw) * 1.8); height: 70px; translate: -50% 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .07), transparent); }
.face {
  position: relative; aspect-ratio: .63; padding: 20px 20px 16px; border-radius: 22px; overflow: hidden;
  display: flex; flex-direction: column;
  background:
    radial-gradient(140% 60% at var(--sx, 30%) var(--sy, 0%), rgba(255, 255, 255, .10), transparent 60%),
    var(--guilloche) 72% -30% / 150% auto no-repeat,
    linear-gradient(150deg, #222225 0%, #141416 48%, #1b1b1e 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), inset 0 1px 0 rgba(255, 255, 255, .14), 0 40px 70px -28px rgba(0, 0, 0, .9), 0 10px 24px -12px rgba(0, 0, 0, .7);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .3s;
}
.card.tilting .face { transition: transform .08s linear; }
.card.flash .face { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .7), inset 0 1px 0 rgba(255, 255, 255, .14), 0 40px 70px -28px rgba(0, 0, 0, .9); }

.c-top { display: flex; justify-content: space-between; align-items: flex-start; }
.coin { display: block; font-weight: 600; font-size: 26px; line-height: 1; letter-spacing: .01em; }
.net { display: block; margin-top: 6px; color: var(--mute); font-size: 13px; }
.mark { font-weight: 600; font-size: 10px; letter-spacing: .45em; color: var(--dim); padding-top: 4px; }
.plate { margin: auto 0 0; padding: 6px; border-radius: 16px; background: var(--plate); box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 8px 20px -10px rgba(0, 0, 0, .8); }
.qrimg svg { display: block; width: 100%; height: auto; }
.qrimg svg rect { fill: var(--plate); }
.qrimg svg path { fill: #0e0e10; }
.a { display: block; margin: 16px 0 auto; font: 500 13px/1.5 var(--mono); word-break: break-all; color: var(--dim); text-align: center; }
.a .e { color: var(--text); font-weight: 700; white-space: nowrap; }
.c-foot { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--dim); font-size: 11px; letter-spacing: .08em; }

.arrow { position: absolute; top: 50%; translate: 0 -60%; z-index: 2; display: none; place-items: center; width: 48px; height: 48px;
  border: 1px solid var(--line); border-radius: 50%; background: rgba(16, 16, 18, .92); color: var(--text); cursor: pointer;
  transition: border-color .2s, opacity .2s; }
.arrow:hover { border-color: rgba(255, 255, 255, .3); }
.arrow:disabled { opacity: .25; cursor: default; }
.arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.prev { left: calc(50% - var(--cw) / 2 - 84px); }
.next { right: calc(50% - var(--cw) / 2 - 84px); }

.copy { margin-top: 4px; padding: 15px 34px; border: 0; border-radius: 999px; background: var(--text); color: var(--bg); font: 600 15px/1 var(--ui); cursor: pointer; transition: transform .1s, background .2s; }
.copy:active { transform: scale(.97); }
.copy.done { background: #fff; }
.hint { margin: 14px 20px 0; color: var(--dim); font-size: 13px; text-align: center; }

.rules { list-style: none; counter-reset: r; display: grid; gap: 0; max-width: 1100px; margin: 40px auto 0; padding: 0 20px; }
.rules li { counter-increment: r; position: relative; padding: 14px 0 14px 34px; border-top: 1px solid var(--line); color: var(--mute); font-size: 14px; }
.rules li::before { content: counter(r); position: absolute; left: 0; top: 14px; color: var(--text); font-weight: 600; }
.foot { max-width: 1100px; margin: 0 auto; padding: 20px 20px 36px; color: var(--dim); font-size: 12px; }

.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 10; translate: -50% 16px; opacity: 0; pointer-events: none;
  padding: 12px 20px; border: 1px solid var(--line); border-radius: 999px; background: rgba(26, 26, 28, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 14px; white-space: nowrap; transition: opacity .2s, translate .25s cubic-bezier(.2, .8, .2, 1); }
.toast.on { opacity: 1; translate: -50% 0; }

@media (min-width: 900px) {
  :root { --cw: clamp(200px, calc((100vh - 260px) * .63), 420px); }
  .top { flex-direction: row; justify-content: center; gap: 28px; padding-top: 20px; }
  .warn { max-width: 300px; text-align: left; }
  .hint { margin-top: 10px; }
  .rules li { padding: 10px 0 10px 30px; font-size: 13px; }
  .rules li::before { top: 10px; }
  .foot { padding: 12px 20px 16px; }
  .deck { margin-top: 8px; }
  .arrow { display: grid; }
  .tabs button { padding: 8px 14px; }
  .rules { grid-template-columns: repeat(3, 1fr); gap: 0 32px; margin-top: 16px; }
  .rules li { border-top: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  .tg::after { animation: none; }
  .card, .face, .tabs button { transition: none; }
}
