:root {
  --bg: #0b0a12; --bg2: #100e19; --panel: #13111d; --panel2: #1b1828; --panel3: #242036;
  --border: #2a2540; --border2: #3a3358;
  --text: #ece9f5; --muted: #8d86a6; --faint: #5f597a;
  --purple: #8b5cf6; --purple2: #a78bfa; --orange: #f97316; --orange2: #fb923c;
  --green: #3ddc84; --red: #f87171; --yellow: #facc15; --blue: #38bdf8;
  --grad: linear-gradient(135deg, #8b5cf6, #f97316);
  --mention: rgba(249, 115, 22, .10);
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden;
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased; }
body { background:
  radial-gradient(800px 600px at 0% -10%, rgba(139, 92, 246, .16), transparent 70%),
  radial-gradient(800px 600px at 100% 110%, rgba(249, 115, 22, .12), transparent 70%), var(--bg); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
a { color: #ffb37a; }
::selection { background: rgba(139, 92, 246, .45); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--panel3); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
.grad-text, .brand b span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
kbd { font: 11px ui-monospace, Consolas, monospace; background: var(--panel3); border: 1px solid var(--border2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; color: var(--muted); }

/* ── Splash ── */
.splash { position: fixed; inset: 0; display: grid; place-items: center; align-content: center; gap: 22px; z-index: 100; background: var(--bg); transition: opacity .4s; }
.splash img { width: 84px; height: 84px; animation: spin 2.6s linear infinite; }
.splash-bar { width: 140px; height: 3px; background: var(--panel3); border-radius: 3px; overflow: hidden; }
.splash-bar i { display: block; height: 100%; width: 40%; background: var(--grad); border-radius: 3px; animation: bar 1.1s var(--ease) infinite; }
.splash.out { opacity: 0; pointer-events: none; }
@keyframes bar { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Buttons & inputs ── */
.btn { border: 1px solid var(--border2); background: var(--panel2); padding: 9px 14px; border-radius: 10px; font-weight: 600; transition: background .15s, transform .1s, filter .15s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; color: var(--text); }
.btn:hover { background: var(--panel3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--grad); border: 0; color: #fff; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .4); color: var(--red); }
.btn.ghost { background: none; border-color: transparent; }
.btn.wide { width: 100%; }
.btn.big { padding: 13px 16px; font-size: 16px; border-radius: 12px; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; filter: none; }
.icon-btn { background: none; border: 0; width: 36px; height: 36px; border-radius: 9px; display: inline-grid; place-items: center; font-size: 17px; color: var(--muted); flex: none; transition: .15s; }
.icon-btn:hover { background: var(--panel3); color: var(--text); }
.icon-btn.sm { width: 26px; height: 26px; font-size: 14px; }
.link { background: none; border: 0; color: var(--purple2); padding: 0; font-size: 13px; font-weight: 600; }
.link:hover { text-decoration: underline; }
input.in, textarea.in, select.in {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel2); outline: none; transition: border-color .15s, box-shadow .15s; }
input.in:focus, textarea.in:focus, select.in:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(139, 92, 246, .2); }
textarea.in { resize: vertical; min-height: 70px; }
label.lb { display: block; font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin: 12px 0 0; }
label.lb > input, label.lb > select, label.lb > textarea, label.lb > .row { margin-top: 6px; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text); font-size: 15px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: var(--text); cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--purple); margin: 1px 0 0; flex: none; }
.switch { appearance: none; width: 42px; height: 24px; background: var(--panel3); border-radius: 99px; position: relative; cursor: pointer; transition: .2s; flex: none; margin: 0; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s var(--ease); }
.switch:checked { background: var(--purple); }
.switch:checked::after { left: 21px; }

/* ═════════ Auth ═════════ */
.auth { height: 100%; height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; overflow: hidden; }
.auth-hero { position: relative; overflow: hidden; background:
  radial-gradient(600px 500px at 20% 20%, rgba(139, 92, 246, .35), transparent 70%),
  radial-gradient(600px 500px at 90% 90%, rgba(249, 115, 22, .25), transparent 70%), #0d0b16;
  border-right: 1px solid var(--border); display: grid; place-items: center; padding: 40px; }
.orbits { position: absolute; left: 50%; top: 50%; width: 900px; height: 900px; transform: translate(-50%, -50%); opacity: .35; pointer-events: none; }
.orbits span { position: absolute; inset: 0; border: 1.5px solid rgba(167, 139, 250, .35); border-radius: 50%; transform: rotateX(70deg); animation: orbit 30s linear infinite; }
.orbits span:nth-child(2) { transform: rotate(60deg) rotateX(70deg); animation-duration: 38s; border-color: rgba(251, 146, 60, .3); }
.orbits span:nth-child(3) { transform: rotate(-60deg) rotateX(70deg); animation-duration: 46s; }
@keyframes orbit { to { rotate: 360deg; } }
.hero-inner { position: relative; max-width: 470px; width: 100%; }
.hero-lockup { width: 300px; max-width: 100%; display: block; }
.hero-title { font-size: 46px; line-height: 1.05; margin: 34px 0 26px; letter-spacing: -1.5px; font-weight: 800; }
.hero-title span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-feats { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.hero-feats li { display: flex; gap: 14px; align-items: center; }
.hero-feats b { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: rgba(255, 255, 255, .05); border: 1px solid var(--border2); }
.hero-feats strong { display: block; font-size: 15px; }
.hero-feats small { color: var(--muted); font-size: 13px; }
.hero-bubbles { margin-top: 34px; display: grid; gap: 8px; }
.hb { display: flex; gap: 8px; align-items: flex-end; animation: pop .6s var(--ease) both; }
.hb:nth-child(2) { animation-delay: .5s; } .hb:nth-child(3) { animation-delay: 1s; }
.hb.r { justify-content: flex-end; }
.hb i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-style: normal; font-weight: 700; flex: none; }
.hb i.botav { background: url(/logo.svg) center/22px no-repeat, var(--panel3); }
.hb span { background: var(--panel2); border: 1px solid var(--border); padding: 7px 12px; border-radius: 14px 14px 14px 4px; font-size: 14px; }
.hb.r span { background: linear-gradient(135deg, #5b3bb8, #b8541a); border: 0; border-radius: 14px 14px 4px 14px; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.96); } }

.auth-side { display: grid; place-items: center; padding: 24px; overflow-y: auto; }
.auth-card { width: 100%; max-width: 410px; animation: pop .5s var(--ease) both; }
.auth-logo-sm { display: none; width: 220px; margin: 0 auto 18px; }
.auth-head h1 { margin: 0; font-size: 28px; letter-spacing: -.5px; }
.auth-head p { margin: 6px 0 22px; color: var(--muted); }
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: var(--panel2); border: 1px solid var(--border); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.seg-btn { position: relative; z-index: 1; background: none; border: 0; padding: 9px; border-radius: 9px; color: var(--muted); font-weight: 700; transition: color .2s; }
.seg-btn.active { color: var(--text); }
.seg-ind { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); background: var(--panel3); border-radius: 9px; transition: transform .3s var(--ease); box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.auth-card.register .seg-ind { transform: translateX(100%); }
.invite-banner { background: rgba(61, 220, 132, .1); border: 1px solid rgba(61, 220, 132, .35); color: #b6f5cf; padding: 9px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 10px; }
.field { margin-bottom: 12px; }
.field > label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.inp { position: relative; display: flex; align-items: center; background: var(--panel2); border: 1px solid var(--border); border-radius: 11px; transition: border-color .15s, box-shadow .15s; }
.inp:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(139, 92, 246, .2); }
.inp.bad { border-color: var(--red); }
.inp.good { border-color: rgba(61, 220, 132, .6); }
.inp .ico { width: 40px; text-align: center; color: var(--faint); font-weight: 700; flex: none; font-size: 15px; }
.inp input { flex: 1; min-width: 0; background: none; border: 0; outline: none; padding: 12px 12px 12px 0; font-size: 15px; }
.inp .eye { background: none; border: 0; width: 40px; height: 40px; color: var(--muted); font-size: 16px; }
.inp .state { width: 32px; text-align: center; font-size: 14px; }
.hint { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); min-height: 0; }
.hint.warn { color: var(--yellow); }
.hint.bad { color: var(--red); }
.hint.good { color: var(--green); }
.strength { display: flex; align-items: center; gap: 5px; margin-top: 8px; }
.strength i { flex: 1; height: 4px; border-radius: 4px; background: var(--panel3); transition: background .25s; }
.strength span { font-size: 12px; color: var(--muted); width: 74px; text-align: right; }
.strength[data-s="1"] i:nth-child(-n+1) { background: var(--red); }
.strength[data-s="2"] i:nth-child(-n+2) { background: var(--orange); }
.strength[data-s="3"] i:nth-child(-n+3) { background: var(--yellow); }
.strength[data-s="4"] i:nth-child(-n+4) { background: var(--green); }
.row-between { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 4px; }
.terms { margin: 6px 0 2px; font-size: 13px; color: var(--muted); }
.auth-card .reg-only { display: none; }
.auth-card.register .reg-only { display: block; }
.auth-card.register label.check.reg-only, .auth-card.register .strength.reg-only { display: flex; }
.auth-card.register .login-only { display: none; }
#aSubmit { margin-top: 16px; position: relative; }
#aSubmit .spin { display: none; width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
#aSubmit.loading .spin { display: block; }
#aSubmit.loading .lbl { opacity: .8; }
.auth-err { color: var(--red); font-size: 14px; min-height: 20px; margin-top: 12px; text-align: center; }
.auth-err.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.auth-foot { margin-top: 18px; text-align: center; font-size: 12px; color: var(--faint); }
.auth-foot a { color: var(--muted); text-decoration: none; }
.auth-foot a:hover { color: var(--text); }

/* ═════════ App layout ═════════ */
.app { display: grid; grid-template-columns: 260px 1fr 250px; height: 100%; height: 100dvh; }
.app.no-right { grid-template-columns: 260px 1fr; }
.left, .right { background: rgba(16, 14, 25, .88); backdrop-filter: blur(10px); display: flex; flex-direction: column; min-height: 0; }
.left { border-right: 1px solid var(--border); }
.right { border-left: 1px solid var(--border); padding: 10px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 10px; font-size: 18px; }
.brand img { width: 32px; height: 32px; }
.brand > div { display: flex; flex-direction: column; line-height: 1.15; }
.brand small { font-size: 8.5px; font-weight: 700; letter-spacing: .08em; white-space: nowrap; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.search-trigger { margin: 2px 12px 4px; display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; background: var(--panel2); border: 1px solid var(--border); border-radius: 9px; color: var(--muted); font-size: 13px; }
.search-trigger:hover { border-color: var(--border2); color: var(--text); }
.side-scroll { flex: 1; overflow-y: auto; padding: 0 8px 12px; }
.sec-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 8px 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ch-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 9px; border-radius: 9px; border: 0; background: none; color: var(--muted); text-align: left; position: relative; transition: background .12s; }
.ch-item:hover { background: var(--panel2); color: var(--text); }
.ch-item.active { background: var(--panel3); color: var(--text); }
.ch-item.unread { color: var(--text); font-weight: 700; }
.ch-item.unread::before { content: ""; position: absolute; left: -8px; top: 50%; width: 4px; height: 8px; margin-top: -4px; border-radius: 0 4px 4px 0; background: var(--text); }
.ch-item .cico { width: 20px; text-align: center; flex: none; font-size: 15px; }
.ch-item .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-item .lock { font-size: 11px; opacity: .6; }
.ch-item.muted { opacity: .55; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--panel3); color: var(--text); font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; }
.badge.hot { background: var(--orange); color: #fff; }
.dm-empty { color: var(--faint); font-size: 12px; padding: 4px 10px; }
.me-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--border); background: rgba(11, 10, 18, .6); cursor: pointer; }
.me-info { flex: 1; min-width: 0; }
.me-info b, .me-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-info small { color: var(--muted); font-size: 12px; }

/* Avatar */
.av-wrap { position: relative; flex: none; }
.av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; overflow: hidden; background: var(--panel3); font-size: 15px; object-fit: cover; flex: none; }
.av.sm { width: 24px; height: 24px; font-size: 11px; }
.av.xs { width: 18px; height: 18px; font-size: 9px; }
.av.lg { width: 84px; height: 84px; font-size: 32px; }
.av.xl { width: 124px; height: 124px; font-size: 48px; }
.dot { position: absolute; right: -2px; bottom: -2px; width: 13px; height: 13px; border-radius: 50%; border: 3px solid var(--bg2); background: var(--faint); }
.dot.online { background: var(--green); }
.dot.busy { background: var(--red); }
.dot.away { background: var(--yellow); }
.av-stack { display: inline-flex; }
.av-stack .av { border: 2px solid var(--panel2); margin-left: -6px; }
.av-stack .av:first-child { margin-left: 0; }

/* Members & events */
.mem { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 9px; cursor: pointer; }
.mem:hover { background: var(--panel2); }
.mem.off { opacity: .45; }
.mem .info { min-width: 0; flex: 1; }
.mem .info b { display: block; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mem .info small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role { font-size: 10px; font-weight: 800; letter-spacing: .06em; padding: 1px 6px; border-radius: 5px; text-transform: uppercase; vertical-align: 2px; margin-left: 5px; white-space: nowrap; }
.role.admin { background: rgba(249, 115, 22, .18); color: #fdba74; }
.role.mod { background: rgba(139, 92, 246, .2); color: #c4b5fd; }
.role.bot { background: var(--grad); color: #fff; }
.ev-card { background: linear-gradient(135deg, rgba(139, 92, 246, .12), rgba(249, 115, 22, .08)); border: 1px solid var(--border2); border-radius: 12px; padding: 10px 12px; margin: 4px 2px 8px; cursor: pointer; }
.ev-card:hover { border-color: var(--purple); }
.ev-card b { display: block; font-size: 14px; }
.ev-card small { color: var(--muted); font-size: 12px; }

/* ═════════ Main ═════════ */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.top { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: rgba(16, 14, 25, .75); backdrop-filter: blur(10px); min-height: 58px; }
.title-wrap { flex: 1; min-width: 0; }
.title { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.title .cico { font-size: 17px; }
.topic { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 2px; }
.conn { font-size: 12px; color: var(--orange); margin-right: 6px; }
.mob { display: none; }
.msgs { flex: 1; overflow-y: auto; padding: 10px 0 6px; overscroll-behavior: contain; }
.load-more { text-align: center; color: var(--faint); font-size: 12px; padding: 8px; min-height: 30px; }
.day-sep { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; font-weight: 700; margin: 14px 16px 6px; }
.day-sep::before, .day-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.welcome { padding: 24px 20px 10px; }
.welcome .big { width: 68px; height: 68px; border-radius: 50%; background: var(--panel3); display: grid; place-items: center; font-size: 32px; margin-bottom: 10px; }
.welcome h2 { margin: 0 0 4px; font-size: 24px; }
.welcome p { margin: 0; color: var(--muted); }

.m { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 12px; padding: 3px 16px; position: relative; }
.m.first { margin-top: 10px; }
.m.new { animation: msgIn .28s var(--ease); }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } }
.m:hover { background: rgba(255, 255, 255, .025); }
.m.mention { background: var(--mention); box-shadow: inset 3px 0 0 var(--orange); }
.m.highlight { animation: hl 1.8s ease; }
@keyframes hl { 0%, 40% { background: rgba(139, 92, 246, .28); } }
.m .gutter { grid-row: span 3; }
.m .gutter .av { width: 40px; height: 40px; cursor: pointer; }
.m .tstamp { font-size: 10px; color: var(--faint); opacity: 0; text-align: right; padding-top: 4px; }
.m:hover .tstamp { opacity: 1; }
.m .head { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.m .name { font-weight: 700; cursor: pointer; }
.m .name:hover { text-decoration: underline; }
.m .time { font-size: 12px; color: var(--faint); margin-left: 2px; }
.m .text { word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; }
.m .text.jumbo { font-size: 40px; line-height: 1.2; }
.m .text.jumbo .emo { width: 48px; height: 48px; }
.m .edited { font-size: 11px; color: var(--faint); margin-left: 4px; }
.m .pin-tag { font-size: 11px; color: var(--orange); }
.m.bot .text { color: #e4ddff; }
.m.system .text { color: var(--muted); font-size: 14px; }
.fwd { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.text code { background: var(--panel3); padding: 1px 5px; border-radius: 5px; font-size: 13px; font-family: ui-monospace, Consolas, monospace; }
.text em { color: var(--muted); }
.mtag { background: rgba(139, 92, 246, .22); color: #d6c8ff; padding: 0 3px; border-radius: 4px; font-weight: 600; cursor: pointer; }
.mtag.me { background: rgba(249, 115, 22, .25); color: #ffd0a8; }
.spoiler { background: var(--panel3); color: transparent; border-radius: 4px; cursor: pointer; padding: 0 2px; transition: .2s; }
.spoiler.show { color: inherit; background: rgba(255, 255, 255, .06); }
.emo { width: 22px; height: 22px; vertical-align: -5px; object-fit: contain; }
.reply-ref { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 2px; cursor: pointer; min-width: 0; }
.reply-ref::before { content: "↱"; color: var(--faint); }
.reply-ref b { color: var(--text); font-weight: 600; flex: none; }
.reply-ref span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m.compact .gutter .av { display: none; }
.m.compact .head { display: none; }
.files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.files img { max-width: min(400px, 100%); max-height: 340px; border-radius: 10px; border: 1px solid var(--border); display: block; background: var(--panel2); cursor: zoom-in; }
.file-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); background: var(--panel2); border-radius: 10px; text-decoration: none; color: var(--text); max-width: 340px; }
.file-card .ico { font-size: 26px; }
.file-card b { display: block; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 230px; }
.file-card small { color: var(--muted); }
.files audio { max-width: 320px; }
.lp { display: flex; gap: 12px; margin-top: 6px; max-width: 520px; border: 1px solid var(--border); border-left: 4px solid var(--purple); background: var(--panel2); border-radius: 10px; padding: 10px 12px; text-decoration: none; color: var(--text); }
.lp:hover { border-color: var(--border2); border-left-color: var(--orange); }
.lp .lp-t { min-width: 0; flex: 1; }
.lp small { color: var(--muted); font-size: 12px; }
.lp b { display: block; color: #c9b8ff; margin: 2px 0; font-size: 14px; }
.lp p { margin: 0; color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lp img { width: 110px; height: 80px; object-fit: cover; border-radius: 8px; flex: none; }
.lp.video { flex-direction: column; }
.lp.video img { width: 100%; height: auto; max-height: 240px; }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.react { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--border); background: var(--panel2); font-size: 14px; transition: transform .1s; }
.react:hover { border-color: var(--border2); }
.react:active { transform: scale(.92); }
.react.mine { border-color: var(--purple); background: rgba(139, 92, 246, .18); }
.react.pop { animation: rpop .35s var(--ease); }
@keyframes rpop { 50% { transform: scale(1.25); } }
.react b { font-size: 12px; font-weight: 700; color: var(--muted); }
.react.mine b { color: #d6c8ff; }
.react .emo { width: 18px; height: 18px; vertical-align: -4px; }
.tools { position: absolute; right: 14px; top: -14px; display: none; background: var(--panel2); border: 1px solid var(--border2); border-radius: 10px; padding: 2px; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); z-index: 2; }
.m:hover .tools, .m.tools-open .tools { display: flex; }
.tools button { width: 32px; height: 30px; border: 0; background: none; border-radius: 7px; font-size: 15px; }
.tools button:hover { background: var(--panel3); }
.edit-box textarea { width: 100%; min-height: 40px; resize: vertical; }
.edit-box .hint a { cursor: pointer; }
.seen { display: flex; justify-content: flex-end; gap: 3px; padding: 2px 16px 0; min-height: 22px; align-items: center; }
.seen small { color: var(--faint); font-size: 11px; margin-right: 4px; }

/* ── Widgets (anket, oyunlar, uyarılar) ── */
.card { margin-top: 6px; background: var(--panel2); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; max-width: 440px; }
.card h4 { margin: 0 0 2px; font-size: 15px; }
.card .cmeta { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.card .cfoot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.popt { position: relative; display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 9px 12px; margin-top: 6px; border: 1px solid var(--border2); background: var(--panel); border-radius: 9px; text-align: left; overflow: hidden; }
.popt .bar { position: absolute; inset: 0 auto 0 0; background: rgba(139, 92, 246, .22); transition: width .4s var(--ease); }
.popt.voted { border-color: var(--purple); }
.popt.voted .bar { background: linear-gradient(90deg, rgba(139, 92, 246, .35), rgba(249, 115, 22, .3)); }
.popt span { position: relative; }
.popt .cnt { font-size: 13px; color: var(--muted); font-weight: 600; }
.popt.correct { border-color: var(--green); background: rgba(61, 220, 132, .12); }
.popt.wrong { border-color: var(--red); background: rgba(248, 113, 113, .1); }
.popt:disabled { cursor: default; }
.timer { height: 4px; background: var(--panel3); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.timer i { display: block; height: 100%; background: var(--grad); transition: width 1s linear; }
.xox { display: inline-block; max-width: none; }
.board { display: grid; grid-template-columns: repeat(3, 64px); grid-template-rows: repeat(3, 64px); gap: 5px; }
.cell { border: 0; border-radius: 10px; background: var(--panel); font-size: 32px; font-weight: 800; display: grid; place-items: center; }
.cell.x { color: var(--purple); } .cell.o { color: var(--orange); }
.cell.win { background: rgba(249, 115, 22, .22); }
.cell.can:hover { background: var(--panel3); }
.cell:not(.can) { cursor: default; }
.rps-row { display: flex; gap: 8px; margin-top: 8px; }
.rps-row button { flex: 1; font-size: 30px; padding: 8px 0; border-radius: 12px; border: 1px solid var(--border2); background: var(--panel); transition: transform .12s; }
.rps-row button:hover { transform: translateY(-2px); border-color: var(--purple); }
.vs { display: flex; align-items: center; justify-content: space-around; gap: 10px; text-align: center; padding: 6px 0; }
.vs .side { flex: 1; min-width: 0; }
.vs .side b { display: block; font-size: 13px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs .big { font-size: 34px; }
.vs .mid { font-weight: 800; color: var(--faint); }
.score-in { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 8px; }
.score-in input { width: 58px; text-align: center; font-size: 18px; font-weight: 700; padding: 6px; }
.teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: center; gap: 8px; margin: 6px 0; }
.teams b { font-size: 16px; }
.teams .sc { font-size: 26px; font-weight: 800; background: var(--panel); border-radius: 10px; padding: 2px 12px; }
.rsvp { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.rsvp button { flex: 1; min-width: 90px; }
.rsvp button.on { border-color: var(--purple); background: rgba(139, 92, 246, .2); }
.wgrid { font-size: 20px; line-height: 1.15; letter-spacing: 2px; white-space: pre; margin: 6px 0 2px; }
.alert-card { margin-top: 4px; border-radius: 14px; padding: 12px 14px; border: 1px solid; max-width: 560px; }
.alert-card.quake { background: rgba(248, 113, 113, .08); border-color: rgba(248, 113, 113, .4); }
.alert-card.quake.urgent { background: rgba(248, 113, 113, .16); border-color: var(--red); box-shadow: 0 0 0 3px rgba(248, 113, 113, .15); }
.alert-card.news { background: rgba(56, 189, 248, .07); border-color: rgba(56, 189, 248, .35); }
.alert-card .mag { float: right; font-size: 26px; font-weight: 900; margin-left: 10px; line-height: 1; padding: 6px 10px; border-radius: 10px; background: rgba(0, 0, 0, .25); }
.alert-card .text { white-space: pre-wrap; }

/* Composer */
.composer-wrap { padding: 0 14px 14px; position: relative; }
.typing { height: 20px; font-size: 12px; color: var(--muted); padding-left: 4px; }
.typing b { color: var(--text); }
.typing .dots i { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--muted); margin-right: 2px; animation: blink 1.2s infinite; }
.typing .dots i:nth-child(2) { animation-delay: .2s; } .typing .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .2; } }
.reply-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--panel2); border: 1px solid var(--border); border-bottom: 0; border-radius: 12px 12px 0 0; padding: 6px 8px 6px 12px; font-size: 13px; color: var(--muted); }
.reply-bar b { color: var(--text); }
.pending { display: flex; gap: 8px; flex-wrap: wrap; }
.pending:not(:empty) { padding: 8px 0; }
.chip { position: relative; display: flex; align-items: center; gap: 8px; background: var(--panel2); border: 1px solid var(--border); border-radius: 10px; padding: 6px 30px 6px 6px; font-size: 13px; max-width: 230px; overflow: hidden; }
.chip img, .chip .fi { width: 40px; height: 40px; border-radius: 7px; object-fit: cover; background: var(--panel3); display: grid; place-items: center; font-size: 20px; flex: none; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .x { position: absolute; right: 4px; top: 4px; }
.chip .prog { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--grad); }
.composer { display: flex; align-items: flex-end; gap: 2px; background: var(--panel2); border: 1px solid var(--border); border-radius: 14px; padding: 5px; transition: border-color .15s; }
.composer:focus-within { border-color: var(--border2); }
.composer.locked { opacity: .6; }
#input { flex: 1; resize: none; border: 0; background: none; outline: none; padding: 8px 6px; max-height: 180px; min-height: 36px; line-height: 1.4; }
.send { width: 38px; height: 36px; border: 0; border-radius: 10px; background: var(--grad); color: #fff; font-size: 16px; flex: none; transition: transform .1s; }
.send:active { transform: scale(.92); }
.popup { position: absolute; left: 14px; right: 14px; bottom: calc(100% - 20px); background: var(--panel2); border: 1px solid var(--border2); border-radius: 12px; box-shadow: var(--shadow); max-height: 280px; overflow-y: auto; padding: 6px; z-index: 5; }
.pop-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.pop-item small { color: var(--muted); }
.pop-item.sel, .pop-item:hover { background: var(--panel3); }
.jump { position: absolute; bottom: 110px; left: 50%; transform: translateX(-50%); border: 0; background: var(--grad); color: #fff; padding: 7px 14px; border-radius: 99px; font-weight: 700; font-size: 13px; box-shadow: var(--shadow); z-index: 4; }
.drop { position: absolute; inset: 10px; border: 2px dashed var(--purple); border-radius: 16px; background: rgba(11, 10, 18, .85); display: none; place-items: center; font-size: 20px; font-weight: 700; z-index: 10; pointer-events: none; }
.drop.show { display: grid; }

/* Menus / picker */
.menu { position: fixed; z-index: 50; background: var(--panel2); border: 1px solid var(--border2); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; max-width: calc(100vw - 16px); animation: pop .15s var(--ease); }
.menu .mi { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 0; background: none; border-radius: 8px; text-align: left; font-size: 14px; white-space: nowrap; }
.menu .mi:hover { background: var(--panel3); }
.menu .mi.danger { color: var(--red); }
.menu .sep { height: 1px; background: var(--border); margin: 4px 6px; }
.picker { width: 330px; }
.picker .ptabs { display: flex; gap: 4px; padding: 2px 2px 6px; border-bottom: 1px solid var(--border); margin-bottom: 6px; overflow-x: auto; }
.picker .ptabs button { border: 0; background: none; padding: 5px 9px; border-radius: 7px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.picker .ptabs button.on { background: var(--panel3); color: var(--text); }
.picker .grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 250px; overflow-y: auto; }
.picker .grid button { border: 0; background: none; font-size: 22px; height: 36px; border-radius: 7px; display: grid; place-items: center; }
.picker .grid button:hover { background: var(--panel3); }
.picker .grid img { width: 26px; height: 26px; object-fit: contain; }
.picker .empty { grid-column: 1 / -1; color: var(--muted); font-size: 13px; padding: 14px; text-align: center; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(5, 4, 10, .72); backdrop-filter: blur(5px); display: grid; place-items: center; z-index: 40; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal-box { background: var(--panel); border: 1px solid var(--border2); border-radius: 20px; width: 100%; max-width: 470px; max-height: calc(100dvh - 32px); overflow-y: auto; box-shadow: var(--shadow); padding: 20px; position: relative; animation: pop .22s var(--ease); }
.modal-box.wide { max-width: 680px; }
.modal-box.xwide { max-width: 920px; }
.modal-box.flush { padding: 0; }
.modal-box.img { background: none; border: 0; box-shadow: none; max-width: 95vw; padding: 0; text-align: center; }
.modal-box.img img { max-width: 95vw; max-height: 86dvh; border-radius: 10px; }
.modal-box h3 { margin: 0 0 4px; font-size: 19px; }
.modal-box .x-close { position: absolute; right: 12px; top: 12px; z-index: 3; background: rgba(11, 10, 18, .5); }
.desc { color: var(--muted); font-size: 14px; margin: 0 0 6px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; margin-top: 18px; }
.row.wrap { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.stabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 10px -20px 8px; padding: 0 16px; overflow-x: auto; }
.stabs button { border: 0; background: none; padding: 10px 10px; color: var(--muted); font-weight: 700; border-bottom: 2px solid transparent; white-space: nowrap; }
.stabs button.on { color: var(--text); border-color: var(--orange); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 2px var(--bg); }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.opt-row:last-child { border-bottom: 0; }
.opt-row small { display: block; color: var(--muted); font-size: 12px; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.list-row .grow { flex: 1; min-width: 0; }
.list-row img.e { width: 28px; height: 28px; object-fit: contain; }
.section-title { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 20px 0 6px; }
.copybox { display: flex; gap: 6px; align-items: center; background: var(--panel2); border: 1px dashed var(--border2); border-radius: 10px; padding: 6px 6px 6px 12px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.copybox span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 12px; background: var(--panel3); color: var(--muted); }
.pill.green { background: rgba(61, 220, 132, .14); color: #9ff0c2; }
.pill.red { background: rgba(248, 113, 113, .14); color: #fca5a5; }

/* ═════════ Profil ═════════ */
.pf { --acc: var(--purple); }
.pf-banner { position: relative; height: 180px; background: linear-gradient(135deg, var(--acc), #0b0a12 140%); border-radius: 20px 20px 0 0; overflow: hidden; }
.pf-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(19, 17, 29, .7)); }
.pf-head { position: relative; display: flex; gap: 18px; align-items: flex-end; padding: 0 24px; margin-top: -62px; }
.pf-av { position: relative; flex: none; }
.pf-av .av { width: 124px; height: 124px; font-size: 48px; border: 6px solid var(--panel); box-shadow: 0 0 0 2px var(--acc); }
.pf-av .dot { width: 24px; height: 24px; border-width: 5px; border-color: var(--panel); right: 6px; bottom: 6px; }
.pf-name { flex: 1; min-width: 0; padding-bottom: 6px; }
.pf-name h2 { margin: 0; font-size: 26px; line-height: 1.1; letter-spacing: -.5px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.pf-name .uname { color: var(--muted); font-size: 14px; margin-top: 3px; }
.pf-actions { display: flex; gap: 6px; flex-wrap: wrap; padding: 14px 24px 0; }
.pf-status { margin: 14px 24px 0; padding: 10px 14px; background: var(--panel2); border: 1px solid var(--border); border-radius: 12px; font-size: 14px; }
.pf-body { padding: 4px 24px 24px; }
.pf .stabs { margin: 14px -24px 12px; padding: 0 20px; }
.pf .stabs button.on { border-color: var(--acc); }
.pf-about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.pf-bio { white-space: pre-wrap; line-height: 1.55; }
.pf-facts { display: grid; gap: 8px; align-content: start; }
.fact { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.fact b { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--panel2); border: 1px solid var(--border); flex: none; }
.fact small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.links a, .links span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 9px; background: var(--panel2); border: 1px solid var(--border); font-size: 13px; color: var(--text); text-decoration: none; }
.links a:hover { border-color: var(--acc); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.stat { background: var(--panel2); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.stat small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.stat b { display: block; font-size: 24px; margin-top: 2px; letter-spacing: -.5px; }
.stat i { font-style: normal; font-size: 12px; color: var(--muted); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.bdg { display: flex; gap: 10px; align-items: center; background: var(--panel2); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; }
.bdg .bi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: linear-gradient(135deg, rgba(139, 92, 246, .3), rgba(249, 115, 22, .25)); flex: none; }
.bdg b { display: block; font-size: 13px; }
.bdg small { display: block; color: var(--muted); font-size: 11px; line-height: 1.3; }
.bdg.locked { opacity: .4; filter: grayscale(1); }
.pf-edit { display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
.pf-preview { position: sticky; top: 0; align-self: start; border: 1px solid var(--border2); border-radius: 20px; overflow: hidden; background: var(--panel); }
.pf-preview .pf-banner { height: 110px; border-radius: 0; }
.pf-preview .pf-head { margin-top: -44px; padding: 0 16px; }
.pf-preview .pf-av .av { width: 84px; height: 84px; font-size: 32px; border-width: 5px; }
.pf-preview .pf-name h2 { font-size: 19px; }
.pf-preview .pf-status { margin: 10px 16px 0; }
.pf-preview .pf-body { padding: 10px 16px 16px; }
.counter { float: right; font-size: 11px; color: var(--faint); font-weight: 600; }

/* Search */
.search-box { display: flex; gap: 8px; }
.search-res { margin: 12px -20px -20px; max-height: 60vh; overflow-y: auto; border-top: 1px solid var(--border); }
.sr { padding: 10px 20px; border-bottom: 1px solid var(--border); cursor: pointer; display: flex; gap: 10px; }
.sr:hover { background: var(--panel2); }
.sr .grow { min-width: 0; flex: 1; }
.sr small { color: var(--muted); font-size: 12px; }
.sr p { margin: 2px 0 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sr mark { background: rgba(249, 115, 22, .35); color: inherit; border-radius: 3px; padding: 0 1px; }

/* Wordle */
.wd { display: grid; gap: 6px; justify-content: center; margin: 14px 0; }
.wd-row { display: grid; grid-template-columns: repeat(5, 54px); gap: 6px; }
.wd-row.shake { animation: shake .4s; }
.wd-c { height: 54px; border: 2px solid var(--border2); border-radius: 8px; display: grid; place-items: center; font-size: 26px; font-weight: 800; text-transform: uppercase; }
.wd-c.f { border-color: var(--muted); animation: rpop .12s; }
.wd-c.g { background: #2f9e5b; border-color: #2f9e5b; }
.wd-c.y { background: #c69a1a; border-color: #c69a1a; }
.wd-c.b { background: #3a3550; border-color: #3a3550; }
.kb { display: grid; gap: 6px; margin-top: 10px; }
.kb-row { display: flex; gap: 5px; justify-content: center; }
.kb button { min-width: 32px; height: 46px; padding: 0 6px; border-radius: 7px; border: 0; background: var(--panel3); font-weight: 700; font-size: 15px; text-transform: uppercase; flex: 1; max-width: 44px; }
.kb button.wide { max-width: 70px; flex: 1.6; font-size: 12px; }
.kb button.g { background: #2f9e5b; } .kb button.y { background: #c69a1a; } .kb button.b { background: #1c1928; color: var(--faint); }

/* Leaderboard */
.lb-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--border); }
.lb-row .rk { font-weight: 800; color: var(--muted); text-align: center; }
.lb-row.top1 .rk { color: #fcd34d; } .lb-row.top2 .rk { color: #e5e7eb; } .lb-row.top3 .rk { color: #fdba74; }

/* Toast & confetti */
.toasts { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--panel2); border: 1px solid var(--border2); padding: 9px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: 14px; animation: pop .2s var(--ease); max-width: calc(100vw - 24px); }
.toast.err { border-color: rgba(248, 113, 113, .5); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; width: 100%; height: 100%; }
.scrim { display: none; }

/* Static pages */
.page { max-width: 780px; margin: 0 auto; padding: 40px 20px 80px; height: 100%; overflow-y: auto; }
body.static { overflow: auto; }
body.static .page { height: auto; overflow: visible; }
.page h1 { font-size: 32px; margin: 18px 0 4px; }
.page h2 { font-size: 20px; margin: 30px 0 8px; }
.page p, .page li { color: #cfcae0; line-height: 1.65; }
.page .muted { color: var(--muted); }
.page table { border-collapse: collapse; width: 100%; font-size: 14px; }
.page td, .page th { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.page th { background: var(--panel2); }

/* ═════════ Responsive ═════════ */
@media (max-width: 1100px) {
  .app, .app.no-right { grid-template-columns: 250px 1fr; }
  .right { position: fixed; right: 0; top: 0; bottom: 0; width: 280px; z-index: 30; transform: translateX(100%); transition: transform .25s var(--ease); }
  .app.show-right .right { transform: none; }
  .app.show-right .scrim, .app.show-left .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 25; }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-logo-sm { display: block; }
  .auth-head { text-align: center; }
  .pf-edit { grid-template-columns: 1fr; }
  .pf-preview { display: none; }
}
@media (max-width: 760px) {
  .app, .app.no-right { grid-template-columns: 1fr; }
  .left { position: fixed; left: 0; top: 0; bottom: 0; width: 285px; z-index: 30; transform: translateX(-100%); transition: transform .25s var(--ease); }
  .app.show-left .left { transform: none; }
  .mob { display: inline-grid; }
  .top { padding: 8px; padding-top: max(8px, env(safe-area-inset-top)); }
  .m { padding: 3px 10px; grid-template-columns: 36px minmax(0, 1fr); gap: 0 10px; }
  .m .gutter .av { width: 36px; height: 36px; }
  .tools { right: 8px; }
  .m:hover .tools { display: none; }
  .m.tools-open .tools { display: flex; }
  .composer-wrap { padding: 0 8px max(8px, env(safe-area-inset-bottom)); }
  #emojiBtn { display: none; }
  .board { grid-template-columns: repeat(3, 56px); grid-template-rows: repeat(3, 56px); }
  .picker { width: calc(100vw - 16px); }
  .jump { bottom: 96px; }
  .modal { padding: 0; place-items: end stretch; }
  .modal-box { border-radius: 20px 20px 0 0; max-height: 92dvh; }
  .modal-box.img { border-radius: 0; place-self: center; }
  .pf-banner { height: 130px; }
  .pf-head { padding: 0 16px; margin-top: -50px; gap: 12px; }
  .pf-av .av { width: 96px; height: 96px; font-size: 38px; }
  .pf-name h2 { font-size: 21px; }
  .pf-actions, .pf-body { padding-left: 16px; padding-right: 16px; }
  .pf-status { margin-left: 16px; margin-right: 16px; }
  .pf .stabs { margin-left: -16px; margin-right: -16px; }
  .pf-about { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .wd-row { grid-template-columns: repeat(5, 48px); }
  .wd-c { height: 48px; }
  .kb button { min-width: 0; padding: 0 2px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
