/* Yalnız hazır istem pilotu ve kütüphane. Mevcut tema jetonları kullanılır. */
.istem-pilot.ogren-main{overflow-y:auto;scroll-padding-block:20px}
.istem-blok{min-width:0;margin:20px 0;padding:20px;border:1px solid var(--cizgi);border-radius:12px;background:var(--yuzey)}
.istem-blok h2{margin:0 0 12px;font-size:1.2rem;line-height:1.4}
.istem-meta{color:var(--ikincil);margin:0 0 12px}
.istem-metin{white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;max-width:100%;margin:0 0 16px;padding:16px;background:var(--dolgu);border-radius:8px;color:var(--metin);font:inherit;line-height:1.65}
.istem-araclar{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.istem-dugme,.istem-kaynak{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:44px;min-height:44px;box-sizing:border-box;padding:10px 14px;font:inherit}
.istem-dugme{color:var(--metin);background:var(--bg);border:1px solid var(--cizgi);border-radius:8px;cursor:pointer}
.istem-dugme:hover{background:var(--dolgu)}
.istem-kaynak{color:var(--metin);text-decoration:underline;text-underline-offset:.2em}
.istem-kaynak:hover{color:var(--vurgu)}
.istem-onay{min-height:1.7em;margin:12px 0 0;color:var(--ikincil)}
.istem-uyari{display:flex;align-items:flex-start;gap:8px;margin:8px 0 0;color:var(--ikincil);font-size:.95rem;overflow-wrap:anywhere}
.istem-blok svg,.istem-kutuphane svg{width:20px;height:20px;flex:none}
.istem-uyari svg{margin-top:3px}
.istem-kutuphane{max-width:70rem;min-width:0}
.istem-kutuphane .ust a{display:inline-flex;align-items:center;gap:8px;min-width:44px;min-height:44px;padding:6px;color:var(--metin);text-decoration:underline}
.istem-filtreler{display:flex;flex-wrap:wrap;gap:16px;padding-block:12px}
.istem-filtre{display:flex;flex-direction:column;gap:6px;flex:1;min-width:0}
.istem-filtreler select{width:100%;min-width:44px;min-height:44px;padding:10px;font:inherit;color:var(--metin);border:1px solid var(--cizgi);border-radius:8px;background:var(--yuzey)}
.istem-liste{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.istem-liste .istem-blok{margin:0}
.istem-dugme:focus-visible,.istem-kaynak:focus-visible,.istem-metin:focus-visible,.istem-filtreler select:focus-visible{outline:2px solid var(--vurgu);outline-offset:3px}
.istem-kutuphane [hidden]{display:none!important}
@media(max-width:700px){.istem-liste{grid-template-columns:minmax(0,1fr)}.istem-filtreler{flex-direction:column}.istem-blok{padding:16px}.istem-kutuphane .ust{flex-wrap:wrap;gap:8px}}

/* Satırlar: aynı dört sütun, yalnız mevcut üç parça tonu. */
.istem-pilot .renk-sahne,.istem-sohbet .renk-sahne,.istem-kutuphane .renk-sahne,.istem-duzen .renk-sahne{--istem-renk:var(--p-sahne);--istem-y:var(--p-sahne-y)}
.istem-pilot .renk-gorev,.istem-sohbet .renk-gorev,.istem-kutuphane .renk-gorev,.istem-duzen .renk-gorev{--istem-renk:var(--p-gorev);--istem-y:var(--p-gorev-y)}
.istem-pilot .renk-kurallar,.istem-sohbet .renk-kurallar,.istem-kutuphane .renk-kurallar,.istem-duzen .renk-kurallar{--istem-renk:var(--p-kurallar);--istem-y:var(--p-kurallar-y)}
.istem-liste{display:block;border-top:1px solid var(--cizgi)}
.istem-sutunlar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2.4fr) 110px 260px;gap:18px;align-items:center}
.istem-sutunlar{padding:12px 16px;font-size:.85rem;font-weight:600}
/* Satır kabı: four columns; details ilk üç sütunda, kopyala düğmeleri dördüncüde (summary kardeşi). */
.istem-satir-kap{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2.4fr) 110px 260px;gap:18px;align-items:start;padding:0 16px;border-bottom:1px solid var(--cizgi);background:var(--yuzey);min-width:0}
.istem-satir{margin:0;min-width:0;grid-column:1/4;background:none}
.istem-satir-ust{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2.4fr) 110px;gap:18px;align-items:center;list-style:none;padding:18px 0;cursor:pointer;min-width:0;min-height:44px}
.istem-satir-ust::-webkit-details-marker{display:none}
.istem-satir-kap:hover{background:var(--dolgu)}
.istem-satir-ust:focus-visible{outline:2px solid var(--vurgu);outline-offset:-3px}
.istem-etiket{min-width:0;overflow-wrap:anywhere}
.istem-etiket h2{font-size:1rem;line-height:1.4;margin:0 0 4px}
.istem-etiket .istem-meta{font-size:.8rem;display:block}
.istem-etiket .istem-uyari{font-size:.75rem;line-height:1.5;margin-top:8px}
.istem-serit{display:flex;gap:6px;min-width:0}
.istem-parca{flex:1;min-width:0;border-left:3px solid var(--istem-renk,var(--cizgi));background:var(--istem-y,var(--dolgu));color:var(--metin);padding:8px}
.istem-parca strong{font-size:.78rem;display:block;margin-bottom:4px}
.istem-ozet{font-size:.85rem;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.istem-parca.renk-tek{border:0;background:none;padding:0}
.istem-agirlik{min-width:0;font-size:.8rem;color:var(--metin)}
.istem-kutuphane .istem-agirlik svg{width:100%;height:12px;display:block;margin-bottom:6px;overflow:hidden}
.istem-cubuk{fill:var(--istem-renk,var(--vurgu));transform-origin:left center}
.istem-kopya{min-width:0;align-self:start;text-align:center;grid-column:4;padding-top:18px}
.istem-kopya .istem-dugme{width:100%}
.istem-kopya .istem-onay{font-size:.75rem;margin-top:4px;line-height:1.4;min-height:1.4em}
.istem-satir-alt{padding:0 0 16px}
.istem-satir-alt .istem-metin{border-left:3px solid var(--cizgi)}
@media(prefers-reduced-motion:no-preference){
 .istem-satir-kap{animation:istem-gir 180ms ease-out both}
 .istem-satir-kap:nth-child(2){animation-delay:12ms}.istem-satir-kap:nth-child(3){animation-delay:24ms}.istem-satir-kap:nth-child(4){animation-delay:36ms}.istem-satir-kap:nth-child(5){animation-delay:48ms}.istem-satir-kap:nth-child(6){animation-delay:60ms}.istem-satir-kap:nth-child(7){animation-delay:72ms}.istem-satir-kap:nth-child(8){animation-delay:84ms}.istem-satir-kap:nth-child(9){animation-delay:96ms}
 .istem-cubuk{animation:istem-dol 220ms ease-out}
 .istem-kopyalandi{animation:istem-onay 180ms ease-out}
}
@keyframes istem-gir{from{transform:translateY(5px);opacity:.7}to{transform:none;opacity:1}}
@keyframes istem-dol{from{transform:scaleX(.05)}to{transform:scaleX(1)}}
@keyframes istem-onay{50%{transform:scale(1.03);border-color:var(--vurgu)}}
@media(max-width:899px){
 .istem-sutunlar{display:none}
 .istem-satir-kap{grid-template-columns:minmax(0,1fr);gap:0}
 .istem-satir{grid-column:1/-1}
 .istem-satir-ust{grid-template-columns:minmax(0,1fr);gap:14px;padding:16px 0}
 .istem-serit{flex-direction:column}
 .istem-etiket .istem-uyari{font-size:.85rem}
 .istem-kopya{grid-column:1/-1;width:100%;align-self:auto;padding:0 0 16px}
}
@media(prefers-reduced-motion:reduce){.istem-kart,.istem-kart *,.istem-kart *::before,.istem-kart *::after,.istem-blok *{animation:none!important;transition:none!important}}

/* Yalnız 1.1: çalışma alanı korunur; hazır isteme ana alanı kaydırarak ulaşılır. */
body:has([data-ogren]) main.istem-pilot:has(.istem-duzen){overflow-y:auto;scrollbar-gutter:stable}
.istem-pilot .istem-duzen{height:calc(100dvh - 116px);min-height:660px}
.istem-duzen .ogren-panel>header{flex-wrap:wrap}
.istem-duzen .ogren-panel>header h2{min-width:8rem}
.istem-duzen #panel-b p.istem-aciklama-parca{border-left:4px solid var(--istem-renk);background:var(--istem-y);color:var(--metin);padding:10px 12px;margin:8px 0;font-size:.9rem;line-height:1.5}
.istem-aciklama-parca strong{margin-right:.35em}
.istem-duzen .ders-parca>legend{color:var(--metin);border-left:3px solid var(--rk);padding:5px 8px}
.istem-duzen .ders-parca>legend.p-sahne{background:var(--p-sahne-y)}
.istem-duzen .ders-parca>legend.p-gorev{background:var(--p-gorev-y)}
.istem-duzen .ders-parca>legend.p-kurallar{background:var(--p-kurallar-y)}
.istem-ayirici,.istem-reset{display:none}
@media(min-width:901px){
 .istem-duzen:not(.ogren-buyuk)>.ogren-izgara{position:relative;grid-template-columns:minmax(220px,var(--istem-col,1fr)) minmax(220px,1fr);grid-template-rows:minmax(220px,var(--istem-row,1fr)) minmax(220px,1fr)}
 .istem-duzen:not(.ogren-buyuk) .istem-reset{display:inline-flex}
 .istem-duzen:not(.ogren-buyuk) .istem-ayirici{display:block;position:absolute;z-index:3;touch-action:none;user-select:none}
 .istem-ayirici-x{width:44px;height:100%;top:0;left:calc(var(--istem-v-pos,50%) - 22px);cursor:col-resize}
 .istem-ayirici-y{height:44px;width:100%;left:0;top:calc(var(--istem-h-pos,50%) - 22px);cursor:row-resize}
 .istem-ayirici::after{content:"";position:absolute;background:var(--cizgi);border-radius:4px}
 .istem-ayirici-x::after{width:4px;height:40px;left:20px;top:calc(25% - 20px)}
 .istem-ayirici-y::after{height:4px;width:40px;top:20px;left:calc(25% - 20px)}
 .istem-ayirici:hover::after,.istem-ayirici:focus-visible::after{background:var(--vurgu)}
 .istem-ayirici:focus-visible{outline:2px solid var(--vurgu);outline-offset:-2px}
}
.istem-duzen #panel-a .ogren-ic{display:flex;flex-direction:column;gap:6px}
.istem-video-kap{flex:1;min-height:0;min-width:0;display:flex}
.istem-duzen #ogren-anlatim{flex:1;min-width:0;min-height:0;display:grid;place-items:center;container-type:size}
.istem-duzen #ogren-anlatim video{width:min(100cqw,calc(100cqh * 16 / 9));height:auto;max-height:100%;aspect-ratio:16/9;object-fit:contain;border-radius:8px;background:var(--dolgu)}
.istem-video-kontroller{flex:none;display:grid;grid-template-columns:auto minmax(44px,1fr) 3rem;gap:8px;align-items:center;color:var(--metin);font-size:.75rem}
.istem-video-kontroller input{min-width:44px;min-height:44px;width:100%;margin:0;accent-color:var(--vurgu)}
.istem-video-kontroller output{text-align:right}
@media(max-width:900px){.istem-pilot .istem-duzen{height:100%;min-height:0}.istem-reset{display:none!important}}

.istem-etiket h2{display:flex;align-items:center;gap:6px;justify-content:space-between}
.istem-etiket h2 svg{width:16px;height:16px;flex:none}
.istem-satir[open] .istem-etiket h2 svg{transform:rotate(180deg)}

/* Tam şablon ve yalnız yerel verilerle çalışan sohbet gösterimi. */
.istem-tam-parcalar{display:grid;gap:16px;margin:16px 0}
.istem-tam-parca{border-left:4px solid var(--istem-renk);background:var(--istem-y);padding:16px;color:var(--metin);min-width:0;overflow-wrap:anywhere}
.istem-tam-metin{white-space:pre-wrap;margin:12px 0}
.istem-alan{display:inline-block;border:1px solid var(--istem-renk);background:var(--yuzey);border-radius:4px;padding:6px;max-width:100%}
.istem-ornek{display:block;color:var(--ikincil);margin-top:6px}
.istem-neden{font-size:.85rem;margin:12px 0 0}
.istem-kopya{display:grid;grid-template-columns:1.5fr 1fr;gap:8px}
.istem-kopya .istem-onay{grid-column:1/-1}
.istem-sohbet{position:fixed;z-index:220;right:16px;top:16px;bottom:16px;width:min(440px,45vw);box-sizing:border-box;padding:20px;background:var(--yuzey);color:var(--metin);border:1px solid var(--cizgi);border-radius:12px;box-shadow:0 8px 32px var(--cizgi);overflow-y:auto}
.istem-sohbet[hidden]{display:none}
.istem-sohbet h2{font-size:1.3rem;margin:0 0 12px}
.istem-sohbet-uyari{position:sticky;top:0;background:var(--yuzey);padding:8px 0;font-weight:600;z-index:1}
.istem-sohbet textarea{box-sizing:border-box;width:100%;min-height:140px;padding:12px;background:var(--dolgu);color:var(--metin);border:1px solid var(--cizgi);font:inherit;border-radius:8px;margin:8px 0}
.istem-sohbet-parca{white-space:pre-wrap;border-left:4px solid var(--istem-renk,var(--vurgu));background:var(--istem-y,var(--dolgu));padding:8px;min-height:1em}
.istem-yaziliyor{outline:2px solid var(--istem-renk,var(--vurgu))}
.istem-sohbet-cevap{background:var(--dolgu);border:1px solid var(--cizgi);border-radius:8px;padding:12px;line-height:1.7}
@media(max-width:899px){
 .istem-kopya{grid-template-columns:1fr}
 .istem-sohbet{top:auto;bottom:0;left:0;right:0;width:100%;max-height:85dvh;border-radius:16px 16px 0 0}
}
.istem-sohbet-parcalar{margin:12px 0}
.istem-sohbet textarea{height:88px;min-height:88px}
.istem-sohbet-gonder{position:sticky;bottom:8px;z-index:2}
