:root {
  --bg: #0d0f13; --surface: #151920; --surface-2: #1c212a; --line: #2a303b; --text: #eef0f4; --muted: #99a1b0;
  --accent: #ffb84d; --ok: #5fd08a; --warn: #ffb84d; --bad: #ff6b5e; --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
h1 { font-size: 20px; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 16px; margin: 0 0 12px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 20px 16px 60px; }
header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { background: transparent; border: 1px solid var(--line); color: var(--muted); padding: 8px 14px; border-radius: 999px; cursor: pointer; font: inherit; }
.tabs button[aria-selected="true"] { background: var(--text); color: #111; border-color: var(--text); font-weight: 600; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input[type=text], input[type=password], input[type=url], input[type=number], input[type=search], select, textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 10px 12px; font: inherit;
}
textarea { min-height: 150px; resize: vertical; }
input[type=file] { width: 100%; color: var(--muted); }
button.btn, a.btn { background: var(--surface-2); border: 1px solid var(--line); color: var(--text); padding: 9px 14px; border-radius: 10px; cursor: pointer; font: inherit; font-weight: 500; }
a.btn { display: inline-block; text-decoration: none; }
button.btn:hover:not(:disabled) { border-color: var(--muted); }
button.btn.primary { background: var(--accent); border-color: var(--accent); color: #17130a; font-weight: 700; }
button.btn.danger { color: var(--bad); }
button.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.badge.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.badge.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.banner { border: 1px solid color-mix(in srgb, var(--warn) 50%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); color: var(--text); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; }
.banner.bad { border-color: color-mix(in srgb, var(--bad) 50%, transparent); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.jobs { display: grid; gap: 10px; }
.job { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; cursor: pointer; text-align: left; color: inherit; font: inherit; width: 100%; }
.job:hover { border-color: var(--muted); }
.job img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.job .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps { display: flex; gap: 4px; margin-top: 6px; }
.steps i { height: 4px; flex: 1; border-radius: 2px; background: var(--line); }
.steps i.done { background: var(--ok); } .steps i.now { background: var(--accent); } .steps i.fail { background: var(--bad); }
.detail { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 20px; align-items: start; }
.detail video, .detail .ph { width: 100%; aspect-ratio: 9 / 16; background: #000; border-radius: var(--radius); object-fit: contain; }
.scene { border-top: 1px solid var(--line); padding: 10px 0; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start; }
.scene:first-child { border-top: 0; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.reason { color: var(--warn); font-size: 13px; }
pre.draft { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font: inherit; margin: 10px 0 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
.table-scroll { overflow-x: auto; }
.center { max-width: 380px; margin: 12vh auto 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: #111; padding: 10px 16px; border-radius: 10px; font-weight: 600; max-width: 90vw; z-index: 10; }
.toast.bad { background: var(--bad); color: #fff; }
[hidden] { display: none !important; }
@media (max-width: 760px) { .detail { grid-template-columns: 1fr; } .scene { grid-template-columns: 1fr; } .detail video, .detail .ph { max-height: 70vh; } .job { grid-template-columns: 52px minmax(0, 1fr); } .job .side { grid-column: 2; } .job img { width: 52px; height: 52px; } }

/* Kurgu kipi (editör yönlendirmesi) */
fieldset.brief { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 0; min-width: 0; display: grid; gap: 12px; }
fieldset.brief legend { padding: 0 6px; font-weight: 600; }
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mode { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; margin: 0; }
.mode:has(input:checked) { border-color: var(--accent); background: var(--surface-2); }
.mode input { margin-top: 3px; accent-color: var(--accent); flex: none; width: auto; }
.mode b { display: block; font-weight: 600; }
.mode small { display: block; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.score-field input { max-width: 200px; }
.brief-note { white-space: pre-wrap; }
@media (max-width: 720px) { .modes { grid-template-columns: 1fr; } }

/* İş listesi: süzme, sıralama, sayfalama */
.filters { display: grid; grid-template-columns: minmax(180px, 2fr) repeat(5, minmax(120px, 1fr)) auto; gap: 10px; align-items: end; margin: 12px 0 16px; }
.filters label { font-size: 12px; display: block; margin-bottom: 4px; }
.filters .f-reset .btn { white-space: nowrap; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 18px 0 8px; }
.pager .count { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.pager select { width: auto; }
@media (max-width: 980px) { .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } .filters .f-search { grid-column: 1 / -1; } }
@media (max-width: 520px) { .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Sesler */
.voice-list { display: grid; gap: 8px; }
.voice { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.voice .v-name { font-weight: 600; }
.voice .v-meta { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.voice .v-main { flex: 1 1 200px; min-width: 0; }
.voice audio { height: 32px; max-width: 220px; }
.voice-field select { max-width: 420px; }
/* Sayfa içi onay (Safari native confirm'ü sessizce engelleyebiliyor) */
dialog.ask { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 20px; max-width: min(440px, calc(100vw - 32px)); }
dialog.ask::backdrop { background: rgba(0, 0, 0, 0.6); }
dialog.ask p { margin: 0 0 16px; line-height: 1.5; }
dialog.ask .row { justify-content: flex-end; }

/* Ana sayfa: yol ayrımı */
a.home { color: var(--muted); text-decoration: none; margin-right: 6px; }
a.home:hover { color: var(--text); }
.fork { max-width: 940px; padding-top: 12vh; }
.fork .eyebrow { color: var(--accent); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 13px; margin: 0 0 8px; }
.fork h1 { font-size: clamp(28px, 5vw, 42px); letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 36px; text-wrap: balance; }
.fork-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.fork-card { display: flex; flex-direction: column; gap: 10px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.fork-card:hover, .fork-card:focus-visible { border-color: var(--accent); transform: translateY(-2px); }
.fork-card svg { width: 46px; height: 46px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.fork-card h2 { font-size: 24px; margin: 0; letter-spacing: -0.01em; }
.fork-card p { margin: 0; color: var(--muted); line-height: 1.55; flex: 1; }
.fork-card .go { color: var(--accent); font-weight: 600; margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { .fork-card { transition: none; } .fork-card:hover { transform: none; } }

/* İçerik Okuyucu */
.filters.filters-4 { grid-template-columns: minmax(180px, 2fr) repeat(3, minmax(120px, 1fr)) auto; }
@media (max-width: 980px) { .filters.filters-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .filters.filters-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.modes.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.detail.landscape { grid-template-columns: 1fr; }
.detail.landscape video, .detail.landscape .ph { aspect-ratio: 16 / 9; max-height: 62vh; }
.a-scene { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.a-scene:first-of-type { border-top: 0; }
.a-thumb { width: 132px; aspect-ratio: 4 / 3; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 12px; text-align: center; padding: 6px; }
.a-thumb img, .a-thumb video { width: 100%; height: 100%; object-fit: cover; margin: -6px; max-width: none; width: calc(100% + 12px); height: calc(100% + 12px); }
.a-scene .text { line-height: 1.5; }
.a-scene .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.cands { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.cand { width: 84px; height: 64px; border-radius: 8px; overflow: hidden; border: 2px solid var(--line); padding: 0; background: var(--surface-2); cursor: pointer; position: relative; color: var(--muted); font: inherit; font-size: 11px; }
.cand img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cand[aria-pressed="true"] { border-color: var(--accent); }
.cand:disabled { cursor: not-allowed; opacity: 0.6; }
.cand .vid { position: absolute; right: 3px; bottom: 3px; background: rgba(0,0,0,.75); color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 4px; }
pre.caption { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font: inherit; font-size: 14px; margin: 0 0 10px; max-height: 240px; overflow: auto; }
@media (max-width: 560px) { .a-scene { grid-template-columns: 96px minmax(0, 1fr); } .a-thumb { width: 96px; } }
.progress-line { margin: 6px 0 0; font-variant-numeric: tabular-nums; }
