/* Bilgi Hazinesi — ortak tasarım sistemi
   İlkeler: hız (sistem yazı tipi, bulanıklık/ağır gölge yok), sadelik, okunurluk, akıllı tahta dostu dokunma alanları. */

:root {
  --bg: #f3f6f9;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --line: #d9e1e8;
  --ink: #1d2a35;
  --ink-2: #51606d;
  --accent: #0077b6;         /* marka mavisi (logo) */
  --accent-ink: #ffffff;
  --accent-soft: #e2f0f8;
  --accent-text: #005d8f;    /* renkli zemin üzerindeki vurgulu yazı (WCAG AA kontrast) */
  --warm: #d35400;           /* marka turuncusu (logo) */
  --warm-text: #a84300;
  --star: #d97706;
  --ok: #1f8a4c; --warn: #b45309; --err: #c0392b;
  --radius: 10px; --radius-lg: 14px;
  --focus: 0 0 0 3px rgba(0, 119, 182, .45);
  --hdr: 60px;
  --tap: 44px;               /* asgari dokunma alanı */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #12181d;
  --surface: #1b232a;
  --surface-2: #232d35;
  --line: #2f3b45;
  --ink: #e4e9ee;
  --ink-2: #a5b2bd;
  --accent: #ffa552;         /* eski karanlık temanın turuncu vurgusu */
  --accent-ink: #1b1206;
  --accent-soft: #3a2b1c;
  --accent-text: #ffa552;
  --warm-text: #ffa552;
  --star: #fbbf24;
  --focus: 0 0 0 3px rgba(255, 165, 82, .5);
  color-scheme: dark;
}

/* Akıllı tahta görünümü: büyük ekran + dokunmatik ya da elle açılan "tahta modu" */
@media (pointer: coarse) and (min-width: 1200px) { :root { font-size: 19px; --hdr: 68px; --tap: 52px; } }
:root[data-board="1"] { font-size: 21px; --hdr: 72px; --tap: 56px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink);
  line-height: 1.5; min-height: 100vh; overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.ic { width: 1.1em; height: 1.1em; flex-shrink: 0; vertical-align: -0.15em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
kbd { font: 600 .72em var(--font); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; color: var(--ink-2); background: var(--surface); }
.skip { position: absolute; left: 8px; top: -60px; z-index: 5000; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 8px; }

/* ---------- Üst bar ---------- */
.site-header { position: sticky; top: 0; z-index: 1000; background: var(--surface); border-bottom: 1px solid var(--line); }
.hdr-in { height: var(--hdr); max-width: 1240px; margin: 0 auto; padding: 0 12px; display: flex; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--accent); min-height: var(--tap); padding-right: 6px; }
.brand img { height: 38px; width: auto; display: block; }
.brand-name { font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; white-space: nowrap; }
.hdr-search { flex: 1; display: flex; justify-content: flex-end; min-width: 0; }
.icon-btn {
  width: var(--tap); height: var(--tap); flex-shrink: 0; display: inline-grid; place-items: center;
  border: 1px solid transparent; background: transparent; border-radius: 50%; cursor: pointer; color: var(--ink); font-size: 1.15rem;
}
.icon-btn:hover { background: var(--surface-2); }
.search-trigger {
  display: flex; align-items: center; gap: 10px; min-height: 40px; width: min(340px, 100%);
  padding: 0 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2);
  border-radius: 999px; cursor: pointer; text-align: left;
}
.search-trigger span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-trigger:hover { border-color: var(--accent); }
@media (max-width: 720px) {
  .brand-name { display: none; }
  .search-trigger kbd { display: none; }
}
@media (max-width: 380px) { .brand img { height: 28px; } }

/* ---------- Menü çekmecesi ---------- */
.drawer { position: fixed; inset: 0; z-index: 2000; visibility: hidden; }
.drawer.open { visibility: visible; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(10, 16, 22, .45); opacity: 0; transition: opacity .15s; }
.drawer.open .drawer-scrim { opacity: 1; }
.drawer-panel {
  position: absolute; left: 0; top: 0; bottom: 0; width: min(330px, 88vw); background: var(--surface); z-index: 1;
  border-right: 1px solid var(--line); display: flex; flex-direction: column; transform: translateX(-102%); transition: transform .18s ease-out;
}
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 18px; border-bottom: 1px solid var(--line); }
.drawer-nav { overflow-y: auto; padding: 8px 0 24px; flex: 1; }
.drawer-nav > a, .drawer-cat summary, .drawer-nav .drawer-btn {
  display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 8px 18px; color: var(--ink); text-decoration: none;
  font-weight: 600; cursor: pointer; list-style: none; width: 100%; border: 0; background: none; text-align: left;
}
.drawer-nav > a:hover, .drawer-cat summary:hover, .drawer-nav .drawer-btn:hover { background: var(--surface-2); }
.drawer-nav > a[aria-current="page"] { color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.drawer-cat summary::-webkit-details-marker { display: none; }
.drawer-cat summary span { flex: 1; }
.drawer-cat summary small { color: var(--ink-2); font-weight: 600; }
.drawer-cat .chev { transition: transform .15s; }
.drawer-cat[open] .chev { transform: rotate(180deg); }
.drawer-cat > div a { display: block; padding: 9px 18px 9px 48px; color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.drawer-cat > div a:hover { color: var(--accent); background: var(--surface-2); }
.drawer-sep { height: 1px; background: var(--line); margin: 10px 0; }

/* ---------- Yerleşim ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
main { padding-bottom: 48px; min-height: calc(100vh - var(--hdr)); }  /* altbilgi ilk ekranda zıplamasın (CLS) */
.section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.section-head h2 { font-size: 1.12rem; margin: 0; font-weight: 750; }
.section-head .link-btn { font-size: .9rem; }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 6px 4px; font-weight: 600; min-height: 36px; }
.muted { color: var(--ink-2); }

/* ---------- Ana sayfa arama ---------- */
.hero { padding-top: 26px; padding-bottom: 4px; }   /* yan boşluk .wrap'tan gelir */
.hero h1 { font-size: clamp(1.35rem, 2.6vw, 1.85rem); margin: 0 0 14px; letter-spacing: -.015em; font-weight: 800; }
.big-search { position: relative; max-width: 760px; }
.big-search .ic-s { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-2); font-size: 1.2rem; pointer-events: none; }
.big-search input {
  width: 100%; height: 56px; padding: 0 92px 0 48px; font: 500 1.08rem var(--font); color: var(--ink);
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-lg); -webkit-appearance: none; appearance: none;
}
.big-search input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.big-search input::placeholder { color: var(--ink-2); opacity: .85; }
.big-search input::-webkit-search-cancel-button { display: none; }
.big-search .s-right { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 4px; }
:root[data-board="1"] .big-search input { height: 66px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--spine, var(--accent)); }

/* ---------- İçerik satırları ---------- */
.rows { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.rows > li + li { border-top: 1px solid var(--line); }
.row { display: flex; align-items: stretch; }
.row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 6px 10px 14px; min-height: var(--tap); color: var(--ink); text-decoration: none; }
.row-main:hover { background: var(--surface-2); }
.row-main:hover .row-t { color: var(--accent); }
.row-ic { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--spine, var(--accent)); flex-shrink: 0; font-size: 1.05rem; }
.row-txt { min-width: 0; display: flex; flex-direction: column; }
.row-t { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-m { font-size: .84rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-m .tag { color: var(--ink-2); }
.fav-btn { width: var(--tap); flex-shrink: 0; border: 0; background: none; cursor: pointer; color: var(--ink-2); display: grid; place-items: center; font-size: 1.1rem; }
.fav-btn:hover { color: var(--star); background: var(--surface-2); }
.fav-btn[aria-pressed="true"] { color: var(--star); }
mark { background: rgba(0, 119, 182, .16); color: inherit; border-radius: 3px; padding: 0 1px; }
[data-theme="dark"] mark { background: rgba(255, 165, 82, .25); }

/* Yatay "son açılanlar / favoriler" kartları */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tile {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 58px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); position: relative; overflow: hidden;
}
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--spine, var(--accent)); }
.tile:hover { border-color: var(--spine, var(--accent)); }
.tile .row-txt { flex: 1; min-width: 0; }
.tile .row-t { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }

/* ---------- Ders rafları (kategoriler) — ders kitabı sırtı ---------- */
.shelves { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; align-items: start; }
.shelf { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; position: relative; }
.shelf::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--spine); }
.shelf-head {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px 16px 16px 22px; min-height: 76px;
  border: 0; background: none; cursor: pointer; text-align: left;
}
.shelf-head:hover { background: var(--surface-2); }
.shelf-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; color: #fff; background: var(--spine); flex-shrink: 0; }
.shelf-name { font-size: 1.08rem; font-weight: 750; display: block; }
.shelf-count { font-size: .86rem; color: var(--ink-2); }
.shelf-head .chev { margin-left: auto; color: var(--ink-2); transition: transform .15s; }
.shelf.open .shelf-head .chev { transform: rotate(180deg); }
.shelf-body { border-top: 1px solid var(--line); }
.shelf-body .rows { border: 0; border-radius: 0; }
.shelf.open { border-color: var(--spine); }
.shelf-body .row-t { white-space: normal; }       /* dar sütunda başlıklar alt satıra kayabilsin */
.shelf-body .row-main { padding-left: 18px; }
@media (max-width: 720px) {
  .shelves { grid-template-columns: 1fr; gap: 10px; }
  .shelf-head { min-height: 64px; padding: 12px 12px 12px 18px; }
}

/* ---------- İskelet (yükleniyor) ---------- */
.skel { background: linear-gradient(90deg, var(--surface-2) 0, var(--line) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: skel 1.3s linear infinite; border-radius: 8px; }
@keyframes skel { to { background-position: -200% 0; } }
.skel-shelf { height: 78px; border-radius: var(--radius-lg); }

/* ---------- Boş durum / hata kutusu ---------- */
.notice { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; text-align: center; color: var(--ink-2); }
.notice h3 { color: var(--ink); margin: 6px 0; font-size: 1.05rem; }
.notice .ic { font-size: 1.8rem; color: var(--ink-2); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 8px 18px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 650; cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-danger { background: var(--err); color: #fff; border-color: var(--err); }

/* ---------- Bildirimler ---------- */
.toasts { position: fixed; z-index: 20000; left: 50%; transform: translateX(-50%); bottom: 18px; display: flex; flex-direction: column; gap: 8px; width: min(520px, calc(100vw - 24px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 16px; border-radius: var(--radius);
  background: #1f2a33; color: #f2f5f8; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); font-size: .95rem;
}
.toast span { flex: 1; }
.toast-ok { background: #1c5e3a; } .toast-warn { background: #7a3d0b; } .toast-err { background: #8a2a20; }
.toast-btn { border: 0; background: rgba(255, 255, 255, .16); color: #fff; padding: 6px 12px; border-radius: 8px; font-weight: 700; cursor: pointer; min-height: 36px; }
.toast-x { border: 0; background: none; color: #fff; opacity: .8; cursor: pointer; width: 36px; height: 36px; }
.netbar {
  position: fixed; z-index: 3500; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 16px; background: #fff4e5; color: #6b3a07; border-top: 1px solid #f3cf9f; font-size: .92rem; text-align: center;
}
[data-theme="dark"] .netbar { background: #3a2a15; color: #ffd9a8; border-color: #5b4020; }

/* ---------- Hızlı arama penceresi ---------- */
.palette { position: fixed; inset: 0; z-index: 19000; display: none; }
.palette.open { display: block; }
.palette-scrim { position: absolute; inset: 0; background: rgba(10, 16, 22, .5); }
.palette-box {
  position: relative; margin: 8vh auto 0; width: min(680px, calc(100vw - 20px)); max-height: 78vh; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 18px 50px rgba(0, 0, 0, .25); overflow: hidden;
}
.palette-in { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); font-size: 1.1rem; color: var(--ink-2); }
.palette-in input { flex: 1; border: 0; background: none; font: 500 1.08rem var(--font); color: var(--ink); min-height: 48px; outline: none; }
.palette-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.palette-list a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.palette-list li[aria-selected="true"] a, .palette-list a:hover { background: var(--accent-soft); }
.pal-ic { grid-row: 1 / 3; align-self: center; color: var(--spine); font-size: 1.1rem; }
.pal-t { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-k { font-size: .82rem; color: var(--ink-2); }
.pal-empty { padding: 18px; color: var(--ink-2); text-align: center; }
.palette-foot { display: flex; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--ink-2); }
@media (max-width: 720px) { .palette-box { margin-top: 0; max-height: 100vh; height: 100%; border-radius: 0; width: 100%; } .palette-foot { display: none; } }

/* ---------- Altbilgi ---------- */
.site-footer { padding: 28px 16px 40px; text-align: center; color: var(--ink-2); font-size: .88rem; }
.site-footer a { color: inherit; }

/* ---------- Blog ---------- */
.page-title { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin: 28px 0 4px; font-weight: 800; letter-spacing: -.02em; }
.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; }
@media (max-width: 960px) { .blog-layout { grid-template-columns: 1fr; } .blog-aside { order: 2; } }
.post-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; margin-bottom: 14px; color: var(--ink); text-decoration: none; }
.post-card:hover { border-color: var(--warm); }
.post-meta { font-size: .85rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.post-card h2 { font-size: 1.3rem; margin: 6px 0 8px; line-height: 1.3; }
.post-card p { margin: 0; color: var(--ink-2); line-height: 1.65; font-family: var(--serif); }
.post-more { display: inline-flex; gap: 6px; align-items: center; margin-top: 10px; color: var(--warm-text); font-weight: 700; font-size: .92rem; }
[data-theme="dark"] .post-more { color: var(--accent); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: .78rem; }
.aside-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 0; position: sticky; top: calc(var(--hdr) + 16px); max-height: calc(100vh - var(--hdr) - 32px); overflow: auto; }
.aside-box h3 { font-size: .95rem; margin: 0 16px 8px; }
.aside-box a { display: block; padding: 8px 16px; text-decoration: none; color: var(--ink); font-size: .92rem; }
.aside-box a small { display: block; color: var(--ink-2); }
.aside-box a:hover, .aside-box a[aria-current="page"] { background: var(--surface-2); color: var(--accent-text); }
.aside-box a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); }
.filter-in { width: 100%; min-height: var(--tap); padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; margin: 12px 0 16px; }
.filter-in:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }

/* Blog yazısı (okuma alanı) */
.article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 5vw, 52px); margin-top: 24px; }
.article-head { text-align: center; padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.article-head h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.2; margin: 12px 0 10px; letter-spacing: -.02em; }
.article-body { font-family: var(--serif); font-size: 1.14rem; line-height: 1.85; max-width: 70ch; margin: 0 auto; overflow-wrap: anywhere; }
.article-body img, .article-body video, .article-body iframe { max-width: 100%; border-radius: 10px; }
.article-body table { max-width: 100%; display: block; overflow-x: auto; }
.article-body h2, .article-body h3 { font-family: var(--font); line-height: 1.3; }
.article-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
[data-theme="dark"] .article-body { color: var(--ink); }

/* ---------- 404 ---------- */
.nf { text-align: center; padding: 48px 16px; max-width: 640px; margin: 0 auto; }
.nf-code::before { content: "404"; }   /* süs: metin olarak okunmaz */
.nf-code { font-size: clamp(4rem, 14vw, 7rem); font-weight: 900; color: var(--accent); opacity: .22; line-height: 1; }
.nf h1 { margin: 6px 0 4px; }
.nf .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

/* ---------- Hareket azaltma ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Yazdırma ---------- */
@media print {
  .site-header, .drawer, .toasts, .netbar, .fav-btn, .blog-aside, .article-foot, .hero, .site-footer { display: none !important; }
  body { background: #fff; color: #000; }
  .article { border: 0; padding: 0; }
}
.drawer-btn[aria-pressed="true"] { color: var(--accent); }
.drawer-btn[aria-pressed="true"]::after { content: "Açık"; margin-left: auto; font-size: .78rem; background: var(--accent-soft); color: var(--accent); padding: 2px 8px; border-radius: 999px; }
.site-header { min-height: var(--hdr); }
@media (max-width: 720px), (pointer: coarse) { #q-kbd { display: none; } }

/* ---------- İçerik görüntüleyici (view.html) ---------- */
body.viewer { margin: 0; height: 100vh; height: 100dvh; overflow: hidden; background: #f8fafc; }
body.viewer iframe#content-frame { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.v-loader { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: var(--bg); color: var(--ink); padding: 24px; text-align: center; }
.v-loader.gone { display: none; }
.v-loader-box { max-width: 520px; }
.v-spin { width: 42px; height: 42px; margin: 0 auto 16px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); animation: vspin .9s linear infinite; }
@keyframes vspin { to { transform: rotate(360deg); } }
.v-loader-title { font-size: 1.25rem; font-weight: 750; }
.v-loader-sub { color: var(--ink-2); margin-top: 6px; min-height: 1.5em; }
.v-loader-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.v-loader.state-msg .v-spin { display: none; }

.vbar { position: fixed; left: 16px; bottom: 16px; z-index: 10000; display: flex; align-items: center; gap: 8px; }
.vbtn {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; text-decoration: none;
  background: #fff; color: #333; border: 1px solid #c9d1d8; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); font-size: 1.35rem;
}
.vbtn:hover { color: #0077b6; border-color: #0077b6; }
.vbtn[aria-pressed="true"] { color: #d97706; }
.vbtn:focus-visible { box-shadow: 0 0 0 3px rgba(0, 119, 182, .5); }
#v-more { width: 40px; height: 40px; font-size: 1.1rem; }
.vtools { display: flex; gap: 8px; padding: 6px; border-radius: 999px; background: rgba(255, 255, 255, .96); border: 1px solid #d7dde3; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); }
.vtools .vbtn { box-shadow: none; }
.vinfo {
  position: absolute; left: 0; bottom: 64px; width: min(380px, calc(100vw - 32px)); background: #fff; color: #1d2a35; border: 1px solid #d7dde3;
  border-radius: 12px; padding: 14px 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); font-size: .95rem;
}
.vinfo h2 { font-size: 1.05rem; margin: 0 0 6px; }
.vinfo dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0; }
.vinfo dt { color: #51606d; } .vinfo dd { margin: 0; overflow-wrap: anywhere; }
.vinfo .kbd-help { color: #51606d; font-size: .85rem; border-top: 1px solid #e3e8ec; padding-top: 8px; margin-top: 8px; }
.vshow { position: fixed; left: 0; bottom: 0; z-index: 10000; width: 34px; height: 34px; border: 0; border-top-right-radius: 12px; background: rgba(0, 0, 0, .18); color: #fff; cursor: pointer; opacity: .55; display: grid; place-items: center; }
.vshow:hover, .vshow:focus-visible { opacity: 1; background: rgba(0, 0, 0, .55); }
:root[data-board="1"] .vbtn, :root[data-board="1"] #v-more { width: 64px; height: 64px; font-size: 1.6rem; }
@media (max-width: 520px) { .vbar { left: 10px; bottom: 10px; gap: 6px; } .vtools { flex-wrap: wrap; border-radius: 18px; max-width: calc(100vw - 120px); } .vbtn { width: 46px; height: 46px; } }
@media print { .vbar, .vshow, .v-loader { display: none !important; } }

/* Ders kısayol çipleri yalnızca dar ekranda (raflar alt alta uzadığında) gösterilir */
@media (min-width: 721px) { #cat-chips { display: none; } }
@media (max-width: 720px) {
  #cat-chips { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; scrollbar-width: none; }
  #cat-chips::-webkit-scrollbar { display: none; }
  #cat-chips .chip { flex-shrink: 0; }
}

/* Büyük ekran / akıllı tahta: genişliği kullan */
@media (min-width: 1600px) {
  .wrap, .hdr-in { max-width: 1680px; }
  .shelves { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
}

/* ---------- Programlarım ---------- */
.pg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pg-grid-full { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); align-items: start; }
.pg-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; scroll-margin-top: calc(var(--hdr) + 16px); }
.pg-card.pg-hl { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pg-head { display: flex; gap: 14px; align-items: center; }
.pg-ic { width: 56px; height: 56px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 1.9rem; flex-shrink: 0; overflow: hidden; }
.pg-ic img { width: 100%; height: 100%; object-fit: cover; }
.pg-title { min-width: 0; }
.pg-title h3 { margin: 0; font-size: 1.15rem; line-height: 1.25; }
.pg-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; color: var(--ink-2); font-size: .84rem; margin-top: 4px; }
.pg-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.pg-desc { margin: 0; color: var(--ink-2); line-height: 1.55; }
.pg-compact .pg-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pg-plats { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-plats span { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; font-weight: 600; color: var(--ink-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; }
.pg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.pg-dl small { font-weight: 600; }
.pg-more { border-top: 1px solid var(--line); padding-top: 8px; }
.pg-more summary { cursor: pointer; font-weight: 650; color: var(--ink); padding: 4px 0; }
.pg-more ul { list-style: none; margin: 6px 0 0; padding: 0; }
.pg-more li { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 6px 0; font-size: .92rem; }
.pg-more li a { color: var(--accent-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.pg-more li small { color: var(--ink-2); flex-shrink: 0; }
.pg-note { margin: 6px 0 0; color: var(--ink-2); font-size: .93rem; line-height: 1.55; }

/* ---------- Duyuru bandı ---------- */
.duyuru-bandi { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.duyuru { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: var(--radius); padding: 8px 6px 8px 14px; }
.duyuru-onemli { border-left-color: var(--err); background: #fdf1ef; }
.duyuru-etkinlik { border-left-color: var(--ok); }
[data-theme="dark"] .duyuru-onemli { background: #33201d; }
.duyuru-ic { font-size: 1.25rem; color: var(--accent); flex-shrink: 0; display: grid; }
.duyuru-onemli .duyuru-ic { color: var(--err); } .duyuru-etkinlik .duyuru-ic { color: var(--ok); }
.duyuru-txt { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 2px 10px; line-height: 1.45; }
.duyuru-txt strong { color: var(--ink); }
.duyuru-txt span { color: var(--ink-2); }
.duyuru-btn { min-height: 36px; padding: 4px 12px; font-size: .9rem; flex-shrink: 0; }
.duyuru-x { width: 36px; height: 36px; font-size: .9rem; color: var(--ink-2); }
@media (max-width: 720px) {
  .duyuru { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; column-gap: 10px; row-gap: 8px; }
  .duyuru-ic { grid-column: 1; grid-row: 1; padding-top: 2px; }
  .duyuru-txt { grid-column: 2; grid-row: 1; display: block; }
  .duyuru-txt strong { display: block; }
  .duyuru-x { grid-column: 3; grid-row: 1; margin-top: -4px; }
  .duyuru-btn { grid-column: 2; grid-row: 2; justify-self: start; }
}
@media print { .duyuru-bandi { display: none !important; } }
