/* Existing typefaces; restrained transfer workflow, not a promotional header. */
@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 {
  color-scheme: dark;
  --bg: #09090b;
  --text: #f2f2f3;
  --mute: #a9aab2;
  --line: rgba(255, 255, 255, .1);
  --accent: #69a8ff;
  --plate: #fff;
  --ui: "Geologica", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --cw: clamp(272px, calc(100vw - 40px), 324px);
  --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='1' 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>");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; padding-bottom: 28px; min-height: 100svh; overflow-x: hidden;
  color: var(--text); background: var(--bg); font: 400 14px/1.5 var(--ui);
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(46% 48% at 50% 32%, rgba(255, 255, 255, .035), transparent 75%);
}
.dust { position: fixed; inset: 0; z-index: -1; width: 100vw; height: 100vh; opacity: .24; pointer-events: none; }
a { color: inherit; }
button { -webkit-appearance: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* One compact account line. The note stays attached to the Telegram identity. */
.top { display: flex; justify-content: center; padding: 8px 16px 0; }
.contact { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; white-space: nowrap; }
.tg {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px;
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500;
  border-radius: 5px; background: none;
}
.tg:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.tg-ic { flex: none; width: 18px; height: 18px; fill: currentColor; color: #b7bdc9; }
.warn { color: var(--mute); font-size: 11px; line-height: 1.3; }

.deck { display: flex; flex-direction: column; align-items: center; }
.intro { max-width: calc(100% - 32px); margin: 8px 0 16px; text-align: center; }
.intro h1 { margin: 0; font-size: clamp(23px, 5vw, 30px); line-height: 1.2; font-weight: 550; letter-spacing: -.035em; }
.intro p { margin: 9px 0 0; color: var(--mute); font-size: 13px; }
.network-control { max-width: calc(100vw - 24px); }
.selector-label { margin: 0 0 8px 5px; color: #b9bac1; font-size: 12px; font-weight: 450; }
.tabs {
  position: relative; display: flex; gap: 3px; max-width: calc(100vw - 24px); padding: 4px;
  border: 1px solid var(--line); border-radius: 999px; overflow-x: auto; scrollbar-width: none;
  background: rgba(255, 255, 255, .015);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: none; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 999px;
  background: none; color: #c4c7cf; font: 500 13px/1 var(--ui); cursor: pointer;
  transition: background .2s, color .2s;
}
.tabs button:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.tabs button[aria-selected="true"] { background: #fff; color: #101014; }

.stage { position: relative; width: 100%; margin-top: 9px; }
.track {
  display: flex; align-items: stretch; gap: 18px; overflow-x: auto;
  overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 10px calc(50% - var(--cw) / 2) 20px; outline: none;
}
.track::-webkit-scrollbar { display: none; }
.card {
  flex: none; width: var(--cw); scroll-snap-align: center; perspective: 900px; cursor: pointer;
  opacity: .24; scale: .94; transition: opacity .3s, scale .3s cubic-bezier(.2, .8, .2, 1);
}
.card.on { opacity: 1; scale: 1; }
.face {
  position: relative; isolation: isolate; height: 100%; padding: 18px 18px 22px;
  border-radius: 22px; overflow: hidden; display: flex; flex-direction: column;
  background: linear-gradient(150deg, #1b1b1f 0%, #141416 60%, #18181c 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 18px 35px -22px rgba(0, 0, 0, .75);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .25s;
}
/* Pattern is restricted to the top strip, never behind the address or QR. */
.face::before {
  content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 0; height: 86px;
  background: var(--guilloche) 50% 24% / 135% auto no-repeat;
  opacity: .04; pointer-events: none;
}
.card.tilting .face { transition: transform .1s linear; }
.card.flash .face { box-shadow: inset 0 0 0 1px rgba(105, 168, 255, .8), 0 18px 35px -22px rgba(0, 0, 0, .75); }
.c-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.coin { margin: 0; font-size: 23px; line-height: 1.25; font-weight: 550; letter-spacing: -.02em; }
.card-index { color: #93949e; font: 400 11px/1 var(--mono); white-space: nowrap; }

/* SVG itself contains five complete white modules. Extra padding protects the rounded corners. */
.plate { flex: none; margin: 17px 0 0; padding: 10px; border-radius: 16px; background: var(--plate); }
.qrimg svg { display: block; width: 100%; height: auto; overflow: visible; }
.qrimg svg rect { fill: #fff; }
.qrimg svg path { fill: #101014; }
.address-details { position: relative; margin-top: 18px; padding-top: 0; background: none; }
.address-network { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 5px; margin: 0; color: #a9aab2; font-size: 11px; line-height: 1.5; }
.address-network strong { color: #dedee3; font-weight: 450; }
.a {
  display: block; margin-top: 9px; color: #fff; font: 500 13px/1.6 var(--mono);
  overflow-wrap: anywhere; word-break: break-all; text-align: center;
}
.a .e { color: var(--accent); font-weight: 700; white-space: nowrap; }

.arrow {
  position: absolute; top: 50%; translate: 0 -65%; z-index: 2; display: none; place-items: center;
  width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 50%;
  background: #111114; color: var(--text); cursor: pointer; transition: border-color .2s, opacity .2s;
}
.arrow:hover { border-color: rgba(255, 255, 255, .3); }
.arrow:disabled { opacity: .2; 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 - 76px); }
.next { right: calc(50% - var(--cw) / 2 - 76px); }
.copy {
  flex: none; align-self: stretch; width: 100%; min-height: 48px; margin-top: 18px;
  padding: 14px 18px; border: 0; border-radius: 999px;
  background: #fff; color: #101014; font: 550 14px/1.2 var(--ui); cursor: pointer;
  transition: transform .1s, background .2s;
}
.copy:active { transform: scale(.98); }
.copy.done { background: #e9f1ff; }
.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 10;
  translate: -50% 10px; opacity: 0; pointer-events: none;
  max-width: calc(100vw - 24px); padding: 11px 17px; border: 1px solid var(--line); border-radius: 999px;
  background: #232329; color: var(--text); font-size: 12px; text-align: center;
  transition: opacity .2s, translate .2s;
}
.toast.on { opacity: 1; translate: -50% 0; }

@media (min-width: 900px) {
  :root { --cw: 350px; }
  .top { padding-top: 10px; }
  .intro { margin-top: 12px; margin-bottom: 20px; }
  .intro p { font-size: 14px; }
  .tabs button { padding-right: 16px; padding-left: 16px; }
  .face { padding: 20px 20px 24px; }
  .arrow { display: grid; }
  .address-network { font-size: 12px; }
  .a { font-size: 13px; }
}
@media (max-width: 340px) {
  .contact { gap: 8px; }
  .warn { font-size: 10px; }
  .tabs button { padding-right: 10px; padding-left: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .face, .tabs button, .copy, .toast { transition: none; }
}
