/* ==========================================================================
   Çatı — tasarım sistemi
   ========================================================================== */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --line: #e3e6ea;
  --ink: #14161a;
  --muted: #666e79;
  --brand: #ff5a36;
  --brand-2: #ff8a3d;
  --brand-soft: rgba(255, 90, 54, .12);
  --grad: linear-gradient(135deg, #ff5a36 0%, #ff8a3d 100%);
  --like: #ff3b5c;
  --like-soft: rgba(255, 59, 92, .12);
  --ok: #12b76a;
  --warn: #f59e0b;
  --shadow: 0 1px 2px rgba(15, 15, 20, .04), 0 8px 24px -12px rgba(15, 15, 20, .14);
  --shadow-lg: 0 20px 60px -20px rgba(15, 15, 20, .4);
  --radius: 18px;
  --radius-sm: 13px;
  --side: 250px;
  --rail: 320px;
  --col: 600px;
  --tabbar: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0d10; --surface: #17181c; --surface-2: #1f2024; --line: #2a2c31;
    --ink: #f2f3f5; --muted: #94989f; --brand-soft: rgba(255, 122, 74, .18);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
    --shadow-lg: 0 20px 60px -20px rgba(0, 0, 0, .85);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0d10; --surface: #17181c; --surface-2: #1f2024; --line: #2a2c31;
  --ink: #f2f3f5; --muted: #94989f; --brand-soft: rgba(255, 122, 74, .18);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
  --shadow-lg: 0 20px 60px -20px rgba(0, 0, 0, .85);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-wrap: anywhere; overscroll-behavior-y: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; opacity: .55; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.2; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
svg.i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i.fill { fill: currentColor; stroke: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.noscript { padding: 24px; text-align: center; }
[hidden] { display: none !important; }

.splash { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 200; transition: opacity .3s; }
.splash.out { opacity: 0; pointer-events: none; }
.splash-mark { width: 68px; height: 68px; border-radius: 20px; background: var(--grad); color: #fff; font-size: 34px; font-weight: 800; display: grid; place-items: center; animation: pop 1.2s ease-in-out infinite; }
@keyframes pop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* ---------------------------------------------------------------- layout */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, var(--col)) var(--rail); justify-content: center; gap: 0 24px; max-width: 1240px; margin: 0 auto; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 20px 8px 20px 0; display: flex; flex-direction: column; gap: 6px; }
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 12px 18px; font-weight: 800; font-size: 21px; letter-spacing: -.03em; }
.mark { width: 38px; height: 38px; border-radius: 12px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 20px; flex: none; box-shadow: 0 8px 18px -8px rgba(255, 100, 50, .6); }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 14px; font-weight: 600; color: var(--muted); position: relative; transition: background .15s, color .15s; }
.nav a svg { width: 23px; height: 23px; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.on { color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
.nav a.on svg { color: var(--brand); }
.badge { min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--like); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; line-height: 1; }
.nav .badge { margin-left: auto; }
.side-cta { margin: 14px 4px 0; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.me-chip { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 15px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.me-chip b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-chip span { font-size: 12px; color: var(--muted); }
.me-chip .txt { min-width: 0; flex: 1; }

.main { min-width: 0; padding-bottom: calc(var(--tabbar) + var(--safe-b) + 24px); }
.topbar { display: none; }
.rail { position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto; padding: 20px 0 20px 8px; display: flex; flex-direction: column; gap: 16px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.tabbar { display: none; }
.banner { background: var(--grad); color: #fff; padding: 10px 16px; font-weight: 600; font-size: 13.5px; text-align: center; }
.page-head { position: sticky; top: 0; z-index: 20; padding: 14px 4px 10px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.page-head h1 { font-size: 21px; font-weight: 800; }
.page-title { display: flex; align-items: center; gap: 10px; }
.view { padding-top: 6px; animation: fade .22s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 1180px) {
  :root { --side: 76px; }
  .shell { grid-template-columns: var(--side) minmax(0, var(--col)); }
  .rail { display: none; }
  .nav a span.lbl, .brand .name, .side-cta .lbl, .me-chip .txt { display: none; }
  .nav a { justify-content: center; padding: 13px; }
  .nav .badge { position: absolute; top: 4px; right: 6px; margin: 0; }
  .brand { justify-content: center; padding: 6px 0 18px; }
  .me-chip { justify-content: center; padding: 8px; }
  .side { padding-right: 0; }
}
@media (min-width: 1181px) { .only-narrow { display: none !important; } }
@media (max-width: 1180px) { .only-wide { display: none !important; } }

@media (max-width: 800px) {
  .shell { display: block; }
  .side { display: none; }
  .main { padding: 0 12px calc(var(--tabbar) + var(--safe-b) + 24px); }
  .topbar { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 30; padding: calc(10px + var(--safe-t)) 10px 10px 14px; margin: 0 -12px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .topbar .brand { padding: 0; font-size: 19px; }
  .topbar .mark { width: 32px; height: 32px; font-size: 17px; border-radius: 10px; }
  .topbar .acts { display: flex; gap: 4px; }
  .page-head { top: calc(54px + var(--safe-t)); margin: 0 -12px; padding: 8px 14px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--tabbar) + var(--safe-b)); padding: 0 6px var(--safe-b); background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--muted); position: relative; }
  .tabbar a svg { width: 23px; height: 23px; }
  .tabbar a.on { color: var(--brand); }
  .tabbar .fab { align-self: center; justify-self: center; width: 52px; height: 52px; border-radius: 18px; background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px -8px rgba(255, 100, 50, .8); transform: translateY(-8px); transition: transform .15s; }
  .tabbar .fab:active { transform: translateY(-8px) scale(.94); }
  .tabbar .fab svg { width: 25px; height: 25px; }
  .tabbar .dot-badge { position: absolute; top: 8px; left: calc(50% + 6px); width: 8px; height: 8px; min-width: 0; padding: 0; }
  body.page-videos .tabbar, body.page-videos .topbar { display: none; }
  body.page-videos .main { padding: 0; }
}

/* --------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 13px; font-weight: 700; background: var(--surface-2); color: var(--ink); transition: transform .12s, background .15s, box-shadow .15s, opacity .15s; white-space: nowrap; }
.btn:hover { background: color-mix(in srgb, var(--surface-2) 78%, var(--brand) 22%); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 22px -10px rgba(255, 100, 50, .85); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-outline { background: transparent; border: 1.5px solid var(--line); }
.btn-danger { background: var(--like-soft); color: var(--like); }
.btn-danger:hover { background: var(--like); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { height: 34px; padding: 0 13px; font-size: 13.5px; border-radius: 11px; }
.btn-lg { height: 50px; font-size: 16.5px; border-radius: 15px; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; display: inline-grid; place-items: center; color: var(--muted); position: relative; transition: background .15s, color .15s; flex: none; }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn .badge { position: absolute; top: 1px; right: -1px; min-width: 16px; height: 16px; font-size: 9.5px; padding: 0 3px; }

/* ----------------------------------------------------------------- cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 16px; }
.section-title { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 4px 10px; display: flex; align-items: center; gap: 8px; }
.section-title .see-all { margin-left: auto; text-transform: none; letter-spacing: 0; color: var(--brand); font-weight: 700; font-size: 13px; }

.avatar { --h: 20; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 16px; font-weight: 700; line-height: 1; color: #fff; background: linear-gradient(135deg, hsl(var(--h) 78% 58%), hsl(calc(var(--h) + 45) 78% 50%)); user-select: none; overflow: hidden; }
.avatar.img { background: var(--surface-2); }
.avatar.img img { width: 100%; height: 100%; object-fit: cover; }
.avatar.xs { width: 26px; height: 26px; font-size: 11px; }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.avatar.lg { width: 88px; height: 88px; font-size: 34px; border: 4px solid var(--surface); box-shadow: var(--shadow); }
.vbadge { display: inline-flex; width: 15px; height: 15px; margin-left: 3px; color: #fff; background: var(--brand); border-radius: 50%; padding: 2px; vertical-align: -2px; }
.vbadge svg { width: 100%; height: 100%; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 25px; padding: 0 10px; border-radius: 13px; background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.chip.pin { background: var(--brand-soft); color: var(--brand); }
.lnk, .tag-link { color: var(--brand); font-weight: 600; }
.lnk:hover, .tag-link:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ tabs */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 15px; }
.tabs button, .tabs a { flex: 1; height: 36px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; transition: all .15s; white-space: nowrap; }
.tabs .on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.tabs.icons { overflow-x: auto; scrollbar-width: none; }
.tabs.icons::-webkit-scrollbar { display: none; }
.tabs.icons button { flex: none; padding: 0 15px; }
.tabs.icons button span { display: none; }
@media (min-width: 640px) { .tabs.icons button span { display: inline; } }

/* ------------------------------------------------------------------ post */
.feed { display: flex; flex-direction: column; gap: 12px; }
.post { padding: 14px 14px 6px; }
.post-head { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.post-who { min-width: 0; flex: 1; line-height: 1.25; }
.post-who .nm { display: inline-flex; align-items: center; font-weight: 700; font-size: 14.5px; }
.post-who span { font-size: 13px; color: var(--muted); display: block; }
.post-who .tm:hover { text-decoration: underline; }
.post-text { display: block; font-size: 15.5px; line-height: 1.48; white-space: pre-wrap; margin: 0 0 10px; }
.post.detail .post-text { font-size: 1.15rem; }
.repost-by { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; padding: 0 14px; margin: 10px 0 -2px; }
.repost-by svg { width: 16px; height: 16px; }
.repost-by a:hover { text-decoration: underline; }

.post-foot { display: flex; align-items: center; gap: 2px; margin: 6px -6px 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.act { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 11px; color: var(--muted); font-weight: 600; font-size: 13.5px; transition: background .15s, color .15s; }
.act:hover { background: var(--surface-2); color: var(--ink); }
.act.like.on { color: var(--like); }
.act.like svg { transition: transform .25s; }
.act.like.pop svg { animation: heartPop .35s; }
@keyframes heartPop { 30% { transform: scale(1.35); } 60% { transform: scale(.9); } 100% { transform: scale(1); } }
.act.rp.on { color: var(--ok); }
.act.saved { color: var(--brand); }
.post-foot .sp { flex: 1; }
.views { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; }

/* --- fotoğraf ızgaraları --- */
.photos { display: block; width: 100%; border: 0; padding: 0; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.photos.one { display: block; }
.photos.one img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos.grid { display: grid; gap: 3px; aspect-ratio: 16/11; }
.photos.grid button { padding: 0; border: 0; overflow: hidden; position: relative; }
.photos.grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos.g2 { grid-template-columns: 1fr 1fr; }
.photos.g3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.photos.g3 button:first-child { grid-row: 1 / 3; }
.photos.g4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }

/* --- video kartı (akış içi) --- */
.vid { position: relative; border-radius: 14px; overflow: hidden; background: #000; max-height: 560px; cursor: pointer; }
.vid video { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid-dur { position: absolute; left: 10px; bottom: 10px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 8px; display: inline-flex; align-items: center; gap: 5px; }
.vid-mute { position: absolute; right: 10px; bottom: 10px; width: 32px; height: 32px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; }

/* --- alıntı gömme --- */
.quote { display: block; border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 4px 0 10px; }
.quote.gone { color: var(--muted); font-size: 13.5px; text-align: center; padding: 18px; }
.quote p { margin: 6px 0 0; font-size: 14px; }
.quote-media { position: relative; margin-top: 8px; border-radius: 10px; overflow: hidden; max-height: 220px; }
.quote-media img { width: 100%; max-height: 220px; object-fit: cover; display: block; }
.quote-media .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .25); }

/* -------------------------------------------------------------- compose */
.compose-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; cursor: pointer; }
.compose-card .fake { flex: 1; height: 42px; border-radius: 21px; background: var(--surface-2); color: var(--muted); display: flex; align-items: center; padding: 0 16px; font-weight: 500; }
.compose-ic { color: var(--muted); }
.hero { text-align: center; padding: 32px 20px; }
.hero .mark { width: 56px; height: 56px; font-size: 26px; margin: 0 auto 12px; border-radius: 18px; }
.hero h2 { font-size: 21px; margin-bottom: 6px; }
.hero p { color: var(--muted); margin: 0 0 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: 13.5px; }
.input, .textarea { width: 100%; border: 1.5px solid var(--line); background: var(--surface); border-radius: 13px; padding: 11px 13px; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.textarea { resize: none; min-height: 110px; line-height: 1.5; font-size: 1.05rem; }
.hint { font-size: 12.5px; color: var(--muted); }
.hint.ok { color: var(--ok); }
.hint.bad { color: var(--like); }
.counter { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); }
.counter.warn { color: var(--warn); }
.counter.bad { color: var(--like); font-weight: 700; }
.switch { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 13px; background: var(--surface-2); cursor: pointer; user-select: none; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 13px; background: var(--line); position: relative; flex: none; transition: background .2s; cursor: pointer; margin-top: 2px; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(18px); }
.err-text { color: var(--like); font-size: 13.5px; font-weight: 600; }
.compose-bar { display: flex; align-items: center; gap: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.tool { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 11px; color: var(--brand); font-weight: 700; font-size: 13.5px; }
.tool:hover { background: var(--brand-soft); }
.tool:disabled { color: var(--muted); }
.attach { display: flex; gap: 8px; overflow-x: auto; padding: 2px; }
.attach .att { position: relative; width: 92px; height: 92px; border-radius: 12px; overflow: hidden; flex: none; background: var(--surface-2); }
.attach .att img, .attach .att video { width: 100%; height: 100%; object-fit: cover; }
.attach .att.bad { outline: 2px solid var(--like); }
.att-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; }
.att-tag { position: absolute; left: 4px; bottom: 4px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 10px; padding: 2px 5px; border-radius: 6px; display: inline-flex; gap: 3px; align-items: center; }
.att-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0, 0, 0, .35); }
.att-prog .bar { height: 100%; background: var(--brand); transition: width .15s; }
.att-err { position: absolute; inset: 0; background: rgba(0, 0, 0, .7); color: #fff; font-size: 10px; padding: 4px; display: flex; align-items: center; justify-content: center; text-align: center; }

/* ---------------------------------------------------------------- sheets */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(8, 8, 10, .55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn .2s both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet { width: 100%; max-width: 500px; max-height: min(88vh, 760px); overflow-y: auto; background: var(--surface); border-radius: 24px; box-shadow: var(--shadow-lg); animation: rise .28s cubic-bezier(.2, .9, .3, 1) both; overscroll-behavior: contain; }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 6px; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.sheet-head h2 { font-size: 18px; font-weight: 800; }
.sheet-body { padding: 8px 18px 20px; }
.menu-list { display: flex; flex-direction: column; padding: 6px 10px 12px; }
.menu-list button { display: flex; align-items: center; gap: 14px; height: 50px; padding: 0 12px; border-radius: 13px; font-weight: 600; text-align: left; }
.menu-list button:hover { background: var(--surface-2); }
.menu-list .danger { color: var(--like); }
@media (max-width: 800px) {
  .overlay { align-items: flex-end; padding: 0; }
  .sheet { max-width: none; border-radius: 24px 24px 0 0; padding-bottom: var(--safe-b); max-height: 92vh; animation: slideUp .3s cubic-bezier(.2, .9, .3, 1) both; }
  @keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
  .sheet::before { content: ""; display: block; width: 38px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; }
}
.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar) + var(--safe-b) + 18px); z-index: 150; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
@media (min-width: 801px) { .toasts { bottom: 28px; } }
.toast { background: var(--ink); color: var(--bg); padding: 11px 17px; border-radius: 13px; font-weight: 600; font-size: 14.5px; box-shadow: var(--shadow-lg); animation: toastIn .25s both; max-width: 480px; }
.toast.err { background: var(--like); color: #fff; }
.toast.out { animation: toastOut .25s both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* -------------------------------------------------------------- comments */
.cmts { display: flex; flex-direction: column; }
.cmt-form { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-bottom: 1px solid var(--line); }
.reply-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 10px; margin-bottom: 6px; }
.reply-chip button { display: inline-flex; }
.cmt-form .textarea { min-height: 44px; height: 44px; font-size: .95rem; padding: 10px 14px; border-radius: 20px; }
.clist { padding: 0 14px; }
.cmt { display: flex; gap: 10px; padding: 12px 0; }
.cmt.reply { padding-left: 6px; }
.cmt-body { flex: 1; min-width: 0; }
.cmt-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.cmt-head b { font-weight: 700; }
.cmt p { margin: 3px 0 0; white-space: pre-wrap; font-size: 14px; }
.cmt-acts { display: flex; gap: 14px; margin-top: 4px; }
.cmt-act { font-size: 12.5px; font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.cmt-act.on { color: var(--like); }
.cmt-act svg { width: 15px; height: 15px; }
.cmt-more { font-size: 13px; font-weight: 700; color: var(--brand); margin-top: 6px; text-align: left; }
.replies { padding-left: 40px; border-left: 2px solid var(--line); margin-left: 13px; margin-top: 4px; }
.empty-mini { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 14px; }
.cmts-sheet { padding: 0 !important; }
.cmts-sheet .cmts { max-height: 70vh; }

/* --------------------------------------------------------------- profile */
.cover { height: 120px; border-radius: var(--radius) var(--radius) 0 0; background: linear-gradient(135deg, hsl(var(--h, 20) 75% 58%), hsl(calc(var(--h, 20) + 50) 75% 52%)); }
.profile-card { overflow: hidden; }
.profile-body { padding: 0 18px 18px; margin-top: -44px; }
.profile-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.profile-body h1 { font-size: 22px; font-weight: 800; margin-top: 10px; display: flex; align-items: center; }
.handle { font-size: 14px; margin-top: 2px; display: flex; align-items: center; }
.bio { margin: 10px 0 0; font-size: 14.5px; }
.joined { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 8px; }
.stats { display: flex; gap: 20px; margin-top: 14px; }
.stats > * { display: flex; flex-direction: column; text-align: left; }
.stats b { font-size: 18px; font-weight: 800; }
.stats span { font-size: 12.5px; color: var(--muted); }
.flist { display: flex; flex-direction: column; }
.mini-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 13px; text-align: left; width: 100%; }
.mini-row:hover { background: var(--surface-2); }
.mini-row .txt { flex: 1; min-width: 0; }
.mini-row b { display: flex; align-items: center; font-size: 14.5px; }
.mini-row small { color: var(--muted); font-size: 12.5px; }
.ic-circle { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }

/* --------------------------------------------------------------- tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.tile { position: relative; aspect-ratio: 1; display: block; overflow: hidden; background: var(--surface-2); }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-text { padding: 10px; font-size: 12.5px; line-height: 1.4; height: 100%; overflow: hidden; }
.tile-badge, .tile-likes { position: absolute; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.tile-badge { top: 6px; right: 6px; }
.tile-likes { bottom: 6px; left: 6px; }
.tile-badge svg, .tile-likes svg { width: 13px; height: 13px; }

/* --------------------------------------------------------------- explore */
.vstrip { margin-bottom: 4px; }
.vstrip-row { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.vstrip-row::-webkit-scrollbar { display: none; }
.vcard { position: relative; flex: none; width: 128px; height: 200px; border-radius: 14px; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow); }
.vcard img { width: 100%; height: 100%; object-fit: cover; }
.vph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); }
.vc-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 8px 8px; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); color: #fff; display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; font-weight: 700; }
.vc-views { display: inline-flex; align-items: center; gap: 4px; opacity: .9; font-weight: 600; }
.search-box { position: relative; }
.search-box svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box .input { padding-left: 42px; height: 46px; border-radius: 23px; }

/* ---------------------------------------------------------- notifications */
.notif { display: flex; gap: 12px; padding: 13px 16px; align-items: flex-start; position: relative; }
.notif.unread { background: var(--brand-soft); }
.n-ava { position: relative; flex: none; }
.n-ic { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 2px solid var(--surface); }
.n-ic svg { width: 12px; height: 12px; }
.n-ic.like, .n-ic.clike { background: var(--like); }
.n-ic.comment, .n-ic.reply { background: #3b82f6; }
.n-ic.follow { background: var(--brand); }
.n-ic.repost, .n-ic.quote { background: var(--ok); }
.n-ic.mention { background: #8b5cf6; }
.notif .txt { flex: 1; min-width: 0; }
.notif small { color: var(--muted); display: block; margin-top: 2px; }
.notif q { color: var(--muted); display: block; margin-top: 4px; font-size: 13.5px; quotes: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* -------------------------------------------------------------- settings */
.list-group { overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 13px 16px; width: 100%; text-align: left; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
button.list-item:hover, a.list-item:hover { background: var(--surface-2); }
.list-item .txt { flex: 1; min-width: 0; }
.list-item small { display: block; color: var(--muted); }
.list-item.danger { color: var(--like); }
.hue-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.hue-pick button { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, hsl(var(--h) 78% 58%), hsl(calc(var(--h) + 45) 78% 50%)); border: 3px solid var(--surface); box-shadow: 0 0 0 2px transparent; }
.hue-pick button.on { box-shadow: 0 0 0 2px var(--brand); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); padding: 4px 6px; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
.auth-card { padding: 24px; max-width: 440px; margin: 24px auto; }
.auth-title { font-size: 24px; font-weight: 800; }
.auth-alt { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.auth-alt button { font-size: 13.5px; font-weight: 700; color: var(--brand); }

/* ------------------------------------------------------------- skeletons */
.skel { border-radius: 10px; background: linear-gradient(90deg, var(--surface-2) 25%, color-mix(in srgb, var(--surface-2) 60%, var(--surface)) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-post { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.skel-line { height: 14px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .7s linear infinite; }
.load-more { display: grid; place-items: center; padding: 18px; color: var(--muted); }
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .big { font-size: 44px; margin-bottom: 8px; }
.empty h3 { color: var(--ink); font-size: 17px; margin-bottom: 6px; }
.empty .btn { margin-top: 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.dot-badge { width: 9px; height: 9px; border-radius: 50%; background: var(--like); box-shadow: 0 0 0 2px var(--surface); }

/* ---------------------------------------------------------------- lightbox */
.lb-overlay { padding: 0; background: rgba(0, 0, 0, .92); }
.lb-sheet { background: transparent; box-shadow: none; max-width: 100vw; max-height: 100vh; border-radius: 0; overflow: visible; animation: fadeIn .2s both; }
.lb-sheet::before { display: none; }
.lightbox { position: relative; width: 100vw; height: 100vh; display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.lightbox img { max-width: 92vw; max-height: 92vh; object-fit: contain; }
.lb-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; z-index: 2; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; z-index: 2; }
.lb-prev { left: 16px; } .lb-next { right: 16px; transform: translateY(-50%) rotate(180deg); }
.lb-count { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: #fff; font-weight: 700; font-size: 13px; background: rgba(255, 255, 255, .12); padding: 5px 12px; border-radius: 10px; }
@media (max-width: 600px) { .lb-nav { display: none; } }

/* ============================================================== VIDEOLAR */
.vwrap { position: fixed; inset: 0; z-index: 60; background: #000; }
.v-back { position: absolute; top: calc(14px + var(--safe-t)); left: 14px; z-index: 10; width: 38px; height: 38px; border-radius: 50%; background: rgba(0, 0, 0, .4); color: #fff; display: grid; place-items: center; }
.v-title { position: absolute; top: calc(20px + var(--safe-t)); left: 0; right: 0; text-align: center; color: #fff; font-weight: 800; font-size: 16px; z-index: 9; pointer-events: none; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.vfeed { height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; outline: none; }
.vfeed::-webkit-scrollbar { display: none; }
.vitem { position: relative; height: 100%; width: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center; background: #000; overflow: hidden; }
.vitem video { width: 100%; height: 100%; }
.vitem video.cover { object-fit: cover; }
.vitem video.contain { object-fit: contain; }
.v-grad { position: absolute; left: 0; right: 0; bottom: 0; height: 45%; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); pointer-events: none; }
.v-flash { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; opacity: 0; pointer-events: none; }
.v-flash svg { width: 64px; height: 64px; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .5)); }
.v-flash.go { animation: flashPop .5s ease both; }
@keyframes flashPop { 0% { opacity: 0; transform: scale(.7); } 30% { opacity: .95; transform: scale(1); } 100% { opacity: 0; transform: scale(1.15); } }
.v-heart { position: absolute; inset: 0; display: grid; place-items: center; color: var(--like); opacity: 0; pointer-events: none; }
.v-heart svg { width: 100px; height: 100px; filter: drop-shadow(0 4px 16px rgba(0, 0, 0, .5)); }
.v-heart.go { animation: heartBig .7s ease both; }
@keyframes heartBig { 0% { opacity: 0; transform: scale(.4) rotate(-8deg); } 35% { opacity: 1; transform: scale(1.15) rotate(0); } 55% { transform: scale(.98); } 100% { opacity: 0; transform: scale(1.05); } }
.v-info { position: absolute; left: 14px; right: 82px; bottom: calc(20px + var(--safe-b)); color: #fff; z-index: 3; }
.v-user { font-weight: 800; font-size: 15px; display: inline-flex; align-items: center; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.v-cap { margin-top: 6px; font-size: 14px; line-height: 1.4; max-height: 3.6em; overflow: hidden; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.v-cap.open { max-height: none; }
.v-side { position: absolute; right: 10px; bottom: calc(24px + var(--safe-b)); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.v-ava { width: 46px; height: 46px; border-radius: 50%; border: 2px solid #fff; position: relative; margin-bottom: 4px; }
.v-follow { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; border: 2px solid #000; }
.v-follow svg { width: 13px; height: 13px; }
.v-btn { display: flex; flex-direction: column; align-items: center; gap: 3px; color: #fff; font-size: 11px; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.v-btn svg { width: 28px; height: 28px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .4)); }
.v-btn.on { color: var(--like); }
.v-mute { position: absolute; top: calc(16px + var(--safe-t)); right: 14px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; display: grid; place-items: center; z-index: 5; }
.v-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .25); z-index: 4; }
.v-prog i { display: block; height: 100%; background: #fff; width: 0; }
.v-sentinel { height: 1px; }
.v-empty { position: fixed; inset: 0; display: grid; place-items: center; color: #fff; text-align: center; padding: 20px; }
.v-empty .big { font-size: 44px; }

/* ---------------------------------------------------------- static pages */
.static-body { background: var(--bg); }
.static { max-width: 720px; margin: 0 auto; padding: 28px 20px 60px; line-height: 1.7; }
.static h1 { font-size: 30px; font-weight: 800; margin: 18px 0 16px; }
.static h2 { font-size: 19px; margin: 26px 0 8px; }
.static a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.static-back { display: inline-block; font-weight: 700; color: var(--muted) !important; text-decoration: none !important; }
.static ul { padding-left: 20px; } .static li { margin: 6px 0; }
.static code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.static-links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13.5px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}


/* Laf Bi v2: DM / games / composer extras */
.dm-layout{display:grid;grid-template-columns:280px 1fr;min-height:560px;border:1px solid var(--line);border-radius:18px;overflow:hidden;background:var(--card)}.dm-list{border-right:1px solid var(--line);overflow:auto}.dm-row{display:flex;width:100%;gap:10px;padding:12px;border:0;border-bottom:1px solid var(--line);background:none;text-align:left;color:inherit;cursor:pointer}.dm-row:hover{background:var(--soft)}.dm-pane{display:flex;flex-direction:column;min-width:0}.dm-head{padding:12px;border-bottom:1px solid var(--line);display:flex;gap:10px;align-items:center}.dm-messages{flex:1;overflow:auto;padding:18px;display:flex;flex-direction:column;gap:8px}.dm-bubble{max-width:75%;align-self:flex-start;padding:10px 13px;border-radius:16px;background:var(--soft);white-space:pre-wrap}.dm-bubble.mine{align-self:flex-end;background:var(--primary);color:#fff}.dm-send{display:flex;gap:8px;padding:12px;border-top:1px solid var(--line)}.dm-send .input{flex:1}.game-grid{grid-template-columns:repeat(4,1fr)}.game-card{display:flex;gap:12px;align-items:center;text-align:left;cursor:pointer}.game-icon{font-size:28px;width:44px;height:44px;display:grid;place-items:center;border-radius:14px;background:var(--soft)}.compose-extra{padding:10px;border:1px solid var(--line);border-radius:14px;background:var(--soft)}.compose-extra .input{margin-bottom:8px}.check{display:flex;align-items:center;gap:6px;margin-top:8px}.ell{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:800px){.dm-layout{grid-template-columns:1fr}.dm-list{max-height:260px;border-right:0;border-bottom:1px solid var(--line)}.game-grid{grid-template-columns:1fr 1fr}}

.post-embed{position:relative;aspect-ratio:16/9;border-radius:14px;overflow:hidden;background:#000;margin-top:10px}.post-embed iframe,.v-embed{width:100%;height:100%;border:0}.poll-card{margin-top:10px;border:1px solid var(--line);border-radius:15px;padding:12px;overflow:hidden}.poll-opt{position:relative;width:100%;min-height:42px;margin-top:8px;border:1px solid var(--line);border-radius:11px;background:var(--soft);overflow:hidden;text-align:left;color:inherit;cursor:pointer}.poll-opt .poll-bar{position:absolute;left:0;top:0;bottom:0;background:currentColor;opacity:.08}.poll-label,.poll-pct{position:relative;z-index:1;padding:10px}.poll-label{display:inline-block}.poll-pct{float:right;font-weight:700}.v-embed{position:absolute;inset:0;aspect-ratio:auto}
