:root { --accent: #E4572E; --bg: #111214; --panel: #1b1d21; --line: #2c2f35; --text: #ececee; --muted: #9a9ca3; --late: #ff6b6b; --ok: #3ecf8e; --wait: #f5b942; color-scheme: dark; }
:root[data-theme="light"] { --bg: #f6f6f4; --panel: #ffffff; --line: #e2e2de; --text: #1c1c1e; --muted: #6b6d73; --late: #d63c3c; --ok: #13915a; --wait: #b77b00; color-scheme: light; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
input[type=color] { padding: 2px; width: 56px; height: 38px; }
textarea { width: 100%; resize: vertical; }
button { cursor: pointer; border: 0; background: none; }
h1 { font-size: 26px; margin: 4px 0 8px; } h2 { font-size: 18px; margin: 26px 0 10px; } h3 { font-size: 16px; margin: 0 0 4px; } h4 { margin: 14px 0 6px; font-size: 14px; }
header { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: max(10px, env(safe-area-inset-top)) 16px 10px; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 10px; align-items: center; cursor: pointer; font-size: 17px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; }
.mark { width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; }
nav { display: flex; gap: 4px; flex: 1; }
nav button { padding: 7px 12px; border-radius: 8px; color: var(--muted); }
nav button.on { color: var(--text); background: var(--bg); }
.as { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.as select { padding: 5px 8px; }
.banner { background: var(--accent); color: #fff; text-align: center; padding: 6px; font-size: 13px; }
main { max-width: 1100px; margin: 0 auto; padding: 16px 16px 60px; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; }
.row { display: flex; gap: 10px; align-items: center; } .row.wrap { flex-wrap: wrap; align-items: flex-end; }
.row.head { justify-content: space-between; margin: 6px 0; }
.grow { flex: 1; }
.muted { color: var(--muted); } .small { font-size: 13px; } .late { color: var(--late); }
.primary { background: var(--accent); color: #fff; padding: 9px 16px; border-radius: 10px; font-weight: 600; }
.ghost { padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); }
.ghost:disabled { opacity: .35; cursor: default; }
.danger { color: var(--late); }
.link { color: var(--accent); padding: 4px 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.card { display: block; text-align: left; width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 0; }
button.card:hover { border-color: var(--accent); }
.card.static { margin-bottom: 12px; }
.grid .card.static { margin-bottom: 0; }
.card .row { justify-content: space-between; flex-wrap: wrap; }
.card .row.actions { justify-content: flex-start; margin-top: 10px; }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 10px 0 6px; }
.bar.big { height: 10px; } .bar i { display: block; height: 100%; background: var(--accent); }
.chip { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--line); white-space: nowrap; margin-left: 6px; }
.chip.client { background: color-mix(in srgb, var(--wait) 22%, transparent); color: var(--wait); }
.chip.done { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.chip.late { background: color-mix(in srgb, var(--late) 20%, transparent); color: var(--late); }
section { margin-top: 8px; }
.quota { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 12px 0; }
.quota .row { margin-bottom: 4px; } .quota button.ghost { margin-top: 10px; }
.group { margin-bottom: 8px; }
.drow { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.drow:hover { background: var(--panel); } .drow .title { flex: 1; }
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
.col { background: color-mix(in srgb, var(--panel) 60%, transparent); border-radius: 14px; padding: 10px; }
.col .card { margin-bottom: 8px; padding: 10px 12px; } .col .card .row { margin-top: 6px; } .col .chip { margin-left: 0; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin: 8px 0; }
.field input, .field select, .field textarea { color: var(--text); font-size: 15px; }
.check { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 15px; }
.num { width: 80px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.tabs button { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); }
.tabs button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.stages { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 8px; overflow-x: auto; }
.srow { display: grid; grid-template-columns: minmax(130px, 1.3fr) minmax(130px, 1.3fr) 54px 74px 46px 118px; gap: 8px; align-items: center; padding: 4px 0; min-width: 600px; }
.srow.noappr { grid-template-columns: minmax(130px, 1.3fr) minmax(130px, 1.3fr) 54px 46px 118px; }
.stages .srow.shead:has(+ .srow.noappr) { grid-template-columns: minmax(130px, 1.3fr) minmax(130px, 1.3fr) 54px 46px 118px; }
.srow input[type=checkbox] { justify-self: center; } .ops { display: flex; gap: 4px; } .ops .ghost { padding: 5px 9px; }
.words { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0 12px; }
.logo-prev { width: 48px; height: 48px; border-radius: 10px; object-fit: contain; background: var(--bg); }
.overlay { position: fixed; inset: 0; z-index: 10; background: rgba(0,0,0,.55); display: flex; justify-content: center; align-items: flex-start; overflow-y: auto; padding: 40px 12px; }
.sheet { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; width: 100%; max-width: 620px; }
.close { position: absolute; top: 12px; right: 12px; }
.title-in { font-size: 20px; font-weight: 700; width: calc(100% - 50px); margin: 6px 0; }
.stepper { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.step { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.step.past { color: var(--text); } .step.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.step:disabled { cursor: default; }
.version { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 10px 0; }
.version .row { flex-wrap: wrap; }
.player { margin: 10px 0; aspect-ratio: 16/9; max-height: 200px; background: #000; color: #777; border-radius: 10px; display: grid; place-items: center; font-size: 13px; }
.comment { font-size: 14px; margin: 6px 0; } .ts { font-family: ui-monospace, monospace; font-size: 12px; background: var(--line); border-radius: 6px; padding: 1px 6px; margin-right: 6px; }
.ts-in { width: 70px; }
.review { margin: 14px 0; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 20; }
.loading { text-align: center; color: #888; margin-top: 30vh; }
@media (max-width: 760px) {
  .board { grid-template-columns: 1fr; }
  header { padding-left: 12px; padding-right: 12px; } nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .as { margin-left: auto; } .as select { max-width: 150px; }
  .drow { flex-wrap: wrap; gap: 4px 10px; } .drow .title { flex-basis: 100%; }
  main { padding: 12px 12px 60px; }
}
/* sign-in, account, notes, media */
main.narrow, .narrow { max-width: 460px; }
.auth { padding-top: 8vh; }
.auth form { display: grid; gap: 4px; }
.wide { width: 100%; padding: 12px 16px; margin-top: 8px; }
.or { text-align: center; color: var(--muted); font-size: 13px; margin: 14px 0 4px; }
.link { color: var(--accent); padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.link.danger, .danger.link { color: var(--late); }
a { color: var(--accent); }
.note { background: color-mix(in srgb, var(--accent) 12%, var(--panel)); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.note .row { margin-top: 8px; }
header .me { width: 32px; height: 32px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); font-weight: 700; color: var(--text); }
header .me.on { border-color: var(--accent); }
.media { margin: 8px 0; }
.media video, .media img { width: 100%; max-height: 70vh; border-radius: 10px; background: #000; display: block; }
.media audio { width: 100%; }
.media .row { margin-top: 6px; }
.comment .ts { color: var(--accent); }
.drow.static { cursor: default; }
.ghost.on { border-color: var(--accent); }
@media (max-width: 640px) { header .as { order: 3; width: 100%; } nav { overflow-x: auto; } }
