/* Tryr Drama · senaryo ekranı (2026-11-20, Faz 1; düzen 2026-11-21). Try-on/Müzik düzeni: solda kurulum konsolu,
   sağda sahne (öncüller, yazım iskeleti, senaryo). Ölçüler muzik.css `.m-studyo` ile aynı. Bileşenler Ses sayfasından
   (ses.css: kart, bölüm, seçici, düğmeler). Renkler style.css :root belirteçlerinden. */
.d-studyo {
  width: 100%; max-width: 1240px; margin: 0 auto; box-sizing: border-box;
  display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 28px;
  padding: 28px 24px 56px; align-items: start;
}
@media (min-width: 1024px) and (min-height: 780px) { .d-konsol { position: sticky; top: 16px; } }
.d-konsol .s-dugme-birincil, .d-sahne .s-dugme-birincil { margin-left: 0; }
.d-konsol p.s-giris { color: var(--ink-soft); }
#d-konsol-ic[hidden], .d-alan[hidden], .d-sahne[hidden], .d-bos[hidden], .d-oncul-kutu[hidden], .d-bekle[hidden], .d-senaryo[hidden], .d-yapim[hidden], .d-kur-eylem button[hidden] { display: none; }

/* Ürün: seçicinin yanında çekimin ilk karesi. */
.d-urun { display: flex; align-items: center; gap: 12px; }
.d-urun select { flex: 1; min-width: 0; }
.d-urun-gorsel[hidden] { display: none; }
.d-urun-gorsel { display: block; flex: none; width: 56px; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--paper); border: 1px solid var(--rule); }
.d-urun-gorsel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-urun-gorsel img[hidden] { display: none; }

.d-alan { margin-top: 12px; display: grid; gap: 10px; }
.d-alan .s-not { margin: 0; }
.d-alan .s-satir { margin-bottom: 0; }
.d-alan textarea { width: 100%; }
.d-kur-eylem { display: flex; justify-content: flex-end; padding: 14px 20px; }
.d-kur-eylem button { min-width: 168px; }
.d-kur-eylem button:active:not(:disabled) { transform: translateY(1px); }

/* ── Sahne ─────────────────────────────────────────────────────────── */
.d-sahne { min-width: 0; }

/* Boş durum: bölümün dört kısmını bir cetvelde gösterir. */
.d-bos { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 440px; box-sizing: border-box; padding: 40px 28px; border: 1.5px dashed var(--edge); border-radius: 18px; background: rgba(255,255,255,.6); text-align: center; }
.d-bos p { margin: 0; max-width: 46ch; font-size: 14px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.d-bos .d-bos-baslik { margin: 26px 0 6px; font-size: 17px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.d-cetvel { display: grid; grid-template-columns: 3fr 5fr 8fr 4fr; gap: 4px; width: 100%; max-width: 520px; }
.d-cetvel span { display: flex; align-items: flex-end; min-height: 64px; padding: 8px 10px; box-sizing: border-box; border-radius: 10px; background: #fff; border: 1px solid var(--rule); font-size: 12px; font-weight: 700; line-height: 1.2; color: var(--ink-soft); text-align: left; overflow: hidden; }
.d-cetvel span:nth-child(3) { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Öncüller: numaralı üç satır. */
.d-oncul-kutu h2, .d-senaryo-bas h2 { margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; }
.d-oncul-kutu h2 { font-size: 18px; margin: 4px 0 14px; }
.d-onculler { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 12px; counter-reset: oncul; }
.d-oncul { counter-increment: oncul; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 14px; padding: 18px 20px 16px; background: var(--card); border: 1px solid var(--rule); border-radius: 16px; transition: border-color .15s, box-shadow .15s; }
.d-oncul:hover { border-color: var(--edge); box-shadow: 0 10px 26px rgba(14,19,32,.06); }
.d-oncul::before { content: counter(oncul, decimal-leading-zero); grid-row: 1 / span 3; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; color: var(--dim); font-variant-numeric: tabular-nums; }
.d-oncul > * { grid-column: 2; }
.d-oncul p { margin: 0; }
.d-oncul-durum { font-size: 16px; line-height: 1.45; font-weight: 600; color: var(--ink); text-wrap: pretty; }
.d-oncul-ek { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin-top: 10px; }
.d-oncul-ek p { font-size: 13px; line-height: 1.45; color: var(--ink-soft); }
.d-oncul-ek b { display: block; margin-bottom: 2px; font-size: 11.5px; font-weight: 800; letter-spacing: .02em; color: var(--muted); }
.d-oncul button { justify-self: start; margin-top: 14px; border-color: var(--ink); transition: background-color .15s, color .15s; }
.d-oncul button:hover:not(:disabled) { background: var(--ink); color: #fff; }
.d-oncul button:active:not(:disabled) { transform: translateY(1px); }
.d-oncul-iskelet { height: 148px; border-radius: 16px; border: 1px solid var(--rule); }

/* Yazım sürerken: parçaların yerinde iskelet, geçen süreyle. */
.d-bekle > p { margin: 4px 0 14px; color: var(--ink-soft); font-size: 14px; font-weight: 600; }
.d-bekle > p b { margin-left: 6px; color: var(--ink); font-variant-numeric: tabular-nums; }
.d-iskelet { padding: 18px 20px 20px; margin-bottom: 14px; background: var(--card); border: 1px solid var(--rule); border-radius: 16px; }
.d-iskelet i, .d-iskelet b, .d-oncul-iskelet { display: block; background: linear-gradient(90deg, var(--paper), #eef0f5, var(--paper)); background-size: 200% 100%; animation: d-parilti 1.4s linear infinite; }
.d-iskelet i { height: 20px; width: 38%; border-radius: 6px; }
.d-iskelet b { height: 12px; margin-top: 12px; border-radius: 6px; }
.d-iskelet b:nth-of-type(1) { margin-top: 18px; height: 40px; border-radius: 10px; }
.d-iskelet b:nth-of-type(3) { width: 62%; }
@keyframes d-parilti { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .d-iskelet i, .d-iskelet b, .d-oncul-iskelet { animation: none; } }

/* ── Senaryo ───────────────────────────────────────────────────────── */
.d-senaryo-bas { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 4px; }
.d-senaryo-bas .s-ikincil { flex: none; }
.d-plot { margin: 10px 0 14px; max-width: 68ch; color: var(--ink-soft); font-size: 15px; line-height: 1.55; text-wrap: pretty; }
.d-kadro { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.d-kisi { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--rule); font-size: 13px; color: var(--ink-soft); }
.d-kisi b { color: var(--ink); }

/* Bölüm şeridi: parçalar sürelerine göre orantılı; tıklayınca parçaya iner. */
.d-serit { display: flex; gap: 4px; margin-bottom: 20px; }
.d-serit a { flex: var(--pay, 1) 1 0; min-width: 44px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-height: 68px; padding: 8px 10px; box-sizing: border-box; border-radius: 10px; background: #fff; border: 1px solid var(--rule); color: var(--ink); text-decoration: none; overflow: hidden; transition: border-color .15s, background-color .15s; }
.d-serit a:hover { border-color: var(--ink); }
.d-serit a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.d-serit b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.d-serit span { font-size: 11.5px; font-weight: 700; line-height: 1.2; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.d-parca { background: var(--card); border: 1px solid var(--rule); border-radius: 16px; margin-bottom: 14px; scroll-margin-top: 16px; }
.d-parca-bas { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: baseline; gap: 0 14px; padding: 18px 20px 0; }
.d-parca-no { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--dim); font-variant-numeric: tabular-nums; }
.d-parca-bas h3 { margin: 0; font-size: 16px; letter-spacing: -0.005em; }
.d-parca-bas h3 span { margin-left: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.d-parca-ozet { margin: 6px 20px 0 78px; max-width: 62ch; font-size: 14.5px; line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }

/* Plan şeridi: parçanın planları sürelerine göre orantılı; koyu plan replik taşır. */
.d-plan-serit { display: flex; gap: 3px; margin: 14px 20px 0 78px; }
.d-plan-serit span { flex: var(--pay, 1) 1 0; min-width: 0; padding: 6px 8px; border-radius: 8px; background: var(--paper); font-size: 11.5px; font-weight: 700; line-height: 1.25; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-plan-serit span b { display: block; font-size: 12.5px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.d-plan-serit span.d-sozlu { background: var(--ink); color: var(--dim); }
.d-plan-serit span.d-sozlu b { color: #fff; }

.d-replikler { list-style: none; margin: 14px 20px 0 78px; padding: 0; display: grid; gap: 8px; }
.d-replik { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: start; gap: 10px; }
.d-replik b { font-size: 13px; font-weight: 800; line-height: 44px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-replik textarea { font: inherit; font-size: 14.5px; line-height: 1.4; min-height: 44px; padding: 10px 12px; box-sizing: border-box; width: 100%; resize: vertical; color: var(--ink); background: #fff; border: 1.5px solid var(--edge); border-radius: 10px; transition: border-color .15s; }
.d-replik textarea:hover { border-color: var(--ink-soft); }
.d-replik textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(14,19,32,.08); }
.d-sessiz { margin: 14px 20px 0 78px; font-size: 13px; color: var(--muted); }

.d-ayrinti { margin: 14px 20px 0 78px; }
.d-ayrinti summary { display: inline-flex; align-items: center; min-height: 36px; font-size: 13px; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.d-ayrinti summary:hover { color: var(--ink); }
.d-ayrinti summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.d-ayrinti ol { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.d-ayrinti li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.d-ayrinti li b { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }

.d-parca-ayar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; margin-top: 16px; padding: 8px 20px 8px 78px; border-top: 1px solid var(--rule); }
.d-parca-ayar label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.d-parca-ayar select { font: inherit; font-size: 13px; font-weight: 600; min-height: 36px; padding: 0 10px; border: 1px solid var(--edge); border-radius: 9px; background: #fff; color: var(--ink); }
.d-parca-ayar input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.d-parca-ayar .s-not { margin: 0 0 8px; flex: 1 1 100%; }
.d-parca-ayar .s-not[hidden] { display: none; }

/* Üretim: referans listesi ve video modeli */
.d-ur-bas { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 16px; }
.d-ur-bas h4 { margin: 0; font-size: 14px; color: var(--ink); }
.d-ur-bas b { font-size: 14px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
#d-uretim > .s-not { margin: 4px 0 12px; max-width: 62ch; }
.d-ref { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 10px 16px; margin: 0 0 6px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.d-ref dt { font-size: 13px; font-weight: 700; line-height: 30px; color: var(--ink-soft); }
.d-ref dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.d-ref-cip { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border-radius: 8px; background: var(--paper); font-size: 13px; font-weight: 600; color: var(--ink); }
#d-uretim .s-seg { margin-top: 10px; max-width: 100%; }
#d-uretim .s-seg input:disabled + span { color: var(--dim); text-decoration: line-through; cursor: not-allowed; }
.d-ur-et { margin: 14px 0 0; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.d-fiyat-tablo tfoot tr.d-ara td { font-weight: 600; color: var(--ink-soft); border-bottom: 1px solid var(--rule); }

/* Denetim ve fiyat */
.d-kutu { padding: 18px 20px; margin-bottom: 14px; }
.d-kutu h3 { margin: 0 0 10px; font-size: 16px; }
.d-kutu h4 { margin: 14px 0 6px; font-size: 12.5px; font-weight: 800; color: var(--ink-soft); }
.d-kutu ul { margin: 0; padding-left: 18px; }
.d-kutu li { font-size: 14px; line-height: 1.45; margin-bottom: 6px; color: var(--ink); }
.d-kutu li small { display: block; color: var(--muted); font-size: 12.5px; }
.d-hata-liste li { color: var(--accent-dark); }
.d-temiz { margin: 0; font-size: 14px; color: var(--green); font-weight: 700; }
.d-fiyat-tablo { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.d-fiyat-tablo th, .d-fiyat-tablo td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--rule); }
.d-fiyat-tablo th { font-size: 12px; color: var(--muted); font-weight: 700; }
.d-fiyat-tablo td:last-child, .d-fiyat-tablo th:last-child { text-align: right; }
.d-fiyat-tablo tfoot td { border-bottom: 0; font-weight: 800; }

/* Eylem çubuğu: sahnenin altına yapışır; toplam hep görünür. */
.d-eylem { position: sticky; bottom: 12px; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 12px; padding: 12px 12px 12px 20px; background: #fff; border: 1px solid var(--rule); border-radius: 16px; box-shadow: var(--shadow-lg); }
.d-toplam { margin: 0 auto 0 0; font-size: 13.5px; color: var(--muted); }
.d-toplam b { margin-left: 4px; font-size: 16px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.d-eylem .s-not { margin: 0; flex: 1 1 100%; order: -1; color: var(--accent-dark); font-weight: 600; }
.d-eylem .s-not[hidden] { display: none; }

/* ── Yapım: referans ızgarası ve video ─────────────────────────────── */
.d-yapim-durum { margin: 10px 0 18px; max-width: 68ch; font-size: 15px; line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }
.d-yapim-durum.d-tamam { color: var(--green); font-weight: 700; }
.d-yapim-durum.d-dustu { color: var(--accent-dark); font-weight: 600; }
.d-yapim .s-hata { padding: 0; margin: 0 0 14px; }
.d-ref-izgara { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.d-ref-kart { display: flex; flex-direction: column; min-width: 0; background: var(--card); border: 1px solid var(--rule); border-radius: 16px; overflow: hidden; }
.d-ref-tur-kisi, .d-ref-tur-nesne { grid-column: span 2; }
.d-ref-ortam { position: relative; aspect-ratio: 16 / 9; background: var(--paper); }
.d-ref-tur-mekan .d-ref-ortam { aspect-ratio: 9 / 16; max-height: 320px; }
.d-ref-ortam a { display: block; width: 100%; height: 100%; }
.d-ref-ortam img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-ref-tur-mekan .d-ref-ortam img { object-fit: cover; }
.d-ref-ortam.d-ref-ses { aspect-ratio: auto; padding: 14px 12px; }
.d-ref-ortam.d-ref-ses audio { width: 100%; height: 40px; display: block; }
.d-ref-bekle, .d-ref-hata { display: grid; place-items: center; }
.d-ref-bekle { background: linear-gradient(90deg, var(--paper), #eef0f5, var(--paper)); background-size: 200% 100%; animation: d-parilti 1.4s linear infinite; }
.d-ref-bekle span, .d-ref-hata span { padding: 0 14px; text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.d-ref-hata span { color: var(--accent-dark); }
.d-ref-alt { display: grid; gap: 2px; padding: 12px 14px 14px; }
.d-ref-alt b { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-ref-alt > span { font-size: 12.5px; color: var(--muted); }
.d-ref-yenile { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.d-ref-yenile input { flex: 1 1 160px; min-width: 0; font: inherit; font-size: 13.5px; min-height: 40px; padding: 0 12px; box-sizing: border-box; border: 1.5px solid var(--edge); border-radius: 10px; background: #fff; color: var(--ink); }
.d-ref-yenile input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(14,19,32,.08); }
.d-ref-yenile button { flex: 1 0 auto; min-height: 40px; padding: 0 12px; }
.d-yapim-video { margin-top: 28px; padding: 20px; background: var(--card); border: 1px solid var(--rule); border-radius: 16px; }
.d-yapim-video h3 { margin: 0 0 12px; font-size: 16px; }
.d-bolum-video { display: block; width: 100%; max-width: 320px; aspect-ratio: 9 / 16; border-radius: 12px; background: var(--dark); margin-bottom: 12px; }
.d-indir { display: inline-flex; margin-bottom: 14px; text-decoration: none; }
.d-parca-durum { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 0; }
.d-parca-durum li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.d-parca-durum li:last-child { border-bottom: 0; }
.d-parca-durum b { min-width: 72px; color: var(--ink); }
.d-parca-durum span { color: var(--muted); font-variant-numeric: tabular-nums; }
.d-parca-durum .d-pd-hazir span { color: var(--green); font-weight: 700; }
.d-parca-durum .d-pd-basarisiz span { color: var(--accent-dark); font-weight: 700; }
.d-parca-durum a { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--ink-soft); text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .d-ref-bekle { animation: none; } }

@media (max-width: 1023px) {
  .d-studyo { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 20px 16px 40px; }
  .d-bos { min-height: 0; padding: 32px 20px; }
}
@media (max-width: 640px) {
  .d-oncul { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .d-oncul::before { grid-row: auto; font-size: 16px; }
  .d-oncul > * { grid-column: 1; }
  .d-oncul-ek { grid-template-columns: minmax(0, 1fr); }
  .d-parca-bas { grid-template-columns: 30px minmax(0, 1fr); gap: 0 8px; padding: 16px 16px 0; }
  .d-parca-ozet, .d-plan-serit, .d-replikler, .d-sessiz, .d-ayrinti { margin-left: 16px; margin-right: 16px; }
  .d-parca-ayar { padding-left: 16px; padding-right: 16px; }
  .d-replik { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .d-replik b { line-height: 1.4; }
  .d-cetvel span { min-height: 56px; padding: 6px; font-size: 11px; }
  .d-ref { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .d-ref-tur-kisi, .d-ref-tur-nesne { grid-column: auto; }
  .d-ref dd { margin-bottom: 8px; }
  .d-kur-eylem button, .d-eylem button { flex: 1 1 100%; }
  .d-toplam { flex: 1 1 100%; }
  /* Dar ekranda üç satırlık çubuk ekranı kapatır: yapışmaz, senaryonun sonunda durur. */
  .d-eylem { position: static; padding: 14px 16px; box-shadow: none; }
}
