:root {
  --felt: #0c3b2b;
  --felt-deep: #082a1f;
  --felt-light: #124d38;
  --brass: #d9b25f;
  --brass-bright: #f0cd7e;
  --cream: #f4efe3;
  --cream-dim: #cdc7b8;
  --ink: #061912;
  --chalk: #6ea8b0;
  --red: #c0392b;
  --line: rgba(217, 178, 95, 0.18);
  --radius: 14px;
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.7);
  --font-display: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* Reserve the scrollbar gutter so locking body scroll (modal open) doesn't shift the page. */
html { scrollbar-gutter: stable; }
body {
  font-family: var(--font-body);
  color: var(--cream);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(217, 178, 95, 0.08), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(110, 168, 176, 0.06), transparent 55%),
    linear-gradient(160deg, var(--felt) 0%, var(--felt-deep) 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brass-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

/* felt texture overlay */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
header.site {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(6, 25, 18, 0.92), rgba(6, 25, 18, 0.6));
  border-bottom: 1px solid var(--line);
}
.site .wrap { display: flex; align-items: center; gap: 18px; height: 74px; }
.brand { display: flex; align-items: center; gap: 13px; font-family: var(--font-display); font-weight: 600; text-decoration: none; }
.brand:hover { text-decoration: none; }
.logo-mark { height: 56px; width: auto; display: block; filter: drop-shadow(0 3px 8px rgba(0,0,0,0.4)); transition: transform .15s ease; }
.brand:hover .logo-mark { transform: scale(1.04); }
.brand-sub { color: var(--brass); font-size: 12px; letter-spacing: 3px; text-transform: uppercase; font-family: var(--font-body); font-weight: 600; }
.brand .ball {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fff 0 8%, var(--brass) 30%, #7d5c1c 100%);
  box-shadow: inset -3px -4px 8px rgba(0,0,0,0.5), 0 3px 10px rgba(0,0,0,0.4);
  display: grid; place-items: center; color: var(--ink); font-weight: 800; font-size: 15px; flex: none;
  font-family: var(--font-body);
}
.brand b { font-size: 19px; letter-spacing: 0.2px; }
.brand span { display: block; font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--brass); font-family: var(--font-body); font-weight: 600; }
.spacer { flex: 1; }
.nav-user { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--cream-dim); }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  border: 1px solid transparent; border-radius: 999px; padding: 11px 20px;
  cursor: pointer; transition: transform .12s ease, box-shadow .2s, background .2s, border-color .2s;
  display: inline-flex; align-items: center; gap: 8px; line-height: 1; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, var(--brass-bright), var(--brass)); color: var(--ink); box-shadow: 0 6px 18px -6px rgba(217,178,95,0.6); }
.btn-primary:hover { box-shadow: 0 10px 26px -8px rgba(217,178,95,0.75); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--cream); }
.btn-ghost:hover { border-color: var(--brass); background: rgba(217,178,95,0.08); }
.btn-danger { background: transparent; border-color: rgba(192,57,43,0.5); color: #e8897d; }
.btn-danger:hover { background: rgba(192,57,43,0.12); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 7px 13px; font-size: 13px; }

/* ---------- hero ---------- */
.hero { padding: 70px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 50px; align-items: center; }
.eyebrow { color: var(--brass); text-transform: uppercase; letter-spacing: 4px; font-size: 12px; font-weight: 700; }
.hero h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(34px, 5vw, 58px); line-height: 1.02; margin: 16px 0 18px; }
.hero h1 em { font-style: italic; color: var(--brass-bright); }
.hero p.lead { font-size: 18px; color: var(--cream-dim); max-width: 46ch; line-height: 1.6; }
.hero-actions { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-card {
  background: linear-gradient(165deg, rgba(18,77,56,0.9), rgba(8,42,31,0.9));
  border: 1px solid var(--line); border-radius: 20px; padding: 30px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.hero-card::after { content:""; position:absolute; right:-40px; top:-40px; width:160px; height:160px; border-radius:50%;
  background: radial-gradient(circle at 35% 35%, rgba(240,205,126,0.35), transparent 70%); }
.hero-logo { display: block; width: 150px; height: auto; margin: 0 auto 22px; position: relative; z-index: 1; filter: drop-shadow(0 6px 18px rgba(0,0,0,0.45)); }
.feature-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.feature-row:last-child { border-bottom: 0; }
.feature-row .dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; flex: none; }
.feature-row h4 { margin: 0 0 3px; font-size: 15px; }
.feature-row p { margin: 0; font-size: 13px; color: var(--cream-dim); }

/* ---------- section ---------- */
.section { padding: 48px 0 80px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px; gap: 16px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--font-display); font-weight: 600; font-size: 30px; margin: 0; }
.section-head p { color: var(--cream-dim); margin: 4px 0 0; font-size: 14px; }

/* ---------- video grid ---------- */
/* min() stops the track from forcing horizontal overflow on narrow phones */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 22px; }
.vcard { background: rgba(8,42,31,0.6); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .15s, border-color .2s; cursor: pointer; }
.vcard:hover { transform: translateY(-4px); border-color: var(--brass); }
.vthumb { aspect-ratio: 16/9; background: #06231a center/cover no-repeat; position: relative; display: grid; place-items: center; }
.vthumb .play { width: 54px; height: 54px; border-radius: 50%; background: rgba(6,25,18,0.55); border: 1px solid rgba(244,239,227,0.5); display: grid; place-items: center; backdrop-filter: blur(2px); }
.vthumb .play svg { fill: var(--cream); margin-left: 3px; }
.vthumb .dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,0.7); padding: 3px 8px; border-radius: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.vcard .meta { padding: 14px 16px 18px; }
.vcard .meta h3 { margin: 0 0 5px; font-size: 16px; font-family: var(--font-display); font-weight: 600; }
.vcard .meta p { margin: 0; font-size: 13px; color: var(--cream-dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- empty / states ---------- */
.empty { text-align: center; padding: 70px 20px; color: var(--cream-dim); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty .big { font-size: 44px; margin-bottom: 8px; }

/* guide / help */
.guide { display: grid; gap: 16px; }
.guide-step { display: flex; gap: 14px; align-items: flex-start; }
.gs-num { width: 30px; height: 30px; border-radius: 50%; background: var(--brass); color: var(--ink); font-weight: 800; display: grid; place-items: center; flex: none; font-size: 15px; margin-top: 1px; }
.gs-body { min-width: 0; }
.gs-body h4 { margin: 3px 0 5px; font-size: 15px; }
.gs-body p { margin: 0; font-size: 14px; color: var(--cream-dim); line-height: 1.6; }
.gs-body strong { color: var(--cream); font-weight: 600; }

/* simple inline SVG icons */
.icn { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icn-fill { fill: currentColor; stroke: none; }
.icn-lg { width: 34px; height: 34px; stroke-width: 1.6; vertical-align: middle; }
.admin-nav button { display: inline-flex; align-items: center; gap: 8px; }

/* toast notifications (replace browser alert) */
.toast-wrap { position: fixed; top: 18px; right: 18px; z-index: 300; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 36px)); pointer-events: none; }
.toast { background: linear-gradient(165deg, #0f4735, #0a3225); border: 1px solid var(--line); border-left: 4px solid var(--brass); border-radius: 12px; padding: 13px 16px; color: var(--cream); font-size: 14px; line-height: 1.45; box-shadow: var(--shadow); opacity: 0; transform: translateX(20px); transition: opacity .25s ease, transform .25s ease; pointer-events: auto; }
.toast.show { opacity: 1; transform: translateX(0); }
.toast.error { border-left-color: var(--red); }
.toast.info { border-left-color: var(--chalk); }
.toast.ok { border-left-color: #9ad9b0; }
.ui-confirm { z-index: 200; }

/* glossy red billiard ball */
.ball-red { display: inline-block; width: 52px; height: 52px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8a7a 0 6%, #e23b2e 45%, #8f1c14 100%);
  box-shadow: inset -4px -5px 10px rgba(0,0,0,0.45), 0 5px 14px rgba(0,0,0,0.4); }

/* ---------- modal ---------- */
/* Lock the page behind an open modal so there's only ONE scrollbar (the modal's). */
body:has(.modal-back.open) { overflow: hidden; }
/* align-items:flex-start + margin:auto centers the modal when it fits, but lets a
   tall modal start at the top and scroll (no clipped top). */
.modal-back { position: fixed; inset: 0; background: rgba(3,14,10,0.78); backdrop-filter: blur(6px); z-index: 100; display: none; align-items: flex-start; justify-content: center; padding: 20px; overflow-y: auto; overscroll-behavior: contain; }
.modal-back.open { display: flex; }
.modal { background: linear-gradient(165deg, #0f4735, #0a3225); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); width: 100%; max-width: 440px; padding: 34px; position: relative; margin: auto; }
.modal.wide { max-width: 960px; }
.modal h3 { font-family: var(--font-display); font-weight: 600; font-size: 24px; margin: 0 0 6px; }
.modal .sub { color: var(--cream-dim); font-size: 14px; margin: 0 0 22px; }
.modal .x { position: absolute; top: 16px; right: 18px; background: none; border: 0; color: var(--cream-dim); font-size: 24px; cursor: pointer; line-height: 1; }
.modal .x:hover { color: var(--cream); }

/* ---------- forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--cream-dim); margin-bottom: 6px; }
.input, textarea.input, select.input {
  width: 100%; background: rgba(6,25,18,0.6); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; color: var(--cream); font-family: var(--font-body); font-size: 15px; transition: border-color .2s;
}
.input:focus { outline: none; border-color: var(--brass); }
textarea.input { resize: vertical; min-height: 74px; }
.code-input { letter-spacing: 12px; text-align: center; font-size: 26px; font-weight: 700; padding-left: 26px; }
.form-msg { font-size: 13px; margin-top: 6px; min-height: 18px; }
.form-msg.err { color: #f0a79c; }
.form-msg.ok { color: #9ad9b0; }
.switch-line { text-align: center; margin-top: 18px; font-size: 14px; color: var(--cream-dim); }
.switch-line button { background: none; border: 0; color: var(--brass-bright); cursor: pointer; font: inherit; font-weight: 600; }
.tabs { display: flex; gap: 6px; background: rgba(6,25,18,0.5); padding: 5px; border-radius: 12px; margin-bottom: 22px; }
.tabs button { flex: 1; background: none; border: 0; color: var(--cream-dim); padding: 9px; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 600; font-size: 14px; }
.tabs button.active { background: rgba(217,178,95,0.15); color: var(--brass-bright); }

.dev-note { background: rgba(110,168,176,0.12); border: 1px solid rgba(110,168,176,0.35); border-radius: 10px; padding: 12px 14px; font-size: 13px; margin-bottom: 16px; color: #bfe2e6; }
.dev-note code { background: rgba(0,0,0,0.3); padding: 2px 7px; border-radius: 5px; font-size: 16px; letter-spacing: 3px; font-weight: 700; color: var(--cream); }

footer.site { border-top: 1px solid var(--line); padding: 30px 0; color: var(--cream-dim); font-size: 13px; text-align: center; }

.hidden { display: none !important; }
.badge { font-size: 11px; padding: 3px 9px; border-radius: 999px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.badge.live { background: rgba(154,217,176,0.16); color: #9ad9b0; }
.badge.draft { background: rgba(205,199,184,0.14); color: var(--cream-dim); }
.badge.rendering { background: rgba(217,178,95,0.16); color: var(--brass-bright); }
.badge.failed { background: rgba(192,57,43,0.18); color: #e8897d; }

/* ---------- admin ---------- */
.panel { background: rgba(8,42,31,0.55); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 26px; }
.panel > h3 { font-family: var(--font-display); font-weight: 600; font-size: 20px; margin: 0 0 4px; }
.panel .hint { color: var(--cream-dim); font-size: 13px; margin: 0 0 18px; }
.src-list, .proj-list { display: grid; gap: 12px; }
.row-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: rgba(6,25,18,0.5); border: 1px solid var(--line); border-radius: 10px; }
.row-item .thumb { width: 92px; height: 52px; border-radius: 6px; background: #06231a center/cover no-repeat; flex: none; }
.row-item .info { flex: 1; min-width: 0; }
.row-item .info b { display: block; font-size: 15px; }
.row-item .info small { color: var(--cream-dim); font-size: 12px; }
.row-item .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* --- Admin: full-width layout --- */
.wrap-admin { max-width: min(1720px, calc(100vw - 56px)); }

/* Sub-navigation inside the Settings section */
.sub-nav { display: inline-flex; gap: 6px; background: rgba(6,25,18,0.5); padding: 5px; border-radius: 11px; margin-bottom: 22px; flex-wrap: wrap; }
.sub-nav button { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--cream-dim); padding: 9px 16px; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 600; font-size: 13.5px; }
.sub-nav button:hover { color: var(--cream); }
.sub-nav button.active { background: rgba(217,178,95,0.15); color: var(--brass-bright); }
.sub-nav .icn { width: 16px; height: 16px; }

/* --- Video tiles --- */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tile-grid-sm { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; }
.tile-empty { grid-column: 1 / -1; color: var(--cream-dim); font-size: 14px; margin: 4px 0; }
.tile { display: flex; flex-direction: column; background: rgba(6,25,18,0.55); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color .15s ease, transform .15s ease; }
.tile:hover { border-color: rgba(217,178,95,0.45); transform: translateY(-2px); }
.tile .tile-thumb { position: relative; aspect-ratio: 16/9; background: #06231a center/cover no-repeat; }
.tile .thumb-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.tile .thumb-dur { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,0.72); color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; padding: 2px 7px; border-radius: 5px; }
.tile .thumb-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(0,0,0,0.45); }
.tile .thumb-progress span { display: block; height: 100%; background: var(--brass); transition: width .4s ease; }
.tile .tile-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 0; }
.tile .tile-title { font-size: 15px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.tile .tile-meta { font-size: 12px; color: var(--cream-dim); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tile .tile-err { color: #e8897d; font-size: 12px; }
.tile .tile-actions { margin-top: auto; padding-top: 6px; display: flex; gap: 7px; flex-wrap: wrap; }
.tile .tile-actions .btn { flex: 1 1 auto; }
.tile-grid-sm .tile .tile-body { padding: 10px 12px 12px; gap: 5px; }
.tile-grid-sm .tile .tile-title { font-size: 14px; -webkit-line-clamp: 1; line-clamp: 1; }

.dropzone { border: 2px dashed var(--line); border-radius: 12px; padding: 34px; text-align: center; color: var(--cream-dim); cursor: pointer; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.drag { border-color: var(--brass); background: rgba(217,178,95,0.06); }
.progress { height: 8px; background: rgba(6,25,18,0.7); border-radius: 999px; overflow: hidden; margin-top: 14px; display: none; }
.progress.show { display: block; }
.progress > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brass), var(--brass-bright)); transition: width .2s; }

/* clip editor */
/* Two-column form grid (settings: SMTP + admin) */
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

/* ===== Full-screen production editor ===== */
.editor-full { padding: 0; align-items: stretch; }
.editor-shell { display: flex; flex-direction: column; width: 100%; height: 100vh; background: linear-gradient(165deg, #0c3b2c, #072117); }
/* Slim single top bar: close · source · summary · save */
.editor-top { display: flex; align-items: center; gap: 12px; padding: 7px 14px; border-bottom: 1px solid var(--line); flex: none; }
.editor-top .x { background: none; border: 0; color: var(--cream-dim); font-size: 26px; line-height: 1; cursor: pointer; flex: none; padding: 0 4px; }
.editor-top .x:hover { color: var(--cream); }
.editor-top .src-pick { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 440px; }
.editor-top .src-pick label { font-size: 12px; color: var(--cream-dim); font-weight: 600; white-space: nowrap; }
.editor-top .src-pick select { flex: 1; min-width: 0; padding: 6px 8px; font-size: 13px; }
.editor-top .summary { flex: 1; text-align: right; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-top .form-msg { margin: 0; flex: none; }
.editor-top .top-save { display: flex; gap: 8px; flex: none; }

.editor-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0,1fr) 340px; }
.editor-stage { min-width: 0; overflow-y: auto; padding: 12px 16px 16px; display: flex; flex-direction: column; }

/* Video flanked by SÆT START / SÆT SLUT buttons */
.stage-row { display: flex; align-items: stretch; gap: 10px; }
.stage-center { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.stage-video { display: flex; justify-content: center; }
.stage-frame { position: relative; display: inline-block; line-height: 0; }
.editor-vid { width: auto; max-width: 100%; max-height: 42vh; aspect-ratio: 16/9; border-radius: 12px; background: #000; }
@media (max-height: 820px) { .editor-vid { max-height: 34vh; } }
@media (max-height: 680px) { .editor-vid { max-height: 27vh; } }

/* Transition fade overlay (mirrors fade/dissolve at clip boundaries in preview) */
.stage-fade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; border-radius: 12px; z-index: 1; }
/* Live overlay preview layer (mirrors the rendered text/scroll/image overlays) */
.ov-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; border-radius: 12px; display: none; z-index: 2; }
.ov-layer.on { display: block; }
.ov-item { position: absolute; line-height: 1.15; white-space: pre-wrap; text-shadow: 0 2px 6px rgba(0,0,0,0.7); }
.ov-item.ov-scroll { white-space: nowrap; }
.ov-item img { display: block; }
.ov-item.ov-draggable { pointer-events: auto; cursor: move; }

/* GIF library */
.gif-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; margin-top: 8px; max-height: 62vh; overflow-y: auto; }
.gif-card { border: 1px solid var(--line); border-radius: 12px; padding: 8px; cursor: pointer; background: rgba(6,25,18,0.5); text-align: center; }
.gif-card:hover { border-color: var(--brass); background: rgba(217,178,95,0.08); }
.gif-card .gwrap { height: 110px; border-radius: 8px; background: linear-gradient(135deg, #0c3b2c, #072117); display: grid; place-items: center; overflow: hidden; }
.gif-card img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gif-card .gl { display: block; font-size: 13px; font-weight: 700; margin-top: 7px; color: var(--cream); }
.gif-card .gh { display: block; font-size: 11px; color: var(--cream-dim); line-height: 1.35; }

/* Timeline with playhead + selected clip region */
.timeline { position: relative; height: 16px; margin: 16px 2px 0; background: rgba(6,25,18,0.85); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.tl-sel { position: absolute; top: -1px; bottom: -1px; background: rgba(217,178,95,0.28); border-left: 2px solid var(--brass); border-right: 2px solid var(--brass); display: none; }
.tl-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; }
.tl-start { background: #4a9d6b; }
.tl-end { background: #d98f4a; }
.tl-play { position: absolute; top: -4px; bottom: -4px; width: 3px; background: var(--brass-bright); border-radius: 2px; left: 0; box-shadow: 0 0 6px rgba(0,0,0,0.6); }

/* In/out marking — compact buttons flanking the video */
.mark-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; flex: 0 0 92px; padding: 10px 8px; border-radius: 12px; border: 2px solid var(--line); background: rgba(6,25,18,0.6); color: var(--cream); cursor: pointer; font: inherit; text-align: center; }
.mark-btn .icn { width: 24px; height: 24px; flex: none; }
.mark-btn .mk-lines { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.mark-btn .mk-lbl { font-size: 13px; font-weight: 800; line-height: 1.1; }
.mark-btn .mk-val { font-size: 13px; font-variant-numeric: tabular-nums; color: rgba(255,255,255,0.82); }
.mk-clear { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: rgba(0,0,0,0.35); color: #fff; cursor: pointer; }
.mk-clear:hover { background: rgba(0,0,0,0.6); }
/* Solid green START / red SLUT so they read at a glance */
.mark-start { border-color: #3f9560; background: #2f7d4e; color: #fff; }
.mark-start:hover { background: #37905a; border-color: #58b57e; }
.mark-start .mk-val { color: rgba(255,255,255,0.82); }
.mark-start.set { border-color: #9be7ba; }
.mark-start.set .mk-val { color: #eafff2; }
.mark-end { border-color: #c0473c; background: #b23a30; color: #fff; }
.mark-end:hover { background: #c54236; border-color: #d9695e; }
.mark-end .mk-val { color: rgba(255,255,255,0.82); }
.mark-end.set { border-color: #f4b0a6; }
.mark-end.set .mk-val { color: #ffeae6; }
.mark-len { text-align: center; min-width: 74px; font-variant-numeric: tabular-nums; font-weight: 800; font-size: 15px; color: var(--brass-bright); white-space: nowrap; line-height: 1.05; }
.mark-len small { display: block; font-size: 9px; font-weight: 700; color: var(--cream-dim); text-transform: uppercase; letter-spacing: 1px; }
/* Compact add-clip row under the video */
.mark-add { display: flex; gap: 10px; margin-top: 12px; align-items: center; }
.mark-add .input { flex: 1; min-width: 0; }
.mark-add .btn { white-space: nowrap; }

/* Sidebar */
.editor-side { border-left: 1px solid var(--line); background: rgba(6,25,18,0.35); padding: 14px; display: flex; flex-direction: column; gap: 11px; min-height: 0; overflow-y: auto; }
.editor-side .field { margin: 0; }
.editor-side textarea.input { min-height: 58px; }
.side-head { font-size: 12px; font-weight: 700; color: var(--cream-dim); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }
.editor-side .clips { max-height: none; overflow: visible; }
.editor-side .empty { padding: 26px 14px; }

/* Bottom action bar */
.editor-bottom { flex: none; display: flex; align-items: center; gap: 16px; padding: 13px 22px; border-top: 1px solid var(--line); background: rgba(6,25,18,0.5); flex-wrap: wrap; }
.editor-bottom .rights-check { flex: 1 1 300px; }
.editor-bottom .form-msg { margin: 0; }

/* Overlay effects + audio in the editor sidebar */
.fx-add { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.fx-list { display: flex; flex-direction: column; gap: 10px; }
.fx-card { background: rgba(6,25,18,0.55); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.fx-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.fx-card-head b { font-size: 13px; color: var(--brass-bright); }
.fx-card .mini { background: none; border: 1px solid var(--line); color: var(--cream-dim); border-radius: 6px; width: 26px; height: 26px; cursor: pointer; font-size: 13px; }
.fx-card .mini:hover { border-color: #c0392b; color: #e8897d; }
.fx-card textarea.input { min-height: 44px; font-size: 13px; margin-bottom: 8px; }
.fx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fx-grid label { font-size: 11px; color: var(--cream-dim); display: flex; flex-direction: column; gap: 3px; }
.fx-grid label.fx-check { flex-direction: row; align-items: center; gap: 6px; }
.fx-card select { background: rgba(6,25,18,0.7); color: var(--cream); border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; font: inherit; font-size: 12px; }
.fx-grid input.input { padding: 5px 7px; font-size: 12px; }
.fx-grid input[type=color] { width: 100%; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; cursor: pointer; }
.fx-grid input[type=checkbox], .fx-check input { width: 15px; height: 15px; accent-color: var(--brass); }
.fx-imgrow { display: flex; gap: 10px; }
.fx-thumb { width: 72px; height: 48px; flex: none; border-radius: 6px; border: 1px solid var(--line); background: #06231a center/contain no-repeat; }
.fx-imgrow .fx-grid { flex: 1; grid-template-columns: 1fr; }
.audio-box { display: flex; flex-direction: column; gap: 12px; }
.audio-box .fx-row { display: flex; flex-direction: column; gap: 6px; }
.audio-box .fx-row > label { font-size: 12px; font-weight: 600; color: var(--cream-dim); }
.slider-row { display: flex; align-items: center; gap: 10px; }
.slider-row input[type=range] { flex: 1; accent-color: var(--brass); }
.slider-val { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--brass-bright); min-width: 42px; text-align: right; }
.music-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.music-name { font-size: 12px; color: var(--cream-dim); }
.fx-check { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--cream); cursor: pointer; }

@media (max-width: 860px) {
  .editor-main { grid-template-columns: 1fr; grid-template-rows: auto auto; overflow-y: auto; }
  .editor-side { border-left: 0; border-top: 1px solid var(--line); }
  .seek-to { position: static; transform: none; }
}
/* Narrow screens: video full width, START/SLUT drop below it side by side */
@media (max-width: 700px) {
  .stage-row { flex-wrap: wrap; }
  .stage-center { order: -1; flex: 1 1 100%; }
  .stage-row .mark-btn { flex: 1 1 0; flex-direction: row; gap: 10px; padding: 10px 12px; }
  .stage-row .mark-btn .mk-lines { flex-direction: row; gap: 8px; align-items: baseline; }
  .editor-top { flex-wrap: wrap; }
  .editor-top .summary { order: 5; flex: 1 1 100%; text-align: left; }
}
.step-bar { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 12px; flex-wrap: wrap; position: relative; }
.play-btn { width: 58px; height: 42px; border-radius: 9px; border: 0; background: var(--brass); color: var(--ink); display: grid; place-items: center; cursor: pointer; flex: none; margin-right: 4px; }
.play-btn:hover { background: var(--brass-bright); }
.play-btn svg { width: 24px; height: 24px; }
.step-btn { background: rgba(6,25,18,0.7); border: 1px solid var(--line); color: var(--cream-dim); border-radius: 7px; padding: 6px 9px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.step-btn:hover { border-color: var(--brass); color: var(--cream); }
.step-btn:active { background: var(--brass); color: var(--ink); }
.cur-time { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 16px; color: var(--brass-bright); background: rgba(6,25,18,0.7); border: 1px solid var(--line); border-radius: 8px; padding: 5px 12px; min-width: 96px; text-align: center; }
.seek-to { position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--cream-dim); display: flex; align-items: center; gap: 6px; }
.seek-to input { width: 92px; background: rgba(6,25,18,0.7); color: var(--cream); border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; font: inherit; font-size: 12px; font-variant-numeric: tabular-nums; }
.mark-bar { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.mark-pill { background: rgba(6,25,18,0.7); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; font-size: 13px; font-variant-numeric: tabular-nums; }
.mark-pill b { color: var(--brass-bright); }
.clips { display: flex; flex-direction: column; gap: 0; max-height: 340px; overflow-y: auto; padding-right: 4px; }
.clip { display: flex; align-items: center; gap: 10px; background: rgba(6,25,18,0.5); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.clip .n { width: 26px; height: 26px; border-radius: 50%; background: var(--brass); color: var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.clip .clip-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.clip .clip-name { width: 100%; background: rgba(6,25,18,0.6); color: var(--cream); border: 1px solid transparent; border-radius: 6px; padding: 4px 7px; font: inherit; font-size: 13px; font-weight: 600; }
.clip .clip-name::placeholder { color: var(--cream-dim); font-weight: 400; font-style: italic; }
.clip .clip-name:hover { border-color: var(--line); }
.clip .clip-name:focus { border-color: var(--brass); background: rgba(6,25,18,0.9); outline: none; }
.clip .t { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--cream-dim); padding-left: 2px; }
.clip .t small { color: var(--brass); }
.clip .clip-btns { display: flex; gap: 6px; flex: none; }
.clip .mini { background: none; border: 1px solid var(--line); color: var(--cream-dim); border-radius: 6px; width: 28px; height: 28px; cursor: pointer; font-size: 14px; }
.clip .mini:hover { border-color: var(--brass); color: var(--cream); }
.trans-row { display: flex; align-items: center; gap: 8px; padding: 6px 0 6px 34px; }
.trans-row::before { content: "↓"; color: var(--brass); font-weight: 700; }
.trans-row select { background: rgba(6,25,18,0.7); color: var(--cream); border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; font: inherit; font-size: 12px; }
.trans-row input { width: 62px; background: rgba(6,25,18,0.7); color: var(--cream); border: 1px solid var(--line); border-radius: 7px; padding: 5px 6px; font: inherit; font-size: 12px; }
.trans-row label { font-size: 11px; color: var(--cream-dim); }
.editor-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.summary { font-size: 13px; color: var(--cream-dim); margin-right: auto; align-self: center; }

/* youtube import */
.yt-sep { display: flex; align-items: center; gap: 14px; margin: 20px 0 14px; color: var(--cream-dim); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.yt-sep::before, .yt-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.yt-import { display: flex; gap: 10px; }
.yt-import .input { flex: 1; }
.yt-import .btn { white-space: nowrap; }
@media (max-width: 560px) { .yt-import { flex-direction: column; } }
.yt-range { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-top: 12px; }
.yt-range-lbl { color: var(--cream-dim); font-size: 13px; }
.yt-range label { display: inline-flex; align-items: center; gap: 8px; color: var(--cream-dim); font-size: 13px; }
.yt-range .input-time { width: 110px; flex: none; text-align: center; font-variant-numeric: tabular-nums; }

/* admin nav */
.admin-nav { display: inline-flex; gap: 6px; background: rgba(6,25,18,0.5); padding: 5px; border-radius: 12px; margin-bottom: 26px; flex-wrap: wrap; }
.admin-nav button { background: none; border: 0; color: var(--cream-dim); padding: 9px 18px; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 600; font-size: 14px; }
.admin-nav button:hover { color: var(--cream); }
.admin-nav button.active { background: rgba(217,178,95,0.15); color: var(--brass-bright); }

/* members */
.plan-note { margin-top: 14px; background: rgba(110,168,176,0.1); border: 1px solid rgba(110,168,176,0.3); border-radius: 10px; padding: 12px 15px; font-size: 13px; color: #bfe2e6; line-height: 1.55; }
.member-list { display: grid; gap: 10px; }
.member-row { display: grid; grid-template-columns: 1.4fr 1.6fr auto auto auto; gap: 10px; align-items: center; background: rgba(6,25,18,0.5); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.member-row .input { padding: 8px 10px; font-size: 14px; }
.member-row select.input { min-width: 120px; }
.member-row .conf { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--cream-dim); white-space: nowrap; }
.member-row .conf input { width: 16px; height: 16px; accent-color: var(--brass); }
.member-row .m-actions { display: flex; gap: 6px; }
.member-row .created { font-size: 11px; color: var(--cream-dim); grid-column: 1 / -1; margin-top: -2px; }
@media (max-width: 760px) { .member-row { grid-template-columns: 1fr 1fr; } .member-row .m-actions { grid-column: 1 / -1; } }

/* clip source tag */
.clip .src-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 7px; border-radius: 999px; border: 1px solid; flex: none; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* rights disclaimer */
.disclaimer { margin-top: 22px; background: rgba(192,57,43,0.1); border: 1px solid rgba(192,57,43,0.4); border-radius: 12px; padding: 14px 18px; }
.disclaimer b { color: #f0a79c; font-size: 14px; }
.disclaimer p { margin: 6px 0 12px; font-size: 13px; color: var(--cream-dim); line-height: 1.55; }
.rights-check { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: var(--cream); cursor: pointer; font-weight: 600; }
.rights-check input { margin-top: 2px; width: 17px; height: 17px; accent-color: var(--brass); flex: none; cursor: pointer; }

@media (max-width: 900px) { .editor-grid { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 30px; }
  .site .wrap { height: 62px; }
  .brand b { font-size: 17px; }
  .logo-mark { height: 46px; }
}

/* ---------- phones ---------- */
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }

  /* header: keep logo + both buttons on one line */
  .site .wrap { gap: 10px; }
  .nav-user { gap: 8px; }
  .nav-user .btn-sm { padding: 8px 12px; font-size: 13px; }
  .nav-user span { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .logo-mark { height: 40px; }

  /* hero */
  .hero { padding: 34px 0 24px; }
  .hero h1 { font-size: clamp(28px, 8.5vw, 40px); margin: 12px 0 14px; overflow-wrap: break-word; }
  .hero p.lead, .section-head h2, .vcard .meta h3 { overflow-wrap: break-word; }
  .hero p.lead { font-size: 16px; }
  .eyebrow { font-size: 11px; letter-spacing: 3px; }
  .hero-actions { margin-top: 22px; flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; justify-content: center; padding: 14px 20px; }
  .hero-card { padding: 22px; }
  .hero-logo { width: 120px; margin-bottom: 16px; }

  /* sections & video grid */
  .section { padding: 28px 0 48px; }
  .section-head h2 { font-size: 24px; }
  .grid { gap: 16px; }
  .vcard .meta h3 { font-size: 17px; }

  /* modals (auth + video player) use more of the screen */
  .modal-back { padding: 12px; align-items: flex-start; }
  .modal { padding: 22px 20px; border-radius: 16px; margin: 8px 0; }
  .modal.wide { max-width: 100%; }
  .modal h3 { font-size: 21px; }
  .code-input { letter-spacing: 8px; font-size: 22px; padding-left: 8px; }
  .tabs button { padding: 11px 8px; }

  /* comfortable tap targets */
  .btn { padding: 12px 18px; }
}

/* ===== Bottom multitrack timeline (Canva-style) ===== */
.mt-wrap { flex: none; border-top: 1px solid var(--line); background: rgba(4,18,13,0.72); display: flex; flex-direction: column; }
.mt-toolbar { display: flex; align-items: center; gap: 10px; padding: 6px 12px; flex-wrap: wrap; }
.mt-toolbar .play-btn { width: 46px; height: 36px; margin: 0; }
.mt-toolbar .play-btn svg { width: 20px; height: 20px; }
.mt-time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; color: var(--brass-bright); background: rgba(6,25,18,0.7); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; }
.mt-time .mt-sep { color: var(--cream-dim); margin: 0 5px; }
.mt-add { display: flex; gap: 6px; flex-wrap: wrap; }
.mt-zoom { display: flex; gap: 6px; margin-left: auto; }
.mt-zoom .mini { width: 30px; height: 30px; background: rgba(6,25,18,0.7); border: 1px solid var(--line); color: var(--cream); border-radius: 7px; cursor: pointer; font-size: 16px; }
.mt-zoom .mini:hover { border-color: var(--brass); }

.mt-scroll { overflow-x: auto; overflow-y: hidden; padding: 0 0 10px; }
.mt-inner { position: relative; min-width: 100%; padding-left: 92px; }
.mt-ruler { position: relative; height: 20px; margin-left: 0; border-bottom: 1px solid var(--line); }
.mt-ruler .tick { position: absolute; top: 0; bottom: 0; border-left: 1px solid rgba(217,178,95,0.22); padding-left: 4px; font-size: 10px; color: var(--cream-dim); font-variant-numeric: tabular-nums; }
.mt-lanes { display: flex; flex-direction: column; gap: 5px; padding-top: 5px; }
.mt-lane { position: relative; height: 40px; }
@media (max-height: 820px) { .mt-lane { height: 34px; } .mt-lanes { gap: 4px; } }
@media (max-height: 680px) { .mt-lane { height: 29px; } .mt-block { font-size: 10px; } }
.mt-lane-label { position: absolute; left: -92px; top: 0; width: 88px; height: 100%; display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--cream-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.mt-lane-label .ico { font-size: 14px; }
.mt-track { position: absolute; inset: 0; background: rgba(6,25,18,0.55); border: 1px solid var(--line); border-radius: 8px; }

.mt-block { position: absolute; top: 3px; bottom: 3px; border-radius: 7px; overflow: hidden; cursor: grab; border: 1.5px solid transparent; display: flex; align-items: center; padding: 0 8px; font-size: 11px; font-weight: 700; color: #fff; user-select: none; box-sizing: border-box; min-width: 8px; }
.mt-block:active { cursor: grabbing; }
.mt-block.sel { border-color: var(--brass-bright); box-shadow: 0 0 0 2px rgba(217,178,95,0.35); }
.mt-block .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,0.6); pointer-events: none; }
.mt-block.v-clip { background: linear-gradient(180deg, #2f7d4e, #245f3c); }
.mt-block .mt-hold { position: absolute; top: 0; bottom: 0; right: 0; background: repeating-linear-gradient(90deg, rgba(110,168,176,0.55), rgba(110,168,176,0.55) 5px, rgba(110,168,176,0.32) 5px, rgba(110,168,176,0.32) 10px); border-left: 2px dashed rgba(255,255,255,0.6); display: grid; place-items: center; font-size: 10px; pointer-events: none; }
/* per-clip segments on the original audio lane, so clip changes are visible */
.mt-aseg { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; padding: 0 6px; font-size: 10px; font-weight: 700; color: #d7f0f4; box-sizing: border-box; border-right: 2px solid rgba(4,18,13,0.85); overflow: hidden; cursor: pointer; }
.mt-aseg.odd { background: repeating-linear-gradient(135deg, rgba(110,168,176,0.34), rgba(110,168,176,0.34) 8px, rgba(110,168,176,0.2) 8px, rgba(110,168,176,0.2) 16px); }
.mt-aseg.even { background: repeating-linear-gradient(135deg, rgba(110,168,176,0.22), rgba(110,168,176,0.22) 8px, rgba(110,168,176,0.12) 8px, rgba(110,168,176,0.12) 16px); }
.mt-aseg.sel, .mt-track:hover .mt-aseg.sel { outline: 2px solid var(--brass-bright); outline-offset: -2px; }
#speakFreeze.frozen { background: #6ea8b0; border-color: #a9d6dc; color: #06231a; }
.mt-block.a-orig { background: repeating-linear-gradient(135deg, rgba(110,168,176,0.35), rgba(110,168,176,0.35) 8px, rgba(110,168,176,0.22) 8px, rgba(110,168,176,0.22) 16px); border-color: rgba(110,168,176,0.5); cursor: pointer; color: #d7f0f4; }
/* Floating blocks use semi-transparent fills so overlapping effects/clips show through each other. */
.mt-block.a-clip { background: linear-gradient(180deg, rgba(110,168,176,0.7), rgba(77,133,140,0.7)); }
.mt-block.a-mute { background: repeating-linear-gradient(45deg, #7a2b24, #7a2b24 6px, #93362d 6px, #93362d 12px); border-color: #c0473c; color: #ffe3de; z-index: 2; }
.mt-block.a-speak { background: linear-gradient(180deg, rgba(155,123,208,0.72), rgba(122,92,171,0.72)); }
.mt-block.v-clip.dragging { opacity: 0.75; z-index: 20; box-shadow: 0 6px 18px rgba(0,0,0,0.5); }
.mt-trans { cursor: pointer; transition: transform .1s; }
.mt-trans:hover { transform: translate(-50%,-50%) scale(1.25); }
.mt-trans.sel { box-shadow: 0 0 0 3px rgba(217,178,95,0.5); background: var(--brass-bright); }
/* Speak button: pulsing red while recording */
#speakBtn.recording { background: #c0392b; border-color: #e8897d; color: #fff; animation: speakpulse 1.1s infinite; }
@keyframes speakpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(192,57,43,0.6); } 50% { box-shadow: 0 0 0 6px rgba(192,57,43,0); } }
.mt-block.fx-text { background: linear-gradient(180deg, rgba(185,140,208,0.68), rgba(143,102,168,0.68)); }
.mt-block.fx-scroll { background: linear-gradient(180deg, rgba(217,143,74,0.68), rgba(181,114,47,0.68)); }
.mt-block.fx-image { background: linear-gradient(180deg, rgba(192,112,142,0.68), rgba(156,79,109,0.68)); }
.mt-block.fx-ball { background: linear-gradient(180deg, rgba(235,235,235,0.8), rgba(175,175,175,0.75)); color: #1a1a1a; }
/* Cue-ball red-dot picker in the inspector */
.cb-pick { display: grid; place-items: center; margin: 2px 0 8px; }
.cb-ball { width: 150px; height: 150px; cursor: crosshair; touch-action: none; user-select: none; filter: drop-shadow(0 3px 8px rgba(0,0,0,0.4)); }
.cb-ball svg { pointer-events: none; }
.mt-block .mt-resize { position: absolute; right: 0; top: 0; bottom: 0; width: 9px; cursor: ew-resize; background: rgba(0,0,0,0.18); }
.mt-block .mt-resize:hover { background: rgba(0,0,0,0.4); }
.mt-block .mt-del { position: absolute; top: 1px; right: 1px; width: 16px; height: 16px; border-radius: 50%; border: 0; background: rgba(0,0,0,0.5); color: #fff; font-size: 10px; line-height: 1; cursor: pointer; padding: 0; z-index: 5; display: none; place-items: center; }
.mt-block:hover .mt-del, .mt-block.sel .mt-del { display: grid; }
.mt-block .mt-del:hover { background: #c0392b; }
.mt-trans { position: absolute; top: 50%; transform: translate(-50%,-50%); z-index: 6; width: 22px; height: 22px; border-radius: 50%; background: var(--brass); color: var(--ink); font-size: 11px; font-weight: 800; display: grid; place-items: center; border: 2px solid #072117; pointer-events: auto; }
.mt-empty-hint { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--cream-dim); font-style: italic; pointer-events: none; }
.mt-playhead { position: absolute; top: 0; bottom: 0; left: 92px; width: 2px; background: var(--brass-bright); box-shadow: 0 0 6px rgba(0,0,0,0.7); pointer-events: none; z-index: 7; }
.mt-playhead::before { content: ""; position: absolute; top: -2px; left: -7px; border: 8px solid transparent; border-top-color: var(--brass-bright); }
/* Wide invisible grab strip so the thin line can be dragged side to side */
.mt-ph-grip { position: absolute; top: -6px; bottom: 0; left: -8px; width: 18px; pointer-events: auto; cursor: ew-resize; }
.mt-ph-grip:hover { background: rgba(217,178,95,0.12); }

/* Inspector (right sidebar, edits the selected timeline item) */
.inspector { display: flex; flex-direction: column; gap: 10px; }
.insp-empty { font-size: 13px; color: var(--cream-dim); line-height: 1.5; padding: 10px 0; }
.insp-head { display: flex; justify-content: space-between; align-items: center; }
.insp-head b { font-size: 14px; color: var(--brass-bright); }
.insp-row { display: flex; flex-direction: column; gap: 5px; }
.insp-row > label { font-size: 11px; font-weight: 600; color: var(--cream-dim); }
.insp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.insp-grid label, .insp-row label.stack { font-size: 11px; color: var(--cream-dim); display: flex; flex-direction: column; gap: 3px; }
.insp-grid label.fx-check { flex-direction: row; align-items: center; gap: 6px; }
.inspector input.input, .inspector textarea.input { padding: 6px 8px; font-size: 13px; }
.inspector select { background: rgba(6,25,18,0.7); color: var(--cream); border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; font: inherit; font-size: 12px; }
.inspector input[type=color] { width: 100%; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; cursor: pointer; }
.inspector input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--brass); }
.inspector textarea.input { min-height: 46px; }
.insp-thumb { width: 100%; height: 76px; border-radius: 8px; border: 1px solid var(--line); background: #06231a center/contain no-repeat; margin-bottom: 4px; }
.insp-del { margin-top: 4px; }
.insp-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid; align-self: flex-start; }

@media (max-width: 860px) {
  .mt-lane-label { position: static; width: auto; padding: 2px 6px; }
  .mt-inner { padding-left: 8px; }
  .mt-playhead { left: 8px; }
}
