:root { --teal:#15DFE4; --blue:#2A52FF; --yellow:#FFC93C; --bg:#000; --panel:#0b0b0b; --line:#1d1d1d; --muted:#8a9599; --dim:#6c777b; --text:#e9eef0; --ok:#7fd8a0; --warn:#ffb44d; --bad:#ff7b6b; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: 'League Spartan', system-ui, sans-serif; font-size: 15px; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 13px; } .teal { color: var(--teal); } .yellow { color: var(--yellow); }
.spacer { flex: 1; }
h1, h2 { margin: 0 0 8px; }
input, textarea, button, select { font-family: inherit; font-size: 15px; }
input, textarea { background: #111; color: var(--text); border: 1px solid #2a2a2a; border-radius: 8px; padding: 9px 11px; width: 100%; }
input:focus, textarea:focus { outline: 2px solid var(--teal); outline-offset: -1px; }
.btn { background: var(--teal); color: #001014; border: 0; border-radius: 8px; padding: 10px 16px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.btn.ghost { background: #141414; color: var(--text); border: 1px solid #2a2a2a; font-weight: 500; }
.btn.ghost:hover { border-color: #444; }
.btn.wide { width: 100%; margin-top: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.danger { background: #3a1410; color: #ffb3a8; border: 1px solid #5a2018; }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; }
.link:hover { color: var(--text); }
.link.danger { color: #c98b82; }
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.panel { background: var(--panel); border: 1px solid #222; border-radius: 14px; padding: 28px; }
.narrow { width: min(420px, 92vw); }
.narrow form { display: grid; gap: 10px; margin-top: 14px; }
.brand { width: 120px; margin-bottom: 16px; } .brand-sm { width: 64px; }

.top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #070707; position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.top .who { font-size: 19px; font-weight: 700; }
.top .who small { font-weight: 400; color: var(--muted); font-size: 14px; margin-left: 6px; }
.saved { font-size: 13px; color: var(--ok); }
.saved.saving { color: var(--muted); } .saved.offline, .saved.signed_out { color: var(--warn); } .saved.conflict { color: var(--bad); }
.banner { padding: 10px 16px; background: #2b1d07; color: #ffd9a0; border-bottom: 1px solid #4a3410; font-size: 14px; display: flex; gap: 12px; align-items: center; }
.banner.bad { background: #2b0f0b; color: #ffc4ba; border-color: #4a1a12; }

.list-main { max-width: 900px; margin: 0 auto; padding: 20px 16px; }
.athletes { display: grid; gap: 8px; }
.athlete { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--panel); border: 1px solid #1a1a1a; border-radius: 10px; cursor: pointer; text-align: left; color: inherit; }
.athlete:hover { border-color: var(--teal); }
.athlete b { font-size: 18px; } .athlete span { color: var(--muted); font-size: 14px; }

.body { display: grid; grid-template-columns: 300px 1fr 280px; min-height: calc(100vh - 58px); }
.col { padding: 14px; border-right: 1px solid var(--line); min-width: 0; }
.col.right { border-right: 0; }
.h { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.sub { font-size: 13px; color: var(--dim); margin: 0 0 12px; }
.item { display: flex; gap: 8px; align-items: center; padding: 6px; border-radius: 8px; margin-bottom: 6px; background: #0d0d0d; border: 1px solid #1a1a1a; cursor: pointer; position: relative; }
.item:hover { border-color: #333; }
.item.sel { border-color: var(--teal); background: #04191a; }
.item.drag-over { border-top: 2px solid var(--teal); }
.item .grip { color: #555; cursor: grab; font-size: 15px; width: 10px; user-select: none; }
.item .n { color: var(--muted); font-size: 13px; width: 18px; text-align: right; }
.item img, .item .noimg { width: 64px; height: 36px; object-fit: cover; border-radius: 4px; background: #1a1a1a; flex: none; }
.item .t { flex: 1; font-size: 13px; line-height: 1.2; min-width: 0; }
.item .t span { display: block; color: var(--dim); font-size: 12px; }
.item .t .name { display: block; color: var(--text); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .mv { display: flex; flex-direction: column; }
.item .mv button { background: none; border: 0; color: #666; cursor: pointer; font-size: 11px; padding: 0 3px; line-height: 1.2; }
.item .mv button:hover { color: var(--text); }
.chip { font-size: 11px; padding: 2px 6px; border-radius: 99px; white-space: nowrap; }
.ok { background: #0f2b1b; color: var(--ok); } .warn { background: #33230a; color: var(--warn); }
.star { color: var(--yellow); }
.card-item { background: #0a1416; border-style: dashed; border-color: #1f3a3c; }
.card-item .t { color: #9fdfe1; }
.card-item.missing { border-color: #5a4415; }
.up { font-size: 13px; padding: 8px; background: #0d0d0d; border: 1px dashed #333; border-radius: 8px; margin-bottom: 6px; }
.up .barx { height: 4px; background: #1a1a1a; border-radius: 2px; margin-top: 6px; }
.up .barx i { display: block; height: 100%; background: var(--teal); border-radius: 2px; }
.up.err { border-color: #5a2018; color: #ffb3a8; }
.check-line { display: flex; gap: 8px; align-items: center; font-size: 14px; margin-top: 16px; color: var(--muted); }
.check-line input { width: auto; }
details { margin-top: 12px; font-size: 13px; color: var(--muted); }
details .item { cursor: default; }

.empty { text-align: center; padding: 80px 20px; }
.clip-head { display: flex; gap: 8px; margin-bottom: 8px; }
.title-input { font-size: 17px; font-weight: 600; }
.star-btn { background: #141414; border: 1px solid #2a2a2a; color: var(--text); border-radius: 8px; padding: 0 12px; cursor: pointer; white-space: nowrap; }
.star-btn.on { color: var(--yellow); border-color: #5a4a15; }
.player { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 16/9; background: #000; cursor: crosshair; }
.player video, .player canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.player canvas { position: absolute; inset: 0; cursor: default; }
.hint { position: absolute; left: 12px; top: 12px; background: rgba(0,0,0,.75); padding: 8px 12px; border-radius: 8px; font-size: 14px; pointer-events: none; max-width: 70%; }
.pin { position: absolute; width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--blue); transform: translate(-50%,-50%); box-shadow: 0 0 0 3px rgba(0,0,0,.55); pointer-events: none; }
.ctrls { display: flex; gap: 8px; align-items: center; margin: 10px 0; flex-wrap: wrap; }
.tc { font-variant-numeric: tabular-nums; color: var(--muted); margin-left: 6px; min-width: 120px; }
.trim { position: relative; height: 50px; border-radius: 6px; background: #111; overflow: hidden; user-select: none; touch-action: none; }
.thumbs { position: absolute; inset: 0; display: flex; }
.thumbs img { flex: 1; min-width: 0; height: 100%; object-fit: cover; opacity: .9; }
.trim .out { position: absolute; top: 0; bottom: 0; background: rgba(0,0,0,.75); pointer-events: none; }
.trim .hdl { position: absolute; top: 0; bottom: 0; width: 10px; margin-left: -5px; background: var(--teal); border-radius: 3px; cursor: ew-resize; z-index: 2; }
.trim .cm { position: absolute; top: -2px; bottom: -2px; width: 3px; margin-left: -1px; background: var(--yellow); pointer-events: none; z-index: 1; }
.trim .ph { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #fff; pointer-events: none; z-index: 3; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 8px; align-items: center; flex-wrap: wrap; }

.stat { padding: 8px 0 12px; border-bottom: 1px solid #161616; }
.stat .big { font-size: 28px; font-weight: 700; }
.stat .lbl { font-size: 13px; color: var(--muted); }
.bar { height: 6px; background: #1a1a1a; border-radius: 3px; margin: 6px 0 2px; position: relative; overflow: hidden; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--teal); }
.bar i.over { background: var(--warn); }
.chk { font-size: 14px; margin: 10px 0; display: flex; gap: 8px; line-height: 1.3; }
.chk .ic { width: 16px; flex: none; }
.chk.bad .ic { color: var(--warn); } .chk.good .ic { color: var(--ok); }
.chk button { background: none; border: 0; color: var(--teal); padding: 0; cursor: pointer; text-decoration: underline; font-size: 13px; }
.note { font-size: 12px; color: var(--dim); }
.renders { margin-top: 24px; }
.rend { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 8px 0; border-bottom: 1px solid #161616; gap: 8px; }

.dlg { background: var(--panel); color: var(--text); border: 1px solid #2a2a2a; border-radius: 14px; padding: 22px; width: min(560px, 94vw); }
.dlg::backdrop { background: rgba(0,0,0,.75); }
.wide-dlg { width: min(1280px, 96vw); }
.card-form-wrap { display: grid; grid-template-columns: 1fr 1.25fr; gap: 20px; }
.card-form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.card-form em { font-style: normal; color: var(--teal); font-size: 11px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.photo-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.card-preview canvas { width: 100%; border-radius: 8px; border: 1px solid #222; }
.card-preview { display: flex; flex-direction: column; gap: 10px; }
.versions { max-height: 50vh; overflow: auto; margin: 12px 0; }
.ver { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #1a1a1a; font-size: 14px; gap: 10px; }
.ver .tag { font-size: 11px; color: var(--warn); }
.watch { width: min(1280px, 96vw); padding: 12px; }
.watch canvas { width: 100%; display: block; border-radius: 8px; background: #000; }
.watch-bar { display: flex; align-items: center; margin-top: 10px; gap: 10px; }
.progress { height: 10px; background: #1a1a1a; border-radius: 5px; overflow: hidden; margin: 14px 0 6px; }
.progress i { display: block; height: 100%; background: var(--teal); width: 0; transition: width .3s; }
.warn-list { margin: 12px 0; padding-left: 18px; color: var(--warn); }
.row-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.drop-hint { position: fixed; inset: 0; background: rgba(21,223,228,.12); border: 3px dashed var(--teal); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; z-index: 50; pointer-events: none; }

@media (max-width: 1100px) {
  .body { grid-template-columns: 260px 1fr; }
  .col.right { grid-column: 1 / -1; border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .body { grid-template-columns: 1fr; }
  .col { border-right: 0; border-bottom: 1px solid var(--line); }
  .card-form-wrap { grid-template-columns: 1fr; }
}
.player.previewing .pin, .player.previewing .hint { display: none !important; }
