/* ==========================================================================
   WOLF FAMILY — Canlı Sohbet (/sohbet)
   TikTok LIVE hissi: koyu zemin, akan mesajlar, kehribar vurgu, Sora + Inter.
   ========================================================================== */

.page-sohbet .site-main { padding-bottom: 0; }
.page-sohbet [hidden] { display: none !important; }
body.chat-drawer-open { overflow: hidden; }
/* Sohbet sayfasında destek paneli başlıktaki yardım düğmesinden açılır;
   baloncuk kompozör/reaksiyon alanını kapatmasın. */
.page-sohbet .wf-sup-launch,
.page-sohbet .wf-sup-hint { display: none !important; }

.chat-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 4.4vw, 52px) 0 20px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(58% 120% at 84% 8%, rgba(var(--accent-rgb), 0.12), transparent 62%),
    radial-gradient(46% 100% at 4% 100%, rgba(120, 150, 255, 0.08), transparent 64%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}
.chat-hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.32), transparent);
  pointer-events: none;
}
.chat-hero-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.chat-hero-copy { max-width: 720px; }
.chat-kicker { gap: 9px; }
.chat-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.8vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
  font-weight: 800;
  margin: 16px 0 12px;
}
.chat-hero .wf-hero-lead { margin: 0; max-width: 620px; }
.chat-hero-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding-bottom: 4px;
}
.chat-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.035);
  color: var(--dim);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.chat-pill b { display: inline-block; color: var(--text); font-family: var(--font-display); font-size: 0.9rem; }
.chat-pill-ic { font-size: 0.9rem; }
.chat-pill-live { transition: color 0.2s, border-color 0.2s, background 0.2s; }
.chat-pill-live.is-live {
  color: #ffaaaa;
  border-color: rgba(var(--danger-rgb), 0.48);
  background: rgba(var(--danger-rgb), 0.1);
}
.chat-dot,
.chat-live-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--faint);
  transition: background 0.2s, box-shadow 0.2s;
}
.chat-live-dot.is-live,
.chat-pill-live.is-live .chat-dot {
  background: #ff5b5b;
  box-shadow: 0 0 0 4px rgba(var(--danger-rgb), 0.14), 0 0 12px rgba(var(--danger-rgb), 0.65);
  animation: chatPulse 1.8s ease-in-out infinite;
}

.chat-section {
  padding: 18px 0 clamp(30px, 4vw, 54px);
  background:
    radial-gradient(48% 70% at 50% 0%, rgba(var(--accent-rgb), 0.045), transparent 70%),
    var(--bg);
}
.chat-section .wrap { max-width: 1180px; }

/* ------------------------------------------------------------------ iskelet */
.chat-shell {
  --chat-aside-w: 300px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--chat-aside-w);
  gap: 16px;
  height: clamp(560px, calc(100vh - 260px), 840px);
  height: clamp(560px, calc(100dvh - 260px), 840px);
  min-height: 0;
  align-items: stretch;
  transition: grid-template-columns 0.28s var(--ease), gap 0.28s var(--ease);
}
.chat-shell.is-aside-collapsed {
  grid-template-columns: minmax(0, 1fr) 0;
  gap: 0;
}
.chat-shell.is-aside-collapsed .chat-aside { display: none; }

.chat-main {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(70% 110% at 78% 0%, rgba(var(--accent-rgb), 0.045), transparent 55%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
}
html[data-theme="light"] .chat-main {
  box-shadow: 0 20px 60px rgba(30, 35, 45, 0.1);
}
html[data-theme="light"] .chat-pill { background: rgba(0, 0, 0, 0.025); }

/* ------------------------------------------------------------------ başlık */
.chat-header {
  flex: 0 0 auto;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px 10px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent);
}
.chat-head-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat-head-titles { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.chat-head-titles b {
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.chat-head-online {
  color: var(--faint);
  font-size: 0.72rem;
  white-space: nowrap;
}
.chat-head-online b { display: inline-block; color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.chat-head-actions { display: flex; align-items: center; gap: 7px; }
.chat-head-online b.is-bump,
.chat-pill b.is-bump,
.chat-side-count.is-bump { animation: chatBump 0.42s var(--ease); }

/* ------------------------------------------------------------ canlı yayın */
.chat-live-banner {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-bottom: 1px solid rgba(var(--danger-rgb), 0.2);
  background: linear-gradient(90deg, rgba(var(--danger-rgb), 0.12), rgba(var(--danger-rgb), 0.035));
  color: #ffb0b0;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}
.chat-live-banner.is-offline {
  border-bottom-color: rgba(var(--accent-rgb), 0.18);
  background: linear-gradient(90deg, var(--accent-soft), transparent);
  color: var(--dim);
}
.chat-live-banner .chat-live-dot { flex: 0 0 7px; }
.chat-live-banner #chatLiveBannerText { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-live-banner.is-live .chat-live-dot { background: #ff5b5b; box-shadow: 0 0 0 4px rgba(var(--danger-rgb), 0.13), 0 0 12px rgba(var(--danger-rgb), 0.55); }
.chat-live-banner-cta {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 4px 9px;
  border: 1px solid rgba(var(--danger-rgb), 0.34);
  border-radius: 999px;
  color: #ffb0b0;
  font-size: 0.66rem;
  font-weight: 750;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.chat-live-banner-cta:hover { background: rgba(var(--danger-rgb), 0.15); color: #fff; }
.chat-live-banner.is-offline .chat-live-banner-cta { border-color: rgba(var(--accent-rgb), 0.3); color: var(--accent); }
.chat-live-banner.is-offline .chat-live-banner-cta:hover { background: var(--accent-soft); color: var(--accent); }

/* --------------------------------------------------------------- tepkiler */
.chat-rx-layer {
  position: absolute;
  right: 0;
  bottom: var(--chat-bottom-h, 100px);
  width: min(210px, 58%);
  height: min(52%, 380px);
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}
.chat-rx-particle {
  position: absolute;
  bottom: 0;
  left: 50%;
  font-size: var(--size, 24px);
  line-height: 1;
  opacity: 0;
  will-change: transform, opacity;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.25));
  animation: chatRxFloat var(--dur, 2.2s) cubic-bezier(0.18, 0.7, 0.35, 1) forwards;
}
.chat-rx-dock {
  position: absolute;
  right: 12px;
  bottom: calc(var(--chat-bottom-h, 100px) + 10px);
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
}
.chat-rx-btn {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text);
  font-size: 1.18rem;
  line-height: 1;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.24);
  transition: transform 0.16s var(--ease), border-color 0.16s, background 0.16s;
}
.chat-rx-btn:hover { transform: translateY(-2px) scale(1.06); border-color: var(--accent); background: var(--accent-soft); }
.chat-rx-btn:active { transform: scale(0.92); }
.chat-rx-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.chat-rx-btn.is-burst { animation: chatRxBurst 0.3s var(--ease); }
.chat-rx-btn .rx-emoji { pointer-events: none; }
.chat-rx-btn .rx-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--dim);
  font-family: var(--font-body);
  font-size: 0.56rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.chat-rx-btn .rx-count:empty,
.chat-rx-btn .rx-count[hidden] { display: none; }
.chat-icon-btn {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--dim);
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}
.chat-icon-btn:hover { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.42); background: var(--accent-soft); }
.chat-icon-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.chat-mini-btn {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  color: var(--faint);
  font-size: 11px;
  transition: color 0.2s, background 0.2s;
}
.chat-mini-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.chat-slow-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

/* --------------------------------------------------------------- duyurular */
.chat-announce,
.chat-pinned {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: linear-gradient(90deg, var(--accent-soft), rgba(var(--accent-rgb), 0.035));
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.18);
  color: var(--accent-2);
  font-size: 0.78rem;
  line-height: 1.45;
}
.chat-announce { position: relative; }
.chat-announce-text, #chatAnnounceText { flex: 1; min-width: 0; }
.chat-announce .chat-mini-btn { margin-left: auto; }
.chat-announce-ic,
.chat-pin-ic { flex: 0 0 auto; font-size: 0.9rem; }
.chat-pinned {
  color: var(--text);
  background: linear-gradient(90deg, rgba(var(--info-rgb), 0.1), transparent);
  border-bottom-color: rgba(var(--info-rgb), 0.18);
}
.chat-pinned #chatPinnedText { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-pinned .chat-pin-ic { color: var(--info); }

/* -------------------------------------------------------------------- akış */
.chat-stream {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  padding: 16px 16px 10px;
  background:
    radial-gradient(58% 72% at 82% 10%, rgba(var(--accent-rgb), 0.04), transparent 68%),
    radial-gradient(50% 68% at 0% 100%, rgba(var(--info-rgb), 0.035), transparent 68%);
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.chat-stream::-webkit-scrollbar { width: 6px; }
.chat-stream::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; }

.chat-loading,
.chat-load-error,
.chat-empty {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--faint);
  font-size: 0.82rem;
  text-align: center;
  padding: 28px 14px;
}
.chat-loading { flex-direction: row; }
.chat-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  border-top-color: var(--accent);
  animation: chatSpin 0.8s linear infinite;
}
.chat-load-error-ic,
.chat-empty-ic { font-size: 30px; line-height: 1; margin-bottom: 2px; }
.chat-load-error b,
.chat-empty b { color: var(--text); font-family: var(--font-display); font-size: 0.95rem; }
.chat-empty span { max-width: 300px; line-height: 1.55; }
.chat-link-btn {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 8px;
  transition: background 0.2s;
}
.chat-link-btn:hover { background: var(--accent-soft); }

.chat-msg {
  --uc: #9aa3b2;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 12px;
  animation: chatIn 0.24s var(--ease) both;
  transition: background 0.18s;
}
.chat-msg:hover,
.chat-msg:focus-within { background: rgba(255, 255, 255, 0.032); }
html[data-theme="light"] .chat-msg:hover,
html[data-theme="light"] .chat-msg:focus-within { background: rgba(0, 0, 0, 0.035); }
.chat-msg.is-me { background: var(--accent-soft); }
.chat-msg.is-me:hover { background: rgba(var(--accent-rgb), 0.16); }
.chat-msg.is-initial { animation: none; }
.chat-msg.is-highlight { animation: chatHighlight 1.6s ease both; }

.chat-avatar {
  --uc: #9aa3b2;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--uc);
  background: var(--surface-3);
  color: var(--uc);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  user-select: none;
}
.chat-avatar-sm { width: 22px; height: 22px; flex-basis: 22px; font-size: 0.56rem; border-width: 1px; }
.chat-msg-body { min-width: 0; flex: 1; }
.chat-msg-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}
.chat-name {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.chat-time {
  color: var(--faint);
  font-size: 0.64rem;
  font-variant-numeric: tabular-nums;
  margin-left: 1px;
}
.chat-badge {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  padding: 1px 5px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  line-height: 1.2;
  white-space: nowrap;
}
.chat-badge.is-streamer { color: #ff9a9a; border-color: rgba(var(--danger-rgb), 0.42); background: rgba(var(--danger-rgb), 0.12); }
.chat-badge.is-mod { color: #aebcff; border-color: rgba(var(--info-rgb), 0.4); background: rgba(var(--info-rgb), 0.11); }
.chat-badge.is-family { color: #8fe0ae; border-color: rgba(var(--success-rgb), 0.38); background: rgba(var(--success-rgb), 0.1); }
.chat-badge.is-rank { color: var(--rc, var(--dim)); border-color: var(--rc, var(--line-2)); background: transparent; }

.chat-msg-text {
  margin-top: 2px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.chat-mention {
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 5px;
  padding: 0 3px;
  font-weight: 650;
}
.chat-quote {
  display: block;
  max-width: 100%;
  margin: 1px 0 4px;
  padding: 4px 8px;
  border-left: 2px solid var(--accent);
  border-radius: 0 7px 7px 0;
  background: rgba(255, 255, 255, 0.035);
  color: var(--dim);
  font-size: 0.73rem;
  line-height: 1.4;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.chat-quote:hover { color: var(--text); background: var(--accent-soft); }
.chat-quote b { color: var(--accent-2); font-weight: 700; }
html[data-theme="light"] .chat-quote { background: rgba(0, 0, 0, 0.035); }

.chat-msg-actions {
  position: absolute;
  top: 2px;
  right: 4px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-3);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(2px);
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
}
.chat-msg:hover .chat-msg-actions,
.chat-msg:focus-within .chat-msg-actions { opacity: 1; transform: none; pointer-events: auto; }
.chat-act {
  width: 26px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  color: var(--dim);
  font-size: 0.76rem;
  transition: color 0.15s, background 0.15s;
}
.chat-act:hover { color: var(--text); background: var(--accent-soft); }
.chat-act.is-danger:hover { color: #ff9a9a; background: rgba(var(--danger-rgb), 0.12); }

.chat-sys {
  width: fit-content;
  max-width: 92%;
  margin: 7px auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--dim);
  font-size: 0.7rem;
  line-height: 1.4;
  text-align: center;
  animation: chatIn 0.22s var(--ease) both;
}
html[data-theme="light"] .chat-sys { background: rgba(0, 0, 0, 0.045); }

.chat-jump {
  position: absolute;
  left: 50%;
  bottom: 104px;
  z-index: 5;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  background: var(--surface-3);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  animation: chatJumpIn 0.2s var(--ease);
}
.chat-jump:hover { background: var(--accent-soft); }

/* --------------------------------------------------------------- yazma alanı */
.chat-bottom {
  flex: 0 0 auto;
  position: relative;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent);
}
.chat-join { padding: 16px 16px 18px; }
.chat-join-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.chat-join-ic {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  font-size: 1.05rem;
}
.chat-join-head b {
  display: block;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
}
.chat-join-head span { display: block; color: var(--dim); font-size: 0.76rem; line-height: 1.45; }
.chat-join-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px 10px; align-items: end; }
.chat-field { display: grid; gap: 4px; font-size: 0.68rem; color: var(--dim); font-weight: 600; }
.chat-field .input {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  font-size: 0.84rem;
  border-radius: 10px;
  background: var(--bg-2);
}
.chat-field textarea.input { min-height: 78px; resize: vertical; line-height: 1.5; }
.chat-join-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.chat-join-submit { min-height: 40px; padding: 0 16px; font-size: 0.82rem; justify-content: center; }
.chat-join-note { grid-column: 1 / -1; color: var(--faint); font-size: 0.66rem; line-height: 1.45; }
.chat-form-status {
  grid-column: 1 / -1;
  min-height: 17px;
  color: #ff9a9a;
  font-size: 0.74rem;
  line-height: 1.4;
}
.chat-form-status.ok { color: #8fe0ae; }
.chat-join-submit:disabled { opacity: 0.55; cursor: wait; }

.chat-composer {
  position: relative;
  padding: 9px 11px calc(9px + env(safe-area-inset-bottom, 0px));
  background: rgba(6, 7, 10, 0.22);
}
html[data-theme="light"] .chat-composer { background: rgba(255, 255, 255, 0.4); }
.chat-reply {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  padding: 6px 8px;
  border-left: 2px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--accent-soft);
  color: var(--dim);
  font-size: 0.72rem;
}
.chat-reply-ic { color: var(--accent); flex: 0 0 auto; }
.chat-reply-body { min-width: 0; flex: 1; display: grid; gap: 1px; }
.chat-reply-body b { color: var(--accent-2); font-size: 0.7rem; }
.chat-reply-body span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-composer-row { display: flex; align-items: flex-end; gap: 7px; }
.chat-tool {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg-2);
  color: var(--dim);
  font-size: 1.02rem;
  transition: border-color 0.2s, background 0.2s;
}
.chat-tool:hover { border-color: rgba(var(--accent-rgb), 0.4); background: var(--accent-soft); }
.chat-tool:disabled { opacity: 0.45; cursor: not-allowed; background: var(--bg-2); }
#chatInput {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  max-height: 98px;
  resize: none;
  overflow-y: auto;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.45;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#chatInput:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#chatInput:disabled { opacity: 0.58; cursor: not-allowed; }
.chat-send {
  min-width: 82px;
  min-height: 40px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 11px;
  background: var(--accent-grad);
  color: var(--accent-ink);
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: 0 6px 18px var(--accent-glow);
  transition: transform 0.2s, opacity 0.2s, box-shadow 0.2s;
}
.chat-send:hover { transform: translateY(-1px); box-shadow: 0 9px 24px var(--accent-glow); }
.chat-send:disabled { opacity: 0.48; cursor: not-allowed; transform: none; box-shadow: none; }
.chat-send.is-cool { background: var(--surface-3); color: var(--dim); box-shadow: none; }
.chat-composer-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  margin-top: 6px;
  font-size: 0.66rem;
}
.chat-me {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 48%;
  padding: 2px 5px 2px 2px;
  border-radius: 999px;
  color: var(--dim);
  font-size: 0.7rem;
  font-weight: 650;
  transition: background 0.2s, color 0.2s;
}
.chat-me:hover { background: rgba(255, 255, 255, 0.055); color: var(--text); }
.chat-me #chatMeName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-me-edit { color: var(--faint); font-size: 0.66rem; }
.chat-rank {
  padding: 1px 5px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--dim);
  font-size: 0.55rem;
  font-weight: 700;
}
.chat-comp-status { flex: 1; min-width: 0; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-comp-status.is-warn { color: #ffb08e; }
.chat-comp-status.is-ok { color: #8fe0ae; }
.chat-char { color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chat-char.is-near { color: var(--accent); }
.chat-char.is-over { color: #ff9a9a; }

/* --------------------------------------------------------------- bildirimler */
.chat-notify {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 8px 10px 0; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 12px;
  background: linear-gradient(120deg, var(--accent-soft), var(--surface-2));
}
.chat-notify-ic { flex: 0 0 auto; font-size: 16px; line-height: 1; }
.chat-notify-copy { flex: 1 1 150px; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.chat-notify-copy b { font-size: 11px; font-weight: 700; }
.chat-notify-copy span { color: var(--muted); font-size: 9px; line-height: 1.4; overflow-wrap: anywhere; }
.chat-notify-enable {
  flex: 0 0 auto; padding: 6px 10px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700;
}
.chat-notify-enable:hover { filter: brightness(1.05); }
.chat-notify-settings-btn { flex: 0 0 auto; }
.chat-notify-panel {
  position: fixed; z-index: 10004;
  width: min(320px, calc(100vw - 16px)); max-height: min(72vh, 480px); overflow-y: auto;
  padding: 12px 13px;
  border: 1px solid var(--line-2); border-radius: 14px;
  background: var(--surface-3);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  text-align: left;
}
.chat-notify-panel[hidden] { display: none; }
.chat-notify-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.chat-notify-panel-head b { font-size: 12px; }
.chat-notify-fieldset { border: 0; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.chat-notify-fieldset legend { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.chat-notify-choice { display: flex; align-items: flex-start; gap: 6px; font-size: 10px; line-height: 1.45; color: var(--text); margin: 3px 0; overflow-wrap: anywhere; }
.chat-notify-choice input { margin-top: 1px; flex: 0 0 auto; }
.chat-notify-quiet { margin-top: 6px; }
.chat-notify-times { display: flex; align-items: center; gap: 5px; margin: 3px 0 0 20px; }
.chat-notify-times input { min-width: 0; flex: 1; padding: 4px 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); color: var(--text); font-size: 10px; }
.chat-notify-denied { margin-top: 7px; padding: 7px 8px; border-radius: 8px; background: rgba(var(--danger-rgb), 0.1); border: 1px solid rgba(var(--danger-rgb), 0.25); color: #ff9a9a; font-size: 9px; line-height: 1.5; }
.chat-push-box { margin-top: 8px; padding: 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); display: flex; flex-direction: column; gap: 3px; }
.chat-push-box b { font-size: 10px; }
.chat-push-box span { color: var(--muted); font-size: 9px; line-height: 1.4; overflow-wrap: anywhere; }
.chat-push-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.chat-notify-note { margin-top: 8px; color: var(--muted); font-size: 9px; line-height: 1.5; }

/* --------------------------------------------------------------- bahsetmeler */
.chat-mention-strip {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 7px 10px 0; padding: 7px 9px;
  border: 1px solid rgba(var(--accent-rgb), 0.3); border-radius: 11px;
  background: linear-gradient(120deg, rgba(var(--accent-rgb), 0.12), var(--surface-2));
}
.chat-mention-strip-ic {
  width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  font-size: 13px; font-weight: 800;
}
.chat-mention-strip-copy { flex: 1 1 150px; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.chat-mention-strip-copy b { font-size: 10px; font-weight: 700; }
.chat-mention-strip-copy span { color: var(--muted); font-size: 9px; line-height: 1.4; overflow-wrap: anywhere; }
.chat-mention-strip-go {
  flex: 0 0 auto; padding: 5px 9px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-size: 9px; font-weight: 700;
}
.chat-mention-strip-go:hover { filter: brightness(1.05); }
.chat-mention { cursor: pointer; }
.chat-mention:hover { text-decoration: underline; text-underline-offset: 2px; }
.chat-mention:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }

/* ------------------------------------------------------------------- popup */
.chat-pop {
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: calc(100% - 4px);
  z-index: 20;
  max-width: calc(100vw - 22px);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--surface-3);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.chat-emoji {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 2px;
  padding: 7px;
  max-width: 340px;
  left: 11px;
  right: auto;
  width: min(340px, calc(100% - 22px));
}
.chat-emoji button {
  height: 37px;
  border-radius: 8px;
  font-size: 1.2rem;
  line-height: 1;
  transition: background 0.15s, transform 0.15s;
}
.chat-emoji button:hover { background: var(--accent-soft); transform: scale(1.08); }
.chat-mentions { display: grid; gap: 2px; padding: 5px; max-height: 210px; overflow-y: auto; }
.chat-mention-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  border-radius: 8px;
  text-align: left;
  color: var(--text);
  font-size: 0.78rem;
}
.chat-mention-row:hover,
.chat-mention-row.is-active { background: var(--accent-soft); }
.chat-mention-row .chat-avatar { width: 24px; height: 24px; flex-basis: 24px; font-size: 0.58rem; }
.chat-mention-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.chat-mention-role { color: var(--faint); font-size: 0.62rem; }

/* -------------------------------------------------------------------- yan */
.chat-aside {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.chat-aside::-webkit-scrollbar { width: 5px; }
.chat-aside::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; }
.chat-aside-mobile-head { display: none; }
.chat-side-card {
  flex: 0 0 auto;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.chat-side-label {
  color: var(--faint);
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.chat-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.chat-side-count {
  min-width: 24px;
  padding: 2px 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.chat-side-live-row { display: flex; align-items: center; gap: 8px; margin: 9px 0 10px; }
.chat-side-live-row b { font-family: var(--font-display); font-size: 0.93rem; }
.chat-side-live.is-live .chat-side-live-row b { color: #ff9a9a; }
.chat-side-live-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  color: var(--dim);
  font-size: 0.72rem;
  font-weight: 650;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.chat-side-live-btn:hover { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.4); background: var(--accent-soft); }

.chat-online-list { display: grid; gap: 3px; max-height: 236px; overflow-y: auto; scrollbar-width: thin; }
.chat-online-row {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 5px 5px;
  border-radius: 8px;
  text-align: left;
  color: var(--dim);
  font-size: 0.75rem;
  transition: background 0.15s, color 0.15s;
}
.chat-online-row:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.chat-online-row .chat-avatar { width: 24px; height: 24px; flex-basis: 24px; font-size: 0.58rem; }
.chat-online-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.chat-online-role { color: var(--faint); font-size: 0.58rem; white-space: nowrap; }
.chat-online-empty { color: var(--faint); font-size: 0.72rem; line-height: 1.5; padding: 3px 2px; }
.chat-rules {
  margin-top: 8px;
  color: var(--dim);
  font-size: 0.74rem;
  line-height: 1.65;
  white-space: pre-line;
}
.chat-side-note p { margin-top: 7px; color: var(--faint); font-size: 0.72rem; line-height: 1.6; }

/* ------------------------------------------------------------------- modal */
.chat-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.chat-modal-backdrop { position: absolute; inset: 0; background: rgba(3, 4, 7, 0.72); backdrop-filter: blur(4px); }
.chat-modal-card {
  position: relative;
  width: min(420px, 100%);
  padding: 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  animation: chatModalIn 0.22s var(--ease);
}
.chat-modal-close { position: absolute; top: 10px; right: 10px; }
.chat-modal-card h2 { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: -0.02em; margin-bottom: 8px; padding-right: 30px; }
.chat-report-preview {
  margin-bottom: 12px;
  padding: 8px 10px;
  border-left: 2px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--accent-soft);
  color: var(--dim);
  font-size: 0.76rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.chat-modal-card .chat-field { margin-bottom: 10px; }
.chat-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.chat-modal-actions .btn { min-height: 38px; padding: 0 14px; font-size: 0.8rem; }

.chat-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10002;
  transform: translate(-50%, 10px);
  max-width: min(420px, calc(100vw - 32px));
  padding: 9px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text);
  font-size: 0.78rem;
  text-align: center;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.chat-toast.is-show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* --------------------------------------------------------------- mod menü */
.chat-mod-menu {
  position: fixed;
  z-index: 10003;
  width: 196px;
  max-width: calc(100vw - 16px);
  max-height: min(70vh, 360px);
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  background: var(--surface-3);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 1px;
}
.chat-mod-menu[hidden] { display: none; }
.chat-mod-menu button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 9px;
  border-radius: 7px;
  color: var(--text);
  font-size: 0.76rem;
  text-align: left;
}
.chat-mod-menu button:hover { background: var(--accent-soft); }
.chat-mod-menu button:focus-visible,
.chat-pop button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.chat-mod-menu button.is-danger { color: #ff9a9a; }
.chat-mod-menu button.is-danger:hover { background: rgba(var(--danger-rgb), 0.12); }

/* ------------------------------------------------------------------ animasyon */
@keyframes chatIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes chatPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes chatSpin { to { transform: rotate(360deg); } }
@keyframes chatJumpIn { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes chatModalIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes chatBump { 0%, 100% { transform: none; } 40% { transform: scale(1.18); } }
@keyframes chatRxFloat {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.55) rotate(0deg); }
  12% { opacity: 1; }
  72% { opacity: 0.92; }
  100% { opacity: 0; transform: translate3d(var(--drift, 0px), calc(-1 * var(--rise, 190px)), 0) scale(var(--scale, 1.15)) rotate(var(--rot, 0deg)); }
}
@keyframes chatRxBurst { 0% { transform: scale(1); } 45% { transform: scale(1.22); } 100% { transform: scale(1); } }
@keyframes chatRxFade { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }
@keyframes chatHighlight {
  0% { box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.65); background: rgba(var(--accent-rgb), 0.16); }
  100% { box-shadow: 0 0 0 1px transparent; background: transparent; }
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .chat-shell { --chat-aside-w: 270px; }
}
@media (max-width: 900px) {
  .chat-hero { display: none; }
  .chat-section { padding: 6px 0 0; background: var(--bg); }
  .chat-section .wrap { padding: 0 6px; }
  .chat-shell {
    grid-template-columns: minmax(0, 1fr);
    height: calc(var(--chat-vh, 100vh) - 76px);
    height: calc(var(--chat-vh, 100dvh) - 76px);
    min-height: 320px;
    gap: 0;
  }
  .chat-shell.is-aside-collapsed { grid-template-columns: minmax(0, 1fr); }
  .chat-main { border-radius: 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24); }
  .chat-header { min-height: 50px; padding: 8px 10px 8px 12px; }
  .chat-stream { padding: 11px 7px 7px; scroll-behavior: auto; }
  .chat-msg { padding: 5px 5px; gap: 7px; }
  .chat-avatar { width: 28px; height: 28px; flex-basis: 28px; font-size: 0.64rem; }
  .chat-name { max-width: 150px; font-size: 0.78rem; }
  .chat-msg-text { font-size: 0.86rem; }
  .chat-msg-actions { opacity: 1; transform: none; pointer-events: auto; top: 1px; right: 2px; background: var(--surface-2); }
  .chat-msg:hover { background: transparent; }
  .chat-jump { bottom: 96px; }
  .chat-join { padding: 13px 11px 14px; }
  .chat-join-form { grid-template-columns: 1fr; }
  .chat-composer { padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px)); }
  .chat-tool { width: 36px; height: 36px; flex-basis: 36px; }
  #chatInput { font-size: 16px; min-height: 38px; padding: 8px 10px; }
  .chat-send { min-width: 72px; min-height: 38px; padding: 0 10px; font-size: 0.75rem; }
  .chat-send svg { display: none; }
  .chat-composer-foot { margin-top: 4px; }
  .chat-me { max-width: 55%; }
  .chat-pop { left: 8px; right: 8px; }
  .chat-emoji { width: calc(100% - 16px); grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .chat-aside {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9500;
    max-height: min(78vh, 660px);
    max-height: min(78dvh, 660px);
    padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px));
    border: 1px solid var(--line-2);
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
    background: var(--surface);
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.45);
    transform: translateY(105%);
    transition: transform 0.28s var(--ease);
    pointer-events: none;
  }
  .chat-shell.is-aside-open .chat-aside { transform: none; pointer-events: auto; }
  .chat-aside-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9499;
    background: rgba(3, 4, 7, 0.6);
    backdrop-filter: blur(2px);
  }
  .chat-aside-mobile-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .chat-aside-mobile-head b { font-family: var(--font-display); font-size: 0.95rem; }
  .chat-online-list { max-height: 190px; }
  .chat-toast { bottom: 86px; }
  .chat-live-banner { padding: 6px 10px; font-size: 0.7rem; }
  .chat-rx-dock { right: 8px; bottom: calc(var(--chat-bottom-h, 100px) + 70px); gap: 6px; }
  .chat-rx-btn { width: 40px; height: 40px; font-size: 1.08rem; }
  .chat-rx-layer { bottom: calc(var(--chat-bottom-h, 100px) + 70px); width: min(180px, 64%); height: min(45%, 320px); }
}
@media (max-width: 480px) {
  .chat-section .wrap { padding: 0 4px; }
  .chat-shell { height: calc(var(--chat-vh, 100dvh) - 72px); min-height: 300px; }
  .chat-head-titles { gap: 5px; }
  .chat-head-titles b { font-size: 0.86rem; }
  .chat-head-online { display: inline-flex; align-items: baseline; gap: 2px; font-size: 0.63rem; }
  .chat-slow-badge { max-width: 68px; overflow: hidden; font-size: 0.6rem; padding: 3px 7px; }
  .chat-join-head span { font-size: 0.72rem; }
  .chat-send { min-width: 64px; padding: 0 9px; }
  .chat-send svg { display: none; }
  .chat-char { font-size: 0.62rem; }
  .chat-msg-actions .chat-act { width: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .chat-main, .chat-aside, .chat-shell, .chat-toast, .chat-msg-actions { transition: none !important; }
  .chat-msg, .chat-sys, .chat-jump, .chat-modal-card,
  .chat-msg.is-highlight, .chat-spinner, .chat-rx-btn.is-burst,
  .chat-head-online b.is-bump, .chat-pill b.is-bump, .chat-side-count.is-bump { animation: none !important; }
  .chat-live-dot.is-live, .chat-pill-live.is-live .chat-dot { animation: none !important; }
  .chat-rx-particle { animation: chatRxFade 0.9s ease both !important; will-change: opacity; }
  .chat-stream { scroll-behavior: auto; }
}
