/* ==========================================================================
   Sosyal Ağ — tasarım sistemi
   Koyu tema varsayılan; [data-theme="light"] açık tema.
   ========================================================================== */

:root {
  --bg: #0a0b10;
  --bg-soft: #0f1118;
  --surface: #13161f;
  --surface-2: #1a1e2a;
  --surface-3: #232838;
  --border: rgba(255, 255, 255, .07);
  --border-strong: rgba(255, 255, 255, .13);
  --text: #eceef5;
  --text-2: #b4bacb;
  --muted: #7d859b;

  --violet: #8b6cff;
  --pink: #ff5f9e;
  --amber: #ffb547;
  --mint: #3ee0a8;
  --red: #ff5a6a;
  --brand: var(--violet);
  --brand-grad: linear-gradient(120deg, #8b6cff 0%, #d35cff 45%, #ff5f9e 75%, #ffb547 100%);
  --brand-soft: rgba(139, 108, 255, .14);
  --like: #ff4f7b;
  --like-soft: rgba(255, 79, 123, .12);

  --glass: rgba(10, 11, 16, .72);
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 50px -20px rgba(0,0,0,.6);
  --shadow-pop: 0 24px 60px -12px rgba(0,0,0,.65), 0 0 0 1px var(--border-strong);

  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-display: "Segoe UI Variable Display", "Inter", "Segoe UI", system-ui, sans-serif;

  --nav-w: 264px;
  --main-w: 620px;
  --side-w: 340px;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f4f5fa;
  --bg-soft: #eceef6;
  --surface: #ffffff;
  --surface-2: #f3f4fa;
  --surface-3: #e8eaf3;
  --border: rgba(15, 18, 34, .08);
  --border-strong: rgba(15, 18, 34, .15);
  --text: #12141f;
  --text-2: #3d4356;
  --muted: #6b7286;
  --brand-soft: rgba(139, 108, 255, .12);
  --glass: rgba(255, 255, 255, .75);
  --shadow: 0 1px 2px rgba(15,18,34,.04), 0 12px 32px -16px rgba(15,18,34,.18);
  --shadow-pop: 0 24px 60px -16px rgba(15,18,34,.3), 0 0 0 1px var(--border);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img, svg { display: block; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .9em; background: var(--surface-2); padding: .1em .4em; border-radius: 6px; }
::selection { background: rgba(139, 108, 255, .35); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 8px; }

.icon { width: 22px; height: 22px; flex: none; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grad-text { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% auto; animation: shimmer 6s linear infinite; }

/* ---- Aurora background --------------------------------------------------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span {
  position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%;
  filter: blur(90px); opacity: .22; mix-blend-mode: screen;
  animation: drift 26s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { background: #7b5cff; top: -18vmax; left: -10vmax; }
.aurora span:nth-child(2) { background: #ff4f9a; top: 20vh; right: -18vmax; animation-delay: -8s; animation-duration: 32s; }
.aurora span:nth-child(3) { background: #ffae3d; bottom: -24vmax; left: 30vw; animation-delay: -16s; opacity: .12; }
[data-theme="light"] .aurora span { mix-blend-mode: multiply; opacity: .12; }

/* ---- App shell ------------------------------------------------------------ */
.shell {
  display: grid;
  grid-template-columns: var(--nav-w) minmax(0, var(--main-w)) var(--side-w);
  justify-content: center;
  gap: 28px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}
.main { min-height: 100dvh; border-left: 1px solid var(--border); border-right: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 70%, transparent); }

/* Left nav */
/* Viewport-bound column: logo fixed on top, links scroll in the middle, account stays visible. */
.sidenav { position: sticky; top: 0; height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; display: flex; flex-direction: column; padding: 18px 0 16px; }
.sidenav > .logo { flex-shrink: 0; }
.nav-scroll {
  flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 6px;
  margin: 0 -6px; padding: 3px 6px 8px; /* room for focus rings inside the scroll box */
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.nav-scroll > .theme-toggle { margin-top: auto; }
.nav-foot { flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; padding-top: 8px; border-top: 1px solid transparent; }
.sidenav.is-scrollable .nav-foot { border-top-color: var(--border); }
.logo { display: flex; align-items: center; gap: 12px; padding: 8px 12px 18px; font: 800 22px/1 var(--font-display); letter-spacing: -.02em; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--brand-grad); display: grid; place-items: center; box-shadow: 0 8px 24px -6px rgba(211, 92, 255, .6); position: relative; }
.brand-mark.lg { width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 18px; }
.pulse-dot { width: 34%; height: 34%; border-radius: 50%; background: #fff; animation: heartbeat 1.6s ease-in-out infinite; }
.brand-mark::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid rgba(211, 92, 255, .6); animation: ripple 1.6s ease-out infinite; }

.nav-link {
  display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: 999px;
  font-size: 17px; font-weight: 500; color: var(--text-2);
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
  position: relative;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link:active { transform: scale(.97); }
.nav-link.active { color: var(--text); font-weight: 700; }
.nav-link.active .icon { stroke-width: 2.3; color: var(--violet); }
.nav-link.active::before { content: ""; position: absolute; left: 0; top: 50%; width: 4px; height: 22px; transform: translateY(-50%); border-radius: 4px; background: var(--brand-grad); }

.btn-compose { margin-top: 14px; flex-shrink: 0; }
.nav-scroll > .theme-toggle { flex-shrink: 0; }
.me-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 999px; transition: background .2s; }
.me-card:hover { background: var(--surface-2); }
.me-card .who { min-width: 0; flex: 1; line-height: 1.25; }
.me-card .who b, .me-card .who span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-card .who span { color: var(--muted); font-size: 14px; }

/* Right sidebar */
.sidebar { position: sticky; top: 0; height: 100dvh; overflow-y: auto; padding: 12px 0 24px; display: flex; flex-direction: column; gap: 16px; scrollbar-width: none; }
.search-box { position: relative; }
.search-box input {
  width: 100%; height: 46px; padding: 0 18px 0 46px; border-radius: 999px;
  border: 1px solid transparent; background: var(--surface-2); outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.search-box input:focus { border-color: var(--violet); background: var(--bg); box-shadow: 0 0 0 4px var(--brand-soft); }
.search-box .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 19px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-title { font: 800 19px/1.2 var(--font-display); padding: 16px 18px 6px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.card-title .icon { color: var(--pink); width: 20px; }
.card-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; transition: background .2s; }
.card-row:hover { background: var(--surface-2); }
.card-row .grow { flex: 1; min-width: 0; line-height: 1.3; }
.card-row .grow b, .card-row .grow span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-row .grow span, .card-row small { color: var(--muted); font-size: 13.5px; }
.card-foot { display: block; padding: 14px 18px; color: var(--violet); font-size: 14.5px; }
.card-foot:hover { background: var(--surface-2); }
.trend-rank { color: var(--muted); font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 0 12px; color: var(--muted); font-size: 13px; }

/* Page header (glass) */
.page-head {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  min-height: 58px; padding: calc(8px + var(--safe-t)) 18px 8px;
  background: var(--glass); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
}
.page-head h1 { margin: 0; font: 800 20px/1.2 var(--font-display); letter-spacing: -.02em; }
.page-head .sub { color: var(--muted); font-size: 13px; }
.page-head .head-mobile-avatar { display: none; }
.page-head .spacer { flex: 1; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); transition: background .2s, color .2s, transform .2s var(--spring); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.9); }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.tabs { display: flex; border-bottom: 1px solid var(--border); position: relative; }
.tabs a { flex: 1; text-align: center; padding: 16px 0; color: var(--muted); font-weight: 600; position: relative; transition: color .2s, background .2s; }
.tabs a:hover { background: var(--surface-2); color: var(--text); }
.tabs a.active { color: var(--text); }
.tabs a.active::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 56px; height: 4px; border-radius: 4px; transform: translateX(-50%); background: var(--brand-grad); animation: grow-x .35s var(--spring); }

/* ---- Avatars ------------------------------------------------------------- */
.avatar {
  --h: 260;
  display: inline-grid; place-items: center; flex: none; border-radius: 50%;
  background: linear-gradient(135deg, hsl(var(--h) 85% 62%), hsl(calc(var(--h) + 50) 90% 58%));
  color: #fff; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.25);
  box-shadow: 0 0 0 2px var(--bg);
  user-select: none;
}
.avatar-sm { width: 32px; height: 32px; font-size: 14px; }
.avatar-md { width: 44px; height: 44px; font-size: 18px; }
.avatar-lg { width: 64px; height: 64px; font-size: 26px; }
.avatar-xl { width: 128px; height: 128px; font-size: 52px; box-shadow: 0 0 0 5px var(--bg); }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 20px; border-radius: 999px; font-weight: 700; font-size: 15px; white-space: nowrap;
  transition: transform .2s var(--spring), box-shadow .25s var(--ease), background .2s, opacity .2s, color .2s, border-color .2s;
  border: 1px solid transparent;
}
.btn:active { transform: scale(.95); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-lg { height: 52px; padding: 0 28px; font-size: 17px; }
.btn-sm { height: 34px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand-grad); background-size: 160% 100%; background-position: 0 0; color: #fff; box-shadow: 0 10px 26px -10px rgba(211, 92, 255, .7); }
.btn-primary:not(:disabled):hover { background-position: 100% 0; box-shadow: 0 14px 32px -10px rgba(255, 95, 158, .75); }
.btn-light { background: var(--text); color: var(--bg); }
.btn-light:hover { opacity: .88; }
.btn-ghost { border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--red); color: #fff; }
.btn-follow.following { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-follow.following:hover { color: var(--red); border-color: rgba(255, 90, 106, .5); background: rgba(255, 90, 106, .08); }
.btn-follow.following .lbl-unfollow, .btn-follow.following:hover .lbl-following { display: none; }
.btn-follow.following:hover .lbl-unfollow { display: inline; }
.btn-follow:not(.following) .lbl-following, .btn-follow:not(.following) .lbl-unfollow { display: none; }
.btn-follow.following .lbl-follow { display: none; }

/* ---- Composer ------------------------------------------------------------ */
.composer { display: flex; gap: 14px; padding: 16px 18px 12px; border-bottom: 1px solid var(--border); position: relative; }
.composer .body { flex: 1; min-width: 0; }
.composer textarea {
  width: 100%; min-height: 56px; max-height: 50vh; resize: none; border: 0; outline: none; background: transparent;
  font-size: 19px; line-height: 1.45; padding: 8px 0;
}
.composer textarea::placeholder { color: var(--muted); }
.composer-bar { display: flex; align-items: center; gap: 12px; padding-top: 10px; border-top: 1px solid transparent; transition: border-color .3s; }
.composer.focused .composer-bar { border-top-color: var(--border); }
.composer-hint { color: var(--muted); font-size: 13px; flex: 1; opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s; }
.composer.focused .composer-hint { opacity: 1; transform: none; }
.ring { width: 28px; height: 28px; transform: rotate(-90deg); transition: transform .3s var(--spring); }
.ring circle { fill: none; stroke-width: 3; }
.ring .track { stroke: var(--surface-3); }
.ring .bar { stroke: var(--violet); stroke-linecap: round; transition: stroke-dashoffset .2s var(--ease), stroke .2s; }
.ring.warn .bar { stroke: var(--amber); }
.ring.over .bar { stroke: var(--red); }
.ring.warn { transform: rotate(-90deg) scale(1.2); }
.ring-wrap { position: relative; display: grid; place-items: center; }
.ring-count { position: absolute; font-size: 11px; font-weight: 700; color: var(--muted); }
.ring-wrap.over .ring-count { color: var(--red); }
.composer-reply-to { color: var(--muted); font-size: 14px; padding-bottom: 2px; }
.composer-reply-to a { color: var(--violet); }

/* ---- Posts --------------------------------------------------------------- */
.feed { position: relative; }
.post {
  display: flex; gap: 14px; padding: 16px 18px 10px;
  border-bottom: 1px solid var(--border);
  transition: background .25s var(--ease);
  position: relative; cursor: pointer;
  animation: rise .5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
.post:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.post.fresh { animation: pop-in .6s var(--spring) both; }
.post.fresh::before { content: ""; position: absolute; inset: 0; background: var(--brand-soft); animation: fade-out 2.4s var(--ease) forwards; pointer-events: none; }
.post.removing { animation: collapse .45s var(--ease) forwards; overflow: hidden; }
.post-main { flex: 1; min-width: 0; }
.post-head { display: flex; align-items: center; gap: 6px; font-size: 15px; min-width: 0; }
.post-head .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-head .name:hover { text-decoration: underline; }
.post-head .handle, .post-head .dot, .post-head time { color: var(--muted); white-space: nowrap; }
.post-head .handle { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.post-head time:hover { text-decoration: underline; }
.badge-admin { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--brand-grad); color: #fff; flex: none; }
.badge-admin .icon { width: 11px; height: 11px; stroke-width: 3.2; }
.post-reply-to { color: var(--muted); font-size: 14px; margin-top: 1px; }
.post-reply-to a { color: var(--violet); }
.post-body { margin-top: 3px; font-size: 15.5px; line-height: 1.5; overflow-wrap: anywhere; white-space: normal; }
.post-body a { color: var(--violet); }
.post-body a:hover { text-decoration: underline; }
.post-body a.tag { color: var(--pink); }
.post-actions { display: flex; gap: 4px; margin: 6px 0 0 -9px; max-width: 420px; justify-content: space-between; }
.act {
  display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 10px 0 8px; border-radius: 999px;
  color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; position: relative;
  transition: color .2s, background .2s;
}
.act .icon { width: 19px; height: 19px; transition: transform .3s var(--spring); }
.act:hover .icon { transform: scale(1.12); }
.act-reply:hover { color: var(--violet); background: var(--brand-soft); }
.act-like:hover { color: var(--like); background: var(--like-soft); }
.act-like.liked { color: var(--like); }
.act-like.liked .icon { fill: var(--like); animation: like-pop .5s var(--spring); }
.act-del:hover { color: var(--red); background: rgba(255,90,106,.1); }
.act .count { min-width: 1ch; display: inline-block; }
.count.roll-up { animation: roll-up .35s var(--ease); }
.count.roll-down { animation: roll-down .35s var(--ease); }

/* Heart burst particles */
.burst { position: absolute; left: 17px; top: 18px; width: 0; height: 0; pointer-events: none; }
.burst i { position: absolute; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--c); animation: burst .7s var(--ease) forwards; transform: rotate(var(--a)) translateY(0); }
.burst .ring-burst { position: absolute; width: 36px; height: 36px; left: -18px; top: -18px; border-radius: 50%; border: 2px solid var(--like); animation: ring-burst .5s var(--ease) forwards; }

/* Detail page */
.post-detail { padding: 16px 18px 0; border-bottom: 1px solid var(--border); animation: rise .45s var(--ease) both; }
.post-detail .who { display: flex; gap: 12px; align-items: center; }
.post-detail .who .grow { flex: 1; line-height: 1.3; min-width: 0; }
.post-detail .who b { display: flex; align-items: center; gap: 6px; }
.post-detail .who .grow > span { color: var(--muted); }
.post-detail .post-body { font-size: 20px; line-height: 1.45; margin: 14px 0; }
.post-detail .meta { color: var(--muted); font-size: 14.5px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.post-detail .stats { display: flex; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--border); color: var(--muted); }
.post-detail .stats b { color: var(--text); }
.post-detail .post-actions { justify-content: space-around; max-width: none; margin: 4px 0; }
.parent-post { border-bottom: 0; }
.parent-post::after { content: ""; position: absolute; left: 39px; top: 64px; bottom: -6px; width: 2px; background: var(--border-strong); }

/* Feed states */
.new-pill {
  position: sticky; top: 70px; z-index: 15; margin: 0 auto; height: 0; display: flex; justify-content: center; pointer-events: none;
}
.new-pill button {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 18px; border-radius: 999px;
  background: var(--brand-grad); color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 12px 30px -8px rgba(211,92,255,.7);
  transform: translateY(-30px) scale(.8); opacity: 0; transition: transform .45s var(--spring), opacity .3s;
}
.new-pill button .icon { width: 17px; height: 17px; }
.new-pill.show button { transform: none; opacity: 1; }
.feed-end { text-align: center; color: var(--muted); padding: 34px 20px calc(40px + var(--tabbar-h)); font-size: 14px; }
.sentinel { height: 1px; }
.loader { display: flex; justify-content: center; padding: 26px; }
.loader span { width: 8px; height: 8px; margin: 0 3px; border-radius: 50%; background: var(--violet); animation: bounce 1s var(--ease) infinite; }
.loader span:nth-child(2) { animation-delay: .12s; background: var(--pink); }
.loader span:nth-child(3) { animation-delay: .24s; background: var(--amber); }
.empty { padding: 56px 32px; text-align: center; animation: rise .5s var(--ease) both; }
.empty .emoji { font-size: 44px; margin-bottom: 8px; animation: float 3s ease-in-out infinite; }
.empty h2 { font: 800 26px/1.2 var(--font-display); margin: 0 0 8px; letter-spacing: -.02em; }
.empty p { color: var(--muted); margin: 0 auto 20px; max-width: 360px; }

/* Skeleton */
.skeleton { display: flex; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.sk { background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 8px; }

/* ---- Profile ------------------------------------------------------------- */
.cover { height: 200px; background: var(--brand-grad); background-size: 200% 200%; animation: gradient-pan 14s ease infinite; position: relative; overflow: hidden; }
.cover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 120%, rgba(0,0,0,.35), transparent 60%), radial-gradient(circle at 90% -20%, rgba(255,255,255,.25), transparent 50%); }
.cover-pattern { position: absolute; inset: 0; opacity: .18; background-image: radial-gradient(#fff 1px, transparent 1px); background-size: 18px 18px; }
.profile-top { padding: 0 18px 16px; position: relative; }
.profile-top .avatar-xl { margin-top: -64px; position: relative; animation: pop-in .6s var(--spring) both; }
.profile-actions { position: absolute; right: 18px; top: 14px; display: flex; gap: 8px; }
.profile-name { margin: 12px 0 0; font: 800 23px/1.2 var(--font-display); letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.profile-handle { color: var(--muted); }
.profile-bio { margin: 12px 0 0; white-space: pre-line; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; color: var(--muted); font-size: 14.5px; }
.profile-meta span { display: inline-flex; align-items: center; gap: 6px; }
.profile-meta .icon { width: 17px; height: 17px; }
.profile-stats { display: flex; gap: 20px; margin-top: 12px; font-size: 14.5px; color: var(--muted); }
.profile-stats b { color: var(--text); font-variant-numeric: tabular-nums; }
.pill-banned { display: inline-block; padding: 2px 10px; border-radius: 999px; background: rgba(255,90,106,.15); color: var(--red); font-size: 12px; font-weight: 700; }

/* ---- Forms / auth -------------------------------------------------------- */
.bare { display: grid; place-items: center; padding: 24px 16px calc(24px + var(--safe-b)); }
.auth-card {
  width: 100%; max-width: 440px; padding: 36px 32px; border-radius: 28px;
  background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow-pop);
}
.auth-card h1 { margin: 0 0 6px; font: 800 30px/1.15 var(--font-display); letter-spacing: -.03em; text-align: center; }
.auth-card > .muted { text-align: center; margin: 0 0 24px; }
.auth-switch { text-align: center; margin: 22px 0 0; color: var(--muted); }
.auth-switch a { color: var(--violet); font-weight: 600; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form fieldset { border: 0; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 12px; }
.form legend { font-weight: 700; margin-bottom: 10px; color: var(--text-2); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.field input, .field textarea, .field select {
  height: 50px; padding: 0 16px; border-radius: 14px; background: var(--surface-2); border: 1.5px solid var(--border);
  outline: none; font-size: 16px; transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { height: auto; min-height: 96px; padding: 12px 16px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--violet); box-shadow: 0 0 0 4px var(--brand-soft); background: var(--surface); }
.field.has-error input { border-color: var(--red); }
.field .err { color: var(--red); font-size: 13px; animation: shake .4s; }
.field .help { color: var(--muted); font-size: 13px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--violet); flex: none; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; background: var(--surface-2); border-radius: 14px; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; text-align: center; padding: 10px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted); transition: background .2s, color .2s; cursor: pointer; }
.segmented input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
form:has([value="sqlite"]:checked) .mysql-only { display: none; }
.mysql-only { display: flex; flex-direction: column; gap: 12px; }

.alert { padding: 12px 16px; border-radius: 14px; font-size: 14.5px; margin-bottom: 12px; animation: rise .4s var(--ease) both; }
.alert-error { background: rgba(255,90,106,.12); color: var(--red); border: 1px solid rgba(255,90,106,.25); }
.alert-success { background: rgba(62,224,168,.12); color: var(--mint); border: 1px solid rgba(62,224,168,.25); }
.announcement { margin: 12px 18px 0; padding: 12px 16px; border-radius: 14px; background: var(--brand-soft); border: 1px solid rgba(139,108,255,.25); font-size: 14.5px; display: flex; gap: 10px; align-items: flex-start; }

/* ---- Landing ------------------------------------------------------------- */
.landing { width: 100%; max-width: 1120px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.landing-hero h1 { font: 800 clamp(40px, 6.4vw, 76px)/1.02 var(--font-display); letter-spacing: -.045em; margin: 22px 0 18px; }
.landing-hero p { font-size: clamp(17px, 2vw, 20px); color: var(--text-2); max-width: 520px; margin: 0 0 30px; }
.landing-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.landing-logo { display: flex; align-items: center; gap: 12px; font: 800 24px/1 var(--font-display); }
.landing-logo .brand-mark { margin: 0; }
.float-stack { position: relative; height: 460px; }
.float-card {
  position: absolute; width: 300px; padding: 16px; border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow-pop);
  display: flex; gap: 12px; animation: float 6s ease-in-out infinite;
}
.float-card p { margin: 4px 0 8px; font-size: 14.5px; }
.float-card .meta { display: flex; gap: 14px; color: var(--muted); font-size: 13px; }
.float-card .meta .hot { color: var(--like); }
.float-card:nth-child(1) { top: 10px; left: 0; transform: rotate(-4deg); }
.float-card:nth-child(2) { top: 160px; right: 0; animation-delay: -2s; }
.float-card:nth-child(3) { top: 310px; left: 30px; animation-delay: -4s; transform: rotate(3deg); }
.feature-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13.5px; color: var(--text-2); }

/* ---- Toasts -------------------------------------------------------------- */
.toasts { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  pointer-events: auto; padding: 12px 20px; border-radius: 14px; background: var(--text); color: var(--bg);
  font-weight: 600; font-size: 14.5px; box-shadow: var(--shadow-pop); animation: toast-in .45s var(--spring) both;
  display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px);
}
.toast.error { background: var(--red); color: #fff; }
.toast.success .icon { color: var(--mint); }
.toast.leaving { animation: toast-out .3s var(--ease) forwards; }
.toast .icon { width: 18px; height: 18px; }

/* ---- Mobile chrome (hidden on desktop) ----------------------------------- */
.tabbar, .fab, .sheet-backdrop { display: none; }

/* Bottom sheet composer (mobile) & modal (desktop) */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(5, 6, 10, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s; }
.sheet {
  position: fixed; z-index: 61; left: 50%; top: 8vh; width: min(600px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 24px; box-shadow: var(--shadow-pop);
  transform: translate(-50%, -12px) scale(.97); opacity: 0; pointer-events: none;
  transition: transform .4s var(--spring), opacity .25s;
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 0; }
.sheet .composer { border-bottom: 0; }
.sheet-open .sheet-backdrop { display: block; opacity: 1; }
.sheet-open .sheet { transform: translate(-50%, 0) scale(1); opacity: 1; pointer-events: auto; }
.sheet-grip { display: none; }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 1240px) {
  :root { --nav-w: 88px; }
  .logo span:last-child, .me-card .who, .me-card > .icon { display: none; }
  .nav-link > span:not([class]) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* icon-only, label kept for screen readers */
  .logo { justify-content: center; padding: 8px 0 18px; }
  .nav-link { justify-content: center; padding: 14px; }
  .nav-link.active::before { display: none; }
  .btn-compose { width: 54px; height: 54px; padding: 0; margin-left: auto; margin-right: auto; }
  .btn-compose span { display: none; }
  .me-card { justify-content: center; flex-direction: column; gap: 6px; padding: 8px 0; }
  .sidenav { align-items: center; }
  .nav-scroll, .nav-foot { align-self: stretch; align-items: center; }
}
@media (max-width: 1060px) {
  .shell { grid-template-columns: var(--nav-w) minmax(0, var(--main-w)); }
  .sidebar { display: none; }
}
/* ---- Shared components added in phase 2 ---------------------------------- */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--text); color: var(--bg); font-weight: 700; }
.skip-link:focus { top: 12px; }
.main:focus { outline: none; }
.hide-mobile { }
.m-top, .m-compose { display: none; }
.icon-wrap { position: relative; display: inline-grid; }
.badge { position: absolute; top: -6px; left: 14px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--violet); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.badge[hidden] { display: none; }
.count-pill { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; }
.head-text { min-width: 0; }
.head-text h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forgot-link { align-self: flex-end; color: var(--violet); font-size: 14px; font-weight: 600; padding: 4px 0; min-height: 44px; display: inline-flex; align-items: center; }
.check a, .legal a { color: var(--violet); text-decoration: underline; }
.page-foot { padding: 24px 16px calc(32px + var(--tabbar-h)); }

/* Composer media */
.composer-attach { cursor: pointer; color: var(--violet); }
.composer-attach:hover { background: var(--brand-soft); color: var(--violet); }
.composer :focus-visible + .composer-attach, .composer input[type=file]:focus-visible ~ .composer-attach { outline: 2px solid var(--violet); }
.composer-media { position: relative; margin: 8px 0 4px; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); max-width: 100%; }
.composer-media img { width: 100%; max-height: 320px; object-fit: cover; }
.media-remove { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.65); color: #fff; }
.media-remove .icon { width: 18px; height: 18px; }

/* Post media */
.post-media { display: block; margin-top: 10px; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.post-media img { width: 100%; max-height: 520px; object-fit: cover; }
.post-detail .post-media img { max-height: none; }
.act-report:hover { color: var(--amber); background: rgba(255,181,71,.1); }

/* Notifications */
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); animation: rise .4s var(--ease) both; animation-delay: calc(var(--i) * 30ms); }
.notif.unread { background: color-mix(in srgb, var(--violet) 7%, transparent); }
.notif.unread::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--violet); }
.notif-ico { width: 40px; display: grid; justify-items: end; padding-top: 4px; color: var(--violet); }
.notif-ico .icon { width: 26px; height: 26px; }
.type-like .notif-ico { color: var(--like); }
.type-like .notif-ico .icon { fill: var(--like); }
.type-follow .notif-ico { color: var(--mint); }
.notif-link { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.notif-text { line-height: 1.4; }
.notif-snippet { color: var(--muted); font-size: 14.5px; overflow-wrap: anywhere; }

/* People list */
.person-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.person-row .grow { flex: 1; min-width: 0; line-height: 1.35; }
.person-row .grow b, .person-row .grow > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-row .grow > span { color: var(--muted); font-size: 14px; }
.person-row small { display: block; color: var(--text-2); font-size: 14px; margin-top: 2px; }

/* Settings */
.settings-group { border-bottom: 8px solid var(--bg-soft); }
.settings-group h2 { margin: 0; padding: 18px 18px 6px; font: 700 13px/1.2 var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.settings-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 10px 18px; text-align: left; transition: background .2s; }
.settings-row:hover:not(.static) { background: var(--surface-2); }
.settings-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.settings-row small { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }
.settings-row > .icon:last-child { color: var(--muted); width: 18px; }
.pad-form { padding: 8px 18px 22px; }
.danger-zone h2 { color: var(--red); }
.legal { padding: 20px 18px; line-height: 1.7; overflow-wrap: anywhere; }
.legal-note { margin-top: 24px; font-size: 13.5px; }

/* Profile edit */
.profile-edit .cover { position: relative; }
.media-pick { position: absolute; inset: 0; margin: auto; width: max-content; height: 44px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; background: rgba(0,0,0,.6); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; z-index: 2; }
.media-pick .icon { width: 20px; height: 20px; }
.media-pick.round { width: 44px; padding: 0; justify-content: center; border-radius: 50%; }
input[type=file]:focus-visible + .media-pick, .media-pick:focus-within { outline: 2px solid var(--violet); outline-offset: 2px; }
.edit-avatar { position: relative; width: max-content; margin: -48px 0 0 18px; z-index: 3; }
.edit-avatar .avatar-xl { width: 104px; height: 104px; font-size: 42px; }
.check-row { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.cover.has-image img, .edit-cover.has-image img { width: 100%; height: 100%; object-fit: cover; }
.err[role=alert] { color: var(--red); font-size: 13px; }

/* Dialogs: account menu, report, lightbox */
dialog { color: var(--text); }
.menu-sheet { width: min(420px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 8px; border: 1px solid var(--border-strong); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-pop); overflow-y: auto; }
.menu-sheet::backdrop { background: rgba(5, 6, 10, .55); }
.menu-sheet[open] { animation: pop-in .3s var(--spring); }
.menu-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 14px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu-head .grow { min-width: 0; display: flex; flex-direction: column; }
.menu-head span { color: var(--muted); font-size: 14px; }
.menu-item { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 50px; padding: 0 14px; border-radius: 14px; font-size: 16px; font-weight: 500; text-align: left; }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); }
.menu-item.danger { color: var(--red); }
.menu-item .icon { width: 22px; height: 22px; color: var(--text-2); }
.menu-item.danger .icon { color: var(--red); }
.menu-close { justify-content: center; margin-top: 6px; color: var(--muted); border-top: 1px solid var(--border); border-radius: 0 0 14px 14px; }
.report-form { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.report-form h2 { margin: 0; font: 800 20px/1.2 var(--font-display); }
.report-form p { margin: 0; font-size: 14px; }
.radio-list { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.radio-list label { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--border); cursor: pointer; }
.radio-list label:has(input:checked) { border-color: var(--violet); background: var(--brand-soft); }
.radio-list input { width: 18px; height: 18px; accent-color: var(--violet); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.lightbox { max-width: 100vw; max-height: 100dvh; width: 100vw; height: 100dvh; padding: 0; margin: 0; border: 0; background: rgba(0,0,0,.92); }
.lightbox::backdrop { background: rgba(0,0,0,.9); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: 100vw; max-height: 100dvh; object-fit: contain; }
.lightbox-close { position: fixed; top: calc(12px + var(--safe-t)); right: 12px; width: 44px; height: 44px; background: rgba(255,255,255,.12); color: #fff; }
.sheet[aria-hidden="true"] { visibility: hidden; }
.sheet-open .sheet { visibility: visible; }

/* ---- Calm palette ---------------------------------------------------------
   Neutral surfaces with the existing violet as the single accent; the wide
   violet/pink glow is gone and gradients stay only on the small brand mark. */
.aurora { display: none; }
.btn-primary { background: var(--violet); box-shadow: none; }
.btn-primary:not(:disabled):hover { background: #7656f0; box-shadow: none; }
.grad-text { background: none; color: var(--violet); -webkit-text-fill-color: currentColor; animation: none; }
.cover { background: linear-gradient(135deg, var(--surface-2), var(--surface-3)); animation: none; }
.cover::after { background: radial-gradient(circle at 85% 0%, color-mix(in srgb, var(--violet) 22%, transparent), transparent 55%); }
.cover.has-image::after { display: none; }
.cover-pattern { opacity: .08; }
.tabs a.active::after, .nav-link.active::before { background: var(--violet); }
.new-pill button { background: var(--violet); box-shadow: 0 10px 24px -10px rgba(0,0,0,.6); }
.brand-mark { box-shadow: none; }
.brand-mark::after { display: none; }
.auth-card { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: var(--shadow); }
.post.fresh::before { background: color-mix(in srgb, var(--violet) 10%, transparent); }
.badge-admin { background: var(--violet); }
.post-body a.tag { color: var(--violet); }
.float-card { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface); }
.btn-follow:not(.following) { background: var(--text); }

/* ---- Mobile: "C · Kompakt okuma" ------------------------------------------
   Top bar with search + notifications, a "Neler oluyor?" row at the head of the
   feed, 16px reading text and a labelled bottom navigation. Desktop untouched. */
@media (max-width: 700px) {
  :root { --tabbar-h: 64px; }
  body { font-size: 16px; background: var(--bg); }
  .shell { display: block; padding: 0; }
  .sidenav { display: none; }
  .main { border: 0; padding-bottom: calc(var(--tabbar-h) + 12px + var(--safe-b)); min-height: auto; background: var(--bg); }
  .hide-mobile, .composer.inline { display: none; }

  /* Top bar */
  .m-top { display: block; position: sticky; top: 0; z-index: 30; padding-top: var(--safe-t); background: var(--glass); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--border); }
  .m-top-row { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 8px 0 12px; }
  .m-avatar-btn, .m-brand { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; flex: none; }
  .m-avatar-btn .avatar-sm { width: 34px; height: 34px; font-size: 15px; }
  .m-brand .brand-mark { width: 32px; height: 32px; border-radius: 10px; }
  .m-search { flex: 1; min-width: 0; position: relative; }
  .m-search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
  .m-search input { width: 100%; height: 44px; padding: 0 14px 0 40px; border-radius: 999px; border: 1px solid transparent; background: var(--surface-2); font-size: 16px; outline: none; }
  .m-search input:focus { border-color: var(--violet); background: var(--bg); }
  .m-icon-btn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--text-2); flex: none; }
  .m-icon-btn .icon { width: 24px; height: 24px; }
  .m-icon-btn .badge { top: 4px; left: 24px; }
  .m-tabs { display: flex; }
  .m-tabs a { flex: 1; height: 46px; display: grid; place-items: center; font-weight: 600; font-size: 15px; color: var(--muted); position: relative; }
  .m-tabs a.on { color: var(--text); }
  .m-tabs a.on::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 44px; height: 3px; border-radius: 3px; transform: translateX(-50%); background: var(--violet); }

  /* Compose row at the head of the feed */
  .m-compose { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
  .m-compose .avatar-sm { width: 36px; height: 36px; font-size: 15px; }
  .m-compose-prompt { flex: 1; min-height: 44px; text-align: left; color: var(--muted); font-size: 16px; }

  /* Page headers on inner pages */
  .page-head { min-height: 56px; padding: calc(6px + var(--safe-t)) 8px 6px 4px; gap: 6px; }
  .page-head h1 { font-size: 18px; }
  .page-head .icon-btn, .icon-btn { width: 44px; height: 44px; }
  .page-head .search-box { margin-left: 8px; }
  .page-head .search-box input { height: 44px; font-size: 16px; }
  .page-head .head-mobile-avatar { display: block; }

  /* Posts: compact reading */
  .post { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 12px 14px 2px; }
  .post .avatar-md { width: 36px; height: 36px; font-size: 15px; }
  .post-head { font-size: 15px; }
  .post-head .handle { flex: 0 1 auto; }
  .post-body { font-size: 16px; line-height: 1.5; }
  .post-media { border-radius: 12px; }
  .post-media img { aspect-ratio: 16 / 9; max-height: none; }
  .post-actions { max-width: none; margin: 2px 0 0 -12px; justify-content: flex-start; gap: 4px; }
  .act { height: 44px; min-width: 44px; padding: 0 12px 0 10px; justify-content: center; }
  .act .icon { width: 20px; height: 20px; }
  .act-like { margin-right: auto; }
  .parent-post::after { left: 31px; top: 54px; }
  .post-detail { padding: 14px 14px 0; }
  .post-detail .post-body { font-size: 18px; }
  .post-detail .post-actions { justify-content: space-around; margin-left: 0; }
  .post-detail .act-like { margin-right: 0; }
  .composer { padding: 12px 14px 10px; gap: 10px; }
  .composer textarea { font-size: 17px; }

  /* Touch targets */
  .btn { min-height: 44px; }
  .btn-sm { height: 44px; padding: 0 16px; }
  .tabs a { padding: 0; min-height: 48px; display: grid; place-items: center; }
  .card-row, .person-row { min-height: 60px; padding-left: 14px; padding-right: 14px; }
  .profile-stats a { min-height: 44px; display: inline-flex; align-items: center; gap: 4px; }
  .profile-meta a { min-height: 32px; display: inline-flex; align-items: center; gap: 6px; }
  .footer-links a { min-height: 44px; display: inline-flex; align-items: center; }
  .check { min-height: 44px; align-items: center; }
  .notif { padding: 12px 14px; grid-template-columns: 32px minmax(0, 1fr); }
  .notif-ico { width: 32px; }

  /* Labelled bottom navigation */
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
    background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--border);
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); min-width: 0; }
  .tabbar .ic { position: relative; width: 56px; height: 30px; border-radius: 15px; display: grid; place-items: center; transition: background .2s; }
  .tabbar .ic .icon { width: 22px; height: 22px; }
  .tabbar .lbl { font-size: 11.5px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
  .tabbar a.active { color: var(--text); }
  .tabbar a.active .ic { background: var(--brand-soft); color: var(--violet); }
  .tabbar a.active .icon { stroke-width: 2.2; }
  .tabbar .badge { top: -2px; left: 32px; }

  /* Bottom sheet composer; follows the on-screen keyboard via --kb (set in app.js) */
  .sheet {
    left: 0; right: 0; top: auto; bottom: var(--kb, 0px); width: 100%;
    border-radius: 22px 22px 0 0; padding-bottom: var(--safe-b);
    transform: translateY(100%); transition: transform .4s var(--ease), bottom .2s;
    max-height: calc(100dvh - var(--kb, 0px) - 24px); overflow-y: auto;
  }
  .sheet-open .sheet { transform: translateY(0); }
  .sheet-grip { display: block; width: 40px; height: 5px; border-radius: 5px; background: var(--surface-3); margin: 8px auto 0; }
  .sheet .composer textarea { font-size: 17px; min-height: 110px; }
  .menu-sheet { margin: auto auto 0; width: 100%; max-width: 100%; border-radius: 22px 22px 0 0; padding-bottom: calc(8px + var(--safe-b)); border-bottom: 0; }

  .toasts { bottom: calc(var(--tabbar-h) + 16px + var(--safe-b)); }
  .new-pill { top: 118px; }

  /* Profile */
  .cover { height: 128px; }
  .avatar-xl { width: 84px; height: 84px; font-size: 34px; }
  .profile-top { padding: 0 14px 14px; }
  .profile-top .avatar-xl { margin-top: -42px; }
  .profile-actions { right: 14px; top: 12px; }
  .profile-name { font-size: 21px; flex-wrap: wrap; }
  .profile-name-text { overflow-wrap: anywhere; }
  .edit-avatar { margin-left: 14px; margin-top: -42px; }
  .edit-avatar .avatar-xl { width: 88px; height: 88px; }

  /* Landing & auth */
  .bare { place-items: start center; padding: calc(24px + var(--safe-t)) 16px calc(24px + var(--safe-b)); }
  .landing { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .landing-hero h1 { font-size: clamp(34px, 10vw, 44px); }
  .landing-hero p { margin-left: auto; margin-right: auto; font-size: 17px; }
  .landing-cta, .feature-chips, .landing-logo { justify-content: center; }
  .landing-cta .btn { flex: 1 1 100%; }
  .float-stack { display: none; }
  .auth-card { padding: 24px 18px; border-radius: 20px; }
  .auth-card h1 { font-size: 26px; }
  .field input, .field select { height: 52px; font-size: 16px; }
  .field textarea { font-size: 16px; }
  .announcement { margin: 10px 14px 0; }
  .empty { padding: 40px 20px; }
  .feed-end { padding-bottom: 32px; }
}
@media (max-width: 370px) {
  .tabbar .ic { width: 48px; }
  .tabbar .lbl { font-size: 11px; }
  .m-top-row { gap: 4px; padding-left: 8px; }
  .post-head .handle { display: none; }
}

/* ---- Keyframes ----------------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { 0% { opacity: 0; transform: scale(.85); } 100% { opacity: 1; transform: none; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes collapse { 0% { opacity: 1; max-height: 600px; } 40% { opacity: 0; transform: translateX(30px); } 100% { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; transform: translateX(30px); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(8vw, 6vh) scale(1.15); } 100% { transform: translate(-6vw, 10vh) scale(.95); } }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.35); } 30% { transform: scale(1); } 45% { transform: scale(1.2); } }
@keyframes ripple { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes like-pop { 0% { transform: scale(1); } 30% { transform: scale(.6); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes burst { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(1); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-26px) scale(.3); } }
@keyframes ring-burst { 0% { transform: scale(.2); opacity: 1; border-width: 10px; } 100% { transform: scale(1.1); opacity: 0; border-width: 1px; } }
@keyframes roll-up { 0% { transform: translateY(70%); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes roll-down { 0% { transform: translateY(-70%); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-9px); opacity: 1; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes gradient-pan { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes grow-x { from { width: 0; } }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(20px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px) scale(.95); } }

.reveal { animation: rise .7s var(--ease) both; }
.reveal-2 { animation: rise .7s var(--ease) .12s both; }
.reveal-3 { animation: rise .7s var(--ease) .24s both; }

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

/* Mobile touch-target fixes from the 360/390/430 audit */
@media (max-width: 700px) {
  .head-mobile-avatar { width: 44px; height: 44px; display: grid !important; place-items: center; flex: none; }
  .footer-links a { min-width: 44px; justify-content: center; }
  .post-detail .who a.grow { min-height: 44px; display: flex; flex-direction: column; justify-content: center; }
  .act { height: 46px; min-width: 46px; }
}
.search-head { flex: 1; min-width: 0; }

/* Video posts */
.post-video { background: #000; }
.post-video video, .composer-media video { display: block; width: 100%; max-height: 520px; background: #000; }
.composer-media video { max-height: 320px; }
@media (max-width: 700px) { .post-video video { max-height: 70vh; } }

/* ---- Direct messages ------------------------------------------------------ */
.conv-list, .live-list, .user-results { list-style: none; margin: 0; padding: 0; }
.conv-row, .live-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; min-height: 68px; border-bottom: 1px solid var(--border); transition: background .2s; }
.conv-row:hover, .live-row:hover { background: var(--surface-2); }
.conv-row .grow, .live-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.conv-top { display: flex; gap: 6px; align-items: baseline; min-width: 0; white-space: nowrap; }
.conv-top b { overflow: hidden; text-overflow: ellipsis; }
.conv-top .muted { overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.conv-top time { margin-left: auto; font-size: 13px; flex: none; }
.conv-snippet { color: var(--muted); font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-row.unread .conv-snippet { color: var(--text); font-weight: 600; }
.count-pill { background: var(--violet); }
.user-pick { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 6px 10px; border-radius: 12px; text-align: left; }
.user-pick:hover, .user-pick:focus-visible { background: var(--surface-2); }
.user-pick .grow { display: flex; flex-direction: column; }
.user-pick .grow span { color: var(--muted); font-size: 14px; }
.user-results li.muted { padding: 8px 10px; }

.thread { display: flex; flex-direction: column; height: 100dvh; }
.thread-head { flex: none; }
.thread-who { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 44px; }
.thread-who .head-text { display: flex; flex-direction: column; line-height: 1.2; }
.thread-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-scroll { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; overscroll-behavior: contain; }
.thread-older { align-self: center; margin-bottom: 10px; }
.thread-empty { text-align: center; margin: auto; }
.msgs { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.msg { display: flex; align-items: flex-end; gap: 4px; max-width: 86%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.bubble { padding: 8px 12px 6px; border-radius: 18px 18px 18px 6px; background: var(--surface-2); border: 1px solid var(--border); min-width: 64px; overflow-wrap: anywhere; }
.msg.mine .bubble { background: var(--violet); color: #fff; border-color: transparent; border-radius: 18px 18px 6px 18px; }
.msg.mine .bubble a { color: #fff; text-decoration: underline; }
.msg.deleted .bubble { background: transparent; border: 1px dashed var(--border-strong); color: var(--muted); }
.msg-deleted { display: inline-flex; align-items: center; gap: 6px; font-style: italic; font-size: 14.5px; }
.msg-deleted .icon { width: 16px; height: 16px; }
.msg-text { font-size: 16px; line-height: 1.4; }
.msg-media { display: block; margin: -2px -6px 6px; border-radius: 14px; overflow: hidden; max-width: 280px; background: #000; }
.msg-media img, .msg-media video { display: block; width: 100%; max-height: 360px; object-fit: cover; }
.msg-meta { display: flex; gap: 6px; justify-content: flex-end; align-items: center; font-size: 11.5px; opacity: .75; margin-top: 2px; }
.msg-edited { font-style: italic; }
.msg-status { font-weight: 700; letter-spacing: -2px; }
.msg.mine .status-read { color: #c9f7e3; opacity: 1; }
.msg-more { width: 44px; height: 44px; margin: 0 -4px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); opacity: 0; transition: opacity .2s; flex: none; }
.msg:hover .msg-more, .msg-more:focus-visible { opacity: 1; }
.msg-more .icon { width: 18px; height: 18px; }
@media (hover: none) { .msg-more { opacity: 1; } }   /* touch: always visible, full contrast */
.dm-composer { flex: none; display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px calc(8px + var(--safe-b)); border-top: 1px solid var(--border); background: var(--bg); }
.dm-input { flex: 1; min-width: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 22px; padding: 4px 6px 4px 14px; }
.dm-input:focus-within { border-color: var(--violet); }
.dm-input textarea { display: block; width: 100%; min-height: 36px; max-height: 140px; resize: none; border: 0; outline: none; background: transparent; font-size: 16px; line-height: 1.4; padding: 8px 0; }
.dm-attach, .dm-editing { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; color: var(--violet); padding-top: 4px; }
.dm-attach span, .dm-editing span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-send { width: 46px; height: 46px; padding: 0; border-radius: 50%; flex: none; }
.dm-send .icon { width: 20px; height: 20px; }
.thread-blocked { flex: none; padding: 16px 18px calc(16px + var(--safe-b)); text-align: center; color: var(--muted); border-top: 1px solid var(--border); }
body.is-thread .announcement { display: none; }
@media (min-width: 701px) { .thread { height: 100dvh; position: sticky; top: 0; } }
@media (max-width: 700px) {
  body.is-thread .tabbar { display: none; }
  body.is-thread .main { padding-bottom: 0; }
  .thread { height: 100dvh; height: calc(100dvh - var(--kb, 0px)); }
  .msg { max-width: 88%; }
}

/* ---- Calls ------------------------------------------------------------------ */
.call { position: fixed; inset: 0; z-index: 90; background: #07080c; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: calc(28px + var(--safe-t)) 20px calc(28px + var(--safe-b)); }
.call[hidden] { display: none; }
body.in-call { overflow: hidden; }
.call-remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; display: none; }
.call.is-video.connected .call-remote { display: block; }
.call-info { position: relative; text-align: center; margin-top: 8vh; }
.call.is-video.connected .call-info { margin-top: 0; text-shadow: 0 1px 4px rgba(0,0,0,.7); }
.call.is-video.connected .call-avatar { display: none; }
.call-avatar .avatar { margin: 0 auto 16px; width: 112px; height: 112px; font-size: 44px; box-shadow: none; }
.call h2 { margin: 0; font: 700 24px/1.2 var(--font-display); }
.call-state { margin: 8px 0 0; color: rgba(255,255,255,.75); font-variant-numeric: tabular-nums; }
.call-local { position: absolute; right: 16px; top: calc(16px + var(--safe-t)); width: 110px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; border: 2px solid rgba(255,255,255,.25); background: #111; transform: scaleX(-1); }
.call-actions { position: relative; display: flex; gap: 22px; justify-content: center; }
.call-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #fff; font-size: 12.5px; min-width: 64px; }
.call-btn > .icon, .call-btn .on .icon, .call-btn .off .icon { width: 26px; height: 26px; }
.call-btn::before { content: none; }
.call-btn > .icon, .call-btn .on, .call-btn .off { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,.14); }
.call-btn .off { display: none; }
.call-btn.is-off .on { display: none; }
.call-btn.is-off .off { display: grid; background: #fff; color: #111; }
.call-btn.decline > .icon { background: var(--red); }
.call-btn.accept > .icon { background: #22c55e; }

/* ---- Live ------------------------------------------------------------------- */
.live-start { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.live-start .field { flex: 1 1 220px; }
.live-start .help { flex-basis: 100%; margin: 0; }
.live-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.live-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(255,90,106,.14); color: var(--red); font-size: 12px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: heartbeat 1.6s ease-in-out infinite; flex: none; }
.live-stage { position: relative; display: grid; grid-template-columns: 1fr; gap: 4px; background: #000; aspect-ratio: 16 / 9; }
.live-stage.two { grid-template-columns: 1fr 1fr; }
.live-tile { position: relative; min-height: 0; background: #0b0c10; }
.live-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-name { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 12.5px; font-weight: 600; }
.live-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; text-align: center; color: #fff; background: rgba(7,8,12,.82); }
.live-overlay[hidden] { display: none; }
.live-overlay p { margin: 0; max-width: 320px; }
.live-controls { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.live-panel, .live-chat { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.live-panel h2, .live-chat h2 { margin: 0 0 8px; font: 700 13px/1.2 var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.live-panel ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.live-panel li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.live-panel li .grow { flex: 1; min-width: 0; }
.chat-log { list-style: none; margin: 0 0 10px; padding: 0; max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.chat-log li { overflow-wrap: anywhere; }
.chat-log li.deleted { color: var(--muted); font-style: italic; }
.chat-del { margin-left: 8px; color: var(--muted); font-size: 12.5px; min-height: 32px; padding: 0 6px; }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); font-size: 16px; outline: none; }
.chat-form input:focus { border-color: var(--violet); }
@media (max-width: 700px) {
  .live-stage { aspect-ratio: 3 / 4; }
  .live-stage.two { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .live-controls .btn { flex: 1 1 auto; }
  .call-local { width: 96px; }
}

/* Profile media grid */
.media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 3px; }
.media-tile { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--surface-2); border-radius: 4px; }
.media-tile img, .media-tile video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s var(--ease); pointer-events: none; }
.media-tile:hover img, .media-tile:hover video { transform: scale(1.04); }
.media-tile:focus-visible { outline: 3px solid var(--violet); outline-offset: -3px; }
.media-tile-badge { position: absolute; right: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 8px; background: rgba(0,0,0,.7); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.media-tile-badge .icon { width: 14px; height: 14px; }
@media (min-width: 701px) { .media-grid { gap: 4px; padding: 4px; } }

/* ==========================================================================
   Design system v2 — neutral surfaces, ink text, one restrained accent.
   Replaces the violet/pink look. The legacy token name --violet is kept as the
   single (turquoise) accent so every existing rule follows; --accent-ink is text on it.
   ========================================================================== */
:root {
  --bg: #0c0e12;
  --bg-soft: #111419;
  --surface: #15181e;
  --surface-2: #1b1f26;
  --surface-3: #262b34;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .15);
  --text: #eceff3;
  --text-2: #c2c8d1;
  --muted: #8e97a6;
  /* Brand #1DA1F2 (user's choice). --brand-fill = the one filled CTA per screen and selected indicators;
     --violet = accent for text, thin icons, focus and borders (role-specific contrast). */
  --brand-fill: #1da1f2;
  --brand-fill-hover: #4db5f5;
  --brand-fill-pressed: #1a91da;
  --brand-edge: transparent;  /* dark theme: the fill itself stands out */
  --accent-ink: #0f1419;      /* text on brand fill: 6.55:1 (hover 8.15, pressed 5.38) */
  --violet: #1da1f2;          /* text/icon/focus on dark surfaces: 5.85–6.84:1 */
  --accent-hover: #4db5f5;
  --brand-soft: rgba(29, 161, 242, .14);
  --success: #4ade80;
  --success-soft: rgba(74, 222, 128, .12);
  --brand-grad: var(--violet);
  --pink: var(--violet);
  --like: #f2555a;
  --like-soft: rgba(242, 85, 90, .12);
  --red: #f2555a;
  --glass: rgba(12, 14, 18, .86);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-pop: 0 12px 32px -8px rgba(0, 0, 0, .55), 0 0 0 1px var(--border-strong);
  --radius: 14px;
}
[data-theme="light"] {
  --bg: #f5f6f8;
  --bg-soft: #eceef1;
  --surface: #ffffff;
  --surface-2: #f1f3f5;
  --surface-3: #e3e6ea;
  --border: #e2e5e9;
  --border-strong: #cbd1d8;
  --text: #0f1720;
  --text-2: #374151;
  --muted: #5b6574;
  --brand-fill: #1da1f2;
  --brand-fill-hover: #4db5f5;
  --brand-fill-pressed: #1a91da;
  --brand-edge: #1a8cd8;      /* 1px edge of the fill on light surfaces: 3.36:1 vs --bg */
  --accent-ink: #0f1419;
  --violet: #0a6fad;          /* darker #1DA1F2 derivative for text/icons/focus: 4.85–5.40:1 */
  --accent-hover: #085d91;
  --brand-soft: #e8f5fe;      /* --violet on it 4.86:1 */
  --success: #15803d;
  --success-soft: #e8f5ec;
  --like: #d92d3a;
  --like-soft: #fdecee;
  --red: #c8303a;
  --glass: rgba(255, 255, 255, .9);
  --shadow: 0 1px 2px rgba(15, 23, 32, .06), 0 1px 1px rgba(15, 23, 32, .04);
  --shadow-pop: 0 12px 32px -10px rgba(15, 23, 32, .22), 0 0 0 1px var(--border);
}
::selection { background: color-mix(in srgb, var(--violet) 30%, transparent); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 10px; }

/* Brand mark: ink tile with an accent dot instead of the gradient blob */
.brand-mark { background: var(--text); box-shadow: none; border-radius: 10px; }
.brand-mark .pulse-dot { background: var(--violet); }
.brand-mark.lg { border-radius: 14px; }

/* ---- Buttons ---------------------------------------------------------------- */
.btn {
  height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 600; font-size: 15px; letter-spacing: .005em;
  border: 1px solid transparent; box-shadow: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.btn:active:not(:disabled):not([aria-disabled="true"]) { transform: translateY(1px); }
.btn-sm { height: 36px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.btn-lg { height: 52px; padding: 0 24px; border-radius: 14px; font-size: 16px; }
.btn .icon { width: 18px; height: 18px; }

.btn-primary { background: var(--violet); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
.btn-primary:not(:disabled):hover { background: var(--accent-hover); box-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
.btn-light { background: var(--text); color: var(--bg); }
.btn-light:not(:disabled):hover { opacity: 1; background: color-mix(in srgb, var(--text) 86%, var(--bg)); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:not(:disabled):hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--text) 30%, transparent); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:not(:disabled):hover { background: color-mix(in srgb, var(--red) 88%, #000); }
.btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn[aria-busy="true"] { position: relative; color: transparent !important; pointer-events: none; }
.btn[aria-busy="true"]::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--accent-ink) var(--accent-ink) transparent transparent;
  animation: spin .7s linear infinite;
}
.btn-ghost[aria-busy="true"]::after, .btn-light[aria-busy="true"]::after { border-color: var(--text) var(--text) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn-follow:not(.following) { background: var(--text); color: var(--bg); }
.btn-follow.following { background: var(--surface); border-color: var(--border-strong); }
.btn-compose { border-radius: 14px; }
.icon-btn { border-radius: 12px; }
.fab { border-radius: 16px; background: var(--violet); color: var(--accent-ink); box-shadow: var(--shadow-pop); }

/* ---- Inputs, chips, tabs, pills: square-ish, not capsules ---------------------- */
.search-box input, .m-search input { border-radius: 12px; }
.field input, .field textarea, .field select { border-radius: 12px; border-width: 1px; }
.field input:focus, .field textarea:focus, .field select:focus { box-shadow: 0 0 0 3px var(--brand-soft); }
.chip { border-radius: 10px; }
.segmented, .segmented span { border-radius: 10px; }
.new-pill button { border-radius: 12px; background: var(--text); color: var(--bg); }
.tabs a.active::after, .m-tabs a.on::after { height: 3px; border-radius: 3px 3px 0 0; background: var(--violet); }
.nav-link { border-radius: 12px; }
.nav-link.active .icon { color: var(--violet); }
.me-card { border-radius: 14px; }
.card { border-radius: 14px; }
.auth-card { border-radius: 16px; box-shadow: var(--shadow-pop); }
.menu-sheet { border-radius: 16px; }
.menu-item { border-radius: 10px; }
.sheet { border-radius: 16px; }
.toast { border-radius: 12px; }
.count-pill, .badge { background: var(--like); color: #fff; }
.live-badge { border-radius: 8px; }
.media-pick { border-radius: 10px; }
.radio-list label { border-radius: 10px; }
.post-body a, .post-body a.tag, .grad-text, .card-foot, .auth-switch a, .forgot-link, .link { color: var(--violet); }
.msg.mine .bubble { background: var(--violet); color: var(--accent-ink); }
.msg.mine .bubble a { color: var(--accent-ink); }
.msg.mine .status-read { color: var(--accent-ink); opacity: 1; }
.tabbar a.active .ic { background: var(--brand-soft); color: var(--violet); }
.badge-admin { background: var(--violet); color: var(--accent-ink); }
.cover { background: linear-gradient(160deg, var(--surface-2), var(--surface-3)); }
.cover::after { background: none; }
.chips .chip.on { background: var(--brand-soft); border-color: color-mix(in srgb, var(--violet) 45%, transparent); }
.switch input:checked + .track { background: var(--violet); }
.alert-success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 35%, transparent); }
.toast.success .icon { color: var(--success); }
.call-btn.accept > .icon { background: #16a34a; }

/* ---- Landing --------------------------------------------------------------------- */
.landing-hero h1 { letter-spacing: -.035em; }
.browse-link { margin: 18px 0 0; }
.browse-link a { color: var(--text-2); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 44px; }
.browse-link a:hover { color: var(--text); }
.store-links { margin-top: 26px; }
.store-title { margin: 0 0 12px; font: 600 13px/1.3 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.store-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store-badge { display: inline-block; padding: 12px; margin: -12px; border-radius: 10px; } /* ≥ ¼ badge-height clear space */
.store-badge img { display: block; height: 48px; width: auto; }
.store-text { gap: 10px; }
.store-text.is-soon { cursor: default; color: var(--muted); }
.soon-tag { font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); }
.store-legal { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; max-width: 520px; }
.float-card { border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-pop); }
.float-card .meta .hot { color: var(--like); }

/* Admin: store settings */
.segmented.three { grid-template-columns: repeat(3, 1fr); }
.store-admin { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }

@media (max-width: 700px) {
  .btn-sm { height: 44px; border-radius: 10px; }
  .landing-cta .btn { flex: 1 1 100%; }
  .store-row { justify-content: center; }
  .store-row .btn { flex: 1 1 100%; }
  .browse-link { text-align: center; }
  .store-title, .store-legal { text-align: center; margin-left: auto; margin-right: auto; }
}

/* Profile → DM */
.btn-msg { gap: 8px; min-width: 44px; }
.profile-actions { align-items: center; }
@media (max-width: 420px) {
  .btn-msg { width: 44px; padding: 0; }
  .btn-msg .btn-msg-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.thread-blocked { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; }.dm-input textarea { min-height: 44px; padding: 11px 0; }

/* Landing sample label, KVKK controller box */
.float-stack .sample-label { position: absolute; top: -28px; left: 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.float-card { pointer-events: none; }
.legal-box { padding: 12px 14px; margin-bottom: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
/* Toasts: readable width; above the DM composer on the thread screen */
.toasts { width: max-content; max-width: calc(100vw - 32px); }
.toast { max-width: 100%; }
body.is-thread .toasts { bottom: calc(84px + var(--safe-b)); }

/* Official store badges: unmodified artwork, equal visible height.
   Google's PNG carries transparent padding (visible 192/250 of its height), so it is drawn
   taller to match the App Store badge; nothing is cropped, recoloured or stretched. */
.store-row { align-items: center; gap: 12px 16px; }
.store-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; min-width: 44px; padding: 0; margin: 0; border-radius: 10px; line-height: 0; }
.store-badge img { display: block; width: auto; max-width: none; }
.badge-app_store img { height: 48px; }          /* ≥ 40 px on screen (Apple) */
.badge-google_play img { height: 63px; margin: -7px 0; } /* visible ≈ 48 px, same as Apple */
a.store-badge:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }
a.store-badge:hover img { opacity: .9; }
.store-soon { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px dashed var(--border-strong); color: var(--muted); font-weight: 600; font-size: 14.5px; }
.store-links.is-preview .store-title { color: var(--red); }
@media (max-width: 420px) {
  .store-row { gap: 10px 12px; }
  .badge-app_store img { height: 40px; }
  .badge-google_play img { height: 53px; margin: -6px 0; }  /* visible ≈ 41 px */
  .store-badge { min-height: 44px; }
}
.store-legal { margin-top: 18px; font-size: 11.5px; }

/* ---- Composer tools ------------------------------------------------------- */
.composer-tool { width: 40px; height: 40px; color: var(--violet); }
.composer-tool .icon { width: 21px; height: 21px; }
.composer-bar { flex-wrap: wrap; gap: 6px 8px; }
.composer-hint { min-width: 0; }
.alt-field { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 2px; font-size: 13px; color: var(--muted); }
.alt-field input { height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 15px; color: var(--text); }
.alt-field input:focus { outline: 2px solid var(--violet); outline-offset: 1px; }
.upload-progress { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin: 6px 0; }
.upload-progress span { display: block; height: 100%; width: 0; background: var(--violet); transition: width .2s; }
.draft-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0 6px; font-size: 13px; color: var(--muted); }
.draft-note button { color: var(--violet); font-weight: 600; min-height: 32px; text-decoration: underline; }
.act-more { margin-left: auto; }
.post-actions .act-more { margin-left: auto; }
.live-prep-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.dm-emoji { flex: none; width: 44px; height: 44px; color: var(--muted); }
.m-compose .icon-btn { width: 44px; height: 44px; color: var(--violet); flex: none; }
form[aria-busy="true"] textarea { opacity: .7; }

/* ---- Emoji picker ------------------------------------------------------------- */
.emoji-picker { position: fixed; margin: 0; width: min(352px, calc(100vw - 16px)); max-height: min(420px, calc(100dvh - 16px)); padding: 0; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); z-index: 80; display: none; flex-direction: column; overflow: hidden; }
.emoji-picker[open] { display: flex; }
.emoji-picker.as-sheet { inset: auto 0 0 0; width: 100%; max-width: 100%; max-height: 62dvh; border-radius: 16px 16px 0 0; padding-bottom: var(--safe-b); }
.emoji-picker::backdrop { background: rgba(5, 6, 10, .4); }
.ep-head { display: flex; align-items: center; gap: 6px; padding: 8px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ep-search { flex: 1 1 160px; min-width: 0; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font-size: 16px; }
.ep-search:focus { outline: 2px solid var(--violet); outline-offset: 1px; }
.ep-tones { display: flex; gap: 2px; }
.ep-tone { width: 30px; height: 36px; border-radius: 8px; font-size: 17px; line-height: 1; }
.ep-tone[aria-checked="true"] { background: var(--brand-soft); outline: 2px solid var(--violet); }
.ep-close { width: 36px; height: 36px; }
.ep-cats { display: flex; gap: 2px; padding: 4px 6px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.ep-cats button { flex: none; width: 40px; height: 40px; border-radius: 8px; font-size: 20px; }
.ep-cats button[aria-selected="true"] { background: var(--brand-soft); }
.ep-body { overflow-y: auto; padding: 4px 8px 10px; overscroll-behavior: contain; }
.ep-body:focus { outline: none; }
.ep-body h3 { position: sticky; top: 0; margin: 0; padding: 8px 2px 4px; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface); text-transform: uppercase; letter-spacing: .05em; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); }
.ep-e { height: 40px; border-radius: 8px; font-size: 24px; line-height: 1; }
.ep-e:hover, .ep-e:focus-visible { background: var(--surface-2); outline: 2px solid var(--violet); outline-offset: -2px; }
.ep-empty { color: var(--muted); font-size: 14px; margin: 8px 2px; }
@media (max-width: 700px) {
  .ep-e { height: 44px; font-size: 26px; }
  .ep-grid { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
  .ep-tone { width: 32px; height: 40px; }
  .ep-cats button, .ep-close { width: 44px; height: 44px; }
}

/* ---- Suggestions ---------------------------------------------------------------- */
.suggest-box { position: fixed; z-index: 85; margin: 0; padding: 4px; list-style: none; max-height: 240px; overflow-y: auto; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-pop); }
.suggest-box li { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 8px; border-radius: 8px; cursor: pointer; }
.suggest-box li[aria-selected="true"] { background: var(--brand-soft); }
.suggest-box .grow { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.suggest-box b, .suggest-box small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-box small { color: var(--muted); font-size: 12.5px; }
.sg-hash { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-weight: 800; color: var(--text-2); flex: none; }
.ep-head, .ep-cats { flex: none; }
.ep-body { flex: 1 1 auto; min-height: 0; }
.ep-tones { margin-left: auto; }
@media (max-width: 700px) { .ep-search { flex-basis: 100%; } .ep-tones { margin-left: 0; } .ep-close { margin-left: auto; } }

/* ==========================================================================
   Visitor landing (docs/KARAR-LANDING.md): neutral, product-first, 8px scale.
   ========================================================================== */
.landing-page { display: block; padding: 0; min-height: 100dvh; background: var(--bg); }
.lp-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.lp-btn { height: 48px; padding: 0 20px; border-radius: 12px; font-size: 16px; }
.lp-header { height: 68px; border-bottom: 1px solid var(--border); background: var(--bg); }
.lp-header-row { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lp-logo { display: inline-flex; align-items: center; gap: 10px; font: 800 20px/1 var(--font-display); letter-spacing: -.02em; color: var(--text); min-height: 44px; }
.lp-logo .brand-mark { width: 32px; height: 32px; margin: 0; }
.lp-nav { display: flex; align-items: center; gap: 8px; }
.lp-nav-link { display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; border-radius: 12px; font-weight: 600; color: var(--text-2); }
.lp-nav-link:hover { color: var(--text); background: var(--surface-2); }
.lp-main { padding-bottom: 48px; }
.lp-actions { display: flex; justify-content: center; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.lp-note { font-size: 14px; color: var(--muted); }
.lp-stores .store-links { margin: 48px auto 0; max-width: 820px; padding: 24px; border: 1px solid var(--border); border-radius: 12px; text-align: center; }
.lp-stores .store-title { margin-bottom: 16px; }
.lp-stores .store-row { justify-content: center; }
.lp-footer { border-top: 1px solid var(--border); padding: 24px 0 32px; }
.lp-legal { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; font-size: 13px; color: var(--muted); }
.lp-legal a { color: var(--text-2); min-height: 44px; display: inline-flex; align-items: center; }
.lp-legal a:hover { color: var(--text); text-decoration: underline; }
.lp-attribution { margin: 8px 0 0; max-width: 760px; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
@media (max-width: 700px) {
  .lp-wrap { padding: 0 16px; }
  .lp-header { height: 60px; }
  .lp-nav { gap: 4px; }
  .lp-nav-link { padding: 0 12px; }
  .lp-nav .lp-btn { height: 44px; padding: 0 14px; font-size: 15px; }
  .lp-actions { gap: 8px; margin-top: 24px; }
  .lp-actions .lp-btn { flex: 1 1 100%; }
  .lp-stores .store-links { margin-top: 32px; padding: 16px; }
}
@media (max-width: 370px) {
  .lp-logo { font-size: 18px; gap: 8px; }
  .lp-nav-link { padding: 0 10px; }
}

.lp-legal a { min-width: 44px; justify-content: center; }
.lp-logo { min-width: 44px; }

/* A deleted message is a neutral placeholder on both sides (was teal for own messages) */
.msg.deleted .bubble, .msg.mine.deleted .bubble { background: transparent; color: var(--muted); border: 1px dashed var(--border-strong); }
@media (max-width: 700px) { .lp-stores .store-links { padding: 16px 12px; } }
@media (max-width: 700px) { .badge-app_store img { height: 40px; } .badge-google_play img { height: 53px; margin: -6px 0; } .store-badge { min-height: 44px; } }
@media (max-width: 700px), (hover: none) { .hint-keys { display: none; } }
@media (max-width: 700px) { .composer-hint { flex: 1 1 100%; order: 10; font-size: 12.5px; opacity: 1; transform: none; } }

/* ==========================================================================
   Gündem, Kimi takip etmeli, empty states (docs/KARAR-GUNDEM-MESAJ-ARAMA.md)
   ========================================================================== */
.empty-ico { display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 14px; border-radius: 50%; background: var(--surface-2); color: var(--violet); }
.empty-ico .icon { width: 30px; height: 30px; }
.empty-error .empty-ico { color: var(--red); background: color-mix(in srgb, var(--red) 10%, transparent); }
.feed-end .icon { width: 16px; height: 16px; vertical-align: -3px; margin-left: 4px; }

.card-sub { margin: -2px 18px 4px; color: var(--muted); font-size: 13px; }
.card-empty { margin: 4px 18px 12px; color: var(--muted); font-size: 14px; list-style: none; }
.card-foot { min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.trend-note { margin: 0; padding: 12px 18px; color: var(--muted); font-size: 13.5px; border-bottom: 1px solid var(--border); }

.trend-list { list-style: none; margin: 0; padding: 0; }
.trend-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 18px; transition: background .15s; }
.trend-row:hover { background: var(--surface-2); }
.trend-no { width: 22px; flex: none; text-align: right; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.trend-row .grow { flex: 1; min-width: 0; line-height: 1.3; }
.trend-row b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.trend-meta { display: block; color: var(--muted); font-size: 13px; }
.trend-go { width: 16px; height: 16px; color: var(--muted); flex: none; }
.main .trend-list li + li .trend-row { border-top: 1px solid var(--border); }

.sug-list { list-style: none; margin: 0; padding: 0; }
.sug { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px 14px 12px 18px; transition: opacity .2s, transform .2s; }
.sug + .sug { border-top: 1px solid var(--border); }
.sug.leaving { opacity: .35; pointer-events: none; }
.sug-name { display: block; min-width: 0; line-height: 1.25; }
.sug-name b, .sug-name span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-name span { color: var(--muted); font-size: 13.5px; }
.sug-bio { margin: 4px 0 0; font-size: 13.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-reason { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.sug-reason .icon { width: 14px; height: 14px; flex: none; color: var(--violet); }
.sug-reason span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-acts { display: flex; align-items: center; gap: 2px; }
.sug-hide { width: 36px; height: 36px; color: var(--muted); }
.sug-page .sug { padding: 14px 18px; }
.sug-page .sug-bio { white-space: normal; }
@media (max-width: 700px) {
  .sug { grid-template-columns: 40px minmax(0, 1fr); }
  .sug-acts { grid-column: 2; justify-content: flex-start; gap: 8px; }
  .sug-hide { width: 44px; height: 44px; }
  .trend-row { padding-left: 14px; padding-right: 14px; }
}

/* ---- Messages: list + chat (two panes from 1061px; single screen with back below) ---- */
.dm-pick { display: none; }
.dm-split.is-thread .conv-pane { display: none; }
.conv-search { padding: 8px 14px 10px; border-bottom: 1px solid var(--border); }
.conv-search .search-box { display: flex; }
.conv-row.active { background: var(--brand-soft); }
.conv-row.active:hover { background: var(--brand-soft); }
.conv-snippet .icon { width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; }
.conv-you { color: var(--text-2); }
.conv-nomatch { padding: 16px 18px; margin: 0; }
.msg-day { align-self: center; margin: 12px 0 4px; padding: 3px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); font-size: 12.5px; font-weight: 600; }
.msg-day:first-child { margin-top: 0; }
.msg-status { letter-spacing: 0; display: inline-flex; }
.msg-status .icon { width: 16px; height: 16px; }
.msg.mine .status-read { color: var(--accent-ink); }
@media (min-width: 1061px) {
  .shell-messages { grid-template-columns: var(--nav-w) minmax(0, 960px); }
  .shell-messages .sidebar { display: none; }
  .dm-split { display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); height: 100vh; height: 100dvh; position: sticky; top: 0; }
  .dm-split .conv-pane, .dm-split.is-thread .conv-pane { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border); }
  .conv-pane .conv-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .conv-pane .empty { padding: 40px 20px; }
  .dm-pick { display: grid; place-items: center; min-width: 0; }
  .dm-split .thread { height: 100%; position: static; min-width: 0; }
  .thread-back { display: none; }
}

/* ---- Call screen v2: one clear state, labelled 56px controls ---------------- */
.call { justify-content: flex-start; gap: 18px; }
.call-kind { position: relative; margin: 0; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.call-info { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-top: 0; max-width: 520px; }
.call-avatar .avatar { width: 128px; height: 128px; font-size: 48px; }
.call[data-state="calling"] .call-avatar .avatar, .call[data-state="ringing"] .call-avatar .avatar, .call[data-state="incoming"] .call-avatar .avatar { animation: call-pulse 1.8s ease-out infinite; }
@keyframes call-pulse { 0% { box-shadow: 0 0 0 0 rgba(44,197,222,.45); } 100% { box-shadow: 0 0 0 26px rgba(44,197,222,0); } }
@media (prefers-reduced-motion: reduce) { .call .call-avatar .avatar { animation: none !important; } }
.call-state { font-size: 16px; color: rgba(255,255,255,.85); }
.call[data-state="ended"] .call-state { font-weight: 700; color: #fff; }
.call-timer { margin: 6px 0 0; font: 600 18px/1 var(--font-display); font-variant-numeric: tabular-nums; color: #fff; }
.call-detail { margin: 10px auto 0; max-width: 380px; text-align: center; color: rgba(255,255,255,.75); font-size: 14.5px; line-height: 1.45; }
.call-actions { flex-wrap: wrap; gap: 14px 18px; padding-bottom: 4px; }
.call-btn { min-width: 72px; gap: 8px; font-size: 13px; font-weight: 600; }
.call-btn > .icon, .call-btn .on, .call-btn .off { width: 56px; height: 56px; }
.call-btn > .icon { padding: 15px; box-sizing: border-box; }
.call-btn .on .icon, .call-btn .off .icon { width: 26px; height: 26px; }
.call-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 14px; }
.call-btn.decline > .icon { background: #dc2626; }
.call-btn.accept > .icon { background: #16a34a; }
.call-btn[hidden] { display: none; }
.call .btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.call-again { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: #fff; }
.call.is-video.connected { justify-content: space-between; }
.call.is-video.connected .call-info { flex: 0; }
.call.is-video.connected .call-kind { display: none; }
.call.is-video.connected .call-actions { background: rgba(0,0,0,.45); padding: 12px 16px; border-radius: 20px; }
.call-local { z-index: 1; }
.call.self-cam-off .call-local { opacity: .3; }
@media (min-width: 701px) { .call-local { width: 180px; right: 24px; top: 24px; } }
@media (max-width: 380px) { .call-btn { min-width: 64px; } .call-actions { gap: 12px 10px; } }
.announcement { border-color: color-mix(in srgb, var(--violet) 30%, transparent); }
.announcement > .icon { width: 20px; height: 20px; flex: none; color: var(--violet); margin-top: 1px; }
.inline-ico { width: 15px; height: 15px; vertical-align: -2px; margin-left: 3px; }
.pager .btn .icon { width: 16px; height: 16px; }

/* ---- Brand fills (one CTA per screen, selected indicators, logo detail) ------
   Text on a fill always uses --accent-ink; text/links/focus use the darker --violet. */
.btn-primary { background: var(--brand-fill); color: var(--accent-ink); border-color: var(--brand-edge); }
.btn-primary:not(:disabled):hover { background: var(--brand-fill-hover); }
.btn-primary:not(:disabled):active { background: var(--brand-fill-pressed); }
.btn-primary:disabled, .btn-primary[aria-disabled="true"] { background: var(--surface-3); color: var(--muted); border-color: var(--border-strong); opacity: 1; }
.fab { background: var(--brand-fill); color: var(--accent-ink); border: 1px solid var(--brand-edge); }
.msg.mine .bubble { background: var(--brand-fill); color: var(--accent-ink); border: 1px solid var(--brand-edge); }
.msg.mine .bubble a, .msg.mine .status-read { color: var(--accent-ink); }
.badge-admin { background: var(--brand-fill); color: var(--accent-ink); }
.brand-mark .pulse-dot { background: var(--brand-fill); }
.nav-link.active::before, .tabs a.active::after { background: var(--brand-fill); }
@media (max-width: 700px) { .m-tabs a.on::after { background: var(--brand-fill); } .tabbar a.active .ic { background: var(--brand-soft); color: var(--violet); } }
.notif.unread::before { background: var(--brand-fill); }
.call-btn.accept > .icon { background: #16a34a; }
@keyframes call-pulse { 0% { box-shadow: 0 0 0 0 rgba(29,161,242,.5); } 100% { box-shadow: 0 0 0 26px rgba(29,161,242,0); } }.loader span { background: var(--brand-fill); }

/* ---- Action hierarchy: only the main action is filled ------------------------
   Secondary controls (follow, message, sign in, filters, menus) are neutral surfaces with a thin
   neutral border; hover adds a very light brand tint and the accent text colour. */
.btn-ghost:not(:disabled):hover, .btn-follow:not(.following):hover { background: var(--brand-soft); border-color: color-mix(in srgb, var(--violet) 45%, var(--border-strong)); color: var(--violet); }
.btn-follow:not(.following) { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-follow.following { background: var(--surface); color: var(--text-2); border-color: var(--border-strong); }
.btn-follow.following:hover { color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, transparent); background: color-mix(in srgb, var(--red) 8%, transparent); }
/* ---- Call controls: one 64px circle per control, icon centred, label below ---- */
.call-actions[data-controls], .call-actions[data-incoming] { align-items: flex-start; gap: 16px 22px; }
.call-btn { width: 84px; min-width: 0; padding: 0; text-align: center; line-height: 1.25; }
.call-btn > .icon { display: none; }   /* legacy bare icons are no longer used */
.call-ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; transition: background .15s, transform .1s; }
.call-ic .icon { width: 26px; height: 26px; display: block; }
.call-btn .call-ic .on, .call-btn .call-ic .off { width: auto; height: auto; background: none; border-radius: 0; display: contents; }
.call-btn .call-ic .off, .call-btn.is-off .call-ic .on { display: none; }
.call-btn.is-off .call-ic .off { display: contents; }
.call-btn.is-off .call-ic { background: #fff; color: #111; }
.call-btn:not(:disabled):hover .call-ic { background: rgba(255,255,255,.24); }
.call-btn:active .call-ic { transform: scale(.96); }
.call-btn.decline .call-ic { background: #dc2626; }      /* destructive: white icon 4.83:1 */
.call-btn.decline:hover .call-ic { background: #b91c1c; }
.call-btn.accept .call-ic { background: #16a34a; }
.call-btn.accept:hover .call-ic { background: #15803d; }
.call-btn:focus-visible { outline: none; }
.call-btn:focus-visible .call-ic { outline: 3px solid #fff; outline-offset: 3px; }
@media (max-width: 380px) { .call-btn { width: 72px; } .call-actions[data-controls] { gap: 14px 10px; } }
.call-btn.decline .call-ic .icon { width: 28px; height: 28px; stroke-width: 2; }   /* flat glyph: a little larger to match the mic/camera weight */
@media (max-width: 700px) { .call.is-video.connected .call-info { align-self: stretch; align-items: flex-start; text-align: left; padding-right: 128px; } }

/* ---- All action buttons neutral (user's final rule; supersedes "one filled CTA") ----
   Brand #1DA1F2 stays, but only as a measured detail: icons, focus, active states.
   Main actions keep a stronger 1px edge and bold label instead of a fill.
   Light: edge #7D8794 3.37–3.64:1, label 18:1, icon 5.4:1 · Dark: edge #6B7480 3.49–4.08:1, label 14.3:1, icon 5.85:1 */
:root { --btn-edge: #6b7480; --btn-bg: var(--surface-2); --btn-bg-hover: var(--surface-3); }
[data-theme="light"] { --btn-edge: #7d8794; --btn-bg: var(--surface); --btn-bg-hover: var(--surface-2); }
.btn-primary, .fab, .dm-send { background: var(--btn-bg); color: var(--text); border: 1px solid var(--btn-edge); box-shadow: none; font-weight: 700; }
.btn-primary .icon, .fab .icon, .dm-send .icon { color: var(--violet); }
.btn-primary:not(:disabled):hover, .fab:hover, .dm-send:not(:disabled):hover { background: var(--btn-bg-hover); border-color: var(--btn-edge); color: var(--text); box-shadow: none; }
.btn-primary:not(:disabled):active, .fab:active, .dm-send:not(:disabled):active { background: var(--surface-3); }
.btn-primary:disabled, .btn-primary[aria-disabled="true"], .dm-send:disabled { background: var(--surface-2); color: var(--muted); border-color: var(--border-strong); }
.btn-primary:disabled .icon, .dm-send:disabled .icon { color: var(--muted); }
.btn-primary[aria-busy="true"]::after { border-color: var(--text) var(--text) transparent transparent; }

/* ---- Doğrulanmış hesap seal (verified_badge()) -------------------------------
   #1A8CD8 seal: 3.36–3.63:1 on light, 4.9–5.3:1 on dark surfaces; white tick on it 3.63:1. */
.vbadge { display: inline-flex; align-items: center; flex: none; margin-left: 6px; vertical-align: middle; line-height: 0; }
.vbadge svg { display: block; }
.vbadge-seal { fill: #1a8cd8; stroke: #1a8cd8; }
.name-line { display: flex; align-items: center; min-width: 0; }
.name-line .name-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-head .vbadge { margin-left: 0; }   /* post-head already spaces its items */
.profile-name { display: flex; align-items: center; }
.profile-name .vbadge { margin-left: 6px; }
/* list rules such as `.sug-name span { display: block }` must not reach the seal */
.name-line > .name-text { display: block; }
.name-line > .vbadge { display: inline-flex !important; width: auto !important; height: auto; margin-left: 6px; font-size: 0; }
.profile-name { gap: 6px; }
.profile-name .vbadge { margin-left: 0; }
b.name-line { display: flex !important; align-items: center; }   /* beats list rules like `.sug-name b { display: block }` */

/* ==========================================================================
   Landing v2 — asymmetric typographic poster (docs/KARAR-LANDING.md)
   ========================================================================== */
:root { --ps-paper: #15181e; --ps-white: #1b1f26; --ps-ink: #eceff3; --ps-line: #6b7480; --ps-muted: #a7b0bc; }
[data-theme="light"] { --ps-paper: #faf8f4; --ps-white: #ffffff; --ps-ink: #0f1720; --ps-line: #8a94a1; --ps-muted: #4b5563; }
.lp-poster { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.lp-copy h1 { margin: 0; font: 800 clamp(48px, 6.4vw, 80px)/1.02 var(--font-display); letter-spacing: -.035em; color: var(--text); }
.lp-copy h1 span { display: block; }
.lp-copy h1 .lp-title-2 { color: var(--text-2); }
.lp-lead { margin: 24px 0 0; max-width: 30ch; font-size: 19px; line-height: 1.5; color: var(--text-2); }
.lp-poster .lp-actions { justify-content: flex-start; margin-top: 32px; }
.lp-poster .lp-note { margin: 16px 0 0; }
.lp-art { margin: 0; }
.lp-art svg { display: block; width: 100%; height: auto; aspect-ratio: 560 / 520; max-width: 560px; margin-left: auto; overflow: visible; }
.ps-paper { fill: var(--ps-paper); stroke: var(--border-strong); stroke-width: 1; }
.ps-links path { stroke: var(--ps-line); stroke-width: 1.2; fill: none; }
.ps-links circle { fill: var(--ps-ink); }
.ps-topic { font: 700 26px var(--font-display); letter-spacing: -.01em; fill: var(--ps-ink); pointer-events: none; user-select: none; }
.ps-topic-sm { font: 700 15px var(--font); letter-spacing: .18em; fill: var(--ps-muted); }
.ps-topic-lg { font-size: 32px; }
.ps-topic-it { font-style: italic; font-weight: 600; font-size: 24px; }
.ps-bubble-a { fill: var(--ps-white); stroke: var(--ps-ink); stroke-width: 2; stroke-linejoin: round; }
.ps-text { stroke: var(--ps-line); stroke-width: 6; stroke-linecap: round; fill: none; }
.ps-bubble-b { fill: var(--ps-ink); }
.ps-dot { fill: var(--ps-paper); }
.ps-accent { fill: #1da1f2; }   /* the single brand accent (decorative; 6.3:1 on the light-theme ink form) */

/* Editorial points: rows with thin rules, no cards */
.lp-points ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.lp-points li { display: grid; grid-template-columns: 64px minmax(160px, 260px) minmax(0, 1fr); gap: 8px 24px; align-items: baseline; padding: 24px 0; border-bottom: 1px solid var(--border); }
.lp-no { font: 600 14px var(--font); color: var(--muted); font-variant-numeric: tabular-nums; }
.lp-points h3 { margin: 0; font: 800 26px/1.15 var(--font-display); letter-spacing: -.02em; }
.lp-points p { margin: 0; max-width: 56ch; font-size: 17px; line-height: 1.55; color: var(--text-2); }

/* Gentle entrance: opacity/transform/dash only, never layout */
@media (prefers-reduced-motion: no-preference) {
  /* Copy and buttons are never animated: they must be readable even if animations do not run. */
  .ps-form { animation: lp-rise .6s var(--ease) both; transform-box: fill-box; }
  .ps-form-b { animation-delay: .12s; }
  .ps-links path { stroke-dasharray: 120; animation: lp-draw .8s .25s var(--ease) both; }
  .ps-topics { animation: lp-fade .6s .35s ease both; }
}
@keyframes lp-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes lp-draw { from { stroke-dashoffset: 120; } to { stroke-dashoffset: 0; } }
@keyframes lp-fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 900px) {
  .lp-poster { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; padding-bottom: 40px; }
  .lp-art svg { max-width: 420px; margin: 0 auto; }
  .lp-points li { grid-template-columns: 48px minmax(0, 1fr); }
  .lp-points p { grid-column: 2; }
}
@media (max-width: 700px) {
  .lp-poster { padding-top: 28px; padding-bottom: 32px; gap: 28px; }
  .lp-copy h1 { font-size: clamp(40px, 11.5vw, 46px); }
  .lp-lead { margin-top: 16px; font-size: 17px; }
  .lp-poster .lp-actions { margin-top: 24px; }
  .lp-art svg { max-width: 340px; }
  .lp-points li { padding: 20px 0; gap: 4px 12px; }
  .lp-points h3 { font-size: 22px; }
  .lp-points p { font-size: 16px; }
}

/* ==========================================================================
   Live v2 — host control screen + immersive viewer
   ========================================================================== */
.live-tile video { object-fit: contain; background: #000; }          /* keep portrait/landscape ratio, never crop */
.tile-novideo { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; color: #fff; font-weight: 600; background: #0b0c10; }
.tile-novideo[hidden] { display: none; }
.live-check { flex-basis: 100%; margin: 0; color: var(--text-2); font-size: 14.5px; }
.live-help { margin: 0 0 10px; color: var(--muted); font-size: 13.5px; }
.live-state { display: block; color: var(--muted); font-size: 12.5px; }
.live-panel li { padding: 6px 0; border-top: 1px solid var(--border); }
.live-panel li:first-child { border-top: 0; }
.chat-newer { margin: 0 0 8px; }
@media (min-width: 1061px) {
  .shell-live { grid-template-columns: var(--nav-w) minmax(0, 960px); }
  .shell-live .sidebar { display: none; }
}

/* Viewer: the video is the page */
.live-viewer { position: relative; }
.live-viewer .live-stage { position: sticky; top: 0; display: grid; grid-template: 1fr / 1fr; gap: 2px; height: 100vh; height: 100dvh; aspect-ratio: auto; overflow: hidden; background: #000; color: #fff; }
.live-viewer .live-tile { grid-area: auto; min-height: 0; background: #000; }
.live-viewer .live-stage:not(.two) .live-tile { grid-area: 1 / 1; }
.live-viewer .live-stage.two { grid-template: 1fr 1fr / 1fr; }
@media (orientation: landscape) { .live-viewer .live-stage.two { grid-template: 1fr / 1fr 1fr; } }
.live-viewer .live-tile video { width: 100%; height: 100%; }
.live-viewer .live-stage:not(.two) .tile-name { display: none; }      /* the host name is in the top bar */
.live-viewer .tile-name { top: 64px; bottom: auto; }

.lv-top { position: absolute; z-index: 3; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 6px; padding: calc(8px + var(--safe-t)) 8px 8px; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.lv-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; padding: 0 4px; }
.lv-who b, .lv-who > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-who > span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(255,255,255,.92); }
.lv-btn { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; border: 1px solid rgba(255,255,255,.18); }
.lv-btn:hover { background: rgba(0,0,0,.68); }
.lv-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lv-btn .icon { width: 22px; height: 22px; }
.lv-btn .off, .lv-btn.is-off .on { display: none; }
.lv-btn.is-off .off { display: grid; }
.lv-btn[hidden] { display: none; }

.live-viewer .live-overlay { z-index: 2; background: rgba(0,0,0,.6); color: #fff; }
.live-viewer .live-overlay .btn-ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.4); }

/* Chat over the video: scrim only behind the chat, the video keeps its full size */
.lv-chat { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 8px; padding: 48px 12px calc(10px + var(--safe-b)); background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.5) 55%, rgba(0,0,0,0) 100%); pointer-events: none; }
.lv-chat > * { pointer-events: auto; }
.lv-chat .chat-log { max-height: min(36dvh, 300px); margin: 0; padding-right: 4px; gap: 4px; color: #fff; font-size: 15px; line-height: 1.4; text-shadow: 0 1px 2px rgba(0,0,0,.9); scrollbar-width: thin; }
.lv-chat .chat-log b { font-weight: 700; }
.lv-chat .chat-log li.deleted { color: rgba(255,255,255,.7); }
.lv-chat .chat-del { color: rgba(255,255,255,.85); min-height: 32px; }
.lv-newer { align-self: center; min-height: 36px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.92); color: #0f1720; font-weight: 600; font-size: 13.5px; }
.lv-newer[hidden] { display: none; }
.lv-chat-bar { display: flex; align-items: center; gap: 8px; }
.lv-chat .chat-form { flex: 1; min-width: 0; display: flex; gap: 8px; }
.lv-chat .chat-form[hidden] { display: none; }
.lv-chat .chat-form input { background: rgba(0,0,0,.45); color: #fff; border: 1px solid rgba(255,255,255,.4); }
.lv-chat .chat-form input::placeholder { color: rgba(255,255,255,.75); }
.lv-chat .chat-form input:focus { border-color: #fff; }
.live-stage.chat-hidden .chat-log, .live-stage.chat-hidden .lv-newer { display: none; }
.live-stage.chat-hidden .lv-chat { background: none; padding-top: 0; }
.lv-chat-toggle[aria-pressed="false"] { background: rgba(255,255,255,.9); color: #0f1720; }

.live-invite { position: absolute; z-index: 4; left: 12px; right: 12px; bottom: calc(96px + var(--safe-b)); max-width: 440px; margin: 0 auto; padding: 16px; border-radius: 14px; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); box-shadow: var(--shadow-pop); text-shadow: none; }
.live-invite[hidden] { display: none; }
.live-invite h2 { margin: 0 0 6px; font: 700 17px/1.3 var(--font-display); }
.live-invite p { margin: 0 0 12px; color: var(--text-2); font-size: 14.5px; }
.live-invite-actions { display: flex; gap: 8px; justify-content: flex-end; }
.live-invite-actions[hidden] { display: none; }

.lv-guestbar { position: absolute; z-index: 3; top: calc(60px + var(--safe-t)); right: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.lv-guestbar[hidden] { display: none; }
.lv-guest-tag { padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.55); font-size: 13px; font-weight: 600; }
.lv-guestbar .btn-ghost { background: rgba(0,0,0,.5); color: #fff; border-color: rgba(255,255,255,.4); }

/* Mobile: 100dvh immersive, above the app chrome; the composer rides above the keyboard */
@media (max-width: 700px) {
  body.is-live-viewer .tabbar, body.is-live-viewer .m-top { display: none; }
  body.is-live-viewer .main { padding: 0; }
  .live-viewer .live-stage { position: fixed; z-index: 70; top: 0; left: 0; right: 0; bottom: var(--kb, 0px); height: auto; }
}
@media (min-width: 701px) {
  .live-viewer .lv-chat { right: auto; width: min(460px, 60%); border-bottom-left-radius: 0; }
}

/* Uploaded site logo inside the brand mark: shown whole on a transparent tile */
.brand-mark.has-logo { background: transparent; box-shadow: none; overflow: hidden; }
.brand-mark.has-logo::after { content: none; }
.brand-mark.has-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
