/* Birleştirilmiş stil paketi (scripts/bundle-assets.js). Kaynak: css/ ve css/views/ dosyaları. */

/* ---- css/ink.css ---- */
/* Mürekkep şişesi bileşeni (public/js/ink.js). Tüm sınıflar dmInk önekli; renkler uygulama belirteçlerinden. */
.dmInk { --dmi-ink2: color-mix(in srgb, var(--brand) 72%, #000); --dmi-ok: var(--ok, #2f8f5b); text-align: center; color: var(--ink); }
.dmInk-svg { width: 260px; max-width: 100%; height: auto; overflow: visible; display: block; margin: 0 auto; }
.dmInk-num { font-size: var(--fs-2xl); font-weight: 700; line-height: 1.1; }
.dmInk-num small { font-size: var(--fs-sm); font-weight: 500; color: var(--muted); }
.dmInk-sub { color: var(--muted); font-size: var(--fs-sm); }
.dmInk-rankRow { display: flex; gap: 6px; align-items: center; justify-content: center; color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; }
.dmInk-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 10px 0 4px; }
.dmInk-bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width 0.6s ease; }
.dmInk-vision { margin: 10px 8px 0; padding-top: 10px; border-top: 1px dashed var(--line); font-size: var(--fs-sm); font-weight: 600; color: var(--ink); text-wrap: balance; }
.dmInk-story { font-size: var(--fs-sm); font-style: italic; color: var(--muted); margin: 4px 8px 0; min-height: 2.4em; }
.dmInk-note { min-height: 48px; margin: 8px 0; padding: 8px 10px; border-radius: 10px; font-size: var(--fs-sm); border: 1px solid var(--line); text-align: left; opacity: 0; transition: opacity 0.3s; }
.dmInk-note.dmInk-show { opacity: 1; }
.dmInk-note.dmInk-bad { border-color: var(--bad); }
.dmInk-note.dmInk-ok { border-color: var(--dmi-ok); }
.dmInk-note b { display: block; }
.dmInk-shelf { display: flex; gap: 6px; justify-content: center; align-items: flex-end; margin: 6px 0 4px; padding: 6px 8px 0; border-bottom: 5px solid #b98a55; border-radius: 2px; }
.dmInk-slot { width: 42px; text-align: center; }
.dmInk-slot svg { width: 100%; height: auto; display: block; margin: 0 auto; }
.dmInk-slot small { display: block; font-size: var(--fs-xs); color: var(--muted); line-height: 1.2; padding: 2px 0 3px; }
.dmInk-slot.dmInk-locked svg { opacity: 0.28; }
.dmInk-slot.dmInk-slotPop svg { animation: dmInkSlotPop 0.5s cubic-bezier(0.2, 1.5, 0.4, 1); }
.dmInk-slot.dmInk-cur svg { outline: 2px dashed var(--brand); outline-offset: 2px; border-radius: 6px; }
.dmInk-info { width: 22px; height: 22px; padding: 0; border-radius: 50%; background: transparent; color: var(--brand-text); border: 1.5px solid var(--brand); font: italic 700 var(--fs-xs) / 1 Georgia, serif; cursor: pointer; }
/* Genel `button:hover` (koyu marka zemin) yazıyı yutuyordu: "i" koyu yeşil üstünde
   kayboluyordu (kontrast 8,3 → 1,3). Kendi hover'ı: açık marka zemin, yazı aynı. */
.dmInk-info:hover, .dmInk-info:focus-visible { background: var(--brand-soft); color: var(--brand-text); }
.dmInk-scrim { position: fixed; inset: 0; z-index: 1300; background: rgba(0, 0, 0, 0.35); }
.dmInk-scrim[hidden], .dmInk-pop[hidden] { display: none; }
.dmInk-pop { position: fixed; z-index: 1310; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(340px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 14px 10px; box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25); font-size: var(--fs-sm); color: var(--ink); }
.dmInk-pop h4 { margin: 10px 0 2px; font-size: var(--fs-sm); }
.dmInk-pop h4:first-of-type { margin-top: 0; }
.dmInk-pop p { margin: 0; color: var(--muted); }
.dmInk-x { position: absolute; right: 6px; top: 6px; width: 24px; height: 24px; padding: 0; background: transparent; color: var(--muted); font-size: var(--fs-md); border: 0; border-radius: 6px; cursor: pointer; }
.dmInk-path { list-style: none; margin: 4px 0 0; padding: 0; }
.dmInk-path li { padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.dmInk-path b { color: var(--ink); }
.dmInk-path li:last-child { border: 0; }
.dmInk-bub { fill: #fff; opacity: 0.35; animation: dmInkRise 4s ease-in infinite; }
.dmInk-wave1 { animation: dmInkW1 3.2s linear infinite; }
.dmInk-wave2 { animation: dmInkW2 5s linear infinite; }
.dmInk-float { font-weight: 700; font-size: var(--fs-md); paint-order: stroke; stroke: var(--panel); stroke-width: 3px; }
.dmInk-sheen { pointer-events: none; }
@keyframes dmInkRise { 0% { transform: translateY(0) scale(0.6); opacity: 0; } 15% { opacity: 0.45; } 100% { transform: translateY(-120px) scale(1); opacity: 0; } }
@keyframes dmInkW1 { to { transform: translateX(-60px); } }
@keyframes dmInkW2 { to { transform: translateX(60px); } }
@keyframes dmInkSlotPop { from { transform: scale(0.2); } to { transform: scale(1); } }
html[data-anim="off"] .dmInk-bub { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="full"]) .dmInk-bub, html:not([data-motion="full"]) .dmInk-wave1, html:not([data-motion="full"]) .dmInk-wave2 { animation: none; }
}
/* Görev ödül ekranı: şişe bileşeni kartın içinde */
.rewardCard .dmInk-svg { width: 220px; }

;
/* ---- css/styles.css ---- */
/* ---- Tipografi: kendinden barındırılan değişken fontlar ----
   Uygulama çevrimdışı da çalıştığı için font CDN'i YOK; dosyalar public/fonts
   altında ve sw.js SHELL'inde. Türkçe glifler (ğ ş İ ı) latin-ext kümesinde.
   İki alt küme de tanımlanır: unicode-range ayrımı tarayıcıya bırakılır. */
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/literata-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/literata-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/plex-sans-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/plex-sans-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  font-family: "IBM Plex Sans", -apple-system, "Segoe UI", Arial, sans-serif;
  /* Başlık/okuma yüzü. Arayüz metni Plex Sans'ta kalır. */
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --brand: #1f4e3d;
  --brand-dark: #173b2e;
  --brand-hover: #173b2e;
  /* Yazı olarak marka rengi: gündüz tema rengiyle aynı (applyBrand --brand-seed). */
  --brand-text: var(--brand-seed, #1f4e3d);
  /* Koyu marka tonuyla yazı (vurgulu bağlantı/hover): gündüz --brand-dark, gece açık ton. */
  --brand-text-strong: var(--brand-dark);
  --brand-text-hover: var(--brand-hover);
  --brand-soft: #e9f0eb;
  /* Marka zemin üzerindeki metin/topuz: iki temada da beyaz kalır. */
  --on-brand: #ffffff;
  --ink: #1e1c19;
  --muted: #5e574c;
  --line: #ded7c8;
  --surface: #fffdf7;
  --bg: #f3efe6;
  --ok: #1f6b46;
  --ok-bg: #e6f2ea;
  --bad: #8f3a32;
  --bad-bg: #f8ebe8;
  --warn: #7a5a17;
  --warn-bg: #f8f0da;
  --panel: #f8f4ea;
  --panel-2: #fffefa;
  --chip: #efe9db;
  --thead: #f5f0e4;
  --hover: #f0ebdf;
  --row-hover: #f7f2e7;
  --earned: #edf5ef;
  --track: #e6dfd0;
  --done: #d9e9dd;
  --ok-soft: #e6f2ea;
  --bad-soft: #f8ebe8;
  --tick: #8a8275;
  --center: #1e1c19;
  --field-border: #958c7a;
  --accent: #2f6b52;
  /* Zorluk yıldızı: palet-dışı bağıran altın yerine ochre (chart-3 tonu). */
  --star: #a07a3c;
  --chart-empty: #eee7d8;
  /* Grafik paleti: kâğıt zeminle uyumlu, doygunluğu düşük tonlar.
     SVG'de var() ile kullanılır — koyu temada otomatik değişir. */
  --chart-1: #2f6b52;
  --chart-2: #6f9a80;
  --chart-3: #a07a3c;
  --chart-4: #a8503f;
  --chart-5: #4e6e8c;
  --chart-6: #75608a;
  --chart-7: #6b7a4f;
  --chart-8: #96643c;
  /* Köşe yarıçapı: defter/editoryal dil — 12px kart yuvarlaklığı yerine 4px. */
  --radius: 4px;
  /* F3.1 yardımcı belirteçler: boşluk, yarıçap, hareket. --r-sm, --radius ile
     aynı değerdedir (görsel değişmesin); --radius'a dokunulmaz. */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --r-sm: 4px;
  --r-md: 8px;
  --r-full: 999px;
  --t-fast: 120ms;
  --t-med: 220ms;
  --ease: cubic-bezier(.2,.7,.2,1);
  /* Topbar yüksekliği: açılır paneller (zil/aktif) buna yapışır. */
  --topbar-h: 3rem;
  /* Topbar'ın görünür alt kenarı (bantlar dahil, shell.js ölçer). */
  --shell-top: 3rem;
  /* V2 masaüstü masthead yüksekliği: bar + yerleşim + içerik AYNI sayıyı okur.
     Elle 64/72 gibi tekrarlanmaz; bar kısalınca üçü birlikte kayar. */
  --masthead-h: 48px;
  /* Sessiz Kabuk: tipografi ölçeği (12/13/16/20/26/32 px). */
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-md: 1rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.625rem;
  --fs-2xl: 2rem;
  /* Yüzen paneller (toast/modal/bell) için tek yükseltme gölgesi —
     kartlar gölgesizdir: 1px bordür + zemin farkı derinliği verir. */
  --shadow-pop: 0 10px 30px rgba(40, 34, 24, 0.14);
  /* select oku (data URI): koyu temada ayrı ton tanımlanır. */
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b6459' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Faz 6: karanlık tema */
[data-theme="dark"] {
  color-scheme: dark;
  --brand: #35755a;
  --brand-dark: #275742;
  --brand-hover: #275742;
  --brand-text: #9ed3b8;
  --brand-soft: #1c3328;
  --ink: #eae4d8;
  --muted: #a89f8f;
  --line: #37332b;
  --surface: #1b1915;
  --bg: #131210;
  --ok: #7fc79f;
  --ok-bg: #16301f;
  --bad: #ef9a90;
  --bad-bg: #3a1d1a;
  --warn: #e2c184;
  --warn-bg: #33280f;
  --panel: #22201b;
  --panel-2: #26231e;
  --chip: #2b2822;
  --thead: #232019;
  --hover: #2b2822;
  --row-hover: #26231d;
  --earned: #1a2b20;
  --track: #3a352c;
  --done: #24402f;
  --ok-soft: #16301f;
  --bad-soft: #3a1d1a;
  --tick: #9b9384;
  --center: #eae4d8;
  --field-border: #746c5d;
  --accent: #7fbfa2;
  --star: #d0a566;
  --chart-empty: #2b2822;
  --chart-1: #7fbfa2;
  --chart-2: #5f9a7c;
  --chart-3: #d0a566;
  --chart-4: #d8816f;
  --chart-5: #8fb0c9;
  --chart-6: #b49ac4;
  --chart-7: #a8b57f;
  --chart-8: #c99a6b;
  --shadow-pop: 0 10px 30px rgba(0, 0, 0, 0.45);
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a89f8f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Koyu tema + platform tema rengi: applyBrand rengi satır içi `--brand` olarak yazıyor ve
   bu tema kuralını eziyordu; koyu zeminde koyu yeşil yazı/düğme okunmuyordu (canlı
   #09704B, varsayılan tema "auto" → gece modundaki telefonlar). Tonlar v2'daki gibi
   tohumdan türetilir (!important satır içini geçer): düğme zemini %90 (beyaz yazı ≥4,5),
   yazı tonu %45 beyaz (koyu yüzeyde ~8,5). V2 kendi tonlarını v2.css'te tanımlar. */
html[data-theme="dark"]:not([data-ui-tema="v2"]) {
  --brand: color-mix(in srgb, var(--brand-seed, #1f4e3d) 90%, #fff) !important;
  --brand-dark: var(--brand-seed, #1f4e3d) !important;
  --brand-text: color-mix(in srgb, var(--brand-seed, #1f4e3d) 45%, #fff);
  --brand-text-strong: var(--brand-text);
  --brand-text-hover: color-mix(in srgb, var(--brand-seed, #1f4e3d) 35%, #fff);
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: var(--panel-2);
  color: var(--ink);
  border-color: var(--field-border);
}

[data-theme="dark"] ::placeholder { color: var(--muted); }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: var(--fs-md);
  line-height: 1.5;
}

/* Sessiz Kabuk: başlık hiyerarşisi tek ölçekten gelir (h1/h2 22, h3 18). */
h1 { font-size: var(--fs-xl); line-height: 1.25; }
h2 { font-size: var(--fs-xl); line-height: 1.25; }
h3 { font-size: var(--fs-lg); line-height: 1.35; }

.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar h1 { margin: 0; font-size: 1.15rem; }
.topbar p { margin: 0.15rem 0 0; font-size: 0.8rem; color: var(--muted); }
/* Marka başlığı "eve döner" düğmesi: tıklanabilirlik hissi ver.
   Global button dolgusu (var(--brand)) burada görünmemeli — topbar zeminsel. */
.brandHome { cursor: pointer; background: transparent; color: var(--ink); border: none; border-radius: 8px; padding: 0.1rem 0.35rem; margin-left: -0.35rem; transition: background 0.15s ease; }
.brandText { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.brandHome:hover { background: var(--hover); }
/* Klavye ile gelen kullanıcı odak işaretini kaybetmesin. */
.brandHome:focus-visible { background: var(--hover); outline: 2px solid var(--brand); outline-offset: 2px; }

.iconButton {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 1.2rem;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
}

.userBadge {
  margin-left: auto;
  background: var(--chip);
  color: var(--brand-text-strong);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  /* Düğme olduğu için dağ iç>button UA yazı tipi ezmesi: önce inherit,
     sonra ölçü — mobil media kuralı (daha sonraki blokta) kazanabilecek. */
  font: inherit;
  font-size: 0.8rem;
}

/* Koyu tema rozet rengi tasarım katmanında (var(--ink)) — eski mavi kaçak silindi. */

.layout {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  max-width: 1180px;
  margin: 1rem auto;
  padding: 0 1rem 2rem;
}

.sidebar {
  width: 232px;
  flex: 0 0 232px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.5rem;
  position: sticky;
  /* Uzun menü (yönetici ~30 öğe) viewport'tan uzunsa sticky sidebar altta
     taşar ve alt öğeler hiç görünmez (kullanıcı raporu 2026-10-27).
     Çözüm: sidebar kendi içinde kayar; aktif öğe shell.js tarafından
     görünen alana hizalanır. top, ölçülen topbar yüksekliğini izler. */
  top: calc(var(--topbar-h) + 0.5rem);
  max-height: calc(100vh - var(--topbar-h) - 1rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  display: grid;
  gap: 0.3rem;
}

.sidebar nav { display: grid; gap: 0.25rem; }

.navItem {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--ink);
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
}

.navItem:hover { background: var(--hover); }
.navItem.active { background: var(--brand); color: #fff; }
.navItem.logout { color: var(--bad); margin-top: 0.4rem; }
/* Sürüm rozeti: sidebar altında soluk küçük metin (hata bildirimi için). */
.appVersion { margin-top: 0.5rem; padding: 0.2rem 0.5rem; font-size: 0.68rem; color: var(--muted); text-align: right; user-select: all; }

.sidebarForm { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.6rem 0.75rem; border-top: 1px solid var(--line); margin-top: 0.6rem; }
.sidebarForm input { padding: 0.45rem 0.6rem; border: 1px solid var(--line); font-size: 0.85rem; }
.sidebarForm button { padding: 0.45rem 0.6rem; font-size: 0.85rem; }

.content { flex: 1; min-width: 0; }

.card,
.view {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
}

.view h2 { margin: 0 0 1rem; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

form { display: grid; gap: 0.75rem; }

input, textarea, select, button {
  font: inherit;
  padding: 0.65rem;
  border-radius: 8px;
  border: 1px solid #d5dcec;
}

/* Uzun seçenek metinleri select'in min-içerik genişliğini büyütüp grid
   izgarasını şişirir (dar ekranda taşma) → alanlar kaba sıkışabilir. */
input, textarea, select { min-width: 0; }
fieldset { min-width: 0; }
form > *, .filters > *, .optionsGrid > * { min-width: 0; }
/* Dosya kutusunun gölge içeriği (seç düğmesi + dosya adı) kutu dışına
   taşabilir → kırp (dar ekranda form genişliğini şişirmesin). */
input[type="file"] { max-width: 100%; overflow: hidden; }

button {
  border: none;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  padding: 0.5rem 0.875rem;
}

button:hover { background: var(--brand-dark); }
/* İkincil eylem: dolgulu gri yerine sessiz çerçeve — birincil mavi tek kahraman kalır. */
button.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--field-border);
}
button.secondary:hover { background: var(--hover); }
/* Üst bardaki saydam simge düğmeleri (tema/zil/menu) hover'da zeminsel dolgu
   alır — dolgu rengi durum değişimi gibi yanıltıcı olmasın. */
.iconButton:hover, .iconButton:focus-visible { background: var(--hover); }

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.list { list-style: none; padding: 0; display: grid; gap: 0.75rem; }

.list li {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem;
  background: var(--panel);
}

img.preview { max-width: 100%; margin-top: 0.4rem; border-radius: 8px; }

.actions { display: flex; gap: 0.5rem; margin-top: 0.6rem; flex-wrap: wrap; align-items: center; }
.actions > * { min-width: 0; }

.optionsGrid {
  display: grid;
  /* min(): kap 180px'den dar ise izgara tek sütuna iner, taşma olmaz. */
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 0.5rem;
}

.optionEditor {
  display: grid;
  /* Tek sütun izgarası kap genişliğine sabitlenir; aksi halde metin
     kutusunun doğal genişliği (~230px) izgarayı şişirip taşırır. */
  grid-template-columns: 1fr;
  gap: 0.4rem;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}
/* Dosya kutusunun doğal genişliği grid hücresini taşırmasın (dar ekran). */
.optionEditor > * { min-width: 0; }
.optionEditor input[type="text"] { width: 100%; }
.optionEditor input[type="file"] { width: 100%; }

.questionImage, .optionImage {
  display: block;
  max-width: min(100%, 360px);
  max-height: 220px;
  margin-top: 0.5rem;
  border-radius: 8px;
  object-fit: contain;
  cursor: zoom-in;
}

.questionImages { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.5rem; margin-top: 0.5rem; }
.questionImages .questionImage { margin-top: 0; max-width: 100%; max-height: 160px; width: 100%; }

/* Çoklu soru görselleri: yönetici formundaki önizleme + kaldırma listesi. */
.imageEditList { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 0.6rem; margin-top: 0.5rem; }
.imageEditList > p { margin: 0; font-size: 0.85rem; }
.imageEditItem { margin: 0; padding: 0.4rem; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 0.35rem; justify-items: center; }
.imageEditItem img { width: 100%; max-height: 110px; object-fit: contain; border-radius: 6px; cursor: zoom-in; }
.imageEditItem button { padding: 0.25rem 0.5rem; font-size: 0.78rem; }

/* Görsel büyütücü: ekrana sığdır → tıklayınca doğal boyut (kaydırılabilir). */
.imageViewerBox { width: min(1100px, 96vw); height: min(88vh, 900px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; }
.imageViewerHead { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--line); }
.imageViewerHead .actions { display: flex; align-items: center; gap: 0.5rem; }
.imageViewerStage { flex: 1; min-height: 0; overflow: auto; display: flex; background: #10141c; padding: 0.5rem; }
.imageViewerStage img { margin: auto; max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; }
.imageViewerStage.zoomed img { margin: 0; max-width: none; max-height: none; cursor: zoom-out; }

.inlineForm { grid-template-columns: 1fr auto; align-items: center; }
.inlineForm > * { min-width: 0; }
.compactList { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.compactList li { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.compactList li > :first-child { min-width: 0; overflow-wrap: anywhere; }
.categoryDelete, .questionDelete { padding: 0.4rem 0.6rem; }

.subjectTree { display: grid; gap: 0.8rem; }
.subjectCard { border: 1px solid var(--line); border-radius: 10px; padding: 0.75rem; background: var(--panel); display: grid; gap: 0.5rem; }
.subjectHead { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.subjectHead .actions { margin-left: auto; display: flex; gap: 0.4rem; }
.subjectHead button { padding: 0.35rem 0.6rem; font-size: 0.8rem; }
.topicForm { grid-template-columns: 1fr auto auto; }
.topicRow { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.topicRow > :first-child { min-width: 0; overflow-wrap: anywhere; }
.topicRow button { padding: 0.3rem 0.55rem; font-size: 0.78rem; }

.feedbackInput { width: 100%; margin-top: 0.5rem; min-height: 4rem; }

/* Dosya gönderimlerindeki indirme bağlantıları (öğrenci + yönetici). */
.fileLinks { list-style: none; margin: 0.4rem 0; padding: 0; display: grid; gap: 0.2rem; font-size: 0.9rem; overflow-wrap: anywhere; }

.quizList { display: grid; gap: 0.8rem; }

.quizItem {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem;
  background: var(--panel);
}

.quizMeta { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; flex-wrap: wrap; }
.quizMeta > * { min-width: 0; }

.badge {
  background: var(--chip);
  color: var(--brand-text-strong);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
}

/* Koyu tema rozet metni tasarım katmanındaki var(--muted)'yu miras alır. */

.stars { color: var(--star); letter-spacing: 0.05em; }

.quizOptions { display: grid; gap: 0.45rem; margin: 0.8rem 0; }

.quizOption {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.55rem;
  border: 1px solid var(--field-border);
  border-radius: 8px;
  background: var(--panel-2);
  cursor: pointer;
}

.quizOption:hover { border-color: var(--brand); }

.quizResult { margin-top: 0.7rem; padding: 0.7rem; border-radius: 8px; }
.quizResult.correct { background: var(--ok-bg); color: var(--ok); }
.quizResult.incorrect { background: var(--bad-bg); color: var(--bad); }
.quizResult.blank { background: var(--warn-bg); color: var(--warn); }

.statGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.statCard {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem;
  background: var(--panel);
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.statCard span { font-size: var(--fs-xs); color: var(--muted); }
/* Uzun değerler (ör. "questions.json (13.2 KB)") kartı şişirip dışına
   taşmasın: tek satır + uçta kırpma. */
.statCard strong {
  font-size: var(--fs-xl);
  font-variant-numeric: tabular-nums;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tableWrap { overflow-x: auto; }
/* Yatay kaydırılabilir tablo: çubuk yerine kenar gölgesi. JS (shell.js
   wireScrollShadows) kaydırma yönüne göre .xScrollStart/.xScrollEnd yazar;
   gölge yalnız o yönde daha fazla içerik varken görünür. */
.tableWrap { --xshadow: color-mix(in srgb, var(--ink) 30%, transparent); }
.tableWrap.xScrollStart { box-shadow: inset 18px 0 16px -16px var(--xshadow); }
.tableWrap.xScrollEnd { box-shadow: inset -18px 0 16px -16px var(--xshadow); }
.tableWrap.xScrollStart.xScrollEnd {
  box-shadow: inset 18px 0 16px -16px var(--xshadow), inset -18px 0 16px -16px var(--xshadow);
}
@media (max-width: 820px) {
  .tableWrap { scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior-x: contain; }
  .tableWrap::-webkit-scrollbar { display: none; }
}

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 0.5rem; border-bottom: 1px solid var(--line); text-align: left; }
th { background: var(--thead); }

/* ---- Test / sınav motoru ---- */
.testGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.8rem; }
.testCard { border: 1px solid var(--line); border-radius: 10px; padding: 0.75rem; background: var(--panel); display: grid; gap: 0.45rem; align-content: start; }
.testCard p { margin: 0; font-size: 0.82rem; }
.examBar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.examBar > :first-child { min-width: 0; overflow-wrap: anywhere; }
.examTimer { font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--chip); border-radius: var(--radius); padding: 0.35rem 0.8rem; }
.timerWarn { background: #c62828; color: #fff; animation: timerPulse 1s infinite; }
@keyframes timerPulse { 50% { opacity: 0.6; } }
.examPalette { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.6rem 0; }
.paletteButton { width: var(--pal); height: var(--pal); padding: 0; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); cursor: pointer; }
.paletteButton.done { background: var(--done); border-color: var(--ok); }
.paletteButton.current { outline: 0; border-color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); font-weight: 700; }
.paletteButton.flagged { box-shadow: inset 0 0 0 2px var(--warn); }
.paletteButton.current.flagged { box-shadow: inset 0 0 0 2px var(--brand), inset 0 0 0 4px var(--warn); }
.flagQuestion.active { border-color: #d97706; color: #b45309; }
.optionList { display: grid; gap: 0.4rem; margin: 0.5rem 0; }
.optionRow { display: flex; align-items: center; gap: 0.5rem; border: 1px solid var(--line); border-radius: 3px; padding: 0.35rem 0.55rem; font-size: 0.95rem; cursor: pointer; }
.optionRow.correctOption { background: var(--ok-soft); border-color: var(--ok); }
.optionRow.wrongOption, li.wrongOption { background: var(--bad-soft); border-color: #d05252; }
li.correctOption { background: var(--ok-soft); }
.checkRow { display: flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; }
/* Test formunda "10" ve "30" alanları kendi başına anlamsız: görünür etiket. */
.countRow { display: flex; align-items: center; gap: 0.55rem; font-size: 0.82rem; color: var(--muted); }
.countRow span { white-space: nowrap; }
.countRow input { min-width: 0; max-width: 10rem; color: var(--ink); font-size: 1rem; }
.testPicker { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 0.5rem; display: grid; gap: 0.3rem; margin-top: 0.4rem; }
.pickerRow { display: flex; gap: 0.5rem; align-items: baseline; font-size: 0.85rem; }

/* Faz 4: bildirim zili, profil, rozetler, XP */
.bell { position: relative; margin-left: auto; }
.bell + .userBadge { margin-left: 0; }
.bellCount { position: absolute; top: -6px; right: -6px; background: #e5484d; color: #fff; font-size: 0.65rem; font-weight: 700; border-radius: 999px; padding: 0.1rem 0.35rem; min-width: 1.1rem; text-align: center; }
.bellPanel { position: fixed; top: calc(var(--topbar-h) + 0.2rem); right: 0.8rem; width: min(340px, calc(100vw - 1.6rem)); max-height: 70vh; overflow-y: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); z-index: 40; display: grid; }
/* Aktif kullanıcı dökümü: rozetin hemen altına, bildirim paneliyle çakışmadan. */
.activePanel { right: 5.5rem; width: min(260px, calc(100vw - 1.6rem)); padding: 0.4rem 0; }
.activePanelTitle { margin: 0.2rem 0.9rem 0.4rem; font-weight: 600; font-size: 0.85rem; color: var(--ink); }
.activeItem { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; padding: 0.35rem 0.9rem; font-size: 0.9rem; }
.activeCount.clickable { cursor: pointer; }
.activeCount.clickable:hover { border-color: var(--brand); }
.bellItem { display: block; text-align: left; background: none; border: none; border-bottom: 1px solid var(--line); padding: 0.6rem 0.8rem; cursor: pointer; font: inherit; }
.bellItem:hover { background: var(--hover); }
.bellItem:last-child { border-bottom: none; }
.bellItem.unread { background: var(--row-hover); }
.bellItem p { margin: 0.2rem 0; font-size: 0.85rem; }
.bellItem small { font-size: 0.72rem; }
.bellHeader { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; padding: 0.5rem 0.8rem; border-bottom: 1px solid var(--line); font-size: 0.85rem; }
.bellClear { background: none; border: none; color: var(--brand-text); font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; padding: 0.1rem 0.2rem; }
.bellClear:hover { text-decoration: underline; }
.bellEmpty { margin: 0; padding: 0.8rem; }
.xpFlash { color: var(--ok); font-weight: 700; }
.xpBar { height: 10px; background: var(--track); border-radius: 999px; overflow: hidden; margin: 0.4rem 0 0.2rem; min-width: 220px; }
.xpFill { height: 100%; background: linear-gradient(90deg, #4a6cf7, #7c4df7); border-radius: 999px; transition: width 0.4s ease; }
.profileHead { display: flex; gap: 1rem; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; }
.profileAvatar { font-size: 2.6rem; }
.profileStats { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; }
.badgeShelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.6rem; }
.badgeCard { border: 1px solid var(--line); padding: 0.7rem; text-align: center; display: grid; gap: 0.15rem; }
.badgeCard.earned { background: var(--earned); border-color: var(--ok); }
/* Kilitli rozet: tüm kartı soluklaştırmak (opacity) WCAG kontrastını bozar;
   yalnız simge soluk, metin okunur kalır. */
.badgeCard.locked { border-style: dashed; }
.badgeCard.locked .badgeIcon { opacity: 0.4; filter: grayscale(1); }
.badgeCard.locked small { color: var(--muted); }
.stateOpen { background: #1a7f4b; color: #fff; }
.statePaused { background: #b45309; color: #fff; }
.stateOff { background: var(--muted); color: #fff; }
.creditsInfoBox { margin-bottom: 1rem; line-height: 1.55; }
.creditsInfoBox p { margin: 0.5rem 0 0; white-space: pre-line; }
.creditsInfoBox strong { display: block; font-size: 1rem; }
.badgeIcon { width: 1.6rem; height: 1.6rem; color: var(--brand-text); }
.badgeCard small { color: var(--muted, #667); }

/* Faz 5: grafikler, atama, analitik */
.chartWrap { margin: 0.5rem 0; overflow-x: auto; }
.chart { width: 100%; max-width: 620px; height: auto; display: block; }
.chartGrid { stroke: var(--line); stroke-width: 1; }
.chartTick { font-size: 10px; fill: var(--tick); }
.chartCenter { font-size: 22px; font-weight: 700; fill: var(--center); }
.donutWrap { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.donutWrap .chart { max-width: 180px; }
.legend { display: grid; gap: 0.25rem; font-size: 0.85rem; }
.legendItem i { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 3px; margin-right: 0.35rem; }
.chartAlt { margin-top: 0.3rem; font-size: 0.8rem; }
.chartTable { font-size: 0.8rem; }
.compactCard { padding: 0.7rem 0.9rem; margin-bottom: 0.7rem; }
.tabActive { background: var(--brand); color: #fff; border-color: var(--brand); }
.csvLink { display: inline-block; padding: 0.4rem 0.7rem; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: inherit; font-size: 0.85rem; background: var(--panel); overflow-wrap: anywhere; max-width: 100%; }
/* Uzun ham dosya yolları hücreyi taşırmasın (Not editöründeki mevcut dosya linki). */
.filePathCell, .filePathLink { overflow-wrap: anywhere; max-width: 100%; }
/* Genişlik yardımcıları (inline style yerine). */
.w6rem { max-width: 6rem; }
.w10rem { max-width: 10rem; }
/* Rozet satırı (uyarlanabilir pratik konu etiketleri). */
.chipRow { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.4rem 0; }
/* Öneri durum sekmeleri sarmalayıcısı. */
.proposalTabs { margin-bottom: 0.8rem; }
/* Onay kuyruğunda benzerlik uyarısı: kart değil, ince bir not şeridi. */
.similarNote { border-left: 2px solid var(--line); padding-left: 0.55rem; margin: 0.35rem 0 0.55rem; font-size: 0.82rem; color: var(--muted); }
.similarNote.severe { border-left-color: var(--warn); background: var(--warn-bg); color: var(--ink); padding: 0.4rem 0.55rem; }
.similarNote strong { display: block; font-size: 0.78rem; letter-spacing: 0.02em; }
.similarNote ul { margin: 0.2rem 0 0; padding-left: 1.1rem; }
.csvLink:hover { background: var(--row-hover); }
#assignmentUsers.hidden { display: none; }

/* Faz 6: çevrimdışı bandı, odak görünürlüğü, yazdırma */

/* Faz 8: demo şifre güvenlik uyarı bandı (yalnızca admin görür) */
.demoBanner { background: var(--bad-soft); color: var(--bad); text-align: center; padding: 0.5rem 0.8rem; font-size: 0.85rem; border-bottom: 1px solid var(--line); }

/* Faz 7: toast bildirimleri ve onay modalı */
.toastHost { position: fixed; right: 0.9rem; bottom: 0.9rem; z-index: 60; display: flex; flex-direction: column; gap: 0.45rem; max-width: min(92vw, 22rem); }
.toast { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; padding: 0.6rem 0.8rem; font-size: var(--fs-sm); box-shadow: var(--shadow-pop); cursor: pointer; animation: toastIn 0.18s ease-out; }
.toast-ok { border-left-color: var(--ok); background: var(--ok-soft); }
.toast-error { border-left-color: #d05252; background: var(--bad-soft); }
.toast-info { border-left-color: var(--brand); }
@keyframes toastIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.uiModal { position: fixed; inset: 0; z-index: 70; background: rgba(10, 14, 22, 0.55); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.uiModalBox { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.2rem; max-width: 26rem; width: 100%; box-shadow: var(--shadow-pop); }
.uiModalBox h3 { margin: 0 0 0.4rem; font-size: 1.02rem; }
.uiModalBox p { margin: 0 0 1rem; font-size: 0.92rem; line-height: 1.45; white-space: pre-line; }
.uiModalActions { display: flex; justify-content: flex-end; gap: 0.5rem; }
.uiModalActions button { min-width: 5.5rem; }
.uiModalInput { width: 100%; margin: 0 0 1rem; }
.reportModalBox { max-width: 30rem; }
.reportOptions { display: grid; gap: 0.45rem; margin: 0 0 0.9rem; }
.reportOptions label { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 0.55rem; align-items: center; padding: 0.55rem 0.7rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--surface-2, transparent); }
.reportOptions label:hover { border-color: var(--brand); }
.reportOptions input { margin: 0; }
.reportOptions span { font-weight: 600; font-size: 0.94rem; }
.reportOptions small { grid-column: 2; color: var(--muted, #7b8495); font-size: 0.8rem; }
.reportOptions label:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.reportDetailWrap { display: block; margin: 0 0 0.9rem; }
.reportDetailWrap.hidden { display: none; }
.reportDetailWrap span { display: block; font-size: 0.86rem; font-weight: 600; margin-bottom: 0.3rem; }
.reportDetailWrap textarea { width: 100%; }
#reportError { margin: 0 0 0.8rem; }
.reportModalBox p.muted { margin-bottom: 0.7rem; white-space: normal; }

/* Faz 7: toplu soru içe aktarma kutusu */
.importBox { margin: 1rem 0; padding: 0.9rem 1rem; border: 1px dashed var(--field-border); border-radius: 12px; background: var(--panel); }
.importBox legend { padding: 0 0.4rem; font-weight: 600; font-size: 0.92rem; }
.importBox p { margin: 0 0 0.6rem; font-size: 0.88rem; overflow-wrap: anywhere; }
.importResult { margin-top: 0.8rem; font-size: 0.9rem; }
.importResult ul { margin: 0.4rem 0 0; padding-left: 1.2rem; color: var(--bad); }
/* Metni yapıştırarak içe aktarma/öneri: varsayılan kapalı (details), dosya alanını kalabalıklaştırmasın. */
.pasteBox { margin-top: 0.7rem; }
.pasteBox summary { cursor: pointer; font-size: 0.88rem; color: var(--brand-text); }
.pasteBox summary:hover { text-decoration: underline; }
.pasteBody { margin-top: 0.6rem; display: grid; gap: 0.6rem; }
.pasteBody textarea { min-height: 9rem; padding: 0.5rem 0.6rem; border: 1px solid var(--field-border); border-radius: 8px; font: inherit; font-size: 0.88rem; background: var(--panel-2); color: var(--ink); resize: vertical; }
.importResult ul.importWarnings { color: var(--muted); }

/* Faz 7: uzun not kırpma — boş satır paragraf, tek \n <br> */
.noteContent p { margin: 0 0 0.6rem; line-height: 1.55; }
.noteContent.clamped { max-height: 9.5rem; overflow: hidden; position: relative; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
[data-theme="dark"] :focus-visible { outline-color: var(--brand-text); }

/* Erişilebilirlik (FAZ C): klavye ile gelen "İçeriğe geç" bağlantısı — yalnız odakta görünür. */
.skipLink { position: absolute; left: -9999px; top: 0.5rem; z-index: 200; background: var(--brand); color: #fff; padding: 0.5rem 1rem; border-radius: 8px; font-weight: 600; }
.skipLink:focus { left: 0.5rem; }

/* Erişilebilirlik: hareket hassasiyeti (WCAG 2.3.3) — animasyon/geçişi kapat. */
/* Sitenin hareketleri (kar, sayfa geçişi, geçişler) varsayılan olarak AÇIKTIR:
   <html data-motion="full"> boyamadan önce konur. İşletim sistemi "animasyonları
   azalt" tercihine uymak isteyen cihaz localStorage dmMotion=system ile
   data-motion'u kaldırabilir. */
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="full"]) *, html:not([data-motion="full"]) *::before, html:not([data-motion="full"]) *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---- Faz 1: ayrı giriş sayfası ---- */
.loginPage { margin: 0; background: var(--bg); color: var(--ink); min-height: 100vh; }
.loginShell {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 2rem;
  align-items: center;
  max-width: 1080px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 2rem 1.2rem calc(2rem + env(safe-area-inset-bottom));
}
.loginCard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2rem 1.6rem;
}
.loginBrand { text-align: center; margin-bottom: 1.4rem; }
.loginLogo { width: 56px; height: 56px; margin-bottom: 0.6rem; }
.loginBrand h1 { margin: 0; font-size: 1.5rem; }
.loginBrand p { margin: 0.3rem 0 0; font-size: 0.9rem; }
.loginCard form label { display: grid; gap: 0.35rem; font-size: 0.9rem; }
.loginCard form input { padding: 0.65rem 0.8rem; border: 1px solid var(--field-border); border-radius: 10px; font-size: 1rem; background: var(--panel-2); color: var(--ink); }
.loginCard form button { margin-top: 0.4rem; padding: 0.75rem; font-size: 1rem; }
/* "Oturumu açık tut" satırı: grid label kalıbından çıkar, yatay dizilir. */
.loginCard form label.rememberRow { display: flex; flex-direction: row; align-items: center; gap: 0.5rem; margin-top: 0.2rem; }
.loginError { margin: 0; color: var(--bad); font-size: 0.9rem; }
.loginSuccess { margin: 0; color: var(--ok, #1a7f4b); font-size: 0.9rem; }
.loginSignup { margin: 0.9rem 0 0; text-align: center; font-size: 0.88rem; color: var(--muted); }
.loginSignup .linkButton { font-size: 0.88rem; }
.signupBox { max-width: 30rem; padding-bottom: 1rem; }
.signupStep { padding: 0.4rem 1.2rem 0; }
.signupStep p { margin: 0 0 0.8rem; white-space: normal; line-height: 1.5; font-size: 0.9rem; }
.signupField { display: grid; gap: 0.35rem; font-size: 0.9rem; margin-bottom: 0.6rem; }
.signupField input, .signupField select { padding: 0.65rem 0.8rem; border: 1px solid var(--field-border); border-radius: 10px; font-size: 1rem; background: var(--panel-2); color: var(--ink); }
.signupStep .actions { padding: 0.3rem 0 0.6rem; }
.signupPasswordBox { border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem 0.9rem; margin: 0 0 1rem; background: var(--panel-2); }
.signupPasswordBox p { margin: 0 0 0.5rem; }
.signupPasswordBox code { font-size: 1.05rem; user-select: all; word-break: break-all; }
.signupBox #signupError { padding: 0 1.2rem; }
@media (max-width: 600px) {
  .signupStep { padding: 0.3rem 0.9rem 0; }
  .signupBox #signupError { padding: 0 0.9rem; }
}
.loginDemo { margin: 1rem 0 0; font-size: 0.8rem; text-align: center; }
.loginAside img { width: 100%; max-height: 70vh; object-fit: cover; border-radius: 16px; }
.loginThemeToggle { position: fixed; z-index: 5; top: 1rem; right: 1rem; background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
/* Görsel yokken kart sola yatmasın: tek merkez sütun (A9). :has desteklenmezse
   eski davranış kalır — zararsız gerileme. */
.loginShell:not(:has(#loginAside:not(.hidden))) {
  grid-template-columns: minmax(320px, 420px);
  justify-content: center;
}
@media (max-width: 820px) {
  .loginShell { grid-template-columns: 1fr; }
  .loginAside { display: none; }
}

/* ---- Faz 3: kota aşım bandı ---- */
/* Statik akış: yapışkan olsaydı üst barla (sticky top:0) çakışır, scroll'da
   ikisi üst üste binerdi. Kota uyarısı kalıcıdır, yapışkan olması gerekmez. */
.quotaBanner {
  background: var(--bad-bg);
  color: var(--bad);
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  text-align: center;
  border-bottom: 1px solid var(--bad);
}
/* F2.3: yarıda kalan deneme bandı — kota bandıyla aynı görünüm, içerik yatay. */
.openAttemptBanner { display: flex; align-items: center; justify-content: center; gap: 0.6rem; flex-wrap: wrap; }

/* ---- Not türleri, PDF görüntüleyici, sıralama ---- */
.viewHead { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; }
.noteSort { display: flex; align-items: center; gap: 0.4rem; }
.noteSort select { padding: 0.4rem 0.5rem; border: 1px solid var(--field-border); border-radius: 8px; background: var(--panel-2); color: var(--ink); font-size: 0.85rem; }
.noteSummary { font-size: 0.9rem; opacity: 0.9; }
.noteHighlights { margin: 0.5rem 0; padding: 0.6rem 0.8rem; border-left: 3px solid var(--brand); border-radius: 8px; background: var(--panel); font-size: 0.9rem; }
.noteHighlights ul { margin: 0.3rem 0 0 1.1rem; padding: 0; }
.notePdfOpen { margin: 0.2rem 0; }
.pdfViewerBox { width: min(1400px, 96vw); height: min(94vh, 1100px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; }
/* Tam ekran düğmesi: kutu görünüm alanını doldurur (masaüstünde 1400px tavanı kalkar). */
#pdfViewer.pdfViewerFull { padding: 0; }
#pdfViewer.pdfViewerFull .pdfViewerBox { width: 100vw; height: 100vh; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
/* Gerçek tam ekran (Fullscreen API): yalnız sağ üstte çıkış (⛶) düğmesi kalır. */
#pdfViewer::backdrop { background: #111; }
#pdfViewer:fullscreen .pdfViewerBox { width: 100vw; height: 100vh; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
#pdfViewer:fullscreen .pdfViewerHead {
  position: fixed;
  top: max(10px, env(safe-area-inset-top, 0px));
  right: max(10px, env(safe-area-inset-right, 0px));
  z-index: 2;
  padding: 0;
  border: 0;
  background: transparent;
  justify-content: flex-end;
}
#pdfViewer:fullscreen #pdfViewerTitle,
#pdfViewer:fullscreen #pdfViewerPrev,
#pdfViewer:fullscreen #pdfViewerPages,
#pdfViewer:fullscreen #pdfViewerNext,
#pdfViewer:fullscreen #pdfViewerZoomOut,
#pdfViewer:fullscreen #pdfViewerZoomIn,
#pdfViewer:fullscreen #pdfViewerClose { display: none; }
#pdfViewer:fullscreen #pdfViewerFull {
  background: rgba(32, 36, 44, 0.82);
  color: #fff;
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
}
#pdfViewer:fullscreen .pdfViewerStatus { display: none; }
.pdfViewerHead { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--line); }
.pdfViewerHead .actions { display: flex; align-items: center; gap: 0.5rem; }
/* PDF görüntüleyici (PDF.js): sayfa canvas'ta çizilir, üzerine kullanıcıya
   özel soluk filigran basılır. Tarayıcının PDF araç çubuğu hiç oluşmaz. */
.pdfViewerActions { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; }
.pdfViewerPages { font-size: 0.82rem; color: var(--muted); min-width: 3.6rem; text-align: center; font-variant-numeric: tabular-nums; }
.pdfViewerBody { position: relative; flex: 1; min-height: 0; display: flex; background: #20242c; }
.pdfViewerStage { position: relative; flex: 1; overflow: auto; padding: 12px; display: block; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pdfViewerPagesRoot { position: relative; display: flex; flex-direction: column; align-items: center; align-items: safe center; gap: 12px; min-height: 100%; }
.pdfPage { position: relative; flex: 0 0 auto; overflow: hidden; background: #fff; box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35); }
.pdfPage .pdfViewerCanvas { box-shadow: none; }
.pdfViewerCanvas { display: block; background: #fff; box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35); user-select: none; -webkit-user-select: none; }
.pdfViewerWatermark { position: absolute; inset: 0; display: flex; flex-wrap: wrap; align-content: space-around; justify-content: space-around; gap: 48px 64px; padding: 16px; pointer-events: none; overflow: hidden; }
.pdfViewerWatermark span { transform: rotate(-28deg); font-size: 0.68rem; letter-spacing: 0.05em; color: rgba(17, 24, 39, 0.03); white-space: nowrap; }
.pdfViewerStatus { margin: 0; padding: 0.4rem 0.9rem; border-top: 1px solid var(--line); min-height: 1.7rem; font-size: 0.82rem; color: var(--muted); }
.pdfViewerStatus.isError { color: var(--bad); }
/* Mobil: çerçeve çevresi boşluk bırakmaz — görüntüleyici tam ekran çalışır
   (sayfaya en çok yer kalsın; mobilde modal kenar boşlukları sayfayı kırpıyordu). */
@media (max-width: 820px) {
  #pdfViewer.uiModal { padding: 0; align-items: stretch; justify-content: stretch; }
  #pdfViewer .pdfViewerBox {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    padding-top: env(safe-area-inset-top);
  }
  #pdfViewer .pdfViewerHead { padding: 0.4rem 0.55rem; gap: 0.3rem; }
  #pdfViewer #pdfViewerTitle { font-size: 0.92rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #pdfViewer .pdfViewerActions { gap: 0.2rem; flex-wrap: nowrap; }
  #pdfViewer .btnLike { padding: 0.3rem 0.5rem; font-size: 0.8rem; }
  #pdfViewer .pdfViewerPages { min-width: 2.9rem; font-size: 0.78rem; }
  #pdfViewer .pdfViewerStage { padding: 4px; }
  #pdfViewer .pdfViewerStatus { padding: 0.3rem 0.55rem calc(0.3rem + env(safe-area-inset-bottom)); min-height: 1.3rem; font-size: 0.76rem; }
}
.btnLike { display: inline-block; padding: 0.4rem 0.7rem; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: inherit; font-size: 0.85rem; background: var(--panel); }

/* ---- Aktif kullanıcı rozeti ---- */
.activeCount { font-size: 0.85rem; padding: 0.3rem 0.6rem; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); white-space: nowrap; }
/* Pill açık zeminli; ikon+sayı topbar'ın beyazını değil koyu mürekkebi alsın. */
.activeCount { color: var(--ink); }

/* ---- Pano: haftalık özet / doluluk / üreticiler ---- */
#recentView .boardCols { margin-top: 1rem; }
.boardCols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.boardCols > * { min-width: 0; overflow-wrap: anywhere; }
.boardCol { border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem 0.8rem; background: var(--panel); }
.boardCol h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.boardRecentItem { font-size: 0.86rem; padding: 0.35rem 0; border-bottom: 1px dashed var(--line); }
.boardRecentItem:last-child { border-bottom: 0; }
@media (max-width: 820px) {
  .boardCols { grid-template-columns: 1fr; }
}

/* ---- Günlükler ---- */
.logMessage { font-family: ui-monospace, monospace; font-size: 0.8rem; word-break: break-word; }
.log_error td { background: color-mix(in srgb, var(--bad, #d33) 12%, transparent); }
.log_warn td { background: color-mix(in srgb, #e6a700 12%, transparent); }

/* Teşhis özeti (Günlükler üstü): tür kartları + en sık sorunlar. */
#diagSummary { margin: 0 0 var(--sp-4); }
#diagSummary .statGrid { margin: 0 0 var(--sp-3); }
#diagSummary .tableWrap { margin: 0 0 var(--sp-2); }
#diagSummary > p.muted { margin: var(--sp-2) 0 0; }

/* ---- İlişkisel panel (Ders & Konu) ---- */
.relationGroup { margin-bottom: 0.8rem; }
.relationGroup h4 { margin: 0 0 0.4rem; }
.relationChips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.relationChip { display: inline-flex; align-items: center; gap: 0.3rem; max-width: 100%; padding: 0.35rem 0.6rem; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink); opacity: 0.75; font-size: 0.82rem; cursor: pointer; transition: opacity 0.12s ease, transform 0.12s ease; }
.relationChip:hover { opacity: 1; transform: translateY(-1px); }
#subjectRelations { margin-bottom: 1rem; padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }

/* ---- Bildirimler / öneri kartları ---- */
.feedbackCard .filters { margin-top: 0.5rem; }
.feedbackCard .filters input[type="text"] { flex: 1; }
.auditFlag td { background: color-mix(in srgb, var(--bad, #d33) 10%, transparent); }
.stackedForm { display: grid; gap: 0.6rem; }
#adminNoteEditor { margin: 0.8rem 0; padding: 0.9rem 1rem; border: 1px solid var(--brand); border-radius: 12px; background: var(--panel-2); }

/* ---- Topluluk oylaması (+/−) ---- */
.fbVote { display: inline-flex; align-items: center; padding: 0.25rem 0.65rem; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink); font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease; }
.fbVote:hover { border-color: var(--brand); color: var(--brand-text); }
.fbVote.voted { border-color: var(--brand); color: var(--brand-text); background: color-mix(in srgb, var(--brand) 14%, transparent); }

/* ---- Ayar paneli: açıklamalar, arama, yapışkan çubuk ---- */
.settingsIntro { margin: 0 0 1rem; padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-size: 0.88rem; line-height: 1.5; }
.settingsIntro p { margin: 0 0 0.35rem; }
.settingsIntro p:last-child { margin-bottom: 0; }
#settingsSearch { width: 100%; max-width: 26rem; margin-bottom: 0.9rem; padding: 0.5rem 0.7rem; border: 1px solid var(--field-border); border-radius: 8px; background: var(--panel-2); color: var(--ink); font-size: 0.9rem; }
.fieldRow { display: grid; gap: 0.3rem; }
.fieldRow .fieldLabelRow { display: flex; align-items: center; gap: 0.4rem; }
.fieldHint { color: var(--muted, #7d8798); font-size: 0.78rem; line-height: 1.35; }
.fieldInfo { width: 1.15rem; height: 1.15rem; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--panel-2); color: var(--ink); font-size: 0.7rem; font-weight: 700; line-height: 1; cursor: pointer; flex: none; }
.fieldInfo:hover { border-color: var(--brand); color: var(--brand-text); }
.fieldDefault { width: fit-content; padding: 0.15rem 0.5rem; border: 1px dashed var(--line); border-radius: 6px; background: none; color: var(--muted, #7d8798); font-size: 0.74rem; cursor: pointer; }
.fieldDefault:hover { border-color: var(--brand); color: var(--brand-text); }
.fieldInvalid input, .fieldInvalid select, .fieldInvalid textarea { border-color: var(--bad, #d33) !important; }
#settingsBar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; margin-top: 1rem; padding: 0.7rem 1rem; border: 1px solid var(--brand); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow-pop); z-index: 5; }
#settingsBar .settingsBarInfo { font-size: 0.88rem; }
#settingsChangelog { margin: 0 0 1rem; padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-size: 0.84rem; }
#settingsChangelog .changeRow { padding: 0.25rem 0; border-bottom: 1px dashed var(--line); }
#settingsChangelog .changeRow:last-child { border-bottom: 0; }
#settingsSystem { margin: 1rem 0; padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); font-size: 0.84rem; overflow-x: auto; }
#settingsSystem table { width: 100%; }
#settingsSystem td { padding: 0.2rem 0.4rem; overflow-wrap: anywhere; }
.brandLogo { max-height: 28px; max-width: 110px; object-fit: contain; margin-right: 0.5rem; vertical-align: middle; }

.printOnly { display: none; }

@media print {
  .topbar, .sidebar, #offlineBanner, .demoBanner, .actions, .csvLink, .bellPanel, .userPanel, .settingsTabRail, .toastHost, .uiModal, .termsModal { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .view { box-shadow: none; border: none; }
  .printOnly { display: block; }
}

@media (max-width: 820px) {
  :root { --topbar-h: 2.6rem; }
  .layout { padding: 0 0.6rem 2rem; }
  /* Ayar sekmeleri mobilde yatay kayan çipler. */
  .settingsBody { grid-template-columns: 1fr; }
  .settingsTabRail { position: static; display: flex; gap: 0.4rem; overflow-x: auto; }
  .settingsTab { width: auto; flex: none; white-space: nowrap; }
  /* Dar ekranda çok sütunlu tek satırlık formlar alt alta geçer (taşma yok). */
  .inlineForm, .topicForm { grid-template-columns: 1fr; }
  .subjectHead .actions { margin-left: 0; }
  .sidebar {
    position: fixed;
    inset: var(--topbar-h) auto 0 0;
    max-height: none;
    width: 240px;
    border-radius: 0 12px 12px 0;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    z-index: 30;
    overflow-y: auto;
  }
  .sidebar.open { transform: translateX(0); }
  .filters { grid-template-columns: 1fr; }
  .topbar p { display: none; }
  /* Mobil üst bar (QA 2026-10-27 revizyonu): B1'in "sıkışırsa alt satıra iner"
     kararı, ikon butonların kısılıp zil rozetinin markanın üstüne binmesine
     yol açtı. Artık marka TEK satır; taşarsa uçtan kırpılır (tam ad soldaki
     menüde ve girişte görünür). İkon butonlar kısılamaz (flex: none). */
  .topbar { gap: 0.5rem; padding: 0.5rem 0.75rem; }
  .brandHome { min-width: 0; flex: 1 1 0; }
  .brandText { flex-direction: row; align-items: center; min-width: 0; }
  .brandHome h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1rem; }
  .iconButton, .bell { flex: none; }
  /* Çok dar bant (<430px): aktif kullanıcı sayacı artık ikon + sayı (metin
     yok), yer yemeden üst barda kalır; zil paneli bildirimleri, badge paneli
     kimliği veriyor. */
  @media (max-width: 430px) {
    .topbar { gap: 0.35rem; }
    .brandHome h1 { font-size: 1rem; }
    .brandHome { padding-left: 0.2rem; }
    .iconButton { padding-inline: 0.5rem; }
  }
  .userBadge { white-space: nowrap; max-width: 38vw; overflow: hidden; text-overflow: ellipsis; padding: 0.3rem 0.5rem; font-size: 0.72rem; flex: none; }
  .activeCount { padding: 0.25rem 0.45rem; font-size: 0.78rem; flex: none; }
  /* Kart listeleri dar ekranda tek sütun; ad yanına sıkışan butonlar satır kırar. */
  .compactList { grid-template-columns: 1fr; }
  .compactList li { flex-wrap: wrap; }
}

/* ---- Derin Ayarlar (adminDeep) ---- */
.deepGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0.9rem; }
.deepNavGroup { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 0.9rem; }
.deepNavGroup h4 { margin: 0 0 0.5rem; }
.deepTabRow { display: flex; align-items: center; gap: 0.5rem; padding: 0.2rem 0; }
.deepTabRow code, .deepTextHead code { font-size: 0.72rem; }
.deepTextList { display: grid; gap: 0.55rem; margin-top: 0.6rem; }
.deepTextRow { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 0.5rem 0.7rem; }
.deepTextHead { display: flex; justify-content: space-between; gap: 0.6rem; font-size: 0.82rem; margin-bottom: 0.3rem; flex-wrap: wrap; }
.deepTextRow input { width: 100%; }
.deepWhere { font-size: 0.72rem; }
/* Metin listesi artık rol grupları içinde: iç satırlar grup zemininde sadeleşir */
.deepNavGroup .deepTextRow { background: transparent; padding: 0.45rem 0.3rem; border-radius: 8px; }
.deepNavGroup .deepTextRow + .deepTextRow { border-top: 1px solid var(--line); }
/* Giriş sayfası: isteğe bağlı duyuru + alt bilgi (Derin Ayarlar) */
.loginNotice { margin: 0 0 0.9rem; padding: 0.6rem 0.8rem; border-radius: 10px; background: color-mix(in srgb, var(--brand) 12%, transparent); border: 1px solid var(--line); font-size: 0.86rem; white-space: pre-line; }
.loginFooter { margin: 1rem 0 0; text-align: center; font-size: 0.75rem; }
/* Giriş sayfası: kullanıcı sözleşmesi bağlantısı + modal */
.loginTerms { margin: 0.55rem 0 0; text-align: center; font-size: 0.78rem; line-height: 1.5; }
.linkButton { background: none; border: 0; padding: 0; margin: 0; color: var(--brand-text); font: inherit; text-decoration: underline; cursor: pointer; }
.linkButton:hover { color: var(--brand-text-strong); }
body.termsOpen { overflow: hidden; }
.termsModal { position: fixed; inset: 0; z-index: 80; background: rgba(10, 14, 22, 0.55); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.termsBox { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; width: 100%; max-width: 46rem; max-height: min(85vh, 44rem); display: flex; flex-direction: column; box-shadow: var(--shadow-pop); }
.termsHead { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem 0.4rem; }
.termsHead h2 { margin: 0; font-size: 1.15rem; }
.termsVersion { margin: 0; padding: 0 1.2rem 0.5rem; font-size: 0.78rem; }
.termsBody { overflow-y: auto; padding: 0 1.2rem 0.5rem; line-height: 1.6; font-size: 0.9rem; }
.termsBody p { margin: 0 0 0.7rem; }
.termsBody h3 { margin: 1rem 0 0.35rem; font-size: 0.98rem; }
.termsBody ul { margin: 0.2rem 0 0.7rem; padding-left: 1.2rem; }
.termsBody li { margin: 0.15rem 0; }
.termsActions { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 0.8rem 1.2rem 1rem; border-top: 1px solid var(--line); }
.termsClose { flex: 0 0 auto; }
@media (max-width: 600px) {
  .termsBox { max-height: 90vh; }
  .termsHead { padding: 0.8rem 0.9rem 0.3rem; }
  .termsVersion { padding: 0 0.9rem 0.4rem; }
  .termsBody { padding: 0 0.9rem 0.4rem; }
  .termsActions { padding: 0.7rem 0.9rem 0.9rem; }
}

/* ==== Sessiz Kabuk — Faz 0 yardımcıları ==== */

/* Sidebar grup başlığı (ÖĞREN / İZLEME …) — Faz 1'de JS ile doldurulur.
   Sol dolgusu .navItem ile aynı; metinler hizalı durur. */
.navGroupLabel {
  margin: 0.75rem 0 0.25rem;
  padding: 0 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
/* Listenin en başındaki etiket üst boşluk istemez. */
.sidebar nav > .navGroupLabel:first-child { margin-top: 0.25rem; }

/* Boş durum: ikon + cümle (+ varsa birincil aksiyon). */
.emptyState {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  padding: 2rem 1rem;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--muted);
}
.emptyState p { margin: 0; }
.emptyState .actions { justify-content: center; }

/* Analitik CSV bağlantıları gibi çok sayıda rozet bağlantıyı saran satır
   (Faz 3'te işaretlemeye eklenir). */
.csvRow { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.csvRow .csvLink { max-width: 100%; }

/* ==== Sessiz Kabuk — Faz 1: kabuk (ikonlar, menü grupları, kullanıcı paneli) ==== */

/* Genel SVG ikon ölçüsü: satır içinde metinle hizalı durur. */
svg.icon { width: 1.1em; height: 1.1em; vertical-align: -0.2em; flex: none; }
.iconButton svg.icon { width: 1.2rem; height: 1.2rem; display: block; }

/* Nav düğmeleri: ikon + etiket yanyana. */
.navItem { display: flex; align-items: center; gap: 0.5rem; }
svg.navIcon { width: 1.05rem; height: 1.05rem; color: var(--muted); flex: none; }
.navItem.active svg.navIcon { color: #fff; }
.navLabel { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Krediler sekmesinde bakiye: küçük, sağa yaslı rozet. */
.navBadge { margin-left: auto; font-size: 0.7rem; font-weight: 600; color: var(--muted); }
.navItem.active .navBadge { color: inherit; }

/* Kullanıcı rozeti artık düğme: tıklayınca kullanıcı paneli (şifre değiştirme) açılır. */
/* yazı tipi/köşe temizliği tabanda (139. satır) yapıldı — burada font: inherit
   OLMAMALI: mobil media bloğundaki 0.72rem'i ezip markayı sıfıra sıkıştırırdı
   (QA 2026-10-27 gölgeleme dersi). */
.userBadge { cursor: pointer; border: 0; }
.userPanel { width: min(300px, calc(100vw - 1.6rem)); padding: 0.75rem; }
/* Şifre formu eskiden sidebar'daydı; panel içinde üst çizgisiz, kendi dolgusuyla. */
.userPanel .sidebarForm { border-top: 0; margin: 0; padding: 0; }

/* ==== Yönetici görünüm modu anahtarı (kullanıcı panelinde segment) ==== */
.modeSwitch { display: grid; gap: 0.4rem; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); }
.modeSwitchLabel { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.modeSwitchHint { margin: 0; font-size: var(--fs-xs); }
.modeSwitch .segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem; padding: 0.25rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.modeSwitch .segmented button { background: transparent; border: 0; border-radius: 7px; padding: 0.4rem 0.5rem; font: inherit; font-size: var(--fs-sm); color: var(--ink); cursor: pointer; }
.modeSwitch .segmented button:hover { background: var(--hover); }
.modeSwitch .segmented button[aria-pressed="true"] { background: var(--chip); color: var(--brand-text-strong); font-weight: 600; }
[data-theme="dark"] .modeSwitch .segmented button[aria-pressed="true"] { color: var(--brand-text); }
.modeSwitch .segmented button:disabled { opacity: 0.6; cursor: wait; }

/* Aktif kullanıcı sayacı: ikon + sayı yanyana. */
.activeCount { display: inline-flex; align-items: center; gap: 0.35rem; }

/* ==== Sessiz Kabuk — Faz 2: Platform Ayarları sekmeleri ==== */
/* Solda yapışkan sekme rayı + sağda sekme sayfası (settingsBody ızgarası).
   DİKKAT: Bunlar masaüstü kurallarıdır; media blokları DOSYANIN SONUNA yazılır
   çünkü aynı özgüllükteki kural sonda kazanır. Mobil küçülme kuralı (715. satır
   civarı) buraya eklenseydi, gölgelenecekti (QA 2026-10-27: Soru Yönetimi
   formu 149px'e sıkışmıştı — masaüstü kuralı mobil media bloğunu ezmişti). */
@media (min-width: 821px) {
  .settingsBody { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 1rem; align-items: start; }
  .settingsTabRail { position: sticky; top: calc(var(--topbar-h) + 0.5rem); display: grid; gap: 0.25rem; padding: 0.25rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
  /* Dikey rayda sekme tüm genişliği kaplar; mobilde yatay çip (genişlik auto). */
  .settingsTab { width: 100%; }
}
.settingsTab { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; text-align: left; background: transparent; border: 0; color: var(--ink); padding: 0.5rem 0.6rem; border-radius: 8px; font-size: var(--fs-sm); cursor: pointer; }
.settingsTab:hover { background: var(--hover); }
.settingsTab[aria-pressed="true"] { background: var(--chip); color: var(--brand-text-strong); font-weight: 600; }
[data-theme="dark"] .settingsTab[aria-pressed="true"] { color: var(--brand-text); }
.settingsTabPage { display: grid; gap: 0.75rem; min-width: 0; }

/* ==== Sessiz Kabuk — Faz 3: ağır görünümler ==== */
/* Soru kartı ikincil aksiyonları "⋯" menüsünde (B3). */
#questionList li { position: relative; }
.qMenuBtn { padding: 0.35rem 0.55rem; line-height: 1; }
.qMenuWrap { position: relative; display: inline-flex; }
/* Menü TETİKLEYİCİNİN altında açılır; satır dibine sabitlenmez. */
.qMenuPanel {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 0;
  right: auto;
  bottom: auto;
  z-index: 30;
  display: grid;
  gap: 0.15rem;
  min-width: 11rem;
  max-width: calc(100vw - 2rem);
  padding: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
}
.qMenuPanel .questionHistory, .qMenuPanel .questionDelete {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.45rem 0.55rem;
  border-radius: 2px;
  font-size: 0.8rem;
  color: var(--ink);
  text-decoration: none;
}
.qMenuPanel .questionDelete { color: var(--bad); }
/* Yer yoksa tetikleyicinin ÜSTÜNE açılır. */
.qMenuPanel.qMenuUp { top: auto; bottom: calc(100% + 0.3rem); }
.qMenuPanel .questionHistory:hover, .qMenuPanel .questionDelete:hover { background: var(--hover); }

/* ---- View Transitions: SPA görünüm geçişleri (P0) ----
   Native API; desteklenmeyen tarayıcıda anlık (zararsız gerileme). */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 180ms;
  animation-timing-function: cubic-bezier(.2, .8, .2, 1);
}
::view-transition-old(root) { animation-name: vt-fade-out; }
::view-transition-new(root) { animation-name: vt-fade-in; }
@keyframes vt-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="full"])::view-transition-old(root),
  html:not([data-motion="full"])::view-transition-new(root) { animation: none; }
}
/* ---- Skeleton yardımcıları (P0) ---- */
.skeleton {
  background: linear-gradient(90deg, var(--panel) 0%, var(--surface) 50%, var(--panel) 100%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.2s ease-in-out infinite;
  border-radius: var(--radius);
  color: transparent;
}
@keyframes skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
}

/* Klavye odağı görünür olsun (P0 a11y). Bileşenler kendi göstergesini tanımlıyorsa onlar kazanır. */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* Görünüm değişiminde odak #mainContent'a taşınır (AT duyurusu); büyük çerçeve görünmesin. */
#mainContent:focus, #mainContent:focus-visible { outline: none; }

/* ---- Komut paleti (P1) ---- */
.cmdPalette { position: fixed; inset: 0; z-index: 120; display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; background: rgba(20,18,14,0.32); backdrop-filter: blur(2px); }
.cmdPalette.hidden { display: none; }
.cmdPaletteBox { width: min(560px, 92vw); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop); overflow: hidden; }
.cmdPaletteInput { width: 100%; padding: 0.9rem 1rem; border: none; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: var(--fs-md); outline: none; }
.cmdPaletteList { max-height: 50vh; overflow-y: auto; padding: 0.4rem; }
.cmdPaletteItem { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.7rem; border-radius: var(--radius); cursor: pointer; color: var(--ink); }
.cmdPaletteItem:hover, .cmdPaletteItem.active { background: var(--hover); }
.cmdPaletteItem .cmdPaletteHint { margin-left: auto; color: var(--muted); font-size: var(--fs-xs); }
.cmdPaletteEmpty { padding: 1rem; text-align: center; color: var(--muted); font-size: var(--fs-sm); }

/* ---- Hata durumu (emptyState simetriği) ---- */
.errorState { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 2rem 1rem; text-align: center; color: var(--muted); }
.errorState .errorStateIcon { font-size: 2rem; line-height: 1; }
.errorState .errorStateText { max-width: 36ch; }
.errorState .errorStateRetry { margin-top: 0.5rem; }

/* ---- Baskı (P4) ---- */
@media print {
  .topbar, .sidebar, #offlineBanner, .demoBanner, .quotaBanner, .toastHost, .uiModal, #cmdPalette { display: none !important; }
  .content { padding: 0; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: none; }
  .card { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
}

/* ==========================================================================
   Tasarım katmanı — "kâğıt + mürekkep"
   Neden dosyanın sonunda? Aynı özgüllükteki kural sonda kazanır. Bu katman
   eski "Sessiz Kabuk" kurallarının üzerine bilinçli olarak biner; mobil
   düzeltmeler de en sonda ayrıca tanımlanır (gölgelenme tuzağı).
   İlkeler: serif başlık + sans arayüz, hairline çizgi, 4px köşe, gölgesiz
   kart, tek yeşil vurgu, tabular rakam, emoji yok.
   ========================================================================== */

/* --- Gövde ve tipografi ölçeği --- */
body { font-size: var(--fs-md); line-height: 1.55; background: var(--bg); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.012em; color: var(--ink); }
h1 { font-size: 1.5rem; line-height: 1.2; }
h2 { font-size: var(--fs-xl); line-height: 1.2; }
h3 { font-size: 1.0625rem; line-height: 1.35; }
h4 { font-size: 0.9375rem; line-height: 1.35; }
p { line-height: 1.6; }
code, kbd, pre { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
code { overflow-wrap: anywhere; }
a { color: var(--brand-text); text-underline-offset: 2px; text-decoration-thickness: 1px; }
/* Seçim rengi: tarayıcının varsayılan mavisi paleti bozmasın. */
::selection { background: color-mix(in srgb, var(--brand) 22%, transparent); color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--line); }

/* --- Üst bar --- */
.topbar { padding: 0.55rem 1rem; gap: 0.75rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 1.2rem; letter-spacing: -0.015em; }
.topbar p { font-size: 0.72rem; letter-spacing: 0.015em; }
.brandLogo { max-height: 30px; border-radius: 2px; }
.iconButton { border-radius: 3px; padding: 0.4rem 0.5rem; color: var(--muted); }
.iconButton:hover, .iconButton:focus-visible { background: var(--hover); color: var(--ink); }
.topbar .bell { margin-left: auto; }
.topbar .userBadge { margin-left: 0; }
.userBadge { background: transparent; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); font-size: 0.78rem; padding: 0.3rem 0.55rem; }
[data-theme="dark"] .userBadge { color: var(--ink); }

/* --- Yerleşim ve kenar çubuğu --- */
.layout { max-width: 1240px; gap: 1.25rem; margin: 0.9rem auto; padding: 0 1.1rem 2.5rem; }
.sidebar {
  width: 236px;
  flex: 0 0 236px;
  border-radius: var(--radius);
  padding: 0.45rem;
  gap: 0.1rem;
  background: var(--surface);
  /* Grid satırları boş alana yayılmasın: mobil çekmecede arama kutusu ve
     Çıkış düğmesi sayfa boyuna uzuyordu (QA 2026-10-29). */
  align-content: start;
}
.navGroupLabel { font-size: 0.625rem; letter-spacing: 0.14em; margin: 0.9rem 0 0.25rem; padding: 0 0.55rem; color: var(--muted); }
.navItem { border-radius: 3px; padding: 0.42rem 0.55rem; font-size: 0.875rem; gap: 0.45rem; }
.navItem:hover { background: var(--hover); }
/* Aktif öğe: dolu mavi blok yerine ince sol çizgi + yumuşak zemin. */
.navItem.active { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; box-shadow: inset 2px 0 0 var(--brand); }
.navItem.active svg.navIcon { color: var(--brand-text); }
.navItem.logout { color: var(--bad); margin-top: 0.5rem; border-top: 1px solid var(--line); border-radius: 0; padding-top: 0.55rem; }
svg.navIcon { width: 1rem; height: 1rem; color: var(--muted); opacity: 0.9; }
.appVersion { font-size: 0.625rem; letter-spacing: 0.05em; }

/* Menü içi arama + katlanır gruplar (shell.js üretir). */
/* Arama kutusu çekmecede yapışkan kalır: uzun menüde aktif öğeye atlarken
   (revealActiveNav) arama yukarı kayıp görünmez olmasın. */
.navSearch { position: sticky; top: 0; z-index: 3; display: grid; gap: 0.3rem; padding: 0.15rem 0.2rem 0.5rem; border-bottom: 1px solid var(--line); margin-bottom: 0.25rem; background: var(--surface); }
.navSearch input { width: 100%; padding: 0.38rem 0.5rem; font-size: 0.8125rem; border: 1px solid var(--line); border-radius: 3px; background: var(--panel-2); }
.navSearchEmpty { margin: 0.5rem 0.55rem; font-size: 0.78rem; color: var(--muted); }
.navGroupToggle { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; width: 100%; margin: 0; padding: 0.1rem 0.55rem; background: none; border: 0; border-radius: 2px; color: var(--muted); font: inherit; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; }
.navGroupToggle:hover { color: var(--ink); background: transparent; }
.navGroupToggle .groupChevron { width: 0.7rem; height: 0.7rem; opacity: 0.7; transition: transform 0.15s ease; }
.navGroupToggle[aria-expanded="false"] .groupChevron { transform: rotate(-90deg); }
.navGroupBody { display: grid; gap: 0.1rem; }
.navGroupBody.collapsed { display: none; }
/* Arama süzgeci: rol gereği gizli (.hidden) öğelerden ayrı tutulur ki
   arama temizlenince superOnly öğeler yanlışlıkla geri gelmesin. */
.navItem.navFiltered { display: none; }

/* Mobil menü perdesi: içeriğe dokunmayı keser, üst barı örtmez. */
.navScrim { position: fixed; inset: var(--shell-top) 0 0 0; z-index: 25; background: rgba(24, 20, 14, 0.38); }
body.nav-open { overflow: hidden; }

/* --- Sayfa yüzeyi --- */
.card, .view { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); padding: 1.15rem 1.25rem; }
/* Her ekranın başlığı ince bir çizgiyle ayrılır: editoryal bölüm hissi. */
.view h2 { margin: 0 0 0.9rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--line); letter-spacing: -0.015em; }
.viewHead h2, .viewHead h3 { margin: 0; padding-bottom: 0; border-bottom: 0; }
.viewHead { margin-bottom: 0.9rem; }
.muted { color: var(--muted); }

/* Yüzey parçaları: hepsi aynı köşe dilini paylaşır. */
.list li, .quizItem, .testCard, .subjectCard, .optionEditor, .badgeCard,
.boardCol, .profileHead, .imageEditItem, .testPicker, .reportOptions label, .qMenuPanel,
.bellPanel, .termsBox, .uiModalBox, .pdfViewerBox, .imageViewerBox, .settingsTabRail,
.settingsIntro, .deepNavGroup, .emptyState, .importBox {
  border-radius: var(--radius);
}

/* --- Form kontrolleri --- */
input, textarea, select, button { border-radius: 3px; }
input, textarea, select { border: 1px solid var(--field-border); background: var(--panel-2); color: var(--ink); padding: 0.55rem 0.65rem; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.85; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); }
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 55%, transparent);
  outline-offset: 1px;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }
textarea { line-height: 1.55; resize: vertical; }

/* Native "Dosya Seç" düğmesi: arayüzün parçası gibi görünsün. */
input[type="file"] { padding: 0.28rem; font-size: 0.8125rem; background: var(--panel-2); }
input[type="file"]::file-selector-button {
  font: inherit;
  font-size: 0.8125rem;
  margin-right: 0.6rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--field-border);
  border-radius: 3px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--hover); }

/* Select oku: tarayıcı varsayılanı yerine ince çizgi ok. */
select:not([multiple]) {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--panel-2);
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 0.7rem auto;
  padding-right: 1.9rem;
}

button { padding: 0.5rem 0.85rem; font-size: 0.875rem; font-weight: 500; letter-spacing: 0.005em; background: var(--brand); color: #fff; }
button:hover { background: var(--brand-hover); }
button.secondary { background: transparent; border: 1px solid var(--field-border); color: var(--ink); }
button.secondary:hover { background: var(--hover); border-color: var(--muted); }
button:disabled { opacity: 0.55; cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[data-theme="dark"] :focus-visible { outline-color: var(--brand-text); }

/* --- Tablolar: hesap defteri --- */
table { font-size: 0.86rem; }
th {
  background: transparent;
  border-bottom: 1.5px solid var(--ink);
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.5rem 0.55rem;
  white-space: nowrap;
}
td { padding: 0.5rem 0.55rem; border-bottom: 1px solid var(--line); }
td, th { font-variant-numeric: tabular-nums; }
tbody tr:hover { background: var(--row-hover); }

/* --- Özet şeridi (eski 6 kutu) --- */
.statGrid {
  gap: 0.5rem;
  margin-bottom: 1.2rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.statCard { background: transparent; border: 0; border-radius: 0; padding: 0 0.9rem 0 0; gap: 0.1rem; }
.statCard span { font-size: 0.625rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.statCard strong { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; letter-spacing: -0.01em; }
@media (min-width: 821px) {
  .statCard + .statCard { border-left: 1px solid var(--line); padding-left: 0.9rem; }
  /* Yapışkan kenar çubuğu üst barın GERÇEK alt kenarına hizalanır. */
  .sidebar { top: calc(var(--shell-top) + 0.5rem); max-height: calc(100vh - var(--shell-top) - 1rem); }
  .settingsTabRail { top: calc(var(--shell-top) + 0.5rem); }
}

/* --- Etiketler, rozetler, boş durumlar --- */
.badge { border-radius: 2px; background: var(--chip); color: var(--muted); font-size: 0.625rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.18rem 0.45rem; }
[data-theme="dark"] .badge { color: var(--muted); }
.stars { color: var(--chart-3); letter-spacing: 0.12em; }
.emptyState { border: 1px solid var(--line); background: transparent; padding: 0.9rem 1rem; justify-items: start; text-align: left; }
.emptyState .emptyIcon { opacity: 0.5; }

/* --- Bildirim/kullanıcı panelleri --- */
.bellPanel { top: calc(var(--shell-top) + 0.3rem); border-radius: var(--radius); box-shadow: var(--shadow-pop); }
/* Bildirim panelinin gövde metni: panel üst çubuğun içinde olduğu için mobilde
   `.topbar p { display: none }` kuralı bildirim metnini (gövde <p>) gizliyordu.
   Yalnız başlık okunuyordu. Panel paragrafları her genişlikte görünür. */
.bellPanel p { display: block; }
.bellItem small, .bellHeader { letter-spacing: 0.01em; }
.bellClear { color: var(--brand-text); }
.toast { border-radius: 3px; border-left-width: 3px; }
.uiModalBox { border-radius: var(--radius); }
.uiModalBox h3 { font-family: var(--serif); }
.termsBox { border-radius: var(--radius); }
.termsHead h2 { font-family: var(--serif); }
.skipLink { border-radius: 3px; background: var(--brand); }

/* --- Oyunlaştırma: gradyan yerine sakin mürekkep --- */
.xpBar { height: 6px; min-width: 0; border-radius: 2px; background: var(--track); }
.xpFill { background: var(--brand); border-radius: 2px; }
.badgeIcon { color: var(--brand-text); }

/* --- Grafikler --- */
.chartCenter { font-family: var(--serif); }
.chartTick { font-family: "IBM Plex Sans", system-ui, sans-serif; }
.legend i { border-radius: 1px; }

/* Profil avatarı: emoji yerine baş harf mührü (kâğıt üzerinde kaşe hissi). */
.profileAvatar {
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: var(--chip);
  color: var(--brand-text);
  border: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  flex: none;
}

/* --- Notlar: okuma yüzü --- */
/* Editoryal okuma ölçüsü: serif satır ~68 karakterde kalır (kâğıt dili). */
.noteContent { font-family: var(--serif); font-size: 1.02rem; line-height: 1.68; max-width: 68ch; }
/* Markdown çıktısı (DM.markdown): başlık/liste/alıntı/kod okuma yüzüne uyar.
   `.view` öneki bilinçli: tasarım katmanındaki `.view h2` (2.05rem) ve `.list li`
   aynı özgüllükte sonra geldiği için düz `.noteContent h2` eziliyordu. */
.view .noteContent h1, .view .noteContent h2, .view .noteContent h3,
.view .noteContent h4, .view .noteContent h5, .view .noteContent h6 {
  font-size: 1.06rem; line-height: 1.4; letter-spacing: 0;
  margin: 0.9rem 0 0.4rem; padding: 0; border: 0;
}
.noteContent > :first-child { margin-top: 0; }
.noteContent ul, .noteContent ol { margin: 0.3rem 0 0.7rem 1.2rem; padding: 0; display: block; }
.noteContent ul { list-style: disc; }
.noteContent ol { list-style: decimal; }
.noteContent li { display: list-item; margin: 0.1rem 0; padding: 0; border: 0; border-radius: 0; background: none; }
.noteContent blockquote { margin: 0.3rem 0 0.7rem; padding: 0.4rem 0.9rem; border-left: 2px solid var(--line); color: var(--muted); }
.noteContent pre { margin: 0.4rem 0 0.7rem; padding: 0.6rem 0.8rem; background: var(--panel); border: 1px solid var(--line); border-radius: 3px; overflow-x: auto; }
.noteContent code { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.86em; background: var(--panel); border-radius: 3px; padding: 0 0.2em; }
.noteContent pre code { background: none; padding: 0; }
.noteContent hr { border: 0; border-top: 1px solid var(--line); margin: 0.9rem 0; }
.noteContent a { text-decoration: underline; }
/* Tablo: dar ekranda yatay kaydırma, okuma yüzüne ince çizgi.
   Tablo DOĞAL genişliğinde kalır: `max-width` / `width:100%` ile sıkıştırılırsa
   hücreler kelime kırar (not kartı mobilde ~330px). Taşan kısım .tableWrap'ta
   kaydırılır; hücrelerdeki `overflow-wrap: anywhere` kalıtımı sıfırlanır, yoksa
   min-content 1 karaktere düşer ve kelimeler harf harf bölünür. */
.noteContent .tableWrap { margin: 0.5rem 0 0.8rem; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.noteContent table { border-collapse: collapse; width: auto; max-width: none; font-size: 0.94em; }
.noteContent th, .noteContent td { border: 1px solid var(--line); padding: 0.35rem 0.6rem; text-align: left; vertical-align: top; overflow-wrap: normal; word-break: normal; }
.noteContent th { background: var(--panel); font-weight: 600; white-space: nowrap; }
.noteContent td code { overflow-wrap: break-word; }
/* Canlı önizleme kutusu (not formu). */
.notePreview { margin-top: 0.2rem; padding: 0.7rem 0.9rem; max-height: 18rem; overflow: auto; border: 1px solid var(--line); border-radius: 3px; background: var(--panel); }
.notePreview.muted { font-family: inherit; font-size: 0.86rem; color: var(--muted); }
.noteHighlights { border-left-width: 2px; border-radius: 0 3px 3px 0; }

/* --- Seçim/sekme/sayfa yardımcıları --- */
.csvLink, .btnLike { border-radius: 3px; }
.settingsTab, .modeSwitch .segmented { border-radius: 3px; }
.proposalTabs, .chipRow { gap: 0.35rem; }
.relationChip { border-radius: 3px; }
.settingsTab[aria-pressed="true"] { color: var(--brand-text); }
/* Bileşen kuralları kendi 8-10px yarıçapını taşıyor; tek dil için burada
   aynı özgüllükte 3px'e çekilir (aksi halde eski kural kazanır). */
.loginCard form input, .signupField input, .signupField select, .sidebarForm input, .noteSort select,
#settingsSearch, .pasteBody textarea, .reportDetailWrap textarea, .feedbackInput,
.testPicker, .importBox, .signupPasswordBox, .loginNotice, .fieldDefault, .fieldInfo {
  border-radius: 3px;
}
.modeSwitch .segmented button[aria-pressed="true"] { color: var(--brand-text); }

/* --- Giriş sayfası: ortadaki kart değil, editoryal iki sütun --- */
.loginShell { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 3.5rem; max-width: 1120px; padding: 3rem 1.5rem calc(3rem + env(safe-area-inset-bottom)); }
.loginCard { background: transparent; border: 0; border-radius: 0; padding: 0; }
.loginBrand { text-align: left; margin-bottom: 1.6rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.loginLogo { width: 44px; height: 44px; margin-bottom: 0.7rem; border-radius: 3px; }
.loginBrand h1 { font-family: var(--serif); font-size: 2.05rem; font-weight: 600; letter-spacing: -0.025em; }
.loginBrand p { font-size: 0.85rem; }
.loginCard form { max-width: 360px; }
.loginCard form label { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); gap: 0.3rem; }
.loginCard form label.rememberRow { display: flex; flex-direction: row; align-items: center; gap: 0.5rem; }
.loginCard form label.rememberRow span { font-size: 0.8125rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink); }
.loginCard form input { font-size: 0.95rem; padding: 0.6rem 0.7rem; background: var(--surface); }
.loginCard form button { margin-top: 0.35rem; padding: 0.7rem; font-size: 0.9375rem; }
.loginDemo, .loginTerms, .loginFooter, .loginSignup { text-align: left; max-width: 360px; margin-left: 0; margin-right: 0; }
.loginError, .loginSuccess { font-size: 0.84rem; }
.loginAside img { border-radius: var(--radius); max-height: 64vh; border: 1px solid var(--line); }
.loginThemeToggle { border-radius: 3px; }
.termsBox { border-radius: var(--radius); }
/* Giriş arka planı: süzülen kar taneleri + kâğıtlar (dekoratif canvas,
   js/login-drift.js). Katman: canvas (0) < kâğıt grain'i (1) < form (2) <
   modallar/toast (60+). */
.loginDrift { position: fixed; inset: 0; z-index: 0; pointer-events: none; transition: opacity 0.45s ease; }
.loginShell { position: relative; z-index: 2; }
/* Forma odaklanınca arka plan sakinleşir; okunabilirlik öne çıkar. */
.loginPage:has(.loginCard :focus-within) .loginDrift { opacity: 0.7; }
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="full"]) .loginDrift { display: none; }
}
@media (prefers-contrast: more) {
  .loginDrift { display: none; }
}

/* --- Bantlar --- */
.demoBanner, .quotaBanner { font-size: 0.8125rem; padding: 0.5rem 0.8rem; line-height: 1.45; }
.demoBanner { background: var(--bad-bg); color: var(--bad); border-bottom: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); font-size: 0.75rem; padding: 0.35rem 0.8rem; }

/* --- Platform ayarları --- */
.settingsIntro, #settingsChangelog, #settingsSystem { background: var(--panel); }
#settingsBar { border-radius: var(--radius); border-color: var(--brand); background: var(--surface); }
.fieldHint { font-size: 0.75rem; }

/* --- Uzun kod etiketleri dar ekranda taşmasın --- */
.deepTextHead, .deepTextRow, .deepNavGroup { min-width: 0; }
.deepTextHead code { overflow-wrap: anywhere; }

/* --- Mobil: en sonda, çünkü aynı özgüllükte son kural kazanır --- */
@media (max-width: 820px) {
  :root { --topbar-h: 3.5rem; }
  .layout { padding: 0 0.7rem 2rem; margin: 0.7rem auto; gap: 0.7rem; }
  .topbar { padding: 0.45rem 0.6rem; gap: 0.35rem; }
  .topbar h1 { font-size: 1.05rem; }
  .userBadge { max-width: 30vw; padding: 0.28rem 0.45rem; font-size: 0.7rem; }
  .iconButton { padding: 0.35rem 0.45rem; }
  .demoBanner, .quotaBanner { font-size: 0.75rem; padding: 0.45rem 0.7rem; }

  /* Çekmece üst barın ve bantların ALTINDAN başlar (--shell-top ölçülür). */
  .sidebar {
    inset: var(--shell-top) auto 0 0;
    width: min(282px, 86vw);
    border-radius: 0 var(--radius) var(--radius) 0;
    box-shadow: var(--shadow-pop);
  }
  .navScrim { display: block; }

  .view, .card { padding: 1rem 0.95rem; }
  .view h2 { font-size: 1.35rem; }
  .filters { grid-template-columns: 1fr; }

  /* Yatay taşma sayfayı büyütmez: sekme şeritleri ve uzun etiketler kendi
     kutularında kayar. Sayfa yalnız dikey eksende hareket eder. */
  html, body { overflow-x: clip; }
  #mainContent { min-width: 0; max-width: 100%; }

  /* PWA kur düğmesi sabit; içeriğin son satırını örtmesin diye alta nefes payı. */
  body.hasInstallCta { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }

  /* Yerel uygulama hissi: dokunuşta gri parlama yok, çift dokunma
     gecikmesiz (pinch-zoom korunur). */
  html, body { -webkit-tap-highlight-color: transparent; }
  button, a, [role="button"], .navItem, .ds-tab, .settingsTab, .bqTestTabs button {
    touch-action: manipulation;
  }

  /* iOS Safari 16px altındaki alanlara odaklanınca sayfayı yakınlaştırır;
     klavye kapanınca sayfa büyümüş/küçülmüş kalır. Yalnız iOS'ta alanları
     16px'e sabitle (Android/masaüstü tasarımı 13px kalır). */
  @supports (-webkit-touch-callout: none) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    select,
    textarea {
      font-size: var(--fs-md) !important;
    }
  }

  /* Sınav odak modu: sabit "Uygulamayı kur" düğmesi alt eylem çubuğunu örtmesin. */
  body:has(#examView:not(.hidden)) #installPwaBtn { display: none; }

  /* Yatay sekme şeritlerinde kaydırma çubuğu görünmesin. */
  .settingsTabRail { scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior-x: contain; }
  .settingsTabRail::-webkit-scrollbar { display: none; }

  /* Ayar kaydet çubuğu içeriği örtmesin: sayfa sonuna nefes payı. */
  .settingsBody { padding-bottom: 5.5rem; }
  #settingsForm { padding-bottom: 1rem; }
  #settingsBar { bottom: 0.4rem; }

  .loginShell { grid-template-columns: 1fr; gap: 1.5rem; padding: 2rem 1.1rem calc(2rem + env(safe-area-inset-bottom)); }
  .loginCard { max-width: 440px; }
  .loginBrand h1 { font-size: 1.75rem; }
  /* iOS Safari odakta 16px altındaki alanlarda sayfayı zoomlar. */
  .loginCard form input { font-size: 1rem; }
}

@media (max-width: 430px) {
  .topbar { gap: 0.25rem; }
  .topbar h1 { font-size: 1rem; }
  .userBadge { max-width: 26vw; }
  .statCard strong { font-size: 1.3rem; }
  .profileHead { flex-wrap: wrap; gap: 0.7rem; }
}

/* Dokunma hedefleri: mobilde en az 44px (2.75rem) yükseklik. */
@media (max-width: 820px) {
  .navItem { padding-block: 0.5rem; }
  .iconButton, .userBadge { min-height: 2.75rem; }
}

/* ==========================================================================
   FAZ 0 — Masthead + İçindekiler + üç sayfa arketipi
   Kart çağı biter: içerik kâğıdın üzerinde durur, bölümler çizgiyle ayrılır.
   Bu katman da dosyanın sonundadır; mobil kuralları en sonda yeniden yazılır.
   ========================================================================== */

/* Kâğıt grain'i: %3'ün altında, dokunulabilir bir yüzey hissi. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="dark"] body::after { opacity: 0.05; }

/* ---- Masthead ---- */
.topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem 0.7rem;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 2px solid var(--ink);
}
/* İkinci ince çizgi: masthead'in imzası. */
.topbar::after {
  content: "";
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  bottom: -5px;
  border-bottom: 1px solid var(--line);
}
#menuToggle { display: none; }
.brandHome { display: inline-flex; align-items: center; padding: 0.15rem; margin: 0; background: none; }
.brandHome:hover { background: none; }
.brandHome:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
/* Masthead'de yalnız sembol: ad çekmecede. Sabit kutu ölçüsü şart —
   yüzde tabanlı max-width, boyutu içeriğe bağlı ebeveynde 0'a düşürüyordu. */
.brandLogo { width: 26px; height: 26px; max-width: 26px; max-height: 26px; object-fit: contain; border-radius: 2px; }
/* Site adı + şiar: menü çekmesinin başında. */
.sidebarBrand {
  padding: 0 0 0.9rem;
  margin: 0 0 0.9rem;
  border-bottom: 1px solid var(--line);
}
/* Marka bloğu "eve dön" düğmesidir (v2 masaüstünde üst bar logosu gizli). */
.sidebarBrand[role="button"] { cursor: pointer; }
.sidebarBrand[role="button"]:hover h1 { color: var(--brand-text); }
.sidebarBrand[role="button"]:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 6px; }
.sidebarBrand h1 {
  font-size: 1.18rem;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0;
  overflow-wrap: anywhere;
}
.sidebarBrand p {
  margin: 0.4rem 0 0;
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.mastheadIssue {
  margin-left: auto;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.topbar .bell { margin-left: 0.9rem; }
.topbar .iconButton { padding: 0.2rem 0.35rem; color: var(--muted); }
.topbar .iconButton:hover { background: transparent; color: var(--ink); }
.textButton {
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.textButton:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.topbar .userBadge {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0.2rem 0;
  font-size: 0.75rem;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}
.topbar .userBadge:hover { text-decoration-color: var(--muted); }
.activeCount {
  border: 0;
  background: none;
  padding: 0 0.1rem;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.activeCount svg { display: none; }
#activeCountValue::after { content: " kişi çevrimiçi"; }

/* Kredi rozeti yalnız mobil üst barda: masaüstünde kenar çubuğu zaten
   bakiyeyi gösterir (#creditsCount). Taban kural medya bloğundan ÖNCE;
   aksi halde aynı özgüllükte son yazan (medya) kazanamaz. */
#creditsCount { display: none; }

/* ---- Kenar çubuğu: kutu değil, içindekiler ---- */
.layout { max-width: 1180px; gap: 3rem; margin: 2.2rem auto 0; padding: 0 1.5rem 4rem; }
.sidebar {
  width: 210px;
  flex: 0 0 210px;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 0 1.4rem 1rem 0;
  gap: 0;
  align-content: start;
}
.navSearch {
  position: sticky;
  top: 0;
  z-index: 3;
  /* Masaüstü kenar çubuğu şeffaf (zemin body --bg): kaydırılan öğeler arama kutusunun altından görünmesin. */
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 0 0 0.55rem;
  margin: 0 0 1.1rem;
}
.navSearch input {
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  padding: 0.15rem 0;
  font-size: 0.8rem;
}
.navSearch input:focus { border-bottom-color: var(--ink); }
.navSearch input:focus-visible { outline: none; }
.navSearchEmpty { margin: 0.6rem 0 0; }

/* Menüde ikon yok: metin + numara. */
svg.navIcon { display: none; }
.sidebar nav { counter-reset: navgroup; }
.navGroupLabel {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  margin: 1.5rem 0 0.4rem;
  padding: 0 0 0.35rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.navGroupToggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 1.5rem 0 0.4rem;
  padding: 0 0 0.35rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: none;
  counter-increment: navgroup;
}
.navGroupToggle:hover { background: none; color: var(--ink); }
.navGroupToggle > span::before {
  content: counter(navgroup, decimal-leading-zero);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.6rem;
  letter-spacing: 0;
  margin-right: 0.7rem;
  color: var(--muted);
}
.navGroupBody { gap: 0; margin-bottom: 0.4rem; }
.navItem {
  position: relative;
  padding: 0.32rem 0 0.32rem 1rem;
  border-radius: 0;
  font-size: 0.9rem;
  color: var(--ink);
}
.navItem:hover { background: transparent; color: var(--brand-text); }
.navItem::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.82em;
  width: 0.3rem;
  height: 0.3rem;
  background: transparent;
}
.navItem.active {
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-weight: 600;
}
.navItem.active::before { background: var(--brand); }
.navItem.logout {
  margin-top: 1.1rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
  border-radius: 0;
  color: var(--bad);
}
.appVersion { text-align: left; padding: 0; }

/* ---- Sayfa yüzeyi: kart yok ---- */
.view, .card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}
.view h2 {
  font-size: 2.05rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 1.7rem;
  padding: 0;
  border: 0;
}
/* Kicker: başlığın üstünde küçük kategori satırı. */
.view h2[data-kicker]::before {
  content: attr(data-kicker);
  display: block;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6rem;
}
/* Ana sayfa başlığı çift çizgiyle kapanır. */
.view > h2:first-child {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.6rem;
  margin-bottom: 1.9rem;
  position: relative;
}
.view > h2:first-child::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  border-bottom: 1px solid var(--line);
}
.viewHead {
  align-items: flex-end;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.55rem;
  margin-bottom: 1.7rem;
  position: relative;
}
.viewHead::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  border-bottom: 1px solid var(--line);
}
.viewHead h2 { margin: 0; padding: 0; border: 0; font-size: 2.05rem; }
.pageLede { max-width: 62ch; margin: -0.5rem 0 1.9rem; font-size: 0.875rem; line-height: 1.65; color: var(--muted); }

/* Bölüm başlıkları: serif yerine küçük büyük harf + sağa uzayan çizgi. */
.view > h3 {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2.4rem 0 0.9rem;
}
.view > h3::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
  transform: translateY(-0.22em);
}

/* ---- Dizin arketipi: Notlar ---- */
#notesView .filters {
  grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
  margin: 0;
  padding: 0.9rem 0 1rem;
  border-bottom: 1px solid var(--line);
}
#notesView .filters input,
#notesView .filters select {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0.3rem 0;
  font-size: 0.85rem;
}
#notesView .filters select:not([multiple]) {
  padding-right: 1.2rem;
  background-position: right 0 center;
}
#notesView .filters input:focus,
#notesView .filters select:focus {
  border-bottom-color: var(--ink);
  outline: none;
  box-shadow: none;
}
.noteSort { align-items: center; gap: 0.7rem; }
.noteSort select {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0.15rem 1.1rem 0.15rem 0;
  background-position: right 0 center;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
#noteSortDir { background: none; color: var(--muted); padding: 0 0.2rem; }

/* Not satırları: numaralı, kart değil. */
#notesList { counter-reset: noteRow; gap: 0; }
#notesList > li {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0 1.1rem;
  counter-increment: noteRow;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 1.35rem 0;
}
#notesList > li::before {
  content: counter(noteRow, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1 / span 30;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.66rem;
  color: var(--muted);
  padding-top: 0.35rem;
}
#notesList > li > * { grid-column: 2; min-width: 0; }
#notesList > li > button { justify-self: start; }
#notesList > li.listEmpty { display: block; padding: 2rem 1rem; color: var(--muted); border: 1px dashed var(--line); text-align: center; }
#notesList > li.listEmpty::before { content: none; }
#notesList > li > strong {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0.1rem 0 0.25rem;
}
#notesList .quizMeta { gap: 0.8rem; margin-bottom: 0.25rem; }
#notesList .badge {
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}
#notesList > li > p {
  margin: 0.1rem 0 0.55rem;
  font-size: 0.75rem;
  color: var(--muted);
}
#notesList .noteSummary { max-width: 68ch; font-size: 0.9rem; color: var(--ink); }
#notesList .noteContent { max-width: 68ch; font-size: 0.98rem; }
#notesList .noteContent.clamped { max-height: 5.6rem; }
/* İç içe listeler (önemli kısımlar, şıklar) üst liste görünümünü miras almasın. */
#notesList .noteHighlights li,
#questionList > li ol li,
#questionList > li ul li {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  margin: 0.1rem 0;
  display: list-item;
}
#notesList .noteHighlights {
  max-width: 66ch;
  border-left: 2px solid var(--brand);
  border-radius: 0;
  background: transparent;
  padding: 0.15rem 0 0.15rem 0.9rem;
}
#notesList .actions { gap: 1.3rem; margin-top: 0.7rem; }
#notesList .actions button,
#notesList .actions a,
#notesList .noteExpand,
#notesList .noteQuestions {
  background: none;
  border: 0;
  padding: 0;
  color: var(--brand-text);
  font-size: 0.78rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#notesList .actions button:hover,
#notesList .noteExpand:hover,
#notesList .noteQuestions:hover { background: none; color: var(--ink); }
#notesList .preview { border-radius: 0; }

/* ---- Editör arketipi: Soru Yönetimi ---- */
/* Soru düzenleyici düzeni iki görünümde ortak: Soru Yönetimi + Soru Öner. */
#adminQuestionsView .settingsBody,
#submitQuestionView .settingsBody { display: block; }
#adminQuestionsView .settingsTabRail,
#submitQuestionView .settingsTabRail {
  display: flex;
  position: static;
  gap: 2.2rem;
  padding: 0;
  margin: 0 0 2rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
#adminQuestionsView .settingsTab,
#submitQuestionView .settingsTab {
  width: auto;
  padding: 0.45rem 0;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
#adminQuestionsView .settingsTab:hover,
#submitQuestionView .settingsTab:hover { background: none; color: var(--ink); }
#adminQuestionsView .settingsTab[aria-pressed="true"],
#submitQuestionView .settingsTab[aria-pressed="true"] {
  background: none;
  color: var(--ink);
  border-bottom-color: var(--brand);
  font-weight: 600;
}
.editorForm { display: block; }
.formSection { border-top: 1px solid var(--line); padding: 1.8rem 0 2.2rem; }
.formSection:first-of-type { border-top: 0; padding-top: 0; }
.formSectionTitle {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin: 0 0 1.4rem;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.formSectionTitle span {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  color: var(--brand-text);
  letter-spacing: 0;
}
.formRows { display: grid; gap: 1.15rem; }
.formRow { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 1.8rem; align-items: start; }
.formRow > label,
.formRow > .rowLabel { font-size: 0.78rem; font-weight: 600; color: var(--ink); padding-top: 0.5rem; }
.formRow .hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.7rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--muted);
}
.editorForm input[type="text"],
.editorForm input[type="file"],
.editorForm select,
.editorForm textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--field-border);
  border-radius: 0;
  padding: 0.45rem 0;
}
.editorForm select:not([multiple]) { padding-right: 1.4rem; background-position: right 0 center; }
/* Dosya girişi native (::file-selector-button stilini yukarıdaki form bloğu verir). */
.editorForm textarea {
  min-height: 7rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.editorForm input:focus,
.editorForm select:focus { border-bottom-color: var(--ink); outline: none; box-shadow: 0 1px 0 var(--ink); }
.editorForm textarea:focus { border-color: var(--ink); outline: none; }
.editorForm .optionsGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.4rem; }
.editorForm .optionEditor {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 0.9rem 0;
}
.formActions {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  margin-top: 0.5rem;
  padding-top: 1.2rem;
  border-top: 2px solid var(--ink);
}
.formActions button[type="submit"] { padding: 0.65rem 1.5rem; }
.formActions .secondary {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.importBox {
  margin: 0;
  padding: 1.8rem 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.importBox legend {
  padding: 0;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
#adminQuestionSearch {
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.4rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
#adminQuestionSearch:focus { border-bottom-color: var(--ink); outline: none; }

/* Soru listesi de dizin gibi numaralanır. */
#questionList { counter-reset: questionRow; gap: 0; }
#questionList > li {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0 1.1rem;
  counter-increment: questionRow;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 1.2rem 0;
}
#questionList > li::before {
  content: counter(questionRow, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1 / span 30;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.66rem;
  color: var(--muted);
  padding-top: 0.35rem;
}
#questionList > li > * { grid-column: 2; min-width: 0; }
#questionList > li > button { justify-self: start; }
#questionList > li.listEmpty { display: block; padding: 2rem 1rem; color: var(--muted); border: 1px dashed var(--line); text-align: center; }
#questionList > li.listEmpty::before { content: none; }
#questionList > li > strong { font-size: 1rem; line-height: 1.45; margin: 0.2rem 0 0.4rem; }
#questionList .quizMeta { gap: 0.8rem; }
#questionList .badge { background: none; border: 0; padding: 0; color: var(--muted); font-size: 0.58rem; letter-spacing: 0.14em; }
#questionList .actions { gap: 1.3rem; margin-top: 0.7rem; }
#questionList .actions button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--brand-text);
  font-size: 0.78rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#questionList .actions button:hover { background: none; color: var(--ink); }

/* ---- Okuma arketipi: Analitik ---- */
#analyticsStats {
  gap: 0;
  padding: 1.3rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.6rem;
}
#analyticsStats .statCard { padding: 0 1.5rem 0 0; }
#analyticsStats .statCard + .statCard { padding-left: 1.5rem; }
#analyticsStats .statCard span { font-size: 0.58rem; letter-spacing: 0.16em; }
#analyticsStats .statCard strong { font-size: 2.05rem; line-height: 1; }
#analyticsUsers table,
#analyticsQuestions table { font-size: 0.82rem; }
#analyticsUsers td:not(:first-child),
#analyticsQuestions td:not(:first-child),
#analyticsUsers th:not(:first-child),
#analyticsQuestions th:not(:first-child) { text-align: right; }
#adminAnalyticsView .csvRow { gap: 1.4rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
#adminAnalyticsView .csvLink {
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.74rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Boş durumlar kutu değil, ince bir not satırı. */
.emptyState {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 1.3rem 0;
}

/* ---- Faz 0 mobil ---- */
@media (max-width: 820px) {
  .topbar { align-items: center; padding: 0.35rem 1rem; }
  #menuToggle { display: inline-flex; align-items: center; justify-content: center; }
  .mastheadIssue { display: none; }
  .topbar .bell { margin-left: auto; }
  /* Mobil üst bar: sayaçlar ikon + sayı (uzun metin yok, ikon gizli değil). */
  #activeCount svg, #creditsCount svg { display: inline-block; width: .95rem; height: .95rem; }
  #activeCountValue::after { content: none; }
  #creditsCount { display: inline-flex; }
  .brandHome { flex: 0 0 auto; min-width: 0; padding: 0; }
  .layout { gap: 1rem; margin: 0.85rem auto 0; padding: 0 1rem 3rem; }
  .sidebar {
    width: min(252px, 78vw);
    flex-basis: auto;
    border-right: 0;
    border-radius: 0 4px 4px 0;
    padding: 0.5rem 0.9rem 0.85rem;
    background: var(--surface);
  }
  /* Yapışkan arama çekmecede opak olmalı: altından kayan öğeler görünmesin. */
  .sidebar .navSearch { background: var(--surface); }
  /* Çekmece başlığı: mobilde tek satır şiar, daha az dikey pay. */
  .sidebarBrand { padding-bottom: 0.6rem; margin-bottom: 0.5rem; }
  .sidebarBrand h1 { font-size: 1.02rem; }
  .sidebarBrand p {
    margin-top: 0.25rem;
    font-size: 0.5rem;
    letter-spacing: 0.12em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .sidebar .navItem { padding-top: 0.34rem; padding-bottom: 0.34rem; }
  /* Grup başlıkları mobilde daha sık: uzun menü çekmecede daha çok öğe görünsün. */
  .sidebar .navGroupToggle { margin: 1.05rem 0 0.3rem; }
  .sidebar .navSearch { margin-bottom: 0.7rem; padding-bottom: 0.45rem; }
  .view h2, .viewHead h2 { font-size: 1.65rem; }
  .view h2 { margin-bottom: 1.3rem; }
  .pageLede { margin-top: 0; }
  #notesView .filters { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .formRow { grid-template-columns: 1fr; gap: 0.35rem; }
  .formRow > label, .formRow > .rowLabel { padding-top: 0; }
  .editorForm .optionsGrid { grid-template-columns: 1fr; }
  #analyticsStats .statCard { padding-right: 0.8rem; }
  #analyticsStats .statCard + .statCard { padding-left: 0.8rem; }
}

@media (max-width: 430px) {
  .topbar h1 { font-size: 1.2rem; }
  /* Dar ekranda kullanıcı adı yerine "Hesap": marka adı kırpılmasın.
     Tam ad/rol hesap panelinde görünür; ekran okuyucu düğme metnini okur. */
  .topbar .userBadge { max-width: none; font-size: 0; }
  .topbar .userBadge::after { content: "Hesap"; font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; }
  #notesView .filters { grid-template-columns: 1fr; }
  #notesList li, #questionList li { grid-template-columns: 1.6rem minmax(0, 1fr); gap: 0 0.8rem; }
  .view > h3 { margin-top: 1.9rem; }
}

/* ---- Paneller: geçmiş / ilişkiler / denemeler ---- */
.panel { padding: 1rem 0; border-top: 1px solid var(--line); }
#questionHistoryPanel { margin: 0 0 1.6rem; }
#questionHistoryPanel .actions { margin-top: 0; align-items: baseline; }
/* scrollIntoView hedefleri yapışkan masthead'in altında kalmasın. */
#questionHistoryPanel,
#adminNoteEditor,
#subjectRelations,
#adminUserAttempts { scroll-margin-top: calc(var(--shell-top) + 1.2rem); }

/* ==========================================================================
   Soru düzenleyici — editör + canlı öğrenci önizlemesi
   Sıra kuralı: masaüstü kuralları burada, mobil düzeltmeler dosyanın EN
   SONUNDA (aynı özgüllükte son kazanır). Renkler yalnız tasarım
   değişkenlerinden gelir; koyu tema otomatik uyar.
   ========================================================================== */
.questionEditor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 350px);
  gap: 2.4rem;
  align-items: start;
}
.questionEditorMain { min-width: 0; }

/* Kaydet çubuğu: uzun formda aşağı kaydırırken kaydetmeyi kaybetmemek için. */
.questionEditorBar {
  position: sticky;
  top: calc(var(--shell-top) + 0.25rem);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.questionEditorState { display: flex; align-items: baseline; gap: 0.7rem; min-width: 0; }
.questionEditorState strong {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.questionEditorStatus {
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
}
.questionEditorStatus[data-tone="dirty"] { color: var(--warn); }
.questionEditorStatus[data-tone="dirty"]::before { content: "● "; font-size: 0.6em; vertical-align: middle; }
.questionEditorSave { padding: 0.5rem 1rem; display: inline-flex; align-items: center; gap: 0.5rem; }
.questionEditorSave kbd {
  font-size: 0.62rem;
  padding: 0.05rem 0.28rem;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  border-radius: 2px;
  opacity: 0.75;
}

/* Doğru şık seçimi artık şık kartının üstünde; gizli select kaydetme
   akışının tek kaynağı olarak kalır (app.js onu okur). */
.questionCorrectHidden { display: none; }

/* --- Şık kartları --- */
/* Şık satırı etiket sütunundan taşar: metin alanına gerçek genişlik kalsın. */
.editorForm .formRow.formRowWide { grid-template-columns: 1fr; gap: 0.55rem; }
.editorForm .editorOptions { grid-template-columns: 1fr; gap: 0.45rem; }
.editorForm .editorOptions .optionEditor {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.3rem 0.85rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-left: 2px solid transparent;
  border-radius: var(--radius);
  background: var(--panel-2);
}
/* İşaret yuvarlağı DOM'da kartın SONUNDA durur (notes.js şık metnini
   `querySelector('input')` ile okuyor), görselde ise ilk sütunda. */
.editorForm .editorOptions .optionEditor > .optionPick { grid-column: 1; grid-row: 1 / span 2; }
.editorForm .editorOptions .optionEditor > input[type="text"] { grid-column: 2; grid-row: 1; }
.editorForm .editorOptions .optionEditor.isCorrect {
  border-left-color: var(--brand);
  background: var(--brand-soft);
}
.editorForm .editorOptions .optionEditor.isInvalid { border-color: var(--bad); border-left-color: var(--bad); }
.editorForm .editorOptions .optionEditor input[type="text"] { border-bottom-color: transparent; font-size: 0.95rem; }
.editorForm .editorOptions .optionEditor input[type="text"]:focus { border-bottom-color: var(--ink); }
.editorForm .editorOptions .optionEditor > label:not(.optionPick) {
  grid-column: 2;
  grid-row: 2;
  font-size: var(--fs-xs);
  color: var(--muted);
  white-space: nowrap;
}
.editorForm .editorOptions .optionEditor > small { grid-column: 2; grid-row: 3; font-size: var(--fs-xs); color: var(--muted); }
.editorForm .editorOptions .optionEditor input[data-option-image] { max-width: 12rem; }

.optionPick { position: relative; display: grid; place-items: center; cursor: pointer; }
.optionPick input { position: absolute; width: 1px; height: 1px; margin: -1px; opacity: 0; }
.optionLetter {
  display: grid;
  place-items: center;
  width: 1.95rem;
  height: 1.95rem;
  border: 1px solid var(--field-border);
  border-radius: 50%;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.optionPick:hover .optionLetter { border-color: var(--brand); color: var(--brand-text); }
.optionPick input:checked + .optionLetter { background: var(--brand); border-color: var(--brand); color: #fff; }
.optionPick input:focus-visible + .optionLetter { outline: 2px solid var(--brand); outline-offset: 2px; }

/* --- Önizleme (öğrenci görünümü) --- */
.questionEditorPreview {
  position: sticky;
  top: calc(var(--shell-top) + 0.25rem);
  min-width: 0;
  padding-top: 0.1rem;
}
.previewKicker {
  margin: 0 0 0.6rem;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.previewPaper {
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.9rem;
  max-height: calc(100vh - var(--shell-top) - 2rem);
  overflow: auto;
}
.previewHead { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; margin-bottom: 0.75rem; }
.previewMeta { font-size: var(--fs-xs); letter-spacing: 0.02em; color: var(--muted); }
.previewStars { font-size: 0.72rem; letter-spacing: 0.06em; color: var(--brand-text); }
.previewChip {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
}
.previewText { margin: 0 0 0.85rem; font-family: var(--serif); font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere; }
.previewText em, .previewOptionText em { color: var(--muted); }
.previewImages { display: grid; gap: 0.4rem; margin-bottom: 0.75rem; }
.previewImage { max-width: 100%; border-radius: 2px; }
.previewNote { margin: 0 0 0.7rem; font-size: var(--fs-xs); color: var(--muted); }
.previewOptions { list-style: none; margin: 0 0 0.9rem; padding: 0; display: grid; gap: 0.4rem; }
.previewOptions li {
  display: grid;
  grid-template-columns: 1.55rem minmax(0, 1fr);
  gap: 0.5rem;
  align-items: start;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  line-height: 1.4;
}
.previewOptions li.isCorrect { border-color: var(--brand); background: var(--brand-soft); }
.previewLetter {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border: 1px solid var(--field-border);
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
}
.previewOptions li.isCorrect .previewLetter { background: var(--brand); border-color: var(--brand); color: #fff; }
.previewOptionText { overflow-wrap: anywhere; }
.previewKey {
  margin: 0;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  color: var(--muted);
}
.previewKey strong { color: var(--brand-text); }
.previewExplanation { margin-top: 0.6rem; font-size: var(--fs-xs); color: var(--muted); }
.previewExplanation summary { cursor: pointer; }
.previewExplanation p { margin: 0.4rem 0 0; line-height: 1.5; overflow-wrap: anywhere; }
.previewEmpty { margin: 0; font-size: var(--fs-xs); line-height: 1.6; color: var(--muted); }

/* Sınav ekranı: ders rozetinin yanındaki konu bilgisi düğmesi.
   <details> tabanlı — JS yok; summary gerçek düğme semantiği taşır. */
.topicInfo { position: relative; display: inline-flex; }
.topicInfo > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}
.topicInfo > summary::-webkit-details-marker { display: none; }
.topicInfo > summary::marker { content: ''; }
.topicInfo > summary:hover,
.topicInfo[open] > summary { border-color: var(--brand); color: var(--brand-text); }
.topicInfo > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.topicInfo > summary .icon { width: 14px; height: 14px; }
.topicInfo > span {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 20;
  min-width: 140px;
  max-width: 260px;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-xs);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* Mobil düzeltmeleri: tek sütun, önizleme formun altında. */
@media (max-width: 1080px) {
  .questionEditor { grid-template-columns: 1fr; gap: 1.4rem; }
  .questionEditorPreview { position: static; order: 2; }
  .previewPaper { max-height: none; }
}
@media (max-width: 600px) {
  .questionEditorBar { position: static; margin-bottom: 1rem; }
  .questionEditorSave kbd { display: none; }
  .editorForm .editorOptions .optionEditor > label:not(.optionPick) { grid-column: 2; }
  .editorForm .editorOptions .optionEditor input[data-option-image] { max-width: 100%; }
}

/* Flashcard sistemi: deste ızgarası, kart formu, çalışma ekranı ve istatistik. */
.fcGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.fcDeckCard { padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: flex; flex-direction: column; gap: 0.55rem; }
.fcDeckCard h3 { margin: 0; overflow-wrap: anywhere; }
.fcDeckCard .actions { margin-top: auto; }
.fcForm { display: grid; gap: 0.8rem; margin: 1rem 0; }
.fcForm label { display: grid; gap: 0.3rem; }
.fcForm textarea, .fcForm input, .fcForm select { width: 100%; }
.fcFormRow { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.7rem; }
.fcGate { margin: 0.6rem 0 1rem; padding: 0.55rem 0.75rem; border: 1px solid var(--line); border-radius: 9px; background: var(--brand-soft); color: var(--ink); font-size: var(--fs-sm); }
.fcCardRow { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 0.85rem; border-bottom: 1px solid var(--line); }
.fcCardRow > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.fcCardRow .actions { flex-wrap: wrap; }
.fcStudyCard { max-width: 760px; margin: 1rem auto; padding: 1.4rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); min-height: 220px; display: grid; gap: 1rem; align-content: start; }
.fcFront { font-size: 1.15rem; line-height: 1.6; overflow-wrap: anywhere; }
.fcBack { padding-top: 1rem; border-top: 1px solid var(--line); line-height: 1.6; overflow-wrap: anywhere; }
.fcOptions { display: grid; gap: 0.5rem; }
.fcOption { display: flex; align-items: center; gap: 0.55rem; padding: 0.6rem 0.75rem; text-align: left; border: 1px solid var(--field-border); border-radius: 9px; background: var(--surface); color: var(--ink); cursor: pointer; }
.fcOption > span { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border: 1px solid var(--line); border-radius: 50%; font-size: var(--fs-xs); flex: 0 0 auto; }
.fcOption.selected { border-color: var(--brand); background: var(--brand-soft); }
.fcOption.correct { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.fcOption:disabled { cursor: default; }
.fcRating { display: flex; flex-wrap: wrap; gap: 0.55rem; justify-content: center; margin: 0.8rem 0; }
.fcRating button { min-width: 110px; }
.fcDone { text-align: center; display: grid; gap: 0.8rem; place-items: center; }
.fcHeatmap { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; max-width: 620px; }
.fcHeat { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--brand); opacity: calc(0.15 + var(--fc-heat, 0) * 0.85); }
.fcPowerCard { padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 1.2rem; }
.fcPowerCard h3 { margin-top: 0; }
@media (max-width: 820px) {
  .fcCardRow { flex-direction: column; }
  .fcStudyCard { padding: 1rem; margin: 0.6rem 0; }
  .fcRating button { flex: 1 1 45%; min-width: 0; }
  .fcHeatmap { grid-template-columns: repeat(15, minmax(0, 1fr)); }
}
.sectionHead { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.sectionHead h2, .sectionHead h3 { margin: 0; }
.fcImage { display: block; max-width: 100%; max-height: 260px; margin: 0 0 0.7rem; border-radius: 8px; object-fit: contain; }
.fcImageFields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.fcImageField { display: grid; gap: 0.35rem; min-width: 0; }
.fcImageField .imageEditList { margin-top: 0; }
.fcCardMain { display: flex; align-items: flex-start; gap: 0.75rem; min-width: 0; }
.fcCardMain > div { min-width: 0; overflow-wrap: anywhere; }
.fcThumb { width: 72px; height: 72px; flex: 0 0 auto; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; cursor: zoom-in; }
@media (max-width: 820px) {
  .fcImageFields { grid-template-columns: 1fr; }
}

/* ===== Onay kutusu / radyo (ds-check): tek boyut, tek görünüm =====
   Tüm checkbox ve radyolar buradan boyanır; yerel kuralda width/height yazma (--check-size).
   Mobilde kutu 22px ve satır en az 44px dokunma alanı; masaüstünde 18px. */
:root { --check-size: 1.375rem; --tap: 44px; --pal: 44px; }
@media (min-width: 821px) { :root { --check-size: 1.125rem; --tap: 40px; --pal: 40px; } }
html input[type="checkbox"], html input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  display: inline-block;
  width: var(--check-size);
  height: var(--check-size);
  min-width: var(--check-size);
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--muted);
  border-radius: 5px;
  background-color: var(--surface);
  background-position: center;
  background-repeat: no-repeat;
  vertical-align: middle;
  cursor: pointer;
}
html input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:hover, input[type="radio"]:hover { border-color: var(--brand); }
input[type="checkbox"]:checked, input[type="radio"]:checked { border-color: var(--brand); background-color: var(--brand); }
input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 80% 80%;
}
input[type="radio"]:checked {
  background-image: radial-gradient(circle, var(--on-brand) 0 32%, transparent 36%);
}
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: 0.5; cursor: not-allowed; }
/* Onay satırları: dokunma alanı, kutu etiketle dikey ortalı (çok satırlı metinde üste hizalı). */
.checkRow, .loginCard form label.rememberRow { align-items: center; gap: var(--sp-2); }
.checkRow:has(input) { min-height: var(--tap); }
.loginCard form label.rememberRow { min-height: var(--tap); margin-top: 0; }

/* Bugün planı: taşan görevler tek bağlantı, biten görevler tek özet satırı (js/today.js). */
.planMore {
  display: block;
  width: 100%;
  min-height: var(--tap);
  margin-top: var(--sp-2);
  padding: 0 var(--sp-2);
  border: 0;
  background: transparent;
  color: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}
.planMore:hover { background: transparent; color: inherit; opacity: 0.8; }
.planDone { margin-top: var(--sp-2); font-size: var(--fs-sm); }
.planDone > summary { min-height: var(--tap); display: flex; align-items: center; padding: 0 var(--sp-2); cursor: pointer; opacity: 0.85; }
.planDone ul { margin: 0 0 var(--sp-2); padding: 0 var(--sp-2) 0 var(--sp-5); display: grid; gap: var(--sp-1); opacity: 0.85; }

/* Konu sıralama düğmeleri (Dersler & Konular): küçük kare, dokunma alanı --tap. */
.topicMove { min-width: var(--tap); min-height: var(--tap); padding: 0; font-weight: 700; }

/* ===== Konu panosu (Notlar + Denemeler), konu grup başlıkları, tam ekran not okuma =====
   Ortak bileşenler (görünüme özel değil): .topicPicker, .topicGroupHead, .noteReader. */

/* ---- Konu panosu ---- */
.topicPicker { position: relative; display: inline-flex; align-items: center; gap: var(--sp-1); }
.topicPicker.hidden { display: none; }
.topicPicker__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  height: 40px;
  max-width: min(320px, 70vw);
  padding: 0 var(--sp-3);
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
}
.topicPicker__btn:hover { border-color: var(--brand); background: var(--surface); color: var(--ink); }
.topicPicker--active .topicPicker__btn { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-text); }
.topicPicker__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topicPicker__caret { color: var(--muted); font-size: var(--fs-xs); }
.topicPicker__clear {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--r-full);
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-sm);
  cursor: pointer;
}
.topicPicker__clear:hover { background: var(--brand-soft); color: var(--ink); }
.topicPicker__clear.hidden { display: none; }
.topicPicker__panel {
  position: absolute;
  top: calc(100% + var(--sp-1));
  left: 0;
  z-index: 30;
  width: min(360px, 92vw);
  max-height: min(420px, 60vh);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}
.topicPicker__panel.hidden { display: none; }
.topicPicker__search { flex: 0 0 auto; width: 100%; height: 40px; min-height: 0; margin: 0; padding: 0 var(--sp-3); box-sizing: border-box; }
.topicPicker__list { flex: 1 1 auto; min-height: 0; list-style: none; margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; }
.topicPicker__list li { margin: 0; padding: 0; border: 0; background: transparent; }
.topicPicker__list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  width: 100%;
  min-height: 40px;
  padding: var(--sp-2) var(--sp-3);
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink);
  font-size: var(--fs-sm);
  text-align: left;
  cursor: pointer;
}
.topicPicker__list button:hover,
.topicPicker__list button:focus-visible { background: var(--brand-soft); color: var(--ink); }
.topicPicker__list [aria-selected="true"] button { font-weight: 700; color: var(--brand-text); }
.topicPicker__n { flex: none; color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.topicPicker__empty { padding: var(--sp-3); color: var(--muted); font-size: var(--fs-sm); }
@media (max-width: 820px) {
  .topicPicker { width: 100%; }
  .topicPicker__btn { flex: 1; max-width: none; }
  /* Mobilde pano alttan açılan sayfa olur. */
  .topicPicker__panel {
    position: fixed;
    inset: auto 0 0 0;
    width: auto;
    max-height: 70dvh;
    border-radius: var(--r-md) var(--r-md) 0 0;
    padding-bottom: calc(var(--sp-2) + env(safe-area-inset-bottom, 0px));
  }
}

/* ---- Konu grup başlıkları (liste konu sırasıyla bölünür) ---- */
.topicGroupHead {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  grid-column: 1 / -1;
  margin: var(--sp-4) 0 var(--sp-1);
  padding: 0 0 var(--sp-1);
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-md);
  font-weight: 700;
  list-style: none;
}
.topicGroupHead small { color: var(--muted); font-family: inherit; font-size: var(--fs-xs); font-weight: 400; }
.topicGroupHead:first-child { margin-top: 0; }

/* ---- Kelime havuzu terimleri (Notlar + tam ekran okuma) ----
   glossary.js terimleri .glossTerm düğmesine sarar. Terim normal metin gibi okunur:
   doygunluğu düşük, soluk bir mavidir ve alt çizgi taşımaz (okumayı bölmez); yalnız
   üzerine gelince ince çizgi çıkar. Mavi yerel belirteçtir, koyu tema color-scheme
   üzerinden light-dark() ile seçilir. Kontrast bilinçli olarak korunur (a11y):
   "soluk" doygunlukla sağlanır, açık tonla değil. Ortak bileşendir: Notlar içinde de
   tam ekran okuma ekranında (#noteReader) da birebir aynı görünür. */
.glossTerm {
  --gloss-link: hsl(213 28% 42%);
  --gloss-link: light-dark(hsl(213 28% 42%), hsl(210 30% 72%));
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--gloss-link);
  font: inherit;
  line-height: inherit;
  text-align: inherit;
  cursor: pointer;
  min-height: 0;
  box-shadow: none;
}
.glossTerm:hover { background: none; text-decoration: underline; text-underline-offset: 2px; }
.glossTerm[aria-expanded="true"] { text-decoration: underline; text-underline-offset: 2px; }
.glossTerm:focus-visible { outline: 2px solid var(--gloss-link); outline-offset: 1px; }

/* popinfo: terim açıklama balonu (Notlar + tam ekran okuma). Ölçüler Penpot
   "Popconfirm" kartından: beyaz/yüzey zemin, köşe 8px (--r-md), iç boşluk 12px
   (--sp-3), başlık-gövde aralığı 4px (--sp-1), yumuşak gölge (--shadow-pop),
   16x6 üçgen ok. Balon normalde #notesView içine, gerçek tam ekranda okuma
   ekranına (#noteReader) eklenir; bu yüzden kural paylaşılan katmandadır. */
.popinfo {
  --gloss-link: hsl(213 28% 42%);
  --gloss-link: light-dark(hsl(213 28% 42%), hsl(210 30% 72%));
  position: fixed;
  z-index: 68; /* tam ekran okuma ekranının (65) üstünde */
  box-sizing: border-box;
  width: min(16rem, calc(100vw - 16px));
  padding: var(--sp-2) var(--sp-3);
  padding-right: var(--sp-6);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-pop);
  font-size: var(--fs-xs);
  line-height: 1.5;
}
.popinfo[hidden] { display: none; }
.popinfo__title { display: block; margin-bottom: var(--sp-1); font-size: var(--fs-sm); line-height: 1.35; }
.popinfo__text,
.popinfo__example { margin: 0; }
.popinfo__image {
  display: block;
  width: 100%;
  max-height: 180px;
  margin: var(--sp-2) 0 0;
  border-radius: var(--r-sm);
  object-fit: contain;
  background: var(--chip);
}
.popinfo__image[hidden] { display: none; }
.popinfo__example { margin-top: var(--sp-2); color: var(--muted); font-style: italic; }
.popinfo__example[hidden] { display: none; }
.popinfo .popinfo__close {
  position: absolute;
  top: var(--sp-1);
  right: var(--sp-2);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  box-shadow: none;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1;
  cursor: pointer;
}
.popinfo .popinfo__close:hover { background: var(--hover); color: var(--ink); }
.popinfo .popinfo__close:focus-visible { outline: 2px solid var(--gloss-link); outline-offset: 1px; }
/* Ok: yüzey renginde döndürülmüş kare; iki kenarı balon çerçevesiyle aynı çizgidedir. */
.popinfo__arrow {
  position: absolute;
  left: var(--popinfo-arrow-x, 24px);
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: var(--surface);
  border: 1px solid var(--line);
  transform: rotate(45deg);
}
.popinfo[data-side="below"] .popinfo__arrow { top: -6px; border-right: 0; border-bottom: 0; }
.popinfo[data-side="above"] .popinfo__arrow { bottom: -6px; border-left: 0; border-top: 0; }
@media (max-width: 820px) {
  .popinfo { width: calc(100vw - 16px); }
}

/* ---- Tam ekran okuma ---- */
html.noteReaderOpen { overflow: hidden; }
/* Okuma ekranı kenar çubuğunun/üst barın (v2 ≤61) üstünde, modalın (70) altında; kelime balonu (68) üstünde kalır. */
.noteReader {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  --reader-size: 1.05rem;
}
.noteReader.hidden { display: none; }
.noteReader__bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 56px;
  padding: var(--sp-2) var(--sp-4);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
@media (max-width: 820px) {
  .noteReader__bar { gap: var(--sp-1); padding: var(--sp-2) var(--sp-3); }
}
.noteReader__head { flex: 1; min-width: 0; display: grid; }
.noteReader__head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--serif); font-size: var(--fs-md); }
.noteReader__meta { color: var(--muted); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.noteReader__close,
.noteReader__report,
.noteReader__fs,
.noteReader__gloss,
.noteReader__typeBtn,
.noteReader__tools button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
}
/* Üzerine gelme yalnız fareli cihazda: dokunmatikte :hover dokunuştan sonra takılı kalıp
   basılı/bırakılmış farkını gizliyordu (düğme tepkisiz görünüyordu). */
@media (hover: hover) {
  .noteReader__close:hover,
  .noteReader__report:hover,
  .noteReader__fs:hover,
  .noteReader__gloss:hover,
  .noteReader__typeBtn:hover,
  .noteReader__tools button:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); }
}
/* Dokunmatikte sitenin genel `button:hover` (koyu marka) kuralı da takılı kalıyordu ve
   okuyucu düğmesinden güçlüydü: dokunulan düğme koyu yeşil kalıp açık/kapalı farkı
   kayboluyordu. Basılı/açık durumlar (aria-pressed/expanded) kendi kurallarıyla görünür. */
@media (hover: none) {
  .noteReader__bar button:hover:not([aria-pressed="true"]):not([aria-expanded="true"]) {
    border-color: var(--line);
    background: var(--surface);
    color: var(--ink);
  }
}
/* Kelime açıklamaları anahtarı: "altı çizili A"; açıkken marka zemini. */
.noteReader__gloss {
  font-size: var(--fs-md);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
/* Comic yazı tipi anahtarı: düğme metni kendisi Comic (ne yaptığını gösterir). */
/* "Aa" yazı ayarları menüsü (boyut + Comic yazı tipi). */
.noteReader__type { position: relative; }
.noteReader__typeBtn { font-size: var(--fs-md); }
.noteReader__typeMenu {
  position: absolute;
  top: calc(100% + var(--sp-2));
  right: 0;
  z-index: 3;
  display: grid;
  gap: var(--sp-2);
  min-width: 240px;
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: 0 8px 24px rgb(0 0 0 / 16%);
}
.noteReader__typeMenu[hidden] { display: none; }
.noteReader__typeRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  min-height: 44px;
  font-size: var(--fs-sm);
  color: var(--ink);
}
.noteReader__faceRow { cursor: pointer; }
.noteReader__faceRow span { font-family: var(--note-font); font-size: var(--fs-md); }
.noteReader__typeBtn[aria-expanded="true"],
.noteReader__gloss[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--ink);
}
.noteReader__tools button:disabled { opacity: 0.45; cursor: default; }
.noteReader__tools { display: flex; gap: var(--sp-1); }
.noteReader__scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: var(--sp-5) var(--sp-4); }
.noteReader__page {
  width: min(72ch, 100%);
  margin: 0 auto;
  font-size: var(--reader-size);
  line-height: 1.75;
}
.noteReader__page .noteContent { max-height: none; overflow: visible; font-size: inherit; }
.noteReader__page .noteContent.clamped { max-height: none; }
.noteReader__page img { max-width: 100%; height: auto; }

/* Belge notu (docx): sayfalar tarayıcıda çizilir; metin sütunu yerine geniş
   bir tuval kullanılır. A−/A+ sayfa yakınlaştırmasıdır. */
.noteReader__page--docx { width: min(1120px, 100%); }
.noteReader__page--docx .noteSummary,
.noteReader__page--docx .noteHighlights { max-width: 72ch; margin-left: auto; margin-right: auto; }
.docxHost { position: relative; width: 100%; min-height: 120px; overflow-x: auto; }
.docxHost .docx-wrapper { background: transparent; padding: 0; }
.docxHost .docx-wrapper > section.docx {
  margin: 0 auto 18px;
  background: #fff;
  color: #1b1f33;
  border-radius: 6px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .22);
}
.docxHost .docx-wrapper > section.docx:last-child { margin-bottom: 0; }
.docxLoading, .docxError { margin: 24px auto; max-width: 48ch; text-align: center; color: var(--muted); }
.docxError strong { display: block; margin-bottom: 6px; color: var(--ink); }
.docxWatermark {
  position: fixed;
  inset: -18%;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 64px 88px;
  transform: rotate(-24deg);
  pointer-events: none;
  overflow: hidden;
  opacity: .09;
}
.docxWatermark span {
  font: 600 13px/1 var(--v2-mono, ui-monospace, monospace);
  color: #1b1f33;
  white-space: nowrap;
}
.noteReader__bar, .noteReader__nav { position: relative; z-index: 4; }
.noteReader--docx .noteReader__faceRow { display: none; }
@media (max-width: 820px) {
  .noteReader__page--docx { width: 100%; }
  .docxWatermark { gap: 44px 56px; opacity: .08; }
  .docxWatermark span { font-size: 11px; }
}
.noteReader__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  padding-bottom: calc(var(--sp-2) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.noteReader__nav button { min-height: 44px; }
.noteReader__pos { color: var(--muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
@media (max-width: 820px) {
  .noteReader__scroll { padding: var(--sp-4) var(--sp-3); }
  .noteReader__bar { padding: var(--sp-2) var(--sp-3); }
}

/* Gerçek tam ekran (:fullscreen) ve API yoksa CSS "immersive" yedeği: üst çubuk,
   başlık, yazı boyutu, kapatma, "Bildir" ve alt gezinme gizlenir; sağ üstte
   kelime açıklamaları anahtarı (A) ve "tam ekrandan çık" düğmesi kalır. */
.noteReader::backdrop { background: var(--bg); }
.noteReader:fullscreen,
.noteReader.noteReader--immersive { background: var(--bg); }
.noteReader:fullscreen .noteReader__close,
.noteReader:fullscreen .noteReader__head,
.noteReader:fullscreen .noteReader__type,
.noteReader:fullscreen .noteReader__nav,
.noteReader:fullscreen .noteReader__report,
.noteReader.noteReader--immersive .noteReader__close,
.noteReader.noteReader--immersive .noteReader__head,
.noteReader.noteReader--immersive .noteReader__type,
.noteReader.noteReader--immersive .noteReader__nav,
.noteReader.noteReader--immersive .noteReader__report { display: none; }
.noteReader:fullscreen .noteReader__bar,
.noteReader.noteReader--immersive .noteReader__bar {
  position: fixed;
  top: max(10px, env(safe-area-inset-top, 0px));
  right: max(10px, env(safe-area-inset-right, 0px));
  left: auto;
  z-index: 2;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.noteReader:fullscreen .noteReader__fs,
.noteReader:fullscreen .noteReader__gloss,
.noteReader.noteReader--immersive .noteReader__fs,
.noteReader.noteReader--immersive .noteReader__gloss {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: 0 2px 10px rgb(0 0 0 / 18%);
}
.noteReader:fullscreen .noteReader__gloss[aria-pressed="true"],
.noteReader.noteReader--immersive .noteReader__gloss[aria-pressed="true"] {
  background: var(--brand-soft);
}
/* Tam ekranda sıra: kelime anahtarı solda, çıkış düğmesi en sağda. */
.noteReader:fullscreen .noteReader__gloss,
.noteReader.noteReader--immersive .noteReader__gloss { order: 1; }
.noteReader:fullscreen .noteReader__fs,
.noteReader.noteReader--immersive .noteReader__fs { order: 2; }
.noteReader:fullscreen .noteReader__scroll,
.noteReader.noteReader--immersive .noteReader__scroll {
  padding-top: calc(var(--sp-5) + 48px);
}
@media print { .noteReader { display: none; } }

/* ---- SİSTEM — tek bileşen katmanı (F3.1) ----
   Yeni arayüz yalnız bu sınıflar ve belirteçlerle yazılır (bkz. docs/TASARIM.md).
   Mevcut kurallara dokunmaz; eski sınıflar F3.2'de taşınıp silinir.
   Renk yalnız mevcut değişkenlerden gelir (koyu tema kendiliğinden çalışır).
   Kırılım noktaları: 600px (telefon) ve 820px (çekmece menü). */

/* Düğme. Birincil eylem marka rengi; ikincil çerçeveli; silme .ds-btn--danger. */
.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: var(--brand);
  color: white;
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.ds-btn:hover { background: var(--brand-dark); }
.ds-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.ds-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[data-theme="dark"] .ds-btn:focus-visible { outline-color: var(--brand-text); }
.ds-btn--secondary { background: transparent; color: var(--ink); border-color: var(--field-border); }
.ds-btn--secondary:hover { background: var(--hover); border-color: var(--muted); }
.ds-btn--danger { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.ds-btn--danger:hover { background: var(--bad); color: var(--bad-bg); }
.ds-btn--text { background: transparent; color: var(--brand-text); border-color: transparent; padding-left: var(--sp-1); padding-right: var(--sp-1); }
.ds-btn--text:hover { background: transparent; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.ds-btn--icon { width: 2.25rem; height: 2.25rem; padding: 0; background: transparent; color: var(--ink); border-color: transparent; }
.ds-btn--icon:hover { background: var(--hover); color: var(--ink); }
.ds-btn--sm { padding: var(--sp-1) var(--sp-3); font-size: var(--fs-xs); }

/* Kart: kâğıt zemini üzerinde 1px çizgili yüzey; gölge yok. */
.ds-card {
  min-width: 0;
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
}

/* Form alanı: etiket + girdi + ipucu + hata. Girdi global kurallardan gelir. */
.ds-field { display: grid; gap: var(--sp-1); min-width: 0; }
.ds-field__label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.ds-field input, .ds-field textarea, .ds-field select { width: 100%; }
.ds-field__hint { font-size: var(--fs-xs); color: var(--muted); }
.ds-field__error { font-size: var(--fs-xs); color: var(--bad); }
.ds-field--invalid input, .ds-field--invalid textarea, .ds-field--invalid select { border-color: var(--bad); }

/* Sekmeler: alt çizgi; etkin sekme koyu metin + marka çizgisi. */
.ds-tabs {
  display: flex;
  gap: var(--sp-4);
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 1px solid var(--line);
  /* Sekme şeridi yatay kayar; kaydırma çubuğu görünmez ve sayfa yana taşmaz. */
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.ds-tabs::-webkit-scrollbar { display: none; }
.ds-tab {
  flex: 0 0 auto;
  scroll-snap-align: start;
  margin-bottom: -1px;
  padding: var(--sp-2) var(--sp-1);
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: var(--fs-sm);
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.ds-tab:hover { background: transparent; color: var(--ink); }
.ds-tab[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--brand); }
/* YZ / İnsan anahtarı: tek hap, seçili tarafın altında kayan tutamaç (segmentli anahtar). */
.noteSource { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; width: min(100%, 300px); margin-bottom: var(--sp-2); padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--chip); cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.noteSource__thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--brand); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.2s ease; }
.noteSource[aria-checked="true"] .noteSource__thumb { transform: translateX(100%); }
.noteSource__opt { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 var(--sp-3); border-radius: 999px; color: var(--muted); font-size: var(--fs-sm); font-weight: 500; text-align: center; transition: color 0.2s; }
.noteSource__opt.isActive { color: var(--on-brand); font-weight: 600; }
.noteSource:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .noteSource__thumb, .noteSource__opt { transition: none; } }
.badge.noteTag { background: var(--chip); color: var(--brand-text-strong); }
.ds-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[data-theme="dark"] .ds-tab:focus-visible { outline-color: var(--brand-text); }

/* Boş durum: ince üst çizgi; ikon (isteğe bağlı) + başlık + açıklama + eylem. */
.ds-empty {
  display: grid;
  justify-items: start;
  gap: var(--sp-2);
  padding: var(--sp-5) 0;
  border-top: 1px solid var(--line);
  text-align: left;
  color: var(--muted);
}
.ds-empty__icon { width: 1.75rem; height: 1.75rem; color: var(--ink); opacity: 0.5; }
.ds-empty__title { margin: 0; font-size: var(--fs-md); font-weight: 600; color: var(--ink); }
.ds-empty__text { margin: 0; font-size: var(--fs-sm); }
.ds-empty__action { margin-top: var(--sp-2); }

/* Yükleniyor: nabız atan çubuklar. Satır (varsayılan), kısa satır, blok. */
.ds-skeleton {
  display: block;
  width: 100%;
  height: 0.9rem;
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--panel) 0%, var(--surface) 50%, var(--panel) 100%);
  background-size: 200% 100%;
  animation: ds-pulse 1.2s ease-in-out infinite;
}
.ds-skeleton--short { width: 60%; }
.ds-skeleton--block { height: 4.5rem; border-radius: var(--r-md); }
@keyframes ds-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ds-skeleton { animation: none; }
  .ds-btn, .ds-tab { transition: none; }
}

/* Yükleniyor yazısı: "Yükleniyor" + sonunda sırayla yanan üç nokta. Blok ve satır içi. */
.ds-loading {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) 0;
  font-size: var(--fs-sm);
  color: var(--ink);
}
.ds-loading--inline { display: inline-flex; padding: 0; gap: 0; }
.ds-loading__dots { display: inline-flex; letter-spacing: 0.08em; }
.ds-loading__dots i {
  font-style: normal;
  opacity: 0.2;
  animation: ds-loading-dot 1.2s ease-in-out infinite;
}
.ds-loading__dots i:nth-child(2) { animation-delay: 0.2s; }
.ds-loading__dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes ds-loading-dot {
  0%, 80%, 100% { opacity: 0.2; }
  40% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .ds-loading__dots i { animation: none; opacity: 0.7; }
}

/* Açılış ekranı: uygulama kabuğu (/api/me + ilk görünüm) hazır olana kadar tam sayfa yazı. */
.appBoot {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--ink);
  font-size: var(--fs-md);
}
.appBoot[hidden] { display: none; }
.appBoot .ds-loading { padding: 0; }

/* Hata durumu: mesaj + isteğe bağlı "Yeniden dene" düğmesi. */
.ds-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-6) var(--sp-4);
  text-align: center;
  color: var(--muted);
}
.ds-error__text { max-width: 36ch; margin: 0; color: var(--bad); }

/* Rozet: küçük etiket. Durum varyantları mevcut ok/warn/bad çiftlerini kullanır. */
.ds-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 0.15rem var(--sp-2);
  border-radius: var(--r-full);
  background: var(--chip);
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ds-badge--ok { background: var(--ok-bg); color: var(--ok); }
.ds-badge--warn { background: var(--warn-bg); color: var(--warn); }
.ds-badge--bad { background: var(--bad-bg); color: var(--bad); }

/* Boşluk yardımcıları: dikey yığın ve yatay satır. */
.ds-stack { display: grid; gap: var(--sp-3); min-width: 0; }
.ds-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); min-width: 0; }
.ds-row--between { justify-content: space-between; }

/* Dokunma hedefi: telefonda düğme ve sekmeler en az 44px. */
@media (max-width: 600px) {
  .ds-btn, .ds-tab { min-height: 44px; }
  .ds-btn--icon { width: 44px; height: 44px; }
  .ds-card { padding: var(--sp-4); }
}

/* İlerlemem — çubuklu doğruluk görünümü (Penpot v2 taslağı). Yalnız belirteçler. */
.pgGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); margin-top: var(--sp-5); }
.pgCard h3 { margin: 0 0 var(--sp-3); }
.pgLegend { display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-4); font-size: var(--fs-xs); }
.pgDot { display: inline-block; width: 10px; height: 10px; border-radius: var(--r-full); margin-left: var(--sp-2); }
.pgLegend .pgDot:first-child { margin-left: 0; }
.pgDot--ok { background: var(--ok); }
.pgDot--bad { background: var(--bad); }
.pgDot--blank { background: var(--chip); border: 1px solid var(--line); }
.pgRows { display: grid; gap: var(--sp-4); }
.pgRowHead { display: flex; align-items: baseline; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.pgRowName { font-size: var(--fs-sm); font-weight: 600; }
.pgRowSub { flex: 1; font-size: var(--fs-xs); color: var(--muted); }
.pgRowPct { font-size: var(--fs-sm); }
.pgRowPct--ok { color: var(--ok); }
.pgRowPct--warn { color: var(--warn); }
.pgRowPct--bad { color: var(--bad); }
.pgMeter { display: flex; height: 10px; overflow: hidden; border-radius: var(--r-full); background: var(--chip); }
.pgMeter__ok { background: var(--ok); }
.pgMeter__bad { background: var(--bad); }
.pgMeter__blank { background: var(--line); }
.pgNext { display: flex; flex-direction: column; justify-content: space-between; gap: var(--sp-4); background: var(--brand); border-color: var(--brand); color: var(--surface); }
.pgEyebrow { font-size: var(--fs-xs); letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.75; }
.pgNextText { margin: 0; font-family: var(--serif); font-size: var(--fs-xl); line-height: 1.35; }
.pgNextBtn { align-self: stretch; background: var(--bg); color: var(--brand-text); border-color: var(--bg); }
.pgNextBtn:hover { background: var(--surface); color: var(--brand-text); }
@media (max-width: 820px) { .pgGrid { grid-template-columns: minmax(0, 1fr); } }

/* Bugün — açılış sayfası (Penpot v2 taslağı). Yalnız belirteçler. */
.tdTop { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: var(--sp-4); margin-top: var(--sp-5); }
.tdPlan { background: var(--brand); border-color: var(--brand); color: var(--surface); display: grid; gap: var(--sp-3); align-content: start; }
.tdPlanHead { display: flex; justify-content: space-between; align-items: baseline; }
.tdEyebrow { font-size: var(--fs-xs); letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.8; }
.tdEyebrow--ink { color: var(--muted); opacity: 1; }
.tdPlanCount { font-size: var(--fs-sm); opacity: 0.85; }
.tdTrack { height: 8px; overflow: hidden; border-radius: var(--r-full); background: var(--chip); }
.tdTrack > span { display: block; height: 100%; border-radius: var(--r-full); background: var(--brand); }
.tdTrack--light { background: rgba(255, 253, 247, 0.2); }
.tdTrack--light > span { background: var(--bg); }
.tdTasks { display: grid; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.tdTask { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3); border-radius: var(--r-md); background: rgba(255, 253, 247, 0.1); }
.tdCheck { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border: 2px solid rgba(255, 253, 247, 0.6); border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 700; }
.tdTask--done .tdCheck { background: var(--bg); border-color: var(--bg); color: var(--brand-text); }
.tdTaskText { display: grid; flex: 1; min-width: 0; }
.tdTaskText strong { font-size: var(--fs-sm); }
.tdTaskText small { font-size: var(--fs-xs); opacity: 0.8; }
.tdPlanEmpty { margin: 0; font-size: var(--fs-sm); opacity: 0.85; }
.tdStart { background: var(--bg); color: var(--brand-text); border-color: var(--bg); }
.tdStart:hover { background: var(--surface); color: var(--brand-text); }
.tdGoal { display: grid; gap: var(--sp-3); align-content: start; }
.tdBig { display: flex; align-items: baseline; gap: var(--sp-2); }
.tdBig strong { font-family: var(--serif); font-size: var(--fs-2xl); line-height: 1; }
.tdBig span { color: var(--muted); font-size: var(--fs-sm); }
.tdStreak { display: grid; gap: var(--sp-2); }
.tdStreak strong { display: block; font-family: var(--serif); font-size: var(--fs-lg); }
.tdWeek { display: flex; gap: var(--sp-2); }
.tdDay { display: grid; justify-items: center; gap: 2px; font-size: var(--fs-xs); color: var(--muted); }
.tdDot { width: 18px; height: 18px; border-radius: var(--r-full); background: var(--chip); }
.tdDot--on { background: var(--brand); }
.tdStats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); margin-top: var(--sp-4); }
.tdStat { display: grid; gap: var(--sp-1); }
.tdStat strong { font-family: var(--serif); font-size: var(--fs-xl); line-height: 1.1; }
.tdStat small { color: var(--muted); font-size: var(--fs-xs); }
.tdBottom { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); margin-top: var(--sp-4); }
.tdPanelHead { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-4); }
.tdPanelHead h3 { margin: 0; }
.tdList { display: grid; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.tdList li { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); padding: var(--sp-3); border-radius: var(--r-md); background: var(--bg); font-size: var(--fs-sm); }
@media (max-width: 820px) {
  .tdTop, .tdBottom { grid-template-columns: minmax(0, 1fr); }
  .tdStats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Bugün — telefon düzeni: daha sıkı kartlar, tam genişlikte seri noktaları. */
@media (max-width: 600px) {
  .tdTop, .tdStats, .tdBottom { gap: var(--sp-3); }
  .tdTop { margin-top: var(--sp-4); }
  .tdPlan.ds-card, .tdGoal.ds-card { padding: var(--sp-4); }
  .tdTask { padding: var(--sp-2) var(--sp-3); }
  .tdStart { min-width: 72px; }
  .tdWeek { justify-content: space-between; }
  .tdDot { width: 22px; height: 22px; }
  .tdStat.ds-card { padding: var(--sp-3); }
  .tdStat strong { font-size: var(--fs-lg); }
  .tdPanelHead { margin-bottom: var(--sp-3); }
}

/* ============================================================
   V2 — Penpot taslağı (Giriş v3, yönetici paneli, kart dili)
   Yalnız belirteçler; aynı özgüllükte son yazan kazanır (dosya sonu).
   ============================================================ */

/* ---- Giriş: defter sayfası ---- */
.loginPage .loginShell,
.loginPage .loginShell:not(:has(#loginAside:not(.hidden))) {
  grid-template-columns: minmax(0, 520px);
  justify-content: center;
  align-content: center;
  min-height: 100vh;
  max-width: 100%;
  padding: var(--sp-6) var(--sp-4) calc(var(--sp-6) + env(safe-area-inset-bottom));
}
.loginPage .loginAside { display: none; }
.loginPage .loginCard {
  position: relative;
  width: 100%;
  padding: var(--sp-6) var(--sp-6) var(--sp-5) 4.25rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background-color: var(--surface);
  background-image:
    linear-gradient(var(--surface), var(--surface)),
    linear-gradient(to bottom, transparent 31px, var(--line) 31px);
  background-size: 100% 11.5rem, 100% 32px;
  background-position: top left, 0 0;
  background-repeat: no-repeat, repeat-y;
}
:root:not([data-theme="dark"]) .loginPage .loginCard { box-shadow: 0 14px 36px rgba(30, 28, 25, 0.1); }
/* kenar çizgisi */
.loginPage .loginCard::before {
  content: "";
  position: absolute;
  inset: 1px auto 1px 3rem;
  width: 2px;
  background: color-mix(in srgb, var(--bad) 32%, var(--surface));
  pointer-events: none;
}
/* defter delikleri */
.loginPage .loginCard::after {
  content: "";
  position: absolute;
  inset: 2.4rem auto 1rem 0.95rem;
  width: 14px;
  background: radial-gradient(circle at 7px 7px, var(--bg) 0 6px, var(--line) 6px 7px, transparent 7.5px) 0 0 / 14px 100px repeat-y;
  pointer-events: none;
}
.loginPage .loginBrand { margin-bottom: var(--sp-5); padding-bottom: 0; border-bottom: 0; }
.loginPage .loginBrand h1 { font-size: var(--fs-2xl); line-height: 1.15; }
.loginPage .loginCard form { max-width: none; gap: var(--sp-4); }
.loginPage .loginCard form label { font-size: var(--fs-xs); }
.loginPage .loginCard form input:not([type="checkbox"]) {
  height: 3.25rem;
  padding: 0 var(--sp-4);
  border-radius: 10px;
  border: 1px solid var(--field-border);
  background: var(--surface);
  font-size: var(--fs-md);
}
.loginPage .loginCard form input:not([type="checkbox"]):focus { border: 2px solid var(--brand); outline: none; padding: 0 calc(var(--sp-4) - 1px); }
.loginPage .loginCard form button[type="submit"] { height: 3.375rem; border-radius: 10px; font-size: var(--fs-md); font-weight: 600; }
.loginPage .loginSignup { display: grid; gap: var(--sp-2); max-width: none; margin-top: var(--sp-4); text-align: center; font-size: var(--fs-xs); }
.loginPage .loginSignup .linkButton {
  display: block; width: 100%; padding: 0.85rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font-size: var(--fs-sm); font-weight: 600; text-align: center; text-decoration: none;
}
.loginPage .loginSignup .linkButton:hover { background: var(--hover); }
.loginPage .loginDemo, .loginPage .loginTerms, .loginPage .loginFooter { max-width: none; }
@media (max-width: 600px) {
  .loginPage .loginCard { padding: var(--sp-5) var(--sp-4) var(--sp-4) 3.4rem; }
  .loginPage .loginCard::before { left: 2.3rem; }
  .loginPage .loginCard::after { left: 0.55rem; }
}

/* ---- Uygulama: yumuşatılmış bileşenler ---- */
input, textarea, select, button { border-radius: 10px; }
.navItem { border-radius: 8px; }
.navItem.active { box-shadow: inset 3px 0 0 var(--brand); }
.statCard { padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
@media (min-width: 601px) { .statCard + .statCard { border-left: 1px solid var(--line); padding-left: var(--sp-4); } }
.statGrid { gap: var(--sp-3); }
.tableWrap { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.tableWrap table { margin: 0; }
th { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
tbody tr:hover td { background: var(--row-hover, var(--hover)); }
.badge, .ds-badge { border-radius: var(--r-full); }

/* ---- V2 kabuk (masaüstü): tam boy yan panel + sağa dayalı üst çubuk ---- */
@media (min-width: 821px) {
  .topbar {
    margin-left: 264px;
    height: var(--masthead-h);
    padding: 0 var(--sp-6);
    border-bottom: 0;
    justify-content: flex-end;
    gap: var(--sp-4);
  }
  .topbar::after { display: none; }
  .brandHome { display: none; }
  .mastheadIssue { margin-right: 0; }
  .layout {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    gap: 0;
    max-width: none;
    margin: calc(-1 * var(--masthead-h)) 0 0;
    padding: 0;
    align-items: start;
  }
  .sidebar {
    position: sticky;
    top: 0;
    width: auto;
    height: 100vh;
    max-height: none;
    overflow-y: auto;
    padding: var(--sp-5) var(--sp-3) var(--sp-5);
    border: 0;
    border-right: 1px solid var(--line);
    background: var(--surface);
  }
  .content { padding: calc(var(--masthead-h) + 8px) var(--sp-6) calc(var(--sp-7) + var(--sp-4)); min-width: 0; max-width: 1160px; width: 100%; }
  .topbar .userBadge { padding: 0.4rem 0.9rem; border-radius: var(--r-full); background: var(--chip); font-weight: 600; text-decoration: none; }
}

/* marka: logo kutusu + ad + (yönetici) rozet */
.sidebarBrand {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  column-gap: var(--sp-3);
  align-items: center;
  padding: 0 var(--sp-2) var(--sp-4);
  margin: 0 0 var(--sp-2);
  border-bottom: 0;
}
.sidebarBrand::before {
  content: "";
  grid-row: 1 / span 2;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--brand) var(--brand-logo, url(../icons/icon.svg)) center / 70% no-repeat;
}
/* Yüklenen özel logo: marka rengi zemini olmadan, kutuya sığacak şekilde. */
html.hasBrandLogo .sidebarBrand::before { background-color: transparent; background-size: contain; }
.sidebarBrand h1 { font-family: var(--serif); font-size: var(--fs-md); font-weight: 700; letter-spacing: -0.01em; }
.sidebarBrand p { margin: 2px 0 0; font-size: var(--fs-xs); letter-spacing: 0; text-transform: none; }
.sidebar:has(#adminNav:not(.hidden)) .sidebarBrand p { position: relative; height: 22px; overflow: hidden; white-space: nowrap; color: transparent; }
.sidebar:has(#adminNav:not(.hidden)) .sidebarBrand p::after {
  content: "YÖNETİM";
  position: absolute;
  inset: 0 auto auto 0;
  padding: 2px 10px;
  border-radius: var(--r-full);
  background: var(--brand-soft);
  color: var(--brand-text);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* menü: hap biçimli öğeler, numarasız grup başlıkları */
.navSearch { background: var(--surface); border-bottom: 0; padding: 0 0 var(--sp-2); margin: 0 0 var(--sp-2); }
.navSearch input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  font-size: var(--fs-sm);
}
.navSearch input:focus { border-color: var(--brand); }
.navGroupLabel, .navGroupToggle {
  margin: var(--sp-4) 0 var(--sp-1);
  padding: 0 var(--sp-2);
  border-bottom: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
}
.navGroupToggle > span::before { content: none; }
.navItem { padding: 0.4rem 0.75rem; border-radius: 8px; font-size: var(--fs-sm); }
.navItem::before { display: none; }
.navItem:hover { background: var(--hover); color: var(--ink); }
.navItem.active { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }


/* sayfa başlığı: çift çizgi yok, sade serif */
.view > h2:first-child { border-bottom: 0; padding-bottom: 0; margin-bottom: var(--sp-5); font-size: var(--fs-2xl); letter-spacing: -0.02em; }
.view > h2:first-child::after { display: none; }

/* ---- V2 Yönetim Merkezi ---- */
#adminDashboardView .settingsBody { display: block; }
#adminDashboardView .settingsTabRail {
  position: static;
  display: flex;
  gap: var(--sp-5);
  width: auto;
  margin: 0 0 var(--sp-5);
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  overflow-x: auto;
}
#adminDashboardView .settingsTab {
  width: auto;
  padding: var(--sp-2) 0 var(--sp-3);
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  white-space: nowrap;
}
#adminDashboardView .settingsTab[aria-pressed="true"] { color: var(--brand-text); border-bottom-color: var(--brand); font-weight: 600; background: transparent; box-shadow: none; }
#adminDashboardView .statGrid { margin-bottom: var(--sp-4); border: 0; padding: 0; }
#adminDashboardView .statGrid::before, #adminDashboardView .statGrid::after { display: none; }
.dvGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); margin: var(--sp-4) 0 var(--sp-6); }
.dvCard h3 { margin: 0; }
.dvSub { margin: var(--sp-1) 0 var(--sp-4); font-size: var(--fs-xs); }
.dvChart { display: flex; align-items: flex-end; gap: var(--sp-3); height: 160px; padding-top: var(--sp-4); }
.dvBar { position: relative; display: flex; flex: 1; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.dvBarFill { width: 16px; border-radius: var(--r-full); background: var(--brand-soft); border: 1px solid var(--line); }
.dvBarFill--top { background: var(--brand); border-color: var(--brand); }
.dvBarValue { margin-bottom: var(--sp-1); font-size: var(--fs-xs); color: var(--muted); }
.dvBarLabel { margin-top: var(--sp-2); max-width: 100%; overflow: hidden; font-size: var(--fs-xs); color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.dvQueue, .dvLogs { display: grid; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.dvQueueItem { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--bg); }
.dvQueueText { display: grid; flex: 1; min-width: 0; }
.dvQueueText strong { overflow: hidden; font-size: var(--fs-sm); text-overflow: ellipsis; white-space: nowrap; }
.dvQueueText small { color: var(--muted); font-size: var(--fs-xs); }
.dvMeter { display: grid; gap: var(--sp-2); padding: var(--sp-2) 0; }
.dvMeterHead { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); font-size: var(--fs-sm); }
.dvLog { display: grid; grid-template-columns: 3rem 5rem minmax(0, 1fr); gap: var(--sp-3); align-items: baseline; font-size: var(--fs-sm); }
.dvLogTime { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: var(--fs-xs); color: var(--muted); }
.dvLogScope { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dvLogText { color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 820px) { .dvGrid { grid-template-columns: minmax(0, 1fr); } }

/* ---- V2 Kullanıcılar ---- */
#adminUsersView .inlineForm { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; margin-bottom: var(--sp-4); }
#adminUsersView .inlineForm input, #adminUsersView .inlineForm select { flex: 1 1 11rem; }
.userToolbar { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; margin-bottom: var(--sp-4); }
.userToolbar input[type="search"] { flex: 1 1 16rem; max-width: 22rem; }
.userChips { display: flex; gap: var(--sp-2); }
.userChip { border-radius: var(--r-full); }
.userChip[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-text); font-weight: 600; }
#userList { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
#userList > li {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  min-height: 3.5rem;
  padding: var(--sp-3) var(--sp-4) var(--sp-3) calc(var(--sp-4) + 2.75rem);
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  box-shadow: none;
}
#userList > li:last-child { border-bottom: 0; }
#userList > li:hover { background: var(--row-hover, var(--hover)); }
#userList > li::before {
  content: attr(data-initial);
  position: absolute;
  left: var(--sp-4);
  top: 50%;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  transform: translateY(-50%);
  border-radius: var(--r-full);
  background: var(--chip);
  color: var(--brand-text);
  font-weight: 700;
  font-size: var(--fs-sm);
}
#userList > li > span:first-child { font-size: var(--fs-md); font-weight: 600; }
#userList > li > span:first-child em { font-size: var(--fs-xs); font-weight: 400; font-style: normal; }
#userList .actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
#userList .actions button, #userList .actions .csvLink { padding: var(--sp-1) var(--sp-3); font-size: var(--fs-xs); }
#userList .actions .userDelete { border-color: var(--bad); color: var(--bad); }
#userList .actions .userDelete:hover { background: var(--bad-bg); }

/* ---- V2 liste kartları (soru/onay listeleri) — Platform Ayarları V3'te ---- */

#pendingList > li, #questionList > li { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: var(--sp-4) var(--sp-5); }
#questionList > li ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2) var(--sp-4); margin: var(--sp-3) 0; padding-left: var(--sp-5); }
#questionList .actions, #pendingList .actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
#questionList .questionDelete { border-color: var(--bad); color: var(--bad); }
#questionList .questionDelete:hover { background: var(--bad-bg); }
@media (max-width: 600px) { #questionList > li ol { grid-template-columns: minmax(0, 1fr); } }

/* ---- V2 Soru Yönetimi: satır listesi + toplu işlem çubuğu ---- */
#adminQuestionsView .filters { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; margin-bottom: var(--sp-3); }
#adminQuestionsView .filters input[type="search"] { flex: 1 1 14rem; }
#adminQuestionsView .filters select { flex: 0 1 9rem; }
#questionList { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
#questionList > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--sp-4);
  row-gap: var(--sp-1);
  align-items: center;
  padding: var(--sp-3) var(--sp-4);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}
#questionList > li:last-child { border-bottom: 0; }
#questionList > li:hover { background: var(--row-hover, var(--hover)); }
#questionList > li > strong { grid-column: 1; order: 1; font-size: var(--fs-md); font-weight: 600; }
#questionList > li > .quizMeta { grid-column: 1; order: 2; display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
#questionList > li > .actions { grid-column: 2; grid-row: 1 / span 2; order: 3; align-self: center; }
#questionList > li > ol, #questionList > li > p, #questionList > li > .questionImages, #questionList > li > img { grid-column: 1 / -1; order: 4; }
#questionList > li:not(.qOpen) > ol, #questionList > li:not(.qOpen) > p { display: none; }
#questionList > li.qOpen { background: var(--brand-soft); cursor: default; }
#questionList > li.listEmpty { cursor: default; }
#bulkQuestionBar {
  position: sticky;
  bottom: var(--sp-4);
  z-index: 5;
  margin: var(--sp-3) 0;
  padding: var(--sp-3) var(--sp-4);
  border: 0;
  border-radius: var(--r-md);
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow-pop);
}
#bulkQuestionBar .muted { color: var(--bg); opacity: 0.8; }
#bulkQuestionBar select { background: var(--surface); color: var(--ink); }
#bulkQuestionBar .secondary { background: var(--surface); color: var(--bad); }
@media (max-width: 600px) { #questionList > li { grid-template-columns: minmax(0, 1fr); } #questionList > li > .actions { grid-column: 1; grid-row: auto; order: 3; } }

/* ---- V2 Onay Bekleyenler: sol kuyruk + sağ inceleme ---- */
.pendingLayout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); align-items: start; margin-bottom: var(--sp-5); }
.pendingLayout:has(.pendingQueue:not(.hidden)) { grid-template-columns: 22rem minmax(0, 1fr); }
.pendingQueue { position: sticky; top: 4.75rem; display: grid; gap: var(--sp-2); padding: var(--sp-3); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.pendingQueueItem { display: grid; gap: var(--sp-1); justify-items: start; padding: var(--sp-3); border: 1px solid transparent; border-radius: 12px; background: var(--bg); color: var(--ink); text-align: left; font-weight: 400; }
.pendingQueueItem:hover { background: var(--hover); }
.pendingQueueItem.is-selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.pendingQueueItem strong { font-size: var(--fs-sm); }
.pendingQueueItem small { color: var(--muted); font-size: var(--fs-xs); }
#pendingList.pendingHasQueue > li:not(.pendingSelected) { display: none; }
#pendingList.pendingHasQueue > li.pendingSelected { margin: 0; padding: var(--sp-5); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
#pendingList.pendingHasQueue > li .actions { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
@media (max-width: 820px) { .pendingLayout:has(.pendingQueue:not(.hidden)) { grid-template-columns: minmax(0, 1fr); } .pendingQueue { position: static; } }
#questionList > li::before { display: none; }
#questionList .qMenuWrap { margin-left: var(--sp-2); }
#adminQuestionsView .filters select { flex: 0 1 7.5rem; min-width: 0; }
#adminQuestionsView .filters input[type="search"], #userSearch { padding: 0.55rem 0.8rem; border: 1px solid var(--field-border); border-radius: 10px; background: var(--surface); }

/* ==========================================================================
   Giriş alanları — Penpot "Input" bileşeni (2026-11-12).
   Ölçü: 32 px yükseklik, 6 px köşe, 1 px çerçeve, 11 px yatay iç boşluk,
   14 px yazı. Durumlar: default / hover / focus / disabled; hata rengi
   mevcut .fieldInvalid / .ds-field--invalid kurallarından gelir.
   Onay kutusu, radyo, dosya, aralık ve renk alanları bu katmanın dışında.
   Renkler yalnız belirteçlerden (tema/marka rengi kendiliğinden uyar).
   ========================================================================== */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
select:not([multiple]),
textarea:not([type]) {
  height: 32px;
  min-height: 32px;
  padding: 4px 11px;
  border: 1px solid var(--field-border);
  border-radius: 6px;
  background-color: var(--surface);
  color: var(--ink);
  font-size: var(--fs-sm);
  line-height: 1.4;
}
textarea:not([type]) {
  height: auto;
  min-height: 5rem;
  padding: 8px 11px;
}
/* Ok simgesi metnin üstüne binmesin: select'in sağ iç boşluğu korunur. */
select:not([multiple]) { padding-right: 1.9rem; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]):hover:not(:disabled),
select:not([multiple]):hover:not(:disabled),
textarea:not([type]):hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]):focus,
select:not([multiple]):focus,
textarea:not([type]):focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 30%, transparent);
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]):disabled,
select:not([multiple]):disabled,
textarea:not([type]):disabled {
  border-color: var(--line);
  background-color: var(--panel);
  color: var(--muted);
  cursor: not-allowed;
}

/* Kullanıcı paneli: ana sınıf anahtarı + çıkış düğmesi (2026-11-13).
   Anahtar .modeSwitch/.segmented görünümünü kullanır; yalnız 5 sütun ve
   çıkış düğmesinin tam genişliği burada tanımlanır. */
.gradeSwitch .segmented { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.gradeSwitch .segmented button { padding: var(--sp-1) 0; }
.userPanelLogout { width: 100%; margin-top: var(--sp-3); }

/* Bağlantı görünümlü düğme: dosya adresi paylaşılabilir bir href DEĞİLDİR. */
button.filePathLink { background: none; border: 0; padding: 0; color: var(--brand-text); text-decoration: underline; cursor: pointer; font: inherit; }

/* ---- İlk kullanım ipucu: "Bildir" düğmesi (js/report.js) ----
   Kartın en altındaki düğme fark edilmiyordu: nabız + kısa açıklama balonu. */
.reportTip {
  display: grid;
  gap: 0.25rem;
  margin: 0.6rem 0 0.4rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--brand);
  border-left-width: 4px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand) 9%, var(--panel, transparent));
  color: var(--ink);
  font-size: var(--fs-sm);
  line-height: 1.45;
  animation: reportTipIn 0.45s cubic-bezier(.2, .8, .2, 1) both;
}
.reportTip strong { font-size: var(--fs-sm); }
.reportTip__ok {
  justify-self: end;
  margin-top: 0.2rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--brand);
  color: var(--on-brand);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.quizReport--pulse {
  position: relative;
  border-color: var(--brand);
  animation: reportPulse 1.6s ease-out infinite;
}
@keyframes reportTipIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes reportPulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 55%, transparent); }
  70% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--brand) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 0%, transparent); }
}

/* Bana Atananlar: şimdiki / gelecek hafta / daha sonra bölümleri */
.assignGroupTitle { margin: var(--sp-4) 0 var(--sp-2); font-size: var(--fs-md, 1rem); }
.assignLater { margin-top: var(--sp-4); }
.assignLater > summary { cursor: pointer; font-weight: 600; padding: var(--sp-2) 0; }

/* Görev ödülü: damla sayacı + çubuk animasyonu */
.rewardOverlay { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: var(--sp-4); background: color-mix(in srgb, var(--ink) 55%, transparent); animation: rewardFade 0.25s ease-out; }
.rewardCard { max-height: 92vh; overflow: auto; width: min(420px, 100%); text-align: center; padding: var(--sp-5, 24px); border-radius: 16px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); animation: rewardPop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes rewardFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rewardPop { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html:not([data-motion="full"]) .rewardOverlay, html:not([data-motion="full"]) .rewardCard, html:not([data-motion="full"]) .rewardCard { animation: none; transition: none; } }

/* Profil → Animasyonlar kapalı */
html[data-anim="off"] *, html[data-anim="off"] *::before, html[data-anim="off"] *::after { animation: none; transition: none; scroll-behavior: auto; }
#assignmentList .assignHistorySum { grid-column: 1 / -1; margin: 0; }

/* Giriş · arayüz teması seçici: "Temel tema" / "Tema v2". Seçim dersMecrasiUiTema'da
   tutulur; ana uygulama açılışta aynı değeri okur. Varsayılan Tema v2. */
.loginCard .temaSecim { display: grid; gap: 0.35rem; margin: 0.2rem 0 0; }
.loginCard .temaSecim__label {
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.loginCard .temaSecim__seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem;
  padding: 0.25rem; border: 1px solid var(--line); border-radius: var(--r-full);
  background: var(--panel);
}
.loginCard .temaSecim__opt {
  margin: 0; min-height: var(--tap); padding: 0.4rem 0.7rem;
  border: 0; border-radius: var(--r-full); background: transparent;
  color: var(--ink); font-size: var(--fs-sm); font-weight: 500; cursor: pointer;
}
.loginCard .temaSecim__opt[aria-pressed="true"] {
  background: var(--ink); color: var(--surface); font-weight: 600;
}
.loginCard .temaSecim__opt:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Giriş · "V2 UI" düğmesi: renkler tema tokenlarıyla (marka yeşili, --ok,
   --warn, --brand-dark) yer değiştirir; kenar maskeyle yumuşar, dışarıya bulanık
   bir hale taşar. Hareket yalnız data-motion="full". */
.loginCard .v2SwitchRow { position: relative; display: flex; align-items: center; gap: 0.6rem; margin: 0.2rem 0 0; flex-wrap: wrap; }
.loginCard .v2UiCheck { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; margin: 0; }
/* V2 UI ışıma: renk döngüsü, yumuşak kayan gradyan. Keyframe içinde var() Firefox'ta
   renkleri ara değer almadan sıçratıyordu; bu yüzden renkler sabit bir şeritte (tema
   tokenları) durur, animasyon yalnız background-position'ı kaydırır (sayısal, her tarayıcıda
   pürüzsüz). Şerit 3 genişlik ve tekrar eder; 0→150% kayması tam bir döngüdür (dikişsiz). */
.v2UiButton {
  position: relative; isolation: isolate; border: 0; cursor: pointer;
  --v2Grad: linear-gradient(90deg, var(--brand), var(--ok), var(--warn), var(--brand-dark), var(--brand));
  min-height: var(--tap); padding: 0 1.1rem; border-radius: 999px; color: var(--on-brand); font-weight: 600; letter-spacing: 0.02em;
}
.v2UiButton::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background-image: var(--v2Grad); background-size: 300% 100%;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, black 68%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, black 68%, transparent 100%);
}
.v2UiButton::after {
  content: ""; position: absolute; inset: -10px; z-index: -2; border-radius: 999px; opacity: 0.5;
  background-image: var(--v2Grad); background-size: 300% 100%;
  filter: blur(12px);
}
html[data-motion="full"] .v2UiButton::before,
html[data-motion="full"] .v2UiButton::after { animation: v2UiFlow 9s linear infinite; }
@keyframes v2UiFlow {
  from { background-position: 0 0; }
  to { background-position: 150% 0; }
}
.v2UiButton:not(.isOn) { filter: grayscale(0.45); opacity: 0.85; }
.v2UiButton.isOn { box-shadow: 0 0 22px 2px color-mix(in srgb, var(--brand) 34%, transparent); }
.v2UiButton:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
/* V2 UI açıklama balonu: düğmenin altında, kısa süre görünen küçük pencere. */
.loginCard .v2UiHint {
  position: absolute; bottom: calc(100% + 0.5rem); top: auto; left: 0; z-index: 5;
  max-width: 17rem; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); font-size: var(--fs-sm); line-height: 1.4;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--ink) 16%, transparent);
  display: flex; align-items: flex-start; gap: 0.5rem;
}
.loginCard .v2UiHint.hidden { display: none; }
.loginCard .v2UiHint__text { flex: 1; min-width: 0; }
.loginCard .v2UiHint__close {
  flex: none; width: 1.5rem; height: 1.5rem; margin: -0.25rem -0.25rem 0 0; padding: 0;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink);
  font-size: var(--fs-lg); line-height: 1; cursor: pointer;
}
.loginCard .v2UiHint__close:hover { background: var(--panel); }
.loginCard .v2UiHint__close:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Giriş · "Giriş Yap" düğmesi: V2 UI ile aynı renk döngüsü, düğmenin dışında
   yumuşak bir ışıma (gölgeler yalnız dışa düşer, iç yüzey boyanmaz). Renkler tema
   tokenlarından gelir; hareket yalnız data-motion="full". */
.loginCard #loginSubmit {
  --v2Grad: linear-gradient(90deg, var(--brand), var(--ok), var(--warn), var(--brand-dark), var(--brand));
  position: relative;
}
.loginCard #loginSubmit::before {
  content: ""; position: absolute; inset: -10px; z-index: -1; border-radius: 999px; opacity: 0.4;
  background-image: var(--v2Grad); background-size: 300% 100%; filter: blur(12px); pointer-events: none;
}
html[data-motion="full"] .loginCard #loginSubmit::before { animation: v2UiFlow 9s linear infinite; }
.loginCard #loginSubmit:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.loginPage .loginCard { isolation: isolate; }
.loginPage .loginCard .loginScript {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: -1;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
  border-radius: inherit;
}
/* El yazısı notu: kâğıdın tamamında, defter çizgilerine oturan satırlar. Caveat harflerinin
   tek çizgilik iskeleti soldan sağa, satır satır çizilir; her satır kendi gecikmesini
   (--d, inline) taşır. Çizim döngüsünü login-drift.js başlatır (.isWriting). Hareket
   kapalıysa yazı hemen görünür. */
/* Sabit 1:1 ölçek: defter çizgileri 32px aralıklıdır, yazı bu aralığa birebir oturur. */
.loginScriptSvg { display: block; width: 560px; height: 1000px; max-width: none; overflow: visible; }
.loginScriptSvg path {
  fill: none;
  stroke: color-mix(in srgb, var(--ink) 5%, transparent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@keyframes loginStrokeDraw {
  to { stroke-dashoffset: 0; }
}
html[data-motion="full"] .loginPage .loginCard .loginScriptSvg path {
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
}
html[data-motion="full"] .loginPage .loginCard .loginScriptSvg.isWriting path {
  animation: loginStrokeDraw 0.3s linear var(--d, 0s) forwards;
}

/* Görünüm yükleme maskesi (app.js markViewLoading): klasik arayüzde gizli; v2'da v2.css gösterir. */
.view > .viewMask { display: none; }

/* ---- Not metni yazı tipi: Comic (varsayılan) / normal ----
   Site sahibinin tercihi: not içeriği (kartlar, tam ekran okuyucu, not içi başlıklar)
   Comic tarzında. Windows/macOS'ta yüklüyse gerçek "Comic Sans MS", yoksa açık lisanslı
   Comic Relief (SIL OFL 1.1, Comic Sans ile aynı ölçüler; public/fonts/comic-relief-*,
   Google Fonts v2). Comic Neue Türkçe İ/ğ/ş içermediği için seçilmedi. Dosyalar yalnız
   not metni çizilince iner (unicode-range; kabukta değil). Sorular/şıklar değişmez.
   Öğrenci kapatabilir: html[data-note-font="normal"] (localStorage.dersMecrasiNoteFace,
   note-reader.js; boyamadan önce index.html yazar). Özgüllük v2'nın
   `html[data-ui-tema="v2"] .noteContent` ve başlık kurallarını geçecek kadar yüksek. */
@font-face {
  font-family: "Comic Relief";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/comic-relief-400-greek.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "Comic Relief";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/comic-relief-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Comic Relief";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/comic-relief-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Comic Relief";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/comic-relief-700-greek.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "Comic Relief";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/comic-relief-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Comic Relief";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/comic-relief-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root { --note-font: "Comic Sans MS", "Comic Relief", "Chalkboard SE", var(--serif); }
html:not([data-note-font="normal"]) body .noteContent,
html:not([data-note-font="normal"]) body .noteContent :is(h1, h2, h3, h4, h5, h6, p, li, blockquote, td, th, strong, em, .glossTerm) {
  font-family: var(--note-font);
}

/* ---- Dokunmatik: küçük düğmelerin dokunma alanı ≥ 44px (görünüm değişmez) ----
   Mobil tarama (360 px, dokunmatik) bu öğeleri 14–34 px buldu: üst çubuk menü/zil/logo/
   çevrimiçi sayacı, Sorular "Çöz →", Notlar sıralama/görünüm, Bugün "Tümü", Profil
   "Şifre değiştir" ve ⓘ, hesap panelindeki sınıf düğmeleri, yönetici ⓘ/⋯. Boyutlarını
   büyütmek dar üst çubuğu taşırırdı; bunun yerine görünmez bir ::after alanı düğmenin
   merkezinde en az 44×44 tıklama yüzeyi açar (WCAG 2.5.5). Yalnız kaba işaretçide. */
@media (pointer: coarse) {
  :is(#menuToggle, #bellButton, #brandHome, #activeCount, #noteViewToggle, #noteSortDir,
      .qMenuBtn, .fieldInfo, .fieldDefault, .dmInk-info, .bqSolve, .btLink, .bqPwLink, .bqNoteOpen,
      .gradeSwitch .segmented button) {
    position: relative;
  }
  :is(#menuToggle, #bellButton, #brandHome, #activeCount, #noteViewToggle, #noteSortDir,
      .qMenuBtn, .fieldInfo, .fieldDefault, .dmInk-info, .bqSolve, .btLink, .bqPwLink, .bqNoteOpen,
      .gradeSwitch .segmented button)::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(100%, 44px);
    height: max(100%, 44px);
    transform: translate(-50%, -50%);
  }
  /* Komşu genişletilmiş alanlar üst üste biner; menü düğmesi logonun alanının altında
     kalıyordu (v2'da 30 px). Notlar'daki iki simge düğmesi yan yana olduğu için
     birbirini kırpıyordu: gerçekten 44 px genişlik (satırda yer var). */
  #menuToggle { z-index: 1; }
  #noteSortDir, #notesView #noteViewToggle { min-width: 44px; }
}

;
/* ---- css/views/ayarlar.css ---- */
/* ==========================================================================
   V3 Ayarlar (P3) — Platform Ayarları, Penpot düzenine birebir yeniden yazım.
   Eski "kâğıt katmanı" ayar kuralları bu görünümde dikkate alınmaz: her kural
   #adminSettingsView ile başlar ve aynı özgüllükte sonra geldiği için kazanır.
   Renkler yalnız belirteçlerden; font-size yalnız --fs-* ölçeğinden.
   ========================================================================== */

/* İçerik alanı: 264px yan menüden sonra sol/sağ 40px dolgu. */
@media (min-width: 821px) {
  .content:has(#adminSettingsView:not(.hidden)) {
    padding-left: calc(var(--sp-6) + var(--sp-2));
    padding-right: calc(var(--sp-6) + var(--sp-2));
  }
}

#adminSettingsView {
  padding-bottom: var(--sp-6);
}

/* ---- Başlık ---- */
#adminSettingsView .settingsHead {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
}
#adminSettingsView .settingsHead h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
#adminSettingsView .settingsIntro {
  max-width: 64ch;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.5;
}
#adminSettingsView .settingsIntro p { margin: 0; }
#adminSettingsView .settingsIntro strong { color: var(--ink); }
#adminSettingsView #settingsLockNote { margin: var(--sp-1) 0 0; font-size: var(--fs-sm); }

/* Ayar arama kutusu: başlığın altında 400×40. */
#adminSettingsView #settingsSearch {
  width: 400px;
  max-width: 100%;
  height: 40px;
  margin: var(--sp-3) 0 0;
  padding: 0 var(--sp-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--ink);
  font-size: var(--fs-sm);
}

/* ---- İki sütun: sol kategori rayı (252px) + sağ ayar kartı ---- */
#adminSettingsView .settingsBody {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
#adminSettingsView .settingsMain {
  display: grid;
  align-content: start;
  gap: var(--sp-4);
  min-width: 0;
}
#adminSettingsView #settingsCatRail {
  position: sticky;
  top: calc(64px + var(--sp-4));
  align-self: start;
  display: grid;
  gap: var(--sp-2);
  padding: var(--sp-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
#adminSettingsView #settingsCatRail .ds-tab {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  margin: 0;
  padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-4);
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 400;
  text-align: left;
}
#adminSettingsView #settingsCatRail .ds-tab:hover { background: var(--hover); }
#adminSettingsView #settingsCatRail .ds-tab[aria-selected="true"] {
  background: var(--brand-soft);
  color: var(--brand-text);
  font-weight: 600;
}
#adminSettingsView #settingsCatRail .ds-tab[aria-selected="true"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 18px;
  transform: translateY(-50%);
  border-radius: var(--r-full);
  background: var(--brand);
}

/* ---- Sağ kart: yalnız seçili kategori ---- */
#adminSettingsView .settingsCat {
  display: grid;
  gap: 0;
  min-width: 0;
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
#adminSettingsView .settingsCatHead {
  display: grid;
  gap: var(--sp-1);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line);
}
#adminSettingsView .settingsCatHead h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--ink);
}
#adminSettingsView .settingsCatHead p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-xs);
}

/* Alt gruplar görünmez bölüm başlığıdır; ayar satırları tek sütun akar. */
#adminSettingsView .settingsSub {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
#adminSettingsView .settingsSub legend {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-4) 0 0;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}
#adminSettingsView .settingsSub legend .groupDot {
  display: none;
  width: var(--sp-2);
  height: var(--sp-2);
  border-radius: var(--r-full);
  background: var(--brand);
}
#adminSettingsView .settingsSub.changed legend .groupDot { display: inline-block; }
#adminSettingsView .settingsSub.collapsed > *:not(legend) { display: none; }

/* ---- Ayar satırı: solda etiket + ipucu, sağda kontrol ---- */
#adminSettingsView .fieldRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label control"
    "hint control"
    "extra extra";
  column-gap: var(--sp-5);
  row-gap: var(--sp-1);
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
#adminSettingsView .fieldRow:last-child { border-bottom: 0; }
#adminSettingsView .fieldLabelRow {
  grid-area: label;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}
#adminSettingsView .fieldLabelRow > label,
#adminSettingsView .fieldLabelRow > span {
  color: var(--ink);
  font-size: var(--fs-md);
  font-weight: 600;
  cursor: pointer;
}
#adminSettingsView .fieldHint {
  grid-area: hint;
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.45;
}
#adminSettingsView .fieldInfo {
  flex: none;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}
#adminSettingsView .fieldInfo:hover { border-color: var(--brand); color: var(--brand-text); }
#adminSettingsView .fieldDefault {
  width: auto;
  padding: 0 var(--sp-2);
  border: 1px dashed var(--line);
  border-radius: var(--r-full);
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1.6;
  cursor: pointer;
}
#adminSettingsView .fieldDefault:hover { border-color: var(--brand); color: var(--brand-text); }

/* Kontroller satırın sağında; uzun/çok satırlı/dosya alanları alta iner. */
#adminSettingsView .fieldRow > input,
#adminSettingsView .fieldRow > select,
#adminSettingsView .fieldRow > textarea,
#adminSettingsView .fieldRow > .settingsSwitch { grid-area: control; }
#adminSettingsView .fieldRow > .settingsImage { grid-area: extra; }

#adminSettingsView .fieldRow input[type="text"],
#adminSettingsView .fieldRow input[type="search"],
#adminSettingsView .fieldRow select,
#adminSettingsView .fieldRow textarea {
  width: 260px;
  max-width: 100%;
  min-height: 40px;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-2);
  color: var(--ink);
  font-size: var(--fs-sm);
}
#adminSettingsView .fieldRow textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
}
#adminSettingsView .fieldRow select { width: 260px; }
#adminSettingsView .fieldRow--wide {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "label"
    "hint"
    "control"
    "extra";
  align-items: start;
}
#adminSettingsView .fieldRow--wide input[type="text"],
#adminSettingsView .fieldRow--wide select { width: 100%; }
#adminSettingsView .fieldRow .settingsImage {
  width: 100%;
  margin-top: var(--sp-2);
  padding: var(--sp-1) 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-xs);
}

/* Sayı alanı: 80×40, ortalanmış, değişince marka kenarı. */
#adminSettingsView .fieldRow input[type="number"] {
  width: 80px;
  min-height: 40px;
  padding: 0 var(--sp-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-2);
  color: var(--ink);
  font-size: var(--fs-md);
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
#adminSettingsView .fieldRow.fieldChanged input,
#adminSettingsView .fieldRow.fieldChanged select,
#adminSettingsView .fieldRow.fieldChanged textarea { border-color: var(--brand); }
#adminSettingsView .fieldRow input:focus,
#adminSettingsView .fieldRow select:focus,
#adminSettingsView .fieldRow textarea:focus { border-color: var(--brand); }

/* Anahtar: 52×30; açık = marka zemin + beyaz topuz sağda. */
#adminSettingsView .settingsSwitch {
  position: relative;
  display: inline-flex;
  width: 52px;
  height: 30px;
}
#adminSettingsView .settingsSwitch input {
  appearance: none;
  -webkit-appearance: none;
  width: 52px;
  height: 30px;
  margin: 0;
  border: 0;
  border-radius: 15px;
  background: var(--line);
  cursor: pointer;
  transition: background var(--t-med) var(--ease);
}
#adminSettingsView .settingsSwitch input::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: var(--r-full);
  background: var(--on-brand);
  box-shadow: 0 1px 2px var(--line);
  transition: transform var(--t-med) var(--ease);
}
#adminSettingsView .settingsSwitch input:checked { background: var(--brand); }
#adminSettingsView .settingsSwitch input:checked::after { transform: translateX(22px); }
#adminSettingsView .settingsSwitch input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---- Kaydet çubuğu: kart sütununun altında, akışta yapışkan ---- */
#adminSettingsView #settingsBar {
  position: sticky;
  bottom: var(--sp-4);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  min-height: 64px;
  margin: 0;
  padding: var(--sp-2) var(--sp-5);
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--shadow-pop);
}
#adminSettingsView #settingsBar .settingsBarInfo {
  color: var(--surface);
  font-size: var(--fs-sm);
  font-weight: 600;
}
#adminSettingsView #settingsBar .actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
#adminSettingsView #settingsBar button {
  min-height: 40px;
  padding: 0 var(--sp-4);
  border-radius: 9px;
  font-size: var(--fs-sm);
  font-weight: 600;
}
#adminSettingsView #settingsBar #settingsRevert {
  border: 1px solid var(--surface);
  background: transparent;
  color: var(--surface);
}
#adminSettingsView #settingsBar #settingsRevert:hover {
  background: color-mix(in srgb, var(--surface) 14%, transparent);
}
#adminSettingsView #settingsBar #settingsSave {
  border: 1px solid var(--brand);
  background: var(--brand);
  color: var(--on-brand);
}
#adminSettingsView #settingsBar #settingsSave:hover { background: var(--brand-dark); }

/* ---- Alt kartlar: son değişiklikler + sunucu bilgileri (en altta) ---- */
#adminSettingsView #settingsChangelog,
#adminSettingsView #settingsSystem {
  margin: var(--sp-5) 0 0;
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-sm);
  overflow-x: auto;
}
#adminSettingsView #settingsChangelog strong,
#adminSettingsView #settingsSystem strong {
  font-family: var(--serif);
  font-size: var(--fs-md);
  font-weight: 700;
}
#adminSettingsView #settingsChangelog .changeRow {
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--line);
}
#adminSettingsView #settingsChangelog .changeRow:last-child { border-bottom: 0; }
#adminSettingsView #settingsSystem table { width: 100%; border-collapse: collapse; margin-top: var(--sp-3); }
#adminSettingsView #settingsSystem td {
  padding: var(--sp-2) 0;
  border-top: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
}
#adminSettingsView #settingsSystem td:first-child { width: 200px; color: var(--muted); }

/* ---- Mobil: ray yatay sekme şeridi, satırlar dikey ---- */
@media (max-width: 820px) {
  #adminSettingsView .settingsBody { grid-template-columns: minmax(0, 1fr); }
  #adminSettingsView #settingsCatRail {
    position: static;
    display: flex;
    gap: var(--sp-2);
    overflow-x: auto;
    padding: 0 0 var(--sp-2);
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  #adminSettingsView #settingsCatRail .ds-tab {
    width: auto;
    flex: none;
    min-height: 44px;
    padding: var(--sp-2) var(--sp-3);
    white-space: nowrap;
  }
  #adminSettingsView #settingsCatRail .ds-tab[aria-selected="true"]::before {
    top: auto;
    bottom: 0;
    left: 50%;
    width: 18px;
    height: 3px;
    transform: translateX(-50%);
  }
  #adminSettingsView .settingsCat { padding: var(--sp-4); }
  #adminSettingsView .fieldRow,
  #adminSettingsView .fieldRow--wide {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "label"
      "hint"
      "control"
      "extra";
    align-items: start;
  }
  #adminSettingsView .fieldRow > input[type="text"],
  #adminSettingsView .fieldRow > input[type="search"],
  #adminSettingsView .fieldRow > input[type="number"],
  #adminSettingsView .fieldRow > select,
  #adminSettingsView .fieldRow > textarea {
    width: 100%;
  }
  /* Kaydet çubuğu ekranın altına yapışır; sayfa sonu çubuğun (64px) altında kalmasın. */
  #adminSettingsView #settingsBar {
    bottom: calc(env(safe-area-inset-bottom) + var(--sp-3));
  }
  #adminSettingsView { padding-bottom: calc(64px + var(--sp-6)); }
}

@media (prefers-reduced-motion: reduce) {
  #adminSettingsView .settingsSwitch input,
  #adminSettingsView .settingsSwitch input::after { transition: none; }
}


;
/* ---- css/views/sorular.css ---- */
/* P5 — Öğrenci · Sorular (liste). Her kural #questionsView ile başlar; başka görünümü etkilemez. */
@media (min-width: 821px) {
  .content:has(#questionsView:not(.hidden)) {
    padding-left: calc(var(--sp-6) + var(--sp-2));
    padding-right: calc(var(--sp-6) + var(--sp-2));
  }
}
#questionsView > h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
}
#questionsView #quizCount {
  margin: var(--sp-1) 0 var(--sp-4);
  min-height: 1.2em;
  color: var(--muted);
  font-size: var(--fs-sm);
}
#questionsView .filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-5);
  padding: 0;
  border: 0;
  background: transparent;
}
#questionsView .filters input,
#questionsView .filters select {
  height: 40px;
  margin: 0;
  padding: 0 var(--sp-4);
  border: 1px solid var(--line);
  border-radius: 10px;
  background-color: var(--surface);
  color: var(--ink);
  font-size: var(--fs-sm);
}
#questionsView .filters input { flex: 0 1 300px; min-width: 200px; }
#questionsView .filters select {
  flex: 0 1 150px;
  min-width: 130px;
  padding-right: calc(var(--sp-6) + var(--sp-1));
}
#questionsView .filters #questionSort { flex-basis: 200px; }
#questionsView .quizList {
  display: grid;
  gap: var(--sp-4);
}
#questionsView .quizItem {
  display: grid;
  gap: var(--sp-3);
  margin: 0;
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
#questionsView .quizMeta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
#questionsView .quizMeta .badge {
  padding: 3px 10px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--brand-soft);
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
#questionsView .quizMeta .stars { color: var(--star); font-size: var(--fs-sm); }
#questionsView .quizItem > strong {
  font-family: var(--serif);
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}
#questionsView .quizOptions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px var(--sp-4);
  counter-reset: sik;
}
#questionsView .quizOption {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 40px;
  margin: 0;
  padding: var(--sp-2) var(--sp-3);
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-size: var(--fs-md);
  cursor: pointer;
}
#questionsView .quizOption::before {
  counter-increment: sik;
  content: counter(sik, upper-alpha);
  flex: 0 0 24px;
  height: 24px;
  border-radius: var(--r-full);
  background: var(--chip);
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 24px;
  text-align: center;
}
/* Radyo yalnız :has() destekleyen tarayıcıda gizlenir; desteklemeyende (eski
   Firefox / Android WebView) yerel radyo görünür kalır, seçim kaybolmaz. */
@supports selector(:has(*)) {
  #questionsView .quizOption input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
  }
  #questionsView .quizOption:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-soft);
    font-weight: 600;
  }
  #questionsView .quizOption:has(input:checked)::before {
    background: var(--brand);
    color: var(--on-brand);
  }
  #questionsView .quizOption:has(input:focus-visible) {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
  }
}
#questionsView .quizItem .actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin: var(--sp-1) 0 0;
}
#questionsView .quizItem .actions button {
  min-height: 32px;
  padding: 0 var(--sp-4);
  border-radius: 9px;
  font-size: var(--fs-sm);
  font-weight: 600;
}
/* Boşken yer kaplamaz ama render ağacında kalır (aria-live ilk duyuruyu kaçırmasın). */
#questionsView .quizResult:empty { margin: calc(-1 * var(--sp-3)) 0 0; padding: 0; border: 0; min-height: 0; }
#questionsView .quizItem .actions button.secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
@media (max-width: 820px) {
  #questionsView .filters input { flex: 1 1 100%; }
  #questionsView .filters select { flex: 1 1 calc(50% - var(--sp-3)); min-width: 0; }
  #questionsView .quizOptions { grid-template-columns: minmax(0, 1fr); }
  #questionsView .quizItem { padding: var(--sp-4); }
  #questionsView .quizItem .actions button { min-height: 44px; }
}

;
/* ---- css/views/notlar.css ---- */
/* P6 — Öğrenci · Notlar. Her kural #notesView ile başlar; başka görünümü etkilemez. */
@media (min-width: 821px) {
  .content:has(#notesView:not(.hidden)) {
    padding-left: calc(var(--sp-6) + var(--sp-2));
    padding-right: calc(var(--sp-6) + var(--sp-2));
  }
}
#notesView .viewHead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  margin: 0 0 var(--sp-4);
  padding-bottom: 0;
  border-bottom: 0;
}
#notesView .viewHead::after,
#notesView .viewHead h2::before { content: none; }
#notesView .viewHead h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
}
#notesView .filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-5);
  padding: 0;
  border: 0;
  background: transparent;
}
#notesView .filters input,
#notesView .filters select,
#notesView .noteSort select {
  height: 40px;
  margin: 0;
  padding: 0 var(--sp-4);
  border: 1px solid var(--line);
  border-radius: 10px;
  background-color: var(--surface);
  color: var(--ink);
  font-size: var(--fs-sm);
}
#notesView .filters input { flex: 0 1 340px; min-width: 200px; }
#notesView .filters select { flex: 0 1 150px; min-width: 130px; }
#notesView .filters select:not([multiple]),
#notesView .noteSort select:not([multiple]) {
  padding-right: calc(var(--sp-6) + var(--sp-1));
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right var(--sp-3) center;
}
#notesView .noteSort select {
  min-width: 170px;
  letter-spacing: 0;
  text-transform: none;
}
#notesView #notesList {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: calc(var(--sp-4) + var(--sp-1));
  margin: 0;
  padding: 0;
  list-style: none;
}
#notesView #notesList > li {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-width: 0;
  margin: 0;
  padding: calc(var(--sp-4) + var(--sp-1));
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
#notesView #notesList > li::before { content: none; }
#notesView #notesList > li.listEmpty {
  grid-column: 1 / -1;
  color: var(--muted);
}
#notesView #notesList .quizMeta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
#notesView #notesList .badge {
  padding: 3px 10px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--brand-soft);
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
#notesView #notesList .badge.muted {
  background: var(--chip);
  color: var(--muted);
}
#notesView #notesList > li > strong {
  font-family: var(--serif);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  overflow-wrap: anywhere;
}
#notesView #notesList > li > p,
#notesView #notesList .noteSummary,
#notesView #notesList .noteContent {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#notesView #notesList .preview {
  max-width: 100%;
  border-radius: 10px;
}
#notesView #notesList > li > button {
  width: 100%;
  min-height: 36px;
  padding: 0 var(--sp-4);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
}
#notesView #notesList > li > .noteQuestions {
  margin-top: var(--sp-2);
  padding-top: 0;
}
@media (max-width: 1100px) {
  #notesView #notesList { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  #notesView #notesList { grid-template-columns: minmax(0, 1fr); }
  #notesView .filters input { flex: 1 1 100%; }
  #notesView .filters select { flex: 1 1 calc(50% - var(--sp-3)); min-width: 0; }
  #notesView #notesList > li > button { min-height: 44px; }

  /* Markdown tabloları: sütunlar okunur genişlikte kalır, taşan kısım kart
     içinde yatay kaydırılır (kelimeler harf harf bölünmez). Kenar gölgeleri
     kaydırılabilir olduğunu gösterir; kaydırma yokken görünmez (local katman). */
  #notesView .noteContent .tableWrap {
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
    background:
      linear-gradient(to right, var(--surface) 30%, transparent) left / 28px 100% no-repeat local,
      linear-gradient(to left, var(--surface) 30%, transparent) right / 28px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, color-mix(in srgb, var(--ink) 30%, transparent), transparent) left / 12px 100% no-repeat,
      radial-gradient(farthest-side at 100% 50%, color-mix(in srgb, var(--ink) 30%, transparent), transparent) right / 12px 100% no-repeat;
    background-color: var(--surface);
  }
  #notesView .noteContent table { font-size: var(--fs-sm); }
  #notesView .noteContent th,
  #notesView .noteContent td { padding: 0.3rem 0.45rem; }
}

/* Ders filtresi: Penpot "Menu" kalıbı — yatay sekme çubuğu, aktif öğede 2 px alt
   çizgi. Çubuk .ds-tabs/.ds-tab bileşenleridir; burada yalnız dikey boşluk ve
   aktif durum görünüme uyarlanır. */
#notesView #noteSubjectMenu {
  margin: 0 0 var(--sp-4);
}
#notesView #noteSubjectMenu .ds-tab[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--brand);
}

/* Kelime havuzu: anahtar, işaretli terim ve açıklama kutusu (glossary.js). */
#notesView .glossToggle {
  margin: 0 0 var(--sp-3);
  color: var(--muted);
  font-size: var(--fs-sm);
  width: fit-content;
  cursor: pointer;
}
/* Not anahtarları (Kelime açıklamaları + Comic yazı tipi) tek satırda; dar ekranda sarılır. */
#notesView .noteToggles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-4);
  margin: 0 0 var(--sp-3);
}
#notesView .noteToggles .glossToggle { margin: 0; }
/* Terim (glossTerm) ve popinfo (terim açıklama balonu) paylaşılan bileşen
   katmanındadır (styles.css → "Kelime havuzu terimleri"); tam ekran okuma ekranı
   #noteReader gövdeye eklendiği için aynı kurallar orada da geçerlidir. Görünüm
   CSS'inde tekrarlanmaz. */

/* Not kartındaki "Tam ekran" bağlantısı (ebru kartı: alt satırda Aç'ın yanında). */
#notesView .bqNoteFull {
  padding: 0 var(--sp-2);
  border: 0;
  background: transparent;
  color: var(--brand-text);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
#notesView .bqNoteFull:hover { background: transparent; color: var(--brand-text-strong); }
#notesView > .topicPicker { display: flex; margin: 0 0 var(--sp-3); }
#notesView > .topicPicker.hidden { display: none; }

/* Konu başlığı satırı not kartı DEĞİLDİR: çerçevesiz, arka plansız, tam genişlikte ayraç başlığı. */
#notesView #notesList > li.topicGroupHead {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  grid-column: 1 / -1;
  gap: var(--sp-2);
  min-height: 0;
  margin: var(--sp-3) 0 0;
  padding: 0 0 var(--sp-1);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#notesView #notesList > li.topicGroupHead:first-child { margin-top: 0; }
/* "Ders geneli" başlığı (konusuz notlar, en üstte): marka rengiyle öne çıkar. */
#notesView #notesList > li.topicGroupHead--general { border-bottom-color: var(--brand); }
#notesView #notesList > li.topicGroupHead--general span { color: var(--brand-text-strong); }


/* Liste görünümü: not başına tek satır, içerik açılır (details). */
#notesView #noteViewToggle { background: none; color: var(--muted); padding: 0 0.2rem; }
#notesView .noteRow {
  list-style: none;
  border-bottom: 1px solid var(--line);
  padding: 0;
}
#notesView .noteRow summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-4);
  padding: var(--sp-3) 0;
  cursor: pointer;
  list-style: none;
}
#notesView .noteRow summary::-webkit-details-marker { display: none; }
#notesView .noteRow summary::marker { content: ""; }
#notesView .noteRow summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
#notesView .noteRow__title {
  flex: 1 1 14rem;
  min-width: 0;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}
#notesView .noteRow__title::after {
  content: "▸";
  display: inline-block;
  margin-left: var(--sp-2);
  color: var(--muted);
  transition: transform 0.15s ease;
}
#notesView .noteRow[open] .noteRow__title::after { transform: rotate(90deg); }
#notesView .noteRow__meta {
  font-size: var(--fs-sm);
  color: var(--muted);
}
#notesView .noteRow__body { padding: 0 0 var(--sp-4); }
@media (max-width: 820px) {
  #notesView .noteRow__meta { flex-basis: 100%; }
}

/* Liste modu: kart ızgarası yerine tek sütun, satır ayırıcılı (klasik). Ebru üstü: v2-base.css. */
#notesView #notesList.noteListMode {
  display: block;
  gap: 0;
  grid-template-columns: none;
}
#notesView #notesList.noteListMode > li.noteRow {
  display: block;
  gap: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#notesView #notesList.noteListMode > li.noteRow::before { content: none; }

;
/* ---- css/views/denemeler.css ---- */
/* P7 — Öğrenci · Denemeler. Her kural #testsView ile başlar; başka görünümü etkilemez. */
@media (min-width: 821px) {
  .content:has(#testsView:not(.hidden)) {
    padding-left: calc(var(--sp-6) + var(--sp-2));
    padding-right: calc(var(--sp-6) + var(--sp-2));
  }
}
#testsView > h2 {
  margin: 0 0 var(--sp-4);
  font-family: var(--serif);
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
}
#testsView .filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-5);
  padding: 0;
  border: 0;
  background: transparent;
}
#testsView .filters select {
  flex: 0 1 150px;
  min-width: 130px;
  height: 40px;
  margin: 0;
  padding: 0 var(--sp-4);
  border: 1px solid var(--line);
  border-radius: 10px;
  background-color: var(--surface);
  color: var(--ink);
  font-size: var(--fs-sm);
  padding-right: calc(var(--sp-6) + var(--sp-1));
}
#testsView #openAttempts {
  display: grid;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-5);
}
#testsView #openAttempts.hidden { display: none; }
#testsView #openAttempts h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--ink);
}
#testsView #openAttempts .card {
  margin: 0;
  padding: var(--sp-4) calc(var(--sp-4) + var(--sp-1));
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--warn-bg);
}
#testsView #testList {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(var(--sp-4) + var(--sp-1));
}
#testsView #testList > p {
  grid-column: 1 / -1;
  margin: 0;
}
#testsView .testCard {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-width: 0;
  min-height: 220px;
  margin: 0;
  padding: calc(var(--sp-4) + var(--sp-1));
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
#testsView .testCard .quizMeta {
  order: -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}
#testsView .testCard .badge {
  padding: 3px 10px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--brand-soft);
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
#testsView .testCard .quizMeta .badge:last-child {
  margin-left: auto;
  padding-right: 0;
  background: transparent;
}
#testsView .testCard > strong {
  font-family: var(--serif);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  overflow-wrap: anywhere;
}
#testsView .testCard > p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-sm);
}
#testsView .testCard .startTest {
  width: 100%;
  min-height: 44px;
  margin-top: auto;
  border: 0;
  border-radius: 9px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: var(--fs-sm);
  font-weight: 600;
}
#testsView .testCard .startTest:hover { background: var(--brand-hover); }
@media (max-width: 1100px) {
  #testsView #testList { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  #testsView #testList { grid-template-columns: minmax(0, 1fr); }
  #testsView .filters select { flex: 1 1 calc(50% - var(--sp-3)); min-width: 0; }
  #testsView .testCard { min-height: 0; }
}

/* Sınav ve sonuç ekranı: şıklar Sorular ekranıyla aynı (A–E rozetli), satır yüksekliği sabit;
   eylem düğmeleri tek yükseklik. Seçim göstergesi rozettir; radyo görsel olarak gizlenir. */
#examView .optionList, #resultView .optionList { display: grid; gap: var(--sp-2); margin: var(--sp-3) 0; counter-reset: sik; }
#examView .optionRow, #resultView .optionRow {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 48px;
  margin: 0;
  padding: var(--sp-2) var(--sp-3);
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-size: var(--fs-md);
  cursor: pointer;
}
#examView .optionRow::before, #resultView .optionRow::before {
  counter-increment: sik;
  content: counter(sik, upper-alpha);
  flex: 0 0 28px;
  height: 28px;
  border-radius: var(--r-full);
  background: var(--chip);
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 28px;
  text-align: center;
}
#examView .optionRow input, #resultView .optionRow input { position: absolute; opacity: 0; width: 1px; height: 1px; min-width: 0; margin: 0; }
#examView .optionRow:hover { border-color: var(--brand); }
#examView .optionRow:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); font-weight: 600; }
#examView .optionRow:has(input:checked)::before { background: var(--brand); color: var(--on-brand); }
#examView .optionRow:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
#examView .optionRow.correctOption, #resultView .optionRow.correctOption { border-color: var(--ok); background: var(--ok-bg); }
#examView .optionRow.wrongOption, #resultView .optionRow.wrongOption { border-color: var(--bad); background: var(--bad-bg); }
#examView .optionRow.correctOption::before, #resultView .optionRow.correctOption::before { background: var(--ok); color: var(--on-brand); }
#examView .optionRow.wrongOption::before, #resultView .optionRow.wrongOption::before { background: var(--bad); color: var(--on-brand); }
#examView .actions button { min-height: var(--tap); padding: 0 var(--sp-4); }

;
/* ---- css/views/yapilacaklar.css ---- */
/* Yönetici Yapılacaklar paneli. Görünüme özel kurallar #adminTasksView önekiyle
   yazılır (AGENTS kuralı); renk yalnız mevcut belirteçlerden gelir. */
#adminTasksView .taskMineHead { margin: var(--sp-5) 0 var(--sp-2); }
#adminTasksView .taskMine { margin-bottom: var(--sp-4); }
#adminTasksView #adminTaskTabs { margin: var(--sp-2) 0 var(--sp-3); }
#adminTasksView .taskCard { display: grid; gap: var(--sp-2); }
#adminTasksView .taskCard[data-status="claimed"] { border-left: 3px solid var(--brand); }
#adminTasksView .taskCard__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  min-width: 0;
}
#adminTasksView .taskCard__head strong { min-width: 0; overflow-wrap: anywhere; }
#adminTasksView .taskPriority { flex: 0 0 auto; }
#adminTasksView .taskPriority--high { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
#adminTasksView .taskPriority--normal { background: var(--brand-soft); border-color: var(--line); color: var(--brand-text); }
#adminTasksView .taskPriority--low { background: var(--surface); border-color: var(--line); color: var(--muted); }
#adminTasksView .taskDue.isOverdue { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
#adminTasksView .taskDescription { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#adminTasksView .taskMeta { margin: 0; font-size: var(--fs-xs); }
#adminTasksView .taskClaim { margin: 0; font-size: var(--fs-sm); color: var(--brand-text); }
#adminTasksView .taskCard .actions { flex-wrap: wrap; }
#adminTasksView #adminTaskForm textarea { width: 100%; }
#adminTasksView #adminTaskCreate summary { cursor: pointer; font-weight: 600; }

;
/* ---- css/views/community.css ---- */
/* Topluluk — Sinaps sahnesi. Görünüm sade: sahne, 3D/2D, zaman cebi ve tek satır
   seçim etiketi. Seçiciler #communityView ile kapsanır (görünüm CSS kuralı). */

#communityView {
  display: grid;
  gap: 10px;
}

#communityView .cmStage {
  position: relative;
  width: 100%;
  height: clamp(420px, calc(100dvh - 300px), 860px);
  border: 1px solid rgb(45 63 166 / 42%);
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 72% 0%, rgb(45 63 166 / 38%), transparent 62%),
    rgb(11 16 38);
  cursor: grab;
}

#communityView .cmStage:active { cursor: grabbing; }

#communityView .cmMsg {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgb(141 147 173);
  font-size: var(--fs-sm);
}

#communityView .cmMsg[hidden] { display: none; }

#communityView .cmTag {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  pointer-events: none;
  max-width: calc(100% - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 10px;
  border: 1px solid rgba(169, 175, 211, .35);
  border-radius: 999px;
  background: rgba(7, 8, 13, .82);
  color: rgb(236 238 249);
  font-size: var(--fs-sm);
  font-weight: 700;
  transform: translate(-50%, -100%);
}

#communityView .cmTag[hidden] { display: none; }

#communityView .cmTag--pick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 6px 12px;
  border-radius: 12px;
}

#communityView .cmTag--pick b { font-size: var(--fs-sm); }

#communityView .cmTag--pick b,
#communityView .cmTag--pick span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#communityView .cmTag--pick span {
  font-family: var(--v2-mono, ui-monospace, monospace);
  font-size: var(--fs-xs);
  font-weight: 400;
  color: rgb(169 175 211);
}

#communityView .cmGhost {
  position: absolute;
  left: 18px;
  bottom: 12px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
  color: rgb(236 238 249);
  opacity: .12;
}

#communityView .cmGhost[hidden] { display: none; }

#communityView .cmGhost b {
  font-family: var(--v2-display, var(--serif, system-ui));
  font-size: var(--fs-2xl);
  font-weight: 800;
  line-height: .78;
  letter-spacing: -.05em;
}

#communityView .cmGhost span {
  padding-bottom: 6px;
  font-family: var(--v2-mono, ui-monospace, monospace);
  font-size: var(--fs-xs);
  letter-spacing: .1em;
  text-transform: uppercase;
}

#communityView .cmSeg {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(169, 175, 211, .32);
  border-radius: 999px;
  background: rgba(10, 11, 17, .74);
}

#communityView .cmSeg button {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgb(169 175 211);
  font-size: var(--fs-sm);
  cursor: pointer;
}

#communityView .cmSeg button[aria-pressed="true"] {
  background: rgb(232 163 61);
  color: rgb(20 25 54);
  font-weight: 700;
}

/* Zaman makinesi cebi: kapalıyken tek satır. */
#communityView .cmPocket {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

#communityView .cmPocket__head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-sm);
  cursor: pointer;
}

#communityView .cmPocket__state {
  font-family: var(--v2-mono, ui-monospace, monospace);
  color: var(--ink);
}

#communityView .cmPocket__body {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

#communityView .cmPocket__body[hidden] { display: none; }

#communityView .cmPlay {
  flex: none;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 19px;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-size: var(--fs-sm);
  cursor: pointer;
}

#communityView .cmPlay[aria-pressed="true"] { background: var(--star, rgb(232 163 61)); }

#communityView .cmTrack {
  flex: 1 1 200px;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#communityView .cmTrack input[type="range"] {
  width: 100%;
  height: 22px;
  margin: 0;
  accent-color: rgb(232 163 61);
  cursor: pointer;
}

#communityView .cmTicks {
  display: flex;
  justify-content: space-between;
  font-family: var(--v2-mono, ui-monospace, monospace);
  font-size: var(--fs-xs);
  letter-spacing: .04em;
  color: var(--muted);
}

#communityView .cmNow {
  flex: none;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: transparent;
  color: var(--ink);
  font-size: var(--fs-sm);
  cursor: pointer;
}

#communityView .cmNow[hidden] { display: none; }

@media (max-width: 820px) {
  #communityView .cmStage {
    height: calc(100dvh - 250px);
    min-height: 360px;
    margin: 0 -16px;
    width: calc(100% + 32px);
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
}






;
/* ---- css/views/hakkinda.css ---- */
/* Hakkında — platform tanıtımı, çalışma döngüsü ve küçük Sinaps ağı.
   Görünüme özel kurallar #aboutView önekiyle; belirteç dışı font-size yok.
   Ebru tonları `var(--v2-*, yedek)` ile gelir; böylece temel temada da çalışır. */
#aboutView {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

#aboutView .aboutHero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: var(--sp-5);
  align-items: center;
  padding: var(--sp-5);
  border: 1px solid var(--v2-line, var(--line));
  border-radius: var(--r-md);
  background: var(--v2-paper-3, var(--surface));
}

#aboutView .aboutKicker {
  margin: 0 0 var(--sp-2);
  font-family: var(--v2-mono, ui-monospace, monospace);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

#aboutView .aboutHero__text h2 {
  margin: 0 0 var(--sp-2);
  font-family: var(--v2-display, inherit);
  font-size: var(--fs-2xl);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

#aboutView .aboutTagline {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-md);
  color: var(--v2-indigo-text, var(--brand-text, var(--brand)));
}

#aboutView .aboutLead {
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
}

#aboutView .aboutStory {
  margin: 0;
  max-width: 68ch;
  color: var(--muted);
}

#aboutView .aboutStory strong {
  color: var(--ink);
  font-weight: 600;
}

#aboutView .aboutStory em {
  font-style: italic;
}

#aboutView .aboutNeurons {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--v2-line, var(--line));
  border-radius: var(--r-md);
  background:
    radial-gradient(120% 90% at 80% 0%, color-mix(in srgb, var(--v2-indigo, var(--brand)) 38%, transparent), transparent 60%),
    var(--v2-canvas-2, var(--surface));
}

#aboutView .aboutNeurons canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

#aboutView .aboutNeurons__hint {
  position: absolute;
  right: var(--sp-3);
  bottom: var(--sp-2);
  z-index: 1;
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
}

#aboutView .aboutSection h3 {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-lg);
}

#aboutView .aboutSteps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
}

#aboutView .aboutStep {
  padding: var(--sp-4);
  border: 1px solid var(--v2-line, var(--line));
  border-radius: var(--r-md);
  background: var(--v2-paper-3, var(--surface));
}

#aboutView .aboutStep__no {
  font-family: var(--v2-mono, ui-monospace, monospace);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  color: var(--v2-indigo-text, var(--brand-text, var(--brand)));
}

#aboutView .aboutStep h4 {
  margin: var(--sp-2) 0;
  font-size: var(--fs-md);
}

#aboutView .aboutStep p {
  margin: 0;
  color: var(--muted);
}

#aboutView .aboutStats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: var(--sp-3);
}

#aboutView .aboutStat {
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--v2-line, var(--line));
  border-radius: var(--r-md);
  background: var(--v2-paper-3, var(--surface));
}

#aboutView .aboutStat strong {
  display: block;
  font-size: var(--fs-xl);
  line-height: 1.1;
}

#aboutView .aboutStat span {
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

#aboutView .aboutFoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--v2-line, var(--line));
  color: var(--muted);
  font-size: var(--fs-sm);
}

#aboutView .aboutLink {
  color: var(--v2-indigo-text, var(--brand-text, var(--brand)));
}

@media (max-width: 820px) {
  #aboutView {
    gap: var(--sp-4);
  }
  #aboutView .aboutHero {
    grid-template-columns: minmax(0, 1fr);
    padding: var(--sp-4);
  }
  #aboutView .aboutNeurons {
    min-height: 220px;
  }
  #aboutView .aboutSteps {
    grid-template-columns: minmax(0, 1fr);
  }
  #aboutView .aboutHero__text h2 {
    font-size: var(--fs-xl);
  }
  #aboutView .aboutFoot {
    flex-direction: column;
    align-items: flex-start;
  }
}

;
