:root {
  --bg: #07090D;
  --bg-2: #0A0D13;
  --card: #0E1219;
  --card-2: #131925;
  --line: #1E2633;
  --line-2: #2A3445;
  --text: #F1F5F9;
  --muted: #8C98AB;
  --dim: #5D6879;
  --gold: #F0B840;
  --gold-deep: #C9871F;
  --gold-soft: rgba(240, 184, 64, .12);
  --green: #3DE0A0;
  --green-soft: rgba(61, 224, 160, .12);
  --red: #FF6B6B;
  --red-soft: rgba(255, 107, 107, .12);
  --radius: 16px;
  --sans: 'Sora', system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; background:
  radial-gradient(900px 500px at 85% -10%, rgba(240,184,64,.07), transparent 60%),
  radial-gradient(700px 400px at -10% 10%, rgba(61,224,160,.035), transparent 60%), var(--bg); }
button, input, textarea { font: inherit; color: inherit; }
a { color: var(--gold); }
.mono { font-family: var(--mono); }

/* ---------- sign in ---------- */
body.auth { display: grid; place-items: center; padding: 16px; }
.auth-card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.auth-card h1 { font-size: 22px; margin: 22px 0 6px; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin: 0 0 16px; line-height: 1.5; }
.auth-card .msg { color: var(--red); font-size: 14px; }
.auth-card form { display: grid; gap: 14px; margin-top: 16px; }
.auth-card label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.auth-card input { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; font-size: 16px; }
.auth-card input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }

/* ---------- brand + header ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.brand b { display: block; font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.brand span { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em; color: var(--gold); margin-top: 2px; }
.top { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(7,9,13,.78); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1240px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 20px; }
.tabs { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-left: auto; }
.tab { border: 0; background: none; color: var(--muted); font-size: 13.5px; font-weight: 600; padding: 8px 14px; border-radius: 9px; cursor: pointer; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--card-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.tab .count { font-family: var(--mono); font-size: 11px; background: var(--gold-soft); color: var(--gold); border-radius: 20px; padding: 1px 7px; }
.tab .count:empty { display: none; }
.tab .short { display: none; }
.signout { color: var(--dim); font-size: 13px; text-decoration: none; }
.signout:hover { color: var(--text); }

main.app { max-width: 1240px; margin: 0 auto; padding: 32px 24px 80px; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; color: var(--gold); text-transform: uppercase; }
h1.title { font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -.025em; margin: 8px 0 8px; line-height: 1.1; }
.lede { color: var(--muted); margin: 0; font-size: 15px; line-height: 1.55; max-width: 640px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill { font-family: var(--mono); font-size: 12px; color: var(--muted); border: 1px solid var(--line); background: var(--card); border-radius: 30px; padding: 5px 11px; }
.pill b { color: var(--text); font-weight: 600; }
.notice { margin-top: 18px; border: 1px solid rgba(240,184,64,.35); background: var(--gold-soft); color: #F6D58A; border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.5; max-width: 760px; }

/* ---------- week approval box ---------- */
.week-head { display: grid; grid-template-columns: 1fr minmax(300px, 380px); gap: 28px; align-items: end; }
.approve-box { display: flex; gap: 16px; align-items: center; text-align: left; width: 100%; border: 1.5px solid var(--gold); background: linear-gradient(180deg, rgba(240,184,64,.1), rgba(240,184,64,.03)); border-radius: 18px; padding: 18px 20px; cursor: pointer; transition: transform .15s, box-shadow .2s, border-color .2s; }
.approve-box:hover { transform: translateY(-1px); box-shadow: 0 10px 40px rgba(240,184,64,.15); }
.approve-box .tick { flex: none; width: 34px; height: 34px; border-radius: 10px; border: 2px solid var(--gold); display: grid; place-items: center; transition: background .2s; }
.approve-box .tick svg { opacity: 0; transform: scale(.6); transition: .2s; }
.approve-box b { display: block; font-size: 17px; }
.approve-box small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; line-height: 1.4; }
.approve-box.done { border-color: var(--green); background: linear-gradient(180deg, var(--green-soft), rgba(61,224,160,.03)); }
.approve-box.done .tick { background: var(--green); border-color: var(--green); }
.approve-box.done .tick svg { opacity: 1; transform: none; }
.approve-box.blocked { border-color: var(--red); background: var(--red-soft); cursor: default; }
.approve-box.blocked .tick { border-color: var(--red); }
.approve-box.blocked:hover { transform: none; box-shadow: none; }
.undo { background: none; border: 0; color: var(--dim); font-size: 12.5px; margin-top: 8px; cursor: pointer; text-decoration: underline; padding: 0; }

/* ---------- video cards ---------- */
.section-label { display: flex; align-items: center; gap: 12px; margin: 40px 0 16px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .25s; text-align: left; padding: 0; display: block; width: 100%; }
.card:hover, .card:focus-visible { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 18px 50px rgba(0,0,0,.45); outline: none; }
.card:focus-visible { box-shadow: 0 0 0 2px var(--gold); }
.frame { position: relative; aspect-ratio: 9 / 16; background: #000; overflow: hidden; }
.frame img, .frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame video { opacity: 0; transition: opacity .25s; }
.card.playing .frame video { opacity: 1; }
.frame .shade { position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(transparent, rgba(0,0,0,.85)); pointer-events: none; }
.frame .day { position: absolute; top: 12px; left: 12px; font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; background: rgba(7,9,13,.78); border: 1px solid rgba(255,255,255,.1); padding: 5px 9px; border-radius: 8px; backdrop-filter: blur(6px); }
.frame .day em { font-style: normal; color: var(--gold); }
.frame .status { position: absolute; top: 12px; right: 12px; }
.frame .play-hint { position: absolute; right: 14px; bottom: 14px; width: 40px; height: 40px; border-radius: 50%; background: rgba(7,9,13,.6); border: 1px solid rgba(255,255,255,.18); display: grid; place-items: center; backdrop-filter: blur(6px); transition: opacity .2s; }
.card.playing .play-hint { opacity: 0; }
.frame .bottom { position: absolute; left: 14px; right: 62px; bottom: 14px; }
.frame .bottom b { display: block; font-size: 16px; font-weight: 700; line-height: 1.25; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.frame .bottom span { font-family: var(--mono); font-size: 11.5px; color: rgba(255,255,255,.7); }
.frame .bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--gold); transition: width .15s linear; }
.card-foot { padding: 12px 14px 14px; display: grid; gap: 6px; }
.card-foot .hook { font-size: 13.5px; color: var(--text); line-height: 1.4; }
.card-foot .src { font-family: var(--mono); font-size: 11px; color: var(--dim); }

.chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 4px 9px; border-radius: 20px; background: rgba(7,9,13,.78); border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.approved { color: var(--green); border-color: rgba(61,224,160,.35); }
.chip.changes { color: var(--red); border-color: rgba(255,107,107,.4); }
.chip.skip { color: var(--dim); }
.chip.new { color: var(--gold); border-color: rgba(240,184,64,.35); }
.chip.posted { color: var(--green); }

/* ---------- player modal ---------- */
dialog.player { border: 0; padding: 0; background: transparent; color: var(--text); max-width: min(1040px, calc(100vw - 32px)); width: 100%; max-height: calc(100vh - 32px); }
dialog.player::backdrop { background: rgba(3,4,7,.82); backdrop-filter: blur(8px); }
.player-in { display: grid; grid-template-columns: minmax(0, 420px) 1fr; background: var(--card); border: 1px solid var(--line-2); border-radius: 20px; overflow: hidden; max-height: calc(100vh - 32px); }
.player-video { background: #000; display: grid; place-items: center; }
.player-video video { width: 100%; max-height: calc(100vh - 34px); aspect-ratio: 9 / 16; display: block; background: #000; }
.player-side { padding: 24px; overflow-y: auto; display: grid; gap: 18px; align-content: start; position: relative; }
.close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); cursor: pointer; display: grid; place-items: center; }
.player-side h2 { margin: 6px 40px 0 0; font-size: 24px; letter-spacing: -.02em; line-height: 1.2; }
.block { border: 1px solid var(--line); background: var(--bg-2); border-radius: 12px; padding: 14px; }
.block-label { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.caption { white-space: pre-wrap; font-size: 14px; line-height: 1.55; color: #DCE3EC; }
.tags { font-family: var(--mono); font-size: 12.5px; color: var(--gold); margin-top: 8px; line-height: 1.6; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 13px; }
.checks div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.checks span { color: var(--muted); }
.checks b { font-family: var(--mono); font-weight: 600; font-size: 12.5px; }
.decide { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.btn { border: 1px solid var(--line-2); background: var(--card-2); border-radius: 11px; padding: 11px 14px; font-weight: 600; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--text); transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--muted); }
.btn.gold { background: var(--gold); color: #1A1204; border-color: var(--gold); }
.btn.gold:hover { background: #F5C863; }
.btn.small { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.on-approve { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.btn.on-changes { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.btn.on-skip { border-color: var(--muted); }
textarea { width: 100%; min-height: 90px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; font-size: 14px; resize: vertical; }
textarea:focus { outline: 2px solid var(--gold); border-color: transparent; }
.history { font-size: 12.5px; color: var(--muted); display: grid; gap: 4px; }
.history .mono { color: var(--dim); }

/* ---------- lists ---------- */
.rows { display: grid; gap: 12px; }
.row { display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.row img { width: 72px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; cursor: pointer; }
.row h3 { margin: 0 0 4px; font-size: 16px; }
.row p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.row .note { margin-top: 6px; color: #FFB4B4; font-size: 13.5px; }
.row .actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; max-width: 480px; }
.when { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.when input { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 8px; font-family: var(--mono); font-size: 12.5px; color-scheme: dark; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 9px; padding: 7px 10px; cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--green); width: 16px; height: 16px; margin: 0; }
.toggle.on { color: var(--green); border-color: rgba(61,224,160,.4); }
.steps { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.steps b { color: var(--text); }
.empty { border: 1px dashed var(--line-2); border-radius: 16px; padding: 40px 20px; text-align: center; color: var(--muted); font-size: 14.5px; }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.filter { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 30px; padding: 6px 13px; font-size: 13px; cursor: pointer; }
.filter[aria-pressed="true"] { color: var(--bg); background: var(--gold); border-color: var(--gold); font-weight: 600; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--card-2); border: 1px solid var(--line-2); padding: 11px 16px; border-radius: 12px; font-size: 14px; transition: .25s; z-index: 60; pointer-events: none; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  .week-head { grid-template-columns: 1fr; gap: 20px; }
  .player-in { grid-template-columns: 1fr; overflow-y: auto; }
  .player-video video { max-height: 62vh; width: auto; margin: 0 auto; }
  .player-side { overflow: visible; }
}
@media (max-width: 640px) {
  .top-in { padding: 10px 16px; flex-wrap: wrap; gap: 10px; }
  .brand b { font-size: 14px; }
  .tabs { order: 3; width: 100%; margin: 0; overflow-x: auto; }
  .tab { flex: 1; justify-content: center; padding: 8px 6px; font-size: 12.5px; gap: 5px; }
  .tab .long { display: none; }
  .tab .short { display: inline; }
  .frame .play-hint { width: 30px; height: 30px; right: 8px; bottom: 10px; }
  .frame .play-hint svg { width: 14px; height: 14px; }
  .frame .bottom { left: 10px; right: 42px; bottom: 10px; }
  .signout { margin-left: auto; }
  main.app { padding: 22px 16px 60px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .frame .bottom b { font-size: 13.5px; }
  .frame .day { font-size: 10px; top: 8px; left: 8px; padding: 4px 7px; }
  .frame .status { top: 8px; right: 8px; }
  .frame .status .chip { font-size: 0; padding: 5px; gap: 0; }
  .card-foot { padding: 10px; }
  .card-foot .hook { font-size: 12.5px; }
  .row { grid-template-columns: 56px 1fr; }
  .row img { width: 56px; }
  .row .actions { grid-column: 1 / -1; justify-content: flex-start; max-width: none; }
  .decide { grid-template-columns: 1fr; }
  .checks { grid-template-columns: 1fr; }
  dialog.player { max-width: 100vw; max-height: 100vh; margin: 0; height: 100%; }
  .player-in { border-radius: 0; max-height: 100vh; height: 100%; border: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.mt10 { margin-top: 10px; }
.btn-row { display: flex; gap: 8px; margin-top: 10px; }
.howto { margin-top: 20px; max-width: 760px; }
.block-label.flat { margin: 0; }
