@font-face {
  font-family: "Onest";
  src: url("fonts/onest-cyrillic.woff2") format("woff2");
  font-weight: 100 900;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  src: url("fonts/onest-latin.woff2") format("woff2");
  font-weight: 100 900;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f0f0f5;
  --tile: #ffffff;
  --tile-deep: #e9e9ef;
  --soft: #f0f0f5;
  --ink: #0f0f11;
  --muted: #8a8a94;
  --accent: #c8f53c;
  --accent-ink: #0f0f11;
  --nav: #0f0f11;
  --nav-ink: #ffffff;
  --bar: #ffffff;
  --bar-ink: #0f0f11;
  --bar-active: #ececf1;
  --bar-shadow: 0 8px 28px rgba(15, 15, 17, .14);
  --lift: 0 2px 10px rgba(15, 15, 17, .06);
  --radius: 28px;
  --ease: cubic-bezier(.22, .8, .24, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --tile: #17171a;
    --tile-deep: #222226;
    --soft: #26262b;
    --ink: #f5f5f7;
    --muted: #8c8c96;
    --nav: #26262b;
    --bar: #26262b;
    --bar-ink: #ffffff;
    --bar-active: rgba(255, 255, 255, .16);
    --bar-shadow: 0 8px 24px rgba(0, 0, 0, .5);
    --lift: 0 2px 10px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; margin: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); }
body { overflow-x: hidden; }
body {
  min-height: 100dvh;
  color: var(--ink);
  font: 400 16px/1.25 "Onest", system-ui, sans-serif;
  font-variant-numeric: normal;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.field { transition: background .2s; }
.field:focus-within { background: var(--tile-deep); }

.app {
  max-width: 480px; margin: 0 auto;
  padding: calc(max(18px, env(safe-area-inset-top), var(--tg-safe-top, 0px)) + var(--tg-content-top, 0px)) 18px calc(120px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 14px;
}

.head { display: flex; flex-wrap: nowrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 6px; }
.title { font-size: clamp(38px, 11.5vw, 54px); font-weight: 500; line-height: .95; letter-spacing: -.045em; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 6px 0 18px;
  border-radius: 999px; background: var(--nav); color: var(--nav-ink); font-size: 16px; font-weight: 500;
  transition: transform .25s var(--ease); flex: none; margin-top: 4px;
}
.chip-btn:hover { transform: scale(1.04); }
.chip-btn i { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }

.tabs { display: flex; align-items: baseline; gap: 20px; }
.tab { display: inline-flex; align-items: center; gap: 8px; font-size: 24px; font-weight: 500; letter-spacing: -.03em; color: var(--muted); transition: color .2s; }
.tab[aria-pressed="true"] { color: var(--ink); }
.count { min-width: 26px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--tile); box-shadow: var(--lift); color: var(--ink); font-size: 13px; font-weight: 500; display: inline-grid; place-items: center; letter-spacing: 0; }

.sticker {
  --size: 76px;
  width: var(--size); height: var(--size); flex: none;
  display: grid; place-items: center;
  background: var(--tone); border-radius: 30%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .14);
  transform: rotate(var(--tilt, -6deg));
}
.sticker svg { width: 52%; height: 52%; }
.sticker img { width: 68%; height: 68%; object-fit: contain; }
.mascot { display: block; flex: none; user-select: none; -webkit-user-drag: none; }

.go { width: 40px; height: 40px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; flex: none; }


.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  position: relative; min-height: 200px; padding: 16px 14px 14px; border-radius: var(--radius);
  background: var(--tile); box-shadow: var(--lift); overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
}
.tile-title { font-size: 19px; font-weight: 500; line-height: 1.1; letter-spacing: -.02em; }
.tile-sub { font-size: 14px; color: var(--muted); margin-top: 4px; }
.tile .sticker { --size: 64px; }
.tile-foot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 12px; }
.tile-code { overflow: hidden; text-overflow: ellipsis; font-size: 14px; font-weight: 600; letter-spacing: .02em; margin-top: 14px; white-space: nowrap; }
.round-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; transition: transform .25s var(--ease); }
.round-btn:hover { transform: scale(1.08); }

.paper { padding: 26px 22px; border-radius: var(--radius); background: var(--tile); box-shadow: var(--lift); }
.lead { font-size: 28px; font-weight: 400; line-height: 1.1; letter-spacing: -.035em; }
.lead em { font-style: normal; color: var(--muted); }

.link-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.block { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 150px; padding: 18px; border-radius: var(--radius); background: var(--tile); box-shadow: var(--lift); transition: transform .25s var(--ease); }
.block:hover { transform: scale(1.02); }
.block:active { transform: scale(.98); }
.block-top { display: flex; align-items: flex-start; justify-content: space-between; }
.block-title { display: block; font-size: 21px; font-weight: 500; line-height: 1.05; letter-spacing: -.03em; }
.block-sub { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }
.block-wide { grid-column: 1 / -1; flex-direction: row; align-items: flex-end; justify-content: space-between; box-shadow: none; }
.block.accent { min-height: 170px; background: var(--accent); color: var(--accent-ink); }
.block.accent .block-title { font-size: 30px; letter-spacing: -.04em; }
.block.accent .block-sub { color: rgba(15, 15, 17, .6); }
.block.accent .go { background: var(--nav); color: var(--nav-ink); }
.block.ink { min-height: 166px; background: var(--nav); color: var(--nav-ink); }
.block.ink .block-title { font-size: 26px; }
.block.ink .block-sub { color: rgba(255, 255, 255, .6); }
.block.ink .go { background: var(--accent); color: var(--accent-ink); }

.me { display: flex; flex-direction: column; gap: 18px; padding: 20px; border-radius: var(--radius); background: var(--tile); box-shadow: var(--lift); }
.me-head { display: flex; align-items: center; gap: 12px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 22px; font-weight: 500; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.me .n { font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
.me .u { font-size: 14px; color: var(--muted); }
.me-balance { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.me-balance .l { font-size: 14px; color: var(--muted); }
.me-balance .v { font-size: 46px; font-weight: 500; letter-spacing: -.04em; line-height: 1.05; white-space: nowrap; }
.me-balance .v small { font-size: .5em; color: var(--muted); letter-spacing: 0; }
.tab.small { font-size: 19px; }
.rows { padding: 8px 20px; border-radius: var(--radius); background: var(--tile); box-shadow: var(--lift); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 8px; margin: 0 -8px; border-radius: 16px; width: calc(100% + 16px); text-align: left; transition: background .2s; }
button.row:hover { background: var(--soft); }
.row .a { display: block; font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.row .b { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
.row .c { font-size: 17px; font-weight: 600; white-space: nowrap; }


.detail { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.bar-top { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.back { width: 44px; height: 44px; border-radius: 50%; background: var(--tile); box-shadow: var(--lift); display: grid; place-items: center; transition: transform .25s var(--ease); }
.back:hover { transform: scale(1.08); }
.price-chip { height: 44px; padding: 0 20px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); display: inline-flex; align-items: center; font-size: 17px; font-weight: 600; }
.bar-top .ghost { width: 44px; }
.detail .sticker { --size: 190px; --tilt: -7deg; margin: 12px 0 8px; }
.detail-name { font-size: 40px; font-weight: 500; line-height: 1; letter-spacing: -.045em; text-align: center; max-width: 11em; }
.facts { width: 100%; padding: 10px 20px; border-radius: var(--radius); background: var(--tile); box-shadow: var(--lift); }
.fact { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; font-size: 18px; letter-spacing: -.01em; }
.fact span:first-child { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.fact b { font-weight: 500; }

.buy-host { position: fixed; left: 0; right: 0; bottom: 0; }
.buybar { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(444px, calc(100% - 36px)); z-index: 6; }
.btn {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 58px; padding: 0 22px;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-size: 18px; font-weight: 600; text-align: center; 
  transition: transform .25s var(--ease), opacity .2s;
}
.btn:hover { transform: scale(1.02); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .35; pointer-events: none; }

.nav { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(444px, calc(100% - 32px)); display: flex; align-items: center; justify-content: space-between; gap: 8px; z-index: 5; }
.nav-pill { position: relative; display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 999px; background: var(--bar); box-shadow: var(--bar-shadow); min-width: 0; }
.nav-glider { position: absolute; top: 5px; left: 0; height: 48px; width: 52px; border-radius: 999px; background: var(--bar-active); transition: transform .45s var(--ease), width .45s var(--ease); pointer-events: none; }
.nav-item { position: relative; z-index: 1; display: grid; place-items: center; height: 48px; width: 52px; border-radius: 999px; color: var(--bar-ink); opacity: .55; transition: opacity .25s, transform .25s var(--ease); }
.nav-item:hover { opacity: 1; }
.nav-item:active { transform: scale(.92); }
.nav-item[aria-current="page"] { opacity: 1; }
.nav-plus { width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); transition: transform .25s var(--ease); flex: none; }
.nav-plus:hover { transform: scale(1.08); }
.nav-plus:active { transform: scale(.94); }

.ghost-list { position: fixed; z-index: 2; pointer-events: none; }
.ghost { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 3; }
.ghost .app { min-height: 100dvh; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes pop { 0% { opacity: 0; transform: scale(.55) rotate(-10deg); } 60% { transform: scale(1.06) rotate(2deg); } 100% { transform: none; } }
.entering .snap > *, .entering .duo > *, .entering .tiles > *, .entering .link-grid > *, .entering .rows > * { animation: rise .55s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 45ms + 120ms); }
.result { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding-top: clamp(8px, 2vh, 24px); }
.result > * { animation: rise .55s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 70ms + 160ms); }
.result > .mascot { animation: pop .7s var(--ease) backwards; animation-delay: 80ms; }
.result-title { font-size: 40px; font-weight: 500; line-height: 1; letter-spacing: -.045em; margin-top: 6px; }
.result-amount { font-size: 56px; font-weight: 500; line-height: 1; letter-spacing: -.045em; }
.result-text { font-size: 18px; line-height: 1.3; color: var(--muted); max-width: 20em; }
.result-hint { margin-top: 4px; font-size: 15px; color: var(--muted); }
.receipt { margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .entering *, .result > * { animation: none !important; } }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin-top: 18px; padding: 16px 18px; border-radius: var(--radius); background: var(--tile); box-shadow: var(--lift); }
.code-box b { font-size: 18px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.copy { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink); flex: none; }

.sheet-layer { position: fixed; inset: 0; z-index: 10; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0); pointer-events: none; transition: background .3s; }
.sheet-layer.open { background: rgba(0, 0, 0, .4); pointer-events: auto; }
.sheet { width: min(480px, 100%); max-height: 92dvh; overflow: auto; padding: 22px 20px max(22px, env(safe-area-inset-bottom)); border-radius: 30px 30px 0 0; background: var(--tile); transform: translateY(100%); transition: transform .35s var(--ease); display: flex; flex-direction: column; gap: 16px; }
.sheet-layer.open .sheet { transform: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet .back { background: var(--soft); box-shadow: none; }
.sheet-title { font-size: 34px; font-weight: 500; letter-spacing: -.04em; }
.presets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.preset { min-height: 60px; padding: 0 18px; border-radius: 20px; background: var(--soft); font-size: 20px; font-weight: 500; letter-spacing: -.02em; display: flex; align-items: center; transition: background .2s, transform .25s var(--ease); }
.preset:hover { transform: scale(1.02); }
.preset[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.field { display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 0 18px; border-radius: 20px; background: var(--soft); }
.field input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font: inherit; font-size: 20px; font-weight: 500; color: var(--ink); }
.field input::placeholder { color: var(--muted); }
.field span { color: var(--muted); font-size: 20px; }

.snap { display: flex; gap: 10px; margin: 0 -18px; padding: 0 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 18px; scrollbar-width: none; }
.snap::-webkit-scrollbar { display: none; }
.big { position: relative; flex: none; width: min(292px, 78vw); height: 360px; padding: 20px; border-radius: 32px; overflow: hidden; scroll-snap-align: start; display: flex; flex-direction: column; justify-content: space-between; text-align: left; transition: transform .25s var(--ease); }
.big:active { transform: scale(.98); }
.big-title { position: relative; max-width: 6.5em; font-size: 34px; font-weight: 500; line-height: .98; letter-spacing: -.045em; }
.big .mark { position: absolute; right: -70px; top: 70px; width: 270px; height: auto; transform: rotate(-8deg); pointer-events: none; }
.big svg.mark { height: 270px; opacity: .3; }
.big-foot { position: relative; display: flex; align-items: center; justify-content: space-between; }
.big-price { font-size: 32px; font-weight: 500; letter-spacing: -.04em; }
.big-price small { display: block; font-size: 14px; font-weight: 400; letter-spacing: 0; opacity: .6; }
.dots { display: flex; gap: 6px; padding: 0 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--tile-deep); transition: width .3s var(--ease), background .3s; }
.dots i.on { width: 20px; border-radius: 3px; background: var(--ink); }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 22px; background: var(--tile); box-shadow: var(--lift); text-align: left; transition: transform .25s var(--ease); }
.mini:hover { transform: scale(1.03); }
.mini:active { transform: scale(.97); }
.empty-line { grid-column: 1 / -1; padding: 18px 6px; font-size: 17px; color: var(--muted); }
.mini-name { display: block; font-size: 13px; font-weight: 500; line-height: 1.1; letter-spacing: -.01em; }
.mini-stock { display: block; margin-top: 1px; font-size: 12px; color: var(--muted); }
.mini-price { display: block; margin-top: 3px; font-size: 15px; font-weight: 600; }
.p-center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding-top: 20px; }
.p-center p { max-width: 16em; font-size: 18px; color: var(--muted); }
.p-title { font-size: 44px; }
.block.compact { min-height: 120px; }
.block.compact .block-title { font-size: 22px; letter-spacing: -.03em; }
.block { overflow: hidden; }
.block > .mark { position: absolute; right: -52px; top: 50%; width: 230px; height: 230px; transform: translateY(-50%) rotate(-10deg); opacity: .16; pointer-events: none; }
.block-mascot { position: absolute; left: 16px; top: 14px; transform: rotate(-6deg); pointer-events: none; user-select: none; }
.block-top, .block > span { position: relative; }
.block-top { justify-content: space-between; }

.notes { padding-top: 6px; padding-bottom: 6px; }
.note-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; font-size: 17px; line-height: 1.25; letter-spacing: -.01em; text-align: left; }
.note-row svg { flex: none; margin-top: 1px; color: var(--muted); }
.note-row i { flex: none; width: 24px; font-style: normal; color: var(--muted); }
.detail .label { align-self: flex-start; }
.box-label { font-size: 16px; color: var(--muted); }
.code-box b.target { overflow: hidden; text-overflow: ellipsis; }
.sheet-sub { margin-top: -6px; font-size: 16px; color: var(--muted); }
.sheet .notes { padding: 0; }
.link-grid .block:not(.block-wide):not(.compact) { min-height: 166px; }

.notice { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 18px; border-radius: 22px; background: var(--tile); box-shadow: var(--lift); text-align: left; transition: transform .25s var(--ease); }
.notice:hover { transform: scale(1.02); }
.notice:active { transform: scale(.98); }
.notice > svg:first-child { flex: none; }
.notice-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.notice-text b { font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.notice-text small { font-size: 14px; color: var(--muted); }
.notice > svg:last-child { flex: none; color: var(--muted); }

.row .c { font-variant-numeric: tabular-nums; }
.back[disabled] { opacity: .35; pointer-events: none; }


.section-title { padding: 10px 4px 0; font-size: 22px; font-weight: 500; letter-spacing: -.03em; }

.methods { display: flex; flex-direction: column; gap: 2px; }
.method { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 12px 10px 10px; border-radius: 20px; text-align: left; transition: background .2s, transform .25s var(--ease); }
.method:hover { background: var(--soft); }
.method:active { transform: scale(.98); }
.method[disabled] { opacity: .45; pointer-events: none; }
.method > svg { flex: none; color: var(--muted); }
.method-logo { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 30%; overflow: hidden; }
.method-logo img { width: 100%; height: 100%; object-fit: cover; }
.method-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.method-name { font-size: 18px; font-weight: 500; letter-spacing: -.01em; }
.method-sub { font-size: 14px; color: var(--muted); }

.method-logo.contain { background: #ffffff; box-shadow: 0 1px 8px rgba(15, 15, 17, .14); }
.method-logo.contain img { width: 62%; height: 62%; object-fit: contain; }

.btn.soft { background: var(--tile); color: var(--ink); box-shadow: var(--lift); }
.gate { padding-top: 16vh; }
.gate-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 12px; }
.pay-notice { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: 22px; background: var(--soft); }
.pay-notice b { font-size: 19px; font-weight: 500; letter-spacing: -.02em; }
.pay-notice span { font-size: 15px; line-height: 1.3; color: var(--muted); }
.block-rules { padding-top: 92px; justify-content: flex-start; align-items: flex-end; box-shadow: none; }
.rule-line { display: flex; gap: 8px; margin-top: 6px; font-size: 16px; line-height: 1.25; color: rgba(255, 255, 255, .86); }
.rule-line i { flex: none; width: 22px; font-style: normal; color: rgba(255, 255, 255, .5); }
.block-rules .block-title { margin-bottom: 4px; }
