/* CCR News Studio — CyberCrew teal on deep navy. No build step, no framework. */
:root {
  --bg: #061020;
  --bg-2: #08152a;
  --side: #071528;
  --panel: #0c1c33;
  --panel-2: #10233e;
  --line: #19304f;
  --line-2: #24406a;
  --text: #e6edf6;
  --text-2: #b4c2d6;
  --muted: #7f91ab;
  --teal: #1ab0a8;
  --teal-2: #4fd1c9;
  --teal-dim: rgba(26, 176, 168, .14);
  --blue: #5aa2ff;
  --violet: #a78bfa;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --gray: #8494ad;
  --radius: 14px;
  --radius-s: 9px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px rgba(0,0,0,.28);
  --font: "Inter", "Noto Sans JP", system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  --font-ja: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 14.5px/1.55 var(--font);
  background: radial-gradient(1100px 520px at 85% -240px, rgba(26,176,168,.10), transparent 60%), var(--bg);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; letter-spacing: -.01em; }
p { margin: 0; }
[lang="ja"], .ja { font-family: var(--font-ja); }
.mono, code, pre { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.sep { color: var(--line-2); margin: 0 .45em; }
.link { color: var(--teal-2); }
.link:hover { text-decoration: underline; }
.r { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.warn-text { color: var(--amber); margin-bottom: 8px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 6px; }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px;
  padding: 22px 14px 18px; background: linear-gradient(180deg, #0a1b33 0%, var(--side) 60%); border-right: 1px solid var(--line);
}
.brand { display: flex; flex-direction: column; gap: 6px; padding: 4px 10px 6px; }
.brand img { width: 168px; height: auto; }
.brand-sub { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--text-2); font-weight: 500;
  border: 1px solid transparent; transition: background .15s, color .15s;
}
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.nav a:hover { background: rgba(255,255,255,.04); color: var(--text); }
.nav a.on { background: var(--teal-dim); color: var(--teal-2); border-color: rgba(26,176,168,.28); }
.nav a.on svg { opacity: 1; }
.side-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.who { display: flex; align-items: center; gap: 9px; min-width: 0; }
.who-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--teal-dim); color: var(--teal-2); font-weight: 700; flex: none; }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.main { width: 100%; max-width: 1240px; padding: 26px 30px 10px; display: flex; flex-direction: column; gap: 20px; }
.foot { max-width: 1240px; padding: 10px 30px 26px; color: var(--muted); font-size: 12px; }

.banner { margin: 16px 30px 0; padding: 11px 16px; border-radius: var(--radius-s); font-size: 13.5px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.banner-warn { background: rgba(251,191,36,.10); border: 1px solid rgba(251,191,36,.35); color: #fde68a; }
.banner-warn .link { color: #fde68a; text-decoration: underline; }
.flash { margin: 16px 30px 0; padding: 10px 15px; border-radius: var(--radius-s); font-size: 13.5px; border: 1px solid; }
.flash-ok { background: rgba(52,211,153,.09); border-color: rgba(52,211,153,.35); color: #a7f3d0; }
.flash-err { background: rgba(248,113,113,.09); border-color: rgba(248,113,113,.4); color: #fecaca; }
.flash-warn { background: rgba(251,191,36,.09); border-color: rgba(251,191,36,.35); color: #fde68a; }
.login-card .flash { margin: 12px 0 0; }

/* ---------------------------------------------------------------- page heads */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-title { font-size: 26px; font-weight: 700; }
.page-head .muted { margin-top: 3px; }
.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.crumbs { display: flex; gap: 8px; color: var(--muted); font-size: 13px; }
.crumbs a:hover { color: var(--teal-2); }
.detail-head { display: flex; flex-direction: column; gap: 10px; }
.detail-title { font-family: var(--font-ja); font-size: 24px; font-weight: 700; line-height: 1.45; max-width: 60em; }

/* ---------------------------------------------------------------- cards */
.card { background: linear-gradient(180deg, var(--panel) 0%, #0b1a30 100%); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; }
.card-flush { padding: 0; overflow: hidden; }
.card-warn { border-color: rgba(251,191,36,.35); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-title { font-size: 14px; font-weight: 600; letter-spacing: .02em; color: var(--text-2); text-transform: uppercase; font-size: 12.5px; }
.sub-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.empty { color: var(--muted); padding: 10px 0; }
.empty-card { text-align: center; padding: 34px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-flat { gap: 18px; }
.hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { background: linear-gradient(160deg, var(--panel-2), var(--panel) 70%); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--teal); opacity: .7; }
.stat-k { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.stat-v { font-size: 32px; font-weight: 700; line-height: 1.1; }
.stat-unit { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.stat-s { color: var(--text-2); font-size: 13px; }
.mini-counts { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 5px; }
.mini-counts li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.mini-counts b { margin-left: auto; color: var(--text); font-size: 15px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.d-published { background: var(--green); } .d-scheduled { background: var(--blue); } .d-draft { background: var(--gray); } .d-review { background: var(--amber); }
.state-pills { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.meter { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.meter-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); gap: 8px; }
.bar { height: 7px; background: rgba(255,255,255,.06); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--teal); border-radius: 99px; transition: width .5s; }
.bar-alt i { background: var(--violet); }
.bar.is-hot i { background: var(--amber); }

/* chart */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .b-a { fill: var(--teal); }
.chart .b-s { fill: var(--violet); }
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); flex-wrap: wrap; }
.lg { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.lg-a { background: var(--teal); } .lg-s { background: var(--violet); }

/* failures */
.fail-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fail-list li { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: rgba(248,113,113,.04); }
.fl-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fl-top .muted { margin-left: auto; }
.fl-err { color: #fca5a5; font-size: 12.5px; margin-top: 4px; font-family: var(--mono); overflow-wrap: anywhere; }

/* latest */
.latest-a { display: flex; flex-direction: column; gap: 10px; }
.latest-img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); }
.latest-title { font-family: var(--font-ja); font-weight: 700; font-size: 16px; line-height: 1.5; }
.latest-a:hover .latest-title, a.latest-title:hover { color: var(--teal-2); }
.latest .row-meta { margin-top: 10px; }
.latest-v { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; }
.latest-vthumb img, .latest-vthumb .ph { width: 132px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.latest-vbody { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

/* channels */
.channels { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 10px; }
.channel { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: rgba(255,255,255,.015); }
.ch-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gray); flex: none; box-shadow: 0 0 0 3px rgba(132,148,173,.15); }
.channel.is-on .ch-dot { background: var(--teal); box-shadow: 0 0 0 3px var(--teal-dim); }
.ch-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ch-main .small { overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- chips, pills, buttons */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid; line-height: 1.6; text-transform: lowercase; }
.chip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-published, .chip-publish, .chip-uploaded, .chip-done, .chip-acked { color: #6ee7b7; border-color: rgba(52,211,153,.35); background: rgba(52,211,153,.08); }
.chip-scheduled, .chip-future, .chip-ready { color: #93c5fd; border-color: rgba(90,162,255,.35); background: rgba(90,162,255,.08); }
.chip-running, .chip-generating, .chip-uploading, .chip-importing, .chip-leased { color: var(--teal-2); border-color: rgba(26,176,168,.45); background: var(--teal-dim); }
.chip-running i, .chip-generating i, .chip-uploading i { animation: pulse 1.2s ease-in-out infinite; }
.chip-queued, .chip-imported, .chip-draft, .chip-pending { color: #cbd5e1; border-color: rgba(203,213,225,.25); background: rgba(203,213,225,.05); }
.chip-needs_review { color: #fcd34d; border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.08); }
.chip-failed, .chip-dead, .chip-rejected { color: #fca5a5; border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.08); }
.chip-trashed, .chip-trash, .chip-skipped, .chip-none { color: var(--muted); border-color: var(--line-2); background: transparent; }
@keyframes pulse { 50% { opacity: .3; } }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--text-2); }
.pill b { color: var(--text); }
.pill-uploaded { border-color: rgba(52,211,153,.3); } .pill-failed { border-color: rgba(248,113,113,.35); } .pill-running { border-color: rgba(26,176,168,.4); }
.pill-veo { color: var(--violet); border-color: rgba(167,139,250,.4); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 9px; font: inherit; font-weight: 600; font-size: 13.5px;
  color: var(--text); background: var(--panel-2); border: 1px solid var(--line-2); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s;
}
.btn:hover { border-color: var(--teal); }
.btn:disabled, .btn.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--teal); border-color: var(--teal); color: #032a28; }
.btn-primary:hover { background: var(--teal-2); border-color: var(--teal-2); }
.btn-danger { background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.45); color: #fecaca; }
.btn-danger:hover { border-color: var(--red); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { border-color: var(--line-2); }
.btn-sm { padding: 4px 10px; font-size: 12.5px; border-radius: 7px; }
.btn-block { width: 100%; }
.yt-btn { border-color: rgba(255,80,80,.4); }
.yt { display: inline-flex; align-items: center; gap: 4px; color: #fca5a5; font-size: 12.5px; font-weight: 600; }
.yt svg { width: 14px; height: 14px; }
.tip-wrap { display: block; }

/* forms */
.form { display: flex; flex-direction: column; gap: 12px; }
.form-row { flex-direction: row; flex-wrap: wrap; align-items: flex-end; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.form-row .field { flex: 1 1 200px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.field-inline { flex-direction: row; align-items: center; gap: 8px; }
input, select, textarea {
  font: inherit; font-size: 14px; color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 9px; padding: 8px 11px; min-width: 0;
}
input:focus, select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-dim); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); padding-bottom: 9px; }
.check input { width: 16px; height: 16px; accent-color: var(--teal); }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.inline-form select { flex: 1 1 140px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.seg a { padding: 5px 11px; border-radius: 7px; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.seg a:hover { color: var(--text); }
.seg a.on { background: var(--teal-dim); color: var(--teal-2); }

/* ---------------------------------------------------------------- news list */
.day-group { display: flex; flex-direction: column; gap: 10px; }
.day-group + .day-group { margin-top: 22px; }
.day-head { font-family: var(--font-ja); font-size: 15px; font-weight: 700; display: flex; align-items: baseline; gap: 10px; color: var(--text); padding: 0 2px; }
.news-list { display: flex; flex-direction: column; gap: 10px; }
.news-row { display: grid; grid-template-columns: 168px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s; }
.news-row:hover { border-color: var(--line-2); }
.nr-thumb img, .nr-thumb .ph { width: 168px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 9px; background: var(--panel-2); }
.nr-main { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.nr-title { font-family: var(--font-ja); font-size: 15.5px; font-weight: 700; line-height: 1.5; }
.nr-title a:hover { color: var(--teal-2); }
.nr-src { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nr-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.row-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ph { display: grid; place-items: center; background: repeating-linear-gradient(135deg, var(--panel-2) 0 10px, #0e2039 10px 20px); color: var(--line-2); }
.ph svg { width: 34px; height: 34px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 6px 0; }

/* ---------------------------------------------------------------- news detail */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.detail-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.prose { font-family: var(--font-ja); font-size: 15.5px; line-height: 1.95; padding: 24px 28px; }
.prose h2 { font-size: 19px; margin: 28px 0 12px; padding-left: 12px; border-left: 3px solid var(--teal); line-height: 1.5; }
.prose h3 { font-size: 16.5px; margin: 20px 0 8px; }
.prose h4 { font-size: 15.5px; margin: 16px 0 6px; color: var(--text-2); }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 1.4em; }
.prose li { margin: 3px 0; }
.prose figure { margin: 6px 0 18px; }
.prose figure img { width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.prose .sec figure img { max-height: 340px; object-fit: cover; }
.prose .hero { margin-top: 0; }
.prose .lead { font-size: 16.5px; color: var(--text); }
.callout { border: 1px solid var(--line-2); background: rgba(255,255,255,.02); border-radius: 12px; padding: 4px 18px 6px; margin: 18px 0; }
.callout h2 { margin-top: 14px; border: 0; padding: 0; font-size: 15px; color: var(--teal-2); }
.callout-ok { border-color: rgba(26,176,168,.35); background: rgba(26,176,168,.05); }
.glossary dt { font-weight: 700; }
.glossary dd { margin: 0 0 12px; color: var(--text-2); }
.side-short { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; align-items: start; }
.side-short img, .side-short .ph { width: 74px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; }
.side-short > span { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-ja); font-size: 13.5px; min-width: 0; }
.sources { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.sources a { overflow-wrap: anywhere; }
.tags { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ver { padding: 8px 0; border-bottom: 1px dashed var(--line); display: flex; flex-direction: column; gap: 4px; }
.ver:last-of-type { border-bottom: 0; }
.events { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.events li { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; margin: 0 0 12px; }
.kv div { display: flex; flex-direction: column; gap: 2px; }
.kv dt { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; font-size: 15px; }
.kv-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; }

/* tables */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: rgba(255,255,255,.015); }
.tbl-tight th, .tbl-tight td { padding: 7px 6px; }
.tbl-jobs .err-cell { max-width: 420px; overflow-wrap: anywhere; color: #fca5a5; }
.tbl-jobs .err-cell .muted { color: var(--muted); }

/* ---------------------------------------------------------------- videos */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; }
.vcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
.vcard:hover { border-color: var(--line-2); transform: translateY(-1px); }
.vthumb { position: relative; display: block; aspect-ratio: 9 / 16; background: var(--panel-2); }
.vthumb img, .vthumb .ph { width: 100%; height: 100%; object-fit: cover; }
.vdur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.72); padding: 1px 7px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.vbody { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.vtitle { font-family: var(--font-ja); font-size: 13.5px; font-weight: 700; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vtitle a:hover { color: var(--teal-2); }
.vmeta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; }

.video-grid { display: grid; grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); gap: 20px; align-items: start; }
.video-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.player { background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 9 / 16; display: grid; place-items: center; border: 1px solid var(--line); }
.player video, .player img { width: 100%; height: 100%; object-fit: contain; }
.player-empty div { display: flex; flex-direction: column; gap: 4px; text-align: center; color: var(--muted); }
.player-empty b { color: var(--text-2); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.action-stack { display: flex; flex-direction: column; gap: 10px; }
.action-stack .inline-form { margin-top: 0; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl { display: grid; grid-template-columns: 16px minmax(90px, 1fr) 76px 58px 62px; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; position: relative; }
.tl:last-child { border-bottom: 0; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.tl-done .tl-dot { background: var(--green); }
.tl-running .tl-dot { background: var(--teal); animation: pulse 1.2s infinite; box-shadow: 0 0 0 4px var(--teal-dim); }
.tl-failed .tl-dot { background: var(--red); }
.tl-skipped .tl-dot { background: transparent; border: 1px dashed var(--muted); }
.tl-label { font-weight: 600; }
.tl-pending .tl-label { color: var(--muted); font-weight: 500; }
.tl-status { color: var(--muted); font-size: 12px; }
.tl-failed .tl-status { color: var(--red); }
.tl-num { text-align: right; color: var(--text-2); font-size: 12.5px; }
.tl-detail { grid-column: 2 / -1; font-size: 12px; color: #fca5a5; font-family: var(--mono); overflow-wrap: anywhere; }
.copy-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.copy-head { display: flex; justify-content: space-between; align-items: center; }
.field-k { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.copy-box { background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; font-size: 13.5px; overflow-wrap: anywhere; }
.copy-box.pre { white-space: pre-wrap; }
.btn.is-copied { border-color: var(--green); color: #6ee7b7; }
.hook { margin-bottom: 12px; font-weight: 600; }
.scenes { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; counter-reset: sc; }
.scenes li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.015); display: flex; flex-direction: column; gap: 4px; }
.sc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.alert { border: 1px solid rgba(248,113,113,.4); background: rgba(248,113,113,.07); border-radius: var(--radius-s); padding: 10px 14px; }
.alert-msg { margin: 4px 0 0; white-space: pre-wrap; font-size: 12.5px; color: #fecaca; }

/* ---------------------------------------------------------------- login */
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; gap: 14px;
  background: radial-gradient(800px 420px at 50% 0%, rgba(26,176,168,.14), transparent 70%); }
.login-card { width: 100%; max-width: 380px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: 18px; padding: 30px 28px; box-shadow: 0 30px 80px rgba(0,0,0,.45); display: flex; flex-direction: column; gap: 6px; }
.login-brand { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.login-brand img { width: 210px; height: auto; }
.login-title { font-size: 22px; font-weight: 700; }
.login-card .form { margin-top: 14px; }
.login-card .btn-block { margin-top: 6px; padding: 10px; }

/* toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast { background: var(--panel-2); border: 1px solid var(--line-2); padding: 10px 14px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow); }
.toast.ok { border-color: rgba(52,211,153,.4); } .toast.err { border-color: rgba(248,113,113,.45); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
  .brand { padding: 0; gap: 2px; }
  .brand img { width: 118px; }
  .brand-sub { font-size: 9px; }
  .nav { order: 3; flex-direction: row; width: 100%; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 7px 10px; flex: none; font-size: 13px; gap: 7px; }
  .nav a svg { width: 15px; height: 15px; }
  .side-foot { margin: 0 0 0 auto; border: 0; padding: 0; }
  .who-name { display: none; }
  .main { padding: 18px 16px 8px; gap: 16px; }
  .foot { padding: 8px 16px 20px; }
  .banner, .flash { margin: 12px 16px 0; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .video-grid { grid-template-columns: minmax(0, 1fr); }
  .player { max-width: 360px; margin: 0 auto; width: 100%; }
  .page-title { font-size: 22px; }
  .detail-title { font-size: 19px; }
}
@media (max-width: 600px) {
  .stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat-v { font-size: 26px; }
  .news-row { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 10px; align-items: start; }
  .nr-thumb img, .nr-thumb .ph { width: 96px; }
  .nr-title { font-size: 14px; }
  .nr-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .prose { padding: 18px 16px; font-size: 15px; }
  .latest-v { grid-template-columns: 96px minmax(0, 1fr); }
  .latest-vthumb img, .latest-vthumb .ph { width: 96px; }
  .kv-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl { grid-template-columns: 14px minmax(70px, 1fr) 62px 46px 52px; gap: 6px; font-size: 12.5px; }
  .filters { width: 100%; }
  .filters .field-inline { flex: 1 1 140px; }
  .filters select { width: 100%; }
  .card { padding: 14px 14px; }
  .tbl-jobs thead { display: none; }
  .tbl-jobs, .tbl-jobs tbody, .tbl-jobs tr, .tbl-jobs td { display: block; width: 100%; }
  .tbl-jobs tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .tbl-jobs td { border: 0; padding: 3px 0; text-align: left; }
  .tbl-jobs td[data-label]::before { content: attr(data-label); display: inline-block; width: 70px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
  .tbl-jobs .err-cell { max-width: none; }
}

/* videos: day groups flow side by side so sparse days do not leave empty rows */
.vdays { display: flex; flex-wrap: wrap; gap: 24px 18px; align-items: flex-start; }
.vdays > .empty-card { flex: 1 1 100%; }
.vday + .vday { margin-top: 0; }
.vday { padding-left: 12px; border-left: 2px solid var(--line); }
.vday .day-head { font-size: 13.5px; }
.vday .vgrid { display: flex; flex-wrap: wrap; gap: 14px; }
.vday .vcard { width: 188px; }
@media (max-width: 600px) {
  .vdays { gap: 18px 10px; }
  .vday { padding-left: 0; border-left: 0; }
  .vday .vgrid { gap: 10px; }
  .vday .vcard { width: calc((100vw - 42px) / 2); }
}
