:root {
  --bg: #f6f4ef; --card: #fff; --ink: #1f2328; --muted: #6b6f76; --line: #e3dfd6;
  --brand: #0f766e; --brand-ink: #fff; --err: #b42318; --err-bg: #fdecea; --warn: #9a6700; --warn-bg: #fff6dc;
  --ok: #1a7f37; --ok-bg: #e7f6ec;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
header.top { background: #12312e; color: #fff; padding: 10px 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; }
header.top .brand { font-weight: 700; color: #fff; margin-right: 8px; }
header.top nav { display: flex; gap: 4px; flex-wrap: wrap; }
header.top nav a { color: #d7efe9; padding: 6px 9px; border-radius: 8px; font-size: 15px; }
header.top nav a.on, header.top nav a:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
main { max-width: 1100px; margin: 0 auto; padding: 16px 14px 80px; }
h1 { font-size: 24px; margin: 6px 0 14px; }
h2 { font-size: 19px; margin: 22px 0 10px; }
h3 { font-size: 16px; margin: 14px 0 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); font-size: 14px; }
label { display: block; font-weight: 600; font-size: 14px; margin: 10px 0 4px; }
label small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=number], input[type=password], input[type=url], select, textarea {
  width: 100%; padding: 10px 11px; border: 1px solid #cfc9bd; border-radius: 10px; font: inherit; background: #fff; }
textarea { min-height: 80px; resize: vertical; }
textarea.prompt { min-height: 320px; font: 14px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.two { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .two { grid-template-columns: 1fr 1fr; } .three { grid-template-columns: 1fr 1fr 1fr; } }
.ur, [dir=rtl] { font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Urdu Typesetting", "Noto Naskh Arabic", serif; font-size: 19px; line-height: 2.1; }
.ar { font-family: "Amiri", "Noto Naskh Arabic", "Traditional Arabic", serif; font-size: 22px; line-height: 2; direction: rtl; }
.btn { display: inline-block; border: 0; border-radius: 10px; padding: 10px 16px; font: 600 15px system-ui, sans-serif; cursor: pointer;
  background: var(--brand); color: var(--brand-ink); text-decoration: none; }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.light { background: #e9e5dc; color: var(--ink); }
.btn.red { background: var(--err); }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
.flash { padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--err-bg); color: var(--err); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #eee; color: #444; white-space: nowrap; }
.pill.approved, .pill.prompt_ok, .pill.yes, .pill.script_ok { background: var(--ok-bg); color: var(--ok); }
.pill.draft, .pill.planned, .pill.no { background: var(--warn-bg); color: var(--warn); }
.pill.err { background: var(--err-bg); color: var(--err); }
.probs { list-style: none; padding: 0; margin: 0; }
.probs li { padding: 8px 10px; border-radius: 9px; margin-bottom: 6px; font-size: 14px; }
.probs li.error { background: var(--err-bg); color: var(--err); }
.probs li.warn { background: var(--warn-bg); color: var(--warn); }
.probs li.good { background: var(--ok-bg); color: var(--ok); }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs figure { margin: 0; width: 120px; }
.thumbs figure:has(audio) { width: 260px; }
.thumbs img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.thumbs figcaption { font-size: 12px; color: var(--muted); word-break: break-all; }
.charcard { display: flex; gap: 12px; align-items: flex-start; }
.charcard img, .charcard .noimg { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: #eee; flex: none; display: grid; place-items: center; color: #999; font-size: 26px; }
.checks { display: flex; gap: 6px; flex-wrap: wrap; }
.checks label { display: flex; gap: 6px; align-items: center; font-weight: 500; background: #f1eee7; border-radius: 9px; padding: 6px 10px; margin: 0; }
.todo a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); color: var(--ink); }
.todo a:hover { text-decoration: none; background: #faf8f3; }
.stickybar { position: sticky; bottom: 0; background: rgba(246,244,239,.96); padding: 10px 0; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; z-index: 4; }
details summary { cursor: pointer; font-weight: 600; }
audio { width: 100%; max-width: 360px; }

.shotrow { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.shotnum { flex: none; width: 34px; height: 34px; border-radius: 10px; background: #12312e; color: #fff; display: grid; place-items: center; font-weight: 700; }
.shotnum:hover { text-decoration: none; }
.shotbody { flex: 1; min-width: 0; color: inherit; }
.shotbody:hover { text-decoration: none; }
.shotmove { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 700px) {
  header.top nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; -webkit-overflow-scrolling: touch; }
  header.top nav a { white-space: nowrap; }
  .stickybar { margin: 0 -14px; padding: 10px 14px; }
}
.todo .pill { flex: none; }
label.row { display: flex; align-items: center; }
