/* =========================================================
   SBP — чёрно-белый переливающийся 3D-стиль
   ========================================================= */
@property --a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

:root {
  --bg: #000;
  --ink: #f4f4f4;
  --muted: #8e8e93;
  --dim: #5a5a5e;
  --line: rgba(255,255,255,.10);
  --glass: rgba(18,18,20,.62);
  --glass-2: rgba(30,30,34,.55);
  --chrome: linear-gradient(110deg, #ffffff 0%, #8c8c8c 18%, #ffffff 32%, #3b3b3b 48%, #f5f5f5 62%, #9b9b9b 78%, #ffffff 100%);
  --metal: linear-gradient(180deg, #ffffff 0%, #d9d9d9 45%, #a9a9a9 55%, #e9e9e9 100%);
  --r: 22px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
:root[data-theme="light"] { --bg: #000; } /* приложение всегда чёрное — так задумано брендом */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); }
body { min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

/* ---------------- Фон ---------------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(120% 80% at 50% 0%, #161616 0%, #000 60%); }
.bg-blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; mix-blend-mode: screen; animation: drift 22s ease-in-out infinite alternate; }
.b1 { width: 60vmax; height: 60vmax; left: -20vmax; top: -25vmax; background: radial-gradient(circle, rgba(255,255,255,.22), transparent 60%); }
.b2 { width: 50vmax; height: 50vmax; right: -25vmax; top: 20vh; background: radial-gradient(circle, rgba(200,200,210,.16), transparent 60%); animation-duration: 28s; }
.b3 { width: 45vmax; height: 45vmax; left: 10vw; bottom: -30vmax; background: radial-gradient(circle, rgba(255,255,255,.12), transparent 60%); animation-duration: 34s; }
@keyframes drift { to { transform: translate3d(8vw, 6vh, 0) scale(1.15); } }
.bg-floor {
  position: absolute; left: -50%; right: -50%; bottom: -10vh; height: 70vh;
  background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(500px) rotateX(62deg);
  transform-origin: bottom;
  mask-image: linear-gradient(to top, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 85%);
  animation: floor 6s linear infinite;
}
@keyframes floor { to { background-position: 0 48px; } }
.bg-grain { position: absolute; inset: -50%; opacity: .07; 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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0%{transform:translate(0,0)} 25%{transform:translate(-3%,2%)} 50%{transform:translate(2%,-3%)} 75%{transform:translate(-2%,-1%)} 100%{transform:translate(1%,3%)} }

/* ---------------- Переливающийся хром-текст ---------------- */
.chrome-text {
  background: var(--chrome); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 6s linear infinite;
}
@keyframes sheen { to { background-position: 300% 0; } }
.display { font-family: var(--display); font-weight: 900; letter-spacing: -.02em; line-height: 1.02; }
.h-3d { /* объёмная экструзия текста */
  position: relative; display: inline-block;
  filter: drop-shadow(0 1px 0 #6b6b6b) drop-shadow(0 2px 0 #4a4a4a) drop-shadow(0 3px 0 #2e2e2e) drop-shadow(0 8px 14px rgba(0,0,0,.9));
}

/* ---------------- Топбар ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; padding-top: calc(10px + var(--tg-safe-top, 0px));
  background: linear-gradient(to bottom, rgba(0,0,0,.92), rgba(0,0,0,.55) 70%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.topbar-logo img { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(255,255,255,.08); }
.topbar-title { font-family: var(--display); font-weight: 900; font-size: 20px; letter-spacing: .04em; flex: 1; }
.coin-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px 7px 8px; border-radius: 99px; border: 1px solid var(--line); background: var(--glass); cursor: pointer; font-weight: 800; font-size: 14px; }
.coin-mini { width: 18px; height: 18px; border-radius: 50%; background: var(--metal); box-shadow: inset 0 -2px 3px rgba(0,0,0,.45), 0 0 10px rgba(255,255,255,.35); }

/* ---------------- Раскладка ---------------- */
.view { padding: 6px 16px calc(110px + var(--safe-b)); max-width: 640px; margin: 0 auto; }
.view > * { animation: rise .55s cubic-bezier(.2,.8,.2,1) both; }
.view > *:nth-child(2) { animation-delay: .05s; } .view > *:nth-child(3) { animation-delay: .1s; }
.view > *:nth-child(4) { animation-delay: .15s; } .view > *:nth-child(5) { animation-delay: .2s; }
.view > *:nth-child(n+6) { animation-delay: .25s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.section { margin: 26px 0 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.section h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.section small { color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 12px; } .mt2 { margin-top: 20px; }

/* ---------------- Стеклянные карточки с переливающейся рамкой ---------------- */
.card {
  position: relative; border-radius: var(--r); padding: 18px;
  background: linear-gradient(160deg, rgba(40,40,44,.65), rgba(10,10,12,.75));
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 -1px 0 rgba(0,0,0,.6) inset, 0 18px 40px -18px rgba(0,0,0,.95), 0 2px 6px rgba(0,0,0,.6);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.card.iri::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--a), #fff, #444, #cfcfcf, #111, #fff, #666, #fff);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 5s linear infinite; opacity: .85;
}
@keyframes spin { to { --a: 360deg; } }
.tilt { transform-style: preserve-3d; transition: transform .25s ease-out; will-change: transform; }
.tilt .lift { transform: translateZ(28px); }

/* ---------------- Hero ---------------- */
.hero { position: relative; padding: 18px 0 6px; text-align: center; perspective: 1100px; }
.logo3d {
  position: relative; width: min(78vw, 330px); aspect-ratio: 1; margin: 6px auto 0;
  transform-style: preserve-3d; transition: transform .2s ease-out;
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { translate: 0 -10px; } }
.logo3d .layer { position: absolute; inset: 0; border-radius: 34px; }
.logo3d .glow { transform: translateZ(-60px) scale(1.05); background: radial-gradient(circle, rgba(255,255,255,.35), transparent 65%); filter: blur(30px); }
.logo3d .slab { /* «толщина» плиты */
  transform: translateZ(-14px); background: linear-gradient(145deg, #3a3a3a, #050505 60%, #2a2a2a);
  box-shadow: 0 40px 60px -20px rgba(0,0,0,1), 0 0 0 1px rgba(255,255,255,.06);
}
.logo3d .face { overflow: hidden; background: #000; border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.logo3d .face img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); }
.logo3d .shine {
  transform: translateZ(1px); pointer-events: none; mix-blend-mode: overlay;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.55) 45%, transparent 60%);
  background-size: 250% 100%; animation: shine 4.5s ease-in-out infinite;
}
@keyframes shine { 0% { background-position: 130% 0; } 60%,100% { background-position: -60% 0; } }
.logo3d .rim { pointer-events: none; padding: 1.5px; background: conic-gradient(from var(--a), #fff, #333, #fff, #777, #fff); animation: spin 6s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; transform: translateZ(2px); }
.hero-title { font-size: clamp(34px, 11vw, 54px); margin: 26px 0 6px; }
.hero-tag { color: #cfcfcf; font-size: 15px; line-height: 1.5; max-width: 34ch; margin: 0 auto; }
.hero-cta { display: flex; gap: 10px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

/* ---------------- Кнопки ---------------- */
.btn {
  appearance: none; border: 0; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 20px; border-radius: 16px; font-weight: 800; font-size: 15px; letter-spacing: .01em;
  transition: transform .12s, box-shadow .12s, filter .2s;
}
.btn:active { transform: translateY(2px) scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-primary {
  color: #050505; background: var(--metal);
  box-shadow: 0 1px 0 #fff inset, 0 -2px 0 rgba(0,0,0,.25) inset, 0 5px 0 #6d6d6d, 0 14px 24px -6px rgba(255,255,255,.25);
  position: relative; overflow: hidden;
}
.btn-primary::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.9) 50%, transparent 65%); background-size: 250% 100%; animation: shine 3.5s ease-in-out infinite; mix-blend-mode: soft-light; }
.btn-primary:active { box-shadow: 0 1px 0 #fff inset, 0 2px 0 #6d6d6d, 0 6px 12px -6px rgba(255,255,255,.3); }
.btn-ghost { background: var(--glass-2); border: 1px solid var(--line); box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 4px 0 #0b0b0b; }
.btn-danger { background: rgba(255,255,255,.04); border: 1px solid rgba(255,90,90,.35); color: #ff8a8a; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 13px; border-radius: 12px; font-size: 13px; }

/* ---------------- Преимущества ---------------- */
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feature { padding: 16px; min-height: 132px; }
.feature .ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 20px; color: #000; background: var(--metal); box-shadow: 0 4px 0 #555, 0 10px 18px -6px rgba(255,255,255,.25); margin-bottom: 12px; }
.feature b { display: block; font-size: 14px; margin-bottom: 4px; }
.feature span { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.about { white-space: pre-line; line-height: 1.6; color: #d8d8d8; font-size: 15px; }

/* Шаги заказа */
.steps { counter-reset: s; display: grid; gap: 10px; }
.step { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; }
.step::before { counter-increment: s; content: counter(s); flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 900; color: #000; background: var(--metal); box-shadow: 0 3px 0 #555; }
.step b { display: block; margin-bottom: 2px; }
.step span { color: var(--muted); font-size: 13px; line-height: 1.45; }

.links { display: grid; gap: 10px; }
.link-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; }
.link-row .ico { font-size: 18px; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.07); border: 1px solid var(--line); }
.link-row .arrow { margin-left: auto; color: var(--muted); }

/* ---------------- Каталог ---------------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 9px 15px; border-radius: 99px; border: 1px solid var(--line); background: var(--glass); font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; transition: .2s; }
.chip.on { color: #000; background: var(--metal); border-color: transparent; box-shadow: 0 3px 0 #5d5d5d; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; perspective: 900px; }
.product { padding: 8px; cursor: pointer; overflow: hidden; }
.product .pimg { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: radial-gradient(circle at 50% 35%, #2b2b2b, #050505); transform: translateZ(18px); }
.product .pimg img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.product:hover .pimg img { transform: scale(1.06); }
.pimg .ph { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 34px; }
.badge { position: absolute; top: 8px; left: 8px; z-index: 2; padding: 4px 8px; border-radius: 8px; font-size: 10px; font-weight: 900; letter-spacing: .08em; color: #000; background: var(--metal); box-shadow: 0 2px 0 #555; }
.badge.r { left: auto; right: 8px; background: rgba(0,0,0,.65); color: #fff; border: 1px solid var(--line); box-shadow: none; backdrop-filter: blur(6px); }
.product .pinfo { padding: 10px 6px 4px; transform: translateZ(10px); }
.product .ptitle { font-weight: 700; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 35px; }
.price { font-family: var(--display); font-weight: 700; font-size: 16px; margin-top: 6px; }
.price s { color: var(--dim); font-family: var(--body); font-weight: 600; font-size: 12px; margin-left: 6px; }

/* ---------------- Шит (нижняя панель) ---------------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  max-width: 640px; margin: 0 auto;
  padding: 10px 18px calc(24px + var(--safe-b));
  border-radius: 28px 28px 0 0; background: linear-gradient(180deg, #1b1b1d, #070708 40%);
  border-top: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 -30px 80px rgba(0,0,0,.9);
  transform: translateY(105%); transition: transform .42s cubic-bezier(.2,.9,.25,1);
}
.sheet-wrap.open { pointer-events: auto; }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-handle { width: 42px; height: 5px; border-radius: 9px; background: rgba(255,255,255,.25); margin: 0 auto 14px; }
.sheet h3 { font-family: var(--display); font-size: 20px; margin: 0 0 6px; line-height: 1.2; }
.sheet .bigimg { border-radius: 20px; overflow: hidden; aspect-ratio: 1; background: #0c0c0c; margin-bottom: 16px; border: 1px solid var(--line); }
.sheet .bigimg img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------- Формы ---------------- */
label.f { display: block; margin-top: 12px; }
label.f > span { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 0 6px 4px; text-transform: uppercase; letter-spacing: .06em; }
.inp { width: 100%; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.04); outline: none; box-shadow: inset 0 2px 6px rgba(0,0,0,.6); transition: border-color .2s; }
.inp:focus { border-color: rgba(255,255,255,.4); }
textarea.inp { min-height: 90px; resize: vertical; }
select.inp { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #aaa 50%), linear-gradient(135deg, #aaa 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
select.inp option { background: #111; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.03); margin-top: 10px; cursor: pointer; }
.switch input { display: none; }
.switch i { width: 46px; height: 28px; border-radius: 99px; background: #2a2a2a; position: relative; transition: .2s; box-shadow: inset 0 2px 4px rgba(0,0,0,.7); flex: none; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #777; transition: .2s; }
.switch input:checked + i { background: #e9e9e9; }
.switch input:checked + i::after { left: 21px; background: #000; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.size { min-width: 48px; padding: 10px 12px; border-radius: 12px; text-align: center; font-weight: 800; border: 1px solid var(--line); background: rgba(255,255,255,.04); cursor: pointer; }
.size.on { background: var(--metal); color: #000; box-shadow: 0 3px 0 #555; }
.upload { display: flex; align-items: center; gap: 12px; }
.upload .thumb { width: 74px; height: 74px; border-radius: 14px; border: 1px dashed rgba(255,255,255,.25); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 24px; flex: none; background: rgba(255,255,255,.03); }
.upload .thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------- Заказы и трекинг ---------------- */
.order { padding: 14px; display: flex; gap: 12px; cursor: pointer; margin-bottom: 12px; align-items: center; }
.order .oimg { width: 64px; height: 64px; border-radius: 14px; overflow: hidden; flex: none; background: radial-gradient(circle at 50% 35%, #2b2b2b, #050505); display: grid; place-items: center; border: 1px solid var(--line); }
.order .oimg img { width: 100%; height: 100%; object-fit: cover; }
.order .code { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--muted); }
.order .otitle { font-weight: 700; margin: 2px 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress { height: 6px; border-radius: 9px; background: rgba(255,255,255,.08); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.8); }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--chrome); background-size: 300% 100%; animation: sheen 3s linear infinite; box-shadow: 0 0 12px rgba(255,255,255,.6); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid var(--line); }
.status-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px #fff; animation: pulse 1.6s infinite; }
.status-pill.done::before { animation: none; }
.status-pill.cancelled { color: #ff8a8a; } .status-pill.cancelled::before { background: #ff6b6b; box-shadow: none; animation: none; }
@keyframes pulse { 50% { opacity: .3; } }

.timeline { position: relative; margin: 16px 0 6px; padding-left: 8px; }
.tl { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
.tl:last-child { padding-bottom: 0; }
.tl::before { content: ''; position: absolute; left: 11px; top: 26px; bottom: 0; width: 2px; background: rgba(255,255,255,.1); }
.tl:last-child::before { display: none; }
.tl.done::before { background: linear-gradient(#fff, #9a9a9a); box-shadow: 0 0 8px rgba(255,255,255,.5); }
.tl .dot { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); background: #0a0a0a; display: grid; place-items: center; font-size: 11px; font-weight: 900; z-index: 1; }
.tl.done .dot { background: var(--metal); color: #000; border-color: transparent; }
.tl.cur .dot { background: #fff; color: #000; border-color: transparent; box-shadow: 0 0 0 6px rgba(255,255,255,.12), 0 0 22px rgba(255,255,255,.8); animation: beacon 1.8s infinite; }
@keyframes beacon { 50% { box-shadow: 0 0 0 11px rgba(255,255,255,.04), 0 0 28px rgba(255,255,255,.9); } }
.tl b { display: block; font-size: 14px; }
.tl.todo b { color: var(--dim); }
.tl small { color: var(--muted); font-size: 12px; display: block; margin-top: 2px; line-height: 1.4; }
.tl .note { margin-top: 6px; font-size: 13px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.06); color: #ddd; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; font-weight: 700; word-break: break-word; }
.total { font-family: var(--display); font-size: 22px; }

/* ---------------- Бонусы ---------------- */
.coin-stage { perspective: 800px; display: grid; place-items: center; padding: 20px 0 6px; }
.coin3d { width: 150px; height: 150px; position: relative; transform-style: preserve-3d; animation: coinspin 7s ease-in-out infinite; }
@keyframes coinspin { 0% { transform: rotateY(0) rotateX(8deg); } 50% { transform: rotateY(180deg) rotateX(-8deg); } 100% { transform: rotateY(360deg) rotateX(8deg); } }
.coin3d .side { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; backface-visibility: hidden;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #cfcfcf 35%, #7a7a7a 70%, #d5d5d5 100%);
  box-shadow: inset 0 0 0 8px rgba(0,0,0,.18), inset 0 0 0 10px rgba(255,255,255,.6), inset 0 -10px 20px rgba(0,0,0,.4); }
.coin3d .side span { font-family: var(--display); font-weight: 900; font-size: 34px; color: #111; text-shadow: 0 1px 0 #fff, 0 -1px 0 rgba(0,0,0,.4); }
.coin3d .back { transform: rotateY(180deg); }
.coin3d .edge { position: absolute; inset: 0; border-radius: 50%; transform: translateZ(-6px); background: #555; }
.coin3d .front { transform: translateZ(6px); } .coin3d .back { transform: rotateY(180deg) translateZ(6px); }
.coin-shadow { width: 120px; height: 18px; margin-top: 14px; border-radius: 50%; background: radial-gradient(rgba(255,255,255,.25), transparent 70%); filter: blur(4px); }
.balance { text-align: center; }
.balance .num { font-size: 48px; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tier { padding: 14px 10px; text-align: center; }
.tier .v { font-family: var(--display); font-weight: 900; font-size: 22px; white-space: nowrap; }
.tier .v small { font-size: 10px; }
.tier .c { color: var(--muted); font-size: 12px; margin: 4px 0 12px; }
.coupon { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 10px; border-style: dashed; }
.coupon .v { font-family: var(--display); font-weight: 900; font-size: 20px; min-width: 76px; }
.coupon.used { opacity: .45; }
.log-row { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.log-row:last-child { border: 0; }
.plus { color: #fff; font-weight: 800; } .minus { color: var(--muted); font-weight: 800; }
.rule { font-size: 13px; color: #bdbdbd; line-height: 1.5; }

/* ---------------- Админка ---------------- */
.seg { display: flex; gap: 6px; padding: 5px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1 0 auto; border: 0; background: none; padding: 10px 12px; border-radius: 12px; font-weight: 800; font-size: 13px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--metal); color: #000; box-shadow: 0 2px 0 #555; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { padding: 14px; }
.stat b { font-family: var(--display); font-size: 24px; display: block; }
.stat span { color: var(--muted); font-size: 12px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 10px; cursor: pointer; }
.list-item .thumb { width: 52px; height: 52px; border-radius: 12px; overflow: hidden; flex: none; background: #111; display: grid; place-items: center; border: 1px solid var(--line); font-family: var(--display); font-weight: 900; }
.list-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-item .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .s { color: var(--muted); font-size: 12.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.status-grid button { padding: 11px 8px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.04); font-weight: 700; font-size: 12.5px; cursor: pointer; }
.status-grid button.on { background: var(--metal); color: #000; box-shadow: 0 3px 0 #555; }
.status-grid button.x.on { background: #ff8a8a; }
.suggest { margin-top: 6px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.suggest div { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.03); font-size: 14px; }
.suggest div:last-child { border: 0; }
.suggest div:hover { background: rgba(255,255,255,.08); }
.picked { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.08); font-weight: 700; }
.size small { display: block; font-size: 10px; font-weight: 600; opacity: .7; margin-top: 2px; }
.size.na { opacity: .35; }
.tier-edit { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 8px; margin-top: 8px; align-items: center; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .big { font-family: var(--display); font-weight: 900; font-size: 44px; margin-bottom: 10px; }

/* ---------------- Доставка ---------------- */
.dlv-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dlv-link { color: var(--muted); font-size: 12px; margin: 6px 4px 0; display: inline-block; text-decoration: underline; }
.dlv-opt { text-align: left; cursor: pointer; padding: 12px 10px; display: flex; flex-direction: column; gap: 4px; transition: transform .15s, box-shadow .2s; color: inherit; font: inherit; }
.dlv-opt .dlv-ico { font-size: 24px; margin-bottom: 4px; }
.dlv-opt b { font-size: 14px; } .dlv-opt small { color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.dlv-opt.on { background: linear-gradient(160deg, #f4f4f4, #a9a9a9); color: #000; box-shadow: 0 4px 0 #555, 0 14px 24px -8px rgba(255,255,255,.35); transform: translateY(-2px); }
.dlv-opt.on small { color: #333; }
.dlv-opt.off { opacity: .4; }
.dlv-opt.off small::after { content: ' · не ваш город'; color: #ff8a8a; }
.pay-note { margin-top: 12px; padding: 12px 14px; border-radius: 14px; font-size: 13px; line-height: 1.45; color: #e9e9e9;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); }
.pay-note b { color: #fff; }
.dlv-warn { margin-top: 10px; padding: 12px 14px; border-radius: 14px; font-size: 13px; line-height: 1.45; color: #ffd0d0; background: rgba(255,80,80,.08); border: 1px solid rgba(255,90,90,.35); }
details summary { cursor: pointer; list-style: none; } details summary::-webkit-details-marker { display: none; }
.dlv-box summary::after { content: ' ▾'; color: var(--muted); }
.osub { color: var(--muted); font-size: 12px; margin-top: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------- Трекинг Европочты ---------------- */
.track-card { overflow: hidden; }
.ep-logo { font-family: var(--display); font-weight: 900; font-size: 13px; letter-spacing: .14em; color: #000; background: var(--metal); padding: 6px 10px; border-radius: 9px; box-shadow: 0 3px 0 #555; }
.track-num { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: .06em; margin: 14px 0 10px; cursor: pointer; }
.track-num small { font-family: var(--body); font-size: 11px; color: var(--muted); letter-spacing: 0; font-weight: 600; margin-left: 6px; }
.track-stage { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; }
.track-stage .beam { width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 5px rgba(255,255,255,.12), 0 0 18px #fff; animation: beacon 1.8s infinite; }
.track-stage.ok .beam { animation: none; }
.track-stage.bad { color: #ff9a9a; } .track-stage.bad .beam { background: #ff6b6b; box-shadow: 0 0 12px #ff6b6b; animation: none; }
.track-office { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.07); border: 1px solid var(--line); font-weight: 700; font-size: 14px; line-height: 1.4; }
.track-sum { color: #cfcfcf; font-size: 13.5px; line-height: 1.5; margin: 10px 0 0; }
.track-events { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.track-events summary { font-weight: 700; font-size: 13px; color: #ddd; }
.track-events summary::after { content: ' ▾'; color: var(--muted); }
.tev { display: grid; grid-template-columns: 82px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px dashed rgba(255,255,255,.08); font-size: 12.5px; line-height: 1.45; }
.tev:last-child { border: 0; } .tev time { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------------- Встречи ---------------- */
.meet-when { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.meet-day { font-size: 30px; font-weight: 900; }
.place-list { display: grid; gap: 8px; }
.place { text-align: left; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.04); font-weight: 700; cursor: pointer; }
.place.on { background: var(--metal); color: #000; box-shadow: 0 3px 0 #555; }
.chip.day { text-transform: capitalize; }

/* ---------------- История / чек ---------------- */
.receipt-row { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 10px; cursor: pointer; }
.receipt-row .oimg { width: 52px; height: 52px; border-radius: 12px; overflow: hidden; flex: none; display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, #2b2b2b, #050505); border: 1px solid var(--line); font-size: 11px; }
.receipt-row .oimg img { width: 100%; height: 100%; object-fit: cover; }
.receipt { background: linear-gradient(170deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); }
.receipt-title { font-family: var(--display); font-weight: 900; letter-spacing: .3em; font-size: 13px; text-align: center; margin-bottom: 14px; }
.receipt-sep { height: 1px; margin: 14px 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.25) 0 6px, transparent 6px 12px); }

/* ---------------- Сторис: ряд кружков ---------------- */
.stories-row:empty { display: none; }
.stories { display: flex; gap: 14px; overflow-x: auto; padding: 6px 16px 4px; margin: 0 -16px 6px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story-bubble { flex: none; width: 74px; display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer; padding: 0; color: inherit; }
.story-bubble .ring { width: 70px; height: 70px; border-radius: 50%; padding: 3px; display: block;
  background: conic-gradient(from var(--a), #fff, #5a5a5a, #e9e9e9, #1a1a1a, #fff, #8a8a8a, #fff); animation: spin 3s linear infinite;
  box-shadow: 0 0 18px rgba(255,255,255,.25); transition: transform .15s; }
.story-bubble:active .ring { transform: scale(.94); }
.story-bubble.seen .ring { background: #3a3a3c; animation: none; box-shadow: none; }
.story-bubble .ava { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #0b0b0b; border: 3px solid #000; font-size: 15px; font-weight: 900; }
.story-bubble .ava img { width: 100%; height: 100%; object-fit: cover; }
.story-bubble small { font-size: 11.5px; font-weight: 700; max-width: 74px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #ddd; }
.story-bubble.seen small { color: var(--muted); }

/* ---------------- Сторис: просмотр ---------------- */
.sv { position: fixed; inset: 0; z-index: 90; background: #000; opacity: 0; transform: scale(.96); transition: opacity .22s, transform .22s; touch-action: none; user-select: none; -webkit-user-select: none; }
.sv.open { opacity: 1; transform: none; }
.sv-bars { position: absolute; z-index: 3; left: 10px; right: 10px; top: calc(10px + var(--tg-safe-top, 0px)); display: flex; gap: 4px; }
.sv-bars span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.28); overflow: hidden; }
.sv-bars i { display: block; height: 100%; width: 0; background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.8); }
@keyframes svfill { from { width: 0; } to { width: 100%; } }
.sv.paused .sv-bars i, .sv.loading .sv-bars i, .sv.paused .sv-ticker-track, .sv.loading .sv-ticker-track { animation-play-state: paused !important; }
.sv-head { position: absolute; z-index: 3; left: 12px; right: 12px; top: calc(22px + var(--tg-safe-top, 0px)); display: flex; align-items: center; gap: 10px; text-shadow: 0 1px 4px rgba(0,0,0,.7); }
.sv-head img { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); }
.sv-head b { display: block; font-size: 14px; } .sv-head small { color: rgba(255,255,255,.7); font-size: 12px; }
.sv-x { position: relative; z-index: 5; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; }
.sv-media { position: absolute; inset: 0; display: grid; place-items: center; }
.sv-media img { width: 100%; height: 100%; object-fit: cover; }
.sv-bg { position: absolute; inset: 0; background: radial-gradient(120% 80% at 30% 20%, #3a3a3a, #000 60%), #000; }
.sv-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(0,0,0,.55), transparent 22%, transparent 55%, rgba(0,0,0,.75)); }
.sv-text { position: absolute; z-index: 2; left: 20px; right: 20px; bottom: 150px; font-size: clamp(24px, 8vw, 38px); line-height: 1.1; text-shadow: 0 4px 24px rgba(0,0,0,.8); pointer-events: none; }
.sv-text .chrome-text { filter: drop-shadow(0 2px 0 #444) drop-shadow(0 6px 16px rgba(0,0,0,.9)); }
.sv-ticker { position: absolute; z-index: 2; left: 0; right: 0; bottom: calc(92px + var(--safe-b)); overflow: hidden; padding: 10px 0; background: rgba(255,255,255,.92); color: #000; transform: rotate(-2deg) scale(1.05); box-shadow: 0 10px 30px rgba(0,0,0,.6); pointer-events: none; }
.sv-ticker-track { display: inline-flex; gap: 22px; white-space: nowrap; font-family: var(--display); font-weight: 900; font-size: 16px; letter-spacing: .04em; text-transform: uppercase; will-change: transform; }
@keyframes svticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.sv-cta { position: absolute; z-index: 6; left: 20px; right: 20px; bottom: calc(26px + var(--safe-b)); display: flex; justify-content: center; }
.sv-cta .btn { min-width: 60%; }
.sv-tap { position: absolute; z-index: 4; left: 0; right: 0; top: calc(70px + var(--tg-safe-top, 0px)); bottom: calc(90px + var(--safe-b)); }
.sv.loading .sv-media::after { content: ''; position: absolute; width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: #fff; animation: rot 0.8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------------- Посты ---------------- */
.posts { display: grid; gap: 14px; }
.post { padding: 0; overflow: hidden; }
.post-img { position: relative; aspect-ratio: 4/3; background: #0b0b0b; border-bottom: 1px solid var(--line); }
.post-img img { width: 100%; height: 100%; object-fit: cover; }
.post-body { padding: 14px 16px 16px; }
.post-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.post-meta img { width: 24px; height: 24px; border-radius: 50%; }
.post-meta b { color: #fff; }
.post-title { font-family: var(--display); font-size: 17px; line-height: 1.25; margin: 10px 0 4px; }
.post-text { margin: 6px 0 0; color: #d6d6d6; font-size: 14.5px; line-height: 1.55; white-space: pre-line; cursor: pointer; }
.post-text.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------------- Админ: контент ---------------- */
.story-thumb { width: 52px; height: 74px; border-radius: 10px; overflow: hidden; flex: none; background: #111; display: grid; place-items: center; border: 1px solid var(--line); font-size: 10px; }
.story-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mini-btns { display: flex; flex-direction: column; gap: 4px; }
.mini-btns button { width: 30px; height: 26px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.05); cursor: pointer; font-size: 12px; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type=range] { flex: 1; accent-color: #fff; }

/* ---------------- Таббар ---------------- */
.tabbar {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: calc(12px + var(--safe-b)); width: min(calc(100% - 24px), 560px);
  display: flex; padding: 6px; gap: 4px; border-radius: 24px;
  background: rgba(14,14,16,.78); border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255,255,255,.1) inset, 0 20px 40px rgba(0,0,0,.9);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px 7px; border-radius: 18px; color: var(--muted); font-size: 10.5px; font-weight: 700; transition: .25s; }
.tabbar a i { font-style: normal; font-size: 18px; line-height: 1; }
.tabbar a.on { color: #000; background: var(--metal); box-shadow: 0 1px 0 #fff inset, 0 3px 0 #5a5a5a, 0 8px 18px -4px rgba(255,255,255,.35); transform: translateY(-2px); }
.admin-only { display: none !important; }
body.is-admin .admin-only { display: flex !important; }

/* ---------------- Тост, сплэш ---------------- */
.toast { position: fixed; z-index: 80; left: 50%; top: calc(14px + var(--tg-safe-top, 0px)); transform: translate(-50%, -150%); padding: 12px 18px; border-radius: 16px; background: var(--metal); color: #000; font-weight: 800; font-size: 14px; box-shadow: 0 14px 30px rgba(0,0,0,.8); transition: transform .35s cubic-bezier(.2,.9,.25,1.2); max-width: calc(100% - 32px); text-align: center; }
.toast.show { transform: translate(-50%, 0); }
.toast.err { background: #ffb4b4; }
/* ---------------- Интро: ламповый ТВ в тёмной комнате ---------------- */
.intro { position: fixed; inset: 0; z-index: 100; background: #000; overflow: hidden; display: grid; place-items: center; cursor: pointer; --glow: 0; }
.intro.gone { opacity: 0; visibility: hidden; transition: opacity .55s ease-out, visibility .55s; }
.room { position: absolute; inset: 0;
  background:
    radial-gradient(60% 45% at 50% 48%, rgba(255,255,255,calc(var(--glow) * .10)), transparent 70%),
    linear-gradient(to bottom, #050505 0%, #0a0a0a 58%, #030303 58.4%, #070707 100%);
}
.room::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 50%, transparent 35%, rgba(0,0,0,.92) 80%); }
.tv-glow { position: absolute; left: 50%; top: 47%; width: 130vmin; height: 110vmin; transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(230,235,255,.48), rgba(200,205,220,.16) 45%, transparent 75%);
  opacity: var(--glow); filter: blur(6px); mix-blend-mode: screen; }
.tv { position: relative; z-index: 2; width: min(58vw, 250px); margin-top: -4vh; opacity: 0; animation: tvIn 1s .1s ease-out forwards; }
@keyframes tvIn { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.antenna { position: absolute; bottom: 100%; left: 50%; width: 2px; height: 46%; background: linear-gradient(#6a6a6a, #2a2a2a); transform-origin: bottom center; border-radius: 2px; }
.antenna::before { content: ''; position: absolute; top: -4px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #bbb, #333); }
.antenna.l { transform: translateX(-50%) rotate(-32deg); } .antenna.r { transform: translateX(-50%) rotate(26deg); height: 40%; }
.tv-body { position: relative; display: flex; gap: 6%; padding: 8% 7% 8% 8%; border-radius: 20px / 16px;
  background: linear-gradient(165deg, #2c2a28 0%, #151413 45%, #0b0a0a 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 -3px 6px rgba(0,0,0,.8), inset 0 0 0 1px rgba(255,255,255,.04),
              0 30px 50px -20px rgba(0,0,0,1), 0 0 calc(var(--glow) * 60px) rgba(255,255,255,calc(var(--glow) * .12)); }
.tv-body::before { content: ''; position: absolute; left: 50%; top: -6px; width: 22%; height: 8px; transform: translateX(-50%); border-radius: 6px 6px 0 0; background: #1b1a19; }
.tv-screen { position: relative; flex: 1; aspect-ratio: 4 / 3.2; border-radius: 16% / 20%; overflow: hidden; background: #050505;
  box-shadow: 0 0 0 3px #050505, 0 0 0 6px #262422, inset 0 0 18px rgba(0,0,0,.9); }
.crt { position: absolute; inset: 0; transform-origin: 50% 50%; }
.crt canvas { position: absolute; inset: 0; width: 100%; height: 100%; filter: contrast(1.25); }
.tv-logo { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; mix-blend-mode: screen; }
.tv-logo img { width: 92%; filter: contrast(1.4) brightness(1.15) blur(.3px); }
.tv-scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0,0,0,.45) 0 1px, transparent 1px 3px); }
.tv-roll { position: absolute; left: 0; right: 0; height: 35%; top: -35%; pointer-events: none; background: linear-gradient(transparent, rgba(255,255,255,.14), transparent); animation: tvRoll 1.3s linear infinite; }
@keyframes tvRoll { to { top: 100%; } }
.tv-glass { position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(120% 90% at 30% 15%, rgba(255,255,255,.16), transparent 40%), radial-gradient(100% 100% at 50% 50%, transparent 60%, rgba(0,0,0,.55) 100%); }
.tv-panel { width: 19%; display: flex; flex-direction: column; align-items: center; gap: 12%; padding-top: 4%; }
.knob { width: 78%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #8d8d8d, #3a3a3a 45%, #111 75%); box-shadow: 0 2px 4px rgba(0,0,0,.9), inset 0 -2px 2px rgba(0,0,0,.6); position: relative; }
.knob::after { content: ''; position: absolute; left: 47%; top: 12%; width: 6%; height: 30%; background: #ddd; border-radius: 2px; }
.knob.sm { width: 58%; }
.grill { width: 80%; flex: 1; min-height: 20px; border-radius: 3px; background: repeating-linear-gradient(0deg, #050505 0 2px, #222 2px 4px); }
.led { width: 9%; aspect-ratio: 1; border-radius: 50%; background: #3a0a0a; box-shadow: none; }
.led.on { background: #ff3b30; box-shadow: 0 0 6px #ff3b30, 0 0 12px rgba(255,59,48,.6); }
.tv-legs { display: flex; justify-content: space-between; padding: 0 16%; }
.tv-legs i { width: 6px; height: 14px; background: linear-gradient(#1c1b1a, #050505); }
.tv-legs i:first-child { transform: skewX(14deg); } .tv-legs i:last-child { transform: skewX(-14deg); }
.floor-reflect { position: absolute; z-index: 1; left: 50%; top: calc(50% + min(29vw, 125px)); width: min(70vw, 300px); height: 40px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255,255,255,calc(var(--glow) * .22)), transparent); filter: blur(8px); }
.intro-hint { position: absolute; bottom: calc(26px + var(--safe-b)); left: 0; right: 0; text-align: center; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.22); animation: tvIn 1s 1.2s both; }
/* выключение кинескопа: картинка схлопывается в линию, затем в точку */
.intro.off .crt { animation: crtOff .34s cubic-bezier(.6,0,.9,.4) forwards; }
.intro.off .tv-screen { background: #000; }
.intro.off .tv-roll, .intro.off .tv-scan { display: none; }
@keyframes crtOff {
  0%   { transform: scale(1, 1); filter: brightness(1.2); }
  55%  { transform: scale(1.04, .012); filter: brightness(6) saturate(0); }
  100% { transform: scale(0, .012); filter: brightness(10) saturate(0); }
}
.intro.off .crt::after { content: ''; position: absolute; inset: 0; background: #fff; animation: crtWhite .34s forwards; }
@keyframes crtWhite { 0% { opacity: 0; } 40% { opacity: .9; } 100% { opacity: 1; } }
/* вспышка расходится на весь экран */
.intro-flash { position: fixed; z-index: 5; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, #fff 0%, #fff 35%, rgba(255,255,255,.85) 55%, rgba(255,255,255,0) 72%); transform: scale(0); }
.intro.flash .intro-flash { opacity: 1; transform: scale(var(--flash-scale, 120)); transition: transform .42s cubic-bezier(.2,.7,.3,1), opacity .1s; }
.intro.flash .tv, .intro.flash .tv-glow, .intro.flash .room { filter: brightness(3); transition: filter .2s; }

/* ---------------- Производительность ---------------- */
/* Приложение свёрнуто — замораживаем все анимации (экономит батарею, нет «догоняющих» рывков при возврате) */
html.is-hidden *, html.is-hidden *::before, html.is-hidden *::after { animation-play-state: paused !important; }

/* Лёгкий режим для слабых телефонов (мало ядер/памяти, экономия трафика): без фоновых эффектов и бесконечных анимаций */
html.lite .bg-blob, html.lite .bg-grain, html.lite .bg-floor { display: none; }
html.lite .bg { background: #050505; }
html.lite .card { box-shadow: 0 1px 0 rgba(255,255,255,.07) inset, 0 6px 14px -8px rgba(0,0,0,.9); }
html.lite .tabbar { box-shadow: 0 6px 14px rgba(0,0,0,.7); }
html.lite .view > * { animation-duration: .25s; }
html.lite .hero-title .chrome-text, html.lite .topbar-title.chrome-text, html.lite .balance .chrome-text,
html.lite .btn-primary::after, html.lite .logo3d, html.lite .logo3d .shine, html.lite .coin3d,
html.lite .story-bubble .ring, html.lite .card.iri::before, html.lite .logo3d .rim, html.lite .progress > i, html.lite .tv-roll { animation: none !important; }
html.lite .chrome-text { animation: none; }
html.lite .logo3d .shine { display: none; }
html.lite .tilt { transition: none; }
html.lite .btn-primary { box-shadow: 0 1px 0 #fff inset, 0 3px 0 #6d6d6d; }

@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, 1fr); } .stats { grid-template-columns: repeat(4, 1fr); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
