:root {
  --bg: #121316;
  --bg-2: #1a1c20;
  --bg-3: #23262b;
  --line: #30343a;
  --text: #e9e7e2;
  --muted: #9a9da3;
  --accent: #3fb68b;
  --accent-ink: #08130e;
  --danger: #e5604f;
  --warn: #e3a33c;
  --skip: #e5604f;
  --blur: #5b9bf0;
  --black: #a0a4ab;
  --rec: #ff4d4d;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
body.gp-noscroll { overflow: hidden; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: 1.6rem; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 0.95rem; margin: 1rem 0 0.4rem; color: var(--muted); font-weight: 600; }
kbd {
  display: inline-block; min-width: 1.5em; padding: 0 0.35em; border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 5px; background: var(--bg-3); font: 600 0.78rem/1.5 ui-monospace, monospace; text-align: center; color: var(--text);
}
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
[hidden] { display: none !important; }

/* ---------- düğmeler ve formlar */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  padding: 0.5em 0.95em; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-3);
  color: var(--text); font: inherit; font-weight: 550; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background 0.12s, border-color 0.12s;
}
.btn:hover { background: #2c3036; border-color: #3d424a; }
.btn:focus-visible, .icon-btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #4cc79a; border-color: #4cc79a; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--bg-3); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger-ghost { background: transparent; border-color: transparent; color: var(--danger); }
.btn-danger-ghost:hover { background: rgba(229, 96, 79, 0.12); }
.btn-small { padding: 0.28em 0.65em; font-size: 0.85rem; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--line);
  border-radius: 7px; background: var(--bg-3); color: var(--text); font: 600 1rem/1 var(--font); cursor: pointer;
}
.icon-btn:hover { background: #2c3036; }
input, select, textarea {
  width: 100%; padding: 0.5em 0.65em; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text); font: inherit;
}
input[type=checkbox] { width: auto; accent-color: var(--accent); }
input[type=range] { padding: 0; accent-color: var(--accent); }
.form { display: grid; gap: 0.85rem; }
.form label { display: grid; gap: 0.3rem; font-size: 0.9rem; color: var(--muted); }
.form-row { display: flex; gap: 0.75rem; }
.form-row label { flex: 1; }
.form-row .narrow { flex: 0 0 6.5rem; }
.form-error { color: var(--danger); font-size: 0.9rem; min-height: 1.2em; }
.check { display: inline-flex; align-items: center; gap: 0.45em; cursor: pointer; font-size: 0.9rem; }
.switch { display: inline-flex; align-items: center; gap: 0.5em; cursor: pointer; font-size: 0.9rem; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { width: 36px; height: 20px; border-radius: 99px; background: var(--bg-3); border: 1px solid var(--line); position: relative; transition: background 0.15s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform 0.15s, background 0.15s; }
.switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); background: #fff; }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { padding: 0.35em 0.8em; border: 0; border-right: 1px solid var(--line); background: var(--bg); color: var(--muted); font: inherit; font-size: 0.88rem; cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--bg-3); color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.seg-full { display: flex; }
.seg-full button { flex: 1; }
.pill { display: inline-block; padding: 0.05em 0.55em; border-radius: 99px; background: var(--bg-3); border: 1px solid var(--line); font-size: 0.75rem; color: var(--muted); }
.pill-live { color: #7fe0b8; border-color: rgba(63, 182, 139, 0.5); background: rgba(63, 182, 139, 0.12); }
.pill-draft { color: #f0c27a; border-color: rgba(227, 163, 60, 0.5); background: rgba(227, 163, 60, 0.1); }
.pill-busy { color: #9cc3f5; border-color: rgba(91, 155, 240, 0.5); }
.pill-err { color: #f39a8e; border-color: rgba(229, 96, 79, 0.5); }
.notice { padding: 0.75rem 1rem; border: 1px solid rgba(63, 182, 139, 0.28); border-radius: 8px; background: rgba(63, 182, 139, 0.06); margin: 0 0 1.25rem; }

/* ---------- üst çubuk */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1.5rem;
  padding: 0.6rem max(16px, env(safe-area-inset-left)); background: rgba(18, 19, 22, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text); font-weight: 700; text-decoration: none; letter-spacing: -0.01em; }
.brand-mark { width: 22px; height: 22px; background: url(/favicon.svg) center / contain no-repeat; }
.brand-big { font-size: 1.5rem; }
.brand-big .brand-mark { width: 32px; height: 32px; }
.top nav { display: flex; gap: 0.25rem; }
.top nav a { padding: 0.35em 0.75em; border-radius: 7px; color: var(--muted); text-decoration: none; font-weight: 550; }
.top nav a:hover { color: var(--text); background: var(--bg-3); }
.top nav a.active { color: var(--text); background: var(--bg-3); }
.user-menu { margin-left: auto; position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; padding: 0.3rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
.menu button { display: block; width: 100%; padding: 0.5em 0.7em; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.menu button:hover { background: var(--bg-3); }

.main { max-width: 1240px; margin: 0 auto; padding: 1.5rem 16px 4rem; }
.main-wide { padding: 0.75rem 16px 1rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.toolbar { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.empty { text-align: center; padding: 4rem 1rem; }
.empty h2 { margin-bottom: 0.5rem; }

/* ---------- giriş */
.login-page { min-height: 100svh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(380px, 100%); padding: 2rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; }
.login-card .muted { margin: 0.3rem 0 1.5rem; }

/* ---------- kütüphane */
.shelf { margin-bottom: 2.25rem; }
.shelf h2 { margin-bottom: 0.85rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.card { display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none; transition: border-color 0.12s, transform 0.12s; }
a.card:hover { border-color: #454a52; transform: translateY(-2px); }
.poster { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; }
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-ph { width: 100%; height: 100%; background: repeating-linear-gradient(45deg, #1d2024 0 10px, #202328 10px 20px); }
.dur { position: absolute; right: 6px; bottom: 6px; padding: 0 0.4em; border-radius: 4px; background: rgba(0, 0, 0, 0.75); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.card-body { padding: 0.7rem 0.8rem 0.8rem; display: grid; gap: 0.5rem; }
.card-title { font-weight: 600; line-height: 1.3; }
.ep { color: var(--muted); font-weight: 500; }
.badges { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.card-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.uploads { display: grid; gap: 0.4rem; margin-bottom: 1rem; }
.upload-row { display: grid; grid-template-columns: 1fr 160px auto; gap: 0.75rem; align-items: center; padding: 0.5rem 0.75rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; font-size: 0.9rem; }
.upload-row progress { width: 100%; accent-color: var(--accent); }
.upload-err { border-color: var(--danger); }

/* ---------- tablo */
.table { width: 100%; border-collapse: collapse; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 0.65rem 0.85rem; text-align: left; border-bottom: 1px solid var(--line); }
.table th { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.row-actions { text-align: right; white-space: nowrap; }

/* ---------- izleme */
.watch { max-width: 1100px; margin: 0 auto; }
.watch-info { padding: 1rem 0; display: grid; gap: 0.4rem; }
.watch-info p { margin: 0.3rem 0 0; }
.watch-next h2 { margin: 1rem 0 0.75rem; }

/* ---------- modal ve bildirim */
.modal-back { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, 0.6); }
.modal { width: min(460px, 100%); max-height: calc(100svh - 32px); overflow: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.modal-wide { width: min(760px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem 0.5rem; }
.modal-head .icon-btn { border: 0; background: none; }
.modal-body { padding: 0.5rem 1.25rem 1rem; }
.modal-body p { margin: 0.3rem 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 0.75rem 1.25rem 1.1rem; }
.modal-actions .btn-danger-ghost { margin-right: auto; }
.help-cols { columns: 2 280px; column-gap: 2rem; }
.help-cols h3:first-child { margin-top: 0; }
.keys { width: 100%; border-collapse: collapse; break-inside: avoid; margin-bottom: 0.5rem; }
.keys td { padding: 0.22rem 0; font-size: 0.9rem; vertical-align: top; }
.keys td:first-child { white-space: nowrap; padding-right: 0.75rem; width: 1%; }
.toasts { position: fixed; z-index: 200; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 0.4rem; justify-items: center; pointer-events: none; }
.toast { padding: 0.55rem 1rem; border-radius: 8px; background: #2b2f35; border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); font-size: 0.92rem; transition: opacity 0.3s, transform 0.3s; }
.toast-ok { border-color: rgba(63, 182, 139, 0.6); }
.toast-error { border-color: var(--danger); }
.toast-out { opacity: 0; transform: translateY(6px); }

/* ---------- oynatıcı */
.gp { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; user-select: none; -webkit-user-select: none; }
.gp-stage { position: relative; aspect-ratio: 16 / 9; max-height: calc(100svh - 160px); width: 100%; overflow: hidden; background: #000; }
.gp-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.gp-layer { position: absolute; pointer-events: none; overflow: hidden; }
.gp-cover { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
.gp-cover-on { opacity: 1; }
.gp-skipping .gp-video, .gp-seeking .gp-video { visibility: hidden; }
.gp-region { position: absolute; }
.gp-region-blur { background: rgba(20, 20, 24, 0.35); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .gp-region-blur { background: rgba(20, 20, 24, 0.97); }
}
.gp-region-black { background: #000; }
.gp-outline { position: absolute; border: 2px dashed var(--c); border-radius: 4px; }
.gp-outline-full { border-width: 4px; border-style: solid; border-radius: 0; }
.gp-outline-skip { --c: var(--skip); background: rgba(229, 96, 79, 0.08); }
.gp-outline-blur { --c: var(--blur); background: rgba(91, 155, 240, 0.1); }
.gp-outline-black { --c: var(--black); background: rgba(160, 164, 171, 0.12); }
.gp-outline-sel { border-style: solid; }
.gp-outline-tag { position: absolute; left: 6px; top: 6px; padding: 0.05em 0.5em; border-radius: 5px; background: var(--c); color: #0b0c0e; font-size: 0.75rem; font-weight: 700; }
.gp-badge { position: absolute; top: 14px; right: 14px; padding: 0.3em 0.75em; border-radius: 99px; background: rgba(0, 0, 0, 0.7); font-size: 0.85rem; opacity: 0; transition: opacity 0.25s; pointer-events: none; }
.gp-badge-show { opacity: 1; }
.gp-center { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #fff; cursor: pointer; display: none; place-items: center; }
.gp-center svg { width: 38px; height: 38px; fill: currentColor; }
.gp-viewer.gp-paused .gp-center { display: grid; }
.gp-spinner { position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px; border: 3px solid rgba(255, 255, 255, 0.25); border-top-color: #fff; border-radius: 50%; display: none; animation: spin 0.8s linear infinite; pointer-events: none; }
.gp-loading .gp-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.gp-bar { padding: 0 10px 6px; background: #0b0c0e; transition: opacity 0.25s; }
.gp-seek { position: relative; height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.gp-seek-track { position: relative; width: 100%; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.18); transition: transform 0.12s; }
.gp-seek:hover .gp-seek-track, .gp-seek-hover .gp-seek-track { transform: scaleY(1.6); }
.gp-seek:hover .gp-seek-thumb, .gp-seek-hover .gp-seek-thumb { transform: scaleY(0.625); }
.gp-seek-buffered { position: absolute; inset: 0 auto 0 0; background: rgba(255, 255, 255, 0.22); border-radius: 3px; }
.gp-seek-fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 3px; }
.gp-seek-skips { position: absolute; inset: 0; }
.gp-seek-skip { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0 3px, rgba(255, 255, 255, 0.25) 3px 5px); z-index: 1; }
.gp-seek-thumb { position: absolute; top: 50%; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: #fff; z-index: 2; }
.gp-seek-tip { position: absolute; bottom: 22px; transform: translateX(-50%); padding: 0.1em 0.45em; border-radius: 4px; background: rgba(0, 0, 0, 0.85); font-size: 0.78rem; font-variant-numeric: tabular-nums; opacity: 0; pointer-events: none; }
.gp-seek-hover .gp-seek-tip { opacity: 1; }
.gp-row { display: flex; align-items: center; gap: 2px; }
.gp-btn { width: 38px; height: 34px; border: 0; border-radius: 6px; background: none; color: #fff; cursor: pointer; display: grid; place-items: center; }
.gp-btn:hover { background: rgba(255, 255, 255, 0.1); }
.gp-btn svg { width: 22px; height: 22px; fill: currentColor; }
.gp-vol { width: 80px; margin: 0 8px 0 2px; }
.gp-time { font-size: 0.85rem; font-variant-numeric: tabular-nums; color: #ddd; margin-left: 6px; }
.gp-spacer { flex: 1; }
.gp-fullscreen { border-radius: 0; display: flex; flex-direction: column; width: 100%; height: 100%; }
.gp-fullscreen .gp-stage { flex: 1; aspect-ratio: auto; max-height: none; }
.gp-pseudo-fs { position: fixed; inset: 0; z-index: 1000; }
.gp-fullscreen.gp-idle { cursor: none; }
.gp-fullscreen.gp-idle .gp-bar { opacity: 0; }
.gp-fullscreen .gp-bar { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0, 0, 0, 0.85)); padding-bottom: max(6px, env(safe-area-inset-bottom)); }

/* ---------- editör */
.ed { display: grid; gap: 0.6rem; }
.ed-head { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.ed-title { display: flex; align-items: baseline; gap: 0.6rem; min-width: 0; flex: 1; }
.ed-title h1 { font-size: 1.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-save { font-size: 0.85rem; color: var(--muted); }
.ed-save-ok { color: #7fe0b8; }
.ed-save-err { color: var(--danger); }
.ed-main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 0.9rem; align-items: start; }
.ed-left { display: grid; gap: 0.5rem; min-width: 0; }
.ed-player .gp-stage { max-height: calc(100svh - 430px); min-height: 200px; }
.ed-previewing .ed-player .gp { box-shadow: 0 0 0 2px var(--accent); }
.ed-recording .ed-player .gp { box-shadow: 0 0 0 3px var(--rec); }
.ed-draw { position: absolute; z-index: 3; cursor: default; }
.ed-draw-on { cursor: crosshair; background: rgba(91, 155, 240, 0.08); outline: 2px dashed var(--blur); }
.ed-draw-hint { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); padding: 0.25em 0.75em; border-radius: 99px; background: rgba(0, 0, 0, 0.75); font-size: 0.85rem; pointer-events: none; white-space: nowrap; }
.ed-box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #000; cursor: move; }
.ed-box-ellipse { border-radius: 50%; }
.ed-box-h { position: absolute; width: 12px; height: 12px; background: #fff; border: 1px solid #000; border-radius: 2px; }
.ed-box-h[data-h=nw] { left: -7px; top: -7px; cursor: nwse-resize; }
.ed-box-h[data-h=ne] { right: -7px; top: -7px; cursor: nesw-resize; }
.ed-box-h[data-h=sw] { left: -7px; bottom: -7px; cursor: nesw-resize; }
.ed-box-h[data-h=se] { right: -7px; bottom: -7px; cursor: nwse-resize; }
.ed-recbar { display: flex; align-items: center; gap: 0.75rem; }
.btn-rec { font-weight: 650; }
.btn-rec .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rec); }
.ed-recording .btn-rec { background: var(--rec); border-color: var(--rec); color: #fff; }
.ed-recording .btn-rec .dot { background: #fff; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.2; } }
.ed-rec-info { font-size: 0.88rem; font-variant-numeric: tabular-nums; flex: 1; }
.ed-recording .ed-rec-info { color: #ff9a9a; }
.ed-zoom { display: flex; gap: 0.3rem; }
.ed-hints { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.82rem; }
.ed-hints kbd { margin-right: 2px; }

.tl { position: relative; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
.tl-scroll { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.tl-inner { position: relative; min-width: 100%; }
.tl-ruler { position: relative; height: 22px; border-bottom: 1px solid var(--line); cursor: pointer; }
.tl-tick { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); }
.tl-tick span { position: absolute; left: 4px; top: 2px; font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-thumbs { position: relative; height: 48px; background: #000; cursor: pointer; overflow: hidden; }
.tl-thumb { position: absolute; top: 0; height: 48px; background-repeat: no-repeat; opacity: 0.85; border-right: 1px solid rgba(0, 0, 0, 0.6); }
.tl-track { position: relative; height: 56px; cursor: crosshair; background: repeating-linear-gradient(90deg, transparent 0 39px, rgba(255, 255, 255, 0.02) 39px 40px); touch-action: none; }
.tl-seg { position: absolute; border-radius: 5px; cursor: grab; overflow: hidden; display: flex; align-items: center; border: 1px solid rgba(0, 0, 0, 0.4); }
.tl-seg:active { cursor: grabbing; }
.tl-seg-skip { background: rgba(229, 96, 79, 0.75); }
.tl-seg-blur { background: rgba(91, 155, 240, 0.75); }
.tl-seg-black { background: rgba(140, 145, 152, 0.8); }
.tl-seg-sel { box-shadow: 0 0 0 2px #fff; z-index: 2; }
.tl-seg-label { padding: 0 10px; font-size: 0.75rem; font-weight: 650; color: #fff; white-space: nowrap; pointer-events: none; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.tl-handle { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; z-index: 1; }
.tl-handle-l { left: 0; }
.tl-handle-r { right: 0; }
.tl-seg-sel .tl-handle { background: rgba(255, 255, 255, 0.55); }
.tl-handle:hover { background: rgba(255, 255, 255, 0.8); }
.tl-rec { position: absolute; top: 2px; bottom: 2px; border-radius: 5px; background: repeating-linear-gradient(135deg, rgba(255, 77, 77, 0.8) 0 6px, rgba(255, 77, 77, 0.55) 6px 12px); pointer-events: none; }
.tl-playhead { position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #fff; z-index: 5; cursor: ew-resize; }
.tl-playhead-knob { position: absolute; top: 0; left: -6px; width: 14px; height: 12px; background: #fff; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.tl-hover { position: absolute; bottom: calc(100% + 6px); transform: translateX(-50%); display: none; padding: 3px; background: #000; border: 1px solid var(--line); border-radius: 6px; pointer-events: none; z-index: 10; }
.tl-hover-on { display: block; }
.tl-hover-img { width: 160px; height: 90px; background-repeat: no-repeat; border-radius: 3px; }
.tl-hover-time { text-align: center; font-size: 0.78rem; font-variant-numeric: tabular-nums; }

.ed-side { display: flex; flex-direction: column; gap: 0.75rem; max-height: calc(100svh - 120px); position: sticky; top: 64px; }
.ed-defaults { display: grid; gap: 0.5rem; padding: 0.85rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
.ed-defaults .seg { display: flex; }
.ed-defaults .seg button { flex: 1; }
.ed-def-row { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.ed-reaction { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.88rem; color: var(--muted); }
.ed-reaction select { width: auto; padding: 0.2em 0.4em; }
.ed-list-head { display: flex; justify-content: space-between; align-items: baseline; }
.ed-list { overflow-y: auto; display: grid; gap: 0.45rem; align-content: start; padding-right: 2px; min-height: 120px; }
.ed-empty { padding: 1rem; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); font-size: 0.92rem; }
.ed-empty p { margin: 0 0 0.4rem; color: var(--text); }
.ed-empty ol { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.35rem; }
.ed-card { padding: 0.55rem 0.7rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.ed-card:hover { border-color: #454a52; }
.ed-card-sel { cursor: default; display: grid; gap: 0.55rem; border-color: var(--accent); padding: 0.75rem; }
.ed-card-head { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; }
.ed-card-time { font-variant-numeric: tabular-nums; font-weight: 600; }
.ed-card-no { margin-left: auto; color: var(--muted); font-size: 0.78rem; }
.ed-card-note { font-size: 0.82rem; margin-top: 0.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip { padding: 0.05em 0.5em; border-radius: 5px; font-size: 0.75rem; font-weight: 700; color: #fff; }
.chip-skip { background: var(--skip); }
.chip-blur { background: var(--blur); }
.chip-black { background: #6c7178; }
.ed-time-row { display: flex; align-items: center; gap: 0.3rem; }
.ed-time-row input { width: 92px; text-align: center; font-variant-numeric: tabular-nums; padding: 0.3em 0.4em; }
.ed-time-label { width: 70px; font-size: 0.85rem; color: var(--muted); }
.ed-time-row .icon-btn { width: 26px; height: 28px; }
.ed-area { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.ed-blur { display: flex; align-items: center; gap: 0.6rem; font-size: 0.88rem; color: var(--muted); }
.ed-card-actions { display: flex; justify-content: space-between; }
.ed-card input[type=text][data-field=note] { font-size: 0.88rem; padding: 0.35em 0.55em; }

@media (max-width: 1000px) {
  .ed-main { grid-template-columns: 1fr; }
  .ed-side { position: static; max-height: none; }
  .ed-player .gp-stage { max-height: 56vh; }
}
@media (max-width: 640px) {
  .top { gap: 0.75rem; }
  .top nav a { padding: 0.3em 0.5em; }
  .brand { font-size: 0; gap: 0; }
  .brand-big { font-size: 1.4rem; gap: 0.5rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.7rem; }
  .gp-vol { display: none; }
  .gp-stage { max-height: none; }
  .upload-row { grid-template-columns: 1fr; gap: 0.3rem; }
  .table th:nth-child(4), .table td:nth-child(4) { display: none; }
  .main { padding-top: 1rem; }
}
