/* ─── Лера · стили ─────────────────────────────────────────────────────── */
:root {
  --bg: #0b0b0c;
  --bg2: #121214;
  --card: #18181b;
  --card2: #1f1f23;
  --line: #2a2a2f;
  --ink: #efeae0;
  --mute: #8f897e;
  --dim: #5a5650;
  --acc: #d4ff3f;
  --acc-ink: #0b0b0c;
  --hot: #ff5a36;
  --love: #ff6fa5;
  --gold: #ffc64a;
  --sky: #7cc8ff;
  --r: 22px;
  --r-sm: 14px;
  --tab-h: 68px;
  --safe-b: max(env(safe-area-inset-bottom), 10px);
  --display: "Unbounded", system-ui, sans-serif;
  --body: "Onest", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
body {
  font: 15px/1.4 var(--body);
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
body::after { /* зерно */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 999; opacity: .06; mix-blend-mode: overlay;
  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='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; max-width: 100%; }
a { color: var(--acc); }
::selection { background: var(--acc); color: var(--acc-ink); }

/* ─── boot ─── */
.boot { height: 100vh; display: grid; place-content: center; gap: 18px; justify-items: center; }
.boot-mark { font: 900 44px/1 var(--display); letter-spacing: -.04em; }
.boot-mark i, .h1 i, .dot { color: var(--acc); font-style: normal; }
.boot-line { width: 120px; height: 2px; background: var(--line); overflow: hidden; position: relative; }
.boot-line::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--acc); animation: bootl 1s var(--ease) infinite; }
@keyframes bootl { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* ─── layout ─── */
#app { height: 100%; position: relative; }
.view { position: absolute; inset: 0 0 calc(var(--tab-h) + var(--safe-b)) 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.view.noscroll { overflow: hidden; display: flex; flex-direction: column; }
.pad { padding: 0 16px; }
.screen {
  position: fixed; inset: 0; z-index: 50; background: var(--bg);
  overflow-y: auto; overflow-x: hidden; animation: screenIn .32s var(--ease);
  padding-bottom: calc(var(--safe-b) + 12px);
}
.screen.flex { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 0; }
.screen.out { animation: screenOut .22s ease forwards; }
@keyframes screenIn { from { transform: translateX(28px); opacity: 0; } }
@keyframes screenOut { to { transform: translateX(28px); opacity: 0; } }

/* ─── header ─── */
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 18px 16px 12px; }
.top.sticky { position: sticky; top: 0; z-index: 5; background: linear-gradient(var(--bg) 70%, transparent); }
.h1 { font: 900 30px/.95 var(--display); letter-spacing: -.045em; margin: 0; text-transform: lowercase; }
.h2 { font: 700 19px/1.1 var(--display); letter-spacing: -.03em; margin: 0; }
.h3 { font: 600 16px/1.2 var(--body); margin: 0; }
.kicker { font: 700 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.kicker b { color: var(--acc); font-weight: 700; }
.muted { color: var(--mute); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stack > * + * { margin-top: 10px; }
.sp { height: 16px; }
.center { text-align: center; }

.backbar { display: flex; align-items: center; gap: 10px; padding: 14px 16px 6px; position: sticky; top: 0; background: var(--bg); z-index: 6; }
.backbar .h2 { flex: 1; min-width: 0; }

/* ─── buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 22px; border-radius: 999px;
  font: 700 13px/1 var(--display); letter-spacing: -.01em; text-transform: lowercase;
  background: var(--acc); color: var(--acc-ink);
  transition: transform .15s var(--ease), opacity .15s;
}
.btn:active { transform: scale(.96); }
.btn[disabled] { opacity: .35; pointer-events: none; }
.btn.wide { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.dark { background: var(--card2); color: var(--ink); }
.btn.hot { background: var(--hot); color: #fff; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 11.5px; }
.btn svg { width: 18px; height: 18px; }
.ibtn {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--card); color: var(--ink); position: relative; transition: transform .15s var(--ease);
}
.ibtn:active { transform: scale(.9); }
.ibtn svg { width: 20px; height: 20px; }
.ibtn .badge { position: absolute; top: -2px; right: -2px; }
.badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--love); color: #fff; font: 700 10px/18px var(--mono); text-align: center;
}

/* ─── chips / tags ─── */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px;
  font: 500 13px/1 var(--body); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); white-space: nowrap;
  transition: background .15s, color .15s, box-shadow .15s;
}
.chip svg { width: 14px; height: 14px; }
.chip.on { background: var(--ink); color: var(--bg); box-shadow: none; }
.chip.acc { background: var(--acc); color: var(--acc-ink); box-shadow: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px;
  font: 700 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  background: rgba(239, 234, 224, .08); color: var(--ink);
}
.tag.acc { background: var(--acc); color: var(--acc-ink); }
.tag.love { background: var(--love); color: #fff; }
.tag.gold { background: var(--gold); color: #1a1200; }
.tag.on-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 8px var(--acc); }

.seg { display: flex; background: var(--card); border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { flex: 1; height: 36px; border-radius: 999px; font: 600 13px/1 var(--body); color: var(--mute); position: relative; }
.seg button.on { background: var(--ink); color: var(--bg); }
.seg .badge { position: absolute; top: 2px; right: 6px; }

/* ─── cards ─── */
.card { background: var(--card); border-radius: var(--r); padding: 16px; }
.card.line { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.list > * + * { border-top: 1px solid var(--line); }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.empty { padding: 48px 24px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.empty .h2 { max-width: 260px; }

/* ─── avatar + frames ─── */
.av { --s: 44px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; position: relative; padding: 0; }
.av > .in {
  width: 100%; height: 100%; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: var(--card2); font: 700 calc(var(--s) * .38)/1 var(--display); color: var(--bg);
}
.av > .in img { width: 100%; height: 100%; object-fit: cover; }
.av .on { position: absolute; right: 0; bottom: 0; width: 28%; height: 28%; border-radius: 50%; background: var(--acc); border: 2px solid var(--bg); }
.av[class*="frame_"] { padding: max(2.5px, calc(var(--s) * .06)); }
.av[class*="frame_"] > .in { box-shadow: 0 0 0 2px var(--bg); }
.frame_dash { outline: 2px dashed var(--ink); outline-offset: -1px; }
.frame_ice { background: linear-gradient(135deg, #e8fbff, #7cc8ff 50%, #3a7bd5); box-shadow: 0 0 14px #7cc8ff66; }
.frame_neon { background: var(--acc); box-shadow: 0 0 6px var(--acc), 0 0 18px color-mix(in srgb, var(--acc) 60%, transparent); animation: neon 2.4s ease-in-out infinite; }
@keyframes neon { 50% { box-shadow: 0 0 2px var(--acc), 0 0 8px color-mix(in srgb, var(--acc) 30%, transparent); } }
.frame_sakura { background: conic-gradient(#ffd1e3, #ff6fa5, #ffe8f1, #ff9cc4, #ffd1e3); }
.frame_ember { background: conic-gradient(from var(--a, 0deg), #ff3d00, #ffb300, #ff5a36, #6b0f00, #ff3d00); animation: spin 3s linear infinite; }
.frame_gold { background: conic-gradient(#fff2b3, #ffc64a, #a8771b, #ffe58a, #c99320, #fff2b3); box-shadow: 0 0 12px #ffc64a55; }
.frame_glitch { background: linear-gradient(90deg, #00f0ff, #ff00c8); animation: glitch 1.6s steps(2) infinite; }
.frame_crown { background: conic-gradient(#ffe58a, #ffc64a, #fff, #ffc64a, #ffe58a); box-shadow: 0 0 16px #ffc64a77; }
.frame_crown::after { content: "♛"; position: absolute; top: calc(var(--s) * -.3); left: 50%; transform: translateX(-50%) rotate(-8deg); color: var(--gold); font-size: calc(var(--s) * .34); text-shadow: 0 2px 0 var(--bg); }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --a: 360deg; } }
@keyframes glitch {
  0%, 100% { box-shadow: -2px 0 #00f0ff, 2px 0 #ff00c8; }
  50% { box-shadow: 2px 1px #00f0ff, -2px -1px #ff00c8; }
}

/* name colors */
.color_lime { color: #d4ff3f !important; }
.color_coral { color: #ff7a59 !important; }
.color_sky { color: #7cc8ff !important; }
.color_rainbow {
  background: linear-gradient(90deg, #ff6fa5, #ffc64a, #d4ff3f, #7cc8ff, #b48cff, #ff6fa5) 0 0 / 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent !important; animation: rainbow 4s linear infinite;
}
@keyframes rainbow { to { background-position: 200% 0; } }

/* banners */
.banner_none { background: radial-gradient(120% 90% at 100% 0, color-mix(in srgb, var(--acc) 22%, transparent), transparent 60%), var(--bg2); }
.banner_grid { background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 22px 22px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 22px 22px, var(--bg2); }
.banner_dusk { background: linear-gradient(160deg, #2b1055 0%, #d53369 60%, #ffb36b 100%); }
.banner_toxic { background: repeating-linear-gradient(-45deg, #d4ff3f 0 14px, #0b0b0c 14px 28px); }
.banner_aurora { background: linear-gradient(120deg, #00c9a7, #845ec2, #ff6fa5, #00c9a7) 0 0 / 300% 300%; animation: rainbow 8s linear infinite; }

/* ─── tabbar ─── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--tab-h) + var(--safe-b)); padding: 8px 10px var(--safe-b);
  background: var(--bg); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 16px;
  color: var(--dim); font: 600 10.5px/1 var(--body); position: relative; transition: color .2s;
}
.tab svg { width: 22px; height: 22px; transition: transform .25s var(--ease); }
.tab.on { color: var(--ink); }
.tab.on svg { transform: translateY(-1px); color: var(--acc); }
.tab.on::before { content: ""; position: absolute; top: -9px; width: 22px; height: 3px; border-radius: 0 0 3px 3px; background: var(--acc); }
.tab .badge { position: absolute; top: 4px; left: calc(50% + 6px); }

/* ─── duet ─── */
.deck { position: relative; flex: 1; margin: 0 12px; min-height: 0; }
.swipe {
  position: absolute; inset: 0; border-radius: 28px; overflow: hidden; background: var(--card);
  touch-action: none; user-select: none; will-change: transform; cursor: grab;
  box-shadow: 0 20px 50px -20px #000;
}
.swipe.behind { transform: scale(.95) translateY(10px); filter: brightness(.6); transition: transform .3s var(--ease), filter .3s; }
.swipe .ph { position: absolute; inset: 0; }
.swipe .ph img { width: 100%; height: 100%; object-fit: cover; }
.swipe .gen { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.swipe .gen b { font: 900 46vw/1 var(--display); letter-spacing: -.08em; color: rgba(0, 0, 0, .18); transform: rotate(-8deg); }
.swipe .bars { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 4px; z-index: 3; }
.swipe .bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .3); }
.swipe .bars i.on { background: #fff; }
.swipe .shade { position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgba(8, 8, 9, .55) 60%, rgba(8, 8, 9, .96)); }
.swipe .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px; z-index: 2; }
.swipe .nm { font: 900 30px/1 var(--display); letter-spacing: -.04em; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.swipe .nm .age { font: 500 22px/1 var(--body); color: rgba(239, 234, 224, .7); letter-spacing: 0; }
.swipe .about { margin-top: 10px; color: rgba(239, 234, 224, .85); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.swipe.open .about { -webkit-line-clamp: 8; }
.swipe .more { display: none; margin-top: 12px; }
.swipe.open .more { display: block; }
.vibe {
  position: absolute; top: 24px; right: 14px; z-index: 3; width: 70px; height: 70px; border-radius: 50%;
  display: grid; place-content: center; text-align: center; background: var(--bg); color: var(--ink);
  transform: rotate(8deg); box-shadow: 0 0 0 2px var(--acc);
}
.vibe b { font: 900 24px/1 var(--display); letter-spacing: -.04em; color: var(--acc); }
.vibe small { font: 700 8.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; margin-top: 3px; }
.stamp {
  position: absolute; top: 46px; z-index: 4; padding: 6px 14px; border: 4px solid; border-radius: 10px;
  font: 900 34px/1 var(--display); letter-spacing: -.03em; opacity: 0; pointer-events: none; text-transform: uppercase;
}
.stamp.go { left: 18px; color: var(--acc); transform: rotate(-14deg); }
.stamp.no { right: 18px; color: var(--hot); transform: rotate(14deg); }
.stamp.sup { left: 50%; top: auto; bottom: 40%; color: var(--gold); transform: translateX(-50%) rotate(-6deg); }
.actions { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 14px 0 12px; }
.act { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: var(--card); transition: transform .15s var(--ease); }
.act:active { transform: scale(.88); }
.act svg { width: 28px; height: 28px; }
.act.no { color: var(--hot); }
.act.go { width: 72px; height: 72px; background: var(--acc); color: var(--acc-ink); }
.act.go svg { width: 32px; height: 32px; }
.act.sup { color: var(--gold); width: 52px; height: 52px; position: relative; }
.act.sup svg, .act.undo svg { width: 22px; height: 22px; }
.act.undo { width: 46px; height: 46px; color: var(--mute); }
.act.sup .badge { position: absolute; top: -3px; right: -3px; background: var(--gold); color: #1a1200; }

.likes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 4px 16px 20px; }
.lk { position: relative; aspect-ratio: 3/4; border-radius: 20px; overflow: hidden; background: var(--card); text-align: left; }
.lk img, .lk .gen { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lk .gen { display: grid; place-items: center; font: 900 64px/1 var(--display); color: rgba(0, 0, 0, .2); }
.lk .shade { position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(8, 8, 9, .95)); }
.lk .t { position: absolute; left: 12px; right: 12px; bottom: 12px; }
.lk .t b { font: 700 16px/1.1 var(--display); letter-spacing: -.03em; display: block; }
.lk .tag { position: absolute; top: 10px; left: 10px; }

/* match overlay */
.match {
  position: fixed; inset: 0; z-index: 90; background: rgba(8, 8, 9, .96); display: grid; place-content: center; gap: 26px;
  justify-items: center; padding: 24px; text-align: center; animation: fade .3s;
}
.match .word { font: 900 min(26vw, 120px)/.85 var(--display); letter-spacing: -.07em; color: var(--acc); animation: pop .6s var(--ease); }
.match .pair { display: flex; }
.match .pair .av { --s: 108px; }
.match .pair .av:last-child { margin-left: -22px; transform: rotate(6deg); }
.match .pair .av:first-child { transform: rotate(-6deg); }
@keyframes pop { 0% { transform: scale(.3) rotate(-12deg); opacity: 0; } 60% { transform: scale(1.08) rotate(2deg); opacity: 1; } }
@keyframes fade { from { opacity: 0; } }

/* lera bubble */
.lera { display: flex; gap: 10px; align-items: flex-start; text-align: left; max-width: 340px; }
.lera .face {
  width: 38px; height: 38px; border-radius: 12px; flex: none; background: var(--acc); color: var(--acc-ink);
  display: grid; place-items: center; font: 900 17px/1 var(--display); transform: rotate(-6deg); overflow: hidden;
}
.lera .face img { width: 100%; height: 100%; object-fit: cover; }
.lera .bub { background: var(--card2); padding: 10px 14px; border-radius: 4px 16px 16px 16px; font-size: 14px; }

/* ─── squads ─── */
.sq { display: grid; grid-template-columns: 34px 1fr; background: var(--card); border-radius: var(--r); overflow: hidden; }
.sq .side {
  writing-mode: vertical-rl; transform: rotate(180deg); display: grid; place-items: center;
  font: 700 10px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--acc-ink); background: var(--acc);
}
.sq .side.normal { background: var(--sky); }
.sq .side.fun { background: var(--love); color: #fff; }
.sq .side.tourney { background: var(--gold); }
.sq .body { padding: 14px 14px 14px 16px; border-left: 1px dashed var(--line); }
.slots { display: flex; gap: 6px; margin-top: 12px; align-items: center; }
.slots .av { --s: 34px; }
.slot-empty { width: 34px; height: 34px; border-radius: 50%; border: 1.5px dashed var(--dim); display: grid; place-items: center; color: var(--dim); }
.slot-empty svg { width: 14px; height: 14px; }
.fab {
  position: fixed; right: 16px; bottom: calc(var(--tab-h) + var(--safe-b) + 14px); z-index: 30;
  height: 56px; padding: 0 22px 0 18px; border-radius: 999px; background: var(--acc); color: var(--acc-ink);
  display: flex; align-items: center; gap: 8px; font: 700 13px/1 var(--display); text-transform: lowercase;
  box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--acc) 60%, transparent);
}
.fab svg { width: 22px; height: 22px; }

/* ─── chat ─── */
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
.msgs { flex: 1; overflow-y: auto; padding: 16px 12px 8px; display: flex; flex-direction: column; gap: 4px; }
.msg { max-width: 80%; padding: 9px 13px; border-radius: 18px; background: var(--card2); align-self: flex-start; word-wrap: break-word; white-space: pre-wrap; animation: msgIn .25s var(--ease); }
.msg.me { align-self: flex-end; background: var(--acc); color: var(--acc-ink); border-bottom-right-radius: 6px; }
.msg:not(.me) { border-bottom-left-radius: 6px; }
.msg time { display: block; font: 500 10px/1 var(--mono); opacity: .5; margin-top: 4px; text-align: right; }
.msg-group { display: flex; gap: 8px; align-items: flex-end; align-self: flex-start; max-width: 88%; }
.msg-group .av { --s: 30px; }
.msg-group .msg { max-width: 100%; }
.msg .who { font: 700 12px/1 var(--body); margin-bottom: 4px; color: var(--acc); }
.day-sep { align-self: center; margin: 10px 0; }
@keyframes msgIn { from { transform: translateY(8px); opacity: 0; } }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px calc(var(--safe-b)); border-top: 1px solid var(--line); background: var(--bg); }
.composer textarea {
  flex: 1; resize: none; min-height: 44px; max-height: 120px; padding: 12px 16px; border-radius: 22px;
  background: var(--card); border: 0; outline: none; line-height: 1.3;
}
.composer .ibtn.send { background: var(--acc); color: var(--acc-ink); width: 44px; height: 44px; }
.ice { display: flex; gap: 6px; overflow-x: auto; padding: 0 12px 10px; scrollbar-width: none; }
.ice::-webkit-scrollbar { display: none; }
.read-mark { align-self: flex-end; font: 500 10px/1 var(--mono); color: var(--mute); margin: 2px 4px 0; }

.new-matches { display: flex; gap: 14px; overflow-x: auto; padding: 4px 16px 16px; scrollbar-width: none; }
.new-matches::-webkit-scrollbar { display: none; }
.new-matches button { display: grid; justify-items: center; gap: 6px; width: 68px; font-size: 12px; }
.new-matches .av { --s: 64px; }

/* ─── feed ─── */
.post { padding: 16px; border-bottom: 1px solid var(--line); }
.post .txt { margin: 10px 0 0; white-space: pre-wrap; word-wrap: break-word; font-size: 15px; }
.post .img { margin-top: 12px; border-radius: 18px; overflow: hidden; background: var(--card); }
.post .img img { width: 100%; max-height: 420px; object-fit: cover; }
.post .bar { display: flex; gap: 18px; margin-top: 12px; color: var(--mute); }
.post .bar button { display: flex; align-items: center; gap: 6px; font: 600 13px/1 var(--mono); }
.post .bar svg { width: 19px; height: 19px; }
.post .bar .liked { color: var(--love); }
.post .bar .liked svg { fill: currentColor; animation: pop .4s var(--ease); }
.compose-card { margin: 0 16px 6px; display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--card); border-radius: var(--r); color: var(--mute); width: calc(100% - 32px); text-align: left; }
.compose-card .av { --s: 36px; }

/* ─── forms / sheet ─── */
.sheet-wrap { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .6); animation: fade .2s; display: flex; align-items: flex-end; }
.sheet {
  width: 100%; max-height: 92vh; overflow-y: auto; background: var(--bg2); border-radius: 26px 26px 0 0;
  padding: 10px 16px calc(var(--safe-b) + 16px); animation: up .32s var(--ease);
}
.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 14px; }
.sheet-wrap.out { animation: fade .2s reverse forwards; }
.sheet-wrap.out .sheet { animation: up .2s reverse forwards; }
@keyframes up { from { transform: translateY(100%); } }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field > label, .field > .lbl { font: 700 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.input {
  width: 100%; height: 50px; padding: 0 16px; border-radius: var(--r-sm); background: var(--card); border: 1.5px solid transparent;
  outline: none; transition: border-color .15s;
}
textarea.input { height: auto; min-height: 96px; padding: 14px 16px; resize: vertical; }
.input:focus { border-color: var(--acc); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--card); border-radius: var(--r-sm); }
.sw { width: 48px; height: 28px; border-radius: 14px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); transition: transform .2s var(--ease); }
.sw.on { background: var(--acc); }
.sw.on::after { transform: translateX(20px); background: var(--acc-ink); }
.photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.photo-slot { aspect-ratio: 3/4; border-radius: 14px; background: var(--card); display: grid; place-items: center; position: relative; overflow: hidden; color: var(--dim); border: 1.5px dashed var(--line); }
.photo-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-slot .x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .7); color: #fff; display: grid; place-items: center; }
.photo-slot .x svg { width: 12px; height: 12px; }
.photo-slot .first { position: absolute; left: 4px; bottom: 4px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 36px; height: 36px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25); }
.swatch.on { outline: 2px solid var(--ink); outline-offset: 3px; }
.range2 { display: flex; gap: 10px; align-items: center; }
.range2 .input { text-align: center; }

/* ─── profile ─── */
.p-head { position: relative; padding: 0 16px; }
.p-banner { height: 132px; margin: 0 -16px; position: relative; overflow: hidden; }
.p-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, var(--bg)); }
.p-id { display: flex; align-items: flex-end; gap: 14px; margin-top: -52px; position: relative; z-index: 2; }
.p-id .av { --s: 96px; }
.p-name { font: 900 26px/1 var(--display); letter-spacing: -.04em; margin: 0; word-break: break-word; }
.lvl { margin-top: 16px; }
.lvl .track { height: 6px; border-radius: 3px; background: var(--card2); overflow: hidden; margin-top: 8px; }
.lvl .track i { display: block; height: 100%; background: var(--acc); border-radius: 3px; transition: width .6s var(--ease); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.stat { background: var(--card); border-radius: var(--r-sm); padding: 12px; }
.stat b { display: block; font: 700 20px/1 var(--display); letter-spacing: -.03em; margin-bottom: 6px; }
.daily { margin: 16px 16px 0; background: var(--acc); color: var(--acc-ink); border-radius: var(--r); padding: 16px; position: relative; overflow: hidden; }
.daily .kicker { color: rgba(11, 11, 12, .6); }
.daily .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin: 14px 0; }
.daily .days i { height: 34px; border-radius: 9px; background: rgba(11, 11, 12, .12); display: grid; place-items: center; font: 700 11px/1 var(--mono); font-style: normal; }
.daily .days i.done { background: var(--acc-ink); color: var(--acc); }
.daily .days i.next { box-shadow: inset 0 0 0 2px var(--acc-ink); }
.daily .btn { background: var(--acc-ink); color: var(--acc); }
.daily.done { background: var(--card); color: var(--ink); }
.daily.done .kicker { color: var(--mute); }
.daily.done .days i { background: var(--card2); }
.daily.done .days i.done { background: var(--acc); color: var(--acc-ink); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 16px; }
.tile { background: var(--card); border-radius: var(--r); padding: 14px; min-height: 104px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; position: relative; overflow: hidden; transition: transform .15s var(--ease); }
.tile:active { transform: scale(.97); }
.tile svg { width: 24px; height: 24px; }
.tile b { font: 700 14px/1.15 var(--display); letter-spacing: -.02em; }
.tile .sub { font-size: 12px; color: var(--mute); margin-top: 4px; }
.tile.wide { grid-column: span 2; min-height: 0; flex-direction: row; align-items: center; gap: 14px; }
.tile.acc { background: var(--acc); color: var(--acc-ink); }
.tile.acc .sub { color: rgba(11, 11, 12, .6); }
.tile.gold { background: linear-gradient(135deg, #ffe58a, #ffc64a 60%, #e89b1c); color: #1a1200; }
.tile.gold .sub { color: rgba(26, 18, 0, .65); }
.tile .badge { position: absolute; top: 12px; right: 12px; }

/* ─── shop / gacha / items ─── */
.items { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 16px 20px; }
.item { background: var(--card); border-radius: var(--r); padding: 12px; display: grid; gap: 10px; text-align: left; position: relative; }
.item .pv { height: 92px; border-radius: 14px; background: var(--bg2); display: grid; place-items: center; overflow: hidden; }
.item .pv .av { --s: 56px; }
.item .pv .nm { font: 900 18px/1 var(--display); letter-spacing: -.03em; }
.item .pv .pv-banner { position: absolute; inset: 0; }
.item .name { font: 600 14px/1.2 var(--body); }
.item.eq { box-shadow: inset 0 0 0 2px var(--acc); }
.r-common { --rc: #a8a297; }
.r-rare { --rc: #7cc8ff; }
.r-epic { --rc: #b48cff; }
.r-legendary { --rc: #ffc64a; }
.rar { font: 700 9.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--rc); }
.item .rbar { position: absolute; left: 12px; right: 12px; top: 12px; height: 92px; border-radius: 14px; box-shadow: inset 0 -3px 0 var(--rc); pointer-events: none; }
.coin { display: inline-flex; align-items: center; gap: 5px; font: 700 13px/1 var(--mono); }
.coin::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: inset -2px -2px 0 #c8901c; }

.machine { margin: 0 16px; border-radius: 28px; padding: 22px 18px; background: var(--card); position: relative; overflow: hidden; }
.machine .orb {
  width: 156px; height: 156px; margin: 8px auto 20px; border-radius: 50%; position: relative;
  background: radial-gradient(circle at 35% 30%, #fff8, transparent 30%), conic-gradient(from var(--a, 0deg), var(--acc), #7cc8ff, #b48cff, #ff6fa5, #ffc64a, var(--acc));
  animation: spin 6s linear infinite; box-shadow: 0 0 60px -10px color-mix(in srgb, var(--acc) 60%, transparent);
}
.machine .orb::after { content: "?"; position: absolute; inset: 22px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font: 900 54px/1 var(--display); color: var(--ink); }
.machine.rolling .orb { animation-duration: .5s; }
.pity { margin: 6px 0 18px; }
.pity .track { height: 8px; border-radius: 4px; background: var(--bg2); overflow: hidden; margin-top: 8px; }
.pity .track i { display: block; height: 100%; background: linear-gradient(90deg, #b48cff, var(--gold)); }
.rates { display: flex; justify-content: space-between; margin-top: 16px; }
.rates div { text-align: center; }
.rates b { display: block; font: 700 14px/1 var(--mono); margin-bottom: 4px; }
.reveal { position: fixed; inset: 0; z-index: 85; background: rgba(8, 8, 9, .97); display: flex; flex-direction: column; justify-content: center; padding: 24px 16px; gap: 20px; animation: fade .2s; }
.reveal.flash::before { content: ""; position: fixed; inset: 0; background: var(--gold); animation: flash .9s ease-out forwards; pointer-events: none; }
@keyframes flash { from { opacity: .9; } to { opacity: 0; } }
.reveal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.reveal-grid.one { grid-template-columns: minmax(0, 220px); justify-content: center; }
.rv { aspect-ratio: 3/4; border-radius: 16px; perspective: 600px; }
.rv .fl { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform .6s var(--ease); }
.rv.open .fl { transform: rotateY(180deg); }
.rv .fr, .rv .bk { position: absolute; inset: 0; border-radius: 16px; backface-visibility: hidden; display: grid; place-items: center; text-align: center; padding: 10px; }
.rv .bk { background: var(--card2); box-shadow: inset 0 0 0 1.5px var(--line); font: 900 28px/1 var(--display); color: var(--dim); }
.rv .fr { transform: rotateY(180deg); background: var(--card); box-shadow: inset 0 0 0 2px var(--rc), 0 0 24px -6px var(--rc); align-content: center; gap: 8px; }
.rv .fr .av { --s: 48px; margin: 0 auto; }
.rv .fr b { font: 700 12.5px/1.15 var(--display); letter-spacing: -.02em; }
.rv .fr .dup { font: 600 10px/1 var(--mono); color: var(--mute); }

/* ─── leaderboard ─── */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; padding: 10px 16px 18px; }
.pod { text-align: center; display: grid; justify-items: center; gap: 8px; }
.pod .av { --s: 60px; }
.pod.p1 .av { --s: 78px; }
.pod .base { width: 100%; border-radius: 14px 14px 4px 4px; background: var(--card); padding: 10px 4px; }
.pod.p1 .base { background: var(--acc); color: var(--acc-ink); padding-top: 22px; }
.pod .base b { font: 900 22px/1 var(--display); display: block; }
.pod .nm { font: 600 13px/1.1 var(--body); max-width: 100%; }
.rank-n { width: 28px; font: 700 13px/1 var(--mono); color: var(--mute); text-align: center; flex: none; }
.li.me { background: color-mix(in srgb, var(--acc) 10%, transparent); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }

/* ─── quests ─── */
.quest { display: flex; gap: 12px; align-items: center; padding: 14px; background: var(--card); border-radius: var(--r-sm); }
.quest .ring { --p: 0; width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--acc) calc(var(--p) * 1%), var(--card2) 0); }
.quest .ring span { width: 34px; height: 34px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font: 700 10.5px/1 var(--mono); }
.quest.done { opacity: .45; }

/* ─── wiki ─── */
.hero-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.hero-glyph { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font: 900 15px/1 var(--display); color: var(--bg); flex: none; letter-spacing: -.04em; }

/* ─── premium ─── */
.prem-hero { margin: 0 16px; border-radius: 28px; padding: 28px 20px; background: #0b0b0c; position: relative; overflow: hidden; box-shadow: inset 0 0 0 1.5px #ffc64a55; }
.prem-hero::before { content: ""; position: absolute; width: 300px; height: 300px; right: -120px; top: -140px; border-radius: 50%; background: radial-gradient(#ffc64a55, transparent 65%); }
.prem-hero .big { font: 900 44px/.9 var(--display); letter-spacing: -.06em; color: var(--gold); position: relative; }
.perk { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; }
.perk .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--card); display: grid; place-items: center; color: var(--gold); flex: none; }
.perk .ic svg { width: 20px; height: 20px; }

/* ─── misc ─── */
details.faq { background: var(--card); border-radius: var(--r-sm); padding: 0 16px; }
details.faq summary { list-style: none; padding: 16px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 10px; cursor: pointer; }
details.faq summary::after { content: "+"; font: 700 18px/1 var(--mono); color: var(--acc); }
details.faq[open] summary::after { content: "−"; }
details.faq p { margin: 0 0 16px; color: var(--mute); }
.hr { height: 1px; background: var(--line); margin: 16px 0; }
.skel { background: linear-gradient(90deg, var(--card) 0, var(--card2) 50%, var(--card) 100%) 0 0 / 200% 100%; animation: skel 1.2s linear infinite; border-radius: var(--r); }
@keyframes skel { to { background-position: -200% 0; } }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--acc); animation: rot .7s linear infinite; margin: 24px auto; }
@keyframes rot { to { transform: rotate(360deg); } }

#toasts { position: fixed; left: 0; right: 0; top: calc(env(safe-area-inset-top) + 10px); z-index: 200; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast {
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 16px; font-weight: 600; font-size: 14px;
  box-shadow: 0 12px 30px -10px #000; animation: toastIn .35s var(--ease); max-width: 420px;
}
.toast.err { background: var(--hot); color: #fff; }
.toast.ok { background: var(--acc); color: var(--acc-ink); }
.toast.out { animation: toastIn .25s reverse forwards; }
@keyframes toastIn { from { transform: translateY(-20px) scale(.95); opacity: 0; } }

@media (min-width: 560px) {
  #app, .tabbar, .screen, .sheet { max-width: 520px; margin-left: auto; margin-right: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.swipe .tag:not(.gold):not(.acc), .lk .tag:not(.gold):not(.acc) { background: rgba(11, 11, 12, .55); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* ─── v2: игры ─── */
:root { --game: #ffc64a; }
.gswitch {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 10px; border-radius: 999px; flex: none;
  background: var(--card); font: 700 12px/1 var(--display); letter-spacing: -.01em; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--gc) 45%, transparent);
}
.gswitch i { width: 10px; height: 10px; border-radius: 3px; background: var(--gc); transform: rotate(45deg); box-shadow: 0 0 10px var(--gc); }
.gswitch svg { width: 15px; height: 15px; color: var(--mute); }
.gdot {
  width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--gc); color: #0b0b0c; font: 900 13px/1 var(--display); letter-spacing: -.04em; transform: rotate(-4deg);
}
.gbadge { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; font: 700 9.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; background: color-mix(in srgb, var(--gc) 20%, transparent); color: var(--gc); white-space: nowrap; }
.grow-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--card); text-align: left; }
.grow-row.on { box-shadow: inset 0 0 0 2px var(--gc); }
.games-list { display: grid; gap: 8px; margin-top: 8px; }
.gl-row { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; background: var(--card); }
.gl-row .gdot { width: 34px; height: 34px; font-size: 11px; }
.rep-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; color: var(--acc); }
.rep-row.neg { color: var(--hot); }
.rep-row b { font: 900 18px/1 var(--display); }

/* тиммейты: слова-переключатели */
.mates-top { align-items: center; }
.mates-top .words { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.mates-top .words button { font: 900 30px/.95 var(--display); letter-spacing: -.045em; color: var(--dim); transition: color .2s; }
.mates-top .words button.on { color: var(--ink); }
.mates-top .words button.on::after { content: "."; color: var(--acc); }
.mates-body { flex: 1; min-height: 0; position: relative; }
.mates-body.flexcol { display: flex; flex-direction: column; }
.mates-body.scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* главная */
.ready-card {
  border-radius: 26px; padding: 18px; background: var(--gc); color: #0b0b0c; position: relative; overflow: hidden;
}
.ready-card::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(rgba(255,255,255,.35), transparent 65%); pointer-events: none; }
.ready-card .btn.dark-on { background: #0b0b0c; color: var(--gc); position: relative; z-index: 1; }
.pulse { width: 14px; height: 14px; border-radius: 50%; background: rgba(11, 11, 12, .25); flex: none; }
.pulse.on { background: #0b0b0c; animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(11,11,12,.5); } 100% { box-shadow: 0 0 0 16px rgba(11,11,12,0); } }
.hscroll { display: flex; gap: 10px; overflow-x: auto; padding: 0 16px 4px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.hscroll::-webkit-scrollbar { display: none; }
.rp { flex: none; width: 230px; min-height: 130px; border-radius: 20px; background: var(--card); padding: 12px; display: flex; flex-direction: column; gap: 8px; scroll-snap-align: start; }
.rp-note { color: var(--ink); opacity: .85; }
.tile.acc2 { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--acc); }
.poll-opt { width: 100%; position: relative; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px; border-radius: 14px; background: var(--card2); overflow: hidden; text-align: left; }
.poll-opt i { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--acc) 22%, transparent); transition: width .6s var(--ease); }
.poll-opt span, .poll-opt b { position: relative; }
.poll-opt.mine { box-shadow: inset 0 0 0 1.5px var(--acc); }
.poll-opt:not(.res):active { transform: scale(.98); }
.poll-opt[disabled] { color: inherit; cursor: default; }
.wide-card { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; }
.wide-card svg { width: 22px; height: 22px; flex: none; color: var(--mute); }

/* турниры */
.tour { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 20px; background: var(--card); text-align: left; }
.tour-date { width: 52px; height: 56px; border-radius: 14px; flex: none; display: grid; place-content: center; text-align: center; background: var(--gc); color: #0b0b0c; }
.tour-date b { font: 900 22px/1 var(--display); }
.tour-date span { font: 700 9.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; margin-top: 3px; }
.tour-hero { border-radius: 26px; padding: 20px 18px; background: var(--gc); color: #0b0b0c; }
.tour-hero .tag { background: rgba(11, 11, 12, .12); color: #0b0b0c; }
.tour-hero .tag.gold { background: #0b0b0c; color: var(--gc); }
.bracket { display: flex; gap: 14px; overflow-x: auto; padding: 0 16px 8px; scrollbar-width: none; }
.bracket::-webkit-scrollbar { display: none; }
.b-round { flex: none; width: 168px; display: flex; flex-direction: column; justify-content: space-around; gap: 10px; }
.b-match { border-radius: 14px; background: var(--card); overflow: hidden; }
.b-team { width: 100%; display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; font-size: 13px; text-align: left; color: var(--mute); }
.b-team + .b-team { border-top: 1px solid var(--line); }
.b-team[data-act] { color: var(--ink); }
.b-team.win { color: var(--acc-ink); background: var(--acc); font-weight: 700; }
.b-team.mine:not(.win) { color: var(--acc); }

/* лерадл */
.ldl-head, .ldl-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr .7fr .7fr; gap: 4px; align-items: center; }
.ldl-head { margin-top: 18px; font: 700 9.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); padding: 0 4px; }
.ldl-row > * { min-height: 42px; border-radius: 10px; display: grid; place-items: center; padding: 4px; text-align: center; font-size: 11.5px; line-height: 1.15; animation: msgIn .3s var(--ease); }
.ldl-row b { background: var(--card2); justify-content: start; font-size: 12.5px; }
.ldl-row .ok { background: var(--acc); color: var(--acc-ink); font-weight: 700; }
.ldl-row .no { background: var(--card); color: var(--mute); }
.ldl-row.win b { background: var(--acc); color: var(--acc-ink); }

/* профиль: мои игры */
.mygame { flex: none; width: 150px; min-height: 128px; border-radius: 20px; background: var(--card); padding: 12px; display: flex; flex-direction: column; gap: 4px; text-align: left; scroll-snap-align: start; }
.mygame .gdot { margin-bottom: 8px; }
.mygame b { font: 700 13.5px/1.15 var(--display); letter-spacing: -.02em; }
.mygame.on { box-shadow: inset 0 0 0 2px var(--gc); }
.mygame.add { align-items: center; justify-content: center; color: var(--mute); border: 1.5px dashed var(--line); background: none; width: 110px; }

/* лента: посты Леры, ссылки */
.post-lera { background: linear-gradient(180deg, color-mix(in srgb, var(--acc) 6%, transparent), transparent 70%); }
.verified { width: 16px; height: 16px; border-radius: 50%; background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; }
.link-card { width: 100%; margin-top: 12px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--card); color: var(--acc); font: 500 13px/1 var(--mono); text-align: left; }
.guide-body { white-space: pre-wrap; word-wrap: break-word; line-height: 1.55; font-size: 15.5px; }

/* ─── v3: кланы ─── */
.emblem {
  --s: 52px; width: var(--s); height: var(--s); flex: none; display: grid; place-items: center; position: relative;
  background: var(--cc); color: #0b0b0c; border-radius: 30% 30% 50% 50% / 25% 25% 60% 60%;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.18), 0 0 0 2px var(--bg), 0 0 0 3.5px var(--cc);
}
.emblem span { font: 900 calc(var(--s) * .26)/1 var(--display); letter-spacing: -.04em; transform: translateY(-6%); }
.clan-card { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 20px; background: var(--card); text-align: left; }
.clan-card.mine { box-shadow: inset 0 0 0 2px var(--cc); }
.clan-hero { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: 26px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--cc) 22%, var(--card)), var(--card)); }
.clan-tag { background: color-mix(in srgb, var(--cc) 85%, black) !important; color: #0b0b0c !important; cursor: pointer; }
.mates-top .words { gap: 12px; flex: 1; overflow-x: auto; scrollbar-width: none; padding: 4px 0; mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
.mates-top .words::-webkit-scrollbar { display: none; }
.mates-top .words button { font-size: 23px; white-space: nowrap; flex: none; }

/* ─── v3: боевой пропуск ─── */
.bp-hero { border-radius: 26px; padding: 18px; color: #0b0b0c;
  background: linear-gradient(120deg, #ffc64a, #ff7a59 55%, #ff6fa5); position: relative; overflow: hidden; }
.bp-hero::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, rgba(255,255,255,.08) 0 10px, transparent 10px 20px); pointer-events: none; }
.bp-lvl { font: 900 72px/.8 var(--display); letter-spacing: -.06em; margin-right: 14px; }
.bp-track { height: 8px; border-radius: 4px; background: rgba(11, 11, 12, .2); overflow: hidden; margin-top: 8px; }
.bp-track i { display: block; height: 100%; background: #0b0b0c; border-radius: 4px; }
.bp-grid-head { display: grid; grid-template-columns: 34px 1fr 1fr; gap: 8px; margin: 20px 0 8px; }
.bp-grid { display: grid; gap: 8px; }
.bp-row { display: grid; grid-template-columns: 34px 1fr 1fr; gap: 8px; align-items: stretch; }
.bp-n { display: grid; place-items: center; font: 700 13px/1 var(--mono); color: var(--dim); border-radius: 10px; }
.bp-row.open .bp-n { color: var(--acc-ink); background: var(--acc); }
.bp-row.next .bp-n { box-shadow: inset 0 0 0 2px var(--acc); color: var(--acc); }
.bp-cell { position: relative; min-height: 64px; border-radius: 14px; background: var(--card); display: flex; align-items: center; gap: 10px; padding: 8px 12px; text-align: left; color: var(--mute); }
.bp-cell svg { flex: none; }
.bp-cell.premium { background: linear-gradient(135deg, rgba(255,198,74,.10), var(--card)); }
.bp-cell.can { color: var(--ink); box-shadow: inset 0 0 0 2px var(--acc); animation: canPulse 1.8s ease-in-out infinite; }
.bp-cell.premium.can { box-shadow: inset 0 0 0 2px var(--gold); }
@keyframes canPulse { 50% { transform: scale(.98); } }
.bp-cell.got { opacity: .45; }
.bp-cell.locked { opacity: .6; }
.bp-cell[class*="r-"] { box-shadow: inset 0 -3px 0 var(--rc); }
.bp-cell.can[class*="r-"] { box-shadow: inset 0 0 0 2px var(--gold), inset 0 -3px 0 var(--rc); }
.bp-val { font-size: 13px; font-weight: 600; line-height: 1.15; }
.bp-item { flex: none; display: grid; place-items: center; width: 40px; overflow: hidden; }
.bp-item .av { --s: 32px !important; }
.bp-item .nm { font: 900 11px/1 var(--display); }
.bp-item .tag { font-size: 8px; padding: 0 4px; }
.bp-item .pv-banner { width: 36px; height: 24px; border-radius: 6px; position: static !important; }
.bp-ok { position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; font-style: normal; }
.bp-ok.lock { background: none; font-size: 11px; }

/* сезонная косметика */
.frame_season { background: conic-gradient(from var(--a, 0deg), #ffc64a, #ff7a59, #ff6fa5, #ffc64a); animation: spin 4s linear infinite; box-shadow: 0 0 14px #ff7a5966; }
.color_season { background: linear-gradient(90deg, #ffc64a, #ff7a59, #ff6fa5); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
.banner_season { background: linear-gradient(120deg, #ffc64a, #ff7a59 50%, #ff6fa5), #0b0b0c; }

/* ─── v3: админка ─── */
.chart { display: flex; align-items: flex-end; gap: 4px; height: 130px; padding: 10px 10px 0; border-radius: 16px; background: var(--card); }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.bar-col i { width: 100%; border-radius: 4px 4px 0 0; display: block; }
.bar-col span { font-size: 9px; color: var(--mute); }
.bar-col em { font: 500 9px/1 var(--mono); color: var(--dim); font-style: normal; padding-bottom: 6px; }

/* ─── v4: клипы ─── */
.clip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 0 3px; }
.clip-th { position: relative; aspect-ratio: 9/16; background: var(--card); overflow: hidden; border-radius: 6px; }
.clip-th video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.clip-meta { position: absolute; left: 6px; bottom: 6px; display: flex; align-items: center; gap: 3px; font: 600 11px/1 var(--mono); color: #fff; text-shadow: 0 1px 3px #000; }
.clip-screen { background: #000; padding: 0; overflow: hidden; }
.clip-feed { position: absolute; inset: 0; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; }
.clip-feed::-webkit-scrollbar { display: none; }
.clip-slide { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: grid; place-items: center; }
.clip-slide video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.clip-info { position: absolute; left: 0; right: 70px; bottom: 0; padding: 18px 16px calc(var(--safe-b) + 14px); color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.clip-side { position: absolute; right: 10px; bottom: calc(var(--safe-b) + 24px); display: grid; gap: 18px; }
.clip-side button { display: grid; justify-items: center; gap: 4px; color: #fff; font: 600 12px/1 var(--mono); text-shadow: 0 1px 3px #000; }
.clip-side svg { width: 30px; height: 30px; filter: drop-shadow(0 1px 3px #000); }
.clip-side .liked { color: var(--love); }
.clip-side .liked svg { fill: currentColor; }
.clip-close { position: fixed; top: calc(env(safe-area-inset-top) + 12px); left: 12px; z-index: 5; background: rgba(0,0,0,.5); color: #fff; }

/* ─── v4: прогнозы ─── */
.b-pred { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-top: 1px dashed var(--line); font-size: 10.5px; }
.b-pool { flex: 1; height: 4px; border-radius: 2px; background: var(--hot); overflow: hidden; min-width: 20px; }
.b-pool i { display: block; height: 100%; background: var(--acc); }
.b-pred .tag { height: 20px; font-size: 9px; }

/* ─── v4: ИИ-Лера ─── */
.ask-lera { width: 100%; margin-top: 10px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; background: var(--card); }
.ask-lera .face { width: 36px; height: 36px; }
.msg.ai { background: var(--card2); }
.msg.typing { display: flex; gap: 4px; padding: 14px; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--mute); animation: typing 1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; } .msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 50% { opacity: .2; transform: translateY(-3px); } }

/* ─── v5 ─── */
.notif-toast { pointer-events: auto; text-align: left; cursor: pointer; background: var(--card2); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--acc), 0 12px 30px -10px #000; white-space: pre-wrap; }
.typing-line { height: 0; overflow: hidden; padding: 0 16px; font: 500 12px/1 var(--body); color: var(--acc); transition: height .2s; }
.typing-line.on { height: 20px; }
.friends-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--card); font-weight: 600; }
.friends-row svg { width: 20px; height: 20px; }
.inbox-item.new { background: color-mix(in srgb, var(--acc) 7%, transparent); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.mm-card { width: 100%; margin-top: 10px; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); }
.mm-card > svg:first-child { color: var(--acc); }
.mm-card.searching { box-shadow: inset 0 0 0 1.5px var(--acc); }
.mm-radar { width: 36px; height: 36px; flex: none; position: relative; border-radius: 50%; background: color-mix(in srgb, var(--acc) 15%, transparent); }
.mm-radar i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--acc); animation: radar 1.8s ease-out infinite; }
.mm-radar i + i { animation-delay: .9s; }
@keyframes radar { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
