/* ============================================================
   Simple AI Video Editor — Stylesheet (susun atur editor penuh)
   Tema gelap · Mobile responsive · Gaya online-video-cutter
   ============================================================ */

:root {
    --bg: #0b1020;
    --bg-soft: #0f1630;
    --panel: #141b33;
    --panel-2: #1a2340;
    --border: rgba(255, 255, 255, 0.08);
    --text: #e7ebf7;
    --muted: #94a0c0;
    --accent: #6366f1;
    --accent-2: #22d3ee;
    --accent-grad: linear-gradient(135deg, #6366f1, #22d3ee);
    --success: #34d399;
    --danger: #f87171;
    --warn: #fbbf24;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body { height: 100%; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Figtree', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow: hidden;
}

.app-shell { display: flex; flex-direction: column; height: 100dvh; }

/* ---------- Topbar ---------- */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 10px 16px;
    background: rgba(11, 16, 32, 0.9);
    border-bottom: 1px solid var(--border);
    flex: 0 0 auto;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font-size: 1rem; font-weight: 800; }
.brand-text small { color: var(--muted); font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.chip {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 0.72rem; font-weight: 600;
    padding: 5px 11px; border-radius: 999px;
    border: 1px solid var(--border); background: var(--panel);
    color: var(--muted); white-space: nowrap;
}
.chip-privacy { color: #7dd3c8; }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: 0 0 auto; }
.chip-loading .chip-dot { animation: pulse 1.2s ease-in-out infinite; }
.chip-ready { color: var(--success); }
.chip-ready .chip-dot { background: var(--success); animation: none; }
.chip-error { color: var(--danger); }
.chip-error .chip-dot { background: var(--danger); animation: none; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: inherit; font-weight: 700; font-size: 0.9rem;
    padding: 10px 18px; border-radius: 11px;
    border: 1px solid transparent; cursor: pointer;
    color: var(--text); background: rgba(255, 255, 255, 0.08);
    transition: transform 0.12s, opacity 0.15s, background 0.15s;
    text-decoration: none; -webkit-tap-highlight-color: transparent; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent-grad); color: #fff; box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35); }
.btn-secondary { background: rgba(255, 255, 255, 0.09); border-color: var(--border); }
.btn-success { background: linear-gradient(135deg, #10b981, #34d399); color: #052e22; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.btn-lg { padding: 12px 24px; font-size: 0.98rem; }
.btn-sm { font-size: 0.8rem; padding: 7px 12px; }
.btn-block { width: 100%; }

.btn-icon {
    width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center; flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.08); border: 1px solid var(--border);
    color: var(--text); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.btn-icon:hover { background: rgba(255, 255, 255, 0.14); }
.btn-icon:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================================
   Skrin muat naik (keadaan awal)
   ============================================================ */
.uploader {
    flex: 1; display: grid; place-items: center; padding: 24px; overflow: auto;
}
.uploader-inner { width: min(680px, 100%); text-align: center; }
.dropzone {
    border: 2px dashed rgba(148, 160, 192, 0.4);
    border-radius: var(--radius); padding: 54px 24px;
    background: var(--panel); cursor: pointer;
    transition: border-color 0.2s, background 0.2s; outline: none;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.is-drag {
    border-color: var(--accent); background: rgba(99, 102, 241, 0.07);
}
.dz-icon { color: var(--accent-2); margin-bottom: 14px; }
.dropzone h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.dropzone p { color: var(--muted); margin-bottom: 20px; }
.dz-hint { font-size: 0.8rem; margin-top: 18px; margin-bottom: 0; }
.upload-tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.tip {
    display: flex; gap: 10px; align-items: flex-start; text-align: left;
    font-size: 0.8rem; color: var(--muted);
    background: var(--panel); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 12px 14px;
}
.tip strong { color: var(--text); }
.form-error {
    margin-top: 14px; padding: 12px 16px;
    background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.4);
    border-radius: var(--radius-sm); color: var(--danger); font-size: 0.88rem; font-weight: 600;
}

/* ============================================================
   Editor
   ============================================================ */
.editor { flex: 1; display: flex; min-height: 0; }

/* --- Pentas pratonton --- */
.stage-col { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #05070f; }
.stage {
    flex: 1; position: relative; display: grid; place-items: center;
    padding: 18px; min-height: 0;
    background-image:
        linear-gradient(45deg, #0a0e1c 25%, transparent 25%),
        linear-gradient(-45deg, #0a0e1c 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #0a0e1c 75%),
        linear-gradient(-45deg, transparent 75%, #0a0e1c 75%);
    background-size: 22px 22px;
    background-position: 0 0, 0 11px, 11px -11px, -11px 0;
}
.stage-frame {
    position: relative; max-width: 100%; max-height: 100%;
    aspect-ratio: 16 / 9; box-shadow: var(--shadow); background: #000;
    border-radius: 6px; overflow: hidden;
}
#stage { display: block; width: 100%; height: 100%; object-fit: contain; }

.stage-overlay {
    position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px;
    align-items: center; justify-content: center;
    background: rgba(5, 7, 15, 0.72); backdrop-filter: blur(3px);
    font-size: 0.88rem; color: var(--muted); text-align: center; padding: 16px;
}
.spinner {
    width: 36px; height: 36px; border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.15); border-top-color: var(--accent-2);
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Crop overlay --- */
.crop-overlay { position: absolute; inset: 0; cursor: crosshair; touch-action: none; }
.crop-box {
    position: absolute; border: 1.5px solid #fff;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.5);
    cursor: move; touch-action: none;
}
.crop-box::before, .crop-box::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    border: 0 dashed rgba(255, 255, 255, 0.4);
}
.crop-box::before { border-left-width: 1px; border-right-width: 1px; left: 33.33%; right: 33.33%; }
.crop-box::after { border-top-width: 1px; border-bottom-width: 1px; top: 33.33%; bottom: 33.33%; }
.crop-handle {
    position: absolute; width: 14px; height: 14px; background: #fff; border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.3); touch-action: none;
}
.crop-handle[data-h="nw"] { top: -7px; left: -7px; cursor: nwse-resize; }
.crop-handle[data-h="ne"] { top: -7px; right: -7px; cursor: nesw-resize; }
.crop-handle[data-h="sw"] { bottom: -7px; left: -7px; cursor: nesw-resize; }
.crop-handle[data-h="se"] { bottom: -7px; right: -7px; cursor: nwse-resize; }
.crop-handle[data-h="n"] { top: -7px; left: 50%; margin-left: -7px; cursor: ns-resize; }
.crop-handle[data-h="s"] { bottom: -7px; left: 50%; margin-left: -7px; cursor: ns-resize; }
.crop-handle[data-h="w"] { left: -7px; top: 50%; margin-top: -7px; cursor: ew-resize; }
.crop-handle[data-h="e"] { right: -7px; top: 50%; margin-top: -7px; cursor: ew-resize; }

/* --- Lapisan seret teks & stiker (overlay) --- */
.ov-stage-layer { position: absolute; inset: 0; touch-action: none; }
.ov-box {
    position: absolute; transform: translate(-50%, -50%);
    display: flex; align-items: center; justify-content: center;
    padding: 0.12em 0.35em; border-radius: 4px; line-height: 1.25;
    white-space: pre; cursor: move; touch-action: none; user-select: none;
    outline: 1.5px dashed rgba(255, 255, 255, 0.55);
    font-family: 'Figtree', sans-serif;
}
.ov-box.is-selected { outline: 1.5px solid var(--accent-2); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18); }
.ov-box-sticker { padding: 0; outline-color: rgba(255, 255, 255, 0.35); }
.ov-resize {
    position: absolute; right: -8px; bottom: -8px; width: 15px; height: 15px;
    border-radius: 4px; background: var(--accent-2);
    border: 1px solid rgba(0, 0, 0, 0.3); cursor: nwse-resize; touch-action: none;
}
.ov-box:not(.is-selected) .ov-resize { display: none; }

/* --- Kawalan pemain di bawah pentas --- */
.player-bar {
    flex: 0 0 auto; display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; background: var(--bg); border-top: 1px solid var(--border);
}
.time { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.player-spacer { flex: 1; }

/* --- Rel alat (kanan) --- */
.tool-col { flex: 0 0 340px; display: flex; background: var(--bg-soft); border-left: 1px solid var(--border); min-height: 0; }
.tool-rail {
    flex: 0 0 68px; display: flex; flex-direction: column; gap: 4px; padding: 10px 8px;
    background: var(--bg); border-right: 1px solid var(--border); overflow-y: auto;
}
.tool-tab {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 9px 4px; border: none; border-radius: 10px;
    background: transparent; color: var(--muted); cursor: pointer;
    font-family: inherit; font-size: 0.62rem; font-weight: 700;
    -webkit-tap-highlight-color: transparent;
}
.tool-tab svg { width: 20px; height: 20px; }
.tool-tab:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.tool-tab.is-active { background: var(--panel-2); color: var(--accent-2); }

.tool-panel { flex: 1; padding: 18px 16px; overflow-y: auto; min-width: 0; }
.tool-page { display: none; }
.tool-page.is-active { display: block; }
.tool-title { font-size: 1.05rem; font-weight: 800; margin-bottom: 4px; }
.tool-desc { font-size: 0.8rem; color: var(--muted); margin-bottom: 16px; }
.field { margin-bottom: 16px; }
.field-label { display: block; font-size: 0.78rem; font-weight: 700; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.4px; }

/* Grid pilihan (chip button) */
.opt-grid { display: grid; gap: 8px; }
.opt-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.opt-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.opt {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 10px 6px; border-radius: var(--radius-sm);
    border: 1.5px solid var(--border); background: var(--panel);
    color: var(--text); cursor: pointer; font-family: inherit;
    font-size: 0.82rem; font-weight: 700; -webkit-tap-highlight-color: transparent;
}
.opt small { color: var(--muted); font-weight: 600; font-size: 0.68rem; }
.opt svg { width: 20px; height: 20px; }
.opt:hover { border-color: rgba(255,255,255,0.2); }
.opt.is-active { border-color: var(--accent); background: rgba(99, 102, 241, 0.14); }

.row-2 { display: flex; gap: 8px; }
.row-2 > * { flex: 1; }

/* Trim numeric inputs */
.time-inputs { display: flex; gap: 8px; align-items: center; }
.time-inputs input {
    flex: 1; width: 100%; font-family: inherit; font-size: 0.9rem;
    padding: 9px 10px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--panel); color: var(--text);
    text-align: center; font-variant-numeric: tabular-nums;
}
.time-inputs span { color: var(--muted); }

/* Swatches / templates (dari versi lama) */
.swatch-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.swatch { aspect-ratio: 1; border-radius: var(--radius-sm); border: 2px solid rgba(255,255,255,0.12); cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; }
.swatch.is-selected { border-color: #fff; box-shadow: 0 0 0 2px var(--accent-2); }
.custom-color { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 0.82rem; color: var(--muted); cursor: pointer; font-weight: 600; }
.custom-color input[type="color"] { width: 42px; height: 32px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); cursor: pointer; padding: 2px; }
.template-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.template-item { position: relative; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid transparent; cursor: pointer; padding: 0; background: none; -webkit-tap-highlight-color: transparent; }
.template-item canvas { display: block; width: 100%; height: auto; }
.template-item span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 0.66rem; font-weight: 700; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,0.75)); padding: 12px 6px 4px; text-align: left; }
.template-item.is-selected { border-color: var(--accent-2); }

.bg-image-preview { display: flex; align-items: center; gap: 12px; margin-top: 12px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; }
.bg-image-preview img { width: 76px; height: 44px; object-fit: cover; border-radius: 6px; }
.bg-image-preview span { font-size: 0.76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Teks & stiker (overlay tool panel) --- */
.sticker-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 10px; }
.sticker-picker { padding: 10px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-top: 0; }
.sticker-opt {
    aspect-ratio: 1; display: grid; place-items: center; font-size: 1.15rem;
    border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--panel);
    cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent;
}
.sticker-opt:hover { border-color: rgba(255,255,255,0.2); }
.sticker-opt.is-selected { border-color: var(--accent); background: rgba(99, 102, 241, 0.14); }

.ov-list { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.ov-item {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 9px 10px; border-radius: var(--radius-sm);
    border: 1.5px solid var(--border); background: var(--panel);
    cursor: pointer; font-size: 0.84rem; font-weight: 600;
}
.ov-item:hover { border-color: rgba(255,255,255,0.2); }
.ov-item.is-active { border-color: var(--accent); background: rgba(99, 102, 241, 0.14); }
.ov-item-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ov-item-del {
    flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; border: none;
    background: rgba(255,255,255,0.08); color: var(--muted); font-size: 1rem; line-height: 1;
    cursor: pointer; display: grid; place-items: center; -webkit-tap-highlight-color: transparent;
}
.ov-item-del:hover { background: rgba(248, 113, 113, 0.18); color: var(--danger); }

.ov-editor { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.ov-textarea, .ov-select {
    width: 100%; font-family: inherit; font-size: 0.88rem;
    padding: 9px 10px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--panel); color: var(--text); resize: vertical;
}
.ov-select { appearance: auto; cursor: pointer; }
.ov-bg-color { margin-top: 10px; width: 44px; height: 32px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); cursor: pointer; padding: 2px; }
.ov-delete-btn { margin-top: 6px; color: var(--danger); }
.ov-delete-btn:hover { background: rgba(248, 113, 113, 0.12); }

.muted-note { display: block; font-size: 0.75rem; color: var(--muted); margin-top: 10px; }
.notice { padding: 10px 12px; border-radius: var(--radius-sm); font-size: 0.78rem; margin-top: 12px; border: 1px solid; }
.notice-warn { background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.35); color: #fcd34d; }
.notice-ok { background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.3); color: #6ee7b7; }
.notice-info { background: rgba(99, 102, 241, 0.1); border-color: rgba(99, 102, 241, 0.3); color: #a5b4fc; }

/* Toggle switch */
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch-track { width: 38px; height: 21px; border-radius: 999px; background: rgba(255,255,255,0.15); position: relative; transition: background 0.2s; flex: 0 0 auto; }
.switch-track::after { content: ""; position: absolute; top: 2.5px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch-label { font-size: 0.85rem; font-weight: 600; }

/* ============================================================
   Timeline (bawah)
   ============================================================ */
.timeline-bar { flex: 0 0 auto; background: var(--bg-soft); border-top: 1px solid var(--border); padding: 10px 16px 14px; }
.tl-ruler { position: relative; height: 16px; margin: 0 2px 4px; }
.tl-tick { position: absolute; transform: translateX(-50%); font-size: 0.66rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-track {
    position: relative; height: 66px; border-radius: 10px; overflow: hidden;
    background: #05070f; border: 1px solid var(--border); cursor: pointer; touch-action: none; user-select: none;
}
.tl-film { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tl-wave { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 26px; display: block; pointer-events: none; }
.tl-shade { position: absolute; top: 0; bottom: 0; background: rgba(5, 7, 15, 0.66); pointer-events: none; }
.tl-shade-l { left: 0; }
.tl-shade-r { right: 0; }
.tl-sel { position: absolute; top: 0; bottom: 0; border: 2px solid var(--accent-2); border-radius: 6px; box-sizing: border-box; pointer-events: none; }
.tl-sel.is-dragging { background: rgba(34, 211, 238, 0.08); }
.tl-handle {
    position: absolute; top: 0; bottom: 0; width: 14px; background: var(--accent-2);
    pointer-events: auto; cursor: ew-resize; display: flex; align-items: center; justify-content: center;
    touch-action: none;
}
.tl-handle::after { content: ""; width: 2px; height: 20px; background: rgba(0,0,0,0.4); border-radius: 2px; }
.tl-handle-l { left: -2px; border-radius: 6px 0 0 6px; }
.tl-handle-r { right: -2px; border-radius: 0 6px 6px 0; }
.tl-playhead { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #fff; box-shadow: 0 0 6px rgba(255,255,255,0.6); pointer-events: none; z-index: 3; }
.tl-playhead::before { content: ""; position: absolute; top: -1px; left: -5px; border: 6px solid transparent; border-top-color: #fff; }
.tl-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 0.75rem; color: var(--muted); gap: 10px; flex-wrap: wrap; }
.tl-meta strong { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- Modal eksport ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(3, 6, 15, 0.72); backdrop-filter: blur(4px); z-index: 90; display: grid; place-items: center; padding: 20px; }
.modal { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.modal h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 4px; }
.modal-sub { font-size: 0.82rem; color: var(--muted); margin-bottom: 18px; }
.progress-track { height: 10px; border-radius: 999px; background: rgba(255,255,255,0.1); overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: var(--accent-grad); border-radius: 999px; transition: width 0.25s ease; }
.progress-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 0.82rem; color: var(--muted); gap: 8px; }
.result-ok { font-weight: 700; color: var(--success); margin-bottom: 12px; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions > * { flex: 1; }

/* ---------- Toast ---------- */
.toast-host { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; width: min(440px, calc(100vw - 32px)); }
.toast { background: #1b2340; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 0.85rem; box-shadow: var(--shadow); animation: toastIn 0.25s ease; }
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

.offscreen-video { position: fixed; left: -10000px; top: 0; width: 320px; height: 180px; opacity: 0; pointer-events: none; }
input[type="range"].slider { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.14); outline: none; cursor: pointer; }
input[type="range"].slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); cursor: pointer; }
input[type="range"].slider::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); cursor: pointer; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
    body { overflow: auto; }
    .app-shell { height: auto; min-height: 100dvh; }
    .editor { flex-direction: column; }
    .tool-col { flex: 0 0 auto; border-left: none; border-top: 1px solid var(--border); flex-direction: column; }
    .tool-rail { flex: 0 0 auto; flex-direction: row; border-right: none; border-bottom: 1px solid var(--border); overflow-x: auto; }
    .tool-tab { flex: 0 0 auto; min-width: 62px; }
    .stage-col { min-height: 46vh; }
    .stage { min-height: 300px; }
    .upload-tips { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .brand-text small { display: none; }
    .topbar { padding: 8px 12px; }
    .tool-panel { padding: 14px 12px; }
    .timeline-bar { padding: 8px 10px 12px; }
}
