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

: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-bg: 0;
  --z-stage: 10;
  --z-chrome: 30;
  --z-popover: 35;
  --z-backdrop: 50;
  --z-drawer: 60;
  --z-modal: 70;
  --z-toast: 90;
}

:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0e14;
  --bg-glow-1: rgba(56, 189, 248, 0.12);
  --bg-glow-2: rgba(167, 139, 250, 0.12);
  --surface: rgba(19, 24, 34, 0.78);
  --surface-solid: #131822;
  --surface-elevated: rgba(27, 34, 48, 0.94);
  --card: #131822;
  --card-tint: #19202e;
  --inset: rgba(11, 14, 20, 0.68);
  --field: #0f141d;
  --field-disabled: #171d28;
  --ink: #f1f5f9;
  --ink-soft: #94a3b8;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.24);
  --scroll-thumb: rgba(148, 163, 184, 0.26);

  --accent: #38BDF8;
  --accent-2: #A78BFA;
  --accent-3: #34D399;

  --peach: rgba(240, 162, 131, 0.22);
  --peach-deep: #f0a283;
  --butter: rgba(251, 191, 36, 0.2);
  --butter-deep: #FBBF24;
  --sage: rgba(52, 211, 153, 0.2);
  --sage-deep: #34D399;
  --lilac: rgba(167, 139, 250, 0.2);
  --rose: rgba(251, 113, 133, 0.22);
  --muted-chip: rgba(148, 163, 184, 0.14);

  /* Geri sayım rozetleri */
  --ok-bg: rgba(52, 211, 153, 0.2);    --ok-ink: #6ee7b7;
  --warn-bg: rgba(251, 191, 36, 0.22); --warn-ink: #fde68a;
  --hot-bg: rgba(251, 113, 133, 0.24); --hot-ink: #fecdd3;
  --hot-glow: 251, 113, 133;

  --tint-focus: rgba(56, 189, 248, 0.11);
  --tint-break: rgba(52, 211, 153, 0.12);

  --online: #34D399;

  --cal-shared-bg: rgba(167, 139, 250, 0.26); --cal-shared-ink: #ede9fe;
  --cal-mine-bg: rgba(56, 189, 248, 0.24);    --cal-mine-ink: #e0f2fe;

  --on-accent: #0b0e14;
  --danger: #fb7185;
  --success: #34D399;

  --shadow: 0 12px 36px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.28);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f4ef;
  --bg-glow-1: rgba(56, 189, 248, 0.16);
  --bg-glow-2: rgba(167, 139, 250, 0.16);
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --surface-elevated: rgba(255, 255, 255, 0.97);
  --card: #ffffff;
  --card-tint: #f8f7f4;
  --inset: #f0eee8;
  --field: #ffffff;
  --field-disabled: #eae7e0;
  --ink: #1e293b;
  --ink-soft: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --line-strong: rgba(15, 23, 42, 0.18);
  --scroll-thumb: rgba(100, 116, 139, 0.28);

  --peach: #f7d6c4;
  --peach-deep: #ea8c66;
  --butter: #fef0c7;
  --butter-deep: #d97706;
  --sage: #d1fae5;
  --sage-deep: #10b981;
  --lilac: #ede9fe;
  --rose: #ffe4e6;
  --muted-chip: #e2e8f0;

  --ok-bg: #dcfce7;   --ok-ink: #166534;
  --warn-bg: #fef3c7; --warn-ink: #92400e;
  --hot-bg: #fee2e2;  --hot-ink: #991b1b;
  --hot-glow: 239, 68, 68;

  --tint-focus: rgba(56, 189, 248, 0.14);
  --tint-break: rgba(52, 211, 153, 0.16);

  --online: #10b981;

  --cal-shared-bg: #ddd6fe; --cal-shared-ink: #4c1d95;
  --cal-mine-bg: #bae6fd;   --cal-mine-ink: #075985;

  --on-accent: #ffffff;
  --danger: #e11d48;
  --success: #059669;

  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 4px 14px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: 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::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;
}

/* İnce koyu/açık kaydırma çubuğu */
.drawer-body,
.chat-list,
.login {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}
.drawer-body::-webkit-scrollbar,
.chat-list::-webkit-scrollbar,
.login::-webkit-scrollbar { width: 6px; height: 6px; }
.drawer-body::-webkit-scrollbar-track,
.chat-list::-webkit-scrollbar-track,
.login::-webkit-scrollbar-track { background: transparent; }
.drawer-body::-webkit-scrollbar-thumb,
.chat-list::-webkit-scrollbar-thumb,
.login::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 999px;
}

/* ---------- Form Elemanları & Genel Butonlar ---------- */
input, select {
  font: inherit;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  min-height: 36px;
  padding: 0.45rem 0.72rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
input:focus, select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}
input:disabled, select: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(--accent);
  outline-offset: 2px;
}
.btn:disabled { opacity: 0.48; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #0b0e14;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.28);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 10px 26px rgba(56, 189, 248, 0.38);
}
.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(52, 211, 153, 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, #FBBF24 0%, #F59E0B 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ı ---------- */
.login {
  height: 100dvh;
  max-height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}
.login-card {
  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%;
}
.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
  margin-bottom: 1.25rem;
}
.login-card h1 { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; }
.login-card p { color: var(--ink-soft); font-size: 0.88rem; }
.profiles { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.profile-btn {
  font: inherit;
  cursor: pointer;
  border-radius: var(--r-lg);
  padding: 0.9rem 1.05rem;
  min-width: 118px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.96rem;
  background: var(--surface-elevated);
  border: 1px solid color-mix(in srgb, var(--user-color, var(--line-strong)) 55%, var(--line));
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.profile-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); border-color: var(--user-color, var(--accent)); }
.profile-btn.selected { box-shadow: 0 0 0 3px color-mix(in srgb, var(--user-color, var(--accent)) 45%, transparent); }

.login-auth-form,
.create-profile-form,
.password-form {
  display: grid;
  gap: 0.65rem;
  text-align: left;
}
.login-auth-form {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line-strong);
}
.login-target { font-size: 0.92rem; color: var(--ink-soft); text-align: center; }
.login-target strong { color: var(--ink); }
.login-auth-actions { display: grid; grid-template-columns: 1fr auto; gap: 0.55rem; }
.create-profile {
  margin-top: 1.1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--line-strong);
}
.create-profile summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink-soft);
  list-style: none;
  padding: 0.25rem 0;
}
.create-profile summary::-webkit-details-marker { display: none; }
.create-profile summary:hover,
.create-profile[open] summary { color: var(--ink); }
.create-profile-form { margin-top: 0.75rem; }
.password-form label { display: grid; gap: 0.28rem; font-size: 0.84rem; font-weight: 600; color: var(--ink-soft); }
.login-msg {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--danger);
  text-align: center;
}
.login-msg.success { color: var(--success); }

/* ---------- 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 (Katı 100dvh Zero-Scroll) ---------- */
.app:not([hidden]) {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(0.45rem, 1.2dvh, 0.85rem) clamp(0.75rem, 2.4vw, 1.8rem) calc(clamp(0.45rem, 1.2dvh, 0.85rem) + env(safe-area-inset-bottom, 0px));
  gap: clamp(0.2rem, 0.7dvh, 0.5rem);
  max-width: 1400px;
  margin: 0 auto;
}

/* ---------- İnce & Ferah Üst Bar (Tek Satır) ---------- */
.topbar {
  position: relative;
  z-index: var(--z-chrome);
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.brand-logo-svg { flex: none; }
.brand-title {
  font-size: clamp(0.92rem, 1.8vw, 1.05rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Orta Üst: Küçük Yuvarlak Hayvan Avatarları + Durum Noktası */
.presence-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}
.presence {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.presence-item { position: relative; }
.presence-chip {
  font: inherit;
  position: relative;
  display: grid;
  place-items: center;
  padding: 2px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 0.16s ease;
}
.presence-chip:hover,
.presence-item.open .presence-chip { transform: scale(1.08); }
.presence-avatar {
  width: 32px;
  height: 32px;
  padding: 2px;
  border-width: 2px;
  opacity: 0.62;
  transition: opacity 0.25s ease, transform 0.2s ease;
}
.presence-chip.online .presence-avatar { opacity: 1; }
.presence-dot {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #64748b;
  border: 2px solid var(--bg);
  transition: background 0.25s ease;
}
.presence-chip.online .presence-dot {
  background: var(--online);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.7);
}
.presence-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-popover);
  min-width: 176px;
  padding: 0.55rem 0.72rem;
  border-radius: var(--r-md);
  background: var(--surface-elevated);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.18rem;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.presence-item:hover .presence-popover,
.presence-item:focus-within .presence-popover,
.presence-item.open .presence-popover {
  opacity: 1;
  pointer-events: auto;
}
.presence-pop-name { font-size: 0.82rem; font-weight: 800; color: var(--ink); }
.presence-pop-status { font-size: 0.74rem; font-weight: 600; color: var(--ink-soft); }
.presence-pop-course { font-size: 0.72rem; font-weight: 700; color: var(--accent); }

/* Sağ Üst: Profil Kapsülü + PiP */
.header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}
.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;
}

/* ---------- Merkez Sahne (Aura Halkaları Kesilmeden Geniş Nefes Alanı) ---------- */
.focus-stage {
  position: relative;
  z-index: var(--z-stage);
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: visible;
}
.timer-card {
  width: min(100%, 580px);
  max-height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.28rem, 0.9dvh, 0.65rem);
  padding: clamp(0.2rem, 0.6dvh, 0.55rem) clamp(0.5rem, 1.8vw, 1.1rem);
  text-align: center;
}

.stage-meta {
  display: grid;
  justify-items: center;
  gap: clamp(0.2rem, 0.6dvh, 0.4rem);
  max-width: 100%;
}
.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(--accent); }
body[data-phase="focus"] .phase-pill { border-color: rgba(56, 189, 248, 0.4); }
body[data-phase="focus"] .phase-dot { background: #38BDF8; animation: blink 1.6s ease-in-out infinite; }
body[data-phase="break"] .phase-pill { border-color: rgba(52, 211, 153, 0.45); }
body[data-phase="break"] .phase-dot { background: #34D399; animation: blink 2.2s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.cycle-pill {
  font-size: 0.76rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 0.26rem 0.7rem;
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.14);
  border: 1px solid rgba(167, 139, 250, 0.28);
  color: var(--ink);
}
.cycle-pill.long-break {
  background: rgba(52, 211, 153, 0.18);
  border-color: rgba(52, 211, 153, 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: #FBBF24 !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); }

.active-courses { max-width: 100%; }
.active-courses-list {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  flex-wrap: wrap;
  justify-content: center;
}
.active-course-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.14rem 0.55rem 0.14rem 0.2rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--chip-color, var(--line-strong)) 60%, var(--line));
  font-size: 0.76rem;
  font-weight: 700;
}
.active-course-avatar { width: 20px; height: 20px; padding: 1.5px; border-width: 1.5px; }

.peer-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.2rem 0.72rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.peer-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-soft); opacity: 0.5; flex: none; }
.peer-dot.focus { background: #38BDF8; opacity: 1; animation: blink 1.6s ease-in-out infinite; }
.peer-dot.break { background: #34D399; opacity: 1; animation: blink 2.2s ease-in-out infinite; }
.peer-dot.ready { background: var(--online); opacity: 1; }

/* ---------- Dairesel Sayaç & Hayalet Aura & Hidrasyon Dalgası ---------- */
.dial-wrap {
  display: grid;
  place-items: center;
  padding:
    calc(var(--aura-outer) + clamp(24px, 3.2dvh, 36px))
    calc(var(--aura-outer) + clamp(24px, 3vw, 36px));
}
.dial {
  position: relative;
  width: clamp(160px, min(50vw, calc(100dvh - 485px)), 264px);
  aspect-ratio: 1;
  flex: none;
}
.dial svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.dial-track {
  fill: none;
  stroke: var(--line);
  stroke-width: 11;
}
.dial-progress {
  fill: none;
  stroke: url(#dialGradFocus);
  stroke-width: 11;
  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: #34D399; }
.dial-progress.overdrive { stroke: #FBBF24; }

.timer-card.finished .dial svg {
  animation: dial-finished 1.2s ease-out;
}
@keyframes dial-finished {
  0%   { filter: drop-shadow(0 0 0 rgba(52, 211, 153, 0)); transform: rotate(-90deg) scale(1); }
  40%  { filter: drop-shadow(0 0 22px rgba(52, 211, 153, 0.72)); transform: rotate(-90deg) scale(1.03); }
  100% { filter: drop-shadow(0 0 0 rgba(52, 211, 153, 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, #38BDF8) 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: #38BDF8; }
.aura-yaren { inset: calc(var(--aura-outer) * -1); --aura-color: #A78BFA; }
.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, #38BDF8) 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: #F59E0B !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(245, 158, 11, 0.32); }
  40%      { opacity: 0.75; transform: scale(1.015); box-shadow: 0 0 22px 4px rgba(245, 158, 11, 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 #38BDF8;
}
.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: #38BDF8;
    box-shadow: 0 0 28px 8px rgba(56, 189, 248, 0.5), inset 0 0 22px rgba(45, 212, 191, 0.4);
  }
  55% {
    opacity: 0.68;
    transform: scale(1.16);
    border-color: #2DD4BF;
    box-shadow: 0 0 42px 14px rgba(45, 212, 191, 0.32);
  }
  100% {
    opacity: 0;
    transform: scale(1.3);
    border-color: #2DD4BF;
    box-shadow: 0 0 0 0 transparent;
  }
}

.dial-inner {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.14rem;
  padding: 0 12%;
}
.time {
  font-size: clamp(2.15rem, min(10vw, 6.8dvh), 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.02;
}
.time.overdrive-time {
  color: #FBBF24;
  text-shadow: 0 0 24px rgba(251, 191, 36, 0.35);
}
.time-sub {
  color: var(--ink-soft);
  font-size: clamp(0.7rem, 1.3dvh, 0.82rem);
  font-weight: 600;
  cursor: pointer;
}

/* ---------- Tek Grup Ana Kontroller ---------- */
.stage-controls {
  display: grid;
  justify-items: center;
  gap: clamp(0.35rem, 0.95dvh, 0.58rem);
  width: 100%;
}
.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 0.78rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  max-width: min(250px, 62vw);
  height: 32px;
  min-height: 32px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.tool-pill,
.overdrive-toggle {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 0.3rem 0.75rem;
  min-height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.tool-pill:hover,
.overdrive-toggle:hover { color: var(--ink); border-color: var(--accent); }
.overdrive-toggle.active {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.65);
  color: #FBBF24;
}
:root[data-theme="light"] .overdrive-toggle.active { 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(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.btn-hydrate {
  background: rgba(56, 189, 248, 0.22);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.48);
  min-height: 28px;
  padding: 0.24rem 0.72rem;
  font-size: 0.78rem;
}
:root[data-theme="light"] .btn-hydrate { background: #e0f2fe; color: #0369a1; border-color: #38BDF8; }
.btn-hydrate.done {
  background: rgba(52, 211, 153, 0.24);
  border-color: #34D399;
  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);
}
.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);
}

/* ---------- Cam Efektli Yüzen Dock (7 Eşit Araç) ---------- */
.floating-dock {
  position: relative;
  z-index: var(--z-chrome);
  flex: 0 0 auto;
  align-self: center;
  display: grid;
  grid-template-columns: repeat(7, auto);
  gap: 0.3rem;
  padding: 0.36rem 0.46rem;
  border-radius: 22px;
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  max-width: 100%;
}
.dock-btn {
  position: relative;
  font: inherit;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 0.4rem 0.68rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  cursor: pointer;
  min-width: 74px;
  transition: transform 0.15s ease, color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.dock-btn:hover {
  color: var(--ink);
  background: rgba(148, 163, 184, 0.1);
  transform: translateY(-2px);
}
.dock-btn.active {
  color: var(--ink);
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.42);
}
.dock-btn.playing { color: var(--sage-deep); }
.dock-label {
  font-size: 0.67rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.dock-badge {
  position: absolute;
  top: 2px;
  right: 5px;
  min-width: 17px;
  height: 17px;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--accent);
  color: #0b0e14;
  font-size: 0.64rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  display: grid;
  place-items: center;
}
.dock-badge.dock-badge-dot {
  background: var(--danger);
  color: #fff;
}
.dock-status-dot {
  position: absolute;
  top: 7px;
  right: 11px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
  pointer-events: none;
}
.dock-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: 50%;
  top: 50%;
  bottom: auto;
  z-index: var(--z-modal);
  width: min(94vw, 680px);
  max-height: min(88dvh, 760px);
  border-radius: var(--r-xl);
  border: 1px solid var(--line-strong);
  transform: translate(-50%, -46%) scale(0.96);
  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-modal.drawer-sm { width: min(92vw, 430px); }
.drawer-modal.drawer-profile { width: min(94vw, 490px); }
.drawer-modal.drawer-exams { width: min(94vw, 660px); }
.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: translate(-50%, -50%) scale(1);
  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 {
  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;
  font-size: 1.4rem;
  line-height: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--inset);
  color: var(--ink-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.drawer-close:hover { background: var(--rose); color: var(--danger); }

.drawer-body {
  flex: 1 1 auto;
  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 (Tahta & AI ve Ses & Spotify) */
.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(56, 189, 248, 0.45); }
.badge-card.tier-spark .badge-tier-pill { background: rgba(56, 189, 248, 0.2); color: #38BDF8; }
.badge-card.tier-spark .badge-progress-bar > span { background: #38BDF8; }

.badge-card.tier-flow { border-color: rgba(167, 139, 250, 0.5); box-shadow: 0 4px 18px rgba(167, 139, 250, 0.12); }
.badge-card.tier-flow .badge-tier-pill { background: rgba(167, 139, 250, 0.22); color: #c4b5fd; }
.badge-card.tier-flow .badge-progress-bar > span { background: linear-gradient(90deg, #38BDF8, #A78BFA); }

.badge-card.tier-resonance { border-color: rgba(251, 191, 36, 0.55); box-shadow: 0 4px 20px rgba(251, 191, 36, 0.14); }
.badge-card.tier-resonance .badge-tier-pill { background: rgba(251, 191, 36, 0.22); color: #FBBF24; }
.badge-card.tier-resonance .badge-progress-bar > span { background: linear-gradient(90deg, #A78BFA, #FBBF24); }

.badge-card.tier-nova { border-color: rgba(251, 113, 133, 0.6); box-shadow: 0 6px 24px rgba(251, 113, 133, 0.18); }
.badge-card.tier-nova .badge-tier-pill { background: rgba(251, 113, 133, 0.22); color: #FB7185; }
.badge-card.tier-nova .badge-progress-bar > span { background: linear-gradient(90deg, #FBBF24, #FB7185); }

.badge-card.tier-quantum {
  border-color: rgba(52, 211, 153, 0.72);
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.1), rgba(167, 139, 250, 0.1) 50%, rgba(251, 191, 36, 0.08));
  box-shadow: 0 8px 28px rgba(52, 211, 153, 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(52, 211, 153, 0.28), rgba(167, 139, 250, 0.28));
  color: #6ee7b7;
}
.badge-card.tier-quantum .badge-progress-bar > span {
  background: linear-gradient(90deg, #34D399, #A78BFA, #FBBF24);
}
:root[data-theme="light"] .badge-card.tier-flow .badge-tier-pill { color: #6d28d9; }
: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(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 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(56, 189, 248, 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, #34D399, #10b981); }
.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 ---------- */
.cal-bar { 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 { position: relative; overflow: hidden; 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(56, 189, 248, 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; }

/* Ortak Hedefler (To-Do — Tahta & AI içinde 2. sekme) */
.todo-box { display: grid; gap: 0.65rem; }
.todo-head { display: flex; justify-content: space-between; align-items: center; }
.todo-form { display: grid; grid-template-columns: 1fr auto; gap: 0.45rem; }
.todo-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.todo-item {
  display: flex; align-items: center; gap: 0.55rem; padding: 0.5rem 0.72rem;
  border-radius: var(--r-sm); background: var(--card-tint); border: 1px solid var(--line);
}
.todo-item.done { opacity: 0.62; }
.todo-check {
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--accent);
  background: var(--field); color: #0b0e14; font-weight: 800; font-size: 0.76rem;
  display: grid; place-items: center; cursor: pointer; flex: none; padding: 0;
}
.todo-item.done .todo-check { background: var(--sage-deep); border-color: var(--sage-deep); }
.todo-text { flex: 1; font-size: 0.86rem; font-weight: 600; word-break: break-word; }
.todo-item.done .todo-text { text-decoration: line-through; color: var(--ink-soft); }
.todo-by { font-size: 0.68rem; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 999px; background: var(--lilac); }
.todo-del { border: 0; background: transparent; color: var(--ink-soft); font-size: 1rem; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; }
.todo-del:hover { background: var(--rose); color: var(--danger); }
.todo-empty { color: var(--ink-soft); font-size: 0.84rem; text-align: center; padding: 0.5rem 0; }

/* ---------- 🎨 Tahta & AI ---------- */
.btn-nudge { background: var(--butter); color: #fde68a; border-color: rgba(251, 191, 36, 0.4); }
:root[data-theme="light"] .btn-nudge { color: #78350f; }
.board-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.color-swatches { display: flex; gap: 0.35rem; align-items: center; }
.color-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--sw); cursor: pointer; padding: 0; }
.color-dot.active { transform: scale(1.15); border-color: var(--ink); }
.board-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.btn-ai-hint { background: var(--lilac); border-color: rgba(167, 139, 250, 0.4); }
.ai-hint-box {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem;
  padding: 0.65rem 0.8rem; border-radius: var(--r-md); background: var(--lilac); border: 1px solid rgba(167, 139, 250, 0.35);
  font-size: 0.84rem; font-weight: 600;
}
.ai-hint-close { border: 0; background: transparent; color: var(--ink); font-size: 1.1rem; cursor: pointer; }
.canvas-wrap { width: 100%; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line-strong); background: #ffffff; }
#drawCanvas { display: block; width: 100%; height: auto; touch-action: none; }

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); }
}

/* ---------- 💬 Canlı Sohbet ---------- */
.drawer-body-chat { display: flex; flex-direction: column; min-height: 0; }
.chat-box { flex: 1 1 auto; display: flex; flex-direction: column; gap: 0.6rem; min-height: 0; }
.chat-list {
  flex: 1 1 auto;
  min-height: 260px;
  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.48rem;
}
.chat-empty { margin: auto; color: var(--ink-soft); font-size: 0.85rem; text-align: center; }
.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: 26px; height: 26px; padding: 2px; border-width: 2px; margin-bottom: 2px; }
.chat-bubble {
  max-width: 78%;
  padding: 0.46rem 0.74rem;
  border-radius: var(--r-md);
  display: grid;
  gap: 0.1rem;
  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 { background: var(--lilac); color: var(--ink); }
.chat-name { font-size: 0.7rem; font-weight: 800; }
.chat-text { font-size: 0.88rem; font-weight: 600; line-height: 1.35; }
.chat-time { font-size: 0.64rem; justify-self: end; font-variant-numeric: tabular-nums; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 0.45rem; }

/* ---------- 🎵 Odak Sesleri & Spotify ---------- */
.sound-pane { display: grid; gap: 0.85rem; }
.sound-pane-sleeping {
  height: 0 !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important;
  border: 0 !important; overflow: hidden !important; visibility: hidden !important; pointer-events: none !important;
}
.ambient-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.ambient-tracks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.45rem; }
.ambient-btn {
  font: inherit; font-weight: 700; font-size: 0.85rem; min-height: 36px; padding: 0.48rem 0.65rem;
  border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--field);
  color: var(--ink-soft); cursor: pointer;
}
.ambient-btn.active { background: var(--sage); border-color: var(--sage-deep); color: var(--ink); }
.ambient-vol { display: grid; gap: 0.35rem; font-size: 0.82rem; color: var(--ink-soft); }
.ambient-vol span { display: flex; justify-content: space-between; }
.ambient-vol strong { font-variant-numeric: tabular-nums; }
.ambient-vol input[type="range"] { min-height: auto; padding: 0; border: 0; background: transparent; accent-color: var(--accent); cursor: pointer; }

.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ı ---------- */
.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.68rem; }
.stat-card { padding: 0.8rem 0.9rem; border-radius: var(--r-md); background: var(--card-tint); border: 1px solid var(--line); display: grid; gap: 0.2rem; }
.stat-label { font-size: 0.72rem; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; }
.stat-value { font-size: 1.14rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.stats-panel-card { padding: 0.92rem 1rem; border-radius: var(--r-lg); background: var(--card-tint); border: 1px solid var(--line); display: grid; gap: 0.6rem; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; }
.card-head h3 { font-size: 0.95rem; font-weight: 800; }
.chart-wrap { position: relative; height: 260px; }
.chart-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: var(--ink-soft); font-size: 0.86rem; }
.report-text { font-size: 0.88rem; line-height: 1.6; }
.report-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.65rem; }
.report-item { display: grid; gap: 0.28rem; }
.report-row { display: flex; align-items: center; gap: 0.55rem; font-size: 0.86rem; font-weight: 700; }
.swatch { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.report-row .grow { flex: 1; }
.report-row .dur { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.bar { height: 7px; border-radius: 999px; background: var(--inset); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; }

/* ---------- Süre Ayarları & Profil Özelleştirme ---------- */
.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); }
.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-meta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.streak-badge {
  display: inline-flex; align-items: center; gap: 0.28rem; padding: 0.28rem 0.7rem;
  border-radius: 999px; background: var(--inset); border: 1px solid var(--line);
  font-size: 0.78rem; font-weight: 700; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.streak-badge.active { background: var(--butter); border-color: rgba(251, 191, 36, 0.4); color: #fde68a; }
:root[data-theme="light"] .streak-badge.active { color: #92400e; }
.status-badge {
  font: inherit; font-size: 0.78rem; font-weight: 700; padding: 0.28rem 0.72rem;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--lilac); color: var(--ink); cursor: pointer;
}
.profile-account-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line-strong);
}
.profile-account-actions .btn { flex: 1 1 auto; font-size: 0.8rem; min-height: 32px; padding: 0.34rem 0.65rem; }

.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;
}
.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(--accent); color: #0b0e14; cursor: pointer; }
.toast-close { font: inherit; font-size: 1rem; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(148, 163, 184, 0.18); color: inherit; cursor: pointer; display: grid; place-items: center; }

/* ---------- Responsive: Tablet (768x1024 vb.) ---------- */
@media (max-width: 960px) {
  .floating-dock {
    gap: 0.2rem;
    padding: 0.34rem 0.38rem;
  }
  .dock-btn {
    min-width: 66px;
    padding: 0.38rem 0.42rem;
  }
  .week-grid { gap: 0.32rem; }
  .week-cell { min-height: 120px; padding: 0.38rem; }
}

/* ---------- Responsive: Mobil (375px - 680px, ör. iPhone 13 390x844) ---------- */
@media (max-width: 680px) {
  :root {
    --aura-inner: 7px;
    --aura-outer: 14px;
  }

  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
  }
  .brand-title { font-size: 0.86rem; max-width: 112px; }
  .presence-avatar { width: 28px; height: 28px; }
  .me-name { display: none; }
  .pip-label { 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; }

  /* Mobilde 7 araç etiketleri gizli, net ikon + aktif alt çizgi */
  .floating-dock {
    width: 100%;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    padding: 0.28rem 0.25rem;
    border-radius: 18px;
    gap: 0.12rem;
  }
  .dock-btn {
    min-width: 0;
    min-height: 44px;
    padding: 0.38rem 0.1rem;
    border-radius: 12px;
  }
  .dock-label { display: none; }
  .dock-btn.active::after {
    content: "";
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 2.5px;
    border-radius: 999px;
    background: var(--accent);
  }
  .dock-badge { top: 2px; right: 4px; min-width: 15px; height: 15px; font-size: 0.56rem; }
  .dock-status-dot { top: 5px; right: 7px; }

  .drawer { width: 100%; border-radius: 0 !important; }
  .drawer-modal {
    inset: 0; left: 0; top: 0; width: 100% !important; max-height: 100%;
    border-radius: 0 !important;
    transform: translateY(100%);
  }
  .drawer-modal.open { transform: none; }

  .toast {
    top: 3.75rem;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    text-align: center;
  }
  .toast.show { animation: toast-in-mobile 0.22s ease; }

  .week-grid { grid-template-columns: 1fr; }
  .week-cell { min-height: auto; }
  .exam-form-grid, .settings-row { grid-template-columns: 1fr; }
  .stat-cards { gap: 0.42rem; }
  .stat-card { padding: 0.58rem 0.62rem; }
  .stat-value { font-size: 0.94rem; }
  .avatar-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

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

@media (max-height: 700px) {
  :root {
    --aura-inner: 7px;
    --aura-outer: 14px;
  }
}

@media (max-height: 660px) {
  :root {
    --aura-inner: 6px;
    --aura-outer: 12px;
  }
  .dial { width: clamp(144px, min(44vw, calc(100dvh - 430px)), 200px); }
  .dial-wrap {
    padding:
      calc(var(--aura-outer) + 24px)
      calc(var(--aura-outer) + 24px);
  }
}

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