/* Coin Vault — визуальная система «Частное хранилище».
   Обсидиан и шампанское: почти чёрный фон, металл монет — главный цвет, золото — единственный акцент.
   Поверхности — как витрины ювелирного дома: тонкий градиентный кант, верхний блик, гильош на главных карточках. */

@font-face {
  font-family: "Unbounded";
  src: url("fonts/unbounded.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  /* поверхности */
  --bg: #08080b;
  --s1: #111116;
  --s2: #18181e;
  --s3: #232329;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --edge: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .035) 42%, rgba(255, 255, 255, .06));
  --edge-gold: linear-gradient(160deg, rgba(246, 222, 167, .55), rgba(201, 154, 69, .12) 40%, rgba(246, 222, 167, .3));
  --surf: linear-gradient(180deg, #141419, #0f0f13);
  /* текст: все уровни ≥ 4.5:1 на --bg и --s1 */
  --t1: #f5f1e8;
  --t2: #aaa6b5;
  --t3: #86828f;
  /* акцент — шампанское золото */
  --gold: #ecc98a;
  --gold-2: #d2a457;
  --gold-ink: #1d1406;
  --gold-metal: linear-gradient(135deg, #fff4d6 0%, #edc985 24%, #bf8c3a 52%, #f5dca6 76%, #cf9f4d 100%);
  --gold-soft: rgba(236, 201, 138, .1);
  --good: #63d6a0;
  --bad: #ff6f82;
  /* редкости */
  --common: #c6ccd8;
  --rare: #62bcff;
  --epic: #bb82ff;
  --legendary: #ffc857;
  /* типографика */
  --display: "Unbounded", system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  /* ритм */
  --r-s: 12px;
  --r: 18px;
  --r-l: 26px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --shadow: 0 1px 0 rgba(255, 255, 255, .045) inset, 0 18px 40px -26px rgba(0, 0, 0, .9);
  /* гильош — тонкий муар концентрических дуг, как на банкнотах и циферблатах */
  --guilloche: repeating-radial-gradient(circle at 100% 0, rgba(236, 201, 138, .055) 0 1px, transparent 1px 6px),
               repeating-radial-gradient(circle at 0 100%, rgba(236, 201, 138, .04) 0 1px, transparent 1px 7px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--t1); }
body {
  font: 400 15px/1.45 var(--body);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--gold);
  font-variant-numeric: tabular-nums;
}
/* тёплый свет сверху и зерно — фон живой, но спокойный */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(90% 46% at 50% -8%, rgba(236, 201, 138, .11), transparent 70%),
    radial-gradient(60% 40% at 110% 30%, rgba(120, 90, 200, .05), transparent 70%),
    radial-gradient(60% 40% at -10% 80%, rgba(236, 201, 138, .035), transparent 70%);
}
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: rgba(236, 201, 138, .32); color: var(--t1); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--s3); border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }
button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; text-align: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
img { display: block; max-width: 100%; }
a { color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 1px; }

#app { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; padding: 16px 16px calc(118px + var(--safe-b)); }
/* вход экрана: блоки поднимаются по очереди */
.page > * { animation: rise .55s var(--ease) both; }
.page > *:nth-child(2) { animation-delay: .04s; }
.page > *:nth-child(3) { animation-delay: .08s; }
.page > *:nth-child(4) { animation-delay: .12s; }
.page > *:nth-child(5) { animation-delay: .16s; }
.page > *:nth-child(n+6) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ───────── типографика ───────── */
.display { font: 650 27px/1.1 var(--display); letter-spacing: -.03em; margin: 0; text-wrap: balance; }
.title { font: 600 18px/1.2 var(--display); letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.subtitle { font: 600 15px/1.3 var(--display); letter-spacing: -.01em; margin: 0; }
.eyebrow { display: block; font: 600 10.5px/1.2 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--t3); }
.eyebrow.gold { color: var(--gold); }
.gold-text { background: var(--gold-metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.t2 { color: var(--t2); }
.t3 { color: var(--t3); }
.sm { font-size: 13.5px; }
.xs { font-size: 12px; line-height: 1.4; }
.num { font-variant-numeric: tabular-nums; }
.accent { color: var(--gold); }
.strong { font-weight: 650; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prose { color: var(--t2); font-size: 14.5px; line-height: 1.6; max-width: 62ch; white-space: pre-line; user-select: text; }

/* ───────── раскладка ───────── */
.row { display: flex; align-items: center; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-s { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.between { justify-content: space-between; }
.center { text-align: center; }
.wrap { flex-wrap: wrap; }
.mt4 { margin-top: 4px; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; }
.hidden { display: none !important; }
.section { margin-top: 34px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head .title { font-size: 16.5px; }
.section-head .more { display: inline-flex; align-items: center; gap: 2px; color: var(--t2); font-size: 13px; font-weight: 600; min-height: 32px; transition: color .2s; }
.section-head .more:active { color: var(--gold); }
.section-head .more .ic { width: 16px; height: 16px; }

/* ───────── иконки ───────── */
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ic.s { width: 16px; height: 16px; }
.ic.l { width: 24px; height: 24px; }
.ic.fill { fill: currentColor; stroke: none; }
.ic-box { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none; color: var(--t2);
  background: linear-gradient(180deg, #1d1d24, #151519) padding-box, var(--edge) border-box; border: 1px solid transparent; }
.ic-box.gold { color: var(--gold); background: linear-gradient(180deg, rgba(236, 201, 138, .16), rgba(236, 201, 138, .06)) padding-box, var(--edge-gold) border-box; }

/* ───────── поверхности ───────── */
.panel { border-radius: var(--r); padding: 16px; box-shadow: var(--shadow);
  background: var(--surf) padding-box, var(--edge) border-box; border: 1px solid transparent; }
.panel.tight { padding: 12px 14px; }
.inset { background: rgba(0, 0, 0, .35); border: 1px solid var(--line); border-radius: var(--r-s); }
.hairline { height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); border: 0; margin: 0; }

/* ───────── шапка и карта клуба ───────── */
.topbar { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(160deg, #3b3346, #17151d); font: 700 17px var(--display); color: var(--t1);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.l { width: 92px; height: 92px; font-size: 34px; }
.avatar.s { width: 36px; height: 36px; font-size: 14px; }
.lvl { position: relative; flex: none; padding: 2.5px; border-radius: 50%;
  background: conic-gradient(from -90deg, #f5dca6, var(--gold-2) calc(var(--p) * 1turn), var(--s3) 0); }
.lvl .avatar { border: 2.5px solid var(--bg); }
.lvl .badge {
  position: absolute; right: -3px; bottom: -3px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--gold-metal); color: var(--gold-ink); font: 700 10.5px/19px var(--display); text-align: center; border: 2px solid var(--bg);
}
.avatar.l + .badge, .lvl:has(.avatar.l) .badge { min-width: 30px; height: 30px; border-radius: 15px; font-size: 13px; line-height: 26px; right: 0; bottom: 0; }
.balance {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px 0 13px; border-radius: 19px; flex: none;
  background: rgba(17, 17, 22, .7) padding-box, var(--edge-gold) border-box; border: 1px solid transparent;
  font: 600 14px var(--display); color: var(--t1); box-shadow: 0 8px 20px -14px rgba(236, 201, 138, .5);
  transition: transform .15s var(--ease);
}
.balance:active { transform: scale(.96); }
.balance .ic { width: 15px; height: 15px; color: var(--gold); }

.vault-card { position: relative; overflow: hidden; padding: 18px 18px 0; border-radius: var(--r-l); isolation: isolate;
  background: radial-gradient(120% 90% at 100% 0%, rgba(236, 201, 138, .14), transparent 55%), linear-gradient(170deg, #17161c, #0d0d10) padding-box,
              var(--edge-gold) border-box;
  border: 1px solid transparent; box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 1), 0 0 0 1px rgba(0, 0, 0, .4); }
.vault-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--guilloche); opacity: .9;
  -webkit-mask: linear-gradient(200deg, #000, transparent 75%); mask: linear-gradient(200deg, #000, transparent 75%); }
.vault-card::after { content: ""; position: absolute; inset: -60% -20%; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 44%, rgba(255, 240, 210, .07) 50%, transparent 56%); animation: sweep 9s var(--ease) infinite 1.2s; }
@keyframes sweep { 0%, 70% { transform: translateX(-40%); } 100% { transform: translateX(40%); } }
.vault-card .worth { margin-top: 22px; }
.vault-card .worth .v { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; font: 650 40px/1 var(--display); letter-spacing: -.04em; }
.vault-card .worth .v .ic { width: 22px; height: 22px; color: var(--gold); align-self: center; }
.vault-card .ledger { margin: 20px -18px 0; border-radius: 0; border: 0; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .25); box-shadow: none; }

/* ───────── кнопки ───────── */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; overflow: hidden; isolation: isolate;
  min-height: 52px; padding: 0 20px; border-radius: 16px; font-weight: 650; font-size: 15.5px; letter-spacing: -.005em;
  background: linear-gradient(180deg, #1e1e25, #17171c) padding-box, var(--edge) border-box; border: 1px solid transparent; color: var(--t1);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 10px 24px -18px rgba(0, 0, 0, .9);
  transition: transform .16s var(--ease), filter .2s, opacity .2s; white-space: nowrap;
}
.btn:active { transform: scale(.97); filter: brightness(1.12); }
.btn.block { width: 100%; }
.btn.s { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn.primary { background: var(--gold-metal) padding-box, linear-gradient(180deg, rgba(255, 250, 235, .9), rgba(150, 105, 35, .8)) border-box; color: var(--gold-ink);
  text-shadow: 0 1px 0 rgba(255, 245, 220, .45);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .55) inset, 0 -2px 6px rgba(120, 80, 20, .25) inset, 0 14px 30px -14px rgba(214, 163, 72, .75); }
.btn.primary::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%); transform: translateX(-120%);
  animation: btn-sheen 6s var(--ease) infinite 2s; }
@keyframes btn-sheen { 0%, 80% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.btn.primary .ic { color: var(--gold-ink); }
.btn.upgrade { background: linear-gradient(180deg, #2c2452, #1f1a3a) padding-box, linear-gradient(180deg, rgba(190, 165, 255, .6), rgba(120, 90, 220, .2)) border-box; color: #ece6ff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--t2); box-shadow: none; }
.btn.danger { color: var(--bad); }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn.loading { color: transparent !important; text-shadow: none; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, .2); border-top-color: var(--gold-ink); animation: spin .7s linear infinite; }
.btn:not(.primary).loading::after { border-color: rgba(255, 255, 255, .2); border-top-color: var(--t1); }
.btn-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.btn-row .btn { padding: 0 12px; text-overflow: ellipsis; }
.btn .ic.s { width: 15px; height: 15px; }
.btn[aria-pressed="true"] { background: linear-gradient(180deg, rgba(236, 201, 138, .14), rgba(236, 201, 138, .05)) padding-box, var(--edge-gold) border-box; }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: var(--t2); flex: none;
  background: linear-gradient(180deg, #1e1e25, #17171c) padding-box, var(--edge) border-box; border: 1px solid transparent; transition: transform .15s var(--ease); }
.icon-btn:active { transform: scale(.94); }

/* ───────── чипы и сегменты ───────── */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 18px;
  background: rgba(17, 17, 22, .8) padding-box, var(--edge) border-box; border: 1px solid transparent; color: var(--t2); font-size: 13.5px; font-weight: 600;
  transition: color .2s, background .2s; }
.chip .ic { width: 15px; height: 15px; }
.chip[aria-pressed="true"] { color: var(--gold); background: linear-gradient(180deg, rgba(236, 201, 138, .15), rgba(236, 201, 138, .05)) padding-box, var(--edge-gold) border-box; }
.chip .count { font-size: 11.5px; opacity: .65; font-variant-numeric: tabular-nums; }
.seg { position: relative; display: flex; padding: 4px; border-radius: 15px;
  background: rgba(10, 10, 13, .8) padding-box, var(--edge) border-box; border: 1px solid transparent; }
.seg button { flex: 1; height: 38px; border-radius: 11px; font-weight: 650; font-size: 14px; color: var(--t3); text-align: center; transition: background .25s var(--ease), color .2s; }
.seg button[aria-pressed="true"] { color: var(--t1); background: linear-gradient(180deg, #26262e, #1c1c22) padding-box, var(--edge) border-box;
  border: 1px solid transparent; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .9); }

.rarity { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 8px; border-radius: 8px;
  font: 600 10px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.rarity::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.rarity.common { background: rgba(198, 204, 216, .1); color: var(--common); }
.rarity.rare { background: rgba(98, 188, 255, .12); color: var(--rare); }
.rarity.epic { background: rgba(187, 130, 255, .13); color: var(--epic); }
.rarity.legendary { background: rgba(255, 200, 87, .13); color: var(--legendary); }
.vtag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 7px; border-radius: 8px;
  background: var(--s2); color: var(--t1); font-size: 12px; font-weight: 650; }
.vtag i { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--v1), var(--v2)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.3), 0 0 8px var(--v1); }
.status { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 8px; background: var(--s2); color: var(--t2); font-size: 12px; font-weight: 600; }
.status.ok { color: var(--good); background: rgba(99, 214, 160, .1); }
.status.warn { color: var(--gold); background: rgba(236, 201, 138, .1); }
.status.bad { color: var(--bad); background: rgba(255, 111, 130, .1); }

/* ───────── МОНЕТА ───────── */
.coin {
  --c1: #eef1f6; --c2: #5d6572;
  position: relative; width: 100%; aspect-ratio: 1; border-radius: 50%; padding: 7%; isolation: isolate;
  background: conic-gradient(from 225deg, var(--c1), var(--c2) 18%, var(--c1) 32%, var(--c2) 50%, var(--c1) 68%, var(--c2) 84%, var(--c1));
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, .85), 0 2px 4px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .32), inset 0 -2px 3px rgba(0, 0, 0, .35);
}
/* зубцы гурта по ободу — как у настоящей чеканки */
.coin::before { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; z-index: 1;
  background: repeating-conic-gradient(from 0deg, rgba(0, 0, 0, .26) 0 1.6deg, rgba(255, 255, 255, .1) 1.6deg 2.2deg, transparent 2.2deg 4deg);
  -webkit-mask: radial-gradient(circle closest-side, transparent 89%, #000 90%, #000 97%, transparent 98%);
  mask: radial-gradient(circle closest-side, transparent 89%, #000 90%, #000 97%, transparent 98%); }
.coin.rare { --c1: #c4e6ff; --c2: #1d5c96; }
.coin.epic { --c1: #e7cdff; --c2: #582694; }
.coin.legendary { --c1: #fff0bf; --c2: #9a5c0a; }
.coin .face { position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 35% 30%, #2d2a37, #0e0d13);
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .45), 0 0 0 2.5px rgba(255, 255, 255, .22), inset 0 4px 12px rgba(0, 0, 0, .6); }
.coin .face img { width: 100%; height: 100%; object-fit: cover; }
.coin .face .ph { position: absolute; inset: 0; display: grid; place-items: center; font: 700 2.2em/1 var(--display); color: var(--c1); }
.coin::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; z-index: 2;
  background: linear-gradient(135deg, rgba(255,255,255,.34), rgba(255,255,255,0) 34%, rgba(255,255,255,0) 70%, rgba(255,255,255,.12)); mix-blend-mode: overlay; }
.coin.legendary .face::after, .coin.upg .face::after {
  content: ""; position: absolute; inset: -40%; z-index: 2; pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.4) 50%, transparent 58%);
  animation: sheen 5s var(--ease) infinite;
}
@keyframes sheen { 0%, 62% { transform: translateX(-55%); } 100% { transform: translateX(55%); } }
/* улучшенные варианты */
.coin.upg { --c1: var(--v1); --c2: var(--v2); }
.coin.upg .face::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(circle at 40% 35%, var(--v1), var(--v2)); mix-blend-mode: color; opacity: .55; }
.coin.fx-holo { background: conic-gradient(from var(--a, 0deg), #ff7bd8, #ffd77b, #7bffc2, #66d6ff, #8f7bff, #ff7bd8); animation: hue 6s linear infinite; }
.coin.fx-holo .face::before { background: conic-gradient(from var(--a, 0deg), #ff7bd8, #ffd77b, #7bffc2, #66d6ff, #8f7bff, #ff7bd8); mix-blend-mode: overlay; opacity: .75; animation: hue 6s linear infinite; }
.coin.fx-void { background: conic-gradient(from var(--a, 0deg), #08000f, #7a2cff, #08000f, #ff2ca8, #08000f); animation: hue 9s linear infinite; }
.coin.fx-void .face::before { background: radial-gradient(circle, #7a2cff, #000); mix-blend-mode: hard-light; opacity: .6; }
.coin.fx-fire { box-shadow: 0 10px 26px -8px rgba(255, 110, 30, .7), inset 0 0 0 1px rgba(255, 220, 160, .45); }
.coin.fx-frost { box-shadow: 0 10px 26px -8px rgba(120, 220, 255, .6), inset 0 0 0 1px rgba(220, 245, 255, .55); }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes hue { to { --a: 360deg; } }
.coin.dim { filter: grayscale(1) brightness(.35); }

/* сцена: монета под софитом, реагирует на палец и наклон телефона */
.stage { --gx: 35%; --gy: 30%; position: relative; width: min(66vw, 272px); margin: 26px auto 0; perspective: 900px; touch-action: pan-y; }
.stage .tilt { position: relative; transition: transform .35s var(--ease); transform-style: preserve-3d; will-change: transform; }
.stage .glare { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; z-index: 3; mix-blend-mode: soft-light;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, .75), rgba(255, 255, 255, 0) 45%); transition: background .2s; }
.stage .floor { position: absolute; left: 12%; right: 12%; bottom: -34px; height: 24px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .85), transparent); }
.stage .light { position: absolute; inset: -32%; z-index: -1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--light, #ecc98a) 26%, transparent), transparent 62%); animation: breathe 5s ease-in-out infinite; }
.stage .halo { position: absolute; inset: -9%; z-index: -1; border-radius: 50%; pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--light, #ecc98a) 30%, transparent);
  -webkit-mask: linear-gradient(180deg, #000, transparent 70%); mask: linear-gradient(180deg, #000, transparent 70%); }
.stage .halo + .halo { inset: -18%; opacity: .5; }
@keyframes breathe { 50% { opacity: .7; transform: scale(.96); } }

/* ───────── сетки ───────── */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid.two { grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tile { --rc: rgba(198, 204, 216, .0); position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px 12px; overflow: hidden; isolation: isolate;
  border-radius: var(--r); text-align: center; min-width: 0; box-shadow: var(--shadow);
  background: radial-gradient(90% 60% at 50% 0%, var(--rc), transparent 70%), var(--surf) padding-box, var(--edge) border-box; border: 1px solid transparent;
  transition: transform .18s var(--ease); }
.tile:has(.coin.rare) { --rc: rgba(98, 188, 255, .13); }
.tile:has(.coin.epic) { --rc: rgba(187, 130, 255, .15); }
.tile:has(.coin.legendary) { --rc: rgba(255, 200, 87, .17); }
.tile:has(.coin.upg) { --rc: color-mix(in srgb, var(--v1, #fff) 18%, transparent); }
.tile:active { transform: scale(.965); }
.tile .coin { width: 80%; }
.tile .name { width: 100%; font-weight: 650; font-size: 13px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .meta { width: 100%; font-size: 12px; color: var(--t3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .meta .v { color: var(--t2); }
.tile .qty { position: absolute; top: 8px; right: 8px; z-index: 3; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 11px;
  background: rgba(0, 0, 0, .55); border: 1px solid var(--line-2); color: var(--t1); font: 600 10.5px/20px var(--display); display: inline-flex; align-items: center; justify-content: center; }
.tile .qty .ic { width: 12px; height: 12px; color: var(--gold); }
.tile .flag { position: absolute; top: 9px; left: 9px; color: var(--gold); }
.tile .flag .ic { width: 16px; height: 16px; }
.tile[aria-pressed="true"] { background: radial-gradient(90% 60% at 50% 0%, rgba(236, 201, 138, .16), transparent 70%), var(--surf) padding-box, var(--edge-gold) border-box; }
.tile[aria-pressed="true"]::after { content: ""; position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d1406' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/14px no-repeat;
  box-shadow: 0 4px 10px -2px rgba(236, 201, 138, .6); animation: pop .3s var(--spring); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.tile.shop { padding: 18px 12px 14px; gap: 10px; }
.tile.shop .coin { width: 66%; }
.tile .foot { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 6px; }

.price { display: inline-flex; align-items: center; gap: 4px; font: 600 14px var(--display); color: var(--t1); white-space: nowrap; }
.price .ic { width: 13px; height: 13px; color: var(--gold); }
.price.l { font-size: 17px; }
.price.l .ic { width: 15px; height: 15px; }
.supply { width: 100%; height: 3px; border-radius: 2px; background: var(--s3); overflow: hidden; }
.supply i { display: block; height: 100%; border-radius: 2px; background: var(--gold-metal); box-shadow: 0 0 10px rgba(236, 201, 138, .5); }

/* ───────── «ведомость»: цифры в строку ───────── */
.ledger { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow);
  background: var(--surf) padding-box, var(--edge) border-box; border: 1px solid transparent; }
.ledger > * { padding: 13px 8px 12px; text-align: center; min-width: 0; }
.ledger > * + * { border-left: 1px solid var(--line); }
.ledger b { display: block; font: 600 17px/1.2 var(--display); letter-spacing: -.02em; }
.ledger span { font-size: 11px; color: var(--t3); }
.ledger b.accent { background: var(--gold-metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.facts { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 11px 16px; font-size: 14px; }
.facts dt { color: var(--t3); }
.facts dd { margin: 0; text-align: right; color: var(--t1); font-weight: 550; white-space: nowrap; }

/* ───────── баннер дропа ───────── */
.drop-strip { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 14px; border-radius: var(--r); width: 100%;
  background: linear-gradient(100deg, rgba(236, 201, 138, .16), rgba(236, 201, 138, .03) 70%), var(--surf) padding-box, var(--edge-gold) border-box;
  border: 1px solid transparent; box-shadow: 0 16px 34px -24px rgba(236, 201, 138, .5); }
.drop-strip::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 240, 210, .1) 50%, transparent 60%); animation: sweep 5s var(--ease) infinite; }
.drop-strip .ic-box { width: 46px; height: 46px; border-radius: 14px; background: var(--gold-metal); color: var(--gold-ink); border: 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 8px 18px -8px rgba(214, 163, 72, .7); }
.drop-strip .ic-box .ic { width: 24px; height: 24px; }

/* ───────── списки ───────── */
.list { display: flex; flex-direction: column; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow);
  background: var(--surf) padding-box, var(--edge) border-box; border: 1px solid transparent; }
.list > .li + .li { border-top: 1px solid var(--line); }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 62px; width: 100%; text-align: left; transition: background .2s; }
button.li:active, label.li:active { background: rgba(255, 255, 255, .03); }
.li .coin { width: 48px; flex: none; }
.li .main { flex: 1; min-width: 0; }
.li .main .t { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .main .d { font-size: 12.5px; color: var(--t3); margin-top: 2px; }
.li .end { flex: none; display: flex; align-items: center; gap: 6px; color: var(--t3); }
.li.me { background: linear-gradient(90deg, rgba(236, 201, 138, .1), rgba(236, 201, 138, .02)); box-shadow: inset 2px 0 0 var(--gold); }
.li .rank { width: 26px; text-align: center; font: 600 14px var(--display); color: var(--t3); flex: none; }
.amount { font: 600 14px var(--display); }
.amount.plus { color: var(--good); }

/* лента «только что в клубе» */
.rail { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail .card { flex: none; width: 118px; scroll-snap-align: start; padding: 14px 10px 12px; border-radius: var(--r); text-align: center; box-shadow: var(--shadow);
  background: var(--surf) padding-box, var(--edge) border-box; border: 1px solid transparent; transition: transform .18s var(--ease); }
.rail .card:active { transform: scale(.96); }
.rail .card .coin { width: 66px; margin: 0 auto 10px; }

/* ───────── навигация: плавающая стеклянная панель ───────── */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 0 12px calc(10px + var(--safe-b)); pointer-events: none; }
.nav::before { content: ""; position: absolute; inset: -30px 0 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(8, 8, 11, .85) 55%); }
.nav .in { pointer-events: auto; max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; padding: 6px 6px; border-radius: 24px;
  background: rgba(20, 20, 26, .72) padding-box, var(--edge) border-box; border: 1px solid transparent;
  -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 24px 48px -18px rgba(0, 0, 0, .95); }
.nav button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0 5px; border-radius: 18px;
  color: var(--t3); font-size: 10.5px; font-weight: 600; text-align: center; transition: color .2s; }
.nav button .ic { width: 23px; height: 23px; transition: transform .3s var(--spring); }
.nav button:active .ic { transform: scale(.88); }
.nav button[aria-current="page"] { color: var(--t1); }
.nav button[aria-current="page"]:not(.drop-btn) { background: rgba(255, 255, 255, .045); }
.nav button[aria-current="page"] .ic { color: var(--gold); }
.nav .drop-btn .disc { position: relative; width: 56px; height: 56px; margin-top: -26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold-metal); color: var(--gold-ink); border: 4px solid var(--bg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 12px 24px -8px rgba(214, 163, 72, .75); }
.nav .drop-btn .disc .ic { width: 25px; height: 25px; color: var(--gold-ink) !important; }
.nav .drop-btn .disc.ready::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--gold); animation: ring 2.2s var(--ease) infinite; }
@keyframes ring { from { transform: scale(1); opacity: .9; } to { transform: scale(1.45); opacity: 0; } }
.nav .dot { position: absolute; top: -22px; right: calc(50% - 30px); width: 12px; height: 12px; border-radius: 50%; background: var(--bad); border: 2.5px solid var(--bg); }

/* ───────── шторки ───────── */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(3, 3, 6, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s; }
.scrim.show { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-width: 640px; margin: 0 auto; max-height: 90vh; overflow-y: auto;
  padding: 8px 18px calc(22px + var(--safe-b)); border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, #17171d, #111115) padding-box, var(--edge) border-box; border: 1px solid transparent; border-bottom: 0;
  box-shadow: 0 -30px 60px -20px rgba(0, 0, 0, .8);
  transform: translateY(100%); transition: transform .42s var(--ease); }
.sheet.show { transform: none; }
.sheet .grab { width: 38px; height: 5px; border-radius: 3px; background: var(--s3); margin: 0 auto 18px; }
.option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: 16px;
  background: rgba(0, 0, 0, .3) padding-box, var(--edge) border-box; border: 1px solid transparent; transition: background .2s; }
.option[aria-pressed="true"] { background: linear-gradient(180deg, rgba(236, 201, 138, .12), rgba(236, 201, 138, .03)) padding-box, var(--edge-gold) border-box; }
.option[disabled] { opacity: .45; }

/* ───────── формы ───────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 12.5px; color: var(--t2); font-weight: 600; padding-left: 2px; }
.hint { font-size: 12px; color: var(--t3); padding-left: 2px; }
.input { width: 100%; min-height: 48px; padding: 0 14px; border-radius: 13px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line-2); outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.input { min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(236, 201, 138, .12); }
.input.s { min-height: 40px; }
.input.big { min-height: 66px; font: 600 26px var(--display); text-align: center; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaa6b5' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.toggle { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line-2); cursor: pointer; }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 14px; background: var(--s3); transition: background .25s; pointer-events: none; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .5); }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .3s var(--spring); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.switch input:checked + i { background: var(--gold-metal); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2px solid var(--gold); outline-offset: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 13.5px; color: var(--t2); }
.check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--gold); }
.upload { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; border: 1.5px dashed var(--line-2); background: rgba(0, 0, 0, .3); }
.upload .prev { width: 60px; height: 60px; border-radius: 50%; flex: none; background: var(--s2) center/cover; display: grid; place-items: center; color: var(--t3); }
.upload .prev.wide { width: 96px; height: 50px; border-radius: 8px; }
.color { width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-2); border-radius: 12px; background: none; flex: none; }
.sub { padding: 14px; border-radius: 16px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line-2); }

/* ───────── варианты улучшения ───────── */
.variants { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.variant { padding: 12px 8px 10px; border-radius: var(--r); text-align: center; background: var(--surf) padding-box, var(--edge) border-box; border: 1px solid transparent; }
.variant .coin { width: 60px; margin: 0 auto 10px; }
.variant .n { font-weight: 650; font-size: 12.5px; }
.variant .p { font: 600 12px var(--display); color: var(--gold); margin-top: 3px; }

/* ───────── профиль ───────── */
.hero { position: relative; overflow: hidden; isolation: isolate; padding: 26px 18px 20px; border-radius: var(--r-l); text-align: center;
  background: radial-gradient(80% 70% at 50% 0%, rgba(236, 201, 138, .13), transparent 70%), linear-gradient(180deg, #16161b, #0e0e11) padding-box, var(--edge-gold) border-box;
  border: 1px solid transparent; box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 1); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--guilloche);
  -webkit-mask: radial-gradient(90% 80% at 50% 0%, #000, transparent 80%); mask: radial-gradient(90% 80% at 50% 0%, #000, transparent 80%); }
.hero .lvl { box-shadow: 0 0 0 6px rgba(236, 201, 138, .05), 0 18px 40px -12px rgba(236, 201, 138, .35); }

/* витрина */
.showcase { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 10px; padding: 22px 12px 18px; border-radius: var(--r-l); overflow: hidden;
  background: radial-gradient(110% 80% at 50% 0%, rgba(236, 201, 138, .1), transparent 65%), var(--surf) padding-box, var(--edge) border-box; border: 1px solid transparent; box-shadow: var(--shadow); }
.showcase .slot { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; text-align: center; }
.showcase .slot .coin { width: 84%; }
.showcase .slot .n { font-size: 12px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--t2); }
.showcase .empty-slot { width: 84%; aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed var(--line-2); display: grid; place-items: center; color: var(--t3); background: radial-gradient(circle, rgba(255,255,255,.02), transparent 70%); }

/* достижения */
.ach { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ach .a { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 6px;
  border-radius: var(--r); text-align: center; background: radial-gradient(70% 60% at 50% 20%, rgba(236, 201, 138, .1), transparent 70%), var(--surf) padding-box, var(--edge) border-box; border: 1px solid transparent; }
.ach .a .e { font-size: 24px; line-height: 1; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5)); }
.ach .a .t { font-size: 10px; line-height: 1.2; color: var(--t2); font-weight: 600; }

/* серии и прогресс */
.bar { height: 6px; border-radius: 3px; background: var(--s3); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5); }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--gold-metal); box-shadow: 0 0 12px rgba(236, 201, 138, .45); transform-origin: left; animation: grow .9s var(--ease) both .2s; }
@keyframes grow { from { transform: scaleX(0); } }
.mini { display: flex; gap: 6px; flex-wrap: wrap; }
.mini .coin { width: 36px; }

/* ───────── топ: пьедестал ───────── */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; margin-top: 20px; }
.podium .p { --m: #d6dbe4; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; text-align: center; }
.podium .p.first { --m: #ffc857; }
.podium .p.third { --m: #e0a372; }
.podium .ring { position: relative; padding: 3px; border-radius: 50%; background: conic-gradient(from 200deg, var(--m), color-mix(in srgb, var(--m) 30%, #000), var(--m));
  box-shadow: 0 14px 30px -12px color-mix(in srgb, var(--m) 55%, transparent); }
.podium .ring .avatar { width: 62px; height: 62px; font-size: 22px; border: 2.5px solid var(--bg); }
.podium .first .ring .avatar { width: 80px; height: 80px; font-size: 28px; }
.podium .place { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px;
  background: var(--m); color: #14100a; font: 700 11.5px/24px var(--display); border: 2px solid var(--bg); }
.podium .crown { position: absolute; left: 50%; top: -20px; transform: translateX(-50%); color: var(--m); filter: drop-shadow(0 4px 10px rgba(255, 200, 87, .5)); }
.podium .crown .ic { width: 22px; height: 22px; }
.podium .n { margin-top: 8px; max-width: 100%; font-weight: 650; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .v { font: 600 13px var(--display); color: var(--t2); }
.podium .first .v { color: var(--gold); }
.podium .base { width: 100%; border-radius: 14px 14px 0 0; margin-top: 4px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--m) 18%, transparent), transparent) padding-box,
              linear-gradient(180deg, color-mix(in srgb, var(--m) 45%, transparent), transparent 80%) border-box;
  border: 1px solid transparent; border-bottom: 0; }
.podium .first .base { height: 54px; }
.podium .second .base { height: 38px; }
.podium .third .base { height: 26px; }

/* ───────── дроп ───────── */
.vault-panel { position: relative; overflow: hidden; isolation: isolate; padding: 26px 18px 18px; border-radius: var(--r-l); text-align: center;
  background: radial-gradient(70% 55% at 50% 18%, rgba(236, 201, 138, .14), transparent 70%), linear-gradient(180deg, #16161b, #0e0e11) padding-box, var(--edge-gold) border-box;
  border: 1px solid transparent; box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 1); }
.vault-panel::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--guilloche);
  -webkit-mask: radial-gradient(70% 60% at 50% 25%, #000, transparent 80%); mask: radial-gradient(70% 60% at 50% 25%, #000, transparent 80%); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week .d { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; position: relative;
  background: rgba(0, 0, 0, .35); border: 1px solid var(--line); font: 600 12px var(--display); color: var(--t3); }
.week .d.done { background: var(--gold-metal); border-color: transparent; color: var(--gold-ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 6px 14px -8px rgba(214, 163, 72, .7); }
.week .d.today { border: 1.5px solid var(--gold); color: var(--gold); box-shadow: 0 0 0 4px rgba(236, 201, 138, .1); animation: today 2s ease-in-out infinite; }
@keyframes today { 50% { box-shadow: 0 0 0 7px rgba(236, 201, 138, .04); } }
.week .d.gift .ic { position: absolute; top: -7px; right: -5px; width: 16px; height: 16px; padding: 2px; border-radius: 50%; background: var(--s1); color: var(--gold); }
/* сейф-медальон */
.chest { position: relative; width: 128px; height: 128px; margin: 4px auto 0; border-radius: 50%; display: grid; place-items: center; color: var(--gold-ink);
  background: var(--gold-metal); box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 -3px 8px rgba(120, 80, 20, .35) inset, 0 24px 48px -16px rgba(214, 163, 72, .65); }
.chest::before { content: ""; position: absolute; inset: 9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2b2417, #120e08); box-shadow: inset 0 3px 10px rgba(0, 0, 0, .7), 0 0 0 1.5px rgba(255, 240, 200, .4); }
.chest::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(0, 0, 0, .22) 0 2deg, transparent 2deg 6deg);
  -webkit-mask: radial-gradient(circle closest-side, transparent 88%, #000 89%, #000 97%, transparent 98%); mask: radial-gradient(circle closest-side, transparent 88%, #000 89%, #000 97%, transparent 98%); }
.chest .ic { position: relative; z-index: 1; width: 52px; height: 52px; stroke-width: 1.4; color: var(--gold); filter: drop-shadow(0 0 10px rgba(236, 201, 138, .45)); }
.chest.ready { animation: bob 3.2s ease-in-out infinite; }
.chest.ready::after { animation: spin 18s linear infinite; }
.vault-panel .chest:not(.ready) { filter: saturate(.35) brightness(.7); }
@keyframes bob { 50% { transform: translateY(-6px); } }

/* кузница */
.forge { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.forge .slot { aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed var(--line-2); display: grid; place-items: center; color: var(--t3); background: radial-gradient(circle, rgba(255,255,255,.025), transparent 70%); }
.forge .slot .coin { width: 100%; animation: pop .35s var(--spring); }

/* пустые состояния, скелетоны */
.empty { text-align: center; padding: 38px 20px; }
.empty .ic-box { width: 60px; height: 60px; border-radius: 20px; margin: 0 auto 16px; box-shadow: 0 16px 36px -14px rgba(236, 201, 138, .4); }
.empty .ic-box .ic { width: 26px; height: 26px; }
.empty p { color: var(--t2); font-size: 14px; margin: 8px auto 0; max-width: 34ch; }
.skel { background: linear-gradient(90deg, var(--s1) 0%, #1c1b21 50%, var(--s1) 100%); background-size: 200% 100%; animation: skel 1.4s linear infinite; border-radius: var(--r); }
@keyframes skel { to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid var(--s3); border-top-color: var(--gold); animation: spin .8s linear infinite; }

/* тост */
.toast { position: fixed; left: 50%; top: 12px; z-index: 100; transform: translate(-50%, -160%); transition: transform .4s var(--spring);
  max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 16px; font-size: 14px; font-weight: 600; text-align: center;
  background: rgba(30, 30, 37, .85) padding-box, var(--edge) border-box; border: 1px solid transparent;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .85); }
.toast.show { transform: translate(-50%, 0); }
.toast.err { background: rgba(40, 20, 26, .9) padding-box, linear-gradient(180deg, rgba(255, 111, 130, .6), rgba(255, 111, 130, .15)) border-box; }

/* ───────── раскрытие — главный момент движения ───────── */
.reveal { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px;
  background: radial-gradient(90% 60% at 50% 40%, color-mix(in srgb, var(--rc, #ecc98a) 14%, #121117), #050508); opacity: 0; transition: opacity .35s; }
.reveal.show { opacity: 1; }
.reveal .rays { position: absolute; top: 40%; left: 50%; width: 1100px; height: 1100px; margin: -550px 0 0 -550px; pointer-events: none; opacity: 0;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 28%, transparent) 0 4deg, transparent 4deg 12deg);
  -webkit-mask: radial-gradient(circle, #000, transparent 58%); mask: radial-gradient(circle, #000, transparent 58%);
  transition: opacity .8s var(--ease); animation: spin 40s linear infinite; }
.reveal.open .rays { opacity: 1; }
.reveal .stage-r { position: relative; width: min(62vw, 252px); }
.reveal .stage-r::after { content: ""; position: absolute; inset: -30%; z-index: -1; border-radius: 50%; opacity: 0; transition: opacity .8s;
  background: radial-gradient(circle, color-mix(in srgb, var(--rc) 40%, transparent), transparent 65%); }
.reveal.open .stage-r::after { opacity: 1; }
.reveal.charging .stage-r { animation: charge 1.2s cubic-bezier(.5, 0, .9, .4) both; }
.reveal.spinning .stage-r .coin { animation: flip .45s linear infinite; }
.reveal.open .stage-r { animation: land .9s var(--ease) both; }
.reveal .flash { position: absolute; inset: 0; background: radial-gradient(circle at 50% 40%, #fff, color-mix(in srgb, var(--rc) 60%, #fff)); opacity: 0; pointer-events: none; }
.reveal.flashed .flash { animation: flash .75s ease-out; }
.reveal .info { margin-top: 38px; text-align: center; opacity: 0; transform: translateY(14px); transition: opacity .5s .3s, transform .6s .3s var(--ease); }
.reveal.open .info { opacity: 1; transform: none; }
.reveal .info .display { font-size: 30px; }
.reveal .actions { margin-top: 28px; display: flex; gap: 10px; justify-content: center; opacity: 0; transition: opacity .4s .7s; }
.reveal.open .actions { opacity: 1; }
.reveal .chest { width: 156px; height: 156px; }
.reveal .chest .ic { width: 64px; height: 64px; }
@keyframes charge { 0% { transform: scale(1); } 70% { transform: scale(.92) rotate(-3deg); } 85% { transform: scale(.9) rotate(3deg); } 100% { transform: scale(.88); } }
@keyframes flip { to { transform: rotateY(360deg); } }
@keyframes land { 0% { transform: scale(.4) rotateY(200deg); filter: blur(6px); } 60% { filter: blur(0); } 100% { transform: scale(1) rotateY(0); } }
@keyframes flash { 0% { opacity: .9; } 100% { opacity: 0; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 95; }

/* ───────── онбординг ───────── */
.onboard { position: fixed; inset: 0; z-index: 80; overflow-y: auto; padding: 24px 20px calc(24px + var(--safe-b)); display: flex; flex-direction: column;
  background: radial-gradient(90% 50% at 50% 0%, rgba(236, 201, 138, .14), transparent 70%), var(--bg); }
.onboard::before { content: ""; position: absolute; inset: 0 0 auto; height: 360px; z-index: -1; background: var(--guilloche);
  -webkit-mask: radial-gradient(70% 90% at 50% 0%, #000, transparent 80%); mask: radial-gradient(70% 90% at 50% 0%, #000, transparent 80%); }
.onboard .fan { position: relative; height: 210px; margin: 12px auto 8px; width: 300px; }
.onboard .fan > div { animation: float 6s ease-in-out infinite; }
.onboard .fan > div:nth-child(2) { animation-delay: -2s; }
.onboard .fan > div:nth-child(3) { animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-8px) rotate(-2deg); } }
.onboard .points { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.onboard .points .row { align-items: flex-start; }

/* админка */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); border-radius: var(--r); overflow: hidden; background: var(--surf) padding-box, var(--edge) border-box; border: 1px solid transparent; }
.kpis > div { padding: 14px; }
.kpis > div:nth-child(odd) { border-right: 1px solid var(--line); }
.kpis > div:nth-child(n+3) { border-top: 1px solid var(--line); }
.kpis b { display: block; font: 600 20px var(--display); }
.kpis span { font-size: 12px; color: var(--t3); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 96px; }
.bars div { flex: 1; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--gold-metal); opacity: .9; }
.preview-img { width: 100%; aspect-ratio: 1200 / 630; border-radius: 12px; background: var(--s2); object-fit: cover; border: 1px solid var(--line); }
.var-row { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: start; }

@media (min-width: 520px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .grid.two { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.btn.primary[disabled], .btn.upgrade[disabled] { background: linear-gradient(180deg, #1e1e25, #17171c) padding-box, var(--edge) border-box; color: var(--t3); text-shadow: none; box-shadow: none; opacity: 1; }
.btn.primary[disabled]::before { display: none; }
.ic.star-in { color: var(--gold); vertical-align: -2px; width: 14px; height: 14px; }
.btn.primary .star-in, .btn.primary .price .ic { color: var(--gold-ink); }
