/* jeroenbaars.com — editor-style portfolio */
:root {
  --bg: #121214;
  --panel: #1C1C1F;
  --panel-2: #26262A;
  --line: #2C2C31;
  --line-2: #3A3A40;
  --text: #E6E6E6;
  --text-2: #B8B8BE;
  --muted: #9A9AA2;
  --accent: #3B8EEA;
  --head-w: 128px;
  --h-ruler: 26px;
  --h-v2: 36px;
  --h-v1: 72px;
  --h-a1: 48px;
  --h-a2: 24px;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: Inter, system-ui, sans-serif; font-size: 13px; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
a { color: var(--text); }
a:hover { color: #fff; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.small { font-size: 12px; }
.caps { letter-spacing: 0.06em; }

.app { display: flex; flex-direction: column; gap: 4px; padding: 4px; min-height: 100vh; min-height: 100dvh; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.panel-head { padding: 8px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Top bar */
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding: 8px 10px 8px 14px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; background: none; border: none; padding: 4px; margin: -4px; border-radius: 6px; cursor: pointer; text-align: left; }
.brand:hover .brand-name { color: #fff; }
.brand img { border-radius: 6px; flex: none; }
.brand-text { display: flex; align-items: center; gap: 20px; min-width: 0; flex-wrap: wrap; row-gap: 2px; }
.brand-id { display: flex; flex-direction: column; gap: 1px; }
.brand-name { font-weight: 700; letter-spacing: 0.06em; font-size: 14px; line-height: 1.2; }
.brand-role { font-size: 12px; color: var(--muted); line-height: 1.2; white-space: nowrap; }
.brand-seq { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspaces { display: flex; gap: 4px; }
.workspaces button { min-height: 40px; padding: 0 16px; border: none; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; }
.workspaces button[aria-pressed="true"] { background: #3A3A42; color: #fff; box-shadow: inset 0 -2px 0 var(--accent); }

/* Monitor + inspector */
.upper { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; }
.monitor { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; }
.monitor-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.screen { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.screen:fullscreen { aspect-ratio: auto; width: 100vw; height: 100vh; }
.fx-layer { position: absolute; inset: 0; will-change: filter; }
.fx-layer video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; cursor: pointer; }
.offline { position: absolute; inset: 0; background: #8E1F1F; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 16px; color: #fff; }
.offline strong { font-weight: 800; font-size: clamp(28px, 5vw, 60px); letter-spacing: 0.04em; line-height: 1; }
.offline-sub { font-size: clamp(14px, 1.4vw, 18px); color: #FFE4E4; }
.offline-file, .offline-tc { position: absolute; top: 12px; font-size: 12px; color: #FFC9C9; }
.offline-file { left: 14px; }
.offline-tc { right: 14px; }
.offline-relink { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 12px; color: #FFC9C9; }
.offline-relink i { width: 6px; height: 6px; border-radius: 3px; background: #fff; animation: relink 1.2s infinite; }
.offline-relink i:nth-child(2) { animation-delay: 0.2s; }
.offline-relink i:nth-child(3) { animation-delay: 0.4s; margin-right: 4px; }
@keyframes relink { 0%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.fx-temp, .fx-vignette { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; }
.fx-temp { mix-blend-mode: soft-light; }
.fx-vignette { background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.95) 100%); }
.v1off { position: absolute; inset: 0; background: #000; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); pointer-events: none; }

.transport { display: flex; align-items: center; gap: 12px; font-family: var(--mono); }
.transport-btns { display: flex; align-items: center; gap: 6px; }
.transport-tc { font-size: 20px; font-weight: 700; }
.tc-scrub { cursor: ew-resize; touch-action: none; user-select: none; -webkit-user-select: none; text-decoration: underline dotted transparent; text-underline-offset: 4px; border-radius: 3px; }
.tc-scrub:hover, .tc-scrub.dragging { text-decoration-color: currentColor; }
.tc-scrub.dragging { background: rgba(59, 142, 234, 0.15); }
.transport-client { flex: 1 1 auto; text-align: center; font-family: Inter, sans-serif; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transport-dur { font-size: 12px; }
.tbtn { width: 40px; height: 40px; flex: none; border-radius: 4px; border: 1px solid var(--line-2); background: #2E2E34; color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.tbtn svg { width: 18px; height: 18px; fill: currentColor; }
.tbtn svg.stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tbtn:disabled { opacity: 0.35; cursor: default; }
.tbtn-play { border-radius: 20px; border: none; background: var(--accent); color: #121214; }
.tbtn-play .ico-pause { display: none; }
.tbtn-play.playing .ico-play { display: none; }
.tbtn-play.playing .ico-pause { display: block; }

.inspector { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; }
.insp-tabs { display: flex; gap: 2px; padding: 0 8px; border-bottom: 1px solid var(--line); }
.insp-tabs button { min-height: 38px; padding: 0 12px; border: none; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.insp-tabs button[aria-pressed="true"] { color: #fff; border-bottom-color: var(--accent); }
.insp-body { padding: 20px; }
.pane { display: flex; flex-direction: column; gap: 16px; }
.pane-title { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 700; }
.pane-sub { margin: 0; font-size: 18px; font-weight: 700; }
.pane-text { margin: 0; line-height: 1.6; color: var(--text-2); }
.pane p { margin: 0; }
.meta { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.meta dt { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.meta dd { margin: 4px 0 0; }
.portrait { aspect-ratio: 4 / 3; background: #0A0A0B; display: flex; align-items: center; justify-content: center; font-size: 12px; background-size: cover; background-position: center; }
.btn-accent { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 4px; background: var(--accent); color: #121214; font-weight: 600; text-decoration: none; padding: 0 16px; }
.btn-accent:hover { color: #121214; filter: brightness(1.1); }
.btn-ghost { align-self: flex-start; min-height: 36px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 4px; background: #2E2E34; color: var(--text); cursor: pointer; font-size: 12px; }
.about-head { display: flex; align-items: flex-end; gap: 14px; }
.about-head .bin-thumb { width: 128px; flex: none; }
.about-head .bin-thumb figcaption { padding: 5px 6px; gap: 5px; font-size: 11px; }
.about-head .bin-thumb figcaption svg { width: 12px; height: 12px; }
.about-id { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding-bottom: 4px; }
.about-id .pane-title { font-size: 24px; }
.about-id p { line-height: 1.6; letter-spacing: 0; white-space: nowrap; }
.v2-overlay { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.source-view { position: absolute; inset: 0; background: #000; display: flex; align-items: center; justify-content: center; }
.source-view img { width: 100%; height: 100%; object-fit: contain; }
.source-tag, .source-hint { position: absolute; font-size: 12px; padding: 3px 8px; border-radius: 3px; background: rgba(18, 18, 20, 0.8); }
.source-tag { top: 12px; left: 12px; color: var(--accent); }
.source-hint { bottom: 12px; left: 50%; transform: translateX(-50%); color: var(--muted); white-space: nowrap; }
.bin-thumb[role="button"] { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.bin-thumb img { -webkit-user-drag: none; pointer-events: none; }
.drag-ghost { position: fixed; z-index: 2000; width: 72px; pointer-events: none; border: 2px solid var(--accent); border-radius: 3px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); opacity: 0.9; transform: translate(-50%, -50%) rotate(-4deg); }
.lane-v2.drop-ok { background: rgba(59, 142, 234, 0.18); box-shadow: inset 0 0 0 1px var(--accent); }
.clip.still { top: 4px; bottom: 4px; padding: 2px 6px; justify-content: center; background-size: cover; background-position: center 25%; filter: grayscale(1); border-top-color: #9A8BE6; cursor: grab; }
.clip.still.picked { box-shadow: 0 0 0 2px var(--accent); }
.bin-thumb { margin: 0; background: #1A1A1D; border: 1px solid var(--line-2); border-radius: 3px; overflow: hidden; transition: border-color 150ms ease; }
.bin-thumb:hover { border-color: var(--accent); }
.bin-img { aspect-ratio: 4 / 5; background: #000; display: flex; align-items: center; justify-content: center; }
.bin-img img { display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.bin-thumb figcaption { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 12px; color: var(--text); }
.bin-thumb figcaption svg { width: 16px; height: 16px; flex: none; fill: none; stroke: #9A8BE6; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bin-name { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bin-dur { color: var(--muted); }
.about-bio { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.about-bio p { margin: 0; line-height: 1.6; color: var(--text-2); }
.about-list { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-family: var(--mono); font-size: 12px; padding: 4px 8px; border-radius: 3px; background: #2E2E34; border: 1px solid var(--line-2); color: var(--text); }
.tags.ai span { border-color: #4B2E9E; background: rgba(142, 108, 240, 0.14); }
.screen { container-type: inline-size; }
.info-full { align-self: flex-start; min-height: 40px; padding: 0 14px; border: none; border-radius: 4px; background: var(--accent); color: #0B0B0D; font-weight: 600; font-size: 13px; cursor: pointer; }
.info-full[hidden] { display: none; }
.sound-chip { position: absolute; top: 12px; right: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px 0 10px; border: 1px solid rgba(255,255,255,0.18); border-radius: 18px; background: rgba(18,18,20,0.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; font-size: 13px; cursor: pointer; }
.sound-chip svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound-chip:hover { background: rgba(59,142,234,0.85); border-color: transparent; }
.tab-about .sound-chip, .tab-contact .sound-chip { display: none; }
.seq-label { flex: none; padding: 0 4px 0 14px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #6A6A72; }
.tl-hint { position: fixed; z-index: 1400; display: flex; align-items: center; gap: 10px; max-width: min(320px, calc(100vw - 24px)); padding: 10px 8px 10px 14px; border-radius: 6px; background: var(--accent); color: #0B0B0D; font-size: 13px; font-weight: 600; line-height: 1.35; box-shadow: 0 12px 30px rgba(0,0,0,0.45); transform: translateX(-50%); animation: hint-in 380ms cubic-bezier(.3,1.4,.5,1) both; }
.tl-hint[hidden] { display: none; }
.tl-hint::after { content: ""; position: absolute; left: var(--arrow, 50%); bottom: -6px; width: 12px; height: 12px; margin-left: -6px; background: var(--accent); transform: rotate(45deg); border-radius: 2px; }
.tl-hint button { width: 28px; height: 28px; flex: none; border: none; border-radius: 4px; background: rgba(0,0,0,0.12); color: #0B0B0D; font-size: 16px; line-height: 1; cursor: pointer; }
@keyframes hint-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
/* About: name, photo and tools are already on the chapter cards, so the panel only adds the full bio */
.tab-about .about-id, .tab-about .about-list { display: none; }
@media (max-width: 760px) { .tab-about .about-head { display: none; } .tab-about .about-bio { border-top: none; padding-top: 0; } }
.about-card { position: absolute; inset: 0; z-index: 2; background: #0B0B0D; display: flex; overflow: hidden; }
.about-card .ac-text { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; gap: 2.4cqw; padding: 0 7cqw; min-width: 0; }
.about-card .ac-kicker { font-family: var(--mono); font-size: max(10px, 1.25cqw); letter-spacing: 0.14em; color: var(--ck, var(--accent)); }
.about-card h2 { margin: 0; font-size: 6.4cqw; line-height: 1.02; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.about-card p { margin: 0; font-size: max(12px, 2cqw); line-height: 1.4; color: #C8C8CE; max-width: 34ch; }
.about-card .ac-tags { display: flex; flex-wrap: wrap; gap: 1cqw; max-width: 64cqw; }
.about-card .ac-tags span { font-family: var(--mono); font-size: max(11px, 1.7cqw); padding: 0.9cqw 1.4cqw; border: 1px solid #3A3A40; border-radius: 4px; color: #E6E6E6; }
.about-card .ac-tags.ai span { border-color: #5B47B8; background: #221D38; }
.about-card .ac-photo { flex: 0 0 38%; background-size: cover; background-position: center 30%; filter: grayscale(1); }
.about-card .ac-cta { align-self: flex-start; min-height: 40px; padding: 0 2cqw; border: none; border-radius: 4px; background: var(--accent); color: #0B0B0D; font-weight: 600; font-size: max(13px, 1.6cqw); cursor: pointer; }
.about-card .ac-meta { font-family: var(--mono); font-size: max(10px, 1.2cqw); color: #9A9AA2; }
.about-card .ac-meta a { color: #9A9AA2; }
.about-card .ac-file { position: absolute; top: 12px; left: 14px; font-family: var(--mono); font-size: 11px; color: #6A6A72; }
.about-card .ac-hint { position: absolute; left: 7cqw; bottom: 14px; font-size: max(10px, 1.2cqw); color: #9A9AA2; }
.about-card.in .ac-text > * { animation: ac-in 420ms cubic-bezier(.2,.8,.2,1) both; }
.about-card.in .ac-text > *:nth-child(2) { animation-delay: 60ms; }
.about-card.in .ac-text > *:nth-child(3) { animation-delay: 120ms; }
.about-card.in .ac-text > *:nth-child(4) { animation-delay: 180ms; }
@keyframes ac-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) { .about-card .ac-hint, .about-card .ac-file { display: none; } .about-card .ac-text { gap: 2cqw; } }
.export-view { position: absolute; inset: 0; background: #000; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 8% 10%; z-index: 4; }
.ev-file, .ev-tc { position: absolute; top: 12px; font-size: 12px; }
.ev-file { left: 14px; color: var(--muted); }
.ev-tc { right: 14px; color: var(--accent); }
.ev-to { font-size: 12px; letter-spacing: 0.08em; color: var(--muted); }
.ev-msg { margin: 0; font-size: clamp(18px, 2.4vw, 32px); line-height: 1.3; font-weight: 600; color: #fff; white-space: pre-wrap; word-break: break-word; max-height: 60%; overflow: hidden; }
.ev-msg.empty { color: #5A5A62; }
.ev-chip { align-self: flex-start; font-size: 12px; padding: 3px 8px; border-radius: 3px; background: #2E2E34; }
.export-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field-label { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.field input, .field textarea { width: 100%; min-height: 40px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 4px; color: var(--text); font: inherit; outline: none; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field input::placeholder, .field textarea::placeholder { color: #6A6A72; }
.field-hint { color: #6A6A72; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { min-height: 36px; padding: 0 12px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--bg); color: #C8C8CE; cursor: pointer; font-size: 12px; }
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #121214; }
.ex-row { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.ex-strong { color: var(--text); }
.export-form > .ex-row { border-top: 1px solid var(--line); padding-top: 14px; }
.ex-btn { min-height: 48px; border: none; border-radius: 4px; background: var(--accent); color: #121214; font-weight: 700; font-size: 15px; cursor: pointer; }
.ex-progress { display: flex; flex-direction: column; gap: 6px; }
.ex-bar { height: 8px; background: #2E2E34; border-radius: 4px; overflow: hidden; }
.ex-bar div { height: 100%; width: 0; background: var(--accent); }
.ex-done { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 4px; background: rgba(125, 203, 110, 0.12); border: 1px solid #3F6B37; }
.ex-done strong { font-size: 15px; }
.ex-done span { color: var(--text-2); line-height: 1.5; }
.ex-error { margin: 0; color: #FF8A80; font-size: 12px; }
.socials { display: flex; gap: 20px; flex-wrap: wrap; }
.socials a { min-height: 44px; display: inline-flex; align-items: center; }
.fx-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.fx-group { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.slider { display: flex; flex-direction: column; gap: 4px; }
.slider-row { display: flex; justify-content: space-between; font-size: 12px; }
.hot-value { cursor: ew-resize; touch-action: none; user-select: none; -webkit-user-select: none; text-decoration: underline dotted; text-underline-offset: 3px; text-decoration-color: rgba(59, 142, 234, 0.5); padding: 0 3px; border-radius: 3px; }
.hot-value:hover, .hot-value.dragging { text-decoration-color: currentColor; }
.hot-value.dragging { background: rgba(59, 142, 234, 0.15); }
.slider input { width: 100%; accent-color: var(--accent); min-height: 24px; cursor: pointer; }
.fx-badge { font-family: var(--mono); font-size: 11px; font-weight: 700; padding: 0 5px; border-radius: 3px; background: #9A8BE6; color: #121214; line-height: 16px; }

/* Timeline */
.timeline { outline: none; padding-bottom: 10px; position: relative; }
.timeline:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.seq-bar { display: flex; align-items: center; gap: 4px; padding: 0 10px 0 6px; border-bottom: 1px solid var(--line); }
.seq-tabs { display: flex; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.seq-tabs::-webkit-scrollbar { display: none; }
.seq-tabs button { flex: none; min-height: 44px; padding: 0 14px; border: none; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.seq-tabs button[aria-pressed="true"] { color: #fff; border-bottom-color: var(--accent); }
.seq-tabs .x { color: var(--muted); display: none; }
.seq-tabs button[aria-pressed="true"] .x { display: inline; }
.seq-tabs .n { font-family: var(--mono); font-weight: 400; color: var(--muted); }
.seq-menu-btn { border: none; background: transparent; }
.seq-menu-btn[aria-expanded="true"] { background: #3A3A42; }
.seq-hint { margin-left: auto; padding-left: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tools { display: none; gap: 2px; flex: none; }
.tool { width: 36px; height: 36px; border: none; border-radius: 4px; background: transparent; color: #C8C8CE; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.tool svg { width: 18px; height: 18px; fill: currentColor; }
.tool svg.stroke { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tool[aria-pressed="true"] { background: #3A3A42; color: #fff; }
.tool[data-tool="razor"][aria-pressed="true"] { color: var(--accent); }
.timeline.razor .lanes-scroll { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Crect x='4' y='7' width='16' height='10' rx='1.5' fill='%2312121A' stroke='%23FFFFFF' stroke-width='1.6'/%3E%3Cpath d='M9 12h6' stroke='%23FFFFFF' stroke-width='1.6'/%3E%3C/svg%3E") 12 12, crosshair; }
.razor-guide { position: absolute; top: calc(var(--h-ruler) + var(--h-v2)); height: calc(var(--h-v1) + var(--h-a1)); width: 1px; background: #fff; pointer-events: none; z-index: 4; box-shadow: 0 0 0 1px rgba(0,0,0,0.4); }
.cut { position: absolute; top: 5px; bottom: 5px; width: 3px; margin-left: -1px; background: var(--panel); z-index: 2; pointer-events: none; }
.marker { position: absolute; top: 0; width: 22px; height: 100%; margin-left: -11px; padding: 0; border: none; background: transparent; cursor: pointer; z-index: 3; display: flex; justify-content: center; }
.marker::before { content: ""; width: 10px; height: 11px; background: var(--mk, #5CC2B2); clip-path: polygon(0 0, 100% 0, 100% 60%, 50% 100%, 0 60%); margin-top: 1px; }
.marker.fresh::before { animation: marker-in 520ms cubic-bezier(.3,1.6,.5,1) both; }
.marker.gone { opacity: 0; transition: opacity 300ms ease; pointer-events: none; }
@keyframes marker-in { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
.marker-tip { position: absolute; top: calc(var(--h-ruler) + 2px); z-index: 6; width: max-content; max-width: 240px; padding: 8px 10px; border-radius: 4px; background: #26262C; border: 1px solid var(--mk, #5CC2B2); box-shadow: 0 10px 30px rgba(0,0,0,0.5); font-size: 12px; line-height: 1.4; color: var(--text); pointer-events: none; }
.marker-tip b { display: block; font-family: var(--mono); font-weight: 400; font-size: 11px; color: var(--mk, #5CC2B2); margin-bottom: 3px; }
.gap { position: absolute; top: 5px; bottom: 5px; z-index: 3; border-radius: 3px; background: var(--panel); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); pointer-events: none; }
.gap.ghosting { background: rgba(28,28,31,0.75); box-shadow: inset 0 0 0 1px var(--accent); }
.clip.lifted { top: 4px; bottom: 4px; padding: 0; cursor: grab; }
.clip.lifted.ghosting { visibility: hidden; }
.lifted-strip { position: absolute; top: 0; bottom: 0; background-size: auto 100%; background-repeat: repeat-x; pointer-events: none; }
.seg-ghost { position: absolute; z-index: 7; overflow: hidden; border-radius: 3px; border-top: 3px solid var(--c, #666); background-color: var(--c, #666); box-shadow: 0 10px 26px rgba(0,0,0,0.55), 0 0 0 1px var(--accent); pointer-events: none; }
.seg-ghost.offline, .clip.lifted.offline { background-image: repeating-linear-gradient(135deg, #A12C2C 0 8px, #7E1F1F 8px 16px); border-top-color: #A12C2C; }
.lanes-scroll.can-lift, .timeline.razor .lanes-scroll.can-lift { cursor: grab; }
.lanes-scroll.lifting { cursor: grabbing !important; }
.seg-hover { position: absolute; z-index: 4; border-radius: 3px; box-shadow: inset 0 0 0 2px var(--accent); background: rgba(59,142,234,0.12); pointer-events: none; }
.lanes-scroll { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1500; max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 6px; background: #26262C; border: 1px solid var(--line-2); box-shadow: 0 14px 40px rgba(0,0,0,0.55); font-size: 12px; color: var(--text); transition: opacity 200ms ease; pointer-events: none; }
.toast.fade { opacity: 0; }
.zoom { position: relative; flex: none; }
.zoom-btn { -webkit-tap-highlight-color: transparent; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 8px; border: none; border-radius: 4px; background: transparent; color: #C8C8CE; font-size: 12px; cursor: pointer; }
.zoom-btn:hover, .zoom-btn[aria-expanded="true"] { background: #3A3A42; color: #fff; }
.zoom-btn svg { width: 9px; height: 6px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.zoom-menu { position: absolute; top: calc(100% + 4px); right: 0; z-index: 20; display: flex; flex-direction: column; min-width: 92px; padding: 4px; border-radius: 6px; background: #26262C; border: 1px solid var(--line-2); box-shadow: 0 12px 30px rgba(0,0,0,0.5); }
.zoom-menu[hidden] { display: none; }
.zoom-menu button { min-height: 32px; padding: 0 10px 0 24px; border: none; border-radius: 4px; background: transparent; color: var(--text); font-size: 12px; text-align: left; cursor: pointer; position: relative; }
.zoom-menu button:hover { background: #3A3A42; }
.zoom-menu button[aria-checked="true"]::before { content: ""; position: absolute; left: 9px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--accent); }
.seq-tc { padding-left: 8px; flex: none; }
.seq-menu { display: flex; flex-direction: column; gap: 2px; padding: 8px; background: #161618; border-bottom: 1px solid var(--line); }
.seq-menu button { min-height: 48px; border: none; border-radius: 4px; background: transparent; color: var(--text); cursor: pointer; text-align: left; padding: 6px 12px; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.seq-menu button[aria-current="true"] { background: #2E2E34; }
.seq-menu strong { font-size: 13px; }
.seq-menu span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.tl-body { position: relative; display: flex; user-select: none; -webkit-user-select: none; }
.heads { width: var(--head-w); flex: none; display: flex; flex-direction: column; }
.head { display: flex; align-items: center; gap: 6px; padding-left: 10px; border-bottom: 1px solid #26262A; }
.head-ruler { height: var(--h-ruler); border-bottom-color: var(--line); }
.head-v2 { height: var(--h-v2); }
.head-v1 { height: var(--h-v1); }
.head-a1 { height: var(--h-a1); }
.head-a2 { height: var(--h-a2); border-bottom: none; }
.tk { width: 28px; height: 28px; border-radius: 4px; border: 1px solid var(--line-2); background: #2E2E34; color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; font-family: var(--mono); font-size: 12px; font-weight: 700; }
.tk svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tk-eye[aria-pressed="false"] { background: var(--bg); color: #6A6A72; }
.tk-m[aria-pressed="true"] { background: #E3B04B; color: #121214; }
.tk-s[aria-pressed="true"] { background: #7DCB6E; color: #121214; }
.head-a2 .tk { height: calc(var(--h-a2) - 4px); font-size: 11px; }
.tk-label { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-left: 4px; }

.lanes-scroll { flex: 1 1 auto; min-width: 0; overflow: hidden; margin-right: 14px; cursor: ew-resize; touch-action: none; }
.timeline.zoomed .lanes-scroll { overflow-x: auto; scrollbar-width: none; touch-action: pan-x; margin-right: 0; }
.lanes-scroll::-webkit-scrollbar { display: none; }
.lanes { position: relative; width: 100%; }
.lane { position: relative; border-bottom: 1px solid #26262A; }
.lane-ruler { height: var(--h-ruler); background: #19191C; border-bottom-color: var(--line); }
.lane-v2 { height: var(--h-v2); }
.lane-v1 { height: var(--h-v1); }
.lane-a1 { height: var(--h-a1); }
.lane-a2 { height: var(--h-a2); border-bottom: none; }
.tick { position: absolute; top: 6px; font-family: var(--mono); font-size: 12px; color: var(--muted); border-left: 1px solid var(--line-2); padding-left: 4px; white-space: nowrap; line-height: 1; height: 14px; }

.clip { position: absolute; top: 5px; bottom: 5px; border: none; border-top: 3px solid var(--c, #666); border-radius: 3px; background-color: var(--c, #666); padding: 5px 6px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; overflow: hidden; cursor: inherit; text-align: left; background-size: auto 100%; background-repeat: repeat-x; }
.clip.sel { box-shadow: 0 0 0 2px #fff; }
.clip.offline { background-image: repeating-linear-gradient(135deg, #A12C2C 0 8px, #7E1F1F 8px 16px); border-top-color: #A12C2C; }
.chip { font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--bg); color: var(--text); padding: 1px 5px; border-radius: 2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chips { display: flex; gap: 4px; max-width: 100%; }
.chip-dur { font-family: var(--mono); font-weight: 400; }
.aclip { position: absolute; top: 5px; bottom: 5px; background: #1F3A33; border-radius: 3px; display: flex; align-items: center; gap: 1px; padding: 0 3px; overflow: hidden; }
.aclip.offline { background: #3A1C1C; }
.aclip i { flex: 1 1 0; background: #5FC2A6; border-radius: 1px; min-width: 1px; }
.bed { position: absolute; inset: 3px 0; background: #22303A; border-radius: 3px; display: flex; align-items: center; gap: 2px; padding: 0 4px; overflow: hidden; }
.bed i { flex: 1 1 0; background: #6FA6C8; border-radius: 1px; min-width: 1px; }
.tl-body.off-v2 .lane-v2 > *, .tl-body.off-v1 .lane-v1 > *, .tl-body.silent-a1 .lane-a1 > *, .tl-body.silent-a2 .lane-a2 > * { opacity: 0.3; }
.tl-body.off-v2 .head-v2 .tk-label, .tl-body.off-v1 .head-v1 .tk-label, .tl-body.silent-a1 .head-a1 .tk-label, .tl-body.silent-a2 .head-a2 .tk-label { color: #6A6A72; }

.playhead { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent); pointer-events: none; z-index: 3; }
.playhead span { position: absolute; top: 0; left: -6px; width: 14px; height: 12px; background: var(--accent); border-radius: 0 0 3px 3px; }

/* Boot screen */
.splash { position: fixed; inset: 0; z-index: 1000; background: #0E0E10; display: flex; align-items: center; justify-content: center; padding: 20px 20px 110px; transition: opacity 420ms ease; }
.splash.out { opacity: 0; pointer-events: none; }
.splash-wall { position: absolute; inset: 0; background: url(../media/carhartt/poster.jpg) center / cover; }
.splash-wall::after { content: ""; position: absolute; inset: 0; background: rgba(10, 10, 14, 0.72); }
.splash-card { position: relative; width: 100%; max-width: 680px; background: #18181B; border: 1px solid var(--line); border-radius: 12px; padding: 36px; display: flex; flex-direction: column; gap: 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); }
.splash-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.splash-icon { border-radius: 16px; }
.splash-version { font-size: 12px; text-align: right; line-height: 1.6; }
.splash-name { margin: 0 0 8px; font-size: clamp(36px, 7vw, 52px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.splash-sub { margin: 0; font-size: 16px; color: var(--text-2); }
.splash-disc { margin: 12px 0 0; font-size: 12px; letter-spacing: 0.08em; }
.splash-bar { position: relative; height: 26px; }
.splash-clips { position: absolute; inset: 4px 0; display: flex; gap: 3px; }
.splash-clips span { border-radius: 3px; opacity: 0.18; transition: opacity 180ms ease; }
.splash-clips span.on { opacity: 1; }
.splash-ph { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; background: var(--accent); }
.splash-ph span { position: absolute; top: -4px; left: -5px; width: 12px; height: 8px; background: var(--accent); border-radius: 0 0 3px 3px; }
.splash-status { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; color: var(--muted); margin-top: -18px; }
.splash-status span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.splash-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--line); padding-top: 16px; font-size: 12px; color: var(--muted); }
.dock { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: flex-end; gap: 10px; padding: 8px 12px 12px; border-radius: 24px; background: rgba(255, 255, 255, 0.10); border: 1px solid rgba(255, 255, 255, 0.22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 20px 50px rgba(0, 0, 0, 0.45); -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%); }
.dock-tile { width: 56px; height: 56px; border-radius: 14px; background: rgba(30, 30, 36, 0.75); border: 1px solid rgba(255, 255, 255, 0.12); display: flex; align-items: center; justify-content: center; color: #C8C8CE; }
.dock-tile svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dock-sep { width: 1px; height: 48px; background: rgba(255, 255, 255, 0.2); margin: 0 2px 4px; }
.dock-app { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.dock-icon { border-radius: 13px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5); }
.dock-dot { width: 5px; height: 5px; border-radius: 3px; background: var(--text); opacity: 0.85; }
@keyframes jbBounce { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-26px); } 55% { transform: translateY(0); } 68% { transform: translateY(-8px); } 80% { transform: translateY(0); } }
.bounce { animation: jbBounce 0.9s cubic-bezier(.3, .7, .4, 1) infinite; }

@media (prefers-reduced-motion: reduce) {
  .bounce, .offline-relink i { animation: none; }
  .splash { transition: none; }
}

/* Contact = Export mode: like an NLE's export screen, no timeline */
.tab-contact .timeline, .tab-contact .transport { display: none; }

/* Desktop: the whole editor fits the window, like a real edit suite */
@media (min-width: 761px) and (min-height: 600px) {
  .app { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  .upper { flex: 1 1 auto; min-height: 0; flex-wrap: nowrap; }
  .monitor { flex: 1 1 0; min-height: 0; }
  .monitor-body { flex: 1 1 auto; min-height: 0; }
  .screen { flex: 1 1 auto; min-height: 0; aspect-ratio: auto; }
  .inspector { flex: 0 0 clamp(300px, 26vw, 400px); min-height: 0; }
  .insp-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  .timeline { flex: none; }
}

/* Phone */
@media (max-width: 760px) {
  :root { --head-w: 52px; --h-v1: 52px; --h-a1: 34px; --h-v2: 28px; --h-a2: 22px; --h-ruler: 16px; }
  .app { padding: 0; gap: 0; }
  .panel { border-radius: 0; border-left: none; border-right: none; }
  .topbar { padding: 12px 12px 10px; }
  .brand-text { flex-direction: column; gap: 2px; }

  /* Editor order on phone: monitor → timeline → panels (like Premiere) */
  .upper { display: contents; }
  .topbar { order: 0; }
  .monitor { order: 1; }
  .timeline { order: 2; }
  .inspector { order: 3; }
  /* The page scrolls; the player stays pinned at the top so you can see
     effects while adjusting them further down */
  .monitor { position: sticky; top: 0; z-index: 20; }
  /* While on Contact, don't pin the player: the keyboard needs the room */
  .tab-contact .monitor { position: relative; }
  /* 16px stops iPhones from zooming into the fields while typing */
  .field input, .field textarea { font-size: 16px; }
  .app .inspector { min-height: 60vh; }
  .topbar { padding: 6px 8px 6px 12px; gap: 8px; flex-wrap: nowrap; }
  .brand-seq { display: none; }
  .brand-name { font-size: 13px; }
  .brand-role { font-size: 11px; }
  .brand img { width: 24px; height: 24px; }
  .workspaces { width: auto; gap: 2px; }
  .workspaces button { flex: none; min-height: 36px; padding: 0 8px; background: transparent; font-size: 13px; }
  .workspaces button[aria-pressed="true"] { background: #3A3A42; }
  .seq-tabs button { min-height: 40px; padding: 0 12px; }
  .app > *, .upper > *, .monitor > *, .inspector > * { flex-shrink: 0; }
  .monitor { flex: none; }
  .monitor .panel-head { display: none; }
  .monitor-body { padding: 0 0 8px; gap: 8px; }
  .transport { padding: 0 12px; }
  .tbtn { width: 40px; height: 40px; }
  .tbtn-play { border-radius: 20px; }
  .transport-tc { font-size: 15px; margin-left: auto; }
  .transport-client, .transport-dur { display: none; }
  .inspector { flex: none; }
  .insp-body { padding: 16px; }
  .pane-title { font-size: 22px; }
  .hide-phone { display: none; }
  .seq-hint { display: none; }
  .seq-label { display: none; }
  .tools { display: flex; }
  .zoom-btn { min-height: 36px; }
  .zoom-menu button { min-height: 44px; }
  .seq-tc { display: none; }
  .seq-bar { padding-right: 6px; }
  .zoom { margin-left: auto; }
  .head { padding-left: 0; justify-content: center; }
  .tk-label, .tk-s { display: none; }
  .tk { width: 40px; height: calc(100% - 6px); max-height: 40px; }
  .head-a2 .tk { height: calc(var(--h-a2) - 4px); }
  .timeline:not(.zoomed) .lanes-scroll { touch-action: pan-y; }
  .clip { padding: 4px 5px; }
  .timeline:not(.zoomed) .clip .chips { display: none; }
  .lanes-scroll { margin-right: 0; }
  .timeline:not(.zoomed) .tick { display: none; }
  .splash-card { padding: 24px; gap: 22px; }
  .dock-tile { width: 48px; height: 48px; }
  .dock-tile svg { width: 22px; height: 22px; }
  .dock-icon { width: 48px; height: 48px; }
  .dock { gap: 8px; padding: 6px 10px 10px; }
}
