/* ===== Design tokens: "Modern Akademik" ===== */
:root {
  /* Nötr paleti — açık mod (kağıt/mürekkep) */
  --paper-0: #fffdf8;   /* kart yüzeyi */
  --paper-50: #f7f5ef;  /* ana zemin */
  --paper-100: #eeeae0; /* ikincil zemin */
  --paper-200: #e3ddce; /* üçüncül yüzey / nötr rozet zemini */
  --ink-900: #1f2a37;   /* ana metin */
  --ink-600: #45536a;   /* ikincil okunur metin (dim) */
  --ink-400: #667085;   /* üçüncül/soluk metin (faint) */
  --paper-border: #ddd8cb;

  /* Nötr paleti — koyu mod (mürekkep/gece) */
  --night-950: #111820; /* ana zemin */
  --night-900: #18222d; /* ikincil zemin */
  --night-800: #202c38; /* kart yüzeyi */
  --night-700: #283645; /* yükseltilmiş yüzey / nötr rozet zemini */
  --snow-100: #f3f0e8;  /* ana metin */
  --snow-300: #d7dce0;  /* ikincil okunur metin (dim) */
  --snow-500: #b8c0c8;  /* üçüncül/soluk metin (faint) */
  --night-border: #344453;

  /* Marka ve vurgu — açık mod değerleri (koyu modda aşağıda geçersiz kılınır) */
  --navy: #334e68;
  --navy-strong: #243b53;
  --sage: #385e52;
  --amber: #d69e2e;
  --logo-ink: #10233f;
  --logo-accent: #a77a28;

  --subj-verbal: #4f78a8;      /* Türkçe */
  --subj-quant: #4f8263;       /* Matematik / Muhakeme */
  --subj-history: #a55c5c;     /* Tarih */
  --subj-geo: #438c89;         /* Coğrafya */
  --subj-citizenship: #7667a8; /* Vatandaşlık */
  --subj-current: #8b6f3e;     /* Güncel konular (uyarı renginden kasıtlı olarak ayrıştırılmış ton) */

  --ok: #3f7d58;
  --warn: #b7791f;
  --bad: #b85c5c;
  --info: #4f78a8;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(31,42,55,.06), 0 1px 1px rgba(31,42,55,.05);
  --shadow-md: 0 8px 24px rgba(31,42,55,.10);

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px;

  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, "Times New Roman", serif;

  --bg: var(--paper-50);
  --surface: var(--paper-0);
  --surface-2: var(--paper-100);
  --surface-3: var(--paper-200);
  --border: var(--paper-border);
  --text: var(--ink-900);
  --text-dim: var(--ink-600);
  --text-faint: var(--ink-400);
  /* Kart/yükseltilmiş yüzey metni sayfa metninden ayrıdır. Özel temada sayfa ve kart
     zeminleri zıt parlaklıklarda seçilebildiği için bu token'lar JS tarafından kart
     zeminine göre ayrıca hesaplanır. */
  --surface-text: var(--ink-900);
  --surface-text-dim: var(--ink-600);
  --surface-text-faint: var(--ink-400);
  /* Veri teması henüz uygulanmadan önceki güvenli varsayılan: landing ile aynı adaçayı. */
  --accent: var(--sage);
  --accent-hover: #173f36;
  --accent-active: #102e28;
  --accent-text: var(--paper-0);

  /* Kocchum tema sistemi — eksik semantik token'lar (bkz. Kocchum fazı, Faz 3/4).
     --accent zaten hem "vurgu" hem dolaylı olarak odak halkası rengiydi; ayrı bir
     --focus-ring token'ı eklemek, ileride odak rengini vurgudan bağımsızlaştırmak
     gerekirse (ör. kontrast nedeniyle) tek noktadan değiştirilebilmesini sağlar. */
  --focus-ring: var(--accent);
  /* Harita seçim durumu, sabit bir altın renge değil kullanıcının etkin tema vurgusuna
     bağlanır. Bu ifadeler --accent/--accent-text sonradan özel tema tarafından satır içi
     değiştirilse bile kullanım anında yeniden çözülür. */
  --overlay: rgba(17, 22, 28, .55);
  --disabled-opacity: .45;
  --input-bg: var(--surface-2);
  --motion-fast: 120ms;
  --motion-base: 180ms;
  --motion-slow: 280ms;
  --ease-standard: cubic-bezier(.2, .7, .3, 1);

  color-scheme: light;

  /* ===== Merkezi otomatik tema sistemi — ek semantik token'lar (bkz. görev talimatı
     "Centralized automatic theme system", js/utils/color.js, js/data/themePresets.js) =====
     Birincil/ikincil buton ve üst bar/gezinme artık --accent/--surface'e DOLAYLI olarak değil,
     KENDİ token'larına bağlıdır — böylece bir preset/özel tema "Birincil buton" ile "Vurgu
     rengi"ni veya "Üst bar" ile "Kart" rengini BAĞIMSIZ ayarlayabilir (bkz. görev talimatı
     "Changing one area must not overwrite unrelated colors"). Varsayılan değerleri MEVCUT
     görünümle birebir aynı olacak şekilde eskiye referans verir — bu yüzden eski altı-tema
     sisteminde (navy/sage/amber/monochrome/colorful/system) HİÇBİR görsel değişiklik olmaz. */
  --btn-primary-bg: var(--accent);
  --btn-primary-hover: var(--accent-hover);
  --btn-primary-active: var(--accent-active);
  --btn-primary-text: var(--accent-text);
  --btn-secondary-bg: var(--surface-2);
  --btn-secondary-hover: var(--surface-3);
  --btn-secondary-text: var(--text);
  --btn-secondary-border: var(--border);
  --header-bg: var(--surface);
  --header-text: var(--text);
  --header-text-dim: var(--text-faint);
}

@media (prefers-color-scheme: dark) {
  /* Yalnızca hiçbir data-theme HENÜZ atanmamışken (ör. JS devre dışıysa) devreye girer —
     uygulama normalde her zaman js/app.js -> applyTheme() ile altı temadan (bkz. Kocchum
     "Altı Tema" fazı: navy/sage/amber x açık/karanlık) birini data-theme olarak KESİN
     şekilde atar (bkz. index.html'deki FOUC önleyici satır içi betik). Bu yüzden seçici
     burada TÜM açık temalı seçenekleri OS koyu tercihinin ezmesini önlemek için yalnızca
     `[data-theme]` HİÇ yoksa eşleşir. Varsayılan aile (adaçayı) kullanılır. */
  :root:not([data-theme]) {
    --bg: var(--night-950);
    --surface: var(--night-800);
    --surface-2: var(--night-900);
    --surface-3: var(--night-700);
    --border: var(--night-border);
    --text: var(--snow-100);
    --text-dim: var(--snow-300);
    --text-faint: var(--snow-500);
    --surface-text: var(--snow-100);
    --surface-text-dim: var(--snow-300);
    --surface-text-faint: var(--snow-500);
    --accent: #8fc39a;
    --accent-hover: #a3d1ac;
    --accent-active: #b6dcbe;
    --accent-text: var(--night-950);
    --sage: #91b497;
    --amber: #e5b95c;
    --ok: #75b889;
    --warn: #e5b95c;
    --bad: #e08a8a;
    --info: #86a9d1;
    --logo-ink: #f7f3e8;
    --logo-accent: #d8a84c;
    --overlay: rgba(0, 0, 0, .6);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.28), 0 1px 1px rgba(0,0,0,.2);
    --shadow-md: 0 10px 28px rgba(0,0,0,.36);
    color-scheme: dark;
  }
}

/* ===== Altı tema preseti: 3 vurgu ailesi (Navy/Yeşil/Amber) x (Açık/Karanlık) =====
   Görev talimatı: "the three existing color/accent families" -> bunlar zaten yukarıdaki
   :root'ta tanımlı marka token'larıdır (--navy, --sage, --amber). Her aile artık HEM açık
   HEM karanlık modda kendi kimliğini koruyan, WCAG AA kontrastlı tam bir preset olarak var.
   Nötr taban (bg/surface/text/border) her ailede AYNIDIR (paper-* açıkta, night-* koyuda) —
   yalnızca --accent/--accent-hover/--accent-active/--accent-text ailesine göre değişir; bu
   sayede vurgu her zaman "aynı uygulama, farklı vurgu" hissi verir, tutarsız bir nötr taban
   yaratmaz. `data-theme="dark"`/`"light"` eski (legacy) değerleri, geriye dönük uyumluluk
   için `navy-dark`/varsayılan navy-light ile birebir aynı görünüme çözümlenir (bkz.
   js/app.js -> resolveEffectiveTheme, backend/app.py -> ALLOWED_THEMES migration notu). */
:root[data-theme="light"], :root[data-theme="navy-light"] {
  --bg: var(--paper-50); --surface: var(--paper-0); --surface-2: var(--paper-100); --surface-3: var(--paper-200);
  --border: var(--paper-border); --text: var(--ink-900); --text-dim: var(--ink-600); --text-faint: var(--ink-400);
  --accent: #334e68; --accent-hover: #243b53; --accent-active: #1c2e40; --accent-text: var(--paper-0);
  --overlay: rgba(17, 22, 28, .55); color-scheme: light;
}
:root[data-theme="dark"], :root[data-theme="navy-dark"] {
  --bg: var(--night-950);
  --surface: var(--night-800);
  --surface-2: var(--night-900);
  --surface-3: var(--night-700);
  --border: var(--night-border);
  --text: var(--snow-100);
  --text-dim: var(--snow-300);
  --text-faint: var(--snow-500);
  --accent: #8faec7;
  --accent-hover: #a3bdd2;
  --accent-active: #b7cddc;
  --accent-text: var(--night-950);
  --sage: #91b497;
  --amber: #e5b95c;
  --ok: #75b889;
  --warn: #e5b95c;
  --bad: #e08a8a;
  --info: #86a9d1;
  --overlay: rgba(0, 0, 0, .6);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.28), 0 1px 1px rgba(0,0,0,.2);
  --shadow-md: 0 10px 28px rgba(0,0,0,.36);
  color-scheme: dark;
}
:root[data-theme="sage-light"] {
  /* Public landing paletinin uygulama semantik tokenlarına eşlenmiş sürümü. */
  --bg: #f4f2ea; --surface: #fffdfa; --surface-2: #e8ede5; --surface-3: #dce5d9;
  --border: #cfd7cc; --text: #24352f; --text-dim: #53635d; --text-faint: #77847f;
  --accent: #385e52; --accent-hover: #173f36; --accent-active: #102e28; --accent-text: #ffffff;
  --overlay: rgba(17, 22, 28, .55); color-scheme: light;
}
:root[data-theme="sage-dark"] {
  --bg: var(--night-950); --surface: var(--night-800); --surface-2: var(--night-900); --surface-3: var(--night-700);
  --border: var(--night-border); --text: var(--snow-100); --text-dim: var(--snow-300); --text-faint: var(--snow-500);
  --accent: #8fc39a; --accent-hover: #a3d1ac; --accent-active: #b6dcbe; --accent-text: var(--night-950);
  --ok: #75b889; --warn: #e5b95c; --bad: #e08a8a; --info: #86a9d1;
  --overlay: rgba(0, 0, 0, .6); --shadow-sm: 0 1px 2px rgba(0,0,0,.28), 0 1px 1px rgba(0,0,0,.2);
  --shadow-md: 0 10px 28px rgba(0,0,0,.36); color-scheme: dark;
}
:root[data-theme="amber-light"] {
  --bg: var(--paper-50); --surface: var(--paper-0); --surface-2: var(--paper-100); --surface-3: var(--paper-200);
  --border: var(--paper-border); --text: var(--ink-900); --text-dim: var(--ink-600); --text-faint: var(--ink-400);
  --accent: #7a5f2e; --accent-hover: #695027; --accent-active: #574220; --accent-text: var(--paper-0);
  --overlay: rgba(17, 22, 28, .55); color-scheme: light;
}
:root[data-theme="amber-dark"] {
  --bg: var(--night-950); --surface: var(--night-800); --surface-2: var(--night-900); --surface-3: var(--night-700);
  --border: var(--night-border); --text: var(--snow-100); --text-dim: var(--snow-300); --text-faint: var(--snow-500);
  --accent: #e0b563; --accent-hover: #e8c37c; --accent-active: #efd093; --accent-text: var(--night-950);
  --ok: #75b889; --warn: #e5b95c; --bad: #e08a8a; --info: #86a9d1;
  --overlay: rgba(0, 0, 0, .6); --shadow-sm: 0 1px 2px rgba(0,0,0,.28), 0 1px 1px rgba(0,0,0,.2);
  --shadow-md: 0 10px 28px rgba(0,0,0,.36); color-scheme: dark;
}

/* ===== "Siyah-Beyaz" (monochrome) tema ===== */
/* Renk taşımaz; durum ayrımı (doğru/yanlış/uyarı) rengin dışında zaten metin etiketi
   (ör. "doğru"/"yanlış" rozetleri) ve ✓/✕ işaretleriyle (bkz. .option.correct/.incorrect)
   sağlandığından, buradaki farklı gri tonları yalnızca EK bir okunabilirlik katmanıdır. */
:root[data-theme="monochrome"] {
  --bg: #f2f2f0;
  --surface: #ffffff;
  --surface-2: #e9e9e7;
  --surface-3: #d8d8d6;
  --border: #c7c7c4;
  --text: #17181a;
  --text-dim: #47484b;
  --text-faint: #74757a;
  --accent: #202225;
  --accent-hover: #000000;
  --accent-active: #000000;
  --accent-text: #ffffff;
  --sage: #47484b;
  --amber: #3a3b3d;
  --ok: #26272a;
  --warn: #55565a;
  --bad: #000000;
  --info: #6a6b6f;
  --overlay: rgba(10, 10, 10, .6);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.10);
  --shadow-md: 0 8px 24px rgba(0,0,0,.16);
  color-scheme: light;
}

/* ===== "Renkli" (colorful) özel tema ===== */
/* Nötr taban her zaman açık/kağıt tonlarıdır (uzun çalışma seansları için sakin kalır);
   --accent/--accent-hover/--accent-active/--accent-text js/app.js -> applyTheme() tarafından
   js/utils/color.js -> deriveAccentPalette() ile HER kullanıcı için ayrı ayrı, satır içi
   (inline) stil olarak hesaplanıp buradaki varsayılanların ÜZERİNE yazılır (bkz. Faz 3). */
:root[data-theme="colorful"] {
  --bg: var(--paper-50);
  --surface: var(--paper-0);
  --surface-2: var(--paper-100);
  --surface-3: var(--paper-200);
  --border: var(--paper-border);
  --text: var(--ink-900);
  --text-dim: var(--ink-600);
  --text-faint: var(--ink-400);
  --accent: var(--navy);
  --accent-hover: var(--navy-strong);
  --accent-active: #1c2e40;
  --accent-text: var(--paper-0);
  --overlay: rgba(17, 22, 28, .55);
  color-scheme: light;
}

/* Marka rengi tema ailesinden bağımsızdır; yalnızca zemin parlaklığına göre kontrast değiştirir. */
:root:is([data-theme="dark"], [data-theme$="-dark"]) {
  --logo-ink: #f7f3e8;
  --logo-accent: #d8a84c;
  --surface-text: var(--snow-100);
  --surface-text-dim: var(--snow-300);
  --surface-text-faint: var(--snow-500);
}

:root[data-theme="monochrome"] {
  --logo-ink: #17181a;
  --logo-accent: #5a5b5e;
  --surface-text: #17181a;
  --surface-text-dim: #47484b;
  --surface-text-faint: #74757a;
}

/* Eski tema referansları (bkz. js/components/charts.js, home.js) marka/ikincil vurgu
   rengine denk gelsin diye korunuyor — yeni bir paralel token seti açmak yerine. */
:root { --cyan: var(--sage); }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== Yüzeye duyarlı metin kapsamı =====
   Özel temada `--bg` ve `--surface` birbirinden bağımsızdır. Aşağıdaki ortak yüzey
   bileşenleri kendi kapsamlarında kart için üretilen metin token'larını kullanır; böylece
   tüm alt başlık/dim/faint kuralları da ekrana özel yamalar olmadan doğru kontrastı miras
   alır. */
.card,
.metric-tile,
.stat-tile,
.quick-card,
.option,
.modal-card,
.admin-drawer,
.test-footer,
.theme-select-trigger,
.theme-select-menu,
.flashcard-face,
.flashcard-fav-btn,
.map-lab-mode-switch,
.map-lab-timeline,
.map-lab-control-card,
.map-lab-detail-card,
.map-lab-subcat,
.map-lab-mobile-layers,
.map-lab-map-panel.is-mobile-expanded {
  --text: var(--surface-text);
  --text-dim: var(--surface-text-dim);
  --text-faint: var(--surface-text-faint);
  color: var(--text);
}

.tabular-nums, .timer, .stat-value, .bar-pct, .qnav-dot, .badge, .opt-letter { font-variant-numeric: tabular-nums; }

a { color: inherit; }
button { font-family: inherit; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; }

/* ===== App shell =====
   Bu kapsayıcı ARTIK genişliği kısıtlamaz (bkz. Kocchum fazı "Masaüstü Duyarlı Tasarım") —
   önceden buradaki sabit `max-width:480px`, viewport ne kadar geniş olursa olsun TÜM
   rotaları (Yönetim Paneli dahil) her zaman dar/ortalanmış bir "telefon çerçevesi"ne
   sıkıştırıyordu; admin-shell/admin-sidebar'ın kendi 960px/1280px kırılım noktaları hiçbir
   zaman devreye giremiyordu çünkü ÜST kapsayıcı zaten 480px'e sabitti. Okunabilir içerik
   genişliği artık ekran BAŞINA (bkz. .screen / .screen--wide / .admin-screen) belirlenir,
   dış kabuk yalnızca tam yükseklik/tam genişlik bir host'tur. */
.app-shell {
  width: 100%;
  min-height: 100vh;
  position: relative;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.app-shell > * { min-width: 0; }

:root { --content-max: 560px; }

/* Varsayılan (mobil-öncelikli) ekranlar: okunabilir tek sütun, her zaman ortalanmış —
   bkz. görev talimatı "keep question text at a readable line length". Genişliği artırmak
   isteyen ekranlar (dashboard/admin/sonuç) .screen--wide ile bunun üzerine yazar. */
.screen {
  flex: 1;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  min-width: 0;
  padding: 16px 16px calc(96px + env(safe-area-inset-bottom));
  animation: fadeIn .18s ease;
}
@media (min-width: 600px) {
  .screen { padding-left: 24px; padding-right: 24px; }
}

/* ===== Masaüstü "dashboard" ekranları (Akıllı Puan, Sınavlar, Sonuç/Analiz, Pratik vb.) =====
   Mobilde (<960px) davranış birebir ÖNCEKİYLE aynıdır: tek sütun, dikey akış. >=960px'te
   içerik genişler ve doğrudan alt bölümler (.section) content-driven bir grid'e ("kartlar
   yan yana") yeniden akar — hiçbir ekranın iş mantığı/HTML yapısı değişmeden, yalnızca
   kapsayıcıya bir CSS sınıfı eklenerek. .section--full her zaman tam genişlik kaplar (ör.
   üst başlık, Hızlı Başlangıç grid'i, sınav listesi). Ana Sayfa (home.js) artık kendi ÖZEL
   .screen--dashboard/.home-grid çiftini kullanır (bkz. aşağısı) — auto-fill masonry yerine,
   satırların KESİN olarak eşleşmesi (ör. "Son Sonuç" ile "Net Puan Trendi" hep yan yana)
   gerektiğinden. */
.screen--wide { max-width: 1180px; padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
@media (min-width: 960px) {
  .screen--wide {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
    align-items: stretch;
    align-content: start;
    gap: 20px;
    padding-bottom: 40px;
  }
  .screen--wide > * { margin-top: 0 !important; }
  .screen--wide > .section { min-width: 0; display: flex; flex-direction: column; }
  .screen--wide > .section > .card:only-child { flex: 1; }
  .screen--wide > .section--full,
  .screen--wide > .flex.between.center:first-child { grid-column: 1 / -1; }
}

/* ===== Ana Sayfa (home.js) — amaca özel iki sütunlu pano =====
   .screen--dashboard yalnızca genişliği ayarlar (auto-fill DAVRANIŞI YOKTUR).  .home-grid,
   mobilde tek sütun dikey akış, >=1180px'te (kenar çubuğu + rahat iki sütun için yeterli
   genişlik) KESİN 2 sütunlu bir grid'e döner — DOM sırasına göre kartlar ikişerli eşleşir
   (ör. "Bugünkü Hedef"+"Genel Ustalık" bir satır, "Son Sonuç"+"Net Puan Trendi" bir sonraki).
   .span-2 taşıyan öğeler (üst başlık, Hızlı Başlangıç) her zaman tam genişlik kaplar. */
.screen--dashboard { max-width: 1360px; padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
.home-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; padding-top: 4px; margin-bottom: 20px;
}
.home-header h1 { margin: 2px 0 0; font-size: 22px; }
.home-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.home-header-actions .btn { width: auto; }
/* Mobil ana sayfa başlığı tek satırda kalır: isim solda, birincil CTA ve öneri ikonu sağda.
   Profil üst başlıktan gizlenir; mobil alt menüdeki Profil erişimi korunur. */
@media (max-width: 767px) {
  .home-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, min(64vw, 310px));
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .home-header > :first-child { min-width: 0; }
  .home-header h1 {
    min-width: 0;
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .home-header-actions {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
  }
  .home-header-actions .btn-primary {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 8px 9px;
    gap: 5px;
    font-size: 11.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .home-header-actions .btn-label-text { display: none; }
  .home-header-actions .btn-sm {
    width: 40px !important;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    justify-content: center;
  }
  .home-header-actions .icon-btn {
    display: none;
  }
}
@media (max-width: 380px) {
  .home-header-actions .btn-primary svg { display: none; }
}
.home-grid { display: flex; flex-direction: column; gap: 18px; }
.home-grid > * { margin-top: 0; }
.home-grid > .card.home-card { margin-top: 0; }
.home-card { height: 100%; }
.home-map-lab {
  isolation: isolate;
  min-height: 190px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 28px;
  border: 1px solid color-mix(in srgb, var(--subj-geo) 48%, var(--border));
  border-radius: var(--radius-lg);
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--subj-history) 12%, var(--surface)) 0%, color-mix(in srgb, var(--subj-geo) 14%, var(--surface)) 100%);
  box-shadow: var(--shadow-sm);
}
.home-map-lab-glow {
  position: absolute;
  z-index: -1;
  width: 280px;
  height: 280px;
  right: 8%;
  top: 50%;
  border-radius: 50%;
  background: color-mix(in srgb, var(--subj-geo) 22%, transparent);
  filter: blur(34px);
  transform: translateY(-50%);
  pointer-events: none;
}
.home-map-lab-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--subj-geo) 50%, var(--border));
  border-radius: 18px;
  background: color-mix(in srgb, var(--subj-geo) 16%, var(--surface));
  color: var(--subj-geo);
}
.home-map-lab-copy { min-width: 0; }
.home-map-lab-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--subj-geo);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.home-map-lab h2 { margin: 0; font-size: clamp(23px, 3vw, 31px); }
.home-map-lab p { max-width: 720px; margin: 7px 0 14px; color: var(--text-dim); line-height: 1.55; }
.home-map-lab-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.home-map-lab-tags span {
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--subj-geo) 25%, var(--border));
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--subj-geo) 7%, var(--surface));
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 650;
}
.home-map-lab-action {
  width: auto;
  min-height: 48px;
  padding-inline: 20px;
  border-color: transparent;
  background: var(--subj-geo);
  color: var(--paper-0);
  white-space: nowrap;
}
.home-map-lab-action:hover { background: color-mix(in srgb, var(--subj-geo) 84%, black); }
@media (max-width: 700px) {
  .home-map-lab { grid-template-columns: auto 1fr; gap: 14px; padding: 20px; }
  .home-map-lab-icon { width: 52px; height: 52px; border-radius: 15px; }
  .home-map-lab-action { grid-column: 1 / -1; width: 100%; }
}
@media (min-width: 1180px) {
  .home-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; gap: 20px; }
  .home-grid > .span-2 { grid-column: 1 / -1; }
}

/* ===== Profil ekranı — masaüstünde kimlik kartı (~1/3) + ustalık/istatistik alanı (~2/3) =====
   Mobilde tek sütun dikey akış (öncekiyle aynı). >=1024px'te kimlik kartı sola, geri kalan
   TÜM içerik (özet/metrikler/ders raporu/bağlantılar) sağa geçer; kimlik kartı `sticky` ile
   sağ sütun kaydırılırken yerinde kalır (görev talimatı: "Do not centre every element merely
   because it is a profile page" — yalnızca kimlik KARTININ İÇİ ortalanır, sayfanın tamamı değil). */
.profile-grid { display: flex; flex-direction: column; gap: 16px; }
.profile-grid > * { margin-top: 0; }
.profile-main > .card.card { margin-top: 0; }
@media (min-width: 1024px) {
  .profile-grid {
    display: grid;
    grid-template-columns: minmax(260px, 320px) 1fr;
    align-items: start;
    gap: 22px;
  }
  .profile-grid > .profile-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  .profile-identity { position: sticky; top: 20px; }
}

/* Sayısal/tarih metriklerini TEK bir tutarlı ızgarada hizalar (görev talimatı: "Align numeric
   metrics consistently", "labels visibly secondary to values") — stat-tile ile aynı görsel
   dil (büyük değer + küçük büyük-harf etiket), yalnızca 6 öğeye kadar esner. Önceki (daha
   dengeli/temiz görünen) 3 sütunlu düzene geri dönüldü (bkz. görev talimatı "restore ... to
   the previous cleaner style"); yalnızca `max-width`, geniş masaüstünde (bkz. .profile-grid'in
   >=1024px sağ sütunu) döşemelerin konteyneri tamamen doldurup aşırı gerilmesini önlemek için
   korunur — görsel stil/aralık aksi halde birebir öncekiyle aynıdır. */
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 480px) { .metric-grid { grid-template-columns: repeat(3, 1fr); max-width: 460px; } }
.metric-tile {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 10px; text-align: center;
}
.metric-tile .metric-value { font-size: 17px; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; }
.metric-tile .metric-value.is-empty { color: var(--text-faint); font-weight: 600; font-size: 14px; }
.metric-tile .metric-label { font-size: 10.5px; color: var(--text-faint); margin-top: 4px; text-transform: uppercase; letter-spacing: .04em; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(4px);} to { opacity: 1; transform: none;} }
@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
}

.screen--nochrome { padding-bottom: 24px; }

/* ===== İkonlar ===== */
.icon { display: inline-block; vertical-align: -4px; flex-shrink: 0; }
button .icon, .nav-icon .icon { vertical-align: middle; }
.icon.flip-v { transform: scaleY(-1); }

/* ===== Top bar ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 6px;
  position: sticky;
  top: 0;
  background: linear-gradient(var(--bg) 80%, transparent);
  z-index: 5;
}
.topbar h1 { font-size: 19px; margin: 0; letter-spacing: -.005em; font-weight: 700; }
.topbar .back-btn {
  width: 40px; height: 40px; border-radius: var(--radius-pill);
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text);
}
.topbar-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: var(--radius-pill);
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text);
}

/* ===== Ana gezinme: mobil/tablette ALT SEKME ÇUBUĞU, masaüstünde SOL KENAR ÇUBUĞU =====
   Tek bir bileşen (bkz. js/components/ui.js -> bottomNav()), yalnızca CSS ile genişliğe göre
   yeniden şekillenir — admin-shell'in zaten kullandığı desenle tutarlı (bkz. .admin-sidebar).
   < 960px: yatay, sabit-alt sekme çubuğu (marka gizli, yalnızca ikon+etiket sekmeleri). */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--content-max);
  display: flex;
  background: var(--header-bg);
  border-top: 1px solid var(--border);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  z-index: 20;
}
.nav-brand { display: none; }
.nav-items-primary, .nav-items-action { display: contents; }
.nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 1px;
  background: none; border: none; cursor: pointer;
  color: var(--header-text-dim);
  font-size: 10.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  min-height: 48px;
  justify-content: center;
  min-width: 0;
}
.nav-item span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .nav-icon { line-height: 1; display: flex; align-items: center; justify-content: center; }
.nav-item.active { color: var(--accent); }
.nav-item:hover { background: var(--surface-2); }
.nav-item.active:hover { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }

/* KokonutUI Smooth Tab yaklaşımının bağımlılıksız karşılığı: gösterge tek bir compositor
   katmanında transform ile kayar; rota değişmeden hemen önce hedef sekmeye ulaşır. */
.smooth-tab-indicator {
  position: absolute; left: 0; top: 0; z-index: 0;
  width: var(--smooth-tab-w, 0); height: var(--smooth-tab-h, 0);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent) 13%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
  transform: translate3d(var(--smooth-tab-x, 0), var(--smooth-tab-y, 0), 0);
  pointer-events: none; opacity: 0;
}
.bottom-nav.smooth-tab-ready .smooth-tab-indicator {
  opacity: 1;
  transition: transform .34s cubic-bezier(.2,.8,.2,1), width .24s ease, height .24s ease, opacity .16s ease;
}
.bottom-nav .nav-brand,
.bottom-nav .nav-items-primary,
.bottom-nav .nav-items-action,
.bottom-nav .nav-item { position: relative; z-index: 1; }
.nav-item.active { background: transparent; }
.nav-item.active:hover { background: transparent; }
.nav-item.active .nav-icon { transform: translateY(-1px) scale(1.06); }
.nav-icon { transition: transform .28s cubic-bezier(.2,.8,.2,1); }

/* >= 960px: aynı DOM, sol sabit tam-yükseklik kenar çubuğu. .app-shell:has(> .bottom-nav)
   ile içerik alanı kenar çubuğu kadar içeri kaydırılır (bkz. aşağıdaki .app-shell kuralı) —
   yalnızca ANA uygulama ekranlarında geçerlidir; /admin kendi ayrı kabuğunu kullandığından
   (adminShell()) bu seçiciyle eşleşmez, dolayısıyla çift boşluk oluşmaz. */
@media (min-width: 960px) {
  .bottom-nav {
    position: fixed; top: 0; left: 0; bottom: 0; transform: none;
    width: 240px; max-width: none; height: 100vh;
    flex-direction: column; align-items: stretch;
    padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
    border-top: none; border-right: 1px solid var(--border);
    gap: 4px; z-index: 30; overflow-y: auto;
  }
  .nav-brand {
    display: block; padding: 6px 10px 20px; flex: 0 0 auto;
    width: 100%; border: 0; background: transparent; color: inherit;
    text-align: left; cursor: pointer; border-radius: var(--radius-md);
  }
  .nav-brand:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
  .nav-brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
  .nav-items-primary { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; }
  .nav-items-action {
    display: flex; flex-direction: column; margin-top: 10px; padding-top: 12px;
    border-top: 1px solid var(--border); flex: 0 0 auto;
  }
  .nav-item {
    flex: 0 0 auto;
    flex-direction: row; justify-content: flex-start; gap: 11px;
    padding: 10px 12px; font-size: 14px; min-height: 44px;
    border-radius: var(--radius-md);
  }
  .nav-item span:last-child { overflow: visible; text-overflow: clip; white-space: nowrap; }
  .nav-item.active { background: transparent; font-weight: 700; }
  /* "Soru Ekle": birincil çalışma akışını gölgede bırakmadan tanımlı bir eylem olarak öne
     çıkar (görev talimatı) — dolu değil, vurgu renkli anahat (outline) bir buton gibi. */
  .nav-item-action {
    border: 1.5px solid var(--accent); color: var(--accent); font-weight: 700;
  }
  .nav-item-action:hover { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
  .nav-item-action.active { background: var(--accent); color: var(--accent-text); }
  .nav-item-action.active { background: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .bottom-nav.smooth-tab-ready .smooth-tab-indicator,
  .nav-icon { transition: none; }
}

/* ===== Avatar Picker ===== */
.avatar-picker { min-width: 0; margin: 0 0 20px; padding: 0; border: 0; text-align: left; }
.avatar-picker legend { padding: 0; color: var(--text); font-size: 13px; font-weight: 800; }
.avatar-picker__hint { margin: 4px 0 12px; color: var(--text-faint); font-size: 12px; line-height: 1.45; }
.avatar-picker__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.avatar-option {
  position: relative; min-width: 0; min-height: 88px; padding: 8px 4px 7px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2);
  color: var(--text-dim); cursor: pointer; font: inherit;
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.avatar-option > span:not(.profile-avatar) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 11px; font-weight: 750; white-space: nowrap; }
.avatar-option:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.avatar-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.avatar-option.is-selected {
  border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 16%, transparent);
}
.avatar-option__check {
  position: absolute; top: 5px; right: 5px; width: 19px; height: 19px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--accent); color: var(--accent-text); opacity: 0;
  transform: scale(.55) rotate(-12deg); transition: transform .2s cubic-bezier(.2,.8,.2,1), opacity .15s ease;
}
.avatar-option.is-selected .avatar-option__check { opacity: 1; transform: scale(1) rotate(0); }

.profile-avatar {
  --avatar-size: 64px; position: relative; isolation: isolate;
  width: var(--avatar-size); height: var(--avatar-size); flex: 0 0 var(--avatar-size);
  display: inline-grid; place-items: center; overflow: hidden; border-radius: 34%;
  background: var(--surface-3); border: 1px solid color-mix(in srgb, #fff 22%, var(--border));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 8px 20px rgba(12,20,28,.22);
}
.profile-avatar__image { width:100%; height:100%; display:block; object-fit:cover; transform:scale(1.015); transition:transform .24s ease; }
.avatar-option:hover .profile-avatar__image { transform:scale(1.065); }
.profile-avatar-stage { margin: 0 auto 14px; animation: avatarSettle .42s cubic-bezier(.2,.8,.2,1); }
@keyframes avatarSettle { from { opacity:0; transform:translateY(8px) scale(.92); } to { opacity:1; transform:none; } }
.profile-avatar-edit { min-height:44px; margin:14px auto 0; padding:9px 12px; display:inline-flex; align-items:center; gap:7px; border:1px solid var(--border); border-radius:var(--radius-pill); background:var(--surface-2); color:var(--accent); font:inherit; font-size:12px; font-weight:800; cursor:pointer; }
.profile-avatar-edit:hover { border-color:var(--accent); }
.profile-avatar-editor { margin-top:18px; padding-top:18px; border-top:1px solid var(--border); animation: avatarEditorIn .24s ease both; }
.profile-avatar-editor[hidden] { display:none; }
.profile-avatar-editor .avatar-picker { margin-bottom:14px; }
.profile-avatar-editor .avatar-picker__grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.profile-avatar-actions { display:flex; gap:8px; }
.profile-avatar-actions .btn { min-height:44px; padding:10px; font-size:13px; }
@keyframes avatarEditorIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:none; } }

@media (max-width: 640px) {
  .avatar-picker__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
  .avatar-option { min-height: 82px; padding-inline: 3px; }
  .avatar-option .profile-avatar { --avatar-size: 50px !important; }
}
@media (max-width: 380px) {
  .avatar-picker__grid { gap:5px; }
  .avatar-option { min-height:78px; padding-inline:2px; }
  .avatar-option .profile-avatar { --avatar-size: 46px !important; }
  .avatar-option > span:not(.profile-avatar) { font-size:9px; }
}
@media (prefers-reduced-motion: reduce) {
  .avatar-option, .avatar-option__check, .profile-avatar-stage, .profile-avatar-editor { animation:none; transition:none; }
}

/* Ana uygulama ekranları (admin HARİÇ — bkz. yukarıdaki not), >= 960px'te kenar çubuğu kadar
   içeri kayar. `:has()` yalnızca gerçekten bir .bottom-nav alt-öğesi olduğunda eşleşir. */
@media (min-width: 960px) {
  .app-shell:has(> .bottom-nav) { padding-left: 240px; }
}

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 12px; }
.card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 0 0 10px;
}
.section { margin-top: 20px; }
.section:first-child { margin-top: 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 10px;
}
.section-head h2 { font-size: 16px; margin: 0; }
.section-head .link { font-size: 13px; color: var(--accent); cursor: pointer; background: none; border: none; font-family: inherit; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  white-space: normal;
  overflow-wrap: break-word;
  text-align: center;
  line-height: 1.3;
  transition: transform .08s ease, opacity .15s ease;
}
.btn:active { transform: scale(.98); }
/* Varsayılan (sınıfsız ikinci düzey) düğme görsel olarak "ikincil buton"dur — bkz. yukarıdaki
   --btn-secondary-* token'ları; bir preset/özel tema bunu --accent'ten bağımsız ayarlayabilir. */
.btn { background: var(--btn-secondary-bg); color: var(--btn-secondary-text); border-color: var(--btn-secondary-border); }
.btn:hover { background: var(--btn-secondary-hover); }
.btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); border-color: transparent; }
.btn-primary:hover { background: var(--btn-primary-hover); }
.btn-primary:active { background: var(--btn-primary-active); }
.btn-outline { background: transparent; color: var(--btn-secondary-text); border-color: var(--btn-secondary-border); }
.btn-outline:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--bad); color: var(--paper-0); border-color: transparent; }
.btn-sm { padding: 9px 14px; font-size: 13px; min-height: 38px; width: auto; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { width: auto; flex: 1; }
.btn:disabled { opacity: var(--disabled-opacity); cursor: not-allowed; }
.btn:disabled:hover { background: var(--btn-secondary-bg); }
.btn-primary:disabled:hover { background: var(--btn-primary-bg); }

/* ===== Odak durumları (klavye/erişilebilirlik) ===== */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}
.btn:focus-visible, .chip:focus-visible, .option:focus-visible,
.icon-btn:focus-visible, .back-btn:focus-visible, .nav-item:focus-visible,
.card[data-nav-path]:focus-visible, .quick-card:focus-visible {
  outline-offset: 2px;
}

/* ===== Quick-start grid =====
   Sabit 2/3 sütun (auto-fill DEĞİL) — geniş masaüstünde 6 kart tek satıra sığıp yedinci
   kartın kendi başına yeni bir satıra düşmesi (görev talimatındaki "orphan card" hatası)
   yerine, öğe sayısına göre HER ZAMAN dengeli bir ızgara üretir (6 öğe / 3 sütun = 2x3). */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 480px) { .quick-grid { grid-template-columns: repeat(3, 1fr); } }
.quick-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  text-align: left;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 118px;
  color: var(--text);
  transition: border-color .12s ease, box-shadow .12s ease, transform .08s ease;
}
.quick-card:hover { border-color: var(--text-faint); box-shadow: var(--shadow-sm); }
.quick-card:active { transform: scale(.99); }
/* .qc-icon taban stili yalnızca .quick-card altında DEĞİL, aynı sınıfı kullanan her yerde
   (bkz. js/screens/topicSelect.js -> subjectStep, .card satırlarındaki ders ikon rozeti)
   geçerli olacak şekilde buraya taşındı — önceden yalnızca `.quick-card .qc-icon` seçicisi
   vardı, bu yüzden .quick-card ATASI OLMAYAN kullanımlarda (topicSelect.js) ikon kendi
   38-42px kutusunun içinde ORTALANMIYOR, varsayılan blok akışıyla sol-üst köşeye
   yapışıyordu ("too small and stuck near top-left" hatası). Boyut hâlâ `.quick-card
   .qc-icon` ile (veya satır-içi style ile, ör. topicSelect.js) override edilebilir. */
.qc-icon {
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; flex: 0 0 auto;
}
.quick-card .qc-icon { width: 38px; height: 38px; }
.quick-card .qc-label { font-size: 14px; font-weight: 700; line-height: 1.25; }
.quick-card .qc-sub { font-size: 12px; color: var(--text-faint); margin-top: 3px; line-height: 1.4; }

/* ===== Chips / badges ===== */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12.5px; font-weight: 600;
  cursor: pointer;
  color: var(--text);
  min-height: 32px;
}
.chip.selected { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.goal-picker { margin-top: 8px; }
.goal-picker .chip { min-height: 44px; padding-inline: 14px; }
.goal-custom-field {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.goal-custom-field > label {
  display: block;
  margin-bottom: 7px;
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 700;
}
.goal-custom-input { position: relative; max-width: 220px; }
.goal-custom-input input { width: 100%; min-height: 48px; padding-right: 58px; font-variant-numeric: tabular-nums; }
.goal-custom-input > span {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 750;
  pointer-events: none;
}
.goal-helper { margin: 7px 0 0; color: var(--text-faint); font-size: 11.5px; line-height: 1.45; }
.daily-goal-row strong { color: var(--text); font-variant-numeric: tabular-nums; }
.badge {
  display: inline-flex; align-items: center; padding: 3px 9px;
  border-radius: var(--radius-pill); font-size: 11px; font-weight: 700;
}
.badge-ok { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); color: var(--ok); }
.badge-warn { background: color-mix(in srgb, var(--warn) 16%, var(--surface)); color: var(--warn); }
.badge-bad { background: color-mix(in srgb, var(--bad) 16%, var(--surface)); color: var(--bad); }
.badge-neutral { background: var(--surface-3); color: var(--text-dim); }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ===== Stat tiles ===== */
.stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
/* Genişçe ve içerik-güdümlü stat gruplarında (ör. admin kullanıcı kartı istatistikleri)
   sabit 3 sütun yerine mevcut genişliğe göre esner — dar admin kartlarında bile taşmaz. */
.stat-grid.stat-grid--fluid { grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); }
.stat-tile {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 10px; text-align: center;
}
.stat-tile .stat-value { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.stat-tile .stat-label { font-size: 10.5px; color: var(--text-faint); margin-top: 3px; text-transform: uppercase; letter-spacing: .04em; }

/* ===== Progress bars / rings ===== */
.bar-track { height: 8px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.bar-row .bar-label { flex: 0 0 90px; font-size: 12.5px; color: var(--text-dim); }
.bar-row .bar-track { flex: 1; }
.bar-row .bar-pct { flex: 0 0 40px; text-align: right; font-size: 12.5px; font-weight: 700; }
.weak-topic-row { padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--border); }
.weak-topic-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.weak-topic-row .btn { width: 100%; }

/* ===== Question card ===== */
.q-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.q-text { font-family: var(--font-serif); font-size: 17px; line-height: 1.6; margin: 4px 0 16px; white-space: pre-wrap; }
.q-passage {
  background: var(--surface-2); border-left: 3px solid var(--accent);
  padding: 12px 14px; border-radius: var(--radius-sm);
  font-family: var(--font-serif); font-size: 15.5px; line-height: 1.65;
  margin-bottom: 14px; color: var(--text-dim); white-space: pre-wrap;
}
.q-visual {
  background: var(--surface-2); border: 1px dashed var(--border);
  border-radius: var(--radius-sm); padding: 14px; margin-bottom: 14px;
  font-size: 13px; color: var(--text-dim); overflow-x: auto; overflow-y: visible;
  max-width: 100%; min-width: 0; box-sizing: border-box;
}
.q-visual table { max-width: 100%; }
.q-visual th, .q-visual td { overflow-wrap: anywhere; word-break: break-word; line-height: 1.45; vertical-align: top; }
.option-list { display: flex; flex-direction: column; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border-radius: var(--radius-md);
  border: 1.5px solid var(--border); background: var(--surface);
  cursor: pointer; text-align: left; font-size: 15px; line-height: 1.45; color: var(--text);
  min-height: 48px;
  transition: border-color .12s ease, background-color .12s ease;
}
.option:hover:not(:disabled) { border-color: var(--text-faint); }
.option .opt-letter {
  width: 27px; height: 27px; border-radius: 50%; flex: 0 0 27px;
  background: var(--surface-2); display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; border: 1px solid var(--border);
}
.option.selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.option.selected .opt-letter { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.option.correct { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--surface)); }
.option.correct .opt-letter { background: var(--ok); color: var(--paper-0); border-color: transparent; }
.option.correct::after { content: "✓"; margin-left: auto; color: var(--ok); font-weight: 800; flex: 0 0 auto; }
.option.incorrect { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--surface)); }
.option.incorrect .opt-letter { background: var(--bad); color: var(--paper-0); border-color: transparent; }
.option.incorrect::after { content: "✕"; margin-left: auto; color: var(--bad); font-weight: 800; flex: 0 0 auto; }
.option:disabled { cursor: default; }

/* ===== Timer / test header ===== */
.test-header {
  position: sticky; top: 0; z-index: 6;
  background: var(--bg);
  padding: 12px 16px 10px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.timer { font-weight: 800; font-size: 16px; flex: 0 0 auto; }
.timer.low { color: var(--bad); }
.progress-mini { flex: 1; margin: 0 10px; min-width: 20px; }
.test-finish-btn {
  flex: 0 0 auto; width: auto; padding: 7px 12px; font-size: 12px;
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; min-height: 0;
}

.qnav-strip {
  display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; scrollbar-width: none;
}
.qnav-strip::-webkit-scrollbar { display: none; }
.qnav-dot {
  flex: 0 0 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim);
  position: relative;
}
.qnav-dot.current { border-color: var(--accent); color: var(--accent); border-width: 2px; }
.qnav-dot.answered { background: var(--surface-3); color: var(--text); }
.qnav-dot.flagged::after {
  content: ""; position: absolute; top: -3px; right: -3px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--amber);
  border: 1.5px solid var(--bg);
}
.qnav-dot.skipped { border-style: dashed; }
/* Adaptif testte henüz materyalize edilmemiş (kilitli) soru yer tutucuları — içerik/zorluk/
   konu asla sızdırılmaz, yalnızca bir sayı/konum bilgisi olmadan kilitli bir simge gösterilir. */
.qnav-dot.locked {
  background: transparent; border-style: dashed; color: var(--text-faint); cursor: default;
  opacity: .6;
}

/* ===== Ders içi ilerleme satırı (bkz. görev talimatı "Diagnostic progress and state
   preservation") — yalnızca ders-bloklu diagnostik sınavda (js/utils/testGenerator.js ->
   buildDiagnosticTest) gösterilir; diğer test modlarında (konu/karma/zayıflık) hiç render
   edilmez. */
.subject-progress-row { display: flex; align-items: center; gap: 10px; padding: 8px 16px 2px; }
.subject-progress-name { font-size: 12.5px; font-weight: 700; color: var(--text); flex: 0 0 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46%; }
.subject-progress-count { font-size: 11.5px; color: var(--text-faint); flex: 0 0 auto; white-space: nowrap; }
.subject-progress-bar { flex: 1; min-width: 30px; }

/* ===== Ders geçiş ekranı (bkz. js/components/subjectTransition.js, görev talimatı "Subject
   transition animations") — tam ekran, kısa, aktif temanın renklerinden türetilir; asla bir
   soru olarak sayılmaz/puanı etkilemez. */
.subject-transition {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 32px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 16%, var(--bg)), var(--bg));
  animation: subjectTransitionFade .35s var(--ease-standard);
}
.subject-transition-icon {
  width: 84px; height: 84px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  color: var(--accent);
  animation: subjectTransitionPop .5s var(--ease-standard);
}
.subject-transition-title { font-size: 22px; margin: 4px 0 0; color: var(--text); }
.subject-transition-message { color: var(--text-dim); max-width: 320px; margin: 0; font-size: 15px; line-height: 1.5; }
.subject-transition-sub { color: var(--text-faint); font-size: 12px; margin: 0; text-transform: uppercase; letter-spacing: .05em; }
.subject-transition-btn { width: auto; padding-left: 26px; padding-right: 26px; margin-top: 10px; }
@keyframes subjectTransitionFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes subjectTransitionPop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .subject-transition, .subject-transition-icon { animation: none; }
}

.test-footer {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--content-max);
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: flex; gap: 8px; z-index: 20;
}
.test-footer .btn { padding: 12px; font-size: 13.5px; }
/* NOT: Test ekranları (testTaking.js/adaptiveTest.js) kasıtlı olarak bottomNav() İÇERMEZ
   (testin ortasında yanlışlıkla başka bir sekmeye geçilmesini önlemek için, mevcut/önceki
   bir tasarım kararı) — bu yüzden .test-footer hiçbir zaman kenar çubuğuyla AYNI ekranda
   görünmez; yeniden ortalama gerekmez. */

/* ===== Onboarding ===== */
.onboard-wrap { min-height: 100vh; width: 100%; min-width: 0; max-width: 100%; display: flex; flex-direction: column; padding: 28px 22px; }
.onboard-hero { text-align: center; margin: 12px 0 28px; width: 100%; min-width: 0; max-width: 100%; }
.onboard-hero h1, .onboard-hero p { max-width: 100%; overflow-wrap: break-word; word-break: break-word; }
.onboard-brand { display: flex; justify-content: center; margin: 0 auto 18px; }
.onboard-hero h1 { font-family: var(--font-serif); font-size: 24px; margin: 0 0 6px; font-weight: 700; }
.onboard-hero p { color: var(--text-faint); font-size: 14px; margin: 0; }

/* ===== 404 (SPA bilinmeyen rota) ===== */
.notfound-wrap { justify-content: center; align-items: center; text-align: center; }
.notfound-wrap .onboard-hero { margin-bottom: 8px; }
.notfound-code {
  font-family: var(--font-serif); font-size: 56px; font-weight: 700;
  letter-spacing: 3px; color: var(--accent); opacity: .45; margin: 0 0 4px;
}
.notfound-actions { display: flex; justify-content: center; margin-top: 6px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; color: var(--text-faint); margin-bottom: 6px; font-weight: 600; }
.field input, .field select {
  width: 100%; padding: 13px 14px; border-radius: var(--radius-md);
  background: var(--input-bg); border: 1px solid var(--border); color: var(--surface-text);
  font-family: inherit; font-size: 16px;
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.input-with-action { position: relative; }
.input-with-action input { padding-right: 44px; }
.input-action-btn {
  position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  background: none; border: none; color: var(--text-faint); cursor: pointer;
}
.input-action-btn:hover { color: var(--text-dim); background: var(--surface-2); }
.input-action-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* ===== Kendi Testini Hazırla ===== */
.custom-test-row { border-left: 3px solid color-mix(in srgb, var(--accent) 65%, transparent); }
.custom-test-row + .custom-test-row { margin-top: 0; }
.custom-test-fields { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.5fr) minmax(110px, .55fr); gap: 12px; align-items: start; }
.custom-test-fields .field { margin-bottom: 0; }
.custom-test-fields select,
.custom-test-fields input { min-width: 0; }
.custom-test-summary.has-error { border-color: color-mix(in srgb, var(--bad) 45%, var(--border)); }
.custom-test-summary.is-ready { border-color: color-mix(in srgb, var(--good) 55%, var(--border)); }
.custom-test-total { display: grid; place-items: center; flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); font-weight: 800; font-size: 17px; }
.error-text { color: var(--bad); }
@media (min-width: 960px) {
  .custom-test-builder-screen {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    align-content: start;
    gap: 20px;
    max-width: 1040px;
  }
  .custom-test-builder-screen > .section--full { grid-column: 1 / -1; }
  .custom-test-builder-main,
  .custom-test-builder-aside { margin-top: 0 !important; min-width: 0; }
  .custom-test-builder-aside { align-self: start; }
}
@media (min-width: 1200px) {
  .custom-test-builder-screen {
    grid-template-columns: minmax(0, 1fr) 340px;
    column-gap: 24px;
    row-gap: 20px;
  }
  .custom-test-builder-main { grid-column: 1; }
  .custom-test-builder-aside {
    grid-column: 2;
    position: sticky;
    top: 24px;
  }
}
@media (max-width: 720px) {
  .custom-test-fields { grid-template-columns: 1fr; gap: 2px; }
  .custom-test-fields .field { margin-bottom: 12px; }
}

/* ===== Masaüstü kart ritmi =====
   Mobil akış değişmez. Geniş ekranda kartlar sabit iki sütunda aynı satır yüksekliğini
   paylaşır; içerik uzunluğu değişse bile ana eylemler aynı taban çizgisinde kalır. */
@media (min-width: 960px) {
  /* Masaüstünde genel eylemler daha sakin ve kompakt; mobilde 48px dokunma hedefi korunur. */
  .btn { min-height: 42px; padding: 10px 15px; font-size: 14px; }
  .btn-sm { min-height: 36px; padding: 8px 12px; font-size: 12.5px; }

  .practice-card,
  .mastery-subject-card { height: 100%; display: flex; flex-direction: column; }
  .mastery-subject-card > .btn:last-child { margin-top: auto !important; }
  .practice-card-action { display: flex; margin-top: auto !important; padding-top: 16px; }
  .practice-card-action > .btn { width: auto; min-width: 190px; }
  .mastery-overview-section > .card,
  .mastery-shortcut-section > .mastery-shortcut-card { height: 100%; }
  .mastery-shortcut-card { align-items: center; padding: 20px; }
}
.auth-error { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); border-radius: var(--radius-md); padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }
.dot-steps { display: flex; gap: 6px; justify-content: center; margin: 18px 0; }
.dot-steps span { width: 7px; height: 7px; border-radius: 50%; background: var(--surface-3); }

.link-btn { background: none; border: none; color: var(--accent); font-size: 12.5px; font-weight: 700; padding: 0; cursor: pointer; font-family: inherit; text-decoration: underline; }
.auth-toggle-row { text-align: center; margin: 16px 0 0; font-size: 14px; color: var(--text-faint); }
.auth-toggle-row .link-btn { font-size: 14px; margin-left: 2px; }

/* ===== Onay kutucukları (KVKK / Gizlilik / Kullanım Koşulları) ===== */
.consent-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.consent-row:last-child { border-bottom: none; }
.consent-row input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px;
  display: grid; place-content: center;
  border: 1.5px solid var(--border); border-radius: 6px;
  background: var(--surface); cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.consent-row input[type="checkbox"]:hover { border-color: var(--text-faint); }
.consent-row input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.consent-row input[type="checkbox"]:checked::after {
  content: ''; width: 5px; height: 9px;
  border: solid var(--accent-text); border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}
.consent-row input[type="checkbox"]:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.consent-row label { font-size: 13.5px; line-height: 1.5; color: var(--text-dim); cursor: pointer; }
.consent-row .link-btn { background: none; border: none; color: var(--accent); font-size: 12.5px; font-weight: 700; padding: 0; margin-top: 4px; cursor: pointer; font-family: inherit; text-decoration: underline; }
.field-error { color: var(--bad); font-size: 12px; margin-top: -10px; margin-bottom: 12px; }
.field textarea {
  width: 100%; padding: 13px 14px; border-radius: var(--radius-md);
  background: var(--input-bg); border: 1px solid var(--border); color: var(--surface-text);
  font-size: 14.5px; font-family: inherit; line-height: 1.5; resize: vertical; min-height: 80px;
}

/* ===== Sekmeler (Soru Ekle — Eğitmen/Admin, Admin Paneli) ===== */
.tabs { display: flex; gap: 6px; flex-wrap: nowrap; border-bottom: 1px solid var(--border); margin-bottom: 16px; padding-bottom: 0; }
.tab-btn {
  background: none; border: none; border-bottom: 2px solid transparent; color: var(--text-faint);
  font-size: 13px; font-weight: 700; font-family: inherit; padding: 10px 4px; cursor: pointer; white-space: nowrap;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--surface-3); color: var(--text-dim); font-size: 10px; font-weight: 800; }
.tab-btn.active .tab-badge { background: var(--accent); color: var(--accent-text); }

/* ===== Rol rozetleri (bkz. ROLE_SYSTEM.md) ===== */
.role-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: var(--radius-pill); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.role-badge-admin { background: color-mix(in srgb, var(--bad) 16%, var(--surface)); color: var(--bad); }
.role-badge-instructor { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent); }
.role-badge-vip { background: color-mix(in srgb, var(--warn) 16%, var(--surface)); color: var(--warn); }
.role-badge-user { background: var(--surface-3); color: var(--text-dim); }

.trend-up { color: var(--ok); }
.trend-down { color: var(--bad); }
.trend-flat { color: var(--text-faint); }

/* ===== Kocchum kelime markası (wordmark) ===== */
.wordmark {
  display: inline-grid; align-items: center; line-height: 0; flex: 0 0 auto;
}
.wordmark-image { grid-area: 1 / 1; display: block; width: 100%; height: auto; }
.wordmark-image-dark { display: none; }
.wordmark-sm { width: 145px; }
.wordmark-md { width: 190px; }
.wordmark-lg { width: min(260px, 82vw); }

:root:is([data-theme="dark"], [data-theme$="-dark"]) .wordmark-image-light { display: none; }
:root:is([data-theme="dark"], [data-theme$="-dark"]) .wordmark-image-dark { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .wordmark-image-light { display: none; }
  :root:not([data-theme]) .wordmark-image-dark { display: block; }
}

/* ===== Yönetim (Admin) kabuğu — sorumluluğu js/components/ui.js -> adminShell() ===== */
/* Mobil (<768px): yalnızca logo + hamburger görünür; gezinme bağlantıları ("Ayarlar",
   "Çıkış Yap" dahil) bir açılır çekmecede (drawer), HER ZAMAN ayrı, çakışmayan satırlar
   halinde listelenir. Tablet (768-959px): yatay, kaydırılabilir üst çubuk (öğeler
   ASLA sıkışıp üst üste binmez — flex-shrink:0 + nowrap + overflow-x:auto ile kayar).
   Masaüstü (>=960px): sabit, tam yükseklik sol kenar çubuğu + geniş içerik alanı. */
.admin-shell { display: flex; flex-direction: column; min-height: 100vh; width: 100%; }
.admin-sidebar {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--surface); border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
  position: sticky; top: 0; z-index: 20;
}
.admin-sidebar::-webkit-scrollbar { display: none; }
.admin-brand { flex: 0 0 auto; padding: 6px 10px 6px 2px; }
.admin-nav { display: flex; gap: 4px; flex: 1; min-width: 0; }
.admin-sidebar-footer { flex: 0 0 auto; display: flex; }
.admin-nav-item {
  display: flex; align-items: center; gap: 7px; white-space: nowrap; flex: 0 0 auto;
  padding: 9px 13px; border-radius: var(--radius-pill); border: 1px solid transparent;
  background: none; color: var(--text-dim); font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; min-height: 44px;
}
.admin-nav-item:hover { background: var(--surface-2); color: var(--text); }
.admin-nav-item.active { background: var(--accent); color: var(--accent-text); }
.admin-logout-btn { color: var(--bad); }
.admin-logout-btn:hover { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--bad); }
.admin-main { flex: 1; min-width: 0; display: flex; justify-content: center; }
.admin-screen.screen { padding-bottom: 32px; max-width: 720px; width: 100%; }

/* Hamburger tetikleyici — yalnızca <768px'te görünür (bkz. aşağıdaki @media (max-width:767px)). */
.admin-menu-btn { display: none; }

@media (max-width: 767px) {
  .admin-sidebar { justify-content: space-between; overflow-x: visible; }
  .admin-brand { padding: 6px 4px; }
  .admin-menu-btn {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; flex: 0 0 auto; border-radius: var(--radius-pill);
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
    cursor: pointer;
  }
  /* Mobilde gezinme + çıkış, sidebar'ın kendisinde DEĞİL, ayrı bir çekmecede gösterilir. */
  .admin-nav, .admin-sidebar-footer { display: none; }
  .admin-drawer-overlay {
    position: fixed; inset: 0; background: var(--overlay); z-index: 85;
    display: flex; justify-content: flex-end;
  }
  .admin-drawer-overlay[hidden] { display: none; }
  .admin-drawer {
    width: min(84vw, 320px); height: 100%; background: var(--surface);
    border-left: 1px solid var(--border); padding: 16px 14px calc(16px + env(safe-area-inset-bottom));
    display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
    animation: drawerIn .18s ease;
  }
  @keyframes drawerIn { from { transform: translateX(12px); opacity: .6; } to { transform: none; opacity: 1; } }
  @media (prefers-reduced-motion: reduce) { .admin-drawer { animation: none; } }
  .admin-drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
  .admin-drawer .admin-nav-item {
    width: 100%; justify-content: flex-start; min-height: 48px;
  }
  .admin-drawer .admin-sidebar-footer {
    display: flex; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--border);
  }
}

@media (min-width: 768px) and (max-width: 959px) {
  .admin-nav-item span { font-size: 12.5px; }
}

@media (min-width: 960px) {
  .admin-shell { flex-direction: row; }
  .admin-sidebar {
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    width: 240px; flex: 0 0 240px; height: 100vh; position: sticky; top: 0;
    border-bottom: none; border-right: 1px solid var(--border);
    padding: 20px 14px; overflow-x: visible; overflow-y: auto;
  }
  .admin-brand { padding: 4px 10px 22px; }
  .admin-nav { flex-direction: column; gap: 2px; }
  .admin-nav-item { justify-content: flex-start; width: 100%; }
  .admin-sidebar-footer { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
  .admin-main { padding: 8px 24px; }
  .admin-screen.screen { max-width: 880px; padding-top: 8px; }
}
@media (min-width: 1280px) {
  .admin-screen.screen { max-width: 1080px; }
}

/* ===== Admin içerik grid'i (Kullanıcı Listesi / Soru İnceleme) =====
   Kullanıcı kartları artık masaüstünde tek dar sütuna sıkışmak yerine mevcut genişliği
   kullanır; uzun kullanıcı adı/e-posta zaten .dim.small üzerindeki ellipsis ile taşmadan
   kesilir (bkz. js/screens/adminPanel.js -> usersSection, title attribute eklenmiştir). */
.admin-card-grid {
  display: grid; grid-template-columns: 1fr; gap: 12px;
}
@media (min-width: 640px) {
  .admin-card-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}
.admin-card-grid > .card { margin-top: 0; min-width: 0; }

/* Genel amaçlı kart grid'i (Akıllı Puan ders kartları, Sınavlar geçmiş listesi vb.) —
   admin-card-grid ile aynı davranış, admin dışı ekranlarda kullanılmak üzere genel adla. */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: stretch; }
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}
.card-grid > .card { margin-top: 0; min-width: 0; height: 100%; }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; background: var(--overlay); z-index: 80;
  display: flex; align-items: flex-end; justify-content: center; padding: 0;
  animation: toastIn .15s ease;
}
.modal-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%; max-width: 480px; max-height: 82vh; overflow-y: auto; padding: 20px 20px 24px;
  box-shadow: var(--shadow-md);
}
@media (min-width: 560px) {
  .modal-overlay { align-items: center; }
  .modal-card { border-radius: var(--radius-lg); max-height: 78vh; }
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-header h3 { font-size: 16px; margin: 0; font-weight: 700; }
.modal-body { font-family: var(--font-serif); font-size: 14.5px; line-height: 1.65; color: var(--text-dim); white-space: pre-wrap; }
.dot-steps span.active { background: var(--accent); width: 20px; border-radius: 4px; }

/* ===== Yıkıcı işlem onay diyaloğu (bkz. js/components/ui.js -> openConfirmDialog) ===== */
.confirm-overlay { align-items: center; padding: 16px; }
.confirm-card {
  border-radius: var(--radius-lg); max-height: 90vh; text-align: left;
  max-width: 420px; padding: 24px 22px 20px;
}
.confirm-icon {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.confirm-icon-danger { background: color-mix(in srgb, var(--bad) 16%, var(--surface)); color: var(--bad); }
.confirm-title { font-size: 17px; margin: 0 0 8px; font-weight: 700; }
.confirm-message { font-size: 14px; line-height: 1.55; color: var(--text-dim); margin: 0 0 4px; }
.confirm-details { margin-top: 12px; padding: 11px 13px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: 13.5px; line-height: 1.5; }
.confirm-target strong { color: var(--text); }
.confirm-error { margin-top: 12px; padding: 9px 12px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--bad) 12%, var(--surface)); color: var(--bad); font-size: 12.5px; }
.confirm-error[hidden] { display: none; }
.confirm-actions { display: flex; gap: 10px; margin-top: 18px; }
.confirm-actions .btn { width: auto; flex: 1; }
@media (max-width: 420px) {
  .confirm-actions { flex-direction: column-reverse; }
}
.btn-spinner {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4); border-top-color: currentColor;
  animation: spin .7s linear infinite; vertical-align: -2px;
}
@media (prefers-reduced-motion: reduce) {
  .btn-spinner { animation-duration: .001ms !important; }
}

/* ===== Metin+ikon tehlikeli eylem düğmesi (ör. "Hesabı Sil" — normal eylemlerin yanında
   görsel olarak baskın olmaması gerekir, bkz. Kocchum fazı Faz 2 UI gereksinimleri) ===== */
.btn-text-danger {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  width: 100%; background: none; border: 1px solid transparent; border-radius: var(--radius-sm);
  color: var(--bad); font-family: inherit; font-size: 12.5px; font-weight: 700;
  padding: 9px 10px; cursor: pointer; min-height: 40px;
}
.btn-text-danger:hover { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); }

/* ===== Empty / error / loading states ===== */
.state-block { text-align: center; padding: 44px 20px; color: var(--text-faint); }
.state-block .state-icon {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--surface-2); display: flex; align-items: center; justify-content: center;
  color: var(--text-faint);
}
.state-block .illustration { margin: 0 auto 10px; display: block; }
.state-block h3 { color: var(--text); font-size: 16px; margin: 0 0 6px; font-weight: 700; }
.state-block p { font-size: 13.5px; margin: 0 auto 16px; line-height: 1.55; max-width: 320px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--accent); animation: spin .7s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .skeleton, .spinner { animation-duration: .001ms !important; }
}

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  background: var(--surface-3); color: var(--text); padding: 11px 18px;
  border-radius: var(--radius-pill); font-size: 13.5px; box-shadow: var(--shadow-md);
  z-index: 60; border: 1px solid var(--border);
  animation: toastIn .2s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px);} to { opacity:1; transform: translate(-50%,0);} }

/* ===== Utility ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; }
.between { justify-content: space-between; }
.center { align-items: center; }
.muted { color: var(--text-faint); }
.dim { color: var(--text-dim); }
.small { font-size: 12.5px; }
.mt-0 { margin-top: 0; } .mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.scroll-x { overflow-x: auto; }
.tag-list { display: flex; gap: 6px; flex-wrap: wrap; }
.list-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 4px; border-bottom: 1px solid var(--border); cursor: pointer;
}
.list-row:last-child { border-bottom: none; }
.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.switch-row:last-child { border-bottom: none; }
.switch { width: 44px; height: 26px; border-radius: 999px; background: var(--surface-3); position: relative; cursor: pointer; flex: 0 0 44px; border: none; }
.switch::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: var(--paper-0); top: 3px; left: 3px; transition: transform .15s ease; }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(18px); }
@media (prefers-reduced-motion: reduce) {
  .switch::after { transition: none; }
}

/* ===== "Sistem Ayarını Kullan" alt seçici — vurgu ailesi rozetleri (bkz. js/screens/
   settings.js -> accentFamilyPickerHtml) ===== Tema açılır listesi yeniden yazılırken (bkz.
   görev talimatı önceki turu) bu iki sınıf YANLIŞLIKLA silinmişti — accentFamilyPickerHtml()
   hâlâ bunları üretiyordu, bu yüzden `.accent-swatch-btn` HİÇBİR position değeri almadan
   render ediliyordu. Sonuç: aktif aile rozetinin içindeki onay işareti
   (`position:absolute; inset:0` satır-içi stili — bkz. settings.js) kendi düğmesini (artık
   pozisyonlanmamış) DEĞİL, bir sonraki gerçekten konumlandırılmış atadaki `.app-shell`'i
   (`position:relative`, tam sayfa yüksekliğinde) konumlandırma bağlamı olarak kullanıyor ve
   TÜM UYGULAMAYI KAPLAYAN görünmez bir katman oluşturuyordu — tema açılır listesinin
   tetikleyicisi dahil her tıklamayı yutuyordu (bkz. görev talimatı "does not open"
   hatasının kök nedeni). Düzeltme: `.accent-swatch-btn`'e `position: relative` GERİ verilir,
   böylece onay işareti yalnızca kendi 44×44 düğmesini kaplar. */
.accent-swatch-list { display: flex; gap: 8px; flex-wrap: wrap; }
.accent-swatch-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--border);
  cursor: pointer; padding: 0; position: relative; flex: 0 0 auto;
}

/* ===== Tema seçici — özel açılır liste (bkz. js/components/themeDropdown.js, görev talimatı
   "Visual theme dropdown") ===== Kapalıyken aktif temanın adını + küçük bir renk önizlemesini +
   açık bir açılır ok göstergesini gösteren TEK bir düğme (asla düz metin/basit <select> değil).
   Açıldığında her seçenek KENDİ renklerini (zemin önizlemesi + 3-5 ton örneği) gösterir. Tamamen
   aktif temanın token'larını (var(--surface)/var(--border)/var(--accent) vb.) kullandığından
   kendisi de her zaman aktif temayı takip eder (bkz. görev talimatı "the dropdown itself
   follows the active theme"). */
.theme-select { position: relative; width: 100%; }
.theme-select-trigger {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: var(--radius-md); border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; font-family: inherit;
  min-height: 56px; text-align: left;
}
.theme-select-trigger:hover { border-color: var(--text-faint); }
.theme-select-trigger:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.theme-select-trigger[aria-expanded="true"] { border-color: var(--accent); }
.theme-select-swatch-group {
  display: flex; flex: 0 0 auto; border-radius: 8px; overflow: hidden;
  width: 46px; height: 34px; border: 1px solid var(--border);
}
.theme-select-swatch-group span { flex: 1; }
.theme-select-trigger-label { flex: 1; min-width: 0; }
.theme-select-trigger-name { font-size: 14px; font-weight: 700; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-select-trigger-sub { font-size: 11.5px; color: var(--text-faint); display: block; margin-top: 1px; }
.theme-select-chevron { flex: 0 0 auto; color: var(--text-faint); transition: transform var(--motion-base) var(--ease-standard); }
.theme-select-trigger[aria-expanded="true"] .theme-select-chevron { transform: rotate(180deg); }

.theme-select-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); padding: 6px; max-height: 360px; overflow-y: auto;
  transform-origin: top center;
  animation: themeMenuIn var(--motion-base) var(--ease-standard);
}
@keyframes themeMenuIn { from { opacity: 0; transform: scaleY(.94) translateY(-4px); } to { opacity: 1; transform: none; } }
.theme-select-group-label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-faint); padding: 8px 10px 4px;
}
.theme-select-option {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: var(--radius-sm); border: none; cursor: pointer;
  background: transparent; color: var(--text); font-family: inherit; text-align: left;
}
.theme-select-option:hover, .theme-select-option.is-focused { background: var(--surface-2); }
.theme-select-option:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.theme-select-option[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.theme-select-option-preview {
  flex: 0 0 auto; width: 54px; height: 38px; border-radius: 8px; border: 1px solid var(--border);
  display: flex; align-items: stretch; overflow: hidden;
}
.theme-select-option-preview span { flex: 1; }
.theme-select-option-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-select-option-check { flex: 0 0 auto; color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .theme-select-chevron, .theme-select-menu { transition: none; animation: none; }
}
@media (max-width: 420px) {
  .theme-select-trigger-sub { display: none; }
}

/* ===== "Özel Renkler" editörü (bkz. görev talimatı "Custom Colors option") ===== */
.custom-theme-editor { max-width: 460px; }
.custom-theme-preview {
  border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden;
  margin-bottom: 16px;
}
.custom-theme-preview-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; font-size: 12px; font-weight: 700;
}
.custom-theme-preview-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.custom-theme-preview-card { padding: 12px; border-radius: var(--radius-sm); font-size: 12.5px; }
.custom-theme-preview-btns { display: flex; gap: 8px; }
.custom-theme-preview-btns span {
  flex: 1; padding: 8px 6px; border-radius: 8px; text-align: center;
  font-size: 11.5px; font-weight: 700;
}
.custom-theme-field { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.custom-theme-field:last-child { border-bottom: none; }
.custom-theme-field-info { flex: 1; min-width: 0; }
.custom-theme-field-label { font-size: 13px; font-weight: 700; display: block; }
.custom-theme-field-hint { font-size: 11.5px; color: var(--text-faint); display: block; margin-top: 2px; }
.custom-theme-field-controls { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.custom-theme-field-controls input[type="color"] {
  width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--border);
  padding: 2px; cursor: pointer; background: var(--surface);
}
.custom-theme-field-controls input[type="text"] {
  width: 92px; padding: 8px 9px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--input-bg); color: var(--surface-text); font-size: 12.5px; font-family: inherit;
}
.custom-theme-field-controls input[type="text"].is-invalid { border-color: var(--bad); }
.custom-theme-warn {
  margin-top: 10px; padding: 9px 12px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--warn) 14%, var(--surface)); color: var(--warn); font-size: 12.5px;
  display: flex; align-items: flex-start; gap: 8px;
}
.custom-theme-actions { display: flex; gap: 8px; margin-top: 16px; }
.custom-theme-actions .btn { width: auto; flex: 1; }

/* explanation content — okuma odaklı, serif */
.explain-block { margin-bottom: 14px; }
.explain-block h4 { font-family: var(--font-sans); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); margin: 0 0 6px; font-weight: 700; }
.explain-block p { font-family: var(--font-serif); font-size: 15px; line-height: 1.65; margin: 0; color: var(--text-dim); }
.wrong-opt-explain { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 6px; font-family: var(--font-serif); font-size: 14px; line-height: 1.55; }

/* SVG chart helpers */
.chart-wrap { width: 100%; max-width: 100%; min-width: 0; overflow: visible; }
.chart-wrap svg { width: 100%; max-width: 100%; height: auto; display: block; overflow: visible; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 11.5px; }
.legend-item { display: flex; align-items: center; gap: 5px; color: var(--text-dim); }

/* Türkiye harita görselleri */
.tr-map-chart { max-width: 340px; width: 100%; margin: 0 auto; min-width: 0; }
.tr-map { width: 100%; max-width: 100%; height: auto; display: block; overflow: visible; }
.tr-map-wrap { text-align: center; max-width: 100%; }
.map-caption { margin-top: 8px; font-size: 12.5px; font-weight: 700; color: var(--text); display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; text-align: center; }
.map-caption-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.map-footnote { margin-top: 4px; font-size: 11px; color: var(--text-faint); }

/* print root hidden on screen */
.print-root { display: none; }
@media print {
  body * { visibility: hidden; }
  .print-root, .print-root * { visibility: visible; }
  .print-root { display: block; position: absolute; left: 0; top: 0; width: 100%; }
  .app-shell, .bottom-nav, .toast { display: none !important; }
}

/* ===== Printable exam documents ===== */
/* Görsel sorular (chart/geometry/map/vb.) var(--text) gibi tema değişkenlerini kullanır.
   Yazdırma her zaman okunaklı olsun diye bu değişkenler .pdf-doc kapsamında açık/koyu
   temadan bağımsız, kağıda uygun sabit değerlerle geçersiz kılınır. */
.pdf-doc {
  --text: #14161c; --text-dim: #454b5c; --text-faint: #7b8296;
  --surface: #ffffff; --surface-2: #f5f6f9; --surface-3: #e3e6ee;
  --border: #cfd3dd; --accent: #334e68; --accent-text: #ffffff;
  font-family: Georgia, "Times New Roman", serif; color: #111; background: #fff;
}
.pdf-visual { margin: 6px 0 10px; max-width: 100%; overflow: visible; }
.pdf-visual .chart-wrap svg, .pdf-visual .tr-map { width: 100%; max-width: 340px; height: auto; display: block; margin: 0 auto; overflow: visible; }
.pdf-visual table { font-family: Arial, sans-serif; font-size: 11.5px; }
.pdf-visual .legend { font-family: Arial, sans-serif; justify-content: center; }
.pdf-page { padding: 26px 30px; page-break-after: always; position: relative; min-height: 90vh; }
.pdf-page:last-child { page-break-after: auto; }
.pdf-cover { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 90vh; text-align: center; }
.pdf-cover .pdf-badge { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #555; margin-bottom: 14px; }
.pdf-cover h1 { font-size: 26px; margin: 0 0 10px; font-family: Arial, sans-serif; }
.pdf-cover .pdf-sub { font-size: 14px; color: #444; margin-bottom: 26px; }
.pdf-cover-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 40px; text-align: left; font-family: Arial, sans-serif; font-size: 12.5px; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; padding: 16px 0; margin-bottom: 20px; width: 100%; max-width: 420px; }
.pdf-cover-meta .k { color: #666; }
.pdf-cover-meta .v { font-weight: 700; }
.pdf-dist-table { width: 100%; max-width: 420px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 12px; }
.pdf-dist-table th, .pdf-dist-table td { border: 1px solid #ccc; padding: 6px 10px; text-align: left; }
.pdf-header { display: flex; justify-content: space-between; font-family: Arial, sans-serif; font-size: 10.5px; color: #666; border-bottom: 1px solid #999; padding-bottom: 6px; margin-bottom: 16px; }
.pdf-q { margin-bottom: 16px; break-inside: avoid; }
.pdf-q .pdf-q-num { font-weight: 700; font-family: Arial, sans-serif; font-size: 13px; margin-bottom: 4px; }
.pdf-q .pdf-q-text { font-size: 13.5px; line-height: 1.55; margin-bottom: 8px; white-space: pre-wrap; }
.pdf-q .pdf-passage { font-size: 12.5px; background: #f3f3f3; padding: 8px 10px; margin-bottom: 8px; white-space: pre-wrap; }
.pdf-opts { font-family: Arial, sans-serif; font-size: 12.5px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
.pdf-opts .pdf-opt.pdf-correct { font-weight: 700; color: #0a6b3e; }
.pdf-footer-page { position: absolute; bottom: 14px; right: 30px; font-family: Arial, sans-serif; font-size: 10px; color: #888; }
.pdf-answer-grid { font-family: Arial, sans-serif; }
.pdf-answer-row { display: grid; grid-template-columns: 28px repeat(5, 1fr); gap: 4px; align-items: center; font-size: 11.5px; padding: 3px 0; border-bottom: 1px solid #eee; }
.pdf-bubble { width: 16px; height: 16px; border: 1px solid #333; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; margin: 0 2px; }
.pdf-bubble.filled { background: #111; color: #fff; }
.pdf-explain { font-size: 12px; line-height: 1.5; font-family: Arial, sans-serif; color: #333; }
.pdf-explain h5 { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #555; margin: 8px 0 3px; }
.pdf-section-title { font-family: Arial, sans-serif; font-weight: 700; font-size: 15px; margin: 0 0 14px; }
.pdf-mini-table { width: 100%; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 11.5px; margin-bottom: 14px; }
.pdf-mini-table th, .pdf-mini-table td { border: 1px solid #ccc; padding: 5px 8px; text-align: left; }

/* ===== Giriş/Kayıt ekranı: kompakt kimlik doğrulama kartı + animasyonlu ışık orbları =====
   Yalnızca js/screens/auth.js (giriş VE kayıt aynı ekran/kabuk) kullanır. completeProfile.js
   ve onboarding.js kasıtlı olarak .onboard-wrap'i (eski, tam genişlik) kullanmaya devam eder —
   bu arka plan yalnızca giriş/kimlik doğrulama sunumuna aittir (bkz. görev talimatı "Scope
   requirement"). .auth-shell, viewport'u dolduran, orbları konumlandırmak için relative/
   overflow:hidden bir çerçevedir; .auth-card ise gerçek form içeriğini taşıyan, sınırlı
   genişlikte ortalanmış karttır. */
.auth-shell {
  min-height: 100vh; min-height: 100dvh; width: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 18px;
  position: relative; overflow-x: hidden; overflow-y: auto;
  background: var(--bg);
}
.auth-card {
  position: relative; z-index: 1;
  width: 100%; margin: auto;
  /* Görev talimatı: hedef genişlik ~440–480px, kesin üst sınır 520px. 480px her iki
     koşulu da sağlar (480 < 520); ekstra bir üst sınır kuralına gerek yoktur. */
  max-width: 480px;
  display: flex; flex-direction: column;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 30px 26px 26px;
  /* Kısıtlı/hafif bir cam görünümü — aşırı bulanıklıktan kaçınılır (görev talimatı). */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.auth-card .onboard-hero { margin-bottom: 22px; }
.auth-card .field:last-of-type { margin-bottom: 18px; }
/* Hata mesajı kart genişliğini asla bozmaz — .auth-error zaten width:auto+wrap davranışında
   (bkz. yukarıdaki .auth-error tanımı); burada yalnızca satır kırılmasını garanti ediyoruz. */
.auth-card .auth-error { overflow-wrap: break-word; word-break: break-word; }

@media (max-width: 480px) {
  /* Mobilde kart tam genişliği kullanır, yalnızca 16–20px yatay boşluk bırakılır (görev
     talimatı "Responsive requirements") — .auth-shell'in kendi padding'i (18px) zaten bu
     aralıktadır, kart üzerinde ayrıca max-width sınırı görsel olarak devre dışı kalır. */
  .auth-card { padding: 26px 20px 22px; border-radius: var(--radius-lg); }
}

/* ---- Animasyonlu ışık orbları (tam olarak dört adet) ----
   Pahalı `filter: blur()` yerine kenarları zaten yumuşak biten bir radial-gradient
   kullanılır (GPU/CPU dostu) ve yalnızca transform/opacity animasyonlanır.
   `.auth-orb` (dış sarmalayıcı) yalnızca STATİK konumlandırma taşır (top/left/right/bottom +
   boyut) — kendi transform'u YOKTUR. `.auth-orb-glow` (iç eleman) ise gradyanı ve tüm
   animasyonu taşır; böylece statik konumlandırma ile animasyonlu transform hiçbir zaman aynı
   elementte çakışmaz (bkz. görev talimatı "separate them"). Dış sarmalayıcıda overflow
   kısıtlaması YOKTUR — hareket yalnızca .auth-shell'in (viewport boyutunda) overflow:hidden
   sınırıyla kesilir, orbların kendi kutusuyla değil. Her orb farklı boyut/başlangıç
   konumu/yörünge/süre/gecikmeye sahiptir ve senkron değildir. pointer-events:none +
   aria-hidden ile tamamen dekoratiftirler. */
.auth-orb {
  position: absolute;
  pointer-events: none;
}
.auth-orb-1 { width: 460px; height: 460px; top: -140px; left: -120px; }
.auth-orb-2 { width: 380px; height: 380px; top: 30%; right: -160px; }
.auth-orb-3 { width: 340px; height: 340px; bottom: -160px; left: 8%; }
.auth-orb-4 { width: 300px; height: 300px; bottom: -90px; right: 6%; }

.auth-orb-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  /* Statik dinlenme opaklığı — animasyon çalışırken keyframe'lerdeki opacity değerleri bunun
     yerine geçer; yalnızca prefers-reduced-motion altında (animation:none) devreye giren bir
     düşüş/geri dönüş değeridir, aksi halde tarayıcı varsayılanı olan tam opak (1) görünmesini
     engeller. */
  opacity: .5;
  will-change: transform, opacity;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
/* Orb 1: sola-sağa çapraz + hafif dikey sürüklenme. */
.auth-orb-1 .auth-orb-glow {
  background: radial-gradient(circle, color-mix(in srgb, var(--logo-accent) 55%, transparent) 0%, transparent 72%);
  animation-name: authOrbFloat1;
  animation-duration: 18s;
  animation-delay: -3s;
}
/* Orb 2: Orb 1'in TERSİ yönde çapraz hareket. */
.auth-orb-2 .auth-orb-glow {
  background: radial-gradient(circle, color-mix(in srgb, var(--info) 50%, transparent) 0%, transparent 72%);
  animation-name: authOrbFloat2;
  animation-duration: 22s;
  animation-delay: -9s;
}
/* Orb 3: yavaş, eğrisel/eliptik hissi veren bir yörünge (4 ara durakla). */
.auth-orb-3 .auth-orb-glow {
  background: radial-gradient(circle, color-mix(in srgb, var(--subj-current) 50%, transparent) 0%, transparent 72%);
  animation-name: authOrbFloat3;
  animation-duration: 27s;
  animation-delay: -14s;
}
/* Orb 4: baskın dikey sürüklenme + ikincil yatay hareket. */
.auth-orb-4 .auth-orb-glow {
  background: radial-gradient(circle, color-mix(in srgb, var(--sage) 50%, transparent) 0%, transparent 72%);
  animation-name: authOrbFloat4;
  animation-duration: 14s;
  animation-delay: -5s;
}
/* Mesafeler: ~90–180px yatay, ~60–140px dikey, ölçek ~0.9–1.12, hafif opaklık dalgalanması
   (asla tamamen kaybolmaz) — görev talimatındaki "noticeable but restrained" aralığı. Tek bir
   gidiş-dönüş yerine ara duraklarla (özellikle Orb 3'te) sert yön değişimi/sekme hissi
   önlenir; `ease-in-out` her bacakta yavaş başlayıp yavaş biter. */
@keyframes authOrbFloat1 {
  0%   { transform: translate(0, 0) scale(1); opacity: .5; }
  50%  { transform: translate(150px, 75px) scale(1.08); opacity: .58; }
  100% { transform: translate(0, 0) scale(1); opacity: .5; }
}
@keyframes authOrbFloat2 {
  0%   { transform: translate(0, 0) scale(1); opacity: .5; }
  50%  { transform: translate(-135px, -70px) scale(.92); opacity: .44; }
  100% { transform: translate(0, 0) scale(1); opacity: .5; }
}
@keyframes authOrbFloat3 {
  0%   { transform: translate(0, 0) scale(1); opacity: .5; }
  25%  { transform: translate(95px, -65px) scale(1.05); opacity: .58; }
  50%  { transform: translate(165px, 45px) scale(1.12); opacity: .48; }
  75%  { transform: translate(55px, 115px) scale(.96); opacity: .56; }
  100% { transform: translate(0, 0) scale(1); opacity: .5; }
}
@keyframes authOrbFloat4 {
  0%   { transform: translate(0, 0) scale(1); opacity: .5; }
  50%  { transform: translate(-95px, -130px) scale(1.06); opacity: .6; }
  100% { transform: translate(0, 0) scale(1); opacity: .5; }
}
/* Yalnızca gerçekten "azaltılmış hareket" isteyen kullanıcılar (OS tercihi) statik orb alır —
   bu medya sorgusu YALNIZCA prefers-reduced-motion:reduce EŞLEŞTİĞİNDE devreye girer,
   varsayılan olarak KESİNLİKLE uygulanmaz. */
@media (prefers-reduced-motion: reduce) {
  .auth-orb-glow { animation: none; }
}

/* ===== Giriş/Kayıt ekranı: landing ile aynı editoryal, iki parçalı düzen ===== */
.auth-shell {
  --auth-gold: #d7a84d;
  --auth-gold-strong: #b9852f;
  --auth-night: #0e171f;
  --auth-night-2: #14232d;
  --auth-line: rgba(247, 243, 232, .16);
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(500px, 1fr) minmax(520px, 1fr);
  padding: 0;
  overflow: visible;
  background: var(--auth-page);
  color: var(--text);
  transition: background-color var(--motion-slow) var(--ease-standard), color var(--motion-slow) var(--ease-standard);
}
.auth-shell[data-auth-theme="light"] {
  --auth-page: #fffdfa;
  --auth-input: #ffffff;
  --auth-input-hover: #fbf8f1;
  --bg: #f4f2ea;
  --surface: #fffdfa;
  --surface-2: #f4f2ea;
  --surface-3: #e8e3d7;
  --input-bg: var(--auth-input);
  --border: #d7d2c7;
  --text: #17232d;
  --text-dim: #4c5a62;
  --text-faint: #6c777c;
  --accent: #385e52;
  --accent-hover: #284b41;
  --accent-active: #1e3d35;
  --accent-text: #ffffff;
  --focus-ring: #385e52;
  --btn-primary-bg: #385e52;
  --btn-primary-hover: #284b41;
  --btn-primary-active: #1e3d35;
  --btn-primary-text: #ffffff;
  --bad: #a84949;
  color-scheme: light;
}
.auth-shell[data-auth-theme="dark"] {
  --auth-page: #111a22;
  --auth-input: #18252f;
  --auth-input-hover: #1d2b36;
  --bg: #111820;
  --surface: #18222d;
  --surface-2: #202c38;
  --surface-3: #283645;
  --input-bg: var(--auth-input);
  --border: #344453;
  --text: #f7f3e8;
  --text-dim: #d0d6d8;
  --text-faint: #aeb8bc;
  --accent: #d7a84d;
  --accent-hover: #e4bb6a;
  --accent-active: #edc97e;
  --accent-text: #111820;
  --focus-ring: #e4bb6a;
  --btn-primary-bg: #d7a84d;
  --btn-primary-hover: #e4bb6a;
  --btn-primary-active: #edc97e;
  --btn-primary-text: #111820;
  --bad: #e08a8a;
  color-scheme: dark;
}
.auth-form-pane {
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: grid;
  place-items: center;
  padding: 118px clamp(44px, 7vw, 112px) 72px;
  background: var(--auth-page);
}
.auth-topbar {
  position: absolute;
  z-index: 3;
  top: max(28px, env(safe-area-inset-top));
  left: clamp(32px, 4vw, 64px);
  right: clamp(32px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.auth-home-link { display: inline-flex; align-items: center; min-height: 48px; text-decoration: none; }
.auth-home-link .wordmark { width: 168px; }
.auth-shell[data-auth-theme="light"] .wordmark-image-light { display: block; }
.auth-shell[data-auth-theme="light"] .wordmark-image-dark { display: none; }
.auth-shell[data-auth-theme="dark"] .wordmark-image-light { display: none; }
.auth-shell[data-auth-theme="dark"] .wordmark-image-dark { display: block; }
.auth-theme-toggle {
  position: relative;
  flex: 0 0 70px;
  width: 70px;
  height: 44px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
  border-radius: 24px;
  background: #dfb253;
  color: #22313a;
  cursor: pointer;
  transition: background-color var(--motion-base) var(--ease-standard), border-color var(--motion-base) var(--ease-standard);
}
.auth-shell[data-auth-theme="dark"] .auth-theme-toggle { background: #202d37; color: #edf0ec; border-color: #45545e; }
.auth-theme-icon { position: relative; z-index: 2; display: grid; place-items: center; pointer-events: none; }
.auth-theme-icon--moon { color: #d8e1e5; }
.auth-theme-thumb {
  position: absolute;
  z-index: 1;
  top: 5px;
  left: 5px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fffdf8;
  box-shadow: 0 2px 8px rgba(14, 23, 31, .2);
  transform: translateX(0);
  transition: transform var(--motion-slow) cubic-bezier(.22, 1, .36, 1), background-color var(--motion-base) ease;
}
.auth-shell[data-auth-theme="dark"] .auth-theme-thumb { transform: translateX(27px); background: #60737d; }
.auth-theme-toggle:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }

.auth-card {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  max-width: 430px;
  margin: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: authFormIn .38s cubic-bezier(.22, 1, .36, 1) both;
}
.auth-card .onboard-hero { margin: 0 0 32px; text-align: left; }
.auth-card .onboard-hero h1 {
  margin: 8px 0 7px;
  font-family: var(--font-serif);
  font-size: clamp(34px, 3.2vw, 46px);
  font-weight: 520;
  line-height: 1.08;
  letter-spacing: -.035em;
}
.auth-card .onboard-hero > p:last-child { color: var(--text-faint); font-size: 15px; line-height: 1.65; }
.auth-eyebrow { margin: 0 !important; color: var(--auth-gold) !important; font-size: 11px !important; font-weight: 800; letter-spacing: .16em; }
.auth-card .field { margin-bottom: 18px; }
.auth-card .field label { margin-bottom: 8px; color: var(--text-dim); font-size: 13px; font-weight: 750; }
.auth-card .field input,
.auth-card .field select {
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--auth-input);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(14, 23, 31, .02);
  transition: border-color var(--motion-base) ease, background-color var(--motion-base) ease, box-shadow var(--motion-base) ease;
}
.auth-card .field input:focus-visible { outline: none; border-color: var(--focus-ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus-ring) 18%, transparent); }
.auth-card .goal-custom-field { background: color-mix(in srgb, var(--auth-input) 82%, var(--surface-2)); }
.auth-card .goal-custom-field > label { color: var(--text-dim); }
.auth-card .input-action-btn { width: 44px; height: 44px; right: 4px; border-radius: 3px; }
.auth-card .flex.between { min-height: 30px; }
.auth-card .link-btn { min-height: 36px; display: inline-flex; align-items: center; color: var(--accent); text-underline-offset: 3px; }
.auth-card > .btn-primary {
  min-height: 52px;
  margin-top: 9px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .015em;
  box-shadow: 0 12px 24px color-mix(in srgb, var(--btn-primary-bg) 18%, transparent);
  transition: background-color var(--motion-base) ease, transform var(--motion-fast) ease, box-shadow var(--motion-base) ease;
}
.auth-card > .btn-primary:hover { transform: none; box-shadow: 0 12px 24px color-mix(in srgb, var(--btn-primary-bg) 18%, transparent); }
.auth-card > .btn-primary:active { transform: translateY(0); }
.auth-card .consent-row { border-bottom: 0; padding: 9px 0; }
.auth-card .consent-row input[type="checkbox"] { border-radius: 3px; }
.auth-toggle-row { margin-top: 19px; font-size: 14px; }
.auth-toggle-row .link-btn { min-height: 36px; font-size: 14px; }
.auth-error { border-radius: 4px; }
.auth-legal-note {
  width: min(100%, 430px);
  margin: 30px 0 0;
  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}
.auth-shell--register .auth-form-pane { align-content: start; padding-top: 132px; }
.auth-shell--register .auth-card { padding-bottom: 4px; }

.auth-visual {
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  position: sticky;
  top: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(52px, 6vh, 82px) clamp(44px, 5vw, 78px) 46px;
  background: var(--auth-night-2);
  color: #f7f3e8;
  isolation: isolate;
}
.auth-visual::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(rgba(247,243,232,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(247,243,232,.025) 1px, transparent 1px);
  background-size: 38px 38px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 82%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 82%, transparent);
}
.auth-visual::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(62vw, 720px);
  height: min(62vw, 720px);
  left: 50%;
  top: 56%;
  border: 1px solid rgba(215, 168, 77, .12);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 90px rgba(215,168,77,.025), 0 0 0 180px rgba(215,168,77,.015);
}
.auth-visual-copy { position: relative; z-index: 2; }
.auth-visual-copy p { margin: 0 0 13px; color: var(--auth-gold); font-size: 9px; font-weight: 800; letter-spacing: .19em; }
.auth-visual-copy h2 { max-width: 620px; margin: 0; font-family: var(--font-serif); font-size: clamp(32px, 3.25vw, 52px); font-weight: 450; line-height: 1.08; letter-spacing: -.038em; }
.auth-visual-copy h2 em { color: var(--auth-gold); font-weight: 450; }
.auth-study-illustration {
  width: min(88%, 590px);
  min-height: 360px;
  margin: clamp(22px, 4vh, 54px) auto 12px;
  position: relative;
  align-self: center;
  animation: authVisualIn .48s .08s cubic-bezier(.22, 1, .36, 1) both;
}
.auth-study-sheet { position: absolute; border: 1px solid rgba(215,168,77,.4); background: #f3efe5; }
.auth-study-sheet--back { width: 66%; height: 70%; left: 7%; top: 4%; background: #20323d; border-color: rgba(247,243,232,.16); transform: translate(-12px, 16px); }
.auth-study-sheet--main { width: 72%; height: 78%; left: 13%; top: 8%; padding: 26px; color: #17232d; box-shadow: 0 28px 52px rgba(0,0,0,.25); }
.auth-sheet-head { display: flex; align-items: center; gap: 9px; color: #9a7330; }
.auth-sheet-head span { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #cfbf9b; }
.auth-sheet-head i { display: block; width: 8px; height: 8px; margin-left: auto; border: 1px solid #aab0ae; border-radius: 50%; }
.auth-sheet-head i + i { margin-left: 0; }
.auth-sheet-lines { display: grid; gap: 7px; margin-top: 22px; }
.auth-sheet-lines i { display: block; width: 72%; height: 2px; background: #d6d1c7; }
.auth-sheet-lines i:nth-child(2) { width: 55%; }
.auth-sheet-lines i:nth-child(3) { width: 64%; }
.auth-sheet-chart { height: 92px; margin-top: 24px; }
.auth-sheet-chart svg { width: 100%; height: 100%; overflow: visible; }
.auth-chart-grid { fill: none; stroke: #ded8cc; stroke-width: 1; }
.auth-chart-area { fill: rgba(215,168,77,.16); stroke: none; }
.auth-chart-line { fill: none; stroke: #9a7330; stroke-width: 3; }
.auth-sheet-progress { margin-top: 22px; display: flex; align-items: center; gap: 12px; }
.auth-sheet-progress > span { height: 5px; flex: 1; background: #ddd7cc; }
.auth-sheet-progress i { display: block; width: var(--auth-progress); height: 100%; background: #385e52; }
.auth-sheet-progress b { font-family: var(--font-serif); font-size: 18px; }
.auth-study-note {
  position: absolute;
  right: 0;
  top: 20%;
  width: 184px;
  min-height: 112px;
  padding: 17px 18px 16px 58px;
  border: 1px solid rgba(215,168,77,.48);
  background: var(--auth-gold);
  color: #17232d;
  box-shadow: 0 18px 36px rgba(0,0,0,.2);
}
.auth-study-note > span { position: absolute; left: 17px; top: 17px; }
.auth-study-note small, .auth-study-note strong { display: block; }
.auth-study-note small { font-size: 7px; font-weight: 900; letter-spacing: .13em; }
.auth-study-note strong { margin-top: 10px; font-family: var(--font-serif); font-size: 16px; line-height: 1.25; }
.auth-study-badge {
  position: absolute;
  left: 0;
  bottom: 0;
  min-width: 170px;
  min-height: 68px;
  padding: 13px 17px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(247,243,232,.2);
  background: #0e171f;
  color: var(--auth-gold);
  box-shadow: 0 18px 36px rgba(0,0,0,.23);
}
.auth-study-badge small, .auth-study-badge strong { display: block; }
.auth-study-badge small { color: #89969b; font-size: 7px; font-weight: 800; letter-spacing: .16em; }
.auth-study-badge strong { margin-top: 3px; color: #f7f3e8; font-size: 11px; }
.auth-visual-foot { position: relative; z-index: 2; display: flex; align-items: center; gap: 28px; padding-top: 22px; border-top: 1px solid var(--auth-line); color: #aeb8bc; font-size: 10px; font-weight: 700; }
.auth-visual-foot span { display: inline-flex; align-items: center; gap: 8px; }
.auth-visual-foot svg { color: var(--auth-gold); }

@keyframes authFormIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes authVisualIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 1120px) {
  .auth-shell { grid-template-columns: minmax(460px, .95fr) minmax(480px, 1.05fr); }
  .auth-form-pane { padding-inline: 48px; }
  .auth-study-illustration { width: 96%; }
  .auth-study-note { width: 168px; }
}
@media (max-width: 900px) {
  .auth-shell { display: block; background: var(--auth-page); }
  .auth-form-pane { min-height: 100vh; min-height: 100dvh; padding: 116px 24px 48px; }
  .auth-visual { display: none; }
  .auth-topbar { left: 24px; right: 24px; }
  .auth-card, .auth-legal-note { width: min(100%, 440px); max-width: 440px; }
  .auth-shell--register .auth-form-pane { padding-top: 124px; }
}
@media (max-width: 480px) {
  .auth-form-pane { padding: 104px 20px calc(32px + env(safe-area-inset-bottom)); }
  .auth-topbar { top: max(18px, env(safe-area-inset-top)); left: 20px; right: 20px; }
  .auth-home-link .wordmark { width: 145px; }
  .auth-theme-toggle { flex-basis: 66px; width: 66px; height: 42px; }
  .auth-theme-thumb { width: 30px; height: 30px; }
  .auth-shell[data-auth-theme="dark"] .auth-theme-thumb { transform: translateX(25px); }
  .auth-card { padding: 0; border-radius: 0; }
  .auth-card .onboard-hero { margin-bottom: 28px; }
  .auth-card .onboard-hero h1 { font-size: 34px; }
  .auth-shell--register .auth-form-pane { padding: 112px 20px 36px; }
  .auth-legal-note { margin-top: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-shell, .auth-theme-toggle, .auth-theme-thumb, .auth-card, .auth-study-illustration,
  .auth-card .field input, .auth-card > .btn-primary { animation: none; transition: none; }
}

/* Auth v2 — public Kocchum surfaces always use the landing palette. Signed-in theme
   presets intentionally do not participate in these scoped variables. */
.auth-shell {
  --auth-paper: #f3efe5;
  --auth-paper-2: #e9e3d7;
  --auth-sage: #8da97c;
  --auth-sage-deep: #385e52;
  --auth-gold: #d7a84d;
  --auth-night: #0e171f;
  --auth-night-2: #14232d;
  align-items: start;
  justify-content: stretch;
}
.auth-shell[data-auth-theme="light"] {
  --auth-page: var(--auth-paper);
  --auth-input: #fffdf8;
  --auth-input-hover: #f8f4eb;
  --auth-panel: #385e52;
  --auth-panel-deep: #2c4d44;
  --auth-panel-text: #f7f3e8;
  --auth-panel-muted: #d4ded8;
  --auth-panel-line: rgba(247, 243, 232, .18);
  --bg: var(--auth-paper);
  --surface: #fffdf8;
  --surface-2: var(--auth-paper-2);
  --surface-3: #dce5d9;
  --input-bg: var(--auth-input);
  --border: #cec7b9;
  --text: #17232d;
  --text-dim: #43544e;
  --text-faint: #64726d;
  --accent: var(--auth-sage-deep);
  --accent-hover: #284b41;
  --accent-active: #1e3d35;
  --accent-text: #fffdf8;
  --focus-ring: var(--auth-sage-deep);
  --btn-primary-bg: var(--auth-sage-deep);
  --btn-primary-hover: #284b41;
  --btn-primary-active: #1e3d35;
  --btn-primary-text: #fffdf8;
}
.auth-shell[data-auth-theme="dark"] {
  --auth-page: var(--auth-night);
  --auth-input: #182630;
  --auth-input-hover: #1d2d38;
  --auth-panel: var(--auth-night-2);
  --auth-panel-deep: #101d25;
  --auth-panel-text: #f7f3e8;
  --auth-panel-muted: #b9c3c7;
  --auth-panel-line: rgba(247, 243, 232, .13);
  --bg: var(--auth-night);
  --surface: #182630;
  --surface-2: #1a2d38;
  --surface-3: #283945;
  --input-bg: var(--auth-input);
  --border: #344752;
  --text: #f7f3e8;
  --text-dim: #d2d9dc;
  --text-faint: #a9b4b8;
  --accent: var(--auth-gold);
  --accent-hover: #e4bb6a;
  --accent-active: #edc97e;
  --accent-text: var(--auth-night);
  --focus-ring: #e4bb6a;
  --btn-primary-bg: var(--auth-gold);
  --btn-primary-hover: #e4bb6a;
  --btn-primary-active: #edc97e;
  --btn-primary-text: var(--auth-night);
}
.auth-form-pane { overflow: hidden; background: var(--auth-page); }
.auth-card .onboard-hero h1 { margin-top: 0; }
.auth-form-botanical {
  position: absolute;
  right: -30px;
  bottom: -45px;
  width: 170px;
  height: auto;
  fill: color-mix(in srgb, var(--auth-sage) 10%, transparent);
  stroke: color-mix(in srgb, var(--auth-sage-deep) 20%, transparent);
  stroke-width: 1.4;
  pointer-events: none;
}
.auth-shell[data-auth-theme="dark"] .auth-form-botanical {
  fill: rgba(141, 169, 124, .035);
  stroke: rgba(141, 169, 124, .1);
}

/* Sade, iki durumlu ve tam ortalanmış güneş/ay anahtarı. */
.auth-theme-toggle {
  flex-basis: 86px;
  width: 86px;
  height: 44px;
  grid-template-columns: 42px 42px;
  border-color: rgba(56, 94, 82, .28);
  background: #dce5d9;
  color: var(--auth-sage-deep);
}
.auth-theme-icon { width: 42px; height: 42px; }
.auth-theme-icon svg { width: 17px; height: 17px; }
.auth-theme-icon--moon { color: #677770; }
.auth-theme-thumb { top: 4px; left: 4px; width: 34px; height: 34px; background: #fffdf8; box-shadow: 0 2px 9px rgba(24, 39, 34, .18); }
.auth-shell[data-auth-theme="dark"] .auth-theme-toggle { background: #24343e; color: #87969c; border-color: #40535e; }
.auth-shell[data-auth-theme="dark"] .auth-theme-icon--moon { color: #17232d; }
.auth-shell[data-auth-theme="dark"] .auth-theme-thumb { transform: translateX(42px); background: var(--auth-gold); }

/* Kayıt formu kart yığını değildir: avatarlar ve yasal alanlar düz akışta kalır. */
.auth-shell--register .auth-card { width: min(100%, 620px); max-width: 620px; }
.auth-shell--register .auth-form-pane { place-items: start center; align-content: start; padding-top: 126px; }
.auth-register-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.auth-shell--register .avatar-picker { margin-bottom: 24px; }
.auth-shell--register .avatar-picker__hint { display: none; }
.auth-shell--register .avatar-option {
  min-height: 76px;
  padding: 4px 2px;
  gap: 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.auth-shell--register .avatar-option:hover { transform: none; border-color: transparent; background: transparent; }
.auth-shell--register .avatar-option:hover .profile-avatar__image { transform: none; }
.auth-shell--register .avatar-option .profile-avatar {
  --avatar-size: 48px !important;
  border-radius: 50%;
  border: 2px solid transparent;
  box-shadow: 0 5px 12px rgba(23, 35, 45, .14);
}
.auth-shell--register .avatar-option.is-selected { border: 0; background: transparent; box-shadow: none; }
.auth-shell--register .avatar-option.is-selected .profile-avatar { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.auth-shell--register .avatar-option__check { top: 1px; right: calc(50% - 28px); width: 18px; height: 18px; }
.auth-shell--register .avatar-option > span:not(.profile-avatar) { font-size: 10.5px; }
.auth-consent-group { margin: 3px 0 0; padding: 15px 0 4px; border-top: 1px solid var(--border); background: transparent; }
.auth-consent-group > p { margin: 0 0 6px; color: var(--text-faint); font-size: 12px; line-height: 1.55; }
.auth-consent-group a { color: var(--accent); text-underline-offset: 3px; }
.auth-privacy-link { width: max-content; margin-bottom: 5px; }

/* Sağ panel: aynı landing paleti içinde 15 saniyede değişen tek özellik vitrini. */
.auth-visual {
  align-self: start;
  grid-template-rows: 1fr;
  padding: clamp(54px, 7vh, 84px) clamp(46px, 5vw, 82px) 38px;
  background: var(--auth-panel);
  color: var(--auth-panel-text);
  transition: background-color var(--motion-slow) var(--ease-standard);
}
.auth-visual::before {
  background-image: linear-gradient(var(--auth-panel-line) 1px, transparent 1px), linear-gradient(90deg, var(--auth-panel-line) 1px, transparent 1px);
  opacity: .18;
}
.auth-visual::after {
  border-color: color-mix(in srgb, var(--auth-gold) 20%, transparent);
  box-shadow: 0 0 0 90px color-mix(in srgb, var(--auth-gold) 3%, transparent), 0 0 0 180px color-mix(in srgb, var(--auth-gold) 1.5%, transparent);
}
.auth-panel-botanical {
  position: absolute;
  z-index: 0;
  right: -42px;
  bottom: -70px;
  width: min(36%, 280px);
  height: auto;
  fill: rgba(247, 243, 232, .035);
  stroke: rgba(247, 243, 232, .12);
  stroke-width: 1.3;
  pointer-events: none;
}
.auth-feature-showcase { min-height: 0; position: relative; z-index: 2; display: grid; grid-template-rows: 1fr auto; }
.auth-feature-viewport { min-height: 0; position: relative; overflow: hidden; }
.auth-feature-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: clamp(28px, 5vh, 52px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(44px);
  transition: opacity .34s ease, transform .42s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .42s;
}
.auth-feature-slide.is-before { transform: translateX(-44px); }
.auth-feature-slide.is-active { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition-delay: 0s; }
.auth-feature-copy { max-width: 600px; }
.auth-feature-copy h2 { margin: 0; font-family: var(--font-serif); font-size: clamp(38px, 4vw, 60px); font-weight: 440; line-height: 1.02; letter-spacing: -.045em; }
.auth-feature-copy p { max-width: 500px; margin: 17px 0 0; color: var(--auth-panel-muted); font-size: 15px; line-height: 1.7; }
.auth-feature-graphic { min-height: 350px; position: relative; align-self: center; }
.auth-product-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(215, 208, 195, .9);
  background: var(--auth-paper);
  color: #17232d;
  box-shadow: 0 30px 62px rgba(7, 17, 22, .25);
  transform-origin: 50% 60%;
}
.auth-feature-slide.is-active .auth-product-stage { animation: authStageIn .52s cubic-bezier(.22, 1, .36, 1) both; }
.auth-stage-bar { min-height: 49px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #d7d0c3; color: #51615c; }
.auth-stage-bar > span { display: inline-flex; align-items: center; gap: 9px; }
.auth-stage-bar svg { color: #8c6a2c; }
.auth-stage-bar b { font-size: 12px; letter-spacing: .01em; }
.auth-stage-bar small { color: #7b837f; font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.auth-stage-bar nav { display: flex; align-self: stretch; gap: 18px; }
.auth-stage-bar nav i { position: relative; display: grid; place-items: center; color: #89908d; font-size: 10.5px; font-style: normal; font-weight: 750; }
.auth-stage-bar nav i.is-active { color: var(--auth-sage-deep); }
.auth-stage-bar nav i.is-active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--auth-sage-deep); }

/* Harita Laboratuvarı: landing'deki gerçek ürün önizlemesinin daha sıkı bir kesiti. */
.auth-map-layout { height: calc(100% - 49px); display: grid; grid-template-columns: 116px minmax(0, 1fr); }
.auth-map-time { position: relative; padding: 27px 17px; border-right: 1px solid #d7d0c3; background: #ebe5d8; }
.auth-map-time small { display: block; color: #8b7445; font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.auth-map-time strong { display: block; margin-top: 8px; font-family: var(--font-serif); font-size: 32px; font-weight: 520; line-height: 1; }
.auth-map-time > span { display: block; margin-top: 8px; color: #5c6864; font-size: 10.5px; line-height: 1.4; }
.auth-map-time-line { position: relative; height: 86px; margin: 24px 0 10px 6px; }
.auth-map-time-line::before { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 1px; background: #bdb6a7; }
.auth-map-time-line::after { content: ""; position: absolute; top: 0; left: 3px; width: 2px; height: 53%; background: var(--auth-sage-deep); transform: scaleY(0); transform-origin: top; }
.auth-feature-slide.is-active .auth-map-time-line::after { animation: authTimelineGrow .8s .28s cubic-bezier(.22,1,.36,1) forwards; }
.auth-map-time-line i, .auth-map-time-line b { position: absolute; left: 0; width: 7px; height: 7px; border: 1px solid #8d968f; border-radius: 50%; background: #ebe5d8; }
.auth-map-time-line i:first-child { top: 0; }.auth-map-time-line b { top: 49%; border-color: var(--auth-gold); background: var(--auth-gold); box-shadow: 0 0 0 4px rgba(215, 168, 77, .18); }.auth-map-time-line i:nth-of-type(2) { top: 74%; }.auth-map-time-line i:last-child { bottom: 0; }
.auth-map-time em { position: absolute; bottom: 19px; color: #8a918d; font-size: 9px; font-style: normal; }.auth-map-time em:first-of-type { left: 17px; }.auth-map-time em:last-of-type { right: 16px; }
.auth-map-canvas { position: relative; display: grid; place-items: center; background: #f3efe5; }
.auth-map-canvas::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(56,94,82,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(56,94,82,.055) 1px, transparent 1px); background-size: 34px 34px; }
.auth-map-canvas > svg { position: relative; width: 94%; height: auto; overflow: visible; }
.auth-map-land { stroke: #9a8b69; stroke-width: 1.2; }
.auth-map-boundary { fill: none; stroke: #8d8168; stroke-width: 1.2; stroke-dasharray: 5 6; }
.auth-map-route { fill: none; stroke: var(--auth-sage-deep); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 420; stroke-dashoffset: 420; }
.auth-feature-slide.is-active .auth-map-route { animation: authMapDraw 1.35s .32s cubic-bezier(.22,1,.36,1) forwards; }
.auth-map-ring { fill: rgba(215,168,77,.1); stroke: var(--auth-gold); stroke-width: 2; transform-box: fill-box; transform-origin: center; opacity: 0; }
.auth-map-point { fill: var(--auth-gold); opacity: 0; }
.auth-feature-slide.is-active .auth-map-ring, .auth-feature-slide.is-active .auth-map-point { animation: authMapPoint .42s .4s ease-out forwards; }
.auth-feature-slide.is-active .auth-map-ring--two, .auth-feature-slide.is-active .auth-map-point--two { animation-delay: 1.35s; }
.auth-map-label { position: absolute; z-index: 1; padding: 4px 7px; border: 1px solid #d0c7b6; background: rgba(243,239,229,.9); color: #59645f; font-size: 9.5px; font-weight: 750; opacity: 0; transform: translateY(5px); }
.auth-map-label--istanbul { left: 11%; top: 30%; }.auth-map-label--ankara { left: 50%; top: 52%; }
.auth-feature-slide.is-active .auth-map-label { animation: authLabelIn .32s .75s ease-out forwards; }.auth-feature-slide.is-active .auth-map-label--ankara { animation-delay: 1.42s; }
.auth-map-legend { position: absolute; right: 15px; bottom: 13px; display: flex; gap: 15px; color: #69736e; font-size: 9.5px; }
.auth-map-legend span { display: inline-flex; align-items: center; gap: 6px; }.auth-map-legend i { width: 18px; border-top: 1px dashed #8d8168; }.auth-map-legend b { width: 6px; height: 6px; border-radius: 50%; background: var(--auth-gold); }

/* Günlük rota: üç ayrı kart yerine tek bir çalışma çizgisi. */
.auth-route-intro { min-height: 102px; padding: 20px 25px 14px; display: grid; grid-template-columns: 1fr auto; align-items: center; border-bottom: 1px solid #d7d0c3; }
.auth-route-intro > span { grid-column: 1; color: #8c6a2c; font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.auth-route-intro strong { grid-column: 1; margin-top: 5px; font-family: var(--font-serif); font-size: 23px; font-weight: 520; line-height: 1.06; }
.auth-route-intro em { grid-column: 2; grid-row: 1 / 3; padding: 7px 10px; border: 1px solid #c9bd9e; color: #6b765f; font-size: 10px; font-style: normal; font-weight: 800; }
.auth-route-line { position: absolute; top: 192px; left: 12%; right: 12%; height: 2px; background: #d5cec0; }
.auth-route-line i { display: block; width: 100%; height: 100%; background: var(--auth-sage-deep); transform: scaleX(0); transform-origin: left; }
.auth-feature-slide.is-active .auth-route-line i { animation: authRouteGrow 1.25s .3s cubic-bezier(.22,1,.36,1) forwards; }
.auth-route-steps { position: relative; z-index: 1; margin: 0; padding: 29px 20px 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; }
.auth-route-steps li { min-width: 0; padding: 0 14px; display: grid; grid-template-rows: 30px 1fr auto; justify-items: start; opacity: 0; transform: translateY(12px); }
.auth-route-steps li + li { border-left: 1px solid #d7d0c3; }
.auth-feature-slide.is-active .auth-route-steps li { animation: authRouteStepIn .38s .38s ease-out forwards; }.auth-feature-slide.is-active .auth-route-steps li:nth-child(2) { animation-delay: .72s; }.auth-feature-slide.is-active .auth-route-steps li:nth-child(3) { animation-delay: 1.06s; }
.auth-route-steps li > span { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid var(--auth-sage-deep); border-radius: 50%; background: var(--auth-paper); color: var(--auth-sage-deep); font-family: var(--font-serif); font-size: 10px; }
.auth-route-steps li > div { padding-top: 13px; }.auth-route-steps small, .auth-route-steps strong, .auth-route-steps em { display: block; }
.auth-route-steps small { color: #8c6a2c; font-size: 9.5px; font-weight: 900; letter-spacing: .12em; }.auth-route-steps strong { margin-top: 7px; font-size: 11.5px; line-height: 1.35; }.auth-route-steps em { margin-top: 5px; color: #7b837f; font-size: 10px; font-style: normal; }
.auth-route-steps li > svg { align-self: end; margin-top: 13px; color: var(--auth-sage-deep); }

/* Hata Defteri: yanlış → tekrar → ustalık, tek bir bağlantılı sistem olarak görünür. */
.auth-mastery-flow { background: #ebe5d8; }
.auth-mastery-flow::before { content: ""; position: absolute; inset: 49px 0 0; background-image: linear-gradient(rgba(56,94,82,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(56,94,82,.05) 1px, transparent 1px); background-size: 34px 34px; }
.auth-mastery-path { position: absolute; top: 122px; left: 17%; right: 17%; height: 2px; background: #c8c0b1; }
.auth-mastery-path i { display: block; width: 100%; height: 100%; background: var(--auth-sage-deep); transform: scaleX(0); transform-origin: left; }
.auth-feature-slide.is-active .auth-mastery-path i { animation: authRouteGrow 1.15s .28s cubic-bezier(.22,1,.36,1) forwards; }
.auth-mastery-step { position: absolute; top: 94px; width: 27%; display: grid; justify-items: center; text-align: center; opacity: 0; transform: translateY(13px); }
.auth-mastery-step--mistake { left: 3%; }.auth-mastery-step--review { left: 36.5%; }.auth-mastery-step--score { right: 3%; }
.auth-feature-slide.is-active .auth-mastery-step { animation: authRouteStepIn .4s .34s ease-out forwards; }.auth-feature-slide.is-active .auth-mastery-step--review { animation-delay: .72s; }.auth-feature-slide.is-active .auth-mastery-step--score { animation-delay: 1.08s; }
.auth-mastery-step > span { width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid #b9b09f; border-radius: 50%; background: var(--auth-paper); color: var(--auth-sage-deep); font-family: var(--font-serif); font-size: 18px; box-shadow: 0 8px 18px rgba(33,49,45,.09); }
.auth-mastery-step--mistake > span { color: #9a5e4d; }.auth-mastery-step--score > span { border-color: var(--auth-gold); background: var(--auth-gold); color: #17232d; }
.auth-mastery-step small, .auth-mastery-step strong, .auth-mastery-step em { display: block; }.auth-mastery-step small { margin-top: 15px; color: #8c6a2c; font-size: 9.5px; font-weight: 900; letter-spacing: .12em; }.auth-mastery-step strong { margin-top: 7px; font-size: 12px; }.auth-mastery-step em { margin-top: 5px; color: #77807c; font-size: 10px; font-style: normal; }
.auth-mastery-step--score strong { font-family: var(--font-serif); font-size: 24px; line-height: 1; }
.auth-mastery-caption { position: absolute; right: 24px; bottom: 20px; left: 24px; min-height: 48px; padding-top: 14px; display: flex; align-items: flex-start; gap: 12px; border-top: 1px solid #c8c0b1; opacity: 0; }
.auth-feature-slide.is-active .auth-mastery-caption { animation: authLabelIn .36s 1.38s ease-out forwards; }
.auth-mastery-caption > i { width: 8px; height: 8px; margin-top: 3px; border-radius: 50%; background: var(--auth-gold); box-shadow: 0 0 0 4px rgba(215,168,77,.16); }.auth-mastery-caption small, .auth-mastery-caption strong { display: block; }.auth-mastery-caption small { color: #8c6a2c; font-size: 9.5px; font-weight: 900; letter-spacing: .12em; }.auth-mastery-caption strong { margin-top: 5px; font-size: 10.5px; }

@keyframes authStageIn { from { opacity: .25; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes authTimelineGrow { to { transform: scaleY(1); } }
@keyframes authMapDraw { to { stroke-dashoffset: 0; } }
@keyframes authMapPoint { from { opacity: 0; transform: scale(.45); } to { opacity: 1; transform: scale(1); } }
@keyframes authLabelIn { to { opacity: 1; transform: none; } }
@keyframes authRouteGrow { to { transform: scaleX(1); } }
@keyframes authRouteStepIn { to { opacity: 1; transform: none; } }

.auth-carousel-controls { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 2px; }
.auth-carousel-controls button { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; }
.auth-carousel-controls button span { position: relative; width: 7px; height: 7px; overflow: hidden; border-radius: 4px; background: color-mix(in srgb, var(--auth-panel-text) 38%, transparent); transition: width .25s ease, background-color .25s ease; }
.auth-carousel-controls button.is-active span { width: 28px; background: color-mix(in srgb, var(--auth-gold) 34%, transparent); }
.auth-carousel-controls button.is-active span::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--auth-gold); transform: scaleX(0); transform-origin: left; animation: authCarouselProgress 15s linear forwards; }
.auth-feature-showcase:hover .auth-carousel-controls button.is-active span::after, .auth-feature-showcase:focus-within .auth-carousel-controls button.is-active span::after { animation-play-state: paused; }
.auth-carousel-controls button:focus-visible { outline: 2px solid var(--auth-gold); outline-offset: -4px; border-radius: 50%; }
@keyframes authCarouselProgress { to { transform: scaleX(1); } }

@media (min-width: 1280px) {
  .auth-shell--register .avatar-picker__grid { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
  .auth-shell--register .auth-register-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
}
@media (max-width: 1120px) {
  .auth-feature-copy h2 { font-size: 42px; }
  .auth-feature-graphic { min-height: 330px; }
  .auth-map-layout { grid-template-columns: 102px minmax(0, 1fr); }
  .auth-map-time { padding-inline: 13px; }
  .auth-route-steps { padding-inline: 10px; }
  .auth-route-steps li { padding-inline: 10px; }
}
@media (max-width: 900px) {
  .auth-form-pane { overflow: hidden; }
  .auth-form-botanical { width: 138px; opacity: .7; }
  .auth-shell--register .auth-card { width: min(100%, 520px); max-width: 520px; }
}
@media (max-width: 480px) {
  .auth-theme-toggle { flex-basis: 78px; width: 78px; grid-template-columns: 38px 38px; }
  .auth-theme-icon { width: 38px; height: 40px; }
  .auth-theme-thumb { width: 32px; height: 32px; }
  .auth-shell[data-auth-theme="dark"] .auth-theme-thumb { transform: translateX(36px); }
  .auth-shell--register .avatar-option { min-height: 70px; }
  .auth-shell--register .avatar-option .profile-avatar { --avatar-size: 44px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-feature-slide, .auth-carousel-controls button span { transition: none; }
  .auth-feature-slide.is-active .auth-product-stage,
  .auth-feature-slide.is-active .auth-map-time-line::after,
  .auth-feature-slide.is-active .auth-map-route,
  .auth-feature-slide.is-active .auth-map-ring,
  .auth-feature-slide.is-active .auth-map-point,
  .auth-feature-slide.is-active .auth-map-label,
  .auth-feature-slide.is-active .auth-route-line i,
  .auth-feature-slide.is-active .auth-route-steps li,
  .auth-feature-slide.is-active .auth-mastery-path i,
  .auth-feature-slide.is-active .auth-mastery-step,
  .auth-feature-slide.is-active .auth-mastery-caption,
  .auth-carousel-controls button.is-active span::after { animation: none; }
  .auth-map-time-line::after, .auth-map-route, .auth-route-line i, .auth-mastery-path i, .auth-carousel-controls button.is-active span::after { transform: none; }
  .auth-map-ring, .auth-map-point, .auth-map-label, .auth-route-steps li, .auth-mastery-step, .auth-mastery-caption { opacity: 1; transform: none; }
}

/* Giriş, kayıt ve hesap geçişlerinin tamamında kullanılan ortak yardımcı görünüm. */
.auth-shell--password-reset .auth-card,
.auth-shell--email-verification .auth-card,
.auth-shell--legal-acceptance .auth-card,
.auth-shell--complete-profile .auth-card,
.auth-shell--onboarding .auth-card {
  width: min(100%, 520px);
  max-width: 520px;
}
.auth-secondary-actions {
  min-height: 44px;
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 18px;
}
.auth-secondary-actions .link-btn { min-height: 44px; }
.auth-support-visual {
  grid-template-rows: auto minmax(320px, 1fr);
  gap: clamp(30px, 6vh, 68px);
}
.auth-support-copy { position: relative; z-index: 2; max-width: 610px; }
.auth-support-copy > p {
  margin: 0 0 14px;
  color: var(--auth-gold);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .18em;
}
.auth-support-copy h2 {
  max-width: 610px;
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(38px, 4vw, 60px);
  font-weight: 440;
  line-height: 1.02;
  letter-spacing: -.045em;
}
.auth-support-copy > span {
  display: block;
  max-width: 500px;
  margin-top: 18px;
  color: var(--auth-panel-muted);
  font-size: 15px;
  line-height: 1.7;
}
.auth-support-stage {
  position: relative;
  z-index: 2;
  width: min(100%, 620px);
  align-self: center;
  border: 1px solid rgba(215, 208, 195, .9);
  background: var(--auth-paper);
  color: #17232d;
  box-shadow: 0 30px 62px rgba(7, 17, 22, .25);
  animation: authStageIn .52s cubic-bezier(.22, 1, .36, 1) both;
}
.auth-support-stage__head {
  min-height: 52px;
  padding: 0 21px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #d7d0c3;
  color: #51615c;
}
.auth-support-stage__head > span { display: grid; place-items: center; color: #8c6a2c; }
.auth-support-stage__head b { font-size: 12px; }
.auth-support-stage__head small { margin-left: auto; color: #7b837f; font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.auth-support-stage ol { margin: 0; padding: 12px 22px 4px; list-style: none; }
.auth-support-stage li {
  min-height: 70px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid #d7d0c3;
}
.auth-support-stage li > i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--auth-sage-deep);
  border-radius: 50%;
  color: var(--auth-sage-deep);
  font-family: var(--font-serif);
  font-size: 10px;
  font-style: normal;
}
.auth-support-stage li small, .auth-support-stage li strong { display: block; }
.auth-support-stage li small { color: #8c6a2c; font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.auth-support-stage li strong { margin-top: 4px; font-size: 12px; }
.auth-support-stage li > svg { color: var(--auth-sage-deep); }
.auth-support-progress { min-height: 64px; padding: 0 22px; display: flex; align-items: center; gap: 16px; }
.auth-support-progress > span { height: 5px; flex: 1; background: #d8d1c4; }
.auth-support-progress > span i { display: block; width: 74%; height: 100%; background: var(--auth-sage-deep); }
.auth-support-progress b { font-family: var(--font-serif); font-size: 21px; font-weight: 560; }

@media (max-width: 1120px) {
  .auth-support-copy h2 { font-size: 42px; }
}
@media (max-width: 900px) {
  .auth-support-visual { display: none; }
}
@media (max-width: 480px) {
  .auth-shell--password-reset .auth-card,
  .auth-shell--email-verification .auth-card,
  .auth-shell--legal-acceptance .auth-card,
  .auth-shell--complete-profile .auth-card,
  .auth-shell--onboarding .auth-card { width: 100%; }
  .auth-secondary-actions { flex-direction: column; gap: 0; }
  .goal-custom-input { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-support-stage { animation: none; }
}

/* ===== Global marka'lı yükleniyor örtüsü (bkz. js/components/loading.js) =====
   Yalnızca anlamlı, engelleyici asenkron geçişler için — modal-overlay (80) ve
   admin-drawer-overlay (85) üzerinde, kısa süreli bir geçiş katmanı olduğundan yüksek bir
   z-index kullanır; kaldırıldığında sonraki modal/bildirimlerle çakışmaz. */
.loading-overlay {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: loadingOverlayIn .18s ease;
}
@keyframes loadingOverlayIn { from { opacity: 0; } to { opacity: 1; } }
.loader-inner {
  position: relative;
  width: min(330px, calc(100vw - 32px)); min-height: 120px;
  display: grid; place-items: center;
  pointer-events: none;
}
.loader-signature { display: flex; align-items: center; justify-content: center; gap: 10px; }

/* Onaylı Kocchum PNG geometrisiyle tek seferlik “Kocchum Yörüngesi” marka imzası.
   Katmanlar aynı PNG'yi aynı koordinatlarda tutar; logo yeniden çizilmez veya renklendirilmez. */
.loader-signature { width: 320px; height: 78px; gap: 0; }
.loader-logo-stage { position: relative; flex: 0 0 320px; width: 320px; height: 78px; overflow: visible; }
.loader-logo-source {
  position: absolute; inset: 0 auto auto 0;
  display: block; width: 320px; height: auto; max-width: none;
}
.loader-logo-dark { display: none; }
:root:is([data-theme="dark"], [data-theme$="-dark"]) .loader-logo-light { display: none; }
:root:is([data-theme="dark"], [data-theme$="-dark"]) .loader-logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .loader-logo-light { display: none; }
  :root:not([data-theme]) .loader-logo-dark { display: block; }
}
.loader-horn-grow,
.loader-head-reveal,
.loader-wordmark-reveal { position: absolute; inset: 0; display: block; overflow: hidden; }
@property --horn-reveal-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.loader-horn-grow {
  --horn-reveal-angle: 0deg;
  clip-path: polygon(0 0, 20% 0, 20% 34%, 17% 34%, 15% 43%, 12% 58%, 8% 67%, 0 67%);
  transform-origin: 14.5% 43%;
  -webkit-mask-image: conic-gradient(from 180deg at 14.5% 43%, #000 0deg var(--horn-reveal-angle), transparent var(--horn-reveal-angle) 360deg);
  mask-image: conic-gradient(from 180deg at 14.5% 43%, #000 0deg var(--horn-reveal-angle), transparent var(--horn-reveal-angle) 360deg);
  animation: loaderApprovedHornGrow .62s .34s cubic-bezier(.32, 0, .2, 1) 1 both;
}
.loader-head-reveal {
  z-index: 2;
  clip-path: polygon(
    8.8% 35%, 11% 34.5%, 13.6% 38.5%, 14.4% 32.2%, 17.7% 32.2%,
    19.7% 35.8%, 21.1% 43.1%, 22.2% 51.8%, 23.5% 58.7%, 25.9% 65.7%,
    26.3% 71.7%, 25.3% 74.4%, 23.2% 80.7%, 19.5% 77.7%, 16.4% 79.2%,
    13.9% 85.5%, 13% 95%, 11.6% 86.1%, 10.2% 78.6%, 10.1% 65.7%,
    10% 53.3%, 9.2% 46.4%
  );
  transform-origin: 18% 61%;
  animation: loaderApprovedHeadSettle .34s cubic-bezier(.2, .85, .3, 1.08) 1 both;
}
.loader-wordmark-reveal {
  clip-path: inset(0 0 0 27.5%);
  animation: loaderApprovedWordmarkIn .32s .96s cubic-bezier(.22, 1, .36, 1) 1 both;
}
@keyframes loaderApprovedHornGrow {
  0% { --horn-reveal-angle: 0deg; opacity: .15; transform: translate3d(0, 1px, 0) scale(.97) rotate(-2deg); }
  18% { --horn-reveal-angle: 60deg; opacity: 1; }
  55% { --horn-reveal-angle: 200deg; opacity: 1; }
  82% { --horn-reveal-angle: 332deg; opacity: 1; transform: translate3d(0, 0, 0) scale(1.012) rotate(.6deg); }
  100% { --horn-reveal-angle: 360deg; opacity: 1; transform: translate3d(0, 0, 0) scale(1) rotate(0); }
}
@keyframes loaderApprovedHeadSettle {
  0% { opacity: 0; transform: translate3d(0, 9px, 0) scale(.96); }
  72% { opacity: 1; transform: translate3d(0, -1px, 0) scale(1.012); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes loaderApprovedWordmarkIn {
  0% { opacity: 0; transform: translate3d(10px, 0, 0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0); }
}
@media (max-width: 480px) { .loader-signature { transform: scale(.88); } }
@media (prefers-reduced-motion: reduce) {
  .loader-horn-grow { --horn-reveal-angle: 360deg; animation: none; opacity: 1; transform: none; }
  .loader-head-reveal, .loader-wordmark-reveal { animation: none; opacity: 1; transform: none; }
}
@page { margin: 14mm 12mm; }

/* ===== "Öğren" (Konu Anlatımı + Bilgi Kartları + Çıkmış Sorular) ===== */
/* bkz. LEARN_CONTENT_GUIDE.md. Mevcut .card/.chip/.badge/.section dilini genişletir, yeni bir
   görsel sistem KURMAZ — yalnızca bu modüle özgü düzenler (flip kart, akordeon, karşılaştırma
   sütunları, ağaç) eklenir. */

.learn-daily-card { border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.learn-subject-icon { flex: 0 0 auto; }
.flashcard-topic-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
}
.flashcard-topic-filters .chip {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  justify-content: center;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  white-space: normal;
  text-align: center;
  line-height: 1.25;
}
.learn-home-subject-grid { display: flex; flex-direction: column; gap: 12px; }
.learn-home-subject-grid > .card { margin-top: 0; }
.learn-home-footer-grid { display: flex; flex-direction: column; gap: 14px; }
.learn-home-footer-grid > .card { margin-top: 0; }

/* Konu Testi ve Öğren listeleri mobilde mevcut tek sütun akışını korur. */
.topic-select-grid { display: flex; flex-direction: column; gap: 12px; }
.topic-select-grid > .card { margin-top: 0; }
.learn-subject-toolbar { display: flex; flex-direction: column; gap: 12px; }
.learn-subject-toolbar .field { flex: 1; min-width: 0; }
.learn-topic-masonry,
.learn-section-masonry { display: flex; flex-direction: column; gap: 10px; }
.learn-desktop-sections { display: none; }
.learn-topic-masonry > .card,
.learn-section-masonry > .card { margin-top: 0; }

@media (min-width: 960px) {
  .topic-select-screen,
  .learn-home-screen,
  .learn-subject-screen,
  .learn-topic-screen { max-width: 1180px; }

  .screen--wide > .learn-home-subject-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 16px;
  }
  .screen--wide > .learn-home-heading { flex-direction: row; }
  .learn-home-subject-grid > .learn-subject-card { height: 100%; min-width: 0; }
  .screen--wide > .learn-home-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
    align-items: stretch;
    gap: 16px;
  }
  .learn-home-footer-grid > .learn-cikmis-card,
  .learn-home-footer-grid > .stat-grid { height: 100%; }

  .topic-select-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 16px;
  }
  .topic-select-grid > .card { height: 100%; min-width: 0; }
  .topic-test-config-card > .btn { width: auto; min-width: 220px; }
  .custom-test-summary > .btn { width: auto; min-width: 220px; }

  .screen--wide > .learn-subject-toolbar {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }
  .learn-subject-toolbar .chip-row { flex: 0 0 auto; }

  /* Ders içindeki kısa konu kartları doğal sütunlara akar. */
  .screen--wide > .learn-topic-masonry {
    display: block;
    columns: 320px 3;
    column-gap: 16px;
  }
  .learn-topic-masonry.is-empty { columns: 1; }
  .learn-topic-masonry > .learn-topic-accordion {
    display: inline-block;
    width: 100%;
    margin: 0 0 16px;
    break-inside: avoid;
    vertical-align: top;
  }

  /* Masaüstünde tarayıcı sekmesi şeridi + altında yalnızca etkin bölümün içeriği. */
  .screen--wide > .learn-desktop-sections { display: block; }
  .screen--wide > .learn-mobile-sections { display: none; }
  .learn-desktop-tabs-shell {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-2);
    box-shadow: var(--shadow-sm);
  }
  .learn-desktop-tab-grid {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    padding: 6px 6px 0;
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .learn-desktop-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 0 118px;
    min-width: 118px;
    max-width: 190px;
    min-height: 40px;
    padding: 8px 11px;
    background: transparent;
    color: var(--text);
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    box-shadow: none;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
  }
  .learn-desktop-tab > span:not(.badge) {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .learn-desktop-tab:hover { background: color-mix(in srgb, var(--surface) 65%, transparent); }
  .learn-desktop-tab.active {
    border-color: var(--border);
    color: var(--accent);
    background: var(--surface);
    position: relative;
    z-index: 1;
  }
  .learn-desktop-panel {
    margin-top: 0;
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
  }
  .learn-desktop-panel > .learn-section {
    border: 0;
    box-shadow: none;
    background: transparent;
    overflow: visible;
  }
  .learn-desktop-panel .learn-section-summary { display: none; }
  .learn-desktop-panel .learn-section-body {
    padding: 18px;
    gap: 16px;
  }
  .learn-desktop-panel .learn-section:not([data-section="flashcards"]):not([data-section="past_questions"]):not([data-section="quiz"]) .learn-section-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    column-gap: 34px;
    position: relative;
  }
  .learn-desktop-panel .learn-section:not([data-section="visuals"]):not([data-section="flashcards"]):not([data-section="past_questions"]):not([data-section="quiz"]) .learn-section-body:not(:has(> .learn-item:only-child))::after {
    content: '';
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 50%;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(180deg, transparent, var(--accent) 12%, var(--accent) 88%, transparent);
    opacity: .52;
    transform: translateX(-1px);
    pointer-events: none;
  }
  .learn-desktop-panel .learn-section-body > .learn-item:only-child {
    grid-column: 1 / -1;
  }
  .learn-desktop-panel .learn-section[data-section="visuals"] .learn-section-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: start;
  }
  /* Öğren görselleri kendi doğal ölçüsünde kalır; geniş panel SVG'leri devleştirmez. */
  .learn-desktop-panel .learn-item[data-content-type="timeline"] .q-visual,
  .learn-desktop-panel .learn-item[data-content-type="chronology"] .q-visual {
    width: min(100%, 520px);
    margin: 10px auto 14px;
    padding: 16px 20px;
  }
  .learn-desktop-panel .learn-item[data-content-type="table"] .q-visual {
    width: min(100%, 920px);
    margin: 10px auto 14px;
  }
  .learn-desktop-panel .learn-item[data-content-type="flowchart"] .q-visual,
  .learn-desktop-panel .learn-item[data-content-type="map_note"] .q-visual,
  .learn-desktop-panel .learn-item[data-content-type="diagram"] .q-visual {
    width: min(100%, 620px);
    margin: 10px auto 14px;
  }
  .learn-desktop-panel .learn-item[data-content-type="timeline"] .chart-wrap,
  .learn-desktop-panel .learn-item[data-content-type="chronology"] .chart-wrap {
    max-width: 480px;
    margin-inline: auto;
  }
  /* İki taraflı karşılaştırmalar masaüstünde net bir tema çizgisiyle ayrılır. */
  .learn-desktop-panel .learn-comparison {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
    position: relative;
  }
  .learn-desktop-panel .learn-comparison::after {
    content: '';
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 50%;
    width: 2px;
    border-radius: 999px;
    background: var(--accent);
    opacity: .58;
    transform: translateX(-1px);
    pointer-events: none;
  }
  .learn-desktop-panel .learn-cause-effect {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
  }
  .learn-desktop-panel .learn-cause-effect > div {
    min-width: 0;
  }
  .learn-topic-accordion { padding: 12px 14px; }
  .flashcard-topic-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .flashcard-topic-filters .chip { min-height: 36px; padding: 7px 10px; }
  .flashcard-start-btn { width: auto; min-width: 190px; }
  .learn-topic-navigation { align-items: center; }
}

@media (min-width: 1400px) {
  .topic-select-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .screen--wide > .learn-home-subject-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Konu akordeonu (js/screens/learnSubject.js) — native <details>/<summary>, tam klavye
   erişilebilirliği ücretsiz gelir (Tab + Enter/Space), ekstra JS state gerekmez. */
.learn-topic-accordion { padding: 14px 16px; }
.learn-topic-accordion[data-empty="true"] { opacity: .7; }
.learn-topic-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  cursor: pointer; list-style: none; padding: 2px 0;
}
.learn-topic-summary::-webkit-details-marker { display: none; }
.learn-topic-preview { padding-top: 12px; }
.learn-accordion-chevron { transition: transform var(--motion-base) var(--ease-standard); flex: 0 0 auto; }
.learn-topic-accordion[open] .learn-accordion-chevron { transform: rotate(180deg); }

/* Konu sayfası bölüm akordeonu (js/screens/learnTopic.js) */
.learn-section { padding: 0; overflow: hidden; }
.learn-section-summary {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; cursor: pointer; list-style: none; font-weight: 700; font-size: 14.5px;
}
.learn-section-summary::-webkit-details-marker { display: none; }
.learn-section-summary span { flex: 1; }
.learn-section-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 14px; }

.learn-item-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.learn-item-head h4 { margin: 0; font-size: 14.5px; flex: 1; }
.learn-item-icon { color: var(--text-faint); flex: 0 0 auto; display: flex; }
.learn-item p { margin: 0 0 8px; line-height: 1.55; font-size: 14px; color: var(--text-dim); }
.learn-item p:last-child { margin-bottom: 0; }
.learn-item-subtopic { font-size: 11.5px; color: var(--text-faint); margin-top: 8px; }

/* Kısaltma/hafıza kodu kartı */
.learn-abbr-card { background: var(--surface-2); border-radius: var(--radius-md); padding: 12px 14px; }
.learn-abbr-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-weight: 700; margin-bottom: 8px; }
.learn-abbr-code { color: var(--accent); font-size: 15px; }
.learn-abbr-arrow { color: var(--text-faint); }
.learn-abbr-parts { margin: 0 0 8px; padding-left: 18px; font-size: 13.5px; line-height: 1.6; color: var(--text-dim); }
.learn-abbr-helps, .learn-abbr-limits, .learn-abbr-example { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; margin-top: 6px; color: var(--text-dim); }
.learn-abbr-limits { color: var(--warn); }

/* Karşılaştırma / sık karıştırılan (yan yana sütunlar, mobilde alt alta) */
.learn-comparison { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 8px; }
@media (min-width: 560px) { .learn-comparison { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.learn-comparison-col { background: var(--surface-2); border-radius: var(--radius-md); padding: 12px 14px; }
.learn-comparison-head { font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.learn-comparison-col ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.6; color: var(--text-dim); }

/* Sınıflandırma ağacı */
.learn-tree { margin-top: 8px; font-size: 13.5px; }
.learn-tree-node { padding: 5px 0 5px calc(var(--depth, 0) * 16px); font-weight: 600; overflow-wrap: anywhere; }
.learn-tree-children { list-style: none; margin: 0; padding: 0; }
.learn-tree-children > li > .learn-tree-node { font-weight: 400; color: var(--text-dim); }

.learn-cause-effect { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 10px; margin-top: 8px; font-size: 13.5px; }
.learn-cause-effect > div { min-width: 0; background: var(--surface-2); border-radius: var(--radius-md); padding: 10px 12px; }
.learn-ce-label { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); margin-bottom: 4px; }

@media (max-width: 420px) {
  .learn-cause-effect { grid-template-columns: 1fr; }
}

.learn-formula { margin-top: 8px; background: var(--surface-2); border-radius: var(--radius-md); padding: 12px 14px; }
.learn-formula code { font-family: var(--font-sans); font-weight: 700; color: var(--accent); font-size: 14px; }
.learn-formula ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--text-dim); }

.learn-chrono-detail { margin: 10px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.65; color: var(--text-dim); }

/* Görsel (image) içerik türü — yalnızca yazarın kendi sahip olduğu görseller (bkz.
   js/data/learn/schema.js). Tek sütun, maksimum genişlikle sınırlı, kart dilinden ödünç
   alınan çerçeve/gölge; büyük ekranlarda ortalanır, mobilde tam genişlik kaplar. */
.learn-figure { margin: 8px 0 0; }
.learn-figure-img {
  display: block; width: 100%; max-width: 460px; height: auto; margin: 0 auto;
  object-fit: contain;
  border-radius: var(--radius-md); border: 1px solid var(--border);
  background: var(--surface-2); box-shadow: var(--shadow-sm);
}
.learn-figure-caption {
  max-width: 460px; margin: 8px auto 0; text-align: center;
  font-size: 12px; line-height: 1.5; color: var(--text-faint);
}

/* ===== Flashcard (çift taraflı flip kartı) ===== */
.flashcard-stage { position: relative; max-width: 480px; margin: 0 auto; }
.flashcard-fav-btn {
  position: absolute; top: -10px; right: -6px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-faint);
  cursor: pointer; box-shadow: var(--shadow-sm);
}
.flashcard-fav-btn.active { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); }
.flashcard {
  perspective: 1200px;
  min-height: 220px;
  cursor: pointer;
  border-radius: var(--radius-lg);
}
.flashcard:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 4px; }
.flashcard-inner {
  position: relative; width: 100%; min-height: 220px;
  transform-style: preserve-3d;
  transition: transform var(--motion-slow) var(--ease-standard);
}
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.flashcard-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  padding: 24px 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 10px;
}
.flashcard-back { transform: rotateY(180deg); overflow-y: auto; align-items: stretch; text-align: left; justify-content: flex-start; }
.flashcard-hint {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 3px 10px; border-radius: var(--radius-pill);
}
.flashcard-prompt { font-size: 18px; font-weight: 700; line-height: 1.4; }
.flashcard-tap-hint { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-faint); margin-top: 6px; }
.flashcard-answer { font-size: 16px; font-weight: 700; line-height: 1.4; }
.flashcard-extra { font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.flashcard-extra strong { color: var(--text); }
.flashcard-source { font-size: 11.5px; color: var(--text-faint); margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
  .flashcard-inner { transition: none; }
}

.flashcard-review-bar { display: flex; gap: 8px; max-width: 480px; margin: 0 auto; }
.flashcard-review-bar .btn { flex: 1; }
.review-btn-known { border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.review-btn-unsure { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.review-btn-retry { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }

/* Route-only Harita Laboratuvarı (#/map) */
.map-lab-screen {
  min-height: 100vh;
  padding: clamp(18px, 3vw, 42px);
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 34%),
    var(--bg);
}
.map-lab-header { max-width: 1480px; margin: 0 auto 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.map-lab-header h1 { margin: 3px 0 6px; font-size: clamp(28px, 4vw, 46px); line-height: 1.05; letter-spacing: -.04em; }
.map-lab-header p { margin: 0; color: var(--text-dim); max-width: 720px; }
.map-lab-home-link { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 13px; font-weight: 750; text-decoration: none; transition: border-color .16s ease, background .16s ease, color .16s ease; }
.map-lab-home-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.map-lab-home-link:hover { border-color: color-mix(in srgb, var(--accent) 44%, var(--border)); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); color: var(--accent); }
.map-lab-home-link:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 58%, transparent); outline-offset: 3px; }
.map-lab-kicker, .map-lab-eyebrow { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.map-lab-test-badge { flex: 0 0 auto; border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--border)); border-radius: 999px; padding: 7px 11px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.map-lab-mode-switch { max-width: 1480px; margin: 0 auto 18px; display: inline-flex; padding: 4px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.map-lab-mode-switch button { min-width: 120px; padding: 10px 20px; border: 0; border-radius: 10px; background: transparent; color: var(--text-dim); font: inherit; font-weight: 700; cursor: pointer; }
.map-lab-mode-switch button.is-active { background: var(--accent); color: #fff; box-shadow: 0 7px 18px color-mix(in srgb, var(--accent) 24%, transparent); }
.map-lab-timeline { max-width: 1480px; margin: 0 auto 18px; padding: 16px 18px 13px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.map-lab-timeline-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 10px; }
.map-lab-timeline-head > div { display: grid; gap: 2px; }
.map-lab-timeline-head strong { font-size: 30px; line-height: 1; letter-spacing: -.03em; }
.map-lab-timeline-head p { margin: 0; color: var(--text-dim); font-size: 12px; text-align: right; }
.map-lab-timeline .map-lab-range { display: block; height: 8px; margin: 10px 0 12px; border-radius: 999px; appearance: none; background: linear-gradient(90deg, var(--accent) 0 var(--timeline-progress), var(--surface-3) var(--timeline-progress) 100%); cursor: grab; touch-action: pan-y; }
.map-lab-timeline .map-lab-range:active { cursor: grabbing; }
.map-lab-timeline .map-lab-range::-webkit-slider-thumb { width: 20px; height: 20px; border: 3px solid var(--surface); border-radius: 50%; appearance: none; background: var(--accent); box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 42%, transparent); }
.map-lab-timeline .map-lab-range::-moz-range-thumb { width: 15px; height: 15px; border: 3px solid var(--surface); border-radius: 50%; background: var(--accent); box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 42%, transparent); }
.map-lab-timeline-stops { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 7px; }
.map-lab-timeline-stops button { min-width: 0; padding: 7px 8px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text-dim); font: inherit; text-align: left; cursor: pointer; }
.map-lab-timeline-stops button strong, .map-lab-timeline-stops button span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-lab-timeline-stops button strong { color: var(--text); font-size: 12px; }
.map-lab-timeline-stops button span { margin-top: 2px; font-size: 10px; }
.map-lab-timeline-stops button.is-active { border-color: color-mix(in srgb, var(--accent) 38%, var(--border)); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.map-lab-layout { max-width: 1480px; margin: 0 auto; display: grid; grid-template-columns: minmax(220px, 270px) minmax(430px, 1fr) minmax(290px, 355px); gap: 16px; align-items: start; }
.map-lab-layout.is-history { grid-template-columns: minmax(240px, 275px) minmax(560px, 1fr) minmax(300px, 340px); grid-template-areas: "controls map details"; }
.map-lab-layout.is-history > .map-lab-control-panel { grid-area: controls; }
.map-lab-layout.is-history > .map-lab-map-panel { grid-area: map; }
.map-lab-layout.is-history > .map-lab-detail-panel { grid-area: details; }
.map-lab-layout > * { min-width: 0; }
.map-lab-control-card, .map-lab-detail-card { border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm); }
.map-lab-map-panel { padding: 8px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border)); border-radius: 24px; background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), var(--surface)); box-shadow: 0 12px 32px rgba(15,23,42,.15), inset 0 1px 0 color-mix(in srgb, #fff 45%, transparent); }
.map-lab-control-card { padding: 18px; }
.map-lab-slider-label { display: grid; gap: 2px; margin: 14px 0 10px; }
.map-lab-slider-label strong { font-size: 28px; }
.map-lab-slider-label span, .map-lab-help { color: var(--text-dim); font-size: 13px; }
.map-lab-range { width: 100%; accent-color: var(--accent); }
.map-lab-selected-era { display: grid; gap: 2px; margin: 14px 0 8px; }
.map-lab-selected-era strong { font-size: 30px; line-height: 1; }
.map-lab-selected-era span { color: var(--text-dim); font-size: 12px; line-height: 1.4; }
.map-lab-period-title { margin: 8px 0 14px; font-size: 21px; line-height: 1.2; letter-spacing: -.02em; }
.map-lab-period-insights { display: grid; gap: 9px; }
.map-lab-period-insights > div { display: grid; gap: 3px; padding: 10px 11px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.map-lab-period-insights span { color: var(--text-dim); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.map-lab-period-insights strong { font-size: 12px; line-height: 1.45; }
.map-lab-period-summary { display: grid; gap: 5px; margin: 14px 0 0; padding: 11px 12px; border-left: 3px solid var(--accent); border-radius: 9px; background: color-mix(in srgb, var(--accent) 7%, var(--surface-2)); }
.map-lab-period-summary span { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.map-lab-period-summary p { margin: 0; color: var(--text-dim); font-size: 12px; line-height: 1.55; }
.map-lab-year-list, .map-lab-layer-list { display: grid; gap: 8px; margin-top: 14px; }
.map-lab-year-btn { display: grid; grid-template-columns: 48px 1fr; gap: 9px; align-items: center; width: 100%; padding: 10px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.map-lab-year-btn span { color: var(--text-dim); font-size: 12px; }
.map-lab-year-btn.is-active { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.map-lab-nearby-events { display: grid; gap: 7px; padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--border); }
.map-lab-nearby-events > p { margin: 2px 0 0; color: var(--text-dim); font-size: 12px; line-height: 1.45; }
.map-lab-nearby-event-item { display: grid; gap: 7px; }
.map-lab-nearby-event-item.is-open { gap: 0; overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border)); border-radius: 13px; background: color-mix(in srgb, var(--accent) 7%, var(--surface-2)); box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent) 68%, transparent); animation: map-event-panel-in .18s ease-out; }
.map-lab-nearby-event { display: grid; grid-template-columns: 8px 42px 1fr; gap: 7px; align-items: center; width: 100%; padding: 7px 8px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text-dim); font: inherit; font-size: 11px; text-align: left; cursor: pointer; }
.map-lab-nearby-event > span { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.map-lab-nearby-event strong { color: var(--text); }
.map-lab-nearby-event.is-active { border-color: transparent; border-radius: 0; background: color-mix(in srgb, var(--accent) 11%, var(--surface-2)); color: var(--text); }
.map-lab-inline-event { display: grid; gap: 10px; margin: 0 11px 11px; padding: 12px 4px 1px; border-top: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border)); }
.map-lab-event-parties span { color: var(--accent); font-size: 10px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.map-lab-event-parties { display: grid; gap: 4px; padding: 9px 10px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.map-lab-event-parties strong { color: var(--text); font-size: 12px; line-height: 1.45; }
.map-lab-inline-event > p { margin: 0; color: var(--text-dim); font-size: 12px; line-height: 1.55; }
.map-lab-inline-event-note { padding-top: 9px; border-top: 1px solid var(--border); }
.map-lab-inline-event-note strong { color: var(--text); }
.map-lab-event-boundary-btn { width: 100%; min-height: 38px; padding: 8px 10px; white-space: normal; font-size: 11px; line-height: 1.35; }
.map-lab-event-boundary-btn:disabled { cursor: default; opacity: .66; }
@keyframes map-event-panel-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.map-lab-layer-row { display: grid; grid-template-columns: 20px 12px 1fr; gap: 9px; align-items: center; padding: 10px; border: 1px solid transparent; border-radius: 12px; cursor: pointer; }
.map-lab-layer-row.is-active { border-color: var(--border); background: var(--surface-2); }
.map-lab-layer-row input { accent-color: var(--accent); }
.map-lab-layer-row span:last-child { display: grid; gap: 2px; }
.map-lab-layer-row small { color: var(--text-dim); }
.map-lab-layer-swatch { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.map-lab-swatch-river { background: #1597d4; }.map-lab-swatch-lake { background: #2369c9; }.map-lab-swatch-plain { background: #61a534; }.map-lab-swatch-climate_region { background: #7a55bf; }.map-lab-swatch-mountain { background: #c36b2d; }
.map-lab-swatch-river-main { background: #1d6fd6; }.map-lab-swatch-river-tributary { background: #5fc3f0; }
.map-lab-swatch-climate-akdeniz-iklimi { background: #e0793a; }.map-lab-swatch-climate-karadeniz-iklimi { background: #2f9e5c; }.map-lab-swatch-climate-karasal-iklim { background: #c99a2e; }.map-lab-swatch-climate-sert-karasal-iklim { background: #3f6fd1; }.map-lab-swatch-climate-marmara-gecis-iklimi { background: #a855c7; }
.map-lab-swatch-mountain-kivrim-daglari { background: #8b5a2b; }.map-lab-swatch-mountain-kirik-daglar { background: #6a5acd; }.map-lab-swatch-mountain-volkanik-daglar { background: #c1440e; }
.map-lab-swatch-lake-tektonik-goller { background: #2563eb; }.map-lab-swatch-lake-karstik-goller { background: #06b6d4; }.map-lab-swatch-lake-volkanik-krater-maar { background: #7c3aed; }.map-lab-swatch-lake-volkanik-set { background: #0f766e; }.map-lab-swatch-lake-aluvyal-set { background: #16a34a; }.map-lab-swatch-lake-heyelan-set { background: #b45309; }.map-lab-swatch-lake-kiyi-set { background: #0284c7; }.map-lab-swatch-lake-buzul-golu-alanlari { background: #64748b; }
.map-lab-swatch-dam { background: #475569; }
.map-lab-swatch-plain-delta-ovalari { background: #0d9488; }.map-lab-swatch-plain-tektonik-fay-ovalari { background: #65a30d; }.map-lab-swatch-plain-karstik-ovalar { background: #ca8a04; }
.map-lab-swatch-plateau-karstik-plato { background: #78716c; }.map-lab-swatch-plateau-volkanik-plato { background: #ea580c; }.map-lab-swatch-plateau-asinim-tabaka-duzlugu { background: #a16207; }
.map-lab-swatch-agri-tahillar { background: #d97706; }.map-lab-swatch-agri-baklagiller { background: #15803d; }.map-lab-swatch-agri-endustri-bitkileri { background: #be123c; }.map-lab-swatch-agri-yag-bitkileri { background: #eab308; }.map-lab-swatch-agri-meyveler { background: #dc2626; }.map-lab-swatch-agri-aromatik-ve-sus-bitkileri { background: #ec4899; }
.map-lab-swatch-mineral-metalik-madenler { background: #52525b; }.map-lab-swatch-mineral-endustriyel-madenler-ve-taslar { background: #9a6b3d; }
.map-lab-swatch-energy-yenilenemeyen { background: #7c2d12; }.map-lab-swatch-energy-yenilenebilir { background: #059669; }
.map-lab-layer-toolbar { display: flex; gap: 8px; align-items: center; margin: 14px 0 10px; }
.map-lab-clear-btn { flex: 1 1 auto; width: 100%; min-height: 44px; padding: 8px 14px; font-size: 12.5px; white-space: nowrap; }
.map-lab-clear-btn:disabled { opacity: .5; cursor: default; }
.map-lab-layer-summary { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; margin: 0 0 12px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); font-size: 11.5px; color: var(--text-dim); }
.map-lab-layer-summary strong { color: var(--text); font-size: 13px; }
.map-lab-active-subtypes { color: var(--accent); font-weight: 650; }
.map-lab-category-list { display: grid; gap: 8px; max-height: 520px; overflow-y: auto; padding-right: 2px; }
.map-lab-category { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.map-lab-category.is-expanded { background: color-mix(in srgb, var(--accent) 4%, var(--surface-2)); }
.map-lab-category-head, .map-lab-subcat-head { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: center; padding: 5px 8px; }
.map-lab-category-head input, .map-lab-subcat-head input { width: 18px; height: 18px; accent-color: var(--accent); }
.map-lab-category-btn, .map-lab-subcat-btn { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; width: 100%; min-height: 44px; padding: 6px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-weight: 700; font-size: 12.5px; text-align: left; cursor: pointer; }
.map-lab-category-btn:hover, .map-lab-subcat-btn:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.map-lab-category-btn:focus-visible, .map-lab-subcat-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.map-lab-category-btn small, .map-lab-subcat-btn small { color: var(--text-dim); font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.map-lab-chevron { width: 16px; height: 16px; color: var(--text-dim); transition: transform .15s ease; }
.map-lab-category.is-expanded > .map-lab-category-head .map-lab-chevron, .map-lab-subcat.is-expanded > .map-lab-subcat-head .map-lab-chevron { transform: rotate(180deg); }
.map-lab-category-body { display: grid; gap: 6px; padding: 0 8px 8px; }
.map-lab-subcat { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.map-lab-subcat-body { display: grid; gap: 4px; padding: 0 6px 6px 30px; }
.map-lab-empty-note { margin: 4px 6px 6px; color: var(--text-dim); font-size: 11.5px; font-style: italic; }
.map-lab-map-panel { overflow: hidden; min-width: 0; }
.map-lab-canvas { position: relative; display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: linear-gradient(180deg, color-mix(in srgb, #bfe9ff 28%, var(--surface)) 0%, var(--surface) 62%); }
.map-lab-history-canvas { position: relative; height: auto; min-height: 0; aspect-ratio: 1000 / 650; overflow: hidden; border-radius: 17px; background: color-mix(in srgb, #c9dfe8 30%, var(--surface)); }
.map-lab-history-empty { position: absolute; inset: auto 18px 18px; display: grid; gap: 3px; max-width: 560px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--border)); border-radius: 12px; background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: var(--shadow-sm); pointer-events: none; }
.map-lab-history-empty strong { color: var(--text); font-size: 13px; }
.map-lab-history-empty span { color: var(--text-dim); font-size: 11px; line-height: 1.45; }
.history-region-map-shell { position: relative; width: 100%; height: 100%; min-height: 0; overflow: hidden; border-radius: 17px; background: #d7e5e6; isolation: isolate; }
.history-region-map { display: block; width: 100%; height: 100%; min-height: 0; cursor: grab; touch-action: none; user-select: none; }
.history-region-map.is-panning { cursor: grabbing; }
.history-region-sea { pointer-events: none; }
.history-region-grid { opacity: .32; pointer-events: none; }
.history-region-grid line { stroke: #6f8e9b; stroke-width: .75; stroke-dasharray: 3 6; vector-effect: non-scaling-stroke; }
.history-region-land { fill: color-mix(in srgb, #d7cba9 74%, var(--surface-2)); stroke: color-mix(in srgb, #657a80 58%, var(--border)); stroke-width: 1.15; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.history-region-boundary-group { filter: url(#history-boundary-shadow); }
.history-region-boundary-casing { fill: none; stroke: color-mix(in srgb, var(--boundary-color) 42%, #172033); stroke-width: 7; stroke-linejoin: round; stroke-linecap: round; opacity: .88; vector-effect: non-scaling-stroke; }
.history-region-boundary { fill: var(--boundary-color); fill-opacity: .48; stroke: color-mix(in srgb, var(--boundary-color) 46%, #fff); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; transition: fill-opacity .18s ease; }
.history-region-boundary-group.is-approximate .history-region-boundary-casing { stroke-dasharray: 9 5; opacity: .7; }
.history-region-boundary-group.is-approximate .history-region-boundary { fill-opacity: .36; stroke-dasharray: 9 5; }
.history-region-boundary-group.is-source-backed .history-region-boundary-casing { opacity: .96; }
.history-region-boundary-group.is-source-backed .history-region-boundary { fill-opacity: .52; }
.history-region-boundary-group:hover .history-region-boundary { fill-opacity: .58; }
.history-region-capital circle { fill: color-mix(in srgb, #fbbf24 24%, transparent); stroke: color-mix(in srgb, #fbbf24 52%, transparent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.history-region-capital polygon { fill: #fbbf24; stroke: #111827; stroke-width: 2.2; vector-effect: non-scaling-stroke; filter: drop-shadow(0 2px 2px rgba(0,0,0,.28)); }
.history-region-event { --event-color: var(--accent); color: var(--event-color); cursor: pointer; outline: none; }
.history-region-event-war { --event-color: #dc3f4f; }
.history-region-event-treaty { --event-color: #d78b16; }
.history-region-event-conquest { --event-color: #8b5cf6; }
.history-region-event-foundation { --event-color: #139b68; }
.history-region-event-document { --event-color: #247ac4; }
.history-region-event-movement { --event-color: #0f9c9a; }
.history-region-event-halo { fill: color-mix(in srgb, var(--event-color) 18%, transparent); stroke: color-mix(in srgb, var(--event-color) 42%, transparent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.history-region-event-badge { fill: color-mix(in srgb, var(--surface) 90%, #fff); stroke: var(--event-color); stroke-width: 3; vector-effect: non-scaling-stroke; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.history-region-event-symbol { color: var(--event-color); pointer-events: none; }
.history-region-event-symbol path { fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.history-region-event-label { opacity: .94; pointer-events: none; transition: opacity .16s ease; }
.history-region-event-label line { stroke: color-mix(in srgb, var(--event-color) 72%, #263849); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.history-region-event-label rect { fill: color-mix(in srgb, var(--surface) 91%, #fff); stroke: color-mix(in srgb, var(--event-color) 46%, var(--border)); stroke-width: 1.2; vector-effect: non-scaling-stroke; filter: drop-shadow(0 3px 5px rgba(15,23,42,.22)); }
.history-region-event-label text { fill: var(--text); font-size: 11.5px; font-weight: 800; letter-spacing: -.01em; }
.history-region-event.is-label-muted .history-region-event-label { opacity: 0; }
.history-region-event.is-label-muted:hover .history-region-event-label,
.history-region-event.is-label-muted:focus-visible .history-region-event-label { opacity: .96; }
.history-region-event.is-selected .history-region-event-halo { fill: color-mix(in srgb, var(--event-color) 30%, transparent); stroke: var(--event-color); }
.history-region-event.is-selected .history-region-event-badge { fill: var(--event-color); stroke: #fff; stroke-width: 3.5; }
.history-region-event.is-selected .history-region-event-symbol { color: #fff; }
.history-region-map-tools { position: absolute; z-index: 4; top: 14px; right: 14px; display: grid; gap: 6px; padding: 6px; border: 1px solid color-mix(in srgb, #506975 46%, var(--border)); border-radius: 13px; background: color-mix(in srgb, var(--surface) 90%, transparent); box-shadow: 0 8px 24px rgba(15,23,42,.16); backdrop-filter: blur(10px); }
.history-region-map-tools button { display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--text); font: 800 20px/1 inherit; cursor: pointer; }
.history-region-map-tools button:hover { background: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); color: var(--accent); }
.history-region-map-tools button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.map-lab-zoom-surface { position: relative; flex: 0 0 auto; width: 100%; aspect-ratio: 1052.3622 / 744.09448; min-height: 520px; overflow: hidden; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; contain: layout paint; }
.map-lab-zoom-surface * { user-select: none; -webkit-user-select: none; }
.map-lab-zoom-surface.is-panning { cursor: grabbing; }
.map-lab-zoom-viewport { position: absolute; inset: 0; width: 100%; height: 100%; transform-origin: center center; will-change: transform; }
.map-lab-base, .map-lab-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-lab-base { display: grid; place-items: center; }
.map-lab-base .tr-map { width: 100%; height: 100%; }
.map-lab-overlay { z-index: 2; overflow: visible; }
.map-lab-zoom-controls { position: absolute; z-index: 5; top: 14px; right: 14px; display: grid; gap: 6px; padding: 6px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); border-radius: 13px; background: color-mix(in srgb, var(--surface) 90%, transparent); box-shadow: 0 8px 24px rgba(15,23,42,.16); backdrop-filter: blur(10px); }
.map-lab-zoom-controls button { display: grid; width: 44px; height: 44px; place-items: center; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--text); font: 800 20px/1 inherit; cursor: pointer; }
.map-lab-zoom-controls button:hover { background: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); color: var(--accent); }
.map-lab-zoom-controls button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.map-lab-marker, .map-lab-geo-shape { cursor: pointer; outline: none; }
.map-lab-geo-shape, .map-lab-geo-callout, .map-lab-tray-chip {
  /* Selection stays in each feature's own color family instead of switching
     every layer to one global highlight color. */
  --map-feature-color: var(--accent);
  --map-feature-selected: color-mix(in srgb, var(--map-feature-color) 72%, #fff 28%);
  --map-feature-highlight: color-mix(in srgb, var(--map-feature-color) 42%, #fff 58%);
  --map-feature-surface: color-mix(in srgb, var(--map-feature-color) 24%, var(--surface) 76%);
  --map-feature-on: var(--text);
  --map-feature-glow: color-mix(in srgb, var(--map-feature-selected) 52%, transparent);
}
.map-lab-tone-river-main { --map-feature-color: #1d6fd6; }
.map-lab-tone-river-tributary { --map-feature-color: #5fc3f0; }
.map-lab-tone-lake { --map-feature-color: #2369c9; }
.map-lab-tone-plain { --map-feature-color: #61a534; }
.map-lab-tone-mountain-kivrim-daglari { --map-feature-color: #8b5a2b; }
.map-lab-tone-mountain-kirik-daglar { --map-feature-color: #6a5acd; }
.map-lab-tone-mountain-volkanik-daglar { --map-feature-color: #c1440e; }
.map-lab-tone-climate-akdeniz-iklimi { --map-feature-color: #e0793a; }
.map-lab-tone-climate-karadeniz-iklimi { --map-feature-color: #2f9e5c; }
.map-lab-tone-climate-karasal-iklim { --map-feature-color: #c99a2e; }
.map-lab-tone-climate-sert-karasal-iklim { --map-feature-color: #3f6fd1; }
.map-lab-tone-climate-marmara-gecis-iklimi { --map-feature-color: #a855c7; }
.map-lab-tone-lake-tektonik-goller { --map-feature-color: #2563eb; }
.map-lab-tone-lake-karstik-goller { --map-feature-color: #06b6d4; }
.map-lab-tone-lake-volkanik-krater-maar { --map-feature-color: #7c3aed; }
.map-lab-tone-lake-volkanik-set { --map-feature-color: #0f766e; }
.map-lab-tone-lake-aluvyal-set { --map-feature-color: #16a34a; }
.map-lab-tone-lake-heyelan-set { --map-feature-color: #b45309; }
.map-lab-tone-lake-kiyi-set { --map-feature-color: #0284c7; }
.map-lab-tone-lake-buzul-golu-alanlari { --map-feature-color: #64748b; }
.map-lab-tone-dam { --map-feature-color: #475569; }
.map-lab-tone-plain-delta-ovalari { --map-feature-color: #0d9488; }
.map-lab-tone-plain-tektonik-fay-ovalari { --map-feature-color: #65a30d; }
.map-lab-tone-plain-karstik-ovalar { --map-feature-color: #ca8a04; }
.map-lab-tone-plateau-karstik-plato { --map-feature-color: #78716c; }
.map-lab-tone-plateau-volkanik-plato { --map-feature-color: #ea580c; }
.map-lab-tone-plateau-asinim-tabaka-duzlugu { --map-feature-color: #a16207; }
.map-lab-tone-agri-tahillar { --map-feature-color: #d97706; }
.map-lab-tone-agri-baklagiller { --map-feature-color: #15803d; }
.map-lab-tone-agri-endustri-bitkileri { --map-feature-color: #be123c; }
.map-lab-tone-agri-yag-bitkileri { --map-feature-color: #eab308; }
.map-lab-tone-agri-meyveler { --map-feature-color: #dc2626; }
.map-lab-tone-agri-aromatik-ve-sus-bitkileri { --map-feature-color: #ec4899; }
.map-lab-tone-mineral-metalik-madenler { --map-feature-color: #52525b; }
.map-lab-tone-mineral-endustriyel-madenler-ve-taslar { --map-feature-color: #9a6b3d; }
.map-lab-tone-energy-yenilenemeyen { --map-feature-color: #7c2d12; }
.map-lab-tone-energy-yenilenebilir { --map-feature-color: #059669; }
.map-lab-marker circle { fill: color-mix(in srgb, var(--accent) 34%, var(--surface)); stroke: var(--accent); stroke-width: 4; vector-effect: non-scaling-stroke; transition: .18s ease; }
.map-lab-marker text, .map-lab-geo-shape text { fill: #fff; font-size: 15px; font-weight: 800; letter-spacing: .01em; pointer-events: none; }
.map-lab-callout-layer, .map-lab-geo-callout, .map-lab-geo-leader { pointer-events: none; }
.map-lab-geo-callout { transition: opacity .14s ease; outline: none; }
.map-lab-geo-label { pointer-events: all; cursor: pointer; outline: none; }
.map-lab-geo-leader { fill: none; stroke: color-mix(in srgb, var(--accent) 70%, #fff); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; filter: drop-shadow(0 1px 2px rgba(2, 8, 23, .7)); }
.map-lab-geo-label rect:not(.map-lab-geo-label-hit) { fill: color-mix(in srgb, var(--surface) 94%, #0f172a); stroke: color-mix(in srgb, var(--accent) 42%, var(--border)); stroke-width: 1.5; vector-effect: non-scaling-stroke; filter: drop-shadow(0 3px 5px rgba(2, 8, 23, .34)); transition: fill .16s ease, stroke .16s ease; }
.map-lab-geo-label-hit {
  /* The painted 48-unit rectangle is the complete hit target. Its real extent now exactly
     matches LABEL_HIT_HEIGHT in collision placement; an oversized invisible stroke used to
     overlap neighbouring bubbles and could make the wrong label intercept a click. */
  fill: rgba(0, 0, 0, .001);
  stroke: none;
  pointer-events: all;
}
.map-lab-geo-label text { fill: #f8fafc; font-size: 15px; font-weight: 750; letter-spacing: .01em; pointer-events: none; text-shadow: 0 1px 2px rgba(2,8,23,.72); }
.map-lab-geo-label:hover rect:not(.map-lab-geo-label-hit), .map-lab-geo-label:focus-visible rect:not(.map-lab-geo-label-hit) { fill: color-mix(in srgb, var(--accent) 24%, #152638); stroke: #c7e6ff; stroke-width: 2.5; }
.map-lab-marker.is-selected circle { fill: var(--accent); stroke: #fff; filter: drop-shadow(0 5px 5px rgba(0,0,0,.24)); }
.map-lab-geo-shape path { fill: color-mix(in srgb, var(--accent) 20%, transparent); stroke: var(--accent); stroke-width: 5; vector-effect: non-scaling-stroke; }
.map-lab-geo-shape circle { fill: var(--accent); stroke: #fff; stroke-width: 4; vector-effect: non-scaling-stroke; }
.map-lab-geo-river path { fill: none; stroke: #1597d4; }.map-lab-geo-lake path { fill: color-mix(in srgb, #2369c9 32%, transparent); stroke: #2369c9; }.map-lab-geo-plain path { fill: color-mix(in srgb, #61a534 30%, transparent); stroke: #61a534; }.map-lab-geo-climate_region path { fill: color-mix(in srgb, #7a55bf 24%, transparent); stroke: #7a55bf; stroke-dasharray: 9 6; }.map-lab-geo-mountain circle { fill: #c36b2d; }
/* Rivers: fluid rounded blue strokes, main channel bolder+solid, tributaries thinner+dashed
   so the two remain distinguishable without relying on color alone. Smoothed via
   smoothRiverPath (Catmull-Rom-to-Bezier); only line width/pattern change here. */
.map-lab-geo-river path:not(.map-lab-geo-hit) { stroke-linecap: round; stroke-linejoin: round; }
.map-lab-geo-river-main path:not(.map-lab-geo-hit) { stroke: #1d6fd6; stroke-width: 3.4; }
.map-lab-geo-river-tributary path:not(.map-lab-geo-hit) { stroke: #5fc3f0; stroke-width: 1.9; stroke-dasharray: 7 4; }
.map-lab-geo-river.is-selected path:not(.map-lab-geo-hit):not(.map-lab-river-flow) { stroke: var(--map-feature-selected); stroke-width: 5; filter: drop-shadow(0 0 6px var(--map-feature-glow)); }
.map-lab-geo-river.is-selected .map-lab-river-flow {
  pointer-events: none; fill: none; stroke: var(--map-feature-highlight); stroke-width: 2.4;
  stroke-linecap: round; stroke-dasharray: 8 16; vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 3px var(--map-feature-glow));
  animation: map-lab-river-flow 1.05s linear infinite;
}
.map-lab-river-mouth { pointer-events: none; fill: var(--map-feature-color); stroke: color-mix(in srgb, var(--map-feature-color) 45%, #fff); stroke-width: 2; vector-effect: non-scaling-stroke; }
.map-lab-geo-river.is-selected .map-lab-river-mouth { fill: var(--map-feature-selected); stroke: var(--map-feature-highlight); filter: drop-shadow(0 0 6px var(--map-feature-glow)); }
@keyframes map-lab-river-flow { to { stroke-dashoffset: -24; } }
/* Her iklim türü, renk körlüğünde de ayırt edilebilmesi için farklı renk + farklı kesikli çizgi deseni kullanır. */
.map-lab-geo-shape[data-feature-id="akdeniz-iklimi"] path { fill: color-mix(in srgb, #e0793a 26%, transparent); stroke: #e0793a; stroke-dasharray: 10 5; }
.map-lab-geo-shape[data-feature-id="karadeniz-iklimi"] path { fill: color-mix(in srgb, #2f9e5c 26%, transparent); stroke: #2f9e5c; stroke-dasharray: 3 4; }
.map-lab-geo-shape[data-feature-id="karasal-iklim"] path { fill: color-mix(in srgb, #c99a2e 26%, transparent); stroke: #c99a2e; stroke-dasharray: 7 3 1 3; }
.map-lab-geo-shape[data-feature-id="sert-karasal-iklim"] path { fill: color-mix(in srgb, #3f6fd1 26%, transparent); stroke: #3f6fd1; stroke-dasharray: 14 6; }
.map-lab-geo-shape[data-feature-id="marmara-gecis-iklimi"] path { fill: color-mix(in srgb, #a855c7 28%, transparent); stroke: #a855c7; stroke-dasharray: 5 3; }
/* Climate masks reuse the real province paths. Thin solid seams keep the full
   country coverage readable without the oversized dashed draft polygons. */
.map-lab-geo-climate_region [data-map-region] path { stroke-width: 1.5; stroke-dasharray: none; stroke-linejoin: round; }
.map-lab-geo-climate_region.is-selected [data-map-region] path { stroke: var(--map-feature-selected); stroke-width: 3; filter: drop-shadow(0 0 5px var(--map-feature-glow)); }
/* Dağ türleri (kıvrım/kırık/volkanik) tek renge değil; renk + çizgi deseni + dolgu + sembole (üçgen zirve işareti) birlikte dayanır. */
.map-lab-geo-mountain-kivrim-daglari path { fill: none; stroke: #8b5a2b; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.map-lab-geo-mountain-kirik-daglar path { fill: color-mix(in srgb, #6a5acd 22%, transparent); stroke: #6a5acd; stroke-width: 4; stroke-dasharray: 2 5; stroke-linecap: round; stroke-linejoin: round; }
.map-lab-geo-mountain-volkanik-daglar path { fill: color-mix(in srgb, #c1440e 26%, transparent); stroke: #c1440e; stroke-width: 4; stroke-dasharray: 1 3 6 3; stroke-linecap: round; }
/* Göl oluşum türleri: her alt tür kendi rengiyle ayrılır; ayrıca doğal göller düz kenarlı,
   baraj gölleri (aşağıda) kesikli kenarlı çizilerek renk körlüğünde de ayırt edilebilir. */
.map-lab-geo-lake-tektonik-goller path { fill: color-mix(in srgb, #2563eb 30%, transparent); stroke: #2563eb; }
.map-lab-geo-lake-karstik-goller path { fill: color-mix(in srgb, #06b6d4 30%, transparent); stroke: #06b6d4; }
.map-lab-geo-lake-volkanik-krater-maar path { fill: color-mix(in srgb, #7c3aed 30%, transparent); stroke: #7c3aed; }
.map-lab-geo-lake-volkanik-set path { fill: color-mix(in srgb, #0f766e 30%, transparent); stroke: #0f766e; }
.map-lab-geo-lake-aluvyal-set path { fill: color-mix(in srgb, #16a34a 28%, transparent); stroke: #16a34a; }
.map-lab-geo-lake-heyelan-set path { fill: color-mix(in srgb, #b45309 28%, transparent); stroke: #b45309; }
.map-lab-geo-lake-kiyi-set path { fill: color-mix(in srgb, #0284c7 30%, transparent); stroke: #0284c7; }
.map-lab-geo-lake-buzul-golu-alanlari path { fill: color-mix(in srgb, #64748b 24%, transparent); stroke: #64748b; stroke-dasharray: 2 4; }
/* Baraj gölleri: doğal göllerden ayırt etmek için tek renge güvenmeyip kesikli kenar kullanır
   (yapay rezervuar olduğunu vurgular), tonu ise kendi kategori rengidir (bkz. --map-feature-color). */
.map-lab-geo-dam path { fill: color-mix(in srgb, #475569 30%, transparent); stroke: #475569; stroke-dasharray: 6 3; }
/* Ova oluşum türleri: her alt tür kendi rengi ve kenar deseniyle ayrılır (renk körlüğünde de
   ayırt edilebilir olması için). Delta ovaları düz kenarlı (kıyı/ağız), tektonik/fay ovaları
   ince kesikli (fay hattı çağrışımı), karstik ovalar noktalı (karstik gözeneklilik çağrışımı). */
.map-lab-geo-plain-delta-ovalari path { fill: color-mix(in srgb, #0d9488 30%, transparent); stroke: #0d9488; }
.map-lab-geo-plain-tektonik-fay-ovalari path { fill: color-mix(in srgb, #65a30d 26%, transparent); stroke: #65a30d; stroke-dasharray: 10 4; }
.map-lab-geo-plain-karstik-ovalar path { fill: color-mix(in srgb, #ca8a04 26%, transparent); stroke: #ca8a04; stroke-dasharray: 1 4; stroke-linecap: round; }
/* Plato oluşum türleri: karstik platolar noktalı (karst ailesiyle tutarlı), volkanik platolar
   dağ volkanik desenine benzer nokta-çizgi, aşınım/tabaka düzlüğü platoları uzun kesikli
   (katmanlı yapı çağrışımı). */
.map-lab-geo-plateau-karstik-plato path { fill: color-mix(in srgb, #78716c 22%, transparent); stroke: #78716c; stroke-dasharray: 1 4; stroke-linecap: round; }
.map-lab-geo-plateau-volkanik-plato path { fill: color-mix(in srgb, #ea580c 24%, transparent); stroke: #ea580c; stroke-dasharray: 1 3 6 3; }
.map-lab-geo-plateau-asinim-tabaka-duzlugu path { fill: color-mix(in srgb, #a16207 22%, transparent); stroke: #a16207; stroke-dasharray: 12 4; }
/* Tarım ürünü alt türleri: iklim ve ova/plato katmanlarının altında (zTier 2) kaldığından, harita
   okunabilirliğini korumak için diğer kategorilere göre daha düşük dolgu opaklığı kullanır. Her
   alt tür kendi rengi ve kenar deseniyle ayrılır (renk körlüğünde de ayırt edilebilir olması için). */
.map-lab-geo-agri-tahillar path { fill: color-mix(in srgb, #d97706 16%, transparent); stroke: #d97706; stroke-width: 2; }
.map-lab-geo-agri-baklagiller path { fill: color-mix(in srgb, #15803d 16%, transparent); stroke: #15803d; stroke-width: 2; stroke-dasharray: 3 3; }
.map-lab-geo-agri-endustri-bitkileri path { fill: color-mix(in srgb, #be123c 16%, transparent); stroke: #be123c; stroke-width: 2; stroke-dasharray: 8 3 2 3; }
.map-lab-geo-agri-yag-bitkileri path { fill: color-mix(in srgb, #eab308 18%, transparent); stroke: #eab308; stroke-width: 2; stroke-dasharray: 1 3; stroke-linecap: round; }
.map-lab-geo-agri-meyveler path { fill: color-mix(in srgb, #dc2626 16%, transparent); stroke: #dc2626; stroke-width: 2; stroke-dasharray: 14 5; }
.map-lab-geo-agri-aromatik-ve-sus-bitkileri path { fill: color-mix(in srgb, #ec4899 18%, transparent); stroke: #ec4899; stroke-width: 2; stroke-dasharray: 2 2 6 2; }
/* Maden alt türleri (Faz 8): bu path kuralları yalnızca Tuz Gölü gibi Polygon kaynak alanlarını
   kapsar; asıl çıkarım/işleme ayrımı Point unsurlarda baklava dilimi/kare sembolüyle sağlanır
   (bkz. .map-lab-site-marker-*), salt renge dayanmaz. */
.map-lab-geo-mineral-metalik-madenler path { fill: color-mix(in srgb, #52525b 20%, transparent); stroke: #52525b; stroke-width: 2; stroke-dasharray: 10 2 2 2; }
.map-lab-geo-mineral-endustriyel-madenler-ve-taslar path { fill: color-mix(in srgb, #9a6b3d 20%, transparent); stroke: #9a6b3d; stroke-width: 2; stroke-dasharray: 4 4; }
/* Enerji alt türleri (Faz 8): yenilenemeyen/yenilenebilir ayrımı renk + kenar deseniyle; kaynak/
   potansiyel alanı ile üretim tesisi ayrımı yine Point sembol biçimiyle sağlanır. */
.map-lab-geo-energy-yenilenemeyen path { fill: color-mix(in srgb, #7c2d12 20%, transparent); stroke: #7c2d12; stroke-width: 2; stroke-dasharray: 12 4; }
.map-lab-geo-energy-yenilenebilir path { fill: color-mix(in srgb, #059669 20%, transparent); stroke: #059669; stroke-width: 2; stroke-dasharray: 2 2 8 2; }
/* Invisible, enlarged hit targets: use a painted near-transparent stroke because Chromium and
   WebKit may ignore fully transparent SVG paint for hit testing. non-scaling-stroke keeps the
   target comfortably clickable in real CSS pixels even when the complete map is zoomed out. */
.map-lab-geo-shape path.map-lab-geo-hit { pointer-events: stroke; fill: none; stroke: rgba(0,0,0,.001); stroke-width: 36; vector-effect: non-scaling-stroke; }
.map-lab-geo-shape path.map-lab-geo-hit-area { pointer-events: all; fill: rgba(0,0,0,.001); }
.map-lab-geo-shape circle.map-lab-geo-hit { pointer-events: all; fill: rgba(0,0,0,.001); stroke: rgba(0,0,0,.001); stroke-width: 32; vector-effect: non-scaling-stroke; }
.map-lab-volcano-marker { fill: #c1440e; stroke: #fff; stroke-width: 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.map-lab-geo-shape.is-selected .map-lab-volcano-marker { filter: drop-shadow(0 5px 5px rgba(0,0,0,.3)); stroke-width: 4; }
.map-lab-geo-shape.is-selected path:not(.map-lab-geo-hit):not(.map-lab-river-flow), .map-lab-geo-shape.is-selected circle:not(.map-lab-geo-hit):not(.map-lab-river-mouth) { stroke: var(--map-feature-selected); filter: drop-shadow(0 5px 5px var(--map-feature-glow)); stroke-width: 7; }
.map-lab-geo-mountain.is-selected path:not(.map-lab-geo-hit), .map-lab-geo-mountain.is-selected circle:not(.map-lab-geo-hit), .map-lab-geo-mountain.is-selected .map-lab-volcano-marker { fill: var(--map-feature-selected); stroke: var(--map-feature-highlight); stroke-width: 8; filter: drop-shadow(0 0 8px var(--map-feature-glow)); }
.map-lab-geo-mountain.is-selected path:not(.map-lab-geo-hit),
.map-lab-geo-mountain.is-selected circle:not(.map-lab-geo-hit),
.map-lab-geo-mountain.is-selected .map-lab-volcano-marker {
  animation: map-lab-mountain-pulse 1.65s ease-in-out infinite;
}
@keyframes map-lab-mountain-pulse {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 6px var(--map-feature-glow)); }
  50% { opacity: .78; filter: drop-shadow(0 0 13px color-mix(in srgb, var(--map-feature-selected) 68%, transparent)); }
}
/* Faz 8: çıkarım/kaynak/üretim-potansiyeli Point unsurları baklava dilimi (elmas), işleme/
   rafineri/santral gibi tesis unsurları kare sembolle çizilir - salt renge değil şekle de dayanan
   bir ayrım. Renk, unsurun kendi alt türünün --map-feature-color değişkeninden miras alınır. */
.map-lab-site-marker-extraction { fill: var(--map-feature-color); stroke: #fff; stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.map-lab-site-marker-facility { fill: var(--map-feature-color); stroke: #fff; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.map-lab-geo-shape.is-selected .map-lab-site-marker-extraction,
.map-lab-geo-shape.is-selected .map-lab-site-marker-facility {
  fill: var(--map-feature-selected); stroke: var(--map-feature-highlight); stroke-width: 3.5; filter: drop-shadow(0 0 7px var(--map-feature-glow));
}
.map-lab-geo-callout.is-selected .map-lab-geo-label rect:not(.map-lab-geo-label-hit) { fill: var(--map-feature-surface); stroke: var(--map-feature-highlight); stroke-width: 2.5; }
.map-lab-geo-callout.is-selected .map-lab-geo-label text { fill: var(--map-feature-on); text-shadow: none; }
.map-lab-geo-callout.is-selected .map-lab-geo-leader { stroke: var(--map-feature-selected); stroke-width: 3; stroke-dasharray: none; }
.map-lab-detail-empty p { color: var(--text-dim); font-size: 13px; line-height: 1.6; }
.map-lab-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.map-lab-mobile-layers-close { display: none; }
.map-lab-mobile-map-toolbar { display: none; }
.map-lab-mobile-selection { display: none; }
.map-lab-mobile-backdrop { display: none; }
.map-lab-map-note { position: absolute; z-index: 3; left: 14px; bottom: 14px; max-width: calc(100% - 28px); padding: 7px 10px; border: 1px solid var(--border); border-radius: 9px; background: color-mix(in srgb, var(--surface) 91%, transparent); color: var(--text-dim); font-size: 11px; backdrop-filter: blur(8px); }
.map-lab-geo-label { touch-action: manipulation; }

/* Map Feature Tray: a real (non-absolute) footer row below the map/SVG stage and optional
   mobile selection dock - never an
   overlay - guaranteeing access to every active feature regardless of how densely their
   geometry overlaps on the map itself. Height is reserved in normal flex flow (.map-lab-canvas
   is a column flex container), so the SVG stage above it shrinks to
   make room instead of this tray ever floating over the map. */
.map-lab-feature-tray {
  flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px;
  padding: 9px 10px calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, #0f172a);
}
.map-lab-feature-tray.is-empty { align-items: center; justify-content: center; min-height: 46px; padding: 10px; }
.map-lab-tray-empty-msg { margin: 0; color: var(--text-dim); font-size: 12.5px; text-align: center; }
.map-lab-tray-head { display: flex; align-items: center; justify-content: flex-end; }
.map-lab-tray-count { color: var(--text-dim); font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.map-lab-tray-body { position: relative; display: flex; align-items: stretch; gap: 4px; min-width: 0; }
.map-lab-tray-track {
  display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto;
  padding: 2px 2px 8px; overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth;
  scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--accent) 45%, var(--border)) transparent;
  user-select: none; -webkit-user-select: none; cursor: grab;
}
.map-lab-tray-track:active { cursor: grabbing; }
.map-lab-tray-track::-webkit-scrollbar { height: 6px; }
.map-lab-tray-track::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--accent) 45%, var(--border)); border-radius: 999px; }
.map-lab-tray-track::-webkit-scrollbar-track { background: transparent; }
.map-lab-tray-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; max-width: 220px;
  min-height: 40px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 650;
  cursor: pointer; touch-action: manipulation; transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.map-lab-tray-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-lab-tray-chip:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); background: color-mix(in srgb, var(--accent) 10%, var(--surface-2)); }
.map-lab-tray-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.map-lab-tray-chip.is-selected { border-color: var(--map-feature-highlight); background: var(--map-feature-surface); color: var(--map-feature-on); box-shadow: 0 4px 14px var(--map-feature-glow); }
.map-lab-tray-arrow {
  display: none; flex: 0 0 auto; width: 30px; place-items: center; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface-2); color: var(--text); font: 800 15px/1 inherit; cursor: pointer;
}
.map-lab-tray-arrow:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); color: var(--accent); }
.map-lab-tray-arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.map-lab-tray-arrow:disabled { opacity: .35; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .map-lab-feature-tray.is-overflowing .map-lab-tray-arrow { display: grid; }
}
@media (prefers-reduced-motion: reduce) {
  .map-lab-geo-callout, .map-lab-geo-label rect:not(.map-lab-geo-label-hit), .map-lab-tray-chip { transition: none; }
  .map-lab-tray-track { scroll-behavior: auto; }
  .map-lab-geo-river.is-selected .map-lab-river-flow,
  .map-lab-geo-mountain.is-selected path:not(.map-lab-geo-hit),
  .map-lab-geo-mountain.is-selected circle:not(.map-lab-geo-hit),
  .map-lab-geo-mountain.is-selected .map-lab-volcano-marker { animation: none; }
}
.map-lab-screen { overflow-anchor: none; }
.map-lab-detail-card { padding: 20px; }
.map-lab-detail-card h2 { margin: 10px 0 8px; font-size: 25px; line-height: 1.15; }
.map-lab-media-card { margin: 14px 0 16px; overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-2); }
.map-lab-media-frame { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: color-mix(in srgb, var(--surface-3) 78%, #dbeafe); }
.map-lab-media-frame img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; margin: 0; padding: 0; border: 0; object-fit: cover; object-position: var(--media-position, center); }
.map-lab-media-card figcaption { display: grid; gap: 7px; padding: 11px 12px 12px; }
.map-lab-media-heading { display: grid; gap: 4px; }
.map-lab-media-heading span { width: fit-content; padding: 3px 6px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.map-lab-media-heading strong { font-size: 13px; line-height: 1.35; }
.map-lab-media-card p, .map-lab-media-card small { margin: 0; color: var(--text-dim); font-size: 11px; line-height: 1.45; }
.map-lab-media-warning { padding: 7px 8px; border-left: 3px solid var(--warn); border-radius: 6px; background: color-mix(in srgb, var(--warn) 9%, transparent); }
.map-lab-credits { margin: 0 0 16px; padding: 2px 0; font-size: 11px; }
.map-lab-credits summary { cursor: pointer; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; color: var(--text-dim); font-weight: 700; list-style: revert; }
.map-lab-credits summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.map-lab-credits summary:hover { color: var(--text); }
.map-lab-credits-count { display: inline-grid; place-items: center; min-width: 16px; height: 16px; margin-left: 4px; padding: 0 4px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-size: 10px; font-weight: 800; }
.map-lab-credits[open] summary { border-radius: 10px 10px 0 0; }
.map-lab-credits-list { display: grid; gap: 9px; margin: 0; padding: 10px 12px 11px; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 10px 10px; list-style: none; }
.map-lab-credits-list li { display: grid; gap: 2px; }
.map-lab-credits-list strong { color: var(--text); font-size: 11.5px; }
.map-lab-credits-links { display: flex; flex-wrap: wrap; gap: 10px; }
.map-lab-credits-links a { color: var(--accent); font-size: 11px; font-weight: 750; text-decoration: none; }
.map-lab-credits-links a:hover { text-decoration: underline; }
.map-lab-credits-attribution { color: var(--text-dim); font-size: 10.5px; line-height: 1.4; }
.map-lab-legend { margin: 0 0 12px; padding: 2px 0; font-size: 11px; }
.map-lab-legend summary { cursor: pointer; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; color: var(--text-dim); font-weight: 700; list-style: revert; }
.map-lab-legend summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.map-lab-legend summary:hover { color: var(--text); }
.map-lab-legend[open] summary { border-radius: 10px 10px 0 0; }
.map-lab-legend-list { display: grid; gap: 8px; margin: 0; padding: 10px 12px 11px; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 10px 10px; list-style: none; }
.map-lab-legend-list li { display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 11px; }
.map-lab-legend-icon { width: 18px; height: 18px; flex: none; }
.map-lab-legend-icon .map-lab-site-marker-extraction, .map-lab-legend-icon .map-lab-site-marker-facility { fill: var(--accent); stroke: #fff; stroke-width: 1.5; }
.map-lab-detail-meta, .map-lab-detail-footer { display: flex; flex-wrap: wrap; gap: 7px; }
.map-lab-detail-meta span, .map-lab-detail-footer span { padding: 5px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-dim); font-size: 11px; font-weight: 700; }
.map-lab-lead { color: var(--text-dim); line-height: 1.6; }
.map-lab-detail-overview { display: grid; gap: 7px; margin-top: 12px; padding: 13px 14px; border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border)); border-radius: 12px; background: color-mix(in srgb, var(--accent) 7%, var(--surface-2)); }
.map-lab-detail-overview strong { color: var(--accent); font-size: 12px; }
.map-lab-detail-overview p { margin: 0; color: var(--text); font-size: 13px; line-height: 1.55; }
.map-lab-detail-overview small { color: var(--text-dim); font-size: 11px; line-height: 1.45; }
.map-lab-facts { display: grid; gap: 8px; margin: 16px 0; }
.map-lab-facts div { display: grid; grid-template-columns: 66px 1fr; gap: 8px; }
.map-lab-facts dt { color: var(--text-dim); font-size: 12px; }.map-lab-facts dd { margin: 0; font-size: 13px; font-weight: 650; }
.map-lab-detail-section { padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--border); }
.map-lab-detail-section h3 { margin: 0 0 7px; font-size: 14px; }.map-lab-detail-section p, .map-lab-detail-section li { color: var(--text-dim); font-size: 13px; line-height: 1.55; }.map-lab-detail-section ul { margin: 0; padding-left: 18px; }
.map-lab-state-list, .map-lab-capital-list { display: grid; gap: 10px; }
.map-lab-state-row { display: grid; grid-template-columns: 12px 1fr; gap: 9px; align-items: start; }
.map-lab-state-row > span { width: 11px; height: 11px; margin-top: 4px; border-radius: 3px; background: var(--state-color); box-shadow: 0 0 0 2px color-mix(in srgb, var(--state-color) 20%, transparent); }
.map-lab-state-row strong { font-size: 13px; }
.map-lab-state-row p { margin: 3px 0 0; font-size: 11.5px; }
.map-lab-capital-list > div { display: grid; grid-template-columns: 20px 1fr; gap: 7px; align-items: start; }
.map-lab-capital-list > div > span { color: #d69e00; font-size: 16px; line-height: 1.2; }
.map-lab-capital-list p { display: grid; gap: 2px; margin: 0; }
.map-lab-capital-list small { color: var(--text-dim); font-size: 11px; line-height: 1.35; }
.map-lab-selected-event > strong { display: block; margin-bottom: 4px; font-size: 13px; }
.map-lab-event-importance { padding: 10px 11px; border-left: 3px solid var(--accent); border-radius: 8px; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.map-lab-detail-footer { margin-top: 18px; }
.map-lab-attribution { max-width: 1480px; margin: 14px auto 0; color: var(--text-dim); font-size: 10px; text-align: right; }
.map-lab-attribution a { color: inherit; font-weight: 750; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); text-underline-offset: 2px; }
.map-lab-attribution a:hover { color: var(--accent); }
.map-lab-loading { display: grid; place-items: center; align-content: center; gap: 12px; text-align: center; }
@media (max-width: 1120px) {
  .map-lab-layout { grid-template-columns: minmax(210px, 260px) 1fr; }
  .map-lab-detail-panel { grid-column: 1 / -1; }
}
@media (max-width: 1350px) and (min-width: 721px) {
  .map-lab-layout.is-history { grid-template-columns: minmax(210px, 235px) minmax(0, 1fr); grid-template-areas: "controls map" "details details"; }
  .map-lab-layout.is-history .map-lab-detail-panel { grid-column: auto; }
}
@media (max-width: 720px) {
  .map-lab-screen { padding: 16px 12px 26px; }
  .map-lab-header { align-items: flex-start; }.map-lab-header p { font-size: 13px; }
  .map-lab-home-link { min-width: 44px; padding: 0 11px; }
  .map-lab-home-link span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .map-lab-mode-switch { display: flex; width: 100%; }.map-lab-mode-switch button { flex: 1; min-width: 0; }
  .map-lab-timeline { padding: 14px 12px 11px; }
  .map-lab-timeline-head { align-items: start; gap: 10px; }
  .map-lab-timeline-head strong { font-size: 26px; }
  .map-lab-timeline-head p { max-width: 55%; font-size: 10.5px; }
  .map-lab-timeline-stops { display: flex; overflow-x: auto; padding-bottom: 3px; scroll-snap-type: x proximity; }
  .map-lab-timeline-stops button { flex: 0 0 116px; scroll-snap-align: start; }
  .map-lab-layout, .map-lab-layout.is-history { grid-template-columns: minmax(0, 1fr); }
  .map-lab-layout.is-history { grid-template-areas: "map" "controls" "details"; }
  .map-lab-map-panel, .map-lab-detail-panel { grid-column: auto; }
  .map-lab-map-panel { padding: 6px; border-radius: 20px; }
  .map-lab-canvas { min-height: 0; }
  .map-lab-zoom-surface { min-height: min(64vh, 520px); }
  .map-lab-map-panel:not(.is-mobile-expanded) .map-lab-zoom-surface { touch-action: pan-y; }
  .map-lab-map-panel.is-mobile-expanded .map-lab-zoom-surface { touch-action: none; }
  .map-lab-history-canvas { height: auto; min-height: 0; aspect-ratio: 1000 / 650; border-radius: 14px; }
  .history-region-map-shell, .history-region-map { height: 100%; min-height: 0; border-radius: 14px; }
  .history-region-map-tools { top: 10px; right: 10px; gap: 4px; padding: 5px; }
  .history-region-map-tools button { width: 32px; height: 32px; }
  .map-lab-zoom-controls { top: 8px; right: 8px; gap: 8px; padding: 6px; }
  .map-lab-zoom-controls button { width: 48px; height: 48px; }
  /* SVG callouts become physically too small on narrow viewports. Hide only those floating
     labels; every active feature remains selectable from the 44px native-button tray below. */
  .map-lab-geo-callout { display: none; }
  .map-lab-year-list { display: flex; overflow-x: auto; padding-bottom: 4px; }
  .map-lab-control-card, .map-lab-year-list { min-width: 0; max-width: 100%; }
  .map-lab-year-btn { min-width: 145px; }
  .map-lab-attribution { text-align: left; }
  .map-lab-layer-toolbar { flex-wrap: wrap; }
  .map-lab-category-list { max-height: 360px; }

  /* Geography mode only: the layer panel becomes a bottom-sheet drawer instead of a long
     column the user must scroll past before ever seeing the map. History mode's control
     panel (period info) is short and stays in normal flow, so it is explicitly excluded. */
  .map-lab-layout:not(.is-history) .map-lab-control-panel {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 60;
    max-height: 80vh;
    margin: 0;
    border-radius: 18px 18px 0 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateY(105%);
    transition: transform .26s ease;
    box-shadow: 0 -14px 34px rgba(0,0,0,.28);
  }
  .map-lab-layout:not(.is-history) .map-lab-control-panel.is-mobile-open { transform: translateY(0); }
  .map-lab-mobile-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(15,23,42,.45); }
  .map-lab-panel-head { margin-bottom: 4px; }
  .map-lab-mobile-layers-close { display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font-size: 18px; cursor: pointer; }
  .map-lab-mobile-layers-close:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

  .map-lab-mobile-map-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
  .map-lab-mobile-layers-btn, .map-lab-mobile-expand-btn {
    display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 14px;
    border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--text);
    font: inherit; font-weight: 700; font-size: 13px; cursor: pointer;
  }
  .map-lab-mobile-layers-btn:focus-visible, .map-lab-mobile-expand-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .map-lab-mobile-expand-btn[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: transparent; }
  .map-lab-mobile-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; }

  .map-lab-mobile-selection { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 60px; margin: 0; padding: 8px 12px; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: var(--surface-2); }
  .map-lab-mobile-selection span { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .map-lab-mobile-selection button { flex: 0 0 auto; min-height: 44px; padding: 0 12px; border: 0; border-radius: 9px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; font-size: 12px; cursor: pointer; }

  /* "Haritayı büyüt": a full-viewport expanded map workspace that does not depend on the
     Fullscreen API (whose support/permission behavior varies across mobile browsers). */
  .map-lab-map-panel.is-mobile-expanded {
    position: fixed; inset: 0; z-index: 70; margin: 0; border-radius: 0; padding: 10px;
    display: flex; flex-direction: column; background: var(--surface);
  }
  .map-lab-map-panel.is-mobile-expanded .map-lab-canvas { flex: 1 1 auto; min-height: 0; }
  .map-lab-map-panel.is-mobile-expanded .map-lab-zoom-surface { flex: 1 1 auto; width: auto; min-height: 0; aspect-ratio: auto; }

  .map-lab-tray-chip { min-height: 44px; font-size: 13px; }
}
@media (max-height: 500px) and (orientation: landscape) and (max-width: 1000px) {
  /* Short/landscape phones (e.g. a phone rotated to ~812x375): a side drawer suits the
     limited vertical space better than a bottom sheet, but the same map-first principle
     and control set apply. */
  .map-lab-layout:not(.is-history) .map-lab-control-panel {
    position: fixed; inset: 0 0 0 auto; z-index: 60; width: min(86vw, 360px); height: 100%;
    max-height: none; margin: 0; border-radius: 18px 0 0 18px; overflow-y: auto; overscroll-behavior: contain;
    transform: translateX(105%); transition: transform .26s ease; box-shadow: -14px 0 34px rgba(0,0,0,.28);
  }
  .map-lab-layout:not(.is-history) .map-lab-control-panel.is-mobile-open { transform: translateX(0); }
  .map-lab-mobile-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(15,23,42,.45); }
  .map-lab-mobile-layers-close { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font-size: 16px; cursor: pointer; }
  .map-lab-mobile-map-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
  .map-lab-mobile-layers-btn, .map-lab-mobile-expand-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); font: inherit; font-weight: 700; font-size: 12px; cursor: pointer; }
  .map-lab-mobile-expand-btn[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: transparent; }
  .map-lab-mobile-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; }
  .map-lab-mobile-selection { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px; margin: 0; padding: 6px 10px; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: var(--surface-2); }
  .map-lab-canvas { min-height: 0; }
  .map-lab-zoom-surface { min-height: 260px; }
  .map-lab-geo-callout { display: none; }
  .map-lab-map-panel:not(.is-mobile-expanded) .map-lab-zoom-surface { touch-action: pan-y; }
  .map-lab-map-panel.is-mobile-expanded .map-lab-zoom-surface { touch-action: none; }
  .map-lab-map-panel.is-mobile-expanded { position: fixed; inset: 0; z-index: 70; margin: 0; border-radius: 0; padding: 8px; display: flex; flex-direction: column; background: var(--surface); }
  .map-lab-map-panel.is-mobile-expanded .map-lab-canvas { flex: 1 1 auto; min-height: 0; }
  .map-lab-map-panel.is-mobile-expanded .map-lab-zoom-surface { flex: 1 1 auto; width: auto; min-height: 0; aspect-ratio: auto; }
  .map-lab-tray-chip { min-height: 44px; font-size: 12.5px; }
  .map-lab-feature-tray { padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
}
