/* 영상 리뷰 공통 스타일 (local · review · 관리 페이지) */
:root {
  --bg: #0e0f12; --panel: #16181d; --panel2: #1d2027; --line: #2a2e37;
  --text: #e9ebef; --muted: #8b919c; --orange: #ff7a1a; --orange2: #ffb27a;
  --blue: #3ea6ff; --green: #34c77b; --red: #ff5c5c;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font-family: Pretendard, "Malgun Gothic", "맑은 고딕", system-ui, sans-serif; font-size: 14px; }
button { font: inherit; color: inherit; cursor: pointer; }
.ic { vertical-align: -3px; flex-shrink: 0; }
h1 .ic { color: var(--orange); }
.item .chk .ic, .item .note .ic { vertical-align: -2px; }
.app { display: grid; grid-template-columns: 1fr 380px; grid-template-rows: auto 1fr; height: 100vh; }
header { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  border-bottom: 1px solid var(--line); background: var(--panel); }
header h1 { font-size: 15px; margin: 0; font-weight: 700; white-space: nowrap; }
header .crumb { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
header .sp { flex: 1; }
.btn { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; }
.btn:hover { border-color: #3a404c; }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #111; font-weight: 700; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.small { padding: 4px 9px; font-size: 12px; border-radius: 6px; }
select { font: inherit; color: var(--text); background: var(--panel2); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 10px; max-width: 420px; }

main { overflow: auto; padding: 14px 16px 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.stage { background: #000; border-radius: 10px; overflow: hidden; display: flex; justify-content: center; }
video { display: block; width: 100%; max-height: calc(100vh - 340px); background: #000; }
.bar { display: flex; align-items: center; gap: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar .now { color: var(--text); font-weight: 700; }
.rates button { background: none; border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; font-size: 12px; color: var(--muted); }
.rates button.on { color: #111; background: var(--orange2); border-color: var(--orange2); }

.timeline { position: relative; height: 28px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 6px; cursor: pointer; }
.timeline .cue { position: absolute; top: 4px; height: 6px; background: var(--blue); opacity: .55; border-radius: 2px; }
.timeline .range { position: absolute; top: 0; bottom: 0; background: rgba(255,122,26,.18); border-left: 1px solid var(--orange); border-right: 1px solid var(--orange); }
.timeline .mk { position: absolute; bottom: 3px; width: 4px; height: 12px; margin-left: -2px; background: var(--orange); border-radius: 1px; }
.timeline .mk.done { background: var(--green); opacity: .7; }
.timeline .mk.sel { outline: 2px solid #fff; }
.timeline .head { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.timeline .hover { position: absolute; top: -24px; transform: translateX(-50%); background: #000; color: #fff;
  font-size: 11px; padding: 2px 6px; border-radius: 4px; pointer-events: none; white-space: nowrap; display: none; }

.ctx { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 10px; min-height: 38px; }
.ctx .cur { flex: 1; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx .cur b { color: #ffe08a; font-weight: 600; }

.composer { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.composer .at { color: var(--orange); font-weight: 700; font-variant-numeric: tabular-nums; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.composer .at span.sub { color: var(--muted); font-weight: 400; }
.composer .at .btn { color: var(--text); font-weight: 400; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tags button { background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; }
.tags button.on { background: var(--orange); border-color: var(--orange); color: #111; font-weight: 700; }
.row { display: flex; gap: 8px; align-items: flex-end; }
textarea { flex: 1; resize: vertical; min-height: 58px; font: inherit; color: var(--text); background: #0b0c0f;
  border: 1px solid var(--orange); border-radius: 8px; padding: 9px 10px; outline: none; }
textarea:focus { box-shadow: 0 0 0 2px rgba(255,122,26,.25); }
.hint { color: var(--muted); font-size: 12px; }
kbd { background: var(--panel2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-size: 11px; font-family: inherit; }

aside { border-left: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
aside .top { padding: 12px 14px 8px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
aside .top .t { display: flex; align-items: center; gap: 8px; }
aside .top h2 { margin: 0; font-size: 14px; }
aside .top .cnt { color: var(--muted); font-size: 12px; }
aside .top label { color: var(--muted); font-size: 12px; display: flex; gap: 5px; align-items: center; cursor: pointer; }
.list { overflow: auto; flex: 1; padding: 8px 10px 16px; display: flex; flex-direction: column; gap: 8px; }
.item { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; gap: 4px 9px; }
.item:hover { border-color: #3a404c; }
.item.sel { border-color: var(--orange); }
.item .tc { color: var(--orange2); font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 700; padding-top: 1px; }
.item .body { min-width: 0; }
.item .tag { display: inline-block; font-size: 11px; color: #111; background: var(--orange2); border-radius: 4px; padding: 0 5px; margin-right: 5px; font-weight: 700; }
.item .txt { white-space: pre-wrap; word-break: break-word; line-height: 1.45; }
.item .meta { color: var(--muted); font-size: 11.5px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .note { color: var(--green); font-size: 12px; margin-top: 4px; white-space: pre-wrap; }
.item .acts { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.item .acts button { background: none; border: 1px solid var(--line); border-radius: 5px; font-size: 11px; color: var(--muted); padding: 2px 6px; }
.item .acts button:hover { color: var(--text); }
.item.done { opacity: .55; }
.item.done .txt { text-decoration: line-through; }
.item .chk { color: var(--green); font-weight: 700; }
.empty { color: var(--muted); text-align: center; padding: 30px 10px; line-height: 1.6; }
aside .foot { border-top: 1px solid var(--line); padding: 10px 12px; display: flex; gap: 6px; flex-wrap: wrap; }

.welcome { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.card { max-width: 620px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px 30px; line-height: 1.65; }
.card h2 { margin: 0 0 6px; font-size: 20px; }
.card ol { padding-left: 20px; margin: 10px 0 18px; color: #c9cdd4; }
.card .warn { color: var(--orange2); }
.card .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #fff; color: #111;
  padding: 9px 16px; border-radius: 8px; font-weight: 600; box-shadow: 0 6px 24px rgba(0,0,0,.4); display: none; z-index: 10; }
.hidden { display: none !important; }
@media (max-width: 980px) { .app { grid-template-columns: 1fr; grid-template-rows: auto auto auto; height: auto; } aside { border-left: 0; border-top: 1px solid var(--line); min-height: 400px; } video { max-height: 60vh; } }

/* ── 공유 리뷰·관리 페이지 ── */
.btn { display: inline-flex; align-items: center; gap: 6px; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.danger { color: var(--red); }
.btn.danger:hover { border-color: var(--red); }
.item .who { display: inline-flex; align-items: center; gap: 3px; color: var(--blue); font-size: 11.5px; font-weight: 600; margin-right: 6px; }
.item .who.me { color: var(--orange2); }
.item .acts button { display: inline-flex; align-items: center; gap: 3px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; color: var(--muted); }
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; border: 1px solid; }
.banner.warn { background: rgba(255,178,122,.08); border-color: rgba(255,178,122,.45); color: var(--orange2); }
.banner.bad { background: rgba(255,92,92,.08); border-color: rgba(255,92,92,.5); color: #ff9b9b; }
.banner.info { background: rgba(62,166,255,.08); border-color: rgba(62,166,255,.45); color: #9fd2ff; }
.banner .grow { flex: 1; color: var(--text); }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 20; padding: 16px; }
.modal .card { width: 100%; max-width: 440px; }
.modal input, .field { width: 100%; font: inherit; color: var(--text); background: #0b0c0f; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; outline: none; }
.modal input:focus, .field:focus { border-color: var(--orange); }
.usage { display: flex; flex-direction: column; gap: 6px; }
.usage .track { height: 8px; background: var(--panel2); border-radius: 999px; overflow: hidden; }
.usage .fill { height: 100%; background: var(--blue); border-radius: 999px; }
.usage .fill.warn { background: var(--orange); }
.usage .fill.bad { background: var(--red); }
.progress { height: 6px; background: var(--panel2); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--orange); width: 0; transition: width .2s; }
a.btn { color: inherit; text-decoration: none; }

/* 사이트 안 팝업 (dialog.js) */
.dlg { z-index: 30; animation: dlgFade .12s ease-out; }
.dlg .card { max-width: 480px; display: flex; flex-direction: column; gap: 12px; padding: 24px 24px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.dlg .dlg-title { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 10px; line-height: 1.4; word-break: keep-all; }
.dlg .dlg-ic { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,178,122,.12); color: var(--orange2); flex-shrink: 0; }
.dlg .dlg-ic.danger { background: rgba(255,92,92,.12); color: var(--red); }
.dlg .dlg-body { color: #c3c7ce; white-space: pre-wrap; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; max-height: 50vh; overflow: auto; }
.dlg textarea.field { min-height: 96px; resize: vertical; line-height: 1.5; }
.dlg .dlg-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.btn.primary.danger-fill { background: var(--red); border-color: var(--red); color: #fff; }
.field.shake { border-color: var(--red); animation: dlgShake .3s; }
@keyframes dlgFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dlgShake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
