/* =====================================================================
   Pomoduck — Odak Odaklı Tasarım Sistemi (100dvh Zero-Scroll)
   ===================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  min-width: 0;
}

/* Dokunmatik dostu temel: mavi dokunma flaşını kaldır, mobilde otomatik metin büyütmeyi sabitle */
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

:root {
  /* Birleşik yarıçaplar, aura mesafeleri & katman hiyerarşisi */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 24px;
  --aura-inner: 9px;
  --aura-outer: 18px;

  --z-base: 0;
  --z-nav: 30;
  --z-popover: 35;
  --z-backdrop: 50;
  --z-drawer: 60;
  --z-modal: 70;
  --z-cookie: 80;
  --z-toast: 90;
  --z-bg: var(--z-base);
  --z-stage: var(--z-base);
  --z-chrome: var(--z-nav);
}

:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101217;
  --bg-glow-1: rgba(214, 40, 40, 0.14);
  --bg-glow-2: rgba(91, 181, 213, 0.12);
  --surface-0: #101217;
  --surface-1: #171a21;
  --surface-2: #1f232c;
  --surface: rgba(23, 26, 33, 0.86);
  --surface-solid: #171a21;
  --surface-elevated: rgba(31, 35, 44, 0.97);
  --card: #171a21;
  --card-tint: #1f232c;
  --inset: rgba(16, 18, 23, 0.72);
  --field: #13161c;
  --field-disabled: #1c2029;
  --ink: #f5f3ef;
  --ink-soft: #9fa6b2;
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --scroll-thumb: rgba(255, 255, 255, 0.22);

  /* Pomoduck Marka Kimliği: Pomodoro Kırmızısı + Ördek Turuncusu + Yumuşak Turkuaz */
  --brand: #d62828;
  --brand-strong: #e03535;
  --brand-rgb: 214, 40, 40;
  --brand-soft: rgba(214, 40, 40, 0.16);
  --brand-border: rgba(214, 40, 40, 0.4);
  --on-brand: #ffffff;

  --accent: #f59e0b;
  --accent-strong: #f08a24;
  --accent-rgb: 245, 158, 11;
  --accent-2: #f08a24;
  --accent-3: #5bb5d5;
  --calm: #5bb5d5;
  --calm-strong: #7cc7e0;
  --calm-rgb: 91, 181, 213;

  --peach: rgba(240, 138, 36, 0.22);
  --peach-deep: #f08a24;
  --butter: rgba(245, 158, 11, 0.2);
  --butter-deep: #f59e0b;
  --sage: rgba(91, 181, 213, 0.2);
  --sage-deep: #5bb5d5;
  --lilac: rgba(214, 40, 40, 0.16);
  --rose: rgba(214, 40, 40, 0.22);
  --muted-chip: rgba(255, 255, 255, 0.1);

  /* Geri sayım rozetleri */
  --ok-bg: rgba(91, 181, 213, 0.2);    --ok-ink: #a9ddef;
  --warn-bg: rgba(245, 158, 11, 0.22); --warn-ink: #fbd38d;
  --hot-bg: rgba(214, 40, 40, 0.24);   --hot-ink: #f6c2c2;
  --hot-glow: 214, 40, 40;

  --tint-focus: rgba(214, 40, 40, 0.1);
  --tint-break: rgba(91, 181, 213, 0.12);

  --online: #5bb5d5;

  --cal-shared-bg: rgba(214, 40, 40, 0.24); --cal-shared-ink: #f6c2c2;
  --cal-mine-bg: rgba(91, 181, 213, 0.22);  --cal-mine-ink: #cfeaf5;

  --on-accent: #101217;
  --danger: #fb7185;
  --success: #5bb5d5;

  --shadow: 0 14px 38px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.34);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f9f7f4;
  --bg-glow-1: rgba(200, 30, 30, 0.1);
  --bg-glow-2: rgba(78, 168, 199, 0.12);
  --surface-0: #f9f7f4;
  --surface-1: #ffffff;
  --surface-2: #f3f0eb;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --surface-elevated: rgba(255, 255, 255, 0.98);
  --card: #ffffff;
  --card-tint: #f7f4ef;
  --inset: #f1ece4;
  --field: #ffffff;
  --field-disabled: #eae4db;
  --ink: #1e1b18;
  --ink-soft: #625b53;
  --border-subtle: #e6e0d8;
  --border-strong: #d8d0c4;
  --line: #e6e0d8;
  --line-strong: #d8d0c4;
  --scroll-thumb: rgba(98, 91, 83, 0.3);

  --brand: #c81e1e;
  --brand-strong: #b01818;
  --brand-rgb: 200, 30, 30;
  --brand-soft: rgba(200, 30, 30, 0.12);
  --brand-border: rgba(200, 30, 30, 0.35);
  --on-brand: #ffffff;

  --accent: #f08a24;
  --accent-strong: #d97706;
  --accent-rgb: 240, 138, 36;
  --accent-2: #d97706;
  --accent-3: #4ea8c7;
  --calm: #4ea8c7;
  --calm-strong: #3d8ba6;
  --calm-rgb: 78, 168, 199;

  --peach: #fbe3ce;
  --peach-deep: #e07a2a;
  --butter: #fdeed5;
  --butter-deep: #e0821a;
  --sage: #ddeef6;
  --sage-deep: #4ea8c7;
  --lilac: #fbe0e0;
  --rose: #fbe0e0;
  --muted-chip: #efe9e1;

  --ok-bg: #ddeef6;   --ok-ink: #1e6e8c;
  --warn-bg: #fdeed5; --warn-ink: #8a4b0a;
  --hot-bg: #fbe0e0;  --hot-ink: #9b1c1c;
  --hot-glow: 200, 30, 30;

  --tint-focus: rgba(200, 30, 30, 0.08);
  --tint-break: rgba(78, 168, 199, 0.12);

  --online: #4ea8c7;

  --cal-shared-bg: #fbe0e0; --cal-shared-ink: #8a1414;
  --cal-mine-bg: #ddeef6;   --cal-mine-ink: #145a73;

  --on-accent: #1e1b18;
  --danger: #c81e1e;
  --success: #4ea8c7;

  --shadow: 0 10px 30px rgba(30, 27, 24, 0.1);
  --shadow-soft: 0 4px 14px rgba(30, 27, 24, 0.07);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Pomoduck Özel SVG İkon Sistemi */
.pd-icon-wrap,
.pd-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  vertical-align: middle;
  line-height: 1;
}
.pd-icon svg,
svg.pd-icon {
  display: block;
  flex-shrink: 0;
}

.eye-open,
.eye-closed {
  display: block;
  pointer-events: none;
}

html, body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 15% -10%, var(--bg-glow-1) 0%, transparent 62%),
    radial-gradient(820px 520px at 88% 110%, var(--bg-glow-2) 0%, transparent 60%),
    var(--bg);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}
body.drawer-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: var(--z-bg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease;
}
body[data-phase="focus"]::before {
  opacity: 1;
  background: radial-gradient(900px 650px at 50% 45%, var(--tint-focus) 0%, transparent 72%);
}
body[data-phase="break"]::before {
  opacity: 1;
  background: radial-gradient(900px 650px at 50% 45%, var(--tint-break) 0%, transparent 72%);
}

.app, .login { position: relative; z-index: 1; }

h1, h2, h3, p { margin: 0; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.84rem; }
.empty {
  color: var(--ink-soft);
  font-size: 0.85rem;
  text-align: center;
  padding: 1.25rem 0.5rem;
}

/* Tüm ekranlarda görünür kaydırma çubuğu olmadan kaydırma */
html, body, * {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* ---------- Form Elemanları & Genel Butonlar ---------- */
input, select, textarea {
  font: inherit;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  min-height: 38px;
  padding: 0.45rem 0.72rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.15rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 15px 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.22);
}
input:disabled, select:disabled, textarea:disabled {
  background: var(--field-disabled);
  opacity: 0.6;
  cursor: not-allowed;
}

.btn {
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  border: 1px solid transparent;
  border-radius: 999px;
  min-height: 36px;
  padding: 0.48rem 1.05rem;
  cursor: pointer;
  color: var(--ink);
  background: var(--muted-chip);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 0.15s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.btn-sm {
  min-height: 30px;
  padding: 0.28rem 0.72rem;
  font-size: 0.78rem;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.btn:disabled { opacity: 0.48; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand-strong) 0%, var(--brand) 52%, var(--brand-strong) 100%);
  color: var(--on-brand);
  font-weight: 800;
  border-color: rgba(var(--brand-rgb), 0.35);
  box-shadow: 0 6px 20px rgba(var(--brand-rgb), 0.28);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 10px 26px rgba(var(--brand-rgb), 0.4);
}
.btn-big {
  min-height: 42px;
  padding: clamp(0.62rem, 1.3dvh, 0.8rem) clamp(1.3rem, 2.8vw, 1.8rem);
  font-size: clamp(0.92rem, 1.55dvh, 1.02rem);
  font-weight: 800;
}
.btn-soft {
  background: var(--sage);
  border-color: rgba(var(--calm-rgb), 0.34);
  color: var(--ink);
}
.btn-ghost {
  background: rgba(148, 163, 184, 0.08);
  border-color: var(--line-strong);
  color: var(--ink-soft);
}
.btn-ghost:hover:not(:disabled) {
  background: rgba(148, 163, 184, 0.16);
  color: var(--ink);
  border-color: var(--accent);
}
.btn-danger {
  background: var(--hot-bg);
  color: var(--hot-ink);
  border-color: rgba(var(--hot-glow), 0.38);
}
.btn-join {
  background: var(--sage);
  border-color: var(--sage-deep);
  color: var(--ink);
}
.btn-overdrive {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent) 100%);
  color: #111827;
  font-weight: 800;
}
.icon-pill {
  font: inherit;
  height: 36px;
  padding: 0 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  backdrop-filter: blur(12px);
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease, transform 0.15s ease;
}
.icon-pill:hover { color: var(--ink); border-color: var(--accent); transform: translateY(-1px); }

/* ---------- Giriş Ekranı & Ziyaretçi Tanıtım Alanı ---------- */
.login {
  height: 100dvh;
  max-height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: clamp(1.2rem, 4dvh, 2.5rem) 1rem 2.5rem;
}
.login-card {
  flex: none;
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  padding: 1.75rem 1.85rem;
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 560px;
  width: 100%;
}
.brand-logo {
  display: block;
  flex: none;
  width: auto;
}
/* Tema duyarlı marka logosu: Açık temada logo-light, koyu temada logo-dark görünür */
.brand-logo--light { display: none; }
:root[data-theme="light"] .brand-logo--light { display: block; }
:root[data-theme="light"] .brand-logo--dark { display: none; }
/* Sol kolon logosu: kolon genişliğine tam oturur (kolon genişliği = logo genişliği) */
.brand .brand-logo {
  width: 100%;
  height: auto;
}

.landing-seo {
  width: 100%;
  max-width: 860px;
  display: grid;
  gap: 1.35rem;
}
.seo-section {
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 1.35rem 1.45rem;
  display: grid;
  gap: 0.8rem;
}
.seo-section h2 {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.seo-lead {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.seo-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.seo-card {
  background: var(--card-tint);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0.9rem 0.95rem;
  display: grid;
  gap: 0.35rem;
  align-content: start;
}
.seo-card h3 {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.35;
}
.seo-card p {
  font-size: 0.81rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.faq-list {
  display: grid;
  gap: 0.5rem;
}
.faq-item {
  background: var(--card-tint);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0.65rem 0.88rem;
}
.faq-item summary {
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent);
  flex: none;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
  margin-top: 0.52rem;
  padding-top: 0.52rem;
  border-top: 1px dashed var(--line);
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-align: center;
  margin-bottom: 1.25rem;
}
.login-brand .brand-logo {
  width: min(240px, 66%);
  height: auto;
}
.pending-invite-banner {
  margin-bottom: 0.85rem;
  padding: 0.55rem 0.78rem;
  border-radius: var(--r-md);
  background: rgba(var(--calm-rgb), 0.14);
  border: 1px solid rgba(var(--calm-rgb), 0.4);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
}
.login-card h1 { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; }
.login-card p { color: var(--ink-soft); font-size: 0.88rem; line-height: 1.45; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.38rem;
  padding: 0.28rem;
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 1rem;
}
.auth-tab {
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 0.52rem 0.9rem;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.auth-tab:hover { color: var(--ink); }
.auth-tab.active {
  background: var(--surface-elevated);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}
.auth-panel-wrap {
  min-height: 264px;
}
.login-auth-form,
.create-profile-form,
.password-form {
  display: grid;
  gap: 0.72rem;
  text-align: left;
}
.auth-field {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}
.auth-field > span,
.auth-field > label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.field-hint {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-soft);
  line-height: 1.35;
}
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.password-input-wrap input {
  width: 100%;
  padding-right: 2.55rem;
}
.password-input-wrap input::-ms-reveal,
.password-input-wrap input::-ms-clear {
  display: none;
}
.password-toggle-btn {
  position: absolute;
  right: 0.3rem;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.password-toggle-btn:hover {
  color: var(--ink);
  background: rgba(148, 163, 184, 0.14);
}
.auth-submit-btn {
  width: 100%;
  min-height: 42px;
  margin-top: 0.18rem;
  font-size: 0.92rem;
}
.auth-hint {
  margin: 0.1rem 0 0;
  font-size: 0.78rem !important;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.4;
}
.reg-style-box {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--inset);
  padding: 0.55rem 0.75rem;
}
.reg-style-box summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.reg-style-box summary::-webkit-details-marker { display: none; }
.reg-style-box summary::after { content: "▾"; font-size: 0.85rem; }
.reg-style-box[open] summary { color: var(--ink); margin-bottom: 0.65rem; }
.reg-style-box[open] summary::after { content: "▴"; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 1rem 0 0.75rem;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.guest-try-btn {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  background: var(--card-tint);
}
.guest-try-btn:hover:not(:disabled) {
  border-color: var(--accent);
}
.guest-try-note {
  margin-top: 0.45rem !important;
  font-size: 0.76rem !important;
  color: var(--ink-soft);
  text-align: center;
}
.password-prompt-note {
  margin: 0 0 0.75rem;
  padding: 0.58rem 0.75rem;
  border-radius: var(--r-md);
  background: rgba(var(--calm-rgb), 0.14);
  border: 1px solid rgba(var(--calm-rgb), 0.35);
  font-size: 0.81rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
}
.password-form label { display: grid; gap: 0.28rem; font-size: 0.84rem; font-weight: 600; color: var(--ink-soft); }
.login-msg {
  margin: 0.65rem 0 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--danger);
  text-align: center;
}
.login-msg.success { color: var(--success); }

/* Misafir modu kayıt segmenti: profil çipinin sağ ucunda kompakt çağrı */
.guest-banner {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-width: 0;
}
.guest-banner-cta {
  font: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  padding: 0 0.62rem;
  border-radius: 999px;
  border: 0;
  background: var(--butter-deep);
  color: #0b0e14;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.guest-banner-cta:hover { transform: translateY(-1px); }

/* ---------- Avatar Çerçeveleri ---------- */
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.25rem;
  background: rgba(15, 20, 29, 0.72);
  color: var(--ink);
  border: 2px solid var(--avatar-ring, var(--line-strong));
  padding: 3px;
  overflow: hidden;
  flex: none;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--avatar-ring, transparent) 24%, transparent);
}
:root[data-theme="light"] .avatar { background: rgba(255, 255, 255, 0.88); }
.avatar svg { width: 100%; height: 100%; display: block; }

/* ---------- Ana Uygulama Kabuğu (Tam Responsive 100dvh Odak Sahnesi) ---------- */
.app:not([hidden]) {
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  display: grid;
  --rail-w: 124px;
  grid-template-columns: var(--rail-w) minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  grid-template-areas:
    "brand    presence actions"
    "stage    stage    stage"
    "members  members  members"
    "dock     dock     dock";
  padding: clamp(0.4rem, 1dvh, 0.75rem) clamp(0.65rem, 2.2vw, 1.5rem) calc(0.4rem + env(safe-area-inset-bottom, 0px));
  gap: clamp(0.24rem, 0.7dvh, 0.5rem);
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

/* ---------- Sol Kolon Parçaları: Logo, Çevrimiçi pill, Oda Katılımcıları, Aksiyonlar ---------- */
.brand {
  grid-area: brand;
  min-width: 0;
}
.presence-wrap {
  grid-area: presence;
}
.header-actions {
  grid-area: actions;
}

/* ---------- Sol Kolon: Logo (tam genişlik) + Çevrimiçi pill ---------- */
.brand {
  display: block;
  width: 100%;
}
.brand-logo-svg { flex: none; }

/* Çevrimiçi / Oda Katılımcı Göstergesi (logo ile aynı genişlikte kolonda) */
.presence-wrap {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.presence-pill {
  font: inherit;
  height: 36px;
  padding: 0 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  backdrop-filter: blur(12px);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  max-width: min(46vw, 280px);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.15s ease;
}
.presence-pill:hover {
  border-color: var(--brand-border);
  transform: translateY(-1px);
}
.presence-pill.in-room {
  border-color: var(--brand-border);
  background: var(--brand-soft);
}
.presence-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
  flex: none;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.presence-pill.connected .presence-status-dot {
  background: var(--online);
  box-shadow: 0 0 8px rgba(var(--calm-rgb), 0.72);
}
.presence-pill.in-room .presence-status-dot {
  background: var(--brand);
  box-shadow: 0 0 8px rgba(var(--brand-rgb), 0.75);
}
.presence-pill.reconnecting .presence-status-dot {
  background: var(--accent);
  animation: blink 1.1s ease-in-out infinite;
}
.presence-status-text {
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-avatar-stack {
  display: inline-flex;
  align-items: center;
  margin-left: 0.1rem;
}
.room-avatar-stack .avatar {
  width: 22px;
  height: 22px;
  padding: 1px;
  border-width: 1.5px;
  margin-left: -6px;
}
.room-avatar-stack .avatar:first-child { margin-left: 0; }

.host-lock-note {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink-soft);
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  background: var(--inset);
  border: 1px solid var(--line);
}

/* Oda Modalı */
.room-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
  text-align: left;
}
.room-form input { width: 100%; }
.room-active-details { display: grid; gap: 0.85rem; }
.room-detail-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.72rem 0.88rem;
  border-radius: var(--r-md);
  background: var(--inset);
  border: 1px solid var(--line);
}
.room-detail-name {
  display: block;
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--ink);
  word-break: break-word;
}
.room-invite-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: center;
}
.room-invite-row input {
  width: 100%;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}
.room-members-section { display: grid; gap: 0.42rem; }
.room-member-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.38rem;
  max-height: 220px;
  overflow-y: auto;
}
.room-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.72rem;
  border-radius: var(--r-md);
  background: var(--card-tint);
  border: 1px solid var(--line);
  flex-wrap: wrap;
}
.room-member-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1 1 180px;
}
.room-member-row .avatar {
  width: 34px;
  height: 34px;
  padding: 2px;
  border-width: 2px;
  flex: none;
}
.room-member-info {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 0.16rem;
}
.room-member-name-row {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  flex-wrap: wrap;
  min-width: 0;
}
.room-member-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.room-member-handle {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  opacity: 0.85;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.room-member-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0.1rem 0.44rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.2;
  flex: none;
}
.room-member-tag.host {
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  color: var(--brand);
}
:root[data-theme="light"] .room-member-tag.host {
  color: #b45309;
}
.room-member-tag.me {
  background: rgba(var(--calm-rgb), 0.16);
  border: 1px solid rgba(var(--calm-rgb), 0.38);
  color: var(--sage-deep);
}
.room-member-sub {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.room-member-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  flex: none;
}
.room-member-host {
  font-size: 0.66rem;
  font-weight: 800;
  padding: 0.14rem 0.44rem;
  border-radius: 999px;
  background: var(--butter);
  color: #fde68a;
  flex: none;
}
:root[data-theme="light"] .room-member-host { color: #92400e; }

/* Sol Kolon Altı: Bildirim ve Profil Kapsülü */
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  min-width: 0;
}
/* Profil çipi: profil butonu + (misafirde) kayıt segmentini saran kapsül */
.me-chip {
  display: flex;
  align-items: center;
  min-width: 0;
}
.me-profile-btn {
  font: inherit;
  color: var(--ink);
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0 0.65rem 0 0.22rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--profile-accent, var(--line-strong)) 55%, var(--line));
  background: var(--surface);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.18s ease, background 0.18s ease;
}
.me-profile-btn:hover {
  transform: translateY(-1px);
  border-color: var(--profile-accent, var(--accent));
}
.me-profile-btn .avatar { width: 28px; height: 28px; padding: 2px; border-width: 2px; }
.me-name { font-size: 0.84rem; font-weight: 700; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--profile-accent, var(--online));
  flex: none;
}

/* ---------- Misafir Modu: Tek Kompakt Çip (avatar + isim + Kayıt ol) ---------- */
/* Yalnızca misafir şeridi görünürken profil kapsülü tek çipe dönüşür. */
body:has(#guestBanner:not([hidden])) .header-actions {
  flex-wrap: wrap;
  row-gap: 0.35rem;
  max-width: var(--rail-w);
}
body:has(#guestBanner:not([hidden])) .me-chip {
  flex: 1 1 100%;
  max-width: 100%;
  gap: 0;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--profile-accent, var(--line-strong)) 55%, var(--line));
  background: var(--surface);
  backdrop-filter: blur(12px);
}
body:has(#guestBanner:not([hidden])) .me-chip .me-profile-btn {
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
  padding: 0 0.3rem 0 0.1rem;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}
body:has(#guestBanner:not([hidden])) .me-chip .me-profile-btn:hover { transform: none; }
body:has(#guestBanner:not([hidden])) .me-chip .me-name { flex: 1 1 auto; min-width: 0; max-width: none; }
body:has(#guestBanner:not([hidden])) .me-chip .me-status-dot { display: none; }

/* ---------- Merkez Sahne (Aura Halkaları Kesilmeden Geniş Nefes Alanı) ---------- */
.focus-stage {
  grid-area: stage;
  position: relative;
  z-index: var(--z-stage);
  width: 100%;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  display: grid;
  place-items: center;
  overflow: visible;
}
.timer-card {
  width: min(100%, 660px);
  max-height: 100%;
  min-height: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.24rem, 0.72dvh, 0.52rem);
  padding: clamp(0.1rem, 0.35dvh, 0.35rem) clamp(0.4rem, 1.5vw, 0.9rem);
  text-align: center;
  touch-action: pan-y;
}

/* ---------- Oda İçi Kompakt Çoklu Akış Seçici & Kaydırma Göstergesi ---------- */
.flow-switcher-wrap {
  display: grid;
  justify-items: center;
  gap: 0.14rem;
  max-width: 100%;
}
.flow-switcher-wrap[hidden] {
  display: none !important;
}
.flow-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  max-width: min(94vw, 520px);
  height: 30px;
  padding: 2px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px);
  overflow-x: auto;
  scrollbar-width: none;
}
.flow-switcher::-webkit-scrollbar {
  display: none;
}
.flow-tab {
  flex: none;
  height: 24px;
  padding: 0 0.6rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}
.flow-tab:hover:not(.active) {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}
:root[data-theme="light"] .flow-tab:hover:not(.active) {
  background: rgba(15, 23, 42, 0.05);
}
.flow-tab.active {
  background: var(--brand-soft);
  color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand-border);
}
:root[data-theme="light"] .flow-tab.active {
  color: #b45309;
}
.flow-tab-follow-group {
  display: inline-flex;
  align-items: center;
  gap: 0.08rem;
  flex: none;
  min-width: 0;
}
.flow-tab-follow-group[hidden] {
  display: none !important;
}
.flow-tab-follow {
  padding-right: 0.42rem;
}
.flow-follow-name {
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flow-unfollow-x {
  flex: none;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
.flow-unfollow-x:hover {
  color: #fb7185;
  background: rgba(251, 113, 133, 0.14);
}
.flow-swipe-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}
.flow-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: transform 0.16s ease, background-color 0.16s ease;
}
.flow-dot[hidden] {
  display: none !important;
}
.flow-dot.active {
  background: var(--brand);
  transform: scale(1.25);
}

/* Dokunmatik (coarse pointer): akış sekmeleri ve kapatma butonu için daha rahat dokunma hedefleri */
@media (pointer: coarse) {
  .flow-switcher {
    height: 34px;
  }
  .flow-tab {
    height: 28px;
  }
  .flow-unfollow-x {
    width: 26px;
    height: 26px;
  }
}

/* Dokunmatikte yapışkan hover sıçramalarını engelle (yalnızca hover olmayan cihazlar) */
@media (hover: none) {
  .btn:hover:not(:disabled),
  .icon-pill:hover,
  .guest-banner-cta:hover,
  .presence-pill:hover,
  .me-profile-btn:hover,
  .dial-duration-chip:hover:not(:disabled),
  .dial-overdrive-chip:hover:not(:disabled),
  .badge-card:hover,
  .chat-ai-mention-btn:hover:not(:disabled) {
    transform: none;
  }
}

.host-lock-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  max-width: 100%;
}
.host-lock-row[hidden] {
  display: none !important;
}
.flow-quick-btn {
  min-height: 28px;
  padding: 0.22rem 0.65rem;
  font-size: 0.74rem;
}
.follow-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.55rem;
  max-width: 100%;
}
.follow-action-bar[hidden] {
  display: none !important;
}
.follow-sync-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--brand);
}
:root[data-theme="light"] .follow-sync-label {
  color: #b45309;
}
.follow-action-btns {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: center;
}

.stage-meta {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  gap: clamp(0.18rem, 0.5dvh, 0.36rem);
  max-width: 100%;
  min-height: 44px;
  padding-top: 0.1rem;
  padding-bottom: 0.06rem;
}
.phase-cluster {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.phase-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.26rem 0.82rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--ink);
}
.phase-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
body[data-phase="focus"] .phase-pill { border-color: var(--brand-border); }
body[data-phase="focus"] .phase-dot { background: var(--brand); animation: blink 1.6s ease-in-out infinite; }
body[data-phase="break"] .phase-pill { border-color: rgba(var(--calm-rgb), 0.45); }
body[data-phase="break"] .phase-dot { background: var(--calm); animation: blink 2.2s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.cycle-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.76rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 0.26rem 0.7rem;
  border-radius: 999px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  color: var(--ink);
}
.cycle-pill.long-break {
  background: rgba(var(--calm-rgb), 0.18);
  border-color: rgba(var(--calm-rgb), 0.35);
}

.stage-headline {
  font-size: clamp(0.84rem, 1.5dvh, 0.95rem);
  font-weight: 600;
  color: var(--ink-soft);
  max-width: min(92vw, 520px);
  cursor: pointer;
  line-height: 1.35;
  transition: opacity 0.28s ease, transform 0.28s ease, color 0.25s ease;
}
.stage-headline.motivation-quote {
  color: var(--accent) !important;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(0.8rem, 1.45dvh, 0.92rem);
}
:root[data-theme="light"] .stage-headline.motivation-quote { color: #b45309 !important; }
.fade-out { opacity: 0 !important; transform: translateY(-4px); }
.fade-in { opacity: 1; transform: translateY(0); }

/* ---------- Dairesel Sayaç & Hayalet Aura & Hidrasyon Dalgası ---------- */
.dial-wrap {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding:
    calc(var(--aura-outer) + clamp(4px, 0.8dvh, 10px))
    calc(var(--aura-outer) + clamp(10px, 1.8vw, 20px));
}
.dial {
  position: relative;
  container-type: inline-size;
  width: clamp(248px, min(58vw, calc(100dvh - 380px)), 460px);
  aspect-ratio: 1;
  flex: none;
  border-radius: 50%;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.18));
}
.dial svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.dial-track {
  fill: none;
  stroke: var(--line);
  stroke-width: 9;
}
.dial-progress {
  fill: none;
  stroke: url(#dialGradFocus);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 741.4;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.16s linear, stroke 0.5s ease;
}
body[data-phase="break"] .dial-progress { stroke: var(--calm); }
.dial-progress.overdrive { stroke: var(--accent); }

body[data-phase="starting"] .dial-progress {
  stroke: var(--brand);
  filter: drop-shadow(0 0 14px var(--brand-border));
}
.dial.countdown-pulse,
.dial-container.countdown-pulse {
  animation: starting-ring-pulse 1s ease-in-out infinite;
}
@keyframes starting-ring-pulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(var(--brand-rgb), 0.22)); }
  50% { filter: drop-shadow(0 0 18px rgba(var(--brand-rgb), 0.48)); }
}
.dial.countdown-reduced-motion,
.dial-container.countdown-reduced-motion {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .dial.countdown-pulse,
  .dial-container.countdown-pulse {
    animation: none;
  }
}

.timer-card.finished .dial svg {
  animation: dial-finished 1.2s ease-out;
}
@keyframes dial-finished {
  0%   { filter: drop-shadow(0 0 0 rgba(var(--calm-rgb), 0)); transform: rotate(-90deg) scale(1); }
  40%  { filter: drop-shadow(0 0 22px rgba(var(--calm-rgb), 0.72)); transform: rotate(-90deg) scale(1.03); }
  100% { filter: drop-shadow(0 0 0 rgba(var(--calm-rgb), 0)); transform: rotate(-90deg) scale(1); }
}

/* Hayalet Aura Halkaları (profil rengiyle parlar, sekme uyarısında solar) */
.timer-aura {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.24;
  border: 1.5px solid color-mix(in srgb, var(--aura-color, var(--calm)) 72%, transparent);
  transition: opacity 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.aura-onur { inset: calc(var(--aura-inner) * -1); --aura-color: var(--calm); }
.aura-yaren { inset: calc(var(--aura-outer) * -1); --aura-color: var(--accent); }
.timer-aura.aura-pulse { animation: aura-breathe 2s ease-in-out; }
@keyframes aura-breathe {
  0%   { opacity: 0.24; transform: scale(0.985); box-shadow: 0 0 0 0 transparent; }
  35%  { opacity: 0.96; transform: scale(1.03); box-shadow: 0 0 22px 5px color-mix(in srgb, var(--aura-color, var(--calm)) 48%, transparent); }
  100% { opacity: 0.24; transform: scale(1); box-shadow: 0 0 0 0 transparent; }
}

/* Sekme Kalkanı: 45 sn ayrılınca Aura halkası soluklaşıp uyarı verir */
.timer-aura.aura-dim {
  opacity: 0.72;
  border-style: dashed;
  border-color: var(--accent) !important;
  animation: aura-warn-dim 3.2s ease-in-out;
}
@keyframes aura-warn-dim {
  0%, 100% { opacity: 0.24; transform: scale(1); }
  20%, 60% { opacity: 0.14; transform: scale(0.965); box-shadow: 0 0 18px 2px rgba(var(--accent-rgb), 0.32); }
  40%      { opacity: 0.75; transform: scale(1.015); box-shadow: 0 0 22px 4px rgba(var(--accent-rgb), 0.45); }
}

/* Mola Ritüeli: Turkuaz-Mavi Dalga Parlaması */
.dial-wave {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  border: 3px solid var(--calm);
}
.dial.hydration-wave .dial-wave {
  animation: hydration-ripple 1.65s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes hydration-ripple {
  0% {
    opacity: 0.95;
    transform: scale(0.94);
    border-color: var(--calm);
    box-shadow: 0 0 28px 8px rgba(var(--calm-rgb), 0.5), inset 0 0 22px rgba(var(--calm-rgb), 0.4);
  }
  55% {
    opacity: 0.68;
    transform: scale(1.16);
    border-color: var(--calm);
    box-shadow: 0 0 42px 14px rgba(var(--calm-rgb), 0.32);
  }
  100% {
    opacity: 0;
    transform: scale(1.3);
    border-color: var(--calm);
    box-shadow: 0 0 0 0 transparent;
  }
}

.dial-inner {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 13% 11% 11%;
  text-align: center;
}
.time {
  font-size: clamp(2.85rem, 23.5cqi, 6.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 0.98;
  margin-top: -2%;
}
.time.overdrive-time {
  font-size: clamp(2.35rem, 19.2cqi, 5.5rem);
  color: var(--accent);
  text-shadow: 0 0 24px rgba(var(--accent-rgb), 0.35);
}
body[data-phase="starting"] .time {
  font-size: clamp(3.8rem, 31cqi, 8rem);
  margin-top: 0;
}
.dial-quick-controls {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1.8cqi, 8px);
  max-width: 74%;
  margin-top: clamp(8px, 4.2cqi, 20px);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.dial-duration-chip,
.dial-overdrive-chip {
  min-width: 0;
  min-height: clamp(24px, 7.6cqi, 32px);
  padding: 0 clamp(7px, 2.6cqi, 12px);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-1) 76%, transparent);
  color: var(--ink-soft);
  font: inherit;
  font-size: clamp(0.64rem, 2.75cqi, 0.78rem);
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(3px, 1.2cqi, 5px);
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, transform 0.14s ease;
}
.dial-duration-chip .pd-icon,
.dial-overdrive-chip .pd-icon {
  width: clamp(11px, 4.2cqi, 15px);
  height: clamp(11px, 4.2cqi, 15px);
}
.dial-duration-chip:hover:not(:disabled),
.dial-overdrive-chip:hover:not(:disabled) {
  border-color: var(--brand-border);
  color: var(--ink);
  transform: translateY(-1px);
}
.dial-duration-chip {
  font-variant-numeric: tabular-nums;
}
/* Dial çiplerinde yalnızca ikon görünsün (metin etiketleri kaldırıldı) */
.dial-duration-chip > span:not(.pd-icon-wrap),
.dial-overdrive-chip > span:not(.pd-icon-wrap) {
  display: none;
}
.dial-overdrive-chip.active {
  color: var(--on-brand);
  border-color: var(--brand);
  background: var(--brand);
  font-weight: 800;
  box-shadow: 0 0 16px rgba(var(--brand-rgb), 0.36);
}
.dial-overdrive-chip.active:hover:not(:disabled) {
  color: var(--on-brand);
}
.dial-overdrive-chip.active .pd-icon polygon {
  fill: rgba(11, 15, 23, 0.18);
  stroke: currentColor;
}
.dial-overdrive-chip[disabled],
.dial-duration-chip[disabled] {
  opacity: 0.45;
  cursor: default;
  transform: none;
}
body[data-phase="starting"] .dial-quick-controls {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ---------- Tek Grup Ana Kontroller ---------- */
.stage-controls {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  gap: clamp(0.28rem, 0.75dvh, 0.5rem);
  width: 100%;
}
.stage-action-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(0.4rem, 1.2vw, 0.65rem);
  width: 100%;
  min-width: 0;
}
.timer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.control-tools {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  max-width: 100%;
}
.course-pill-select {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0 2.05rem 0 0.78rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background-color: var(--surface);
  color: var(--ink);
  max-width: min(250px, 62vw);
  height: 32px;
  min-height: 32px;
  line-height: 30px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

/* ---------- Pomoduck Tasarımlı Özel Açılır Seçim Menüsü (Tüm Select'ler) ---------- */
.pm-select-wrap {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}
.pm-select-wrap.is-pill {
  display: inline-flex;
  width: auto;
  max-width: min(250px, 62vw);
}
.pm-native-select {
  position: absolute;
  inset: 0;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}
.pm-select-trigger {
  font: inherit;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  width: 100%;
  min-height: 38px;
  padding: 0 0.72rem 0 0.78rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.48rem;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}
.pm-select-trigger:hover:not(:disabled) {
  border-color: var(--brand-border);
}
.pm-select-trigger.is-open,
.pm-select-trigger:focus-visible {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.22);
}
.pm-select-trigger:disabled {
  background: var(--field-disabled);
  opacity: 0.6;
  cursor: not-allowed;
}
.pm-select-wrap.is-pill .pm-select-trigger {
  width: auto;
  max-width: 100%;
  height: 32px;
  min-height: 32px;
  padding: 0 0.68rem 0 0.84rem;
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
}
.pm-select-wrap.is-pill .pm-select-trigger:hover:not(:disabled) {
  border-color: var(--accent);
}
.pm-select-value {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}
.pm-select-caret {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  transition: transform 0.16s ease, color 0.16s ease;
}
.pm-select-trigger.is-open .pm-select-caret {
  transform: rotate(180deg);
  color: var(--brand);
}
.pm-select-menu {
  position: fixed;
  z-index: 95;
  padding: 0.34rem;
  border-radius: var(--r-md);
  background: var(--surface-elevated);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  gap: 0.14rem;
}
.pm-select-group-label {
  padding: 0.38rem 0.56rem 0.16rem;
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.pm-select-option {
  width: 100%;
  min-height: 34px;
  padding: 0.42rem 0.6rem;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.pm-select-option:hover,
.pm-select-option:focus-visible {
  background: rgba(148, 163, 184, 0.14);
  outline: none;
}
.pm-select-option.is-selected {
  background: var(--brand-soft);
  border-color: var(--brand-border);
  font-weight: 700;
}
.pm-select-option-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pm-select-option-check {
  flex: none;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
}
:root[data-theme="light"] .pm-select-option-check {
  color: #b45309;
}

.hydration-box {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0.3rem 0.72rem;
  border-radius: 999px;
  background: rgba(var(--calm-rgb), 0.1);
  border: 1px solid rgba(var(--calm-rgb), 0.3);
}
.btn-hydrate {
  background: rgba(var(--calm-rgb), 0.22);
  color: var(--calm);
  border-color: rgba(var(--calm-rgb), 0.48);
  min-height: 28px;
  padding: 0.24rem 0.72rem;
  font-size: 0.78rem;
}
:root[data-theme="light"] .btn-hydrate { background: #ddeef6; color: #145a73; border-color: var(--calm); }
.btn-hydrate.done {
  background: rgba(var(--calm-rgb), 0.24);
  border-color: var(--calm);
  color: #6ee7b7;
}
:root[data-theme="light"] .btn-hydrate.done { color: #065f46; }
.hydration-peers { display: inline-flex; gap: 0.32rem; flex-wrap: wrap; }
.hydration-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  background: var(--inset);
  color: var(--ink-soft);
}
.hydration-chip.done { color: var(--success); }

.notice {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  min-height: 1.05em;
  margin: 0.18rem 0 0.1rem;
}
.notice:empty { display: none; }
.notice.error { color: var(--danger); }
.notice.success { color: var(--success); }

#extendBtn.pulse-extend {
  border-color: var(--butter-deep);
  background: var(--butter);
  color: var(--ink);
}

/* ---------- Tek Ana Gezinme Çubuğu (Ayrılmış Alt Grid Satırı — İçeriği Asla Örtmez) ---------- */
.primary-nav {
  grid-area: dock;
  position: relative;
  justify-self: center;
  align-self: center;
  z-index: var(--z-chrome);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.24rem;
  padding: 0.3rem 0.42rem;
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  width: max-content;
  max-width: min(960px, calc(100vw - 1.5rem));
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.primary-nav::-webkit-scrollbar { display: none; }
.nav-btn {
  position: relative;
  font: inherit;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  min-height: 36px;
  padding: 0.32rem 0.66rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.14s ease, color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  flex: 0 0 auto;
  scroll-snap-align: center;
}
.nav-btn:hover {
  color: var(--ink);
  background: rgba(148, 163, 184, 0.11);
}
.nav-btn.active {
  color: var(--ink);
  background: var(--brand-soft);
  border-color: var(--brand-border);
}
.nav-btn.playing {
  color: var(--sage-deep);
}
.nav-label {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}
.dock-badge {
  position: absolute;
  top: -3px;
  right: -2px;
  min-width: 17px;
  height: 17px;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 0.62rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  display: grid;
  place-items: center;
}
.dock-badge[hidden] {
  display: none;
}
.dock-badge.dock-badge-dot {
  top: 4px;
  right: 5px;
  min-width: 8px;
  width: 8px;
  height: 8px;
  padding: 0;
  background: var(--brand);
  box-shadow: 0 0 8px color-mix(in srgb, var(--brand) 65%, transparent);
}
.dock-status-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  pointer-events: none;
}
.nav-btn.playing .dock-status-dot {
  background: var(--sage-deep);
  box-shadow: 0 0 8px var(--sage-deep);
}

/* ---------- Offcanvas & Modal Paneller ---------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-backdrop);
  background: rgba(5, 8, 13, 0.62);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}
.drawer-backdrop.show { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: var(--z-drawer);
  width: min(100%, 440px);
  display: flex;
  flex-direction: column;
  background: var(--surface-solid);
  border-left: 1px solid var(--line-strong);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.45);
  visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.22, 0.8, 0.3, 1), visibility 0s linear 0.28s;
}
.drawer-right { right: 0; transform: translateX(104%); border-radius: var(--r-xl) 0 0 var(--r-xl); }
.drawer-modal {
  left: auto;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: var(--z-modal);
  width: min(94vw, 680px);
  max-height: 100dvh;
  border-radius: var(--r-xl) 0 0 var(--r-xl);
  border: 1px solid var(--line-strong);
  transform: translateX(104%);
  opacity: 0;
  transition: transform 0.24s cubic-bezier(0.22, 0.8, 0.3, 1), opacity 0.2s ease, visibility 0s linear 0.24s;
}
.drawer-sounds { width: min(100%, 440px); }
.drawer-modal.drawer-sm { width: min(92vw, 430px); }
.drawer-modal.drawer-profile { width: min(94vw, 560px); overflow: hidden; }
.drawer-modal.drawer-desk-settings { width: min(94vw, 540px); overflow: hidden; }
.drawer-modal.drawer-exams { width: min(94vw, 680px); }
.drawer-modal.drawer-wide { width: min(94vw, 940px); }
.drawer.open {
  transform: none;
  visibility: visible;
  transition: transform 0.28s cubic-bezier(0.22, 0.8, 0.3, 1), visibility 0s;
}
.drawer-modal.open {
  transform: none;
  opacity: 1;
  visibility: visible;
  transition: transform 0.24s cubic-bezier(0.22, 0.8, 0.3, 1), opacity 0.2s ease, visibility 0s;
}

.drawer-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.95rem 1.2rem 0.82rem;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 { flex: 1; font-size: 1.05rem; font-weight: 800; letter-spacing: -0.01em; }
.drawer-close {
  font: inherit;
  padding: 0;
  margin: 0;
  line-height: 0;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--inset);
  color: var(--ink-soft);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.drawer-close svg {
  display: block;
  flex: none;
}
.drawer-close:hover { background: var(--rose); color: var(--danger); }

.drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem 1.2rem 1.35rem;
  display: grid;
  gap: 0.95rem;
  align-content: start;
}

.icon-toggle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--inset);
  color: var(--ink-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.icon-toggle[aria-pressed="true"] { background: var(--sage); border-color: var(--sage-deep); color: var(--sage-deep); }
.icon-toggle[aria-pressed="true"] .ico-off { display: none; }
.icon-toggle[aria-pressed="false"] .ico-on { display: none; }

/* Ortak Sekme Çubuğu */
.panel-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  padding: 0.25rem;
  border-radius: var(--r-md);
  background: var(--inset);
  border: 1px solid var(--line);
}
.panel-tab {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  border: 0;
  border-radius: var(--r-sm);
  padding: 0.42rem 0.72rem;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: background 0.16s ease, color 0.16s ease;
}
.panel-tab:hover { color: var(--ink); }
.panel-tab.active {
  background: var(--surface-elevated);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.panel-pane { display: grid; gap: 0.82rem; }
.tab-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--accent);
  color: #0b0e14;
  font-size: 0.66rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  display: grid;
  place-items: center;
}

/* ---------- Başarılarım & 5 Kademeli Dinamik Rozet Vitrini ---------- */
.achievements-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 0.65rem;
}
.ach-kpi {
  padding: 0.76rem 0.88rem;
  border-radius: var(--r-md);
  background: var(--inset);
  border: 1px solid var(--line);
  display: grid;
  gap: 0.16rem;
}
.ach-kpi-label { font-size: 0.72rem; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.ach-kpi-value { font-size: 1.12rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }

.ach-section { display: grid; gap: 0.65rem; }
.ach-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.ach-section-head h3 { font-size: 0.95rem; font-weight: 800; }

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 0.72rem;
}
.badge-card {
  position: relative;
  overflow: hidden;
  padding: 0.88rem 0.92rem;
  border-radius: var(--r-lg);
  background: var(--card-tint);
  border: 1px solid var(--line-strong);
  display: grid;
  gap: 0.58rem;
  transition: transform 0.16s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.badge-card:hover { transform: translateY(-2px); }
.badge-top { display: flex; align-items: center; gap: 0.75rem; }
.badge-icon { width: 56px; height: 56px; flex: none; display: grid; place-items: center; }
.badge-icon svg { width: 100%; height: 100%; display: block; }
.badge-info { min-width: 0; display: grid; gap: 0.14rem; }
.badge-title { font-size: 0.94rem; font-weight: 800; color: var(--ink); word-break: break-word; }
.badge-desc { font-size: 0.75rem; color: var(--ink-soft); font-weight: 600; }
.badge-tier-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  margin-top: 0.12rem;
}

.badge-progress-wrap { display: grid; gap: 0.26rem; }
.badge-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.badge-progress-bar {
  height: 7px;
  border-radius: 999px;
  background: var(--inset);
  border: 1px solid var(--line);
  overflow: hidden;
}
.badge-progress-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}

/* 5 Özgün Rozet Kademesi (Bronz/Gümüş/Altın Yok) */
.badge-card.tier-locked { opacity: 0.75; }
.badge-card.tier-locked .badge-tier-pill { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }
.badge-card.tier-locked .badge-progress-bar > span { background: #64748b; }

.badge-card.tier-spark { border-color: rgba(var(--calm-rgb), 0.45); }
.badge-card.tier-spark .badge-tier-pill { background: rgba(var(--calm-rgb), 0.2); color: var(--calm); }
.badge-card.tier-spark .badge-progress-bar > span { background: var(--calm); }

.badge-card.tier-flow { border-color: rgba(var(--accent-rgb), 0.5); box-shadow: 0 4px 18px rgba(var(--accent-rgb), 0.12); }
.badge-card.tier-flow .badge-tier-pill { background: rgba(var(--accent-rgb), 0.22); color: var(--accent); }
.badge-card.tier-flow .badge-progress-bar > span { background: linear-gradient(90deg, var(--calm), var(--accent)); }

.badge-card.tier-resonance { border-color: rgba(var(--accent-rgb), 0.55); box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.14); }
.badge-card.tier-resonance .badge-tier-pill { background: rgba(var(--accent-rgb), 0.22); color: var(--accent); }
.badge-card.tier-resonance .badge-progress-bar > span { background: linear-gradient(90deg, var(--accent), var(--accent)); }

.badge-card.tier-nova { border-color: rgba(var(--brand-rgb), 0.6); box-shadow: 0 6px 24px rgba(var(--brand-rgb), 0.18); }
.badge-card.tier-nova .badge-tier-pill { background: rgba(var(--brand-rgb), 0.22); color: var(--brand); }
.badge-card.tier-nova .badge-progress-bar > span { background: linear-gradient(90deg, var(--accent), var(--brand)); }

.badge-card.tier-quantum {
  border-color: rgba(var(--calm-rgb), 0.72);
  background: linear-gradient(145deg, rgba(var(--calm-rgb), 0.1), rgba(var(--accent-rgb), 0.1) 50%, rgba(var(--accent-rgb), 0.08));
  box-shadow: 0 8px 28px rgba(var(--calm-rgb), 0.2);
}
.badge-card.tier-quantum::after {
  content: "";
  position: absolute;
  inset: -40% -60%;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.08) 50%, transparent 65%);
  animation: quantum-shimmer 4.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes quantum-shimmer {
  0%   { transform: translateX(-60%); }
  60%, 100% { transform: translateX(65%); }
}
.badge-card.tier-quantum .badge-tier-pill {
  background: linear-gradient(90deg, rgba(var(--calm-rgb), 0.28), rgba(var(--accent-rgb), 0.28));
  color: #6ee7b7;
}
.badge-card.tier-quantum .badge-progress-bar > span {
  background: linear-gradient(90deg, var(--calm), var(--accent), var(--accent));
}
:root[data-theme="light"] .badge-card.tier-flow .badge-tier-pill { color: #8a4b0a; }
:root[data-theme="light"] .badge-card.tier-resonance .badge-tier-pill { color: #b45309; }
:root[data-theme="light"] .badge-card.tier-quantum .badge-tier-pill { color: #047857; }

/* ---------- Sınavlar Paneli (Sade, Kompakt, Tek Bakış) ---------- */
.exam-count-pill {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.add-exam-panel {
  border-radius: var(--r-md);
  background: var(--inset);
  border: 1px solid var(--line-strong);
  padding: 0.85rem;
}
.exam-form { display: grid; gap: 0.65rem; }
.exam-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
.exam-form label { display: grid; gap: 0.24rem; font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); }
.exam-form-actions { display: flex; justify-content: flex-end; gap: 0.45rem; }
.owner-field { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0.45rem 0.65rem; margin: 0; }
.owner-field legend { font-size: 0.76rem; font-weight: 700; color: var(--ink-soft); padding: 0 0.28rem; }
.owner-options { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.owner-pill { cursor: pointer; }
.owner-pill input { position: absolute; opacity: 0; pointer-events: none; }
.owner-pill span {
  display: inline-block;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid var(--line-strong);
  background: var(--field);
  color: var(--ink-soft);
}
.owner-pill input:checked + span { background: var(--accent); border-color: var(--accent); color: #0b0e14; }

.exam-groups { display: grid; gap: 0.75rem; }
.exam-group { display: grid; gap: 0.38rem; }
.group-title {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}
.group-title.shared { color: var(--accent-2); }
.group-title.mine { color: var(--accent); }
.exam-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.42rem; }

.exam {
  display: grid;
  gap: 0.28rem;
  padding: 0.56rem 0.76rem;
  border-radius: var(--r-md);
  background: var(--card-tint);
  border: 1px solid var(--line);
  transition: border-color 0.16s ease, background 0.16s ease;
}
.exam.shared { border-left: 3px solid var(--accent-2); }
.exam.is-target {
  border-color: rgba(var(--calm-rgb), 0.55);
  background: rgba(var(--calm-rgb), 0.07);
}
.exam.is-past { opacity: 0.56; }

.exam-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.48rem;
}
.exam-meta-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.36rem;
  flex-wrap: wrap;
}
.exam-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
  word-break: break-word;
}
.type-badge {
  font-size: 0.66rem;
  font-weight: 800;
  padding: 0.12rem 0.46rem;
  border-radius: 999px;
  background: var(--muted-chip);
  color: var(--ink-soft);
}
.type-badge.final { background: var(--lilac); color: var(--ink); }
.exam-owner {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.12rem 0.46rem;
  border-radius: 999px;
  background: var(--muted-chip);
  color: var(--ink-soft);
}
.exam-owner.shared { background: var(--cal-shared-bg); color: var(--cal-shared-ink); }

.exam-meta-right {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  flex: none;
}
.countdown {
  font-size: 0.7rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}
.countdown.tier-ok { background: var(--ok-bg); color: var(--ok-ink); }
.countdown.tier-warn { background: var(--warn-bg); color: var(--warn-ink); }
.countdown.tier-hot { background: var(--hot-bg); color: var(--hot-ink); }
.countdown.tier-done { background: var(--muted-chip); color: var(--ink-soft); }

.exam-target-btn {
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  height: 26px;
  padding: 0 0.52rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--inset);
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.exam-target-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--ink); }
.exam-target-btn.active {
  background: rgba(var(--calm-rgb), 0.22);
  border-color: var(--accent);
  color: var(--accent);
}
.exam-target-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.exam-icon-actions { display: inline-flex; align-items: center; gap: 0.24rem; }
.exam-icon-btn {
  font: inherit;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--inset);
  color: var(--ink-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.exam-icon-btn.exam-edit:hover { color: var(--accent); border-color: var(--accent); }
.exam-icon-btn.exam-del:hover { background: var(--rose); color: var(--danger); border-color: var(--danger); }

.exam-row-sub {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  font-size: 0.74rem;
  color: var(--ink-soft);
}
.exam-date { font-variant-numeric: tabular-nums; white-space: nowrap; }
.exam-studied { font-weight: 700; color: var(--success); font-variant-numeric: tabular-nums; white-space: nowrap; }

.boss-hp-inline {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-width: 155px;
  flex: 1 1 160px;
  max-width: 240px;
}
.boss-hp-bar {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: var(--inset);
  overflow: hidden;
  min-width: 60px;
}
.boss-hp-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--peach-deep), #ef4444);
  transition: width 0.45s ease;
}
.boss-hp-fill.defeated { background: linear-gradient(90deg, var(--calm), var(--calm)); }
.boss-hp-stat {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.boss-hp-stat.defeated { color: var(--success); }

/* Takvim rozetlerindeki mini Boss HP barı */
.boss-hp { margin-top: 0.22rem; display: grid; gap: 0.18rem; }
.boss-hp-head {
  display: flex;
  justify-content: space-between;
  gap: 0.3rem;
  font-size: 0.66rem;
  font-weight: 700;
  opacity: 0.9;
  font-variant-numeric: tabular-nums;
}
.boss-hp-head.defeated { color: var(--success); }

.done-details summary {
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
  padding: 0.25rem 0;
}
.done-details .exam-list { margin-top: 0.4rem; }

/* ---------- Haftalık Takvim Paneli ---------- */
#drawerCalendar .drawer-body { display: flex; flex-direction: column; gap: 0.72rem; }
.cal-bar { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; }
.cal-head { display: flex; align-items: center; gap: 0.5rem; }
.cal-title { font-size: 0.96rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.cal-nav {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: var(--inset); color: var(--ink); font-size: 1.15rem; font-weight: 700; cursor: pointer;
  display: grid; place-items: center;
}
.cal-nav:hover { border-color: var(--accent); color: var(--accent); }
.cal-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 0.9rem; font-size: 0.78rem; color: var(--ink-soft); }
.cal-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.cal-key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.cal-key.shared { background: var(--cal-shared-bg); }
.cal-key.mine { background: var(--cal-mine-bg); }
.cal-jumps { display: inline-flex; gap: 0.6rem; }
.link-btn { font: inherit; font-size: 0.78rem; font-weight: 700; background: transparent; border: 0; color: var(--accent); cursor: pointer; text-decoration: underline; }
.cal-stage { flex: 0 0 auto; position: relative; overflow-x: hidden; overflow-y: visible; width: 100%; transition: height 0.28s ease; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.45rem; }
.week-grid.cal-grid-leave { position: absolute; top: 0; left: 0; right: 0; pointer-events: none; }
.week-grid.slide-exit-left { animation: cal-slide-exit-left 0.28s ease forwards; }
.week-grid.slide-exit-right { animation: cal-slide-exit-right 0.28s ease forwards; }
.week-grid.slide-enter-right { animation: cal-slide-enter-right 0.28s ease forwards; }
.week-grid.slide-enter-left { animation: cal-slide-enter-left 0.28s ease forwards; }
@keyframes cal-slide-exit-left   { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(-35%); } }
@keyframes cal-slide-exit-right  { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(35%); } }
@keyframes cal-slide-enter-right { from { opacity: 0; transform: translateX(35%); } to { opacity: 1; transform: translateX(0); } }
@keyframes cal-slide-enter-left  { from { opacity: 0; transform: translateX(-35%); } to { opacity: 1; transform: translateX(0); } }

.week-cell {
  min-height: 155px;
  padding: 0.5rem;
  border-radius: var(--r-md);
  background: var(--inset);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.week-cell.today { border-color: var(--accent); background: rgba(var(--calm-rgb), 0.08); }
.week-cell-head { padding-bottom: 0.28rem; border-bottom: 1px dashed var(--line); }
.week-wd { display: block; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; color: var(--ink-soft); }
.week-date { font-size: 0.84rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.week-cell.today .week-wd { color: var(--accent); }
.week-badges { display: grid; gap: 0.3rem; }
.week-empty { font-size: 0.72rem; color: var(--ink-soft); opacity: 0.6; }
.cal-badge { display: grid; gap: 0.08rem; padding: 0.34rem 0.45rem; border-radius: 9px; font-size: 0.74rem; font-weight: 700; word-break: break-word; }
.cal-badge-time { font-size: 0.64rem; opacity: 0.86; font-variant-numeric: tabular-nums; }
.cal-badge.shared { background: var(--cal-shared-bg); color: var(--cal-shared-ink); }
.cal-badge.mine { background: var(--cal-mine-bg); color: var(--cal-mine-ink); }
.cal-badge.past { opacity: 0.55; text-decoration: line-through; }

/* ---------- Dürtme Titreşimi & Oda İçi Sohbet + @pomoduck AI ---------- */
body.nudge-shake { animation: nudge-shake 0.5s ease; }
@keyframes nudge-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.drawer-body-chat { display: flex; flex-direction: column; min-height: 0; }
.chat-box { flex: 1 1 auto; display: flex; flex-direction: column; gap: 0.58rem; min-height: 0; }
.chat-list {
  flex: 1 1 auto;
  min-height: 240px;
  max-height: 62dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.65rem;
  border-radius: var(--r-md);
  background: var(--inset);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.52rem;
}
.chat-empty { margin: auto; padding: 0 0.75rem; color: var(--ink-soft); font-size: 0.84rem; text-align: center; line-height: 1.45; }
.chat-msg { display: flex; align-items: flex-end; gap: 0.42rem; }
.chat-msg.me { justify-content: flex-end; }
.chat-msg.them { justify-content: flex-start; }
.chat-avatar { width: 28px; height: 28px; padding: 2px; border-width: 2px; margin-bottom: 2px; }
.chat-bubble {
  max-width: 80%;
  padding: 0.48rem 0.76rem;
  border-radius: var(--r-md);
  display: grid;
  gap: 0.14rem;
  word-break: break-word;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
}
.chat-msg.me .chat-bubble { border-bottom-right-radius: 4px; }
.chat-msg.them .chat-bubble { border-bottom-left-radius: 4px; }
.chat-msg.ai .chat-bubble-ai {
  max-width: 88%;
  background: var(--surface-2);
  border: 1px solid var(--brand-border);
  color: var(--ink);
}
.chat-msg.ai.is-error .chat-bubble-ai {
  background: var(--rose);
  border-color: rgba(251, 113, 133, 0.45);
}
.chat-ai-avatar {
  background: var(--brand-soft);
  border-color: var(--brand-border);
  color: var(--brand);
}
.chat-ai-head {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  flex-wrap: wrap;
}
.chat-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--brand);
}
:root[data-theme="light"] .chat-ai-badge { color: #b45309; }
.chat-ai-replyto {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.chat-name { font-size: 0.7rem; font-weight: 800; }
.chat-text { font-size: 0.87rem; font-weight: 600; line-height: 1.42; white-space: pre-wrap; }
.chat-time { font-size: 0.64rem; justify-self: end; font-variant-numeric: tabular-nums; }
.chat-ai-thinking {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.65rem;
  border-radius: var(--r-sm);
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}
.chat-ai-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.chat-ai-mention-btn {
  font: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  min-height: 28px;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--brand-border);
  background: var(--brand-soft);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease;
}
.chat-ai-mention-btn:hover:not(:disabled) {
  border-color: var(--brand);
  transform: translateY(-1px);
}
.chat-ai-mention-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}
.chat-ai-hint {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 0.45rem; }

/* ---------- Spotify Oynatıcı ---------- */
.sound-pane { display: grid; gap: 0.85rem; }

.spotify-form { display: grid; gap: 0.5rem; }
.spotify-field { display: grid; gap: 0.26rem; font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); }
.spotify-form-row { display: grid; grid-template-columns: 1fr auto; gap: 0.45rem; align-items: center; }
.spotify-save-btn { white-space: nowrap; }
.spotify-player-wrap { display: grid; gap: 0.45rem; padding: 0.65rem; border-radius: var(--r-md); background: var(--inset); border: 1px solid var(--line); }
.spotify-player-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem; }
.spotify-now-title { font-size: 0.84rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.spotify-player-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.spotify-mini-btn { min-height: 28px; padding: 0.22rem 0.62rem; font-size: 0.74rem; }
.spotify-iframe { display: block; width: 100%; border: 0; border-radius: var(--r-sm); background: #121212; }
.spotify-archive { display: grid; gap: 0.5rem; }
.spotify-archive-head { display: flex; justify-content: space-between; font-size: 0.86rem; }
.spotify-list { display: grid; gap: 0.5rem; }
.spotify-empty { padding: 0.95rem; border-radius: var(--r-md); border: 1px dashed var(--line-strong); text-align: center; color: var(--ink-soft); font-size: 0.82rem; display: grid; gap: 0.25rem; }
.spotify-card { padding: 0.6rem 0.72rem; border-radius: var(--r-md); background: var(--card-tint); border: 1px solid var(--line); display: grid; gap: 0.42rem; }
.spotify-card.active { border-color: var(--sage-deep); background: var(--sage); }
.spotify-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.45rem; }
.spotify-card-info { min-width: 0; display: grid; gap: 0.08rem; }
.spotify-card-title { font-size: 0.86rem; font-weight: 700; word-break: break-word; }
.spotify-card-meta { font-size: 0.72rem; color: var(--ink-soft); }
.spotify-type-pill { font-size: 0.64rem; font-weight: 800; text-transform: uppercase; padding: 0.14rem 0.46rem; border-radius: 999px; background: var(--lilac); }
.spotify-card-actions { display: flex; align-items: center; gap: 0.32rem; flex-wrap: wrap; }
.spotify-card-actions .spotify-del-btn { margin-left: auto; color: var(--danger); border-color: transparent; }

/* ---------- İstatistik Modalı ---------- */
.stats-user-pill {
  padding: 0.2rem 0.62rem;
  border-radius: 999px;
  background: var(--inset);
  border: 1px solid var(--line);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.stats-body { gap: 0.9rem; }
.stat-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.68rem; }
.stat-card {
  padding: 0.78rem 0.88rem;
  border-radius: var(--r-md);
  background: var(--card-tint);
  border: 1px solid var(--line);
  display: grid;
  gap: 0.28rem;
  min-width: 0;
  position: relative;
}
.stat-card.is-brand {
  border-color: var(--brand-border);
  background: color-mix(in srgb, var(--brand-soft) 45%, var(--card-tint));
}
.stat-card.is-sage {
  border-color: rgba(var(--calm-rgb), 0.34);
  background: color-mix(in srgb, var(--sage) 42%, var(--card-tint));
}
.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}
.stat-label { font-size: 0.7rem; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.02em; }
.stat-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--inset);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  flex: none;
}
.stat-card.is-brand .stat-icon {
  color: var(--brand);
  border-color: var(--brand-border);
}
.stat-card.is-sage .stat-icon {
  color: var(--sage-deep);
  border-color: rgba(var(--calm-rgb), 0.36);
}
.stat-value {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.stat-sub {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stats-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 0.85rem;
  align-items: stretch;
}
.stats-panel-card {
  padding: 0.92rem 1rem;
  border-radius: var(--r-lg);
  background: var(--card-tint);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.card-head h3 { font-size: 0.95rem; font-weight: 800; }
.stats-meta-chip {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  background: var(--inset);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.chart-wrap { position: relative; min-height: 220px; height: 240px; }
.chart-empty,
.stats-empty-state {
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  gap: 0.4rem;
  padding: 1.4rem 1rem;
  border-radius: var(--r-md);
  border: 1px dashed var(--line-strong);
  color: var(--ink-soft);
}
.stats-empty-state strong { font-size: 0.92rem; color: var(--ink); font-weight: 800; }
.stats-empty-state p { max-width: 38ch; font-size: 0.82rem; line-height: 1.45; }
.report-text { font-size: 0.88rem; line-height: 1.6; }
.stats-report-card .report-text {
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.45;
  margin: 0;
}
.report-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; max-height: 230px; overflow-y: auto; align-content: start; }
.report-item { display: grid; gap: 0.28rem; }
.report-row { display: flex; align-items: center; gap: 0.45rem; font-size: 0.82rem; font-weight: 700; min-width: 0; }
.swatch { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.report-row .grow { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-pct {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--ink-soft);
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: var(--inset);
  font-variant-numeric: tabular-nums;
  flex: none;
}
.report-row .dur { font-size: 0.78rem; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.bar { height: 6px; border-radius: 999px; background: var(--inset); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; }

/* ---------- Süre Ayarları & Merkezi Profilim Modalı ---------- */
.settings-panel { display: grid; gap: 0.85rem; }
.settings-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.settings-group { display: grid; gap: 0.4rem; font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); }
.settings-group input { width: 100%; }
.preset-chips { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.chip {
  font: inherit; font-size: 0.75rem; font-weight: 700; padding: 0.24rem 0.58rem;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--field);
  color: var(--ink-soft); cursor: pointer;
}
.chip.active { background: var(--accent); border-color: var(--accent); color: #0b0e14; }
.settings-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.profile-header-card {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 0.9rem;
  flex-wrap: wrap;
  padding: 0.78rem 1.2rem;
  background: var(--inset);
  border-bottom: 1px solid var(--line);
}
.profile-identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.profile-card-avatar {
  width: 44px;
  height: 44px;
  padding: 2.5px;
}
.profile-identity-text {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
  text-align: left;
}
.profile-card-name {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-username {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-meta-strip {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  flex-wrap: wrap;
}
.streak-badge {
  display: inline-flex; align-items: center; gap: 0.28rem; padding: 0.26rem 0.68rem;
  border-radius: 999px; background: var(--field); border: 1px solid var(--line);
  font-size: 0.75rem; font-weight: 700; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.streak-badge.active { background: var(--butter); border-color: rgba(var(--accent-rgb), 0.4); color: #fde68a; }
:root[data-theme="light"] .streak-badge.active { color: #92400e; }
.status-badge {
  font: inherit; font-size: 0.75rem; font-weight: 700; padding: 0.26rem 0.68rem;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--lilac); color: var(--ink); cursor: pointer;
}

.room-modal-tabs {
  flex: 0 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.profile-tabs {
  flex: 0 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0.78rem 1.2rem 0;
}
.profile-drawer-body {
  padding-top: 0.85rem;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
}
.profile-form-grid > *,
.profile-form-grid input,
.profile-form-grid select,
.profile-form-grid .pm-select-wrap,
.profile-form-grid .password-input-wrap,
.exam-form-grid > *,
.exam-form-grid input,
.exam-form-grid select,
.exam-form-grid .pm-select-wrap,
.settings-row > *,
.settings-row input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.profile-guest-cta {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 1.05rem;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.14), rgba(var(--calm-rgb), 0.08));
  border: 1px solid var(--brand-border);
  text-align: left;
}
.profile-guest-cta-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.profile-guest-cta-body {
  display: grid;
  gap: 0.28rem;
}
.profile-guest-cta-body strong {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--ink);
}
.profile-guest-cta-body p {
  font-size: 0.84rem;
  color: var(--ink-soft);
  line-height: 1.48;
}
.profile-guest-cta-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.settings-section-card {
  display: grid;
  gap: 0.72rem;
  padding: 0.9rem 1rem;
  border-radius: var(--r-lg);
  background: var(--card-tint);
  border: 1px solid var(--line);
}
.settings-card-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--line);
}
.settings-card-title + .setting-row {
  padding-top: 0.2rem;
  border-top: 0;
}
.setting-info {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
  text-align: left;
}
.setting-info strong {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
}
.setting-info span {
  font-size: 0.74rem;
  color: var(--ink-soft);
  line-height: 1.35;
}

.switch-btn {
  position: relative;
  flex: none;
  width: 44px;
  height: 24px;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--inset);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.switch-knob {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink-soft);
  transition: transform 0.18s ease, background 0.18s ease;
}
.switch-btn[aria-checked="true"] {
  background: rgba(var(--calm-rgb), 0.24);
  border-color: var(--sage-deep);
}
.switch-btn[aria-checked="true"] .switch-knob {
  transform: translateX(20px);
  background: var(--sage-deep);
}

.drawer-foot {
  flex: 0 0 auto;
  padding: 0.78rem 1.2rem calc(0.78rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--surface-solid);
}
.logout-btn {
  width: 100%;
  min-height: 40px;
  font-weight: 800;
}

.profile-customizer,
.profile-edit-form { display: grid; gap: 0.72rem; }
.profile-customizer {
  padding: 0.72rem; border-radius: var(--r-md); background: var(--inset); border: 1px solid var(--line);
}
.picker-block { display: grid; gap: 0.36rem; text-align: left; }
.picker-label-row { display: flex; justify-content: space-between; align-items: center; }
.picker-label { font-size: 0.78rem; font-weight: 700; color: var(--ink-soft); }
.color-hex-badge { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.72rem; font-weight: 700; padding: 0.12rem 0.45rem; border-radius: 999px; }
.avatar-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.36rem; }
.avatar-opt {
  font: inherit; display: flex; flex-direction: column; align-items: center; gap: 0.16rem;
  padding: 0.3rem 0.16rem; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--field); color: var(--ink-soft); cursor: pointer; min-width: 0;
}
.avatar-opt svg { width: 32px; height: 32px; display: block; }
.avatar-opt-name { font-size: 0.6rem; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-opt.active {
  border-color: var(--picker-color, var(--accent));
  background: color-mix(in srgb, var(--picker-color, var(--accent)) 18%, var(--card));
  color: var(--ink);
}
.color-picker-row { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.color-palette { display: flex; gap: 0.36rem; flex-wrap: wrap; flex: 1; }
.color-swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; }
.color-swatch.active { transform: scale(1.12); border-color: var(--card); box-shadow: 0 0 0 2px var(--ink); }
.color-custom-wrap {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.16rem 0.4rem 0.16rem 0.5rem;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--field); font-size: 0.72rem; font-weight: 700; color: var(--ink-soft); cursor: pointer;
}
.color-custom-wrap input[type="color"] { width: 22px; height: 20px; min-height: 20px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.bubble-preview { padding: 0.6rem 0.72rem; border-radius: var(--r-md); background: var(--field); border: 1px solid var(--line); }

/* ---------- Toast (Masaüstünde Sağ Üst Boş Alan, Üst Bar/Dock'u Kapatmaz) ---------- */
.toast {
  position: fixed;
  top: 4.35rem;
  right: 1.25rem;
  left: auto;
  transform: none;
  z-index: var(--z-toast);
  max-width: min(92vw, 390px);
  padding: 0.58rem 1rem;
  border-radius: 16px;
  background: var(--surface-elevated);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.83rem;
  text-align: left;
  box-shadow: var(--shadow);
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.toast .pd-icon {
  color: var(--brand);
}
.toast.show { animation: toast-in-desktop 0.22s ease; }
@keyframes toast-in-desktop {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.toast.toast-interactive { pointer-events: auto; display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.48rem 0.62rem 0.48rem 0.95rem; }
.toast-msg { text-align: left; }
.toast-action { font: inherit; font-size: 0.78rem; font-weight: 800; border: 0; border-radius: 999px; padding: 0.3rem 0.72rem; background: var(--brand); color: var(--on-brand); cursor: pointer; }
.toast-close {
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  width: 24px;
  height: 24px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.18);
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Responsive: Kompakt Masaüstü, Çekmeceler & Alt Paneller ---------- */
@media (max-width: 1120px) {
  .nav-btn { padding: 0.32rem 0.52rem; gap: 0.3rem; }
  .nav-label { font-size: 0.74rem; }
}

@media (max-width: 1023px) {
  .drawer,
  .drawer-modal {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 88dvh;
    border-left: 0;
    border-radius: var(--r-xl) var(--r-xl) 0 0 !important;
    transform: translateY(104%);
  }
  .drawer.open,
  .drawer-modal.open {
    transform: none;
  }
  .drawer-backdrop { backdrop-filter: blur(3px); }
}

@media (max-width: 900px) {
  .week-grid { gap: 0.32rem; }
  .week-cell { min-height: 110px; padding: 0.38rem; }
}

@media (max-width: 860px) {
  .week-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; }
  .week-cell { min-height: 92px; padding: 0.45rem 0.55rem; }
}

@media (max-width: 839px) {
  .stats-main-grid { grid-template-columns: 1fr; }
  .chart-wrap { min-height: 195px; height: 215px; }
}

@media (max-width: 720px) {
  .stat-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .profile-form-grid,
  .exam-form-grid,
  .settings-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Responsive: Mobil Panel İçerikleri & Formlar (<= 680px) ---------- */
@media (max-width: 680px) {
  .toast {
    top: 3.75rem;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    text-align: center;
  }
  .toast.show { animation: toast-in-mobile 0.22s ease; }

  .cal-bar { gap: 0.4rem; }
  .cal-title { font-size: 0.86rem; }
  .cal-nav { width: 30px; height: 30px; font-size: 1rem; }
  .cal-legend { font-size: 0.72rem; gap: 0.3rem 0.65rem; }
  .week-grid { grid-template-columns: 1fr; gap: 0.36rem; }
  .week-cell { min-height: auto; padding: 0.46rem 0.6rem; gap: 0.28rem; }
  .week-cell-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; padding-bottom: 0.16rem; border-bottom: 1px dashed var(--line); }
  .week-wd { font-size: 0.68rem; }
  .week-date { font-size: 0.8rem; }
  .exam-form-grid, .settings-row, .seo-cards, .profile-form-grid { grid-template-columns: 1fr; }
  .profile-header-card { padding: 0.68rem 1rem; }
  .profile-tabs { margin: 0.65rem 1rem 0; }
  .profile-tabs .panel-tab { font-size: 0.76rem; padding: 0.42rem 0.35rem; }
  .drawer-head { padding: 0.85rem 1rem 0.72rem; }
  .drawer-body { padding: 0.85rem 1rem calc(1.15rem + env(safe-area-inset-bottom, 0px)); }
  .drawer-foot { padding: 0.72rem 1rem calc(0.72rem + env(safe-area-inset-bottom, 0px)); }
  .stat-cards { gap: 0.45rem; }
  .stat-card { padding: 0.6rem 0.65rem; }
  .stat-value { font-size: 0.96rem; }
  .avatar-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pm-select-wrap.is-pill, .course-pill-select { max-width: 190px; }
  .pm-select-wrap.is-pill .pm-select-trigger { height: 30px; min-height: 30px; padding: 0 0.56rem 0 0.68rem; font-size: 0.74rem; gap: 0.28rem; }
  .pm-select-option { min-height: 38px; padding: 0.48rem 0.65rem; }
  .flow-tab { padding: 0 0.55rem; font-size: 0.72rem; }
  .flow-follow-name { max-width: 78px; }
  .host-lock-note { font-size: 0.72rem; line-height: 1.3; }
  .notice { font-size: 0.75rem; line-height: 1.3; }
  .guest-banner-cta { font-size: 0.7rem; height: 24px; padding: 0 0.5rem; }
  .login-card { padding: 1.35rem 1.2rem; }
}

@keyframes toast-in-mobile {
  from { opacity: 0; transform: translate(-50%, -6px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Oda Lobisi, 7/24 Kütüphane Kartları, Masa Koltukları & Hızlı Tepkiler ---------- */
.drawer-room {
  width: min(560px, 94vw);
}
.room-meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.48rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--inset);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.room-detail-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
}
.room-host-mod-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.55rem 0.68rem;
  border-radius: var(--r-md);
  background: var(--card-tint);
  border: 1px solid var(--line);
}

/* Açık Odalar Lobisi */
.room-lobby-pane {
  display: grid;
  gap: 0.65rem;
}
.room-lobby-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.lobby-rooms-list {
  display: grid;
  gap: 0.55rem;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 0.15rem;
}
.lobby-room-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.72rem 0.85rem;
  border-radius: var(--r-lg);
  background: var(--card-tint);
  border: 1px solid var(--line);
  transition: border-color 0.18s ease, transform 0.15s ease;
}
.lobby-room-card.is-system {
  background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.12), rgba(var(--calm-rgb), 0.08));
  border-color: var(--brand-border);
}
.lobby-room-info {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
  flex: 1;
}
.lobby-room-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.lobby-room-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
}
.lobby-room-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.32rem;
}
.lobby-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.12rem 0.44rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--inset);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.lobby-tag.system {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand-border);
}
.lobby-tag.phase-ready {
  background: rgba(148, 163, 184, 0.12);
  color: var(--ink-soft);
  border-color: var(--line-strong);
}
.lobby-tag.phase-focus {
  background: rgba(var(--calm-rgb), 0.18);
  color: var(--sage-deep);
  border-color: rgba(var(--calm-rgb), 0.36);
}
.lobby-tag.phase-break {
  background: rgba(var(--brand-rgb), 0.18);
  color: var(--brand);
  border-color: var(--brand-border);
}
.lobby-room-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.lobby-occupancy {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ---------- Oda Katılımcı Alanı: Masaüstünde Sol Sütun, Tablet/Mobilde Altta Yatay Şerit ---------- */
.room-desk-strip {
  grid-area: members;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.room-desk-head {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0 0.2rem 0.34rem;
  border-bottom: 1px solid var(--border-subtle);
  flex: 0 0 auto;
}
.room-desk-head-left {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  min-width: 0;
}
.room-desk-head-left .pd-icon {
  color: var(--brand);
}
.room-desk-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-desk-count {
  font-size: 0.68rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 0.08rem 0.44rem;
  border-radius: 999px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  color: var(--ink-soft);
  flex: none;
}
.room-desk-members-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.36rem;
}
.member-chip-card {
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 0.36rem;
  padding: 0.28rem 0.42rem;
  border-radius: 10px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
}
.member-chip-actions {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
}
.member-friend-add-btn {
  flex: none;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}
.member-friend-add-btn:hover:not(:disabled) {
  border-color: var(--brand-border);
  color: var(--brand);
}
:root[data-theme="light"] .member-friend-add-btn:hover:not(:disabled),
:root[data-theme="light"] .member-friend-add-btn.is-incoming {
  color: #b45309;
}
.member-friend-add-btn.is-incoming {
  border-color: var(--brand-border);
  color: var(--brand);
  background: var(--brand-soft);
}
.member-friend-add-btn.is-pending {
  color: var(--calm);
  border-color: rgba(var(--calm-rgb), 0.35);
  background: rgba(var(--calm-rgb), 0.1);
  opacity: 0.85;
  cursor: default;
}
:root[data-theme="light"] .member-friend-add-btn.is-pending {
  color: #047857;
}
.member-chip-card.is-me {
  border-color: var(--brand-border);
}
.member-chip-avatar {
  width: 24px;
  height: 24px;
  padding: 1.5px;
  border-width: 1.5px;
}
.member-chip-main {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 0.06rem;
  overflow: hidden;
}
.member-chip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.28rem;
  min-width: 0;
}
.member-chip-name-wrap {
  display: inline-flex;
  align-items: baseline;
  gap: 0.24rem;
  min-width: 0;
  overflow: hidden;
}
.member-chip-name {
  flex: 0 0 auto;
  max-width: 62%;
  min-width: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-chip-handle {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--ink-soft);
  opacity: 0.82;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-host-crown {
  color: var(--brand);
  flex: none;
  align-self: center;
}
.member-chip-status {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--ink-soft);
  flex: none;
}
.room-desk-strip .member-chip-status > span:not(.member-status-dot) {
  display: none;
}
.member-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
}
.member-chip-status.focus .member-status-dot {
  background: var(--brand);
  box-shadow: 0 0 6px rgba(var(--brand-rgb), 0.7);
}
.member-chip-status.break .member-status-dot {
  background: var(--calm);
  box-shadow: 0 0 6px rgba(var(--calm-rgb), 0.7);
}
.member-chip-status.ready .member-status-dot {
  background: #94a3b8;
}
.member-chip-topic {
  font-size: 0.63rem;
  font-weight: 600;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-chip-flow-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
  min-width: 0;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--brand);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
:root[data-theme="light"] .member-chip-flow-meta {
  color: #b45309;
}
.member-chip-flow-meta.is-follow {
  color: var(--calm);
}
:root[data-theme="light"] .member-chip-flow-meta.is-follow {
  color: #047857;
}
.member-flow-meta-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.member-flow-followers {
  flex: none;
  padding: 0 0.3rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  color: var(--brand);
}
:root[data-theme="light"] .member-flow-followers {
  color: #b45309;
}
.member-chip-actions .member-more-btn {
  width: 24px;
  height: 24px;
  border-radius: 999px;
}
.member-menu-sep {
  height: 1px;
  margin: 0.14rem 0.25rem;
  background: var(--line);
}
.member-more-btn {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.member-more-btn:hover,
.member-more-btn[aria-expanded="true"] {
  background: var(--brand-soft);
  border-color: var(--brand-border);
  color: var(--ink);
}
.member-action-menu {
  position: fixed;
  z-index: 85;
  min-width: 176px;
  padding: 0.35rem;
  border-radius: var(--r-md);
  background: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.18rem;
}
.member-menu-item {
  width: 100%;
  min-height: 34px;
  padding: 0.42rem 0.6rem;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.48rem;
  text-align: left;
  cursor: pointer;
}
.member-menu-item:hover:not(:disabled) {
  background: var(--brand-soft);
}
.member-menu-item:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}
.member-menu-item.danger {
  color: var(--danger);
}
.room-member-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.seat-action-btn {
  padding: 0.22rem 0.5rem;
  font-size: 0.72rem;
  border-radius: var(--r-sm);
}

@media (max-width: 680px) {
  .lobby-room-card {
    flex-direction: column;
    align-items: stretch;
  }
  .lobby-room-right {
    justify-content: space-between;
  }
}

/* ---------- Tehlikeli Bölge (Hesap Silme), Yasal Footer & Modallar ---------- */
.danger-zone-card {
  margin-top: 1.05rem;
  border-radius: var(--r-md);
  border: 1px solid rgba(251, 113, 133, 0.34);
  background: color-mix(in srgb, var(--rose) 35%, var(--inset));
  padding: 0.72rem 0.88rem;
}
.danger-zone-details summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--danger);
}
.danger-zone-details summary::-webkit-details-marker {
  display: none;
}
.danger-zone-details summary::after {
  content: "+";
  font-size: 1rem;
  font-weight: 800;
}
.danger-zone-details[open] summary {
  margin-bottom: 0.52rem;
}
.danger-zone-details[open] summary::after {
  content: "−";
}
.danger-zone-note {
  margin: 0 0 0.68rem;
  font-size: 0.78rem;
  line-height: 1.48;
  color: var(--ink-soft);
}
.danger-zone-form {
  display: grid;
  gap: 0.65rem;
}
.danger-confirm-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  cursor: pointer;
}
.danger-confirm-label input[type="checkbox"] {
  margin-top: 0.14rem;
  width: 16px;
  height: 16px;
  accent-color: var(--danger);
  flex: none;
}
.danger-delete-btn {
  width: 100%;
  min-height: 38px;
  font-weight: 800;
}

.landing-legal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  min-height: 44px;
  padding: 0.72rem 1.2rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.legal-brand-note {
  font-weight: 700;
}
.legal-links,
.profile-legal-links {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.profile-legal-links {
  width: 100%;
  margin-top: 0.52rem;
  font-size: 0.74rem;
  color: var(--ink-soft);
}
.legal-link-btn {
  font: inherit;
  font-size: inherit;
  font-weight: 700;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  padding: 0.14rem 0.2rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}
.legal-link-btn:hover {
  color: var(--brand);
}
.legal-sep {
  opacity: 0.55;
}

.legal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 84;
  background: rgba(5, 8, 13, 0.66);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.legal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}
.legal-modal {
  z-index: 86;
  width: min(94vw, 640px);
}
.legal-content {
  gap: 0.82rem;
}
.legal-updated {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.legal-section {
  display: grid;
  gap: 0.3rem;
  padding: 0.78rem 0.9rem;
  border-radius: var(--r-md);
  background: var(--inset);
  border: 1px solid var(--line);
}
.legal-section h3 {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--ink);
}
.legal-section p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.legal-section code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  padding: 0.06rem 0.32rem;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--ink);
}

/* ---------- KVKK Sıfır CLS Çerez İzni Çubuğu & Tercih Modalı ---------- */
.cookie-banner {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: var(--z-cookie);
  width: min(430px, calc(100vw - 2rem));
  display: grid;
  gap: 0.62rem;
  padding: 0.9rem 1rem;
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
}
.cookie-banner[hidden] {
  display: none !important;
}
body:has(#app:not([hidden])) .cookie-banner {
  bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 0.5rem);
}
.cookie-banner-head h2 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
}
.cookie-banner-text {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.48;
  color: var(--ink-soft);
}
.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
}
.cookie-banner-actions .btn {
  min-height: 36px;
  font-size: 0.76rem;
}
.cookie-cat-card {
  gap: 0.48rem;
}
.cookie-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.cookie-cat-head > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
}
.cookie-locked-badge,
.cookie-opt-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.48rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}
.cookie-locked-badge {
  background: rgba(var(--calm-rgb), 0.16);
  border: 1px solid rgba(var(--calm-rgb), 0.36);
  color: var(--calm);
}
:root[data-theme="light"] .cookie-locked-badge {
  color: #047857;
}
.cookie-opt-badge {
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  color: var(--brand);
}
:root[data-theme="light"] .cookie-opt-badge {
  color: #b45309;
}
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex: none;
  cursor: pointer;
}
.cookie-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.cookie-switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  transition: background-color 0.18s ease, border-color 0.18s ease;
}
.cookie-switch-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 0.18s ease, background-color 0.18s ease;
}
.cookie-switch input:checked + .cookie-switch-slider {
  background: var(--brand);
  border-color: var(--brand);
}
.cookie-switch input:checked + .cookie-switch-slider::after {
  transform: translateX(20px);
  background: #161410;
}
.cookie-switch input:disabled + .cookie-switch-slider {
  opacity: 0.72;
  cursor: default;
}
.cookie-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
  padding-top: 0.2rem;
}

@media (max-width: 680px) {
  .landing-legal-footer {
    justify-content: center;
    text-align: center;
    padding: 0.7rem 0.9rem;
  }
  .cookie-banner {
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    padding: 0.8rem 0.85rem;
  }
  body:has(#app:not([hidden])) .cookie-banner {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 0.35rem);
  }
}

/* ---------- Arkadaşlar & Canlı Aktivite Çekmecesi ---------- */
.drawer-friends {
  width: min(94vw, 540px);
}
.friends-body {
  gap: 0.78rem;
}
.friends-auth-content {
  display: grid;
  gap: 0.72rem;
}
.friend-add-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: center;
}
.friends-form-msg {
  margin: 0 !important;
  text-align: left !important;
  font-size: 0.79rem !important;
}
.friends-tabs {
  grid-template-columns: 1fr 1fr;
}
.friends-tabs .panel-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.tab-count-pill {
  min-width: 20px;
  height: 18px;
  padding: 0 0.38rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  font-size: 0.68rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tab-count-pill[hidden] {
  display: none;
}
.friends-pane {
  display: grid;
  gap: 0.75rem;
}
.friends-pane[hidden] {
  display: none;
}
.friends-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.48rem;
}
.friend-req-section {
  display: grid;
  gap: 0.42rem;
}
.friend-req-heading {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
}
.friend-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.56rem 0.72rem;
  border-radius: var(--r-md);
  background: var(--card-tint);
  border: 1px solid var(--line);
  min-width: 0;
}
.friend-card.is-offline {
  opacity: 0.76;
}
.friend-left {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  min-width: 0;
  flex: 1 1 auto;
}
.friend-avatar-wrap {
  position: relative;
  flex: none;
}
.friend-avatar-wrap .avatar {
  width: 36px;
  height: 36px;
  padding: 2px;
  border-width: 2px;
}
.friend-status-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--card-tint);
  background: #64748b;
}
.friend-status-dot.online,
.friend-status-dot.break {
  background: var(--calm);
  box-shadow: 0 0 6px rgba(var(--calm-rgb), 0.7);
}
.friend-status-dot.focus {
  background: var(--brand);
  box-shadow: 0 0 6px rgba(var(--brand-rgb), 0.75);
}
.friend-status-dot.offline {
  background: #64748b;
}
.friend-info {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 0.1rem;
  text-align: left;
}
.friend-name-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.friend-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.friend-username {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.friend-activity {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.friend-card.is-focus .friend-activity {
  color: var(--brand);
}
:root[data-theme="light"] .friend-card.is-focus .friend-activity {
  color: #b45309;
}
.friend-card.is-break .friend-activity {
  color: var(--sage-deep);
}
.friend-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: none;
}
.friend-action-btn {
  min-height: 30px;
  padding: 0.24rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- Akıllı Süre Kaybı & Akış Geçiş Onay Modalı ---------- */
.timer-switch-backdrop {
  z-index: 90;
}
.timer-switch-modal {
  z-index: 92;
  width: min(92vw, 440px);
}
.timer-switch-body {
  display: grid;
  gap: 0.8rem;
}
.timer-switch-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  justify-self: start;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
:root[data-theme="light"] .timer-switch-badge {
  color: #b45309;
}
.timer-switch-badge[hidden] {
  display: none !important;
}
.timer-switch-desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.52;
  color: var(--ink-soft);
}
.timer-switch-actions {
  display: grid;
  gap: 0.48rem;
}
.timer-switch-btn {
  width: 100%;
  min-height: 40px;
  justify-content: center;
  text-align: center;
  font-weight: 800;
}
.timer-switch-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
@media (max-width: 680px) {
  .timer-switch-modal {
    width: 100% !important;
  }
  .timer-switch-btn {
    min-height: 42px;
  }
}

/* ---------- Nihai Ekran & Responsive Kokpit Mimarisi ---------- */
html,
body,
#app {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.brand,
.presence-wrap,
.header-actions,
.room-desk-strip,
.focus-stage,
.timer-card,
.stage-controls,
.control-tools,
.flow-switcher-wrap,
.primary-nav,
.drawer,
.drawer-modal {
  min-width: 0;
}

.presence-pill,
.nav-label,
.stage-headline,
.follow-sync-label,
.member-chip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Masaüstü & F11 Tam Ekran (>= 1024px) */
@media (min-width: 1024px) {
  .app:not([hidden]) {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
    display: grid;
    --rail-w: clamp(160px, 10.5vw, 196px);
    grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--rail-w);
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    grid-template-areas:
      "brand    stage   right"
      "presence stage   right"
      "members  stage   right"
      "actions  stage   right"
      "dock     dock    dock";
    column-gap: clamp(0.75rem, 1.6vw, 1.5rem);
    row-gap: clamp(0.3rem, 0.7dvh, 0.55rem);
    padding: clamp(0.45rem, 1dvh, 0.75rem) clamp(0.85rem, 2vw, 1.5rem);
  }
  .room-desk-strip:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 0.48rem;
    min-height: 0;
    overflow: hidden;
  }
  .room-desk-head {
    display: flex;
  }
  .room-desk-members-row {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    padding-right: 2px;
  }
  .primary-nav {
    grid-area: dock;
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    justify-self: center;
    align-self: center;
    width: max-content;
    max-width: min(960px, calc(100vw - 2rem));
    margin: 0;
  }
  .dial {
    width: clamp(290px, min(44vw, calc(100dvh - 380px)), 470px);
  }
  body:has(#roomDeskStrip:not([hidden])) .dial {
    width: clamp(280px, min(42vw, calc(100dvh - 425px)), 450px);
  }
  .drawer-modal.legal-modal,
  .drawer-modal.timer-switch-modal {
    left: 50%;
    top: 50%;
    right: auto;
    bottom: auto;
    max-height: min(86dvh, 740px);
    border-radius: var(--r-xl);
    transform: translate(-50%, -48%) scale(0.97);
  }
  .drawer-modal.legal-modal.open,
  .drawer-modal.timer-switch-modal.open {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Kısa Dizüstü Koruması (örn. 1366x768) */
@media (min-width: 1024px) and (max-height: 780px) {
  :root {
    --aura-inner: 7px;
    --aura-outer: 12px;
  }
  .app:not([hidden]) {
    padding: 0.32rem clamp(0.75rem, 1.8vw, 1.35rem);
    row-gap: 0.22rem;
  }
  .timer-card {
    gap: 0.2rem;
    padding: 0.06rem 0.5rem;
  }
  .stage-meta {
    min-height: 38px;
    gap: 0.14rem;
    padding: 0;
  }
  .flow-switcher {
    height: 28px;
  }
  .flow-tab {
    height: 22px;
  }
  .dial-wrap {
    padding: calc(var(--aura-outer) + 2px) calc(var(--aura-outer) + 10px);
  }
  .dial {
    width: clamp(260px, min(40vw, calc(100dvh - 385px)), 380px);
  }
  body:has(#roomDeskStrip:not([hidden])) .dial {
    width: clamp(248px, min(38vw, calc(100dvh - 420px)), 348px);
  }
  .stage-controls {
    gap: 0.24rem;
  }
  .btn-big {
    min-height: 40px;
    padding: 0.48rem 1.35rem;
  }
}

@media (min-width: 1024px) and (max-height: 660px) {
  :root {
    --aura-inner: 6px;
    --aura-outer: 10px;
  }
  .stage-meta {
    min-height: 32px;
  }
  .dial {
    width: clamp(200px, min(42vw, calc(100dvh - 360px)), 280px);
  }
  body:has(#roomDeskStrip:not([hidden])) .dial {
    width: clamp(190px, min(38vw, calc(100dvh - 385px)), 260px);
  }
  .timer-actions .btn {
    min-height: 38px;
  }
}

/* Tablet (681px - 1023px, örn. 768x1024) */
@media (min-width: 681px) and (max-width: 1023px) {
  .app:not([hidden]) {
    padding: 0.45rem 0.9rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
    gap: 0.32rem;
    --rail-w: 138px;
  }
  .room-desk-strip {
    width: 100%;
    max-height: 54px;
    padding: 0.14rem 0 0.22rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .room-desk-members-row {
    flex-direction: row;
    align-items: center;
    width: max-content;
    gap: 0.4rem;
  }
  .member-chip-card {
    width: auto;
    min-width: 156px;
    max-width: 220px;
    height: auto;
    min-height: 46px;
    padding: 0.22rem 0.48rem;
    scroll-snap-align: start;
  }
  .dial {
    width: clamp(300px, min(58vw, calc(100dvh - 410px)), 440px);
  }
  body:has(#roomDeskStrip:not([hidden])) .dial {
    width: clamp(280px, min(54vw, calc(100dvh - 473px)), 400px);
  }
  .primary-nav {
    justify-self: center;
    align-self: center;
    width: max-content;
    max-width: calc(100vw - 1.5rem);
    border-radius: 999px;
    padding: 0.28rem 0.4rem;
    justify-content: flex-start;
  }
  .nav-btn {
    padding: 0.34rem 0.56rem;
  }
  .nav-label {
    font-size: 0.72rem;
  }
}

/* Mobil (<= 680px, örn. 360x740 ve 390x844) */
@media (max-width: 680px) {
  :root {
    --aura-inner: 6px;
    --aura-outer: 11px;
  }
  .app:not([hidden]) {
    padding: 0.32rem 0.6rem calc(0.32rem + env(safe-area-inset-bottom, 0px));
    gap: 0.22rem;
    --rail-w: 116px;
  }
  .presence-pill {
    height: 32px;
    padding: 0 0.55rem;
    font-size: 0.72rem;
    max-width: 44vw;
  }
  .room-avatar-stack,
  .me-name {
    display: none;
  }
  .icon-pill {
    height: 34px;
    padding: 0 0.5rem;
  }
  .me-profile-btn {
    height: 34px;
    padding: 2px 5px 2px 2px;
    gap: 0.25rem;
  }
  .me-profile-btn .avatar {
    width: 28px;
    height: 28px;
  }
  .room-desk-strip {
    width: 100%;
    padding: 0.12rem 0 0.24rem;
    max-height: 54px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .room-desk-members-row {
    flex-direction: row;
    align-items: center;
    width: max-content;
    gap: 0.4rem;
  }
  .member-chip-card {
    width: auto;
    min-width: 152px;
    max-width: 204px;
    height: auto;
    min-height: 46px;
    padding: 0.2rem 0.44rem;
    scroll-snap-align: start;
  }
  .focus-stage {
    padding: 0;
    overflow: hidden;
  }
  .timer-card {
    gap: 0.2rem;
    padding: 0.06rem 0.15rem;
  }
  .timer-card:has(#flowSwitcherWrap:not([hidden])) {
    gap: 0.14rem;
  }
  .stage-meta {
    min-height: 38px;
    gap: 0.14rem;
    padding: 0;
  }
  .stage-headline {
    font-size: 0.78rem;
    line-height: 1.25;
  }
  .dial-wrap {
    padding: calc(var(--aura-outer) + 3px) calc(var(--aura-outer) + 8px);
  }
  .timer-card:has(#flowSwitcherWrap:not([hidden])) .dial-wrap {
    padding: var(--aura-outer) calc(var(--aura-outer) + 6px);
  }
  .dial {
    width: clamp(238px, min(74vw, calc(100dvh - 345px)), 316px);
  }
  body:has(#roomDeskStrip:not([hidden])) .dial {
    width: clamp(224px, min(70vw, calc(100dvh - 425px)), 296px);
  }
  .stage-controls {
    gap: 0.22rem;
  }
  .timer-actions .btn {
    min-height: 44px;
  }
  body:has(#roomDeskStrip:not([hidden])) .timer-actions .btn {
    min-height: 40px;
    padding: 0.4rem 1.1rem;
    font-size: 0.88rem;
  }
  .primary-nav {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-top: 1px solid var(--line-strong);
    background: var(--surface-solid);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.24);
    padding: 0.24rem 0.35rem calc(0.24rem + env(safe-area-inset-bottom, 0px));
    justify-content: flex-start;
    gap: 0.16rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
  }
  .nav-btn {
    flex: 0 0 64px;
    min-width: 64px;
    min-height: 46px;
    flex-direction: column;
    gap: 0.14rem;
    padding: 0.22rem 0.12rem;
    border-radius: 12px;
  }
  .nav-label {
    font-size: 0.6rem;
    letter-spacing: -0.015em;
  }
  .dock-badge {
    top: 2px;
    right: calc(50% - 17px);
    min-width: 15px;
    height: 15px;
    font-size: 0.56rem;
  }
  .dock-badge.dock-badge-dot {
    top: 5px;
    right: calc(50% - 14px);
  }
  .dock-status-dot {
    top: 6px;
    right: calc(50% - 15px);
  }
}

@media (max-width: 680px) and (max-height: 670px) {
  .dial {
    width: clamp(192px, min(60vw, calc(100dvh - 340px)), 244px);
  }
  body:has(#roomDeskStrip:not([hidden])) .dial {
    width: clamp(176px, min(56vw, calc(100dvh - 400px)), 224px);
  }
}

/* Yatay & Alçak Ekran (telefon / küçük tablet landscape, örn. 844x390) — taşma ve kırpılmayı önler */
@media (orientation: landscape) and (max-width: 1023px) and (max-height: 560px) {
  :root {
    --aura-inner: 5px;
    --aura-outer: 8px;
  }
  .app:not([hidden]) {
    padding: 0.24rem 0.6rem calc(0.26rem + env(safe-area-inset-bottom, 0px));
    gap: 0.16rem;
    --rail-w: 112px;
  }
  .room-desk-strip {
    max-height: 44px;
    padding: 0.06rem 0 0.1rem;
  }
  .member-chip-card {
    min-height: 36px;
    padding: 0.12rem 0.4rem;
  }
  .stage-meta {
    min-height: 26px;
    gap: 0.08rem;
    padding: 0;
  }
  .phase-pill,
  .cycle-pill {
    font-size: 0.66rem;
  }
  .stage-headline {
    font-size: 0.74rem;
    line-height: 1.15;
  }
  .flow-switcher {
    height: 26px;
  }
  .flow-tab {
    height: 20px;
    font-size: 0.66rem;
  }
  .flow-swipe-dots {
    display: none;
  }
  .dial-wrap {
    padding: calc(var(--aura-outer) + 2px) calc(var(--aura-outer) + 6px);
  }
  .dial {
    width: clamp(132px, min(30vw, calc(100dvh - 200px)), 240px);
  }
  body:has(#roomDeskStrip:not([hidden])) .dial {
    width: clamp(124px, min(26vw, calc(100dvh - 250px)), 220px);
  }
  .stage-controls {
    gap: 0.16rem;
  }
  .timer-actions .btn {
    min-height: 34px;
    padding: 0.3rem 0.9rem;
    font-size: 0.82rem;
  }
  .nav-btn {
    min-height: 40px;
    padding: 0.2rem 0.5rem;
  }
}
