/* ===========================================================
   BENGİ KÜLTÜR: Blok editör + yazı içi ses (Eser Sistemi 2.0)

   Yazma paneli Notion/Medium mantığında: yazı alt alta bloklardan
   oluşuyor. Satır başında "+" ile blok ekleniyor. Kütüphane/kraft
   diline sadık: kağıt yüzeyi, mürekkep vurgusu, plak hissi veren
   ses oynatıcı.
   =========================================================== */

/* ---------- Editör kabuğu ---------- */
.blok-editor {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
}
.blok-editor.odak-modu .blok:not(.aktif) { opacity: .35; transition: opacity .3s var(--egri); }

/* Üst araç çubuğu: başlık, tür, kaydet durumu */
.editor-ust {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin-bottom: 18px; padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
.editor-ust .editor-baslik-girdi {
    flex: 1; min-width: 200px; border: none; background: transparent;
    font-family: var(--font-display); font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 700; color: var(--navy); outline: none; padding: 4px 0;
}
.editor-durum {
    font-family: var(--font-ui); font-size: 12.5px; color: var(--ink-soft);
    display: flex; align-items: center; gap: 5px;
}
.editor-durum.kaydediliyor::before { content: "○"; }
.editor-durum.kaydedildi::before { content: "✓"; color: var(--ok-tx); }

.editor-ust-satir { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; width: 100%; }
.editor-arac-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px;
    background: transparent; color: var(--ink-soft); cursor: pointer;
    font-family: var(--font-ui); font-size: 13px; font-weight: 600;
}
@media (hover: hover) { .editor-arac-btn:hover { background: var(--blue-50); color: var(--ink); } }
.editor-arac-btn .ikon { width: 16px; height: 16px; }
.editor-okuma-suresi { font-family: var(--font-ui); font-size: 12.5px; color: var(--ink-soft); margin-left: auto; }

/* ---------- Blok ---------- */
.blok {
    position: relative;
    margin: 2px 0;
    padding: 2px 0 2px 34px;   /* solda "+" için yer */
}
.blok-tut {
    position: absolute; left: 0; top: 0;
    display: flex; gap: 2px; opacity: .35; transition: opacity .15s;
}
.blok:hover .blok-tut, .blok.aktif .blok-tut { opacity: 1; }
/* "+" düğmesi her zaman hafif görünür, dokunmatik cihazda tam görünür */
@media (pointer: coarse) { .blok-tut { opacity: .6; } }
.blok-tut button {
    width: 28px; height: 28px; border: 1px solid var(--line); background: var(--white); cursor: pointer;
    color: var(--kiremit); border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0;
    box-shadow: 0 1px 3px rgba(47,52,36,.12);
}
.blok-tut button[data-sil] { color: var(--ink-soft); border-radius: 6px; }
@media (hover: hover) { .blok-tut button:hover { background: var(--kiremit); color: #fff; border-color: var(--kiremit); } }
@media (hover: hover) { .blok-tut button[data-sil]:hover { background: var(--err-bg); color: var(--err-tx); border-color: var(--err-tx); } }
.blok-tut .ikon { width: 18px; height: 18px; }

/* Metin blokları (contenteditable) */
.blok-icerik {
    outline: none;
    font-family: var(--font-body); font-size: 1.06rem; line-height: 1.7;
    color: var(--ink); min-height: 1.7em;
    overflow-wrap: anywhere;
}
.blok-icerik:empty::before {
    content: attr(data-placeholder);
    color: var(--ink-soft); opacity: .6; pointer-events: none;
}
.blok[data-tur="baslik"] .blok-icerik {
    font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--navy);
}
.blok[data-tur="alinti"] {
    border-left: 3px solid var(--kiremit); padding-left: 16px; margin-left: 34px;
}
.blok[data-tur="alinti"] .blok-icerik { font-style: italic; color: var(--ink-soft); }
.blok-alinti-kaynak {
    border: none; background: none; outline: none; margin-top: 4px;
    font-family: var(--font-ui); font-size: 13px; color: var(--ink-soft); width: 100%;
}
.blok-alinti-kaynak::before { content: "— "; }
.blok[data-tur="cekici"] .blok-icerik { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.35; font-style: italic; color: var(--kiremit); }
.blok[data-tur="kutu"] { background: var(--kraft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.blok-kutu-baslik {
    display: block; width: 100%; border: none; background: none; outline: none; margin: 0 0 4px; padding: 0;
    font-family: var(--font-ui); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--kiremit);
}
.blok[data-tur="kod"] .blok-icerik {
    font-family: var(--font-daktilo); font-size: .92rem; background: var(--kraft);
    border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; white-space: pre-wrap;
}

/* Ayraç bloğu */
.blok[data-tur="ayrac"] .blok-icerik {
    text-align: center; color: var(--kiremit); font-size: 1.4rem; letter-spacing: .4em; user-select: none;
}

/* ---------- Görsel / ses blokları (editörde) ---------- */
.blok-medya {
    border: 1px dashed var(--line); border-radius: 12px; padding: 14px;
    background: var(--kraft);
}
.blok-medya img { max-width: 100%; border-radius: 8px; display: block; margin: 0 auto; }
.blok-medya .medya-aciklama {
    width: 100%; border: none; background: none; outline: none; text-align: center;
    font-family: var(--font-ui); font-size: 13px; color: var(--ink-soft); margin-top: 8px;
}
.blok-medya .medya-alt { font-size: 12px; opacity: .85; margin-top: 2px; }
.medya-yerlesim { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; margin-top: 8px; font-family: var(--font-ui); font-size: 13px; }
.medya-yerlesim select { font: inherit; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper, #fff); color: inherit; min-height: 32px; }
.medya-yer-not { font-size: 12px; color: var(--ink-soft); }
.medya-yer-uyari { color: var(--err-tx, #a3471e); font-weight: 600; }
.blok-medya .medya-sil {
    float: right; border: none; background: none; cursor: pointer; color: var(--err-tx);
    font-family: var(--font-ui); font-size: 12px; font-weight: 600;
}

/* ---------- "+" ekleme menüsü ---------- */
.blok-ekle-menu {
    position: absolute; z-index: 200; width: 280px; max-width: calc(100vw - 24px);
    background: var(--white); border: 1px solid var(--line); border-radius: 14px;
    box-shadow: var(--shadow-lift); padding: 8px; max-height: 60vh; overflow-y: auto;
    animation: blokMenuGir .16s var(--egri);
}
@keyframes blokMenuGir { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.blok-ekle-menu-baslik {
    font-family: var(--font-ui); font-size: 11px; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--ink-soft); padding: 8px 10px 4px;
}
.blok-ekle-menu button {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 10px 12px; border: none; background: none; border-radius: 8px; cursor: pointer;
    font-family: var(--font-ui); font-size: 14px; color: var(--ink); text-align: left;
}
.blok-ekle-menu button .ikon { width: 20px; height: 20px; color: var(--kiremit); flex: 0 0 auto; }
.blok-ekle-menu button { border-radius: 10px; }
.blok-ekle-menu button small { display: block; color: var(--ink-soft); font-size: 12px; font-weight: 400; }
@media (hover: hover) { .blok-ekle-menu button:hover { background: var(--blue-50); } }
.blok-ekle-menu button.aktif { background: var(--blue-50); }

/* ---------- SES OYNATICI (hem editör hem okuma) ----------
   Kraft kağıt üstünde plak/kaset hissi. Çalarken mürekkep renginde
   ses dalgası oynuyor. Sitenin geri kalanının dilinde. */
.eser-blok-ses, .blok-ses-onizleme {
    margin: 20px 0;
}
.ses-kutu {
    display: flex; align-items: center; gap: 14px;
    background:
        linear-gradient(135deg, var(--kraft), var(--adaci-50)),
        repeating-linear-gradient(90deg, transparent 0 4px, rgba(38,42,29,.015) 4px 5px);
    border: 1px solid var(--line); border-radius: 14px;
    padding: 14px 18px;
    position: relative; overflow: hidden;
}
.ses-kutu::before {
    /* plak deliği hissi */
    content: ""; position: absolute; right: -30px; top: 50%; transform: translateY(-50%);
    width: 90px; height: 90px; border-radius: 50%;
    border: 8px solid rgba(38,42,29,.05); opacity: .6;
}
.ses-oynat {
    flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%;
    border: none; background: var(--kiremit); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(160,82,47,.35);
    transition: transform .12s var(--egri);
}
.ses-oynat:active { transform: scale(.92); }
.ses-oynat svg { width: 22px; height: 22px; }
.ses-orta { flex: 1; min-width: 0; }
.ses-baslik {
    font-family: var(--font-ui); font-weight: 700; font-size: 14px; color: var(--ink);
    margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Ses dalgası: 12 çubuk, çalarken dalgalanıyor */
.ses-dalga { display: flex; align-items: center; gap: 3px; height: 22px; }
.ses-dalga span {
    flex: 1; max-width: 4px; background: var(--kiremit); border-radius: 2px;
    height: 30%; opacity: .5; transform-origin: center;
}
.ses-kutu.calliyor .ses-dalga span { animation: sesDalga 1s ease-in-out infinite; opacity: .85; }
.ses-dalga span:nth-child(1){animation-delay:0s} .ses-dalga span:nth-child(2){animation-delay:.1s}
.ses-dalga span:nth-child(3){animation-delay:.2s} .ses-dalga span:nth-child(4){animation-delay:.3s}
.ses-dalga span:nth-child(5){animation-delay:.4s} .ses-dalga span:nth-child(6){animation-delay:.5s}
.ses-dalga span:nth-child(7){animation-delay:.6s} .ses-dalga span:nth-child(8){animation-delay:.5s}
.ses-dalga span:nth-child(9){animation-delay:.4s} .ses-dalga span:nth-child(10){animation-delay:.3s}
.ses-dalga span:nth-child(11){animation-delay:.2s} .ses-dalga span:nth-child(12){animation-delay:.1s}
@keyframes sesDalga { 0%,100%{ transform: scaleY(.4); } 50%{ transform: scaleY(1.6); } }
.ses-ilerleme {
    height: 4px; background: rgba(38,42,29,.12); border-radius: 2px; margin-top: 8px; cursor: pointer;
    display: none;
}
.ses-kutu.calliyor .ses-ilerleme, .ses-kutu.oynatildi .ses-ilerleme { display: block; }
.ses-kutu.calliyor .ses-dalga, .ses-kutu.oynatildi .ses-dalga { display: none; }
.ses-ilerleme-dolgu { height: 100%; width: 0; background: var(--kiremit); border-radius: 2px; }
.ses-sure { flex: 0 0 auto; font-family: var(--font-daktilo); font-size: 12.5px; color: var(--ink-soft); z-index: 1; }
.eser-blok-ses figcaption, .blok-ses-onizleme figcaption {
    margin-top: 8px; text-align: center; font-family: var(--font-ui); font-size: 13px; color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
    .ses-kutu.calliyor .ses-dalga span { animation: none; }
}

/* ---------- Okuma tarafı blok stilleri ---------- */
.eser-blok-baslik { font-family: var(--font-display); font-size: 1.5rem; color: var(--navy); margin: 1.6em 0 .5em; }
.eser-blok-alinti {
    margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--kiremit);
    font-style: italic; color: var(--ink-soft);
}
.eser-blok-alinti cite { display: block; margin-top: 6px; font-size: .88em; font-style: normal; font-family: var(--font-ui); }
.eser-blok-cekici {
    margin: 1.4em 0; padding: .6em 0; border-top: 2px solid var(--kiremit); border-bottom: 1px solid var(--line);
    font-family: var(--font-display); font-size: 1.45em; line-height: 1.3; font-style: italic; color: var(--kiremit); text-wrap: balance;
}
.eser-blok-kutu { margin: 1.4em 0; padding: 14px 16px; background: var(--kraft); border-radius: 12px; border: 1px solid var(--line); font-size: .95em; }
.eser-blok-kutu p { margin: 0; }
.eser-blok-kutu-baslik { display: block; margin-bottom: 6px; font-family: var(--font-ui); font-size: .72em; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--kiremit); }
.eser-blok-liste { margin: 1em 0; padding-left: 1.4em; }
.eser-blok-liste li { margin-bottom: .4em; }
.eser-blok-kod {
    background: var(--kraft); border: 1px solid var(--line); border-radius: 8px;
    padding: 14px 16px; overflow-x: auto; font-family: var(--font-daktilo); font-size: .92rem;
}
.eser-blok-ayrac { text-align: center; color: var(--kiremit); font-size: 1.6rem; margin: 2em 0; letter-spacing: .3em; }
.eser-blok-gorsel { margin: 1.6em 0; }
.eser-blok-gorsel img { width: 100%; height: auto; border-radius: 10px; display: block; }
/* Yazarın seçtiği yer: geniş yerleşimler okuma sütunundan taşar, kenardaki metnin yanından akar */
.eser-blok-gorsel.gorsel-yer-yarim, .eser-blok-gorsel.gorsel-yer-tam, .eser-blok-gorsel.gorsel-yer-cift {
    width: min(calc(100vw - 32px), 56rem); margin-left: 50%; transform: translateX(-50%);
}
.eser-blok-gorsel.gorsel-yer-yan { float: right; width: min(42%, 16rem); margin: .3em 0 1em 1.4em; }
.eser-blok-gorsel.gorsel-yer-yan figcaption { text-align: left; }
@media (max-width: 560px) { .eser-blok-gorsel.gorsel-yer-yan { float: none; width: auto; margin: 1.6em 0; } }
.eser-blok-gorsel figcaption { text-align: center; font-family: var(--font-ui); font-size: 13px; color: var(--ink-soft); margin-top: 8px; }

/* ---------- Yayın çubuğu (kaydet/taslak/yayınla) ---------- */
.editor-yayin-cubuk {
    position: sticky; bottom: 0; z-index: 60;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--white); border-top: 1px solid var(--line);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    margin: 24px -16px 0;
}
.editor-yayin-cubuk .editor-gorunurluk { margin-right: auto; }
.editor-yayin-cubuk select { width: auto; padding: 8px 12px; }

@media (max-width: 600px) {
    .blok { padding-left: 30px; }
    .blok[data-tur="alinti"] { margin-left: 30px; }
    .blok-icerik { font-size: 1.02rem; }
}

/* Odak modu düğmesi aktifken */
.editor-arac-btn.aktif { background: var(--navy); color: var(--sayfa); border-color: var(--navy); }

/* ===========================================================
   PDF OKUYUCU (Eser Sistemi 2.0)
   PDF.js ile canvas'a çizilen kitap okuyucu. iframe yerine, her
   cihazda aynı çalışır. Kütüphane/kraft temasında.
   =========================================================== */
.pdf-okuyucu {
    border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
    background: var(--kraft); margin-bottom: 24px;
}
.pdf-sahne {
    position: relative; min-height: 360px;
    padding: 12px; overflow-y: auto; overflow-x: hidden;
    background: var(--zeytin-800, #333827);
    max-height: 82vh; max-height: 82dvh;
}
.pdf-akis { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pdf-sayfa {
    background: #fff; border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,.3), 0 18px 40px -20px rgba(0,0,0,.6);
    min-height: 200px; display: flex; align-items: center; justify-content: center;
}
.pdf-sayfa.pdf-sayfa-bos::after {
    content: "…"; color: var(--ink-soft); font-size: 24px;
}
.pdf-sayfa canvas { display: block; max-width: 100%; }
.pdf-tuval {
    display: block; max-width: 100%; height: auto;
    box-shadow: 0 2px 8px rgba(47,52,36,.15), 0 18px 40px -20px rgba(47,52,36,.5);
    border-radius: 2px; background: #fff;
}
.pdf-yukleniyor {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-family: var(--font-ui); font-size: 14px; color: var(--ink-soft);
}
.pdf-yukleniyor[hidden] { display: none; }
.pdf-kontrol {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--navy); color: var(--sayfa);
    font-family: var(--font-ui);
}
.pdf-btn {
    min-width: 38px; height: 38px; padding: 0 12px;
    border: 1px solid rgba(255,255,255,.25); border-radius: 8px;
    background: rgba(255,255,255,.1); color: var(--sayfa); cursor: pointer;
    font-size: 18px; line-height: 1;
}
@media (hover: hover) { .pdf-btn:hover:not(:disabled) { background: rgba(255,255,255,.22); } }
.pdf-btn:disabled { opacity: .35; cursor: default; }
.pdf-sayfa-no { font-size: 13.5px; min-width: 72px; text-align: center; font-family: var(--font-daktilo); }
.pdf-ayirac { width: 1px; height: 22px; background: rgba(255,255,255,.2); margin: 0 4px; }

@media (max-width: 600px) {
    .pdf-sahne { padding: 6px; max-height: 72dvh; }
    .pdf-kontrol { gap: 6px; }
}

/* Eser detay kapağı (yazı/şarkı türlerinde) */
.eser-detay-kapak {
    width: 100%; max-height: 420px; object-fit: cover;
    border-radius: var(--radius); margin-bottom: 24px;
}

/* PDF tam ekran modu */
.pdf-okuyucu.pdf-tam-ekran {
    background: var(--navy);
    display: flex; flex-direction: column;
    border-radius: 0;
}
.pdf-okuyucu.pdf-tam-ekran .pdf-sahne {
    flex: 1; max-height: none; height: auto;
}
.pdf-okuyucu:fullscreen { width: 100vw; height: 100vh; }
.pdf-okuyucu:fullscreen .pdf-sahne { max-height: none; flex: 1; }
.pdf-okuyucu:-webkit-full-screen { width: 100vw; height: 100vh; }

/* Medya yükleme göstergesi (net yüzde barı) */
.medya-yuk-bar {
    position: relative; height: 28px; border-radius: 8px; overflow: hidden;
    background: var(--blue-50); margin-bottom: 10px;
    display: flex; align-items: center;
}
.medya-yuk-dolgu {
    position: absolute; left: 0; top: 0; bottom: 0; width: 0;
    background: var(--kiremit); opacity: .25; transition: width .2s var(--egri);
}
.medya-yuk-yazi {
    position: relative; z-index: 1; padding: 0 12px;
    font-family: var(--font-ui); font-size: 13px; font-weight: 600; color: var(--ink);
}

/* Video blokları (editör + okuma): YouTube gömme + yüklenen video */
.eser-blok-video, .blok-medya .video-sarmal { margin: 1.4em 0; }
.video-sarmal {
    position: relative; width: 100%; padding-bottom: 56.25%; /* 16:9 */
    border-radius: 12px; overflow: hidden; background: #000;
}
.video-sarmal iframe {
    position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.video-oynatici {
    width: 100%; max-height: 70vh; border-radius: 12px; background: #000; display: block;
}
.eser-blok-video figcaption {
    text-align: center; font-family: var(--font-ui); font-size: 13px;
    color: var(--ink-soft); margin-top: 8px;
}
.blok-medya .video-sarmal { margin: 0 0 8px; }

/* Şiir bloğu (editör + okuma): boşluklar ve satırlar korunur */
.blok[data-tur="siir"] .blok-icerik {
    white-space: pre-wrap;
    font-family: var(--font-body);
    font-size: 1.1rem; line-height: 1.9;
    font-style: italic;
}
.blok-icerik.siir-ic-orta { text-align: center; }
.siir-hiza-bar {
    display: flex; gap: 4px; margin: 6px 0 0 34px;
}
.siir-hiza-bar button {
    border: 1px solid var(--line); background: transparent; cursor: pointer;
    font-family: var(--font-ui); font-size: 12px; padding: 3px 10px; border-radius: 6px;
    color: var(--ink-soft);
}
.siir-hiza-bar button.aktif { background: var(--navy); color: var(--sayfa); border-color: var(--navy); }

/* Okuma tarafı şiir */
.eser-blok-siir {
    white-space: pre-wrap;
    font-family: var(--font-body); font-size: 1.15rem; line-height: 2;
    margin: 1.6em 0; font-style: italic; color: var(--ink);
}
.eser-blok-siir.siir-orta { text-align: center; }

@media (max-width: 600px) {
    .siir-hiza-bar { margin-left: 30px; }
    .eser-blok-siir { font-size: 1.05rem; }
}

/* Oynat/duraklat ikonu: SVG'de "hidden" özelliği her tarayıcıda
   işlemiyor, ikisi birden görünüyordu. Görünürlüğü sınıf belirliyor. */
.ses-oynat .ses-ikon-pause { display: none; }
.ses-kutu.calliyor .ses-oynat .ses-ikon-play { display: none; }
.ses-kutu.calliyor .ses-oynat .ses-ikon-pause { display: block; }

/* Yükleme hatası */
.medya-yuk-bar.medya-yuk-hata { background: var(--err-bg); }
.medya-yuk-bar.medya-yuk-hata .medya-yuk-dolgu { display: none; }
.medya-yuk-bar.medya-yuk-hata .medya-yuk-yazi { color: var(--err-tx); }

/* Mobilde blok tutamakları yazının üstüne biniyordu (iki düğme ~60px,
   sol boşluk 30px). Çözüm: solda sadece "+", çöp kutusu sağ üstte ve
   sadece aktif blokta. */
@media (max-width: 600px) {
    .blok { padding-left: 38px; padding-right: 30px; }
    /* Tutamak satırı bloğun tam genişliğinde: + solda, çöp sağda */
    .blok-tut { left: 0; right: 0; gap: 0; pointer-events: none; opacity: 1; }
    .blok-tut button { pointer-events: auto; }
    .blok-tut button[data-ekle] { opacity: .45; }
    .blok.aktif .blok-tut button[data-ekle] { opacity: 1; }
    .blok-tut button[data-sil] { margin-left: auto; opacity: 0; pointer-events: none; }
    .blok.aktif .blok-tut button[data-sil] { opacity: 1; pointer-events: auto; }
    .blok[data-tur="alinti"] { margin-left: 38px; }
    .siir-hiza-bar { margin-left: 0; }
}

/* Yorum silme düğmesi */
.yorum-sil {
    border: none; background: none; cursor: pointer; color: var(--ink-soft);
    width: 30px; height: 30px; border-radius: 8px; font-size: 14px; flex: 0 0 auto;
}
@media (hover: hover) { .yorum-sil:hover { background: var(--err-bg); color: var(--err-tx); } }

/* ===========================================================
   YAZI STÜDYOSU (eser ekle / düzenle)
   =========================================================== */
.yazi-studyo { max-width: 780px; padding-bottom: 120px; }
.ys-gizli { position: absolute !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ys-gizli-dosya { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.ys-ust { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-family: var(--font-ui); }
.ys-geri { color: var(--ink-soft); text-decoration: none; font-size: 14px; font-weight: 600; }
.ys-ust-baslik { font-weight: 700; font-size: 14px; color: var(--ink); }
.ys-durum { margin-left: auto; font-size: 12.5px; color: var(--ink-soft); }

/* Tür düğmeleri */
.ys-turler { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.ys-tur {
    display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
    padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line);
    background: var(--white); color: var(--ink-soft);
    font-family: var(--font-ui); font-size: 14px; font-weight: 600;
    transition: border-color .15s, background .15s, color .15s;
}
.ys-tur-ikon { font-size: 16px; }
.ys-tur.secili { background: var(--navy); border-color: var(--navy); color: var(--sayfa); }
@media (hover: hover) { .ys-tur:not(.secili):hover { border-color: var(--kiremit); color: var(--ink); } }

/* Kâğıt: yazının durduğu yüzey */
.ys-kagit {
    background: var(--white); border: 1px solid var(--line); border-radius: 18px;
    padding: 26px 34px 34px; box-shadow: var(--shadow);
}
.ys-kapak {
    position: relative; display: flex; align-items: center; justify-content: center;
    min-height: 54px; border-radius: 12px; margin-bottom: 18px; overflow: hidden;
    border: 1px dashed var(--line); color: var(--ink-soft); cursor: pointer;
    font-family: var(--font-ui); font-size: 14px; transition: border-color .15s;
}
.ys-kapak small { color: var(--ink-soft); opacity: .7; margin-left: 4px; }
.ys-arti { font-size: 16px; margin-right: 4px; }
@media (hover: hover) { .ys-kapak:hover { border-color: var(--kiremit); color: var(--ink); } }
.ys-kapak img { display: block; width: 100%; max-height: 300px; object-fit: cover; }
.ys-kapak.dolu { border-style: solid; min-height: 0; }
.ys-kapak.dolu .ys-kapak-yazi { display: none; }
.ys-kapak-degistir { display: none; }
.ys-kapak.dolu .ys-kapak-degistir {
    display: block; position: absolute; right: 10px; bottom: 10px;
    background: rgba(20,22,16,.7); color: #fff; padding: 6px 12px; border-radius: 999px;
    font-size: 12.5px; font-weight: 600; pointer-events: none;
}
.ys-baslik {
    display: block; width: 100%; border: none !important; background: transparent !important;
    outline: none; resize: none; overflow: hidden; padding: 0; margin: 0 0 6px;
    font-family: var(--font-display) !important; font-weight: 700;
    font-size: clamp(1.7rem, 4.5vw, 2.4rem) !important; line-height: 1.2; color: var(--navy);
    box-shadow: none !important;
}
.ys-baslik::placeholder { color: var(--ink-soft); opacity: .45; }
.ys-arac { display: flex; align-items: center; gap: 10px; margin: 6px 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ys-arac .editor-okuma-suresi { margin-left: auto; }
.yazi-studyo .blok-editor { max-width: none; }

/* Dosya yükleme kutuları (resim, PDF, şarkı) */
.ys-yukle {
    position: relative; display: flex; align-items: center; justify-content: center; text-align: center;
    min-height: 180px; border: 2px dashed var(--line); border-radius: 14px; overflow: hidden;
    background: var(--kraft); cursor: pointer; margin-top: 8px; transition: border-color .15s;
}
@media (hover: hover) { .ys-yukle:hover { border-color: var(--kiremit); } }
.ys-yukle-yazi { display: flex; flex-direction: column; align-items: center; gap: 4px; font-family: var(--font-ui); padding: 20px; }
.ys-yukle-yazi b { font-size: 15px; color: var(--ink); word-break: break-all; }
.ys-yukle-yazi small { font-size: 12.5px; color: var(--ink-soft); }
.ys-buyuk-ikon { font-size: 34px; }
.ys-yukle img { display: block; max-width: 100%; max-height: 420px; }
.ys-yukle.dolu { border-style: solid; background: none; min-height: 0; }
.ys-yukle.dolu .ys-yukle-yazi { display: none; }
.ys-yukle-durum { font-family: var(--font-ui); font-size: 13px; margin-top: 8px; }

/* Yayın ayarları */
.ys-ayarlar { margin-top: 26px; }
.ys-ayarlar h2 { font-family: var(--font-display); font-size: 1.1rem; margin: 0 0 10px; }
.ys-gorunur { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ys-gor {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; cursor: pointer;
    padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--white);
    font-family: var(--font-ui); color: var(--ink);
}
.ys-gor-ikon { font-size: 18px; margin-bottom: 2px; }
.ys-gor b { font-size: 14px; }
.ys-gor small { font-size: 11.5px; color: var(--ink-soft); line-height: 1.3; }
.ys-gor.secili { border-color: var(--kiremit); box-shadow: 0 0 0 1px var(--kiremit) inset; background: var(--kiremit-50); }
.ys-girdi { width: 100%; margin-top: 10px; }
.ys-koleksiyon { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; background: var(--white); }
.ys-koleksiyon summary { cursor: pointer; font-family: var(--font-ui); font-weight: 700; font-size: 14px; }
.ys-koleksiyon summary small { font-weight: 500; color: var(--ink-soft); margin-left: 6px; }

/* Altta sabit yayın çubuğu */
.ys-yayin {
    position: sticky; bottom: 0; z-index: 40; margin-top: 22px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px; border-radius: 14px;
    background: var(--white); border: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(20,22,16,.08);
}
.ys-yayin-bilgi { font-family: var(--font-ui); font-size: 13px; color: var(--ink-soft); }
.ys-yayin-btn { padding: 11px 26px; }

@media (max-width: 760px) {
    .ys-kagit { padding: 18px 16px 24px; border-radius: 14px; }
    .ys-gorunur { grid-template-columns: repeat(2, 1fr); }
    .ys-yayin { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
    .ys-turler { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; }
    .ys-turler::-webkit-scrollbar { display: none; }
    .ys-tur { flex: 0 0 auto; }
}

/* Blok tutamakları: bütün ekranlarda "+" solda, çöp sağda (masaüstünde
   de çöp ikonu yazının üstüne biniyordu) */
.blok { padding-left: 38px; padding-right: 32px; }
.blok-tut { left: 0; right: 0; gap: 0; pointer-events: none; opacity: 1; }
.blok-tut button { pointer-events: auto; }
.blok-tut button[data-ekle] { opacity: .45; }
.blok:hover .blok-tut button[data-ekle], .blok.aktif .blok-tut button[data-ekle] { opacity: 1; }
.blok-tut button[data-sil] { margin-left: auto; opacity: 0; pointer-events: none; }
.blok:hover .blok-tut button[data-sil], .blok.aktif .blok-tut button[data-sil] { opacity: 1; pointer-events: auto; }
.blok[data-tur="alinti"] { margin-left: 38px; }
/* Düzeltmeler: gizli önizleme resmi yer kaplamasın, başlık kısa kalsın */
.ys-kapak img[hidden], .ys-yukle img[hidden] { display: none !important; }
.ys-kapak-yazi { display: inline-flex; align-items: baseline; flex-wrap: wrap; justify-content: center; gap: 0 4px; padding: 10px; }
.ys-baslik { min-height: 0 !important; height: auto; }

/* Eser sayfası "•••" menüsü */
.es-menu { position: relative; display: inline-block; margin-left: auto; }
.es-menu > summary { list-style: none; cursor: pointer; padding: 2px 10px; border-radius: 8px; font-weight: 800; letter-spacing: 1px; color: var(--ink-soft); user-select: none; }
.es-menu > summary::-webkit-details-marker { display: none; }
@media (hover: hover) { .es-menu > summary:hover { background: var(--blue-50); color: var(--ink); } }
.es-menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 220px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lift); padding: 6px; display: flex; flex-direction: column; }
.es-menu-panel button { text-align: left; border: none; background: none; cursor: pointer; padding: 10px 12px; border-radius: 8px; font-family: var(--font-ui); font-size: 14px; font-weight: 600; color: var(--ink); }
@media (hover: hover) { .es-menu-panel button:hover { background: var(--blue-50); } }
.es-balon { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 400; background: var(--navy); color: var(--sayfa); padding: 10px 18px; border-radius: 999px; font-family: var(--font-ui); font-size: 14px; font-weight: 600; }

/* ---------- Formül (LaTeX, KaTeX) ve dipnotlar ---------- */
.eser-blok-formul { margin: 1.4em 0; overflow-x: auto; overflow-y: hidden; padding: 4px 0; text-align: center; }
.eser-blok-formul:not([data-cizildi]) { font-family: var(--font-daktilo); font-size: .9em; color: var(--ink-soft); white-space: pre-wrap; }
.formul-satir .katex { font-size: 1.05em; }
.formul-hata { color: var(--err-tx) !important; font-family: var(--font-daktilo); font-size: .85em; }
.blok-formul-kaynak { font-family: var(--font-daktilo); font-size: .92em; background: var(--kum); border-radius: 6px; padding: 8px 10px; }
.blok-formul-onizleme { margin-top: 8px; min-height: 1.2em; overflow-x: auto; text-align: center; }
.blok-formul-onizleme.formul-hata { text-align: left; }

.dipnot-ref { font-size: .72em; line-height: 0; margin-left: 1px; }
.dipnot-ref a { text-decoration: none; font-family: var(--font-ui); font-weight: 700; color: var(--kiremit-koyu); padding: 0 1px; }
.eser-dipnotlar {
    margin: 2.4em 0 0; padding: 1.2em 0 0 1.4em; border-top: 1px solid var(--line);
    font-size: .88em; color: var(--ink-soft); display: flex; flex-direction: column; gap: .4em;
}
.eser-dipnotlar li:target { color: var(--ink); background: var(--altin-50); border-radius: 4px; }
.dipnot-don { text-decoration: none; margin-left: 4px; }

/* ---------- Bengi dışında da okunsun mu? (eser yazma ekranı) ---------- */
.ys-dis-yayin[hidden] { display: none; }
.ys-dis-aciklama { font-family: var(--font-ui); font-size: 13.5px; color: var(--ink-soft); margin: -4px 0 12px; }
.ys-hedef {
    display: flex; gap: 14px; align-items: flex-start; position: relative;
    padding: 16px 18px; margin-bottom: 10px; cursor: pointer;
    background: var(--white); border: 1.5px solid var(--line); border-radius: 14px;
    transition: border-color .15s var(--egri), background .15s var(--egri);
}
.ys-hedef-dergi { cursor: default; }
.ys-hedef.secili { border-color: var(--kiremit); background: color-mix(in srgb, var(--kiremit) 5%, var(--white)); }
.ys-hedef > input[type=checkbox] { position: absolute; top: 18px; right: 18px; width: 22px; height: 22px; accent-color: var(--kiremit); margin: 0; }
.ys-hedef-ikon { font-size: 24px; line-height: 1; flex: 0 0 auto; margin-top: 2px; }
.ys-hedef-metin { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; padding-right: 30px; font-family: var(--font-ui); }
.ys-hedef-dergi .ys-hedef-metin { padding-right: 0; }
.ys-hedef-metin > b { font-size: 15.5px; color: var(--ink); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ys-hedef-metin > small { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.ys-hedef-ek { font-size: 12.5px; color: var(--ink-soft); }
.ys-dergi-ek { display: block; margin-top: 10px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; font-size: 13.5px; }
.ys-dergi-ek summary { cursor: pointer; font-weight: 600; }
.ys-dergi-ek summary em { font-style: normal; font-weight: 400; opacity: .7; margin-left: 4px; }
.ys-dergi-ek label { display: block; margin-top: 10px; font-weight: 600; }
.ys-dergi-ek label small { display: block; font-weight: 400; opacity: .75; }
.ys-dergi-ek textarea { width: 100%; box-sizing: border-box; margin-top: 4px; font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper, #fff); color: inherit; }
.ys-dergi-foto { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.ys-dergi-foto img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.ys-dergi-foto label { margin: 0; font-weight: 400; }
.ys-dergide-gor { display: inline-block; margin-top: 10px; font-weight: 700; font-size: 13.5px; }
.ys-editor-notu { display: block; margin-top: 4px; padding: 10px 12px; border-radius: 10px; background: var(--kiremit-50, #F8EBE3); color: var(--ink); font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; }
.ys-yayin-durum { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--kum); color: var(--ink-soft); }
.ys-yayin-durum[data-durum="onaylandi"] { background: var(--ok-bg); color: var(--ok-tx); }
.ys-yayin-durum[data-durum="bekliyor"], .ys-yayin-durum[data-durum="onaylandi-guncelleme"] { background: var(--altin-50); color: var(--altin-koyu); }
.ys-yayin-durum[data-durum="iade"] { background: var(--kiremit-50, #F8EBE3); color: var(--kiremit-koyu); }
.ys-yayin-durum[data-durum="reddedildi"] { background: var(--err-bg); color: var(--err-tx); }
.ys-cagrilar { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.ys-cagri { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--sayfa); }
.ys-cagri:has(input:checked) { border-color: var(--kiremit); background: var(--white); }
.ys-cagri input { width: 18px; height: 18px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--kiremit); }
.ys-cagri span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ys-cagri b { font-size: 14.5px; }
.ys-cagri em { font-style: normal; font-size: 12.5px; color: var(--kiremit-koyu); font-weight: 700; }
.ys-cagri small { font-size: 13px; color: var(--ink-soft); line-height: 1.5; white-space: pre-wrap; }
.ys-izin { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: 12px; background: var(--kum); font-family: var(--font-ui); font-size: 13.5px; line-height: 1.55; color: var(--ink); cursor: pointer; }
.ys-izin[hidden] { display: none; }
.ys-izin input { width: 20px; height: 20px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--kiremit); }
.ys-geri-cek-uyari { font-family: var(--font-ui); font-size: 13px; color: var(--kiremit-koyu); margin: 4px 0 0; }
.ys-geri-cek-uyari[hidden] { display: none; }
.ys-yazisma-link { font-family: var(--font-ui); font-size: 13px; margin: 10px 0 0; }
.ys-yazisma-link a { color: var(--ink-soft); }

/* ===========================================================
   Yazı araçları (assets/js/yazi-araclari.js)
   =========================================================== */
.ys-araclar[hidden] { display: none; }
.ya-cubuk {
    position: sticky; top: 58px; z-index: 45;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin: 0 0 14px; padding: 6px 8px;
    background: color-mix(in srgb, var(--white) 92%, transparent); backdrop-filter: blur(8px);
    border: 1px solid var(--line); border-radius: 12px;
    font-family: var(--font-ui);
}
.ya-dugmeler { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; min-width: 0; }
.ya-dugme {
    min-width: 36px; height: 36px; padding: 0 8px; border: 0; border-radius: 8px;
    background: transparent; color: var(--ink); cursor: pointer;
    font: 600 15px var(--font-ui); display: inline-flex; align-items: center; justify-content: center;
}
.ya-dugme:hover { background: var(--blue-50); }
.ya-dugme:focus-visible { outline: 2px solid var(--kiremit); outline-offset: 1px; }
.ya-dugme i { font-family: var(--font-body); font-size: 17px; }
.ya-mat { font-family: 'KaTeX_Main', var(--font-body); font-size: 16px; }
.ya-ayrac { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.ya-sag { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.ya-sayac { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ya-masa-ac { border: 1px solid var(--line); background: var(--sayfa); color: var(--ink); border-radius: 8px; padding: 7px 11px; font: 600 13px var(--font-ui); cursor: pointer; white-space: nowrap; }
.ya-masa-ac:hover { border-color: var(--kiremit); color: var(--kiremit-koyu); }

/* Telefonda: klavyenin hemen üstünde, yalnız yazarken */
.ya-cubuk.ya-alt {
    position: fixed; left: 0; right: 0; top: auto; bottom: 0; z-index: 95;
    margin: 0; border-radius: 0; border-width: 1px 0 0;
    padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom));
    transform: translateY(110%); transition: transform .18s var(--egri);
    box-shadow: 0 -4px 18px rgba(20, 22, 16, .08);
}
.ya-cubuk.ya-alt.ya-gorunur { transform: none; }
.ya-cubuk.ya-alt .ya-dugmeler { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.ya-cubuk.ya-alt .ya-dugme { min-width: 42px; height: 42px; }
.ya-cubuk.ya-alt .ya-sayac { display: none; }
.ya-cubuk.ya-alt .ya-masa-ac { padding: 8px; font-size: 0; }
.ya-cubuk.ya-alt .ya-masa-ac span { font-size: 18px; }

/* Formül paleti */
.ya-palet {
    position: absolute; z-index: 120; width: min(440px, calc(100vw - 16px));
    background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lift);
    font-family: var(--font-ui); overflow: hidden;
}
.ya-palet.ya-palet-alt-sabit { position: fixed; left: 8px; right: 8px; width: auto; max-height: 46vh; display: flex; flex-direction: column; }
.ya-palet-sekmeler { display: flex; gap: 4px; padding: 8px 8px 0; border-bottom: 1px solid var(--line); }
.ya-palet-sekmeler button { border: 0; background: none; padding: 8px 12px; font: 600 13px var(--font-ui); color: var(--ink-soft); cursor: pointer; border-bottom: 2px solid transparent; }
.ya-palet-sekmeler button.aktif { color: var(--ink); border-bottom-color: var(--kiremit); }
.ya-palet-govde { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 4px; padding: 8px; max-height: 260px; overflow-y: auto; }
.ya-palet-alt-sabit .ya-palet-govde { max-height: none; flex: 1; }
.ya-palet-govde button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 54px; padding: 6px 4px; border: 1px solid transparent; border-radius: 10px;
    background: var(--sayfa); color: var(--ink); cursor: pointer; font-size: 15px; overflow: hidden;
}
.ya-palet-govde button:hover { border-color: var(--kiremit); background: var(--white); }
.ya-palet-govde button small { font-family: var(--font-ui); font-size: 10.5px; color: var(--ink-soft); }
.ya-palet-govde .katex { font-size: 1em; }
.ya-palet-alt { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-soft); }
.ya-palet-blok { border: 1px solid var(--line); background: var(--white); border-radius: 8px; padding: 6px 10px; font: 600 12.5px var(--font-ui); cursor: pointer; color: var(--ink); }

/* Metinde $…$ varken altında canlı önizleme */
.ya-satir-onizleme {
    margin: 4px 0 6px; padding: 8px 12px; border-left: 2px solid var(--kiremit);
    background: color-mix(in srgb, var(--kiremit) 5%, transparent); border-radius: 0 8px 8px 0;
    font-family: var(--font-body); font-size: .95em; color: var(--ink-soft); white-space: pre-wrap;
}
.ya-satir-onizleme::before { content: "Önizleme"; display: block; font: 700 10.5px var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--kiremit-koyu); margin-bottom: 2px; }

/* Liste bloğu: her satır bir madde */
.blok[data-tur="liste"] .blok-liste-ic { padding-left: 14px; border-left: 2px solid var(--line); line-height: 1.9; }
.blok[data-tur="liste"] .blok-liste-ic:empty::before { content: "Her satır bir madde"; color: var(--ink-soft); opacity: .6; }

/* ---------- Yazı masası (tam ekran yazma) ---------- */
html.yazi-masasi .uye-nav, html.yazi-masasi .alt-cubuk, html.yazi-masasi .site-footer, html.yazi-masasi .uye-footer,
html.yazi-masasi .ys-ust, html.yazi-masasi .ys-turler, html.yazi-masasi .ys-kapak, html.yazi-masasi .ys-ayarlar,
html.yazi-masasi .oda-serit, html.yazi-masasi .ya-masa-ac, html.yazi-masasi .ya-sayac { display: none !important; }
html.yazi-masasi body { background: var(--sayfa); }
html.yazi-masasi .yazi-studyo { max-width: 760px; padding-top: 72px; padding-bottom: 120px; }
html.yazi-masasi .ys-kagit { background: transparent; border: 0; box-shadow: none; padding: 0; }
html.yazi-masasi .ys-baslik { font-size: clamp(2rem, 4vw, 2.6rem); }
html.yazi-masasi .blok-editor { font-size: 1.12rem; line-height: 1.85; }
html.yazi-masasi .ya-cubuk:not(.ya-alt) { top: 58px; }
html.yazi-masasi .ys-yayin { max-width: 760px; margin-left: auto; margin-right: auto; }
.ym-cubuk {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 9px max(16px, env(safe-area-inset-left));
    background: color-mix(in srgb, var(--sayfa) 94%, transparent); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line); font-family: var(--font-ui); font-size: 13px;
}
.ym-cubuk[hidden] { display: none; }
.ym-ad { font-family: var(--font-display); font-weight: 700; color: var(--navy); }
.ym-ilerleme { width: 90px; height: 5px; border-radius: 9px; background: var(--line); overflow: hidden; }
.ym-dolgu { display: block; height: 100%; width: 0; background: var(--kiremit); transition: width .3s var(--egri); }
.ym-sayac { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ym-hedef-yazi { color: var(--kiremit-koyu); font-weight: 600; }
.ym-bosluk { flex: 1; }
.ym-hedef { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); }
.ym-hedef input { width: 78px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); color: var(--ink); font: inherit; }
.ym-cubuk button { border: 1px solid var(--line); background: var(--white); color: var(--ink); border-radius: 8px; padding: 6px 10px; font: 600 12.5px var(--font-ui); cursor: pointer; }
.ym-cubuk button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--sayfa); }
.ym-cubuk .ym-kapat { background: var(--kiremit); border-color: var(--kiremit); color: #fff; }
.ym-anahat { display: none; }
html.ym-anahat-acik .ym-anahat {
    display: block; position: fixed; top: 62px; left: 16px; width: 220px; max-height: calc(100vh - 90px); overflow-y: auto; z-index: 60;
    font-family: var(--font-ui); font-size: 13px; color: var(--ink-soft);
}
.ym-anahat b { display: block; color: var(--ink); margin-bottom: 8px; font-size: 13.5px; }
.ym-anahat ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.ym-anahat button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 5px 10px; color: var(--ink-soft); font: inherit; cursor: pointer; }
.ym-anahat button:hover { color: var(--ink); background: var(--blue-50); }
@media (max-width: 1180px) { html.ym-anahat-acik .ym-anahat { display: none; } }
.ym-kisayollar { position: absolute; top: calc(100% + 6px); right: 16px; width: 300px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lift); padding: 12px 14px; }
.ym-kisayollar dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; margin: 8px 0 0; }
.ym-kisayollar dd { margin: 0; }
.ym-kisayollar kbd { font: 600 11.5px ui-monospace, monospace; background: var(--sayfa); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; white-space: nowrap; }
@media (max-width: 760px) {
    .ym-cubuk { font-size: 12px; gap: 6px; }
    .ym-hedef, .ym-cubuk [data-ym="anahat"], .ym-cubuk [data-ym="kisayol"], .ym-cubuk [data-ym="tamekran"] { display: none; }
    html.yazi-masasi .yazi-studyo { padding-top: 62px; }
    html.yazi-masasi .blok-editor { font-size: 1.06rem; }
}
@media (prefers-reduced-motion: reduce) { .ya-cubuk.ya-alt { transition: none; } }

/* Telefonda yazarken alttaki yayın çubuğu araç çubuğuna yer açar */
@media (max-width: 759px) { html.ya-yaziyor .ys-yayin { display: none; } }

/* Yayın izni kutusu: başlık ve eksikken görünen not */
.ys-izin-baslik { display: block; font-size: 14px; margin-bottom: 3px; }
.ys-izin-uyari { display: none; font-style: normal; font-weight: 700; color: var(--kiremit-koyu); margin-top: 6px; }
.ys-izin.ys-izin-eksik { box-shadow: 0 0 0 2px var(--kiremit) inset; }
.ys-izin.ys-izin-eksik .ys-izin-uyari { display: block; }

/* =====================================================================
   DOCS GÖRÜNÜMÜ: gri masa üstünde beyaz sayfa, üstte yapışkan araç
   çubuğu, sağda ayarlar. Telefonda sayfa kenardan kenara, araç çubuğu
   klavyenin üstünde.
   ===================================================================== */
body:has(.yazi-studyo.ys-yazi-modu) { background: color-mix(in srgb, var(--sayfa) 82%, var(--line)); }
.ys-araclar-gizli { display: none !important; }

/* Tür seçimi: tek satır, küçük */
.ys-turler { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 6px; margin-bottom: 12px; padding-bottom: 2px; }
.ys-turler::-webkit-scrollbar { display: none; }
.ys-tur { flex: 0 0 auto; padding: 6px 12px; font-size: 13px; gap: 5px; }
.ys-tur-ikon { font-size: 14px; }

/* Araç çubuğu: Docs'taki gibi yuvarlak, yapışkan */
.ys-yazi-modu .ys-araclar { position: sticky; top: var(--ys-ust, 58px); z-index: 45; margin: 0 0 14px; }
.ys-yazi-modu .ya-cubuk:not(.ya-alt) {
    margin: 0; padding: 5px 8px; border-radius: 999px; gap: 6px;
    background: var(--white); border: 1px solid var(--line);
    box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 18px -10px rgba(0,0,0,.25);
}
.ya-dugme { width: 32px; height: 32px; min-width: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.ya-dugme svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ya-dugme.basili { background: var(--blue-100); color: var(--navy); }
.ya-ayrac { width: 1px; height: 20px; background: var(--line); margin: 0 4px; flex: 0 0 auto; }
.ya-stil {
    width: auto !important; min-width: 128px; height: 32px; padding: 0 28px 0 10px !important; margin: 0;
    border: 0 !important; border-radius: 8px !important; background-color: transparent !important; color: var(--ink) !important;
    font-family: var(--font-ui); font-size: 13.5px !important; font-weight: 600; cursor: pointer;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important; background-position: right 8px center !important; background-size: 14px !important;
}
.ya-stil:hover { background-color: var(--blue-50) !important; }
.ya-stil:disabled { opacity: .45; cursor: default; }
.ya-sag { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

/* Sayfa */
.ys-yazi-modu .ys-kagit {
    border: 0; border-radius: 4px; background: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,.10), 0 8px 28px -14px rgba(0,0,0,.28);
}
.ys-yazi-modu .ys-kapak { border-radius: 8px; }
.ys-yazi-modu .ys-baslik { margin-bottom: 18px; }
.ys-yazi-modu .blok-icerik b, .ys-yazi-modu .blok-icerik strong { font-weight: 700; color: var(--navy); }

@media (min-width: 900px) {
    .yazi-studyo { max-width: 1260px; }
    .ys-duzen { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
    .ys-merkez { min-width: 0; }
    .ys-yazi-modu .ys-kagit { max-width: 816px; margin: 0 auto; padding: 64px 84px 120px; min-height: 900px; }
    .ys-yazi-modu .ys-araclar, .ys-yazi-modu .ys-turler { max-width: 816px; margin-left: auto; margin-right: auto; }
    .ys-yan { position: sticky; top: calc(var(--ys-ust, 58px) + 12px); max-height: calc(100vh - var(--ys-ust, 58px) - 150px); overflow-y: auto;
        scrollbar-width: thin; padding-right: 2px; }
    .ys-yan .ys-ayarlar { margin-top: 0; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
    .ys-yan .ys-ayarlar + .ys-ayarlar { margin-top: 12px; }
    .ys-yan .ys-ayarlar h2 { font-size: 1rem; }
    .ys-yan .ys-gorunur { grid-template-columns: 1fr 1fr; }
    .ys-yan .ys-gor { padding: 10px 11px; }
    .ys-yan .ys-koleksiyon { background: transparent; }
    /* Yayınla: sağ sütunun altında yüzen kart */
    .ys-yazi-modu .ys-yayin {
        position: fixed; z-index: 50; bottom: 18px; margin: 0; width: 300px;
        right: max(24px, calc((100vw - 1260px) / 2 + 24px));
        flex-direction: column; align-items: stretch; gap: 8px; padding: 12px;
    }
    .ys-yazi-modu .ys-yayin-btn { width: 100%; }
    .ys-yazi-modu .ys-yayin-bilgi { text-align: center; }
}
@media (min-width: 900px) and (max-width: 1100px) {
    .ys-yazi-modu .ys-kagit { padding: 48px 48px 100px; }
}

/* Telefon ve dar ekran: sayfa kenardan kenara (Docs uygulaması gibi) */
@media (max-width: 899px) {
    .ys-yazi-modu .ys-kagit { margin: 0 -16px; padding: 22px 18px 40px; border-radius: 0; box-shadow: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
    .ys-yazi-modu .ys-araclar:not(:has(.ya-alt)) { top: var(--ys-ust, 52px); }
}
/* Telefonda sadeleşen düğmeler (geri al/yinele klavyede de var) */
.ya-cubuk.ya-alt .ya-masaustu { display: none; }
.ya-cubuk.ya-alt .ya-stil { min-width: 112px; font-size: 14px !important; }

/* Üst satır: geri, başlık, kayıt durumu | kelime sayısı, yazı masası */
.ys-ust .ys-durum { margin-left: 0; }
.ys-ust-sag { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ys-ust-sag .ya-sayac { font-family: var(--font-ui); font-size: 12.5px; color: var(--ink-soft); }
.ys-yazi-modu .ya-dugmeler { flex-wrap: nowrap; }
@media (max-width: 899px) { .ys-ust-sag .ya-masa-ac { display: none; } }
/* Telefonda yazarken alttaki site menüsü çekilir, yerini biçim çubuğu alır */
html.ya-yaziyor .alt-cubuk { display: none !important; }
.ya-cubuk.ya-alt { z-index: 120; }
.ys-ust { flex-wrap: nowrap; min-width: 0; }
.ys-ust > * { white-space: nowrap; }
@media (max-width: 600px) {
    .ys-ust-baslik { display: none; }
    .ys-ust { gap: 10px; margin-bottom: 12px; }
}

/* Docs / Word dosyası aç */
.ys-aktar { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 6px 12px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--white); color: var(--ink); font: 600 12.5px var(--font-ui); white-space: nowrap; }
.ys-aktar:hover { border-color: var(--kiremit); color: var(--kiremit-koyu); }
@media (max-width: 600px) { .ys-aktar span { display: none; } .ys-aktar { padding: 7px; } }
.ys-aktar-durum { font-family: var(--font-ui); font-size: 13.5px; padding: 10px 14px; border-radius: 10px; margin: -6px 0 12px; border: 1px solid var(--line); background: var(--white); }
.ys-aktar-durum.tamam { border-color: var(--ok-bd); background: var(--ok-bg); color: var(--ok-tx); }
.ys-aktar-durum.hata { border-color: var(--err-bd); background: var(--err-bg); color: var(--err-tx); }
.ys-aktar-durum small { display: block; margin-top: 3px; opacity: .85; }
@media (min-width: 900px) { .ys-aktar-durum { max-width: 816px; } }

/* ===================== Yazı masası girişi: belirgin ===================== */
.ys-ust-sag .ya-masa-ac {
    display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
    background: var(--navy); border: 1px solid var(--navy); color: var(--sayfa); font: 700 13px var(--font-ui);
    box-shadow: 0 6px 16px -8px rgba(0,0,0,.45); transition: transform .15s, box-shadow .15s;
}
.ys-ust-sag .ya-masa-ac:hover { transform: translateY(-1px); color: var(--sayfa); border-color: var(--navy); box-shadow: 0 10px 22px -10px rgba(0,0,0,.5); }
.ya-masa-ac svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ya-masa-ac kbd { font: 600 10.5px ui-monospace, monospace; padding: 1px 6px; border-radius: 5px; background: rgba(255,255,255,.16); opacity: .85; }
@media (max-width: 1100px) { .ya-masa-ac kbd { display: none; } }
.ya-sayac { background: none; border: 0; padding: 4px 6px; border-radius: 6px; cursor: pointer; font: 500 12.5px var(--font-ui); color: var(--ink-soft); }
.ya-sayac:hover { background: var(--blue-50); color: var(--ink); }

.ym-tanitim { display: flex; align-items: center; gap: 14px; margin: -4px auto 14px; padding: 12px 14px 12px 16px; max-width: 816px;
    border-radius: 14px; border: 1px solid var(--navy); background: color-mix(in srgb, var(--navy) 7%, var(--white)); font-family: var(--font-ui); }
.ym-tanitim-ikon { font-size: 26px; }
.ym-tanitim > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ym-tanitim b { font-size: 14.5px; color: var(--navy); }
.ym-tanitim small { font-size: 12.5px; color: var(--ink-soft); }
.ym-tanitim-dene { background: var(--navy); color: var(--sayfa); border: 0; border-radius: 999px; padding: 9px 16px; font: 700 13px var(--font-ui); cursor: pointer; white-space: nowrap; }
.ym-tanitim-kapat { background: none; border: 0; color: var(--ink-soft); font: 600 12.5px var(--font-ui); cursor: pointer; padding: 6px; }

/* ===================== Yakınlaştırma ===================== */
.ys-yazi-modu .ys-kagit { zoom: var(--ys-yakinlik, 1); }
.ya-yakinlik { min-width: 76px !important; }
html.yazi-masasi .blok-editor, html.yazi-masasi .ys-baslik { zoom: var(--ys-yakinlik, 1); }

/* ===================== Belge ana hattı ===================== */
.ys-anahat { display: none; font-family: var(--font-ui); font-size: 13px; }
html.ys-anahat-acik .ys-yazi-modu .ys-anahat { display: block; }
.ys-anahat-ad { margin: 0 0 6px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; }
.ys-anahat-belge { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 6px 8px; border-radius: 8px; font: 700 13.5px var(--font-ui); color: var(--ink); cursor: pointer; }
.ys-anahat ol { list-style: none; margin: 4px 0 0; padding: 0 0 0 6px; border-left: 2px solid var(--line); }
.ys-anahat ol button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 5px 10px; border-radius: 6px; font: 500 13px var(--font-ui); color: var(--ink-soft); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ys-anahat button:hover { background: var(--blue-50); color: var(--ink); }
.ys-anahat-bos { color: var(--ink-soft); font-size: 12.5px; line-height: 1.5; padding: 0 8px; }
@media (min-width: 1440px) {
    html.ys-anahat-acik .ys-yazi-modu.yazi-studyo { max-width: 1500px; }
    html.ys-anahat-acik .ys-yazi-modu .ys-duzen { grid-template-columns: 210px minmax(0, 1fr) 300px; }
    html.ys-anahat-acik .ys-yazi-modu .ys-anahat { position: sticky; top: calc(var(--ys-ust, 58px) + 70px); max-height: calc(100vh - 200px); overflow-y: auto; }
    html.ys-anahat-acik .ys-yazi-modu .ys-yayin { right: max(24px, calc((100vw - 1500px) / 2 + 24px)); }
}
@media (max-width: 1439px) {
    html.ys-anahat-acik .ys-yazi-modu .ys-anahat { position: fixed; z-index: 60; left: 16px; top: calc(var(--ys-ust, 58px) + 120px); width: 220px; max-height: 60vh; overflow-y: auto;
        background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: var(--shadow-lift); }
}
@media (max-width: 899px) { html.ys-anahat-acik .ys-yazi-modu .ys-anahat { display: none; } }

/* ===================== Bul ve değiştir ===================== */
.ya-bul { position: absolute; right: 12px; top: calc(100% + 8px); z-index: 70; width: min(440px, calc(100vw - 32px)); padding: 10px;
    background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lift); font-family: var(--font-ui); }
.ya-bul[hidden] { display: none; }
.ys-araclar { position: relative; }
.ya-bul-satir { display: flex; align-items: center; gap: 6px; }
.ya-bul-satir + .ya-bul-satir { margin-top: 8px; }
.ya-bul-satir[hidden] { display: none; }
.ya-bul input[type=search], .ya-bul input[type=text] { flex: 1; min-width: 0; padding: 7px 10px !important; font-size: 13.5px !important; margin: 0; }
.ya-bul button { border: 1px solid var(--line); background: var(--sayfa); color: var(--ink); border-radius: 8px; padding: 6px 9px; font: 600 12.5px var(--font-ui); cursor: pointer; white-space: nowrap; }
.ya-bul button:hover { border-color: var(--kiremit); }
.ya-bul-sayi { font-size: 12px; color: var(--ink-soft); min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.ya-bul-aa { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-soft); margin: 0; cursor: pointer; }
.ya-bul-aa input { width: auto; margin: 0; }
::highlight(ya-bul) { background-color: rgba(250, 204, 21, .45); }
::highlight(ya-bul-aktif) { background-color: rgba(234, 120, 40, .7); color: #111; }

/* ===================== Pencereler ===================== */
.ya-pencere-perde { position: fixed; inset: 0; z-index: 300; background: rgba(15,17,12,.45); display: grid; place-items: center; padding: 16px; }
.ya-pencere { width: min(560px, 100%); max-height: 85vh; overflow: auto; background: var(--white); color: var(--ink); border-radius: 16px; box-shadow: var(--shadow-lift); padding: 18px 20px; font-family: var(--font-ui); }
.ya-pencere-bas { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ya-pencere-bas b { font-size: 16px; }
.ya-pencere-kapat { background: none; border: 0; font-size: 24px; line-height: 1; color: var(--ink-soft); cursor: pointer; padding: 2px 8px; border-radius: 8px; }
.ya-sayim { width: 100%; border-collapse: collapse; font-size: 14px; }
.ya-sayim td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.ya-sayim td:last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.ya-kisayol-izgara { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.ya-kisayol-izgara h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.ya-kisayol-izgara dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; margin: 0; font-size: 13px; }
.ya-kisayol-izgara dd { margin: 0; }
.ya-kisayol-izgara kbd { font: 600 11px ui-monospace, monospace; background: var(--sayfa); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; white-space: nowrap; }

/* ===================== Yazı masası: masaüstünde daha rahat ===================== */
.ym-oturum { color: var(--ok-tx); font-weight: 600; font-variant-numeric: tabular-nums; }
html.yazi-masasi .ys-anahat, html.yazi-masasi .ym-tanitim, html.yazi-masasi .ys-aktar-durum { display: none !important; }
html.yazi-masasi .ys-duzen { display: block; }
html.yazi-masasi .ys-yan { display: none; }
html.yazi-masasi .ys-araclar { position: sticky; top: 52px; z-index: 45; max-width: 760px; margin: 0 auto 18px; }
html.yazi-masasi .ys-araclar .ya-cubuk:not(.ya-alt) { opacity: .35; transition: opacity .2s; }
html.yazi-masasi .ys-araclar:hover .ya-cubuk, html.yazi-masasi .ys-araclar:focus-within .ya-cubuk { opacity: 1; }
html.yazi-masasi .ys-yayin { position: fixed; right: 18px; bottom: 18px; width: auto; flex-direction: row; opacity: .5; transition: opacity .2s; }
html.yazi-masasi .ys-yayin:hover { opacity: 1; }
html.yazi-masasi .ys-yayin .ys-yayin-bilgi { display: none; }
@media (min-width: 900px) {
    html.yazi-masasi .yazi-studyo { max-width: 820px; padding-top: 70px; }
    html.yazi-masasi .ys-merkez .ys-kagit { max-width: none; min-height: 0; padding: 8px 20px 40vh; background: transparent; box-shadow: none; }
}
@media (min-width: 900px) {
    html.yazi-masasi .yazi-studyo.ys-yazi-modu { max-width: 820px !important; }
    html.yazi-masasi .ys-merkez .ys-kagit { padding-left: 52px !important; padding-right: 20px !important; }
}
/* Alıntı: "+" tutamağı çizginin solunda kalsın, metnin üstüne binmesin */
.blok[data-tur="alinti"] { margin-left: 0; border-left: 0; padding-left: 58px; }
.blok[data-tur="alinti"]::before { content: ""; position: absolute; left: 38px; top: 4px; bottom: 4px; width: 3px; border-radius: 2px; background: var(--kiremit); }
html.yazi-masasi .blok-tut button[data-ekle] { opacity: 0; }
html.yazi-masasi .blok:hover .blok-tut button[data-ekle], html.yazi-masasi .blok.aktif .blok-tut button[data-ekle] { opacity: .8; }

/* ===== Okuma sayfası: yeni biçimler (dergiutopya bu dosyanın kopyasını kullanır) ===== */
.eser-blok-baslik.seviye-2 { font-size: 1.28rem; margin: 1.4em 0 .45em; }
.eser-blok-baslik.seviye-3 { font-size: 1.1rem; margin: 1.2em 0 .4em; text-transform: none; }
.hiza-orta { text-align: center; }
.hiza-sag { text-align: right; }
.hiza-iki { text-align: justify; hyphens: auto; }
.eser-govde mark, .blok-icerik mark { background: color-mix(in srgb, #F5D547 55%, transparent); color: inherit; padding: 0 .12em; border-radius: 2px; }
.eser-govde u, .blok-icerik u { text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ===================== Menü çubuğu (Docs gibi) ===================== */
.ya-menu { display: none; gap: 2px; margin: 0 0 6px 6px; font-family: var(--font-ui); }
@media (min-width: 900px) { .ys-yazi-modu .ya-menu { display: flex; } }
html.yazi-masasi .ya-menu { display: none !important; }
.ya-menu-ad { background: none; border: 0; padding: 4px 9px; border-radius: 6px; font: 500 13.5px var(--font-ui); color: var(--ink); cursor: pointer; }
.ya-menu-ad:hover, .ya-menu-ad.acik { background: var(--blue-100); }
.ya-menu-panel { position: absolute; z-index: 400; min-width: 260px; max-height: 70vh; overflow-y: auto; padding: 6px 0; background: var(--white); color: var(--ink);
    border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.12), 0 16px 40px -12px rgba(0,0,0,.35); font-family: var(--font-ui); }
.ya-menu-panel button { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 6px; width: 100%; text-align: left; background: none; border: 0;
    padding: 7px 16px 7px 8px; font: 500 13.5px var(--font-ui); color: var(--ink); cursor: pointer; }
.ya-menu-panel button:hover { background: var(--blue-50); }
.ya-menu-panel kbd { font: 500 11.5px var(--font-ui); color: var(--ink-soft); background: none; border: 0; padding: 0; }
.ya-menu-isaret { text-align: center; color: var(--ok-tx); font-weight: 700; }
.ya-menu-panel hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }

/* Araç çubuğu sığmazsa yana kaysın */
.ys-yazi-modu .ya-cubuk:not(.ya-alt) .ya-dugmeler { overflow-x: auto; scrollbar-width: none; }
.ys-yazi-modu .ya-cubuk:not(.ya-alt) .ya-dugmeler::-webkit-scrollbar { display: none; }
.ys-yazi-modu .ya-dugme { width: 30px; min-width: 30px; flex: 0 0 auto; }
.ya-u { text-decoration: underline; text-underline-offset: 2px; font-weight: 700; font-family: var(--font-body); font-size: 16px; }
.ya-s { text-decoration: line-through; font-weight: 700; font-family: var(--font-body); font-size: 16px; }

/* Açılır küçük menüler: hizalama, özel karakter */
.ya-acilir { position: absolute; z-index: 400; background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: 12px;
    box-shadow: var(--shadow-lift); padding: 6px; font-family: var(--font-ui); }
.ya-hiza-menu button { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; width: 230px; padding: 7px 10px; border: 0; background: none; border-radius: 8px; font: 500 13.5px var(--font-ui); color: var(--ink); cursor: pointer; text-align: left; }
.ya-hiza-menu button:hover, .ya-hiza-menu button.secili { background: var(--blue-50); }
.ya-hiza-menu svg, .ya-dugme[data-ya="hizaMenu"] svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.ya-hiza-menu kbd { font: 500 11px var(--font-ui); color: var(--ink-soft); }
.ya-ozel-menu { width: 300px; }
.ya-ozel-menu p { margin: 4px 6px 6px; font-size: 12px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; }
.ya-ozel-menu div { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.ya-ozel-menu button { height: 32px; border: 1px solid transparent; background: var(--sayfa); border-radius: 6px; font: 16px var(--font-body); color: var(--ink); cursor: pointer; }
.ya-ozel-menu button:hover { border-color: var(--kiremit); }

/* Bağlantı penceresi */
.ya-bag-form label { display: block; font: 600 13px var(--font-ui); color: var(--ink-soft); margin-bottom: 10px; }
.ya-bag-form input { margin-top: 4px; }
.ya-bag-dugmeler { display: flex; justify-content: flex-end; gap: 8px; }
.ya-bag-kaldir { background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font: 600 13px var(--font-ui); color: var(--err-tx); cursor: pointer; margin-right: auto; }
.blok-icerik a { color: var(--blue); text-decoration: underline; }

/* Sesle yazma göstergesi */
.ya-dikte { position: fixed; z-index: 300; left: 50%; bottom: 90px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: 999px; background: var(--navy); color: var(--sayfa); font: 600 13.5px var(--font-ui); box-shadow: var(--shadow-lift); }
.ya-dikte button { background: rgba(255,255,255,.18); color: inherit; border: 0; border-radius: 999px; padding: 5px 12px; font: inherit; cursor: pointer; }
.ya-dikte-nokta { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; animation: ya-nabiz 1.2s ease-in-out infinite; }
@keyframes ya-nabiz { 50% { opacity: .3; transform: scale(.8); } }

/* Editörde başlık düzeyleri ve hizalama */
.blok[data-tur="baslik"][data-seviye="2"] .blok-icerik { font-size: 1.25rem; }
.blok[data-tur="baslik"][data-seviye="3"] .blok-icerik { font-size: 1.08rem; }
.blok[data-hiza="orta"] .blok-icerik { text-align: center; }
.blok[data-hiza="sag"] .blok-icerik { text-align: right; }
.blok[data-hiza="iki"] .blok-icerik { text-align: justify; }

/* Yazdır / PDF: yalnız sayfa */
@media print {
    html.ys-yazdiriliyor body { background: #fff !important; }
    html.ys-yazdiriliyor .uye-nav, html.ys-yazdiriliyor .alt-cubuk, html.ys-yazdiriliyor .ys-ust, html.ys-yazdiriliyor .ys-turler,
    html.ys-yazdiriliyor .ys-araclar, html.ys-yazdiriliyor .ys-yan, html.ys-yazdiriliyor .ys-yayin, html.ys-yazdiriliyor .ys-anahat,
    html.ys-yazdiriliyor .ym-tanitim, html.ys-yazdiriliyor .ys-aktar-durum, html.ys-yazdiriliyor .ys-kapak:not(.dolu), html.ys-yazdiriliyor .blok-tut,
    html.ys-yazdiriliyor .siir-hiza-bar, html.ys-yazdiriliyor .ya-satir-onizleme, html.ys-yazdiriliyor .uye-footer, html.ys-yazdiriliyor .site-footer,
    html.ys-yazdiriliyor .medya-sil, html.ys-yazdiriliyor .ys-kapak-degistir { display: none !important; }
    html.ys-yazdiriliyor .ys-duzen { display: block !important; }
    html.ys-yazdiriliyor .ys-kagit { box-shadow: none !important; padding: 0 !important; max-width: none !important; zoom: 1 !important; min-height: 0 !important; color: #000; background: #fff !important; }
    html.ys-yazdiriliyor .blok { padding-left: 0 !important; padding-right: 0 !important; }
    html.ys-yazdiriliyor .blok[data-tur="alinti"] { padding-left: 16px !important; }
    html.ys-yazdiriliyor .blok[data-tur="alinti"]::before { left: 0; }
}
@media (max-width: 600px) {
    .ys-ust-sag .ya-sayac { display: none; }
    .ys-ust-sag .ya-masa-ac { padding: 8px 10px; }
    .ys-ust-sag .ya-masa-ac span, .ys-ust-sag .ya-masa-ac kbd { display: none; }
    .ys-ust { gap: 8px; }
    .ys-ust .ys-durum { overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
}
.ya-cubuk.ya-alt .ya-stil { min-width: 134px !important; }
@media (pointer: coarse) { .ya-hiza-menu kbd { display: none; } .ya-hiza-menu button { width: 200px; } }

/* Araç çubuğu sığmazsa düğmeleri kesmek yerine ikinci satıra geçsin (her genişlikte hepsi görünür) */
.ys-yazi-modu .ya-cubuk:not(.ya-alt) { border-radius: 20px; align-items: center; }
.ys-yazi-modu .ya-cubuk:not(.ya-alt) .ya-dugmeler { flex-wrap: wrap; overflow: visible; row-gap: 2px; }

/* Yazı masasında da Docs'taki menü çubuğu ve tam araç çubuğu */
html.yazi-masasi .ya-menu { display: flex !important; justify-content: center; margin: 0 0 6px; }
html.yazi-masasi .ys-araclar { max-width: 1000px; }
html.yazi-masasi .ys-araclar .ya-menu { opacity: .45; transition: opacity .2s; }
html.yazi-masasi .ys-araclar:hover .ya-menu, html.yazi-masasi .ys-araclar:focus-within .ya-menu { opacity: 1; }
html.yazi-masasi .ys-araclar .ya-cubuk:not(.ya-alt) { width: fit-content; max-width: 100%; margin: 0 auto; }
html.yazi-masasi .ys-yazi-modu .ys-araclar { max-width: 1040px !important; }
html.yazi-masasi .ys-araclar .ya-cubuk:not(.ya-alt) { opacity: .6; }
html.yazi-masasi .ys-araclar .ya-menu { opacity: .6; }
/* Masada yazı sütunu dar (820px) ama araç çubuğu tek satıra sığsın diye sütundan taşar */
@media (min-width: 900px) {
    html.yazi-masasi .ys-yazi-modu .ys-araclar { width: min(1040px, calc(100vw - 32px)); max-width: none !important;
        margin-left: calc(50% - min(520px, 50vw - 16px)); margin-right: 0; }
}
@media (min-width: 900px) {
    html:not(.yazi-masasi) .ys-yazi-modu .ys-araclar { max-width: none; }
}
.ys-yazi-modu .ya-cubuk:not(.ya-alt) .ya-dugmeler { flex: 1 1 auto; min-width: 0; gap: 1px; }
.ya-dikte-yedek { margin: 6px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.7; }
.ya-dikte-yedek kbd { font: 600 11.5px ui-monospace, monospace; background: var(--sayfa); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; }
.ya-dikte-ara { max-width: 50vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ya-dugme[data-ya="sesle"].basili { background: #fee2e2; color: #b91c1c; }
