/* Xenvora: чёрный фон, плоские графитовые плитки без рамок, белые акценты — как в Xenvora App */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(inter-cyrillic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(inter-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #000;
  --tile: #0f0f10;
  --tile-2: #19191b;
  --tile-3: #232326;
  --logo-bg: #151718;
  --line: rgba(255, 255, 255, 0.06);
  --text: #fff;
  --text-2: rgba(255, 255, 255, 0.62);
  --text-3: rgba(255, 255, 255, 0.4);
  --accent: #f2f2f4;
  --red: #ff453a;
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 18px;
  --pad: 14px;
  --safe-top: var(--tg-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 58px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring-pill: cubic-bezier(0.3, 1.35, 0.5, 1);
  --spring-knob: cubic-bezier(0.3, 1.4, 0.5, 1);
  --spring-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: dark;
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring-pill: linear(0, 0.024, 0.087, 0.174, 0.274, 0.379, 0.482, 0.58, 0.669, 0.748, 0.816, 0.873, 0.92, 0.957, 0.985, 1.006, 1.02, 1.03, 1.035, 1.038, 1.037, 1.036, 1.033, 1.029, 1.025, 1.021, 1.017, 1.014, 1.011, 1.008, 1.006, 1.004, 1);
    --spring-knob: linear(0, 0.037, 0.128, 0.249, 0.382, 0.514, 0.635, 0.741, 0.83, 0.901, 0.955, 0.995, 1.021, 1.038, 1.046, 1.048, 1.047, 1.042, 1.036, 1.03, 1.024, 1.018, 1.013, 1.008, 1.005, 1.002, 1, 0.999, 0.998, 0.998, 0.998, 0.998, 1);
    --spring-pop: linear(0, 0.041, 0.144, 0.284, 0.44, 0.594, 0.735, 0.856, 0.954, 1.027, 1.077, 1.107, 1.119, 1.119, 1.11, 1.095, 1.077, 1.058, 1.04, 1.024, 1.011, 1.001, 0.993, 0.989, 0.986, 0.985, 0.986, 0.988, 0.99, 0.992, 0.994, 0.996, 1);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); min-height: 100%; overscroll-behavior-y: none; }
body {
  font: 500 15px/1.4 'Inter Variable', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; outline: none; }
button:focus, button:focus-visible, a:focus { outline: none; }
input, textarea { -webkit-user-select: text; user-select: text; }
h1, h2, h3, p { margin: 0; }
.selectable { -webkit-user-select: text; user-select: text; }
.tap { touch-action: manipulation; }

/* ── каркас ─────────────────────────────────────────────── */
#app { position: relative; padding: calc(var(--safe-top) + 12px) var(--pad) calc(var(--safe-bottom) + 108px); max-width: 620px; margin: 0 auto; }
.view > * + * { margin-top: 10px; }
.h1 { font-size: 31px; line-height: 1.05; font-weight: 850; letter-spacing: -0.025em; }
.h1.top { margin: 8px 4px 14px; display: flex; align-items: center; gap: 10px; }
.view > .h1 { margin-top: 22px; margin-left: 4px; }
.view > .h1.top { margin-top: 8px; }
.h2 { font-size: 24px; line-height: 1.12; font-weight: 820; letter-spacing: -0.02em; }
.sub-title { color: var(--text-2); font-size: 13.5px; margin: 4px 4px 12px !important; }
.section { font-size: 13px; font-weight: 600; color: var(--text-3); margin: 20px 4px 10px !important; }
.t2 { color: var(--text-2); }
.t3 { color: var(--text-3); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }

/* ── плитки ─────────────────────────────────────────────── */
.card { position: relative; background: var(--tile); border-radius: var(--r-lg); }
.pad { padding: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

.stat { padding: 14px 16px; min-height: 100px; display: flex; flex-direction: column; overflow: hidden; }
.stat .k { font-size: 12.5px; color: var(--text-2); font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.stat .v { font-size: 26px; font-weight: 860; letter-spacing: -0.03em; margin-top: 6px; line-height: 1.15; overflow-wrap: anywhere; }
.stat .v small { font-size: 0.66em; color: var(--text-3); margin-left: 4px; font-weight: 860; }
.stat .h { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }

.tile { display: flex; flex-direction: column; gap: 10px; padding: 14px; min-height: 112px; width: 100%; text-align: left; overflow: hidden; isolation: isolate; }
.act::before { left: 0 !important; top: -30% !important; width: 100% !important; }
.tile::before, .act::before {
  content: ''; position: absolute; z-index: -1; left: -30%; top: -40%; width: 110%; height: 130%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(var(--glow, 255, 255, 255), 0.2), rgba(var(--glow, 255, 255, 255), 0) 62%);
  opacity: 0; transition: opacity 0.6s var(--ease);
}
.tile.lit::before, .act.lit::before { opacity: 1; }
.tile .top { display: flex; justify-content: space-between; align-items: flex-start; color: var(--text-3); }
.tile .title { display: block; font-size: 15px; font-weight: 760; letter-spacing: -0.01em; margin-top: auto; }
.tile .sub { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 1px; }

.act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 92px; padding: 12px 6px; width: 100%; font-size: 12.5px; font-weight: 680; letter-spacing: -0.01em; text-align: center; overflow: hidden; isolation: isolate; line-height: 1.15; }
.act.on { background: var(--tile-3); }

.list { background: var(--tile); border-radius: var(--r-lg); overflow: hidden; }
.list-row { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 11px 14px; text-align: left; }
.list-row + .list-row::before, .list-row + .form::before, .form + .list-row::before, .form + .form::before {
  content: ''; position: absolute; top: 0; left: 14px; right: 14px; height: 1px; background: var(--line);
}
.list-row + .list-row::before, .form + .list-row::before { left: 64px; }
.list-row .icon-wrap { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.05); flex: none; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { display: block; font-size: 15px; font-weight: 720; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.list-row .sub { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 1px; overflow-wrap: anywhere; }
.list-row .sub.one, .list-row .title.one { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.round-arrow { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: var(--text-2); flex: none; }
.form { position: relative; padding: 13px 14px; }
.form > label { display: block; color: var(--text-2); font-size: 13px; font-weight: 600; margin-bottom: 8px; }

.quote { position: relative; padding: 13px 14px 13px 20px; font-size: 14px; font-weight: 650; line-height: 1.45; }
.quote::before { content: ''; position: absolute; left: 9px; top: 12px; bottom: 12px; width: 3px; border-radius: 2px; background: #fff; opacity: 0.85; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 650; background: rgba(255, 255, 255, 0.08); color: var(--text-2); white-space: nowrap; }
.chip.lit { background: #f2f2f4; color: #000; }
.chip.red { background: rgba(255, 69, 58, 0.16); color: #ff8a82; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* ── шапка ──────────────────────────────────────────────── */
.hero { position: relative; height: 196px; border-radius: var(--r-xl); overflow: hidden; background: radial-gradient(90% 120% at 0% 0%, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 55%), var(--logo-bg); }
.hero.mini { height: auto; min-height: 124px; }
.contours { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0.9; }
.hero-cube { position: absolute; right: -6px; top: 10px; pointer-events: none; }
.logo-cube { position: relative; display: inline-block; flex: none; pointer-events: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent), linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent), linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
  mask-composite: intersect; }
.logo-cube img { display: block; width: 100%; height: 100%; object-fit: contain; }
.logo-cube.is-float { animation: float 7s ease-in-out infinite; will-change: transform; }
.logo-cube.is-glint::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.14) 50%, rgba(255, 255, 255, 0) 60%); transform: translateX(-130%); animation: glint 6.5s ease-in-out infinite; }
@keyframes glint { 0%, 60% { transform: translateX(-130%); } 85%, 100% { transform: translateX(130%); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-6px) rotate(-1.5deg); } }
.hero-content { position: absolute; inset: 0; padding: 20px; display: flex; flex-direction: column; z-index: 1; }
.hero.mini .hero-content { position: relative; inset: auto; min-height: 124px; }
.hero-name { font-size: 21px; font-weight: 850; letter-spacing: -0.02em; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8); }
.hero-status { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; font-weight: 650; color: var(--text-2); align-self: flex-start; }
.hero-status.off { color: #ff8a82; }
.hero-label { font-size: 11.5px; font-weight: 760; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); margin-top: auto; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8); }
.hero-balance { font-size: 42px; line-height: 1; font-weight: 880; letter-spacing: -0.035em; margin-top: 6px; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85); }
.hero-balance small { font-size: 0.42em; color: var(--text-2); margin-left: 6px; letter-spacing: -0.01em; }
.hero-avatar, .hero-plus { position: absolute; z-index: 2; border-radius: 50%; }
.hero-avatar { right: 18px; top: 18px; width: 40px; height: 40px; overflow: hidden; background: rgba(255, 255, 255, 0.08); display: grid; place-items: center; font-weight: 800; }
.hero-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-plus { right: 18px; bottom: 18px; width: 46px; height: 46px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.12); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ava { border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, #46464d, #18181b); }
.ava img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── поиск и пилюли ─────────────────────────────────────── */
.search { position: relative; display: flex; align-items: center; }
.search > .ic { position: absolute; left: 14px; color: var(--text-3); display: grid; pointer-events: none; z-index: 1; }
.search .input { padding-left: 40px; background: var(--tile); }
.search .hint { position: absolute; left: 40px; right: 14px; color: var(--text-3); pointer-events: none; white-space: nowrap; overflow: hidden; }
.search .hint::after { content: ''; display: inline-block; width: 1.5px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--text-2); animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.pills { display: flex; gap: 6px; overflow-x: auto; margin-left: calc(-1 * var(--pad)) !important; margin-right: calc(-1 * var(--pad)); padding: 2px var(--pad) 4px; scrollbar-width: none; overscroll-behavior-x: contain; }
.pills::-webkit-scrollbar { display: none; }
.pill { position: relative; flex: none; height: 42px; padding: 0 15px 0 12px; border-radius: 999px; font-size: 14.5px; font-weight: 760; letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 7px; background: var(--tile); }
.pill b { color: var(--text-3); font-weight: 760; }

/* ── формы ──────────────────────────────────────────────── */
.input { width: 100%; padding: 13px 14px; border-radius: 16px; border: 0; background: var(--tile-2); outline: 0; -webkit-appearance: none; appearance: none; font-weight: 550; transition: background 0.2s; }
.input:focus { background: var(--tile-3); }
.input::placeholder { color: var(--text-3); }
select.input option { color: #000; }
textarea.input { min-height: 92px; resize: none; display: block; line-height: 1.4; }
.three { display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: 8px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 18px; border-radius: 16px; font-size: 15.5px; font-weight: 760; letter-spacing: -0.01em; background: var(--accent); color: #000; width: 100%; }
.btn.ghost { background: var(--tile-3); color: #fff; }
.btn.danger { background: var(--red); color: #fff; }
.btn.sm { width: auto; min-height: 38px; padding: 8px 14px; font-size: 13.5px; border-radius: 13px; }
.btn[disabled] { opacity: 0.5; }
.mt { margin-top: 10px; }
.mt-6 { margin-top: 6px; }

.switch { position: relative; width: 51px; height: 31px; border-radius: 999px; background: rgba(120, 120, 128, 0.32); transition: background 0.25s var(--ease); flex: none; }
.switch i { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25); transition: transform 0.38s var(--spring-knob), background 0.2s; }
.switch.on { background: var(--accent); }
.switch.on i { transform: translateX(20px); background: #000; }

.seg { position: relative; display: flex; padding: 4px; border-radius: 16px; background: var(--tile-2); isolation: isolate; }
.view > .seg, .page-body > .seg { background: var(--tile); }
.seg-pill { position: absolute; z-index: -1; left: 4px; top: 4px; bottom: 4px; border-radius: 12px; background: rgba(255, 255, 255, 0.13); transition: transform 0.34s var(--spring-pill); }
.seg button { flex: 1; min-width: 0; white-space: nowrap; padding: 9px 4px; border-radius: 12px; font-size: 13.5px; font-weight: 700; letter-spacing: -0.01em; color: var(--text-2); transition: color 0.2s; }
.seg button.on { color: #fff; }

.choices { display: flex; flex-wrap: wrap; gap: 6px; }
.choice { padding: 9px 14px; border-radius: 13px; background: var(--tile-3); font-size: 13.5px; font-weight: 700; transition: background 0.2s, color 0.2s; }
.choice.on { background: var(--accent); color: #000; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--tile-3); font-size: 13px; font-weight: 650; max-width: 100%; overflow-wrap: anywhere; }
.tag button { color: var(--text-2); font-size: 15px; line-height: 1; }
.x-btn { color: var(--text-3); font-size: 22px; line-height: 1; padding: 6px; flex: none; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-3); text-align: center; padding: 26px 18px; font-size: 14px; font-weight: 600; }
.skeleton { position: relative; overflow: hidden; background: var(--tile); border-radius: var(--r-lg); height: 62px; }
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0)); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ── переписка и пойманное ──────────────────────────────── */
.bubbles { display: flex; flex-direction: column; gap: 6px; padding: 12px; }
.bubble { max-width: 84%; padding: 8px 12px; border-radius: 16px 16px 16px 6px; background: var(--tile-3); align-self: flex-start; text-align: left; font-size: 14.5px; line-height: 1.35; overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble.own { align-self: flex-end; background: var(--accent); color: #000; border-radius: 16px 16px 6px 16px; }
.bubble time { display: block; font-size: 10.5px; opacity: 0.55; margin-top: 2px; text-align: right; }
.bubble.media { font-style: italic; }
.caught { padding: 14px; }
.caught .head { display: flex; align-items: center; gap: 10px; }
.caught .head .grow { flex: 1; min-width: 0; }
.caught .who { font-size: 15px; font-weight: 720; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.caught .meta { font-size: 12px; color: var(--text-3); }
.q { position: relative; margin-top: 10px; padding: 9px 12px 9px 15px; border-radius: 13px; background: var(--tile-2); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; -webkit-user-select: text; user-select: text; }
.q::before { content: ''; position: absolute; left: 6px; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.7); }
.q.was { color: var(--text-2); }
.q .lb { display: block; font-size: 11px; font-weight: 700; color: var(--text-3); margin-bottom: 2px; }
.acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.media-box { margin-top: 10px; border-radius: 14px; overflow: hidden; background: var(--tile-2); }
.media-box img, .media-box video { display: block; width: 100%; max-height: 340px; object-fit: contain; background: #000; }
.media-box audio { display: block; width: 100%; }
.ring { position: relative; width: 74px; height: 74px; display: grid; place-items: center; flex: none; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring b { font-size: 17px; font-weight: 860; letter-spacing: -0.02em; }
.user-row .tags { display: flex; gap: 4px; flex-wrap: wrap; flex: none; justify-content: flex-end; max-width: 92px; }

/* ── нижнее меню ────────────────────────────────────────── */
.tabbar-wrap { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 28px 0 calc(12px + var(--safe-bottom)); display: flex; justify-content: center; gap: 10px; pointer-events: none; background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.82) 55%); transition: transform 0.4s var(--ease), opacity 0.25s var(--ease); }
.tabbar-wrap.is-hidden { transform: translateY(130px); opacity: 0; }
.tabbar { position: relative; pointer-events: auto; width: min(calc(var(--tab-n, 4) * 72px), calc(100% - 56px - var(--tabbar-h))); height: var(--tabbar-h); padding: 5px; border-radius: 999px; display: flex; gap: 2px; background: var(--tile); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.65); }
.tabbar-solo { flex: none; width: var(--tabbar-h); padding: 0; }
.tabbar-solo .tab { width: 100%; height: 100%; }
.tab { position: relative; flex: 1; border-radius: 999px; display: grid; place-items: center; min-height: 44px; }
.tab-pill { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.1); pointer-events: none; opacity: 0; transform: scale(0.8); transition: transform 0.33s var(--spring-pill), opacity 0.2s var(--ease); }
.tab-pill.is-on { opacity: 1; transform: none; }
.tab-pill-slide { inset: 5px auto 5px 5px; width: calc((100% - 10px - (var(--tab-n, 4) - 1) * 2px) / var(--tab-n, 4)); transform: translateX(calc(var(--tab-i, 0) * (100% + 2px))) scale(0.8); }
.tab-pill-slide.is-on { transform: translateX(calc(var(--tab-i, 0) * (100% + 2px))); }
.tab-icon { position: relative; display: grid; color: rgba(255, 255, 255, 0.92); }
.tab-icon svg { display: block; width: 23px; height: 23px; overflow: visible; }
.tabbar-solo .tab-icon svg { width: 25px; height: 25px; }
.tb { transform-box: fill-box; transform-origin: 50% 100%; }
.tab.is-active .tb { animation: tb-hop 0.62s ease-in-out both; }
.tab.is-active .tb-ant { animation: tb-ant 0.7s 0.1s ease-in-out both; transform-box: fill-box; transform-origin: 50% 100%; }
.tab.is-active .tb-draw { animation: tb-draw 0.55s 0.12s ease-out both; }
.tb-draw { stroke-dasharray: 14; stroke-dashoffset: 0; }
@keyframes tb-hop { 0% { transform: translateY(0) scale(1, 1); } 20% { transform: translateY(1px) scale(1.08, 0.9); } 45% { transform: translateY(-4px) scale(0.94, 1.08); } 70% { transform: translateY(0) scale(1.04, 0.96); } 100% { transform: translateY(0) scale(1, 1); } }
@keyframes tb-ant { 0%, 100% { transform: rotate(0deg); } 30% { transform: rotate(-16deg); } 65% { transform: rotate(12deg); } }
@keyframes tb-draw { from { stroke-dashoffset: 14; } to { stroke-dashoffset: 0; } }

/* ── страницы поверх и шторки ───────────────────────────── */
.stack-page { position: fixed; inset: 0; z-index: 15; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.page-body { padding: calc(var(--safe-top) + 12px) var(--pad) calc(var(--safe-bottom) + 30px); max-width: 620px; margin: 0 auto; }
.page-body > * + * { margin-top: 10px; }
.back { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 10px; border-radius: 999px; background: var(--tile); font-size: 14px; font-weight: 700; }
.sheet-bg { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, 0.62); }
.sheet { position: fixed; z-index: 31; left: 0; right: 0; bottom: 0; max-width: 620px; margin: 0 auto; max-height: 88vh; overflow-y: auto; background: #111113; border-radius: 26px 26px 0 0; padding: 0 16px calc(var(--safe-bottom) + 18px); overscroll-behavior: contain; }
.grab-zone { position: sticky; top: 0; z-index: 2; padding: 10px 0 12px; background: linear-gradient(#111113 70%, rgba(17, 17, 19, 0)); touch-action: none; }
.grab { width: 40px; height: 4px; border-radius: 4px; background: var(--tile-3); margin: 0 auto; }
.sheet h2 { font-size: 22px; font-weight: 820; letter-spacing: -0.02em; margin-bottom: 4px; }
.sheet .lead { color: var(--text-2); font-size: 14px; margin-bottom: 12px; }
.sheet .field { margin-top: 12px; }
.sheet .field > label { display: block; color: var(--text-2); font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.sheet .big-emoji { display: grid; place-items: center; padding: 4px 0 12px; }
.step { position: relative; display: flex; gap: 12px; padding: 12px 14px; align-items: center; }
.step + .step::before { content: ''; position: absolute; top: 0; left: 52px; right: 14px; height: 1px; background: var(--line); }
.step i { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #000; font-style: normal; font-weight: 820; font-size: 13.5px; display: grid; place-items: center; }
.cmd { position: relative; padding: 11px 14px; display: flex; gap: 11px; align-items: flex-start; }
.cmd + .cmd::before { content: ''; position: absolute; top: 0; left: 50px; right: 14px; height: 1px; background: var(--line); }
.cmd code { display: block; font: 700 13.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.cmd p { color: var(--text-2); font-size: 12.5px; margin-top: 2px; }
.calc-out { font-size: 34px; font-weight: 860; letter-spacing: -0.03em; min-height: 46px; margin-top: 10px; overflow-wrap: anywhere; }

/* ── мелочи ─────────────────────────────────────────────── */
#toast { position: fixed; z-index: 60; left: 50%; translate: -50% 0; top: calc(var(--safe-top) + 12px); width: max-content; max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 15px; background: #f2f2f4; color: #000; font-weight: 700; font-size: 14px; text-align: center; opacity: 0; pointer-events: none; transform: translateY(-14px); }
#toast.bad { background: var(--red); color: #fff; }
.gate { text-align: center; padding: 22vh 20px 0; }
.gate h1 { font-size: 22px; margin: 10px 0 6px; }
.gate p { color: var(--text-2); }
.em { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; vertical-align: middle; line-height: 1; }
.em > div, .em svg { width: 100% !important; height: 100% !important; display: block; }
.em img, .em video { width: 100%; height: 100%; object-fit: contain; display: block; }
.em > svg { animation: em-pop 0.5s var(--spring-pop) both; }
@keyframes em-pop { from { transform: scale(0.55); opacity: 0; } }
.em.fb { font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; }
.em.live { animation: emoji-live 3.6s ease-in-out infinite; animation-delay: var(--live, 0s); }
@keyframes emoji-live { 0%, 50%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); } 25% { transform: translate3d(0, -3%, 0) rotate(-7deg) scale(1.06); } 75% { transform: translate3d(0, 2%, 0) rotate(6deg) scale(0.97); } }
.spark { position: fixed; z-index: 70; width: 6px; height: 6px; border-radius: 50%; background: #fff; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .logo-cube.is-float, .logo-cube.is-glint::after, .em.live, .dot { animation: none; }
}
