/* Bugün, Taslaklar ve Taslak editörü görünümleri (+ components/draft-parts.js).
   Renkler base.css değişkenlerinden gelir; açık/koyu temaya kendiliğinden uyar. */

:root {
  --ig: #b1246f;
  --ig-soft: #fbe6f1;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ig: #f07ab8;
    --ig-soft: #3a1a2c;
  }
}

.view.is-busy { cursor: progress; }

/* ---------- Ortak taslak parçaları (dp-) ---------- */
.dp-platform { border-color: var(--border); }
.dp-platform--x { background: var(--text); color: var(--surface); border-color: var(--text); }
.dp-platform--instagram { background: var(--ig-soft); color: var(--ig); border-color: var(--ig); }
.dp-platform--unknown { background: var(--surface-2); color: var(--muted); }

.dp-tag {
  display: inline-flex; align-items: baseline; gap: 0.45rem;
  padding: 0.3rem 0.75rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); font-size: 0.92rem;
}
.dp-tag__label { font-weight: 600; }
.dp-tag__meta { color: var(--muted); font-size: 0.85rem; }

.dp-readiness { width: 100%; }
.dp-blockers { margin: 0.45rem 0 0; padding-left: 1.15rem; display: flex; flex-direction: column; gap: 0.4rem; }
.dp-blockers li::marker { color: var(--warn); }
.dp-blockers__msg { display: block; font-weight: 600; font-size: 0.93rem; }
.dp-blockers__action { display: block; font-size: 0.85rem; color: var(--muted); }
.dp-warnings { margin: 0.55rem 0 0; padding-left: 1.15rem; font-size: 0.87rem; color: var(--muted); display: flex; flex-direction: column; gap: 0.25rem; }

.dp-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 0.75rem; margin: 0.7rem 0 0.3rem; }
.dp-checks__item { display: flex; flex-direction: column; gap: 0.15rem; margin: 0; }
.dp-checks dt { font-size: 0.8rem; color: var(--muted); }
.dp-checks dd { margin: 0; }

.dp-claims__list { list-style: none; margin: 0.3rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.dp-claims__list li { display: flex; gap: 0.45rem; align-items: flex-start; font-size: 0.9rem; }
.dp-claims__list .badge { flex-shrink: 0; }
.dp-claims__text { overflow-wrap: anywhere; }

.dp-why { margin: 0; padding-left: 1.15rem; font-size: 0.92rem; display: flex; flex-direction: column; gap: 0.25rem; }

.dp-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.dp-links__item { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.9rem; }
.dp-links__excerpt { color: var(--muted); overflow-wrap: anywhere; }

.dp-figure { margin: 0.7rem 0 0; }
.dp-figure__caption { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.dp-canvas { height: auto; }
.dp-thumb {
  display: grid; place-items: center; min-height: 160px; padding: 0.75rem;
  background: var(--surface-2); border-radius: var(--radius-sm); text-align: center;
}
.dp-thumb.is-ready { display: block; min-height: 0; padding: 0; background: none; }
/* Dosyası diskte olmayan görsel: kırık <img> yerine açık uyarı kutusu */
.dp-thumb--missing {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 0.4rem;
  min-height: 120px; border: 2px dashed var(--danger); background: var(--surface);
}
.dp-missing--file .dp-missing__title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.dp-noimage { margin: 0.6rem 0 0; }

.dp-missing { margin-top: 0.7rem; }
.dp-missing__title { display: block; font-size: 1rem; margin-bottom: 0.3rem; }
.dp-missing__desc { margin-bottom: 0.3rem; }
.dp-missing__steps { margin: 0.35rem 0 0.7rem; padding-left: 1.25rem; font-size: 0.9rem; display: flex; flex-direction: column; gap: 0.2rem; }

.dp-media-status__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.dp-media-status__list li { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.dp-media-status__name { font-size: 0.9rem; overflow-wrap: anywhere; }
.dp-credit-note { margin: 0.45rem 0 0; font-size: 0.87rem; font-weight: 600; color: var(--warn); }

.dp-choices {
  margin-top: 0.6rem; padding: 0.75rem 0.85rem;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.dp-choices__title { font-weight: 600; font-size: 0.92rem; margin-bottom: 0.5rem; }
.dp-choices__list { list-style: none; margin: 0 0 0.35rem; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.dp-choices__item { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.dp-choices__chip { min-height: 40px; min-width: 7.5rem; justify-content: center; font-weight: 600; }
.dp-choices__chip:disabled { opacity: 0.55; cursor: not-allowed; }
.dp-choices__help { flex: 1 1 12rem; font-size: 0.85rem; color: var(--muted); }

/* ---------- Bugün (tm-) ---------- */
.tm-header h1 { margin: 0; }
.tm-date { font-size: 1.1rem; font-weight: 600; margin: 0.1rem 0 0.3rem; }
.tm-intro { color: var(--muted); margin: 0; }
.tm-pool { margin: 0; }

.tm-recent { margin: 0 0 1.1rem; }
.tm-recent__title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 0.45rem; }
.tm-recent__list { list-style: none; margin: 0 0 0.35rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.45rem; }

.tm-grid { align-items: stretch; }
.tm-card { display: flex; flex-direction: column; min-width: 0; scroll-margin-top: 5rem; }
.tm-card--published { border-color: var(--ok); }
.tm-card--empty {
  border-style: dashed; box-shadow: none; background: transparent;
  justify-content: center; align-items: flex-start; gap: 0.6rem; min-height: 220px;
}
.tm-card__slot { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 0 0.2rem 0 0; }
.tm-empty__msg { font-size: 1rem; margin: 0; }
.tm-card .card__title { font-size: 1.2rem; overflow-wrap: anywhere; }
.tm-published { margin-top: 0; }

.tm-readiness { display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; margin-bottom: 0.6rem; }

.tm-textwrap { margin-top: 0.1rem; }
.tm-text { font-size: 1rem; margin: 0 0 0.2rem; }
.tm-clamp.is-clamped {
  max-height: 13.5em; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
}
.dp-why.tm-clamp.is-clamped { max-height: 8.5em; }
.tm-textwrap .counter { margin: 0; }

.tm-card .dp-canvas { width: auto; max-width: 100%; max-height: 320px; margin: 0 auto; }
/* Kartın görseli (media-ui mediaThumb 'large'): fotoğrafın tamamı görünsün (kırpılmaz) */
.tm-card .dp-figure .mu-thumb--large { max-height: 320px; }
.dp-figure .mu-thumb--large .mu-thumb__img { object-fit: contain; }
.dp-figure .dp-media-thumb { margin-bottom: 0.35rem; }

.tm-card__foot { padding-top: 0.2rem; }
.tm-details { margin-top: 0.4rem; }
.tm-actions .btn { flex: 1 1 calc(50% - 0.4rem); min-height: 44px; }
.tm-actions .btn.is-selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.tm-footer { margin: 1.6rem 0 0; text-align: center; color: var(--muted); font-size: 0.92rem; }

/* ---------- Taslaklar (dl-) ---------- */
.dl-intro { margin: 0.2rem 0 0; }
.dl-filters {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem 1rem; align-items: end; margin-bottom: 0.75rem;
}
.dl-filters .field { margin-bottom: 0; }
.dl-check { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.5rem; min-height: 32px; font-size: 0.92rem; cursor: pointer; }
.dl-check input { width: 1.1rem; height: 1.1rem; }
.dl-count { margin: 0 0 0.5rem; }
.dl-results[aria-busy="true"] { opacity: 0.6; }

.dl-row {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
  padding: 0.85rem 1rem; background: var(--surface); color: var(--text); text-decoration: none;
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.dl-row:hover { border-color: var(--accent); }
.dl-row__main { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.dl-row__title { font-weight: 700; font-size: 1.05rem; overflow-wrap: anywhere; }
.dl-row__meta { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.dl-row__blockers { font-size: 0.87rem; color: var(--warn); }
.dl-row__side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; flex-shrink: 0; text-align: right; }
.dl-empty p:last-child { margin-bottom: 0; }

/* ---------- Taslak editörü (ed-) ---------- */
.ed-head { margin-bottom: 1rem; }
.ed-back { display: inline-block; margin-bottom: 0.3rem; font-weight: 600; text-decoration: none; }
.ed-back:hover { text-decoration: underline; }
.ed-title { font-size: 1.5rem; margin: 0.2rem 0 0.45rem; overflow-wrap: anywhere; }
.ed-meta { margin-bottom: 0.4rem; }

.ed-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.ed-form, .ed-side { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.ed-section__title { font-size: 1.05rem; margin-bottom: 0.75rem; }
.ed-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 1rem; }
.ed-counter { margin: -0.4rem 0 0; }
.field__hint.is-error { color: var(--danger); font-weight: 600; }

.ed-slide { background: var(--surface); }
.ed-slide__tools { justify-content: flex-end; }

.ed-claim {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem; margin-bottom: 0.75rem; background: var(--surface);
}
.ed-claim.is-removed { background: var(--surface-2); }
.ed-claim.is-removed textarea { color: var(--muted); }
.ed-claim__tools { margin-top: 0.5rem; }
.ed-sources__title { font-weight: 600; font-size: 0.9rem; margin: 0.2rem 0 0.3rem; }
.ed-source { border-top: 1px dashed var(--border); padding-top: 0.6rem; margin-top: 0.4rem; }
.ed-source__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 0.75rem; }
.ed-source__foot { gap: 0.75rem; }

.ed-check { display: flex; align-items: center; gap: 0.55rem; min-height: 40px; font-weight: 600; cursor: pointer; }
.ed-check input { width: 1.2rem; height: 1.2rem; }
.ed-steps { margin: 0.6rem 0; }
.ed-steps ol { margin: 0.4rem 0 0; padding-left: 1.25rem; font-size: 0.92rem; }
.ed-media__tools { margin: 0.6rem 0 0.2rem; }

.ed-media-list { list-style: none; margin: 0.6rem 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.ed-media {
  display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 0.9rem;
  padding: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.ed-media--missing { display: block; }
.ed-media--lost { border-color: var(--danger); }
.ed-media__lost { color: var(--danger); font-weight: 600; margin: 0.2rem 0 0.4rem; }
.ed-media__thumb .mu-thumb__img { object-fit: contain; }
.ed-media__body { min-width: 0; }
.ed-media__body .row { margin-bottom: 0.3rem; }
.ed-media__name { overflow-wrap: anywhere; }

.ed-library {
  list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.6rem; max-height: 55vh; overflow: auto;
}
.ed-library__item {
  display: flex; flex-direction: column; gap: 0.3rem; width: 100%; height: 100%; padding: 0.4rem;
  border: 2px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
}
.ed-library__item:hover { border-color: var(--text); }
.ed-library__item.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.ed-library__name { font-size: 0.85rem; overflow-wrap: anywhere; }

.ed-editorial { margin-bottom: 0.75rem; }

/* Arşiv bağlantıları: düzenlenebilir liste + ekleme satırı */
.ed-links__add { margin-top: 0.8rem; }
.ed-links__row { display: flex; gap: 0.5rem; align-items: center; }
.ed-links__row input { flex: 1 1 auto; min-width: 0; }
.ed-links__row .btn { flex-shrink: 0; }

/* İşlem sürerken form salt okunur: görsel ipucu */
.is-busy .ed-form input:read-only,
.is-busy .ed-form textarea:read-only { background: var(--surface-2); }

.ed-readiness__head { margin-bottom: 0.2rem; }
/* "Metinde kaynak gerektiren iddia yok" onayı */
.ed-attest { margin-top: 0.75rem; }
.ed-attest__lead { margin: 0 0 0.4rem; }
.ed-attest__state { font-weight: 600; margin: 0 0 0.4rem; }
.ed-attest__buttons { margin: 0.5rem 0 0; }
.ed-attest__buttons .btn--primary { white-space: normal; text-align: left; }
.ed-status { margin-bottom: 0.6rem; }
.ed-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem; }

.ed-preview-host { min-height: 3rem; }
.ed-preview__label { margin: 0 0 0.5rem; }
.ed-preview { display: flex; flex-direction: column; gap: 0.75rem; }
.ed-preview--strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 78%);
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.4rem;
}
.ed-preview__item { margin: 0; scroll-snap-align: start; }
.ed-preview__canvas { width: 100%; height: auto; }
.ed-preview__item figcaption { margin-top: 0.3rem; }
.ed-textpreview {
  background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 0.85rem 1rem; max-height: 24rem; overflow: auto;
}

/* ---------- V3: görsel (fotoğraf/video) ---------- */
/* Küçük görseller media-ui mediaThumb ile çizilir (css/media.css .mu-thumb); video asla canvas'a çizilmez */
.dp-desc { margin: 0.2rem 0; overflow-wrap: anywhere; }
.dp-visual { display: flex; flex-direction: column; gap: 0.5rem; }
.dp-blockers__tools { margin: 0.35rem 0 0.2rem; }
.dp-blockers__tools .row { gap: 0.4rem; }

/* Önerilen görseller (Bugün kartı + editör): yalnız öneri, dokunmadan eklenmez */
.dp-suggest { margin-top: 0.6rem; padding: 0.6rem; border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.dp-suggest__title { margin: 0 0 0.45rem; font-size: 0.9rem; }
.dp-suggest__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.dp-suggest__item { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 0.6rem; align-items: start; }
.dp-suggest__thumb .mu-thumb--small { width: 88px; height: 88px; }
.dp-suggest__thumb .dp-thumb { min-height: 88px; padding: 0.3rem; font-size: 0.75rem; }
.dp-suggest__body { min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; align-items: flex-start; }
.dp-suggest__badges { gap: 0.3rem; }
.dp-suggest__why { margin: 0; }
.dp-suggest__rights { margin: 0; color: var(--warn); }
.dp-suggest__body .btn { min-height: 44px; }

/* Editör görsel bölümü */
.ed-media__policy { margin: 0 0 0.5rem; color: var(--muted); }
.ed-media__policy.is-real { color: var(--warn); font-weight: 600; }
.ed-format-helper { margin: 0.4rem 0 0.6rem; }
.ed-format-helper p { margin: 0 0 0.4rem; }
.ed-media__pos { font-weight: 700; color: var(--muted); }
.ed-media--blocked { border-color: var(--danger); background: var(--danger-soft); }
.ed-media__prov { list-style: none; margin: 0.2rem 0 0.35rem; padding: 0; display: flex; flex-direction: column; gap: 0.1rem; overflow-wrap: anywhere; }
.ed-media__order { gap: 0.4rem; }
.ed-media__order .btn { min-height: 40px; }
.ed-media__progress { align-self: center; }
.ed-quickrights { margin: 0.4rem 0 0.6rem; }
.ed-suggest { margin: 0.6rem 0; }
.ed-attr { margin-top: 0.5rem; }
.ed-attr p { margin: 0 0 0.4rem; overflow-wrap: anywhere; }

/* Önizleme: fotoğraflar olduğu gibi, video oynatıcı (playsinline) */
.ed-preview__media { width: 100%; height: auto; max-height: 60vh; object-fit: contain; background: var(--surface-2); }
.ed-preview__video { display: block; width: 100%; max-height: 60vh; background: #000; border-radius: var(--radius-sm); }
.ed-preview__unused { margin: 0 0 0.5rem; }
.ed-preview__textonly { margin-bottom: 0.6rem; }

.ed-history__title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 0.4rem 0 0.35rem; }
.ed-history { list-style: none; margin: 0 0 0.6rem; padding: 0; display: flex; flex-direction: column; }
.ed-history__item { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
.ed-history__what { font-weight: 600; font-size: 0.92rem; }
.ed-history__when { margin-left: auto; }

.ed-savebar {
  position: sticky; bottom: calc(0.5rem + var(--tabbar-h) + var(--safe-bottom)); z-index: 15; margin-top: 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 0.6rem 0.9rem;
}
.ed-savebar.is-dirty { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn), var(--shadow); }
/* iPhone klavyesi açıkken (app.js → dom.js watchKeyboardInset: <html class="kb-open">, --kb-inset) çubuk klavyenin
   üstünde durur. iOS klavye için yerleşim görünümünü küçültmez; yalnız görünür alan (visualViewport) küçülür. */
.kb-open .ed-savebar { bottom: calc(0.35rem + var(--kb-inset, 0px)); }
.ed-savebar__row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.ed-savebar__state { font-size: 0.9rem; color: var(--muted); }
.ed-savebar.is-dirty .ed-savebar__state { color: var(--warn); font-weight: 600; }
.ed-savebar__error { max-height: 30vh; overflow: auto; }
.ed-savebar__error:empty { display: none; }

/* Katlanabilir bölüm (details/summary): kapalıyken özet satırı durumu gösterir */
/* summary flex yapılmaz (eski Safari'de summary esnek kutu olamıyor): satır içi düzen her yerde aynı görünür */
.ed-section--fold > summary {
  list-style: none; min-height: 44px; margin: -0.3rem 0; padding: 0.55rem 0;
}
.ed-section--fold > summary::-webkit-details-marker { display: none; }
.ed-section--fold > summary::before {
  content: ""; display: inline-block; vertical-align: 0.2em; width: 0.55rem; height: 0.55rem; margin: 0 0.6rem 0 0.1rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform 0.15s ease;
}
.ed-section--fold[open] > summary::before { transform: rotate(45deg); }
.ed-section--fold > summary .ed-section__title { display: inline; margin: 0; }
.ed-section--fold[open] > summary { margin-bottom: 0.4rem; }
.ed-section__meta { display: inline-block; margin-left: 0.6rem; font-size: 0.85rem; font-weight: 500; color: var(--muted); }
.ed-section__meta.is-warn { color: var(--warn); font-weight: 600; }

/* Telefonda paylaş */
.ed-phone__buttons .btn { flex: 1 1 11rem; }
.ed-phone__notready p { margin: 0 0 0.35rem; }
.ed-phone__ack { margin-top: 0.2rem; }
.ed-phone__honest { font-weight: 600; margin-top: 0.4rem; }
.ed-phone__retry { margin: 0.25rem 0 0.4rem; }
/* Kaydedilmemiş değişiklik kurtarma sorusu (uygulama arka planda kapatıldıysa) */
.ed-recovery p { margin: 0 0 0.4rem; }
.ed-recovery__actions { gap: 0.5rem; margin-top: 0.25rem; }
/* Ekli görsel çizilemedi: paylaşım kapalı, yeniden deneme */
.ed-preview__photofail p { margin: 0 0 0.4rem; }
.ed-phone__copied { color: var(--ok); font-weight: 600; margin: 0 0 0.4rem; }
.ed-phone__failed p { margin: 0 0 0.45rem; }

/* ---------- Bugün: kaydırmalı şerit (yalnız telefonda; masaüstünde ızgara aynen kalır) ---------- */
.tm-dots, .tm-dock { display: none; }

/* ---------- Dar ekranlar ---------- */
@media (max-width: 1000px) {
  .ed-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 768px) {
  /* Bugün */
  .tm-view { padding-bottom: 4.5rem; } /* alttaki karar çubuğu içerik üstüne binmesin */
  .tm-dots { display: flex; align-items: center; justify-content: center; gap: 0.35rem; margin: -0.35rem 0 0.1rem; }
  .tm-dots__list { display: flex; }
  .tm-dots__dot {
    position: relative; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .tm-dots__dot::before {
    content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px;
    border-radius: 50%; background: var(--border); transition: transform 0.2s ease, background-color 0.2s ease;
  }
  .tm-dots__dot.is-active::before { background: var(--accent); transform: scale(1.3); }
  .tm-dots__label { min-width: 2.6rem; font-size: 0.9rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }

  .tm-track {
    display: grid; grid-template-columns: none; grid-auto-flow: column;
    grid-auto-columns: calc(100% - 2.25rem); /* bir kart + sonrakinin kenarı görünür */
    gap: 0.75rem; align-items: start;
    overflow-x: auto; overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter));
    padding: 0.25rem var(--gutter) 0.75rem;
    scroll-padding-inline: var(--gutter);
  }
  .tm-track::-webkit-scrollbar { display: none; }
  .tm-track:focus-visible { outline-offset: -3px; }
  .tm-track > .tm-card { scroll-snap-align: start; scroll-snap-stop: always; }
  .tm-track > .tm-card--empty { min-height: 260px; }
  /* Kartın kararları başparmak çubuğunda (tm-dock); kart içindeki kopya gizlenir */
  .tm-view .tm-card .tm-actions { display: none; }

  .tm-dock {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0.4rem;
    position: fixed; left: 0; right: 0; z-index: 29;
    bottom: calc(var(--tabbar-h) + var(--safe-bottom));
    padding: 0.45rem max(var(--gutter), var(--safe-right)) 0.45rem max(var(--gutter), var(--safe-left));
    background: var(--surface); border-top: 1px solid var(--border);
    box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.06);
  }
  .tm-dock:empty { display: none; }
  .tm-dock .btn { min-height: 44px; padding: 0.35rem 0.4rem; font-size: 0.86rem; line-height: 1.15; white-space: normal; }
  .tm-dock .btn.is-selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
  .tm-footer { margin-top: 1rem; }

  /* Taslaklar */
  .dl-head-actions { width: 100%; }
  .dl-head-actions .btn { flex: 1 1 0; }
  .dl-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem 0.75rem; }
  .dl-filters .field:has(input[type="search"]) { grid-column: 1 / -1; }
  .dl-check { min-height: 44px; }
  .dl-row { padding: 0.8rem 0.9rem; }

  /* Editör: tek sütun; bölümler telefona uygun sırada (önce hazırlık, metin ve önizleme; sonra kararlar ve paylaşım) */
  .ed-layout { display: flex; flex-direction: column; gap: 0.85rem; }
  /* .ed-side telefonda bölge (role) taşımaz: editor.js bu eşikte role/aria-label'ı kaldırır (eski WebKit
     display: contents öğesini erişilebilirlik ağacından düşürür; her bölüm zaten kendi başlıklı bölgesidir). */
  .ed-form, .ed-side { display: contents; }
  .ed-sec--readiness { order: 1; }
  .ed-sec--basics { order: 2; }
  .ed-sec--text { order: 3; }
  .ed-sec--slides { order: 4; }
  .ed-sec--preview { order: 5; }
  .ed-sec--claims { order: 6; }
  .ed-sec--media { order: 7; }
  .ed-sec--decision { order: 8; }
  .ed-sec--phone { order: 9; }
  .ed-sec--share { order: 10; }
  .ed-sec--notes { order: 11; }
  .ed-sec--links { order: 12; }
  .ed-sec--history { order: 13; }
  .ed-title { font-size: 1.3rem; }
  .ed-back { display: inline-flex; align-items: center; min-height: 44px; }
  .ed-check { min-height: 44px; }
  .ed-buttons .btn { flex: 1 1 auto; }
  .ed-preview--strip { grid-auto-columns: 86%; overscroll-behavior-x: contain; scroll-padding-inline: 0; }
  .ed-preview__item { scroll-snap-stop: always; }
  .ed-savebar { padding: 0.55rem 0.7rem; }
  .ed-savebar__state { flex: 1 1 100%; }
  .ed-savebar__row .spacer { display: none; }
  .ed-savebar__row .btn { flex: 1 1 0; }

  .dp-choices__chip { min-height: 44px; }
}

@media (max-width: 640px) {
  .dl-row { flex-direction: column; }
  .dl-row__side { flex-direction: row; flex-wrap: wrap; align-items: center; text-align: left; }
  .ed-media { grid-template-columns: minmax(0, 1fr); }
  .ed-savebar__row .btn { flex: 1 1 auto; }
  .dp-checks { grid-template-columns: minmax(0, 1fr); }
  .ed-source__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 380px) {
  .dl-filters { grid-template-columns: minmax(0, 1fr); }
  .tm-track { grid-auto-columns: calc(100% - 1.75rem); gap: 0.6rem; }
}
