/* Video Maker — large, calm and clear. */
:root {
  --bg: #f4f1ea;
  --card: #ffffff;
  --ink: #1b2233;
  --muted: #5a6475;
  --line: #e2dccf;
  --line-strong: #cfc7b6;
  --primary: #0d6b63;
  --primary-dark: #094f49;
  --primary-soft: #e3f3f0;
  --accent: #f2a900;
  --danger: #b3261e;
  --danger-soft: #fdecea;
  --work: #151a26;        /* dark work area behind the picture */
  --work-2: #1e2534;
  --work-line: #2c3547;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(27, 34, 51, .06), 0 2px 6px rgba(27, 34, 51, .06);
  --shadow: 0 2px 4px rgba(27, 34, 51, .05), 0 10px 28px rgba(27, 34, 51, .10);
  --shadow-lg: 0 24px 70px rgba(10, 14, 24, .45);
}
* { box-sizing: border-box; }
html { font-size: 18px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.45; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 2rem; letter-spacing: -.02em; }
h2 { font-size: 1.25rem; letter-spacing: -.01em; }
h3 { font-size: 1.02rem; margin-bottom: .7rem; }
[hidden] { display: none !important; }
.muted, .note { color: var(--muted); }
.note { font-size: .9rem; margin: .5rem 0; }
.lead { font-size: 1.2rem; margin-bottom: 1rem; }
.spacer { flex: 1; }
label { display: block; font-weight: 650; margin: 1rem 0 .4rem; }

/* ---------- icons ---------- */
.icon {
  width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.24em;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
h3 { display: flex; align-items: center; gap: .5rem; }
h3 .icon { width: 1.9em; height: 1.9em; padding: .38em; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.brand { display: flex; align-items: center; gap: .55rem; }
.brand .icon { width: 1.9em; height: 1.9em; padding: .34em; border-radius: 11px; background: var(--primary); color: #fff; }
.login-card .logo .icon { width: 52px; height: 52px; color: var(--primary); stroke-width: 1.7; }
.empty-thumb .icon { width: 64px; height: 64px; color: #fff; stroke-width: 1.5; }
.video-card.new .plus .icon, .slide-card.add .plus .icon { width: 1em; height: 1em; stroke-width: 2.6; }
.btn.round .icon { width: 22px; height: 22px; stroke-width: 2.6; }
.chip, .choice, .tab, .save-state { display: inline-flex; align-items: center; gap: .45rem; }
.tab { justify-content: center; }
.lead .icon { width: 1.5em; height: 1.5em; margin-right: .3rem; vertical-align: -0.35em; color: var(--primary); }
.rec-on .icon { display: none; }
.slide-card .meta .icon { width: 1.05em; height: 1.05em; }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 48px; padding: .5rem 1.1rem; border-radius: 13px;
  border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink);
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: 0 1px 0 rgba(27, 34, 51, .05), 0 2px 0 rgba(27, 34, 51, .04);
  transition: background .12s, border-color .12s, box-shadow .12s, transform .06s;
}
.btn:hover { border-color: var(--primary); background: var(--primary-soft); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn:focus-visible, .input:focus-visible, textarea:focus-visible, .slide-card:focus-visible,
.choice:focus-visible, .chip:focus-visible, .tab:focus-visible, .swatch:focus-visible, .pic:focus-visible, .video-card.new:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn.primary {
  background: linear-gradient(180deg, #128277, var(--primary)); border-color: var(--primary-dark); color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 3px 10px rgba(13, 107, 99, .35);
}
.btn.primary:hover { background: linear-gradient(180deg, #0f746a, var(--primary-dark)); }
.btn.danger { background: linear-gradient(180deg, #c93a31, var(--danger)); border-color: #8f1d17; color: #fff; box-shadow: 0 3px 10px rgba(179, 38, 30, .35); }
.btn.danger:hover { background: #9c211a; }
.btn.danger-ghost { color: var(--danger); }
.btn.danger-ghost:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.ghost:hover { background: rgba(27, 34, 51, .07); border-color: transparent; }
.btn.big { min-height: 56px; font-size: 1.08rem; padding: .6rem 1.5rem; border-radius: 15px; }
.btn.huge { min-height: 70px; font-size: 1.3rem; padding: .8rem 2.1rem; border-radius: 18px; }
.btn.small { min-height: 42px; font-size: .86rem; padding: .3rem .5rem; border-radius: 11px; }
.btn.wide { width: 100%; }
.btn.round { width: 46px; min-height: 46px; padding: 0; border-radius: 50%; font-size: 1.4rem; line-height: 1; }
.btn.record {
  background: linear-gradient(180deg, #e0463c, #c62828); border-color: #a31f1f; color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 4px 14px rgba(198, 40, 40, .4);
}
.btn.record:hover { background: linear-gradient(180deg, #cf3a31, #a82020); }
.input, textarea {
  width: 100%; padding: .75rem .9rem; border: 1.5px solid var(--line-strong); border-radius: 13px;
  font: inherit; background: #fff; color: var(--ink); transition: border-color .12s, box-shadow .12s;
}
.input:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(13, 107, 99, .15); outline: none; }
textarea { resize: vertical; }
::placeholder { color: #8a93a3; }
.check { display: flex; align-items: center; gap: .6rem; font-weight: 500; cursor: pointer; }
.check input { width: 24px; height: 24px; accent-color: var(--primary); flex: none; }
.alert { background: var(--danger-soft); color: #7a1711; border: 1.5px solid #f3c0ba; border-radius: 13px; padding: .85rem 1rem; margin: .8rem 0; }
.row { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ---------- top bar ---------- */
.topbar {
  position: relative; z-index: 5; display: flex; align-items: center; gap: .8rem; height: 74px; padding: 0 1.3rem;
  background: var(--card); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.brand { font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; }
.hello { color: var(--muted); }
.topbar form { margin: 0; }

/* ---------- login ---------- */
.login-page {
  display: grid; place-items: center; min-height: 100vh; padding: 1rem;
  background:
    radial-gradient(900px 500px at 12% 10%, #bfe6df 0%, transparent 60%),
    radial-gradient(800px 520px at 90% 90%, #fbe3b3 0%, transparent 60%),
    var(--bg);
}
.login-card { width: 100%; max-width: 460px; background: var(--card); border-radius: 26px; padding: 2.4rem; box-shadow: var(--shadow); text-align: center; }
.login-card form { text-align: left; margin-top: 1.2rem; }
.login-card .logo {
  width: 92px; height: 92px; margin: 0 auto .9rem; display: grid; place-items: center; font-size: 2.8rem;
  border-radius: 26px; background: linear-gradient(160deg, #d9f1ec, #bfe6df);
}
.login-card .check { margin: 1rem 0 1.3rem; }

/* ---------- home ---------- */
.home-page { background: radial-gradient(1000px 420px at 0% 0%, #dcefe9 0%, transparent 65%), var(--bg); background-repeat: no-repeat; min-height: 100vh; }
.home { max-width: 1320px; margin: 0 auto; padding: 2.4rem 1.6rem 4rem; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.video-card {
  background: var(--card); border-radius: 20px; box-shadow: var(--shadow-sm); overflow: hidden;
  display: flex; flex-direction: column; border: 1px solid var(--line); transition: box-shadow .15s, transform .15s;
}
.video-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.video-card .thumb {
  display: grid; place-items: center; aspect-ratio: 16 / 9; text-decoration: none;
  background: linear-gradient(135deg, #2b3448, #1b2233) center / cover no-repeat;
}
.video-card .empty-thumb { font-size: 3rem; opacity: .75; }
.video-card .info { padding: 1rem 1.2rem .2rem; }
.video-card h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-card .info p { font-size: .9rem; margin-top: .15rem; }
.video-card .actions { display: flex; flex-wrap: wrap; gap: .5rem; padding: .8rem 1.2rem 1.2rem; }
.video-card .actions .btn { min-height: 44px; padding: .4rem .9rem; font-size: .95rem; }
.video-card .actions .btn.primary { flex: 1; }
.video-card .actions .btn.icon-only { width: 44px; padding: 0; }
.video-card.new {
  min-height: 320px; align-items: center; justify-content: center; gap: .7rem; cursor: pointer;
  border: 3px dashed #7dbfb6; background: rgba(227, 243, 240, .7); color: var(--primary);
  font: inherit; font-size: 1.3rem; font-weight: 750; box-shadow: none;
}
.video-card.new:hover { background: #d3ece7; border-color: var(--primary); }
.video-card.new .plus {
  width: 84px; height: 84px; display: grid; place-items: center; border-radius: 50%; font-size: 2.6rem; line-height: 1;
  background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(13, 107, 99, .4);
}

/* ---------- editor layout ---------- */
.editor-page { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.editor { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 410px; grid-template-rows: minmax(0, 1fr) auto; }
.title-input {
  font: inherit; font-size: 1.2rem; font-weight: 750; color: var(--ink); width: min(34vw, 420px);
  padding: .5rem .75rem; border: 1.5px solid transparent; border-radius: 11px; background: transparent;
}
.title-input:hover { border-color: var(--line-strong); background: #faf8f4; }
.title-input:focus { border-color: var(--primary); background: #fff; outline: none; box-shadow: 0 0 0 4px rgba(13, 107, 99, .15); }
.save-state { color: var(--primary); font-size: .88rem; font-weight: 600; white-space: nowrap; background: var(--primary-soft); padding: .3rem .75rem; border-radius: 999px; }
.save-state.busy { color: var(--muted); background: #efebe3; }
.save-state.error { color: #fff; background: var(--danger); }

.stage-col { display: flex; flex-direction: column; min-height: 0; background: radial-gradient(1200px 600px at 50% 0%, #222a3b, var(--work)); }
.stage-wrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 1.2rem; container-type: size; }
.stage {
  position: relative; width: min(100cqw, calc(100cqh * 16 / 9)); aspect-ratio: 16 / 9; background: #000;
  border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 14px 44px rgba(0, 0, 0, .6);
  touch-action: none; user-select: none;
}
.stage canvas { display: block; width: 100%; height: 100%; }
.sel-box { position: absolute; border: 3px dashed #ffd60a; border-radius: 8px; pointer-events: none; box-shadow: 0 0 0 2px rgba(0, 0, 0, .45); }
.stage-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #fff; background: radial-gradient(600px 300px at 50% 40%, #26304a, #141926); }
.stage-empty p { font-size: 1.7rem; font-weight: 700; margin-bottom: 1.3rem; }
.playbar { display: flex; align-items: center; gap: 1rem; padding: .75rem 1.2rem; background: var(--work-2); border-top: 1px solid var(--work-line); color: #c9d1e0; }
.playbar .btn { min-width: 160px; background: #fff; border-color: #fff; }
.playbar .btn:hover { background: var(--primary-soft); }
.playbar .time { font-variant-numeric: tabular-nums; }

.panel { background: #f1ede5; border-left: 1px solid var(--line-strong); overflow-y: auto; padding: .9rem; display: flex; flex-direction: column; gap: .8rem; }
.panel-head, .group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow-sm); }
.panel-head h2 { margin-bottom: .7rem; }
.panel-head .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
.group .row .btn { flex: 1; }
.group h2 { margin-bottom: .4rem; }
.group .check { margin-top: .9rem; }
.group > .btn.wide + .btn.wide, .group > .text-edit + .btn.wide { margin-top: .6rem; }
.steps { padding-left: 1.3rem; margin: .6rem 0 0; }
.steps li { margin-bottom: .7rem; padding-left: .2rem; }
.steps li::marker { font-weight: 800; color: var(--primary); }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .9rem; padding: .5rem .6rem .5rem .9rem; background: #f7f4ee; border-radius: 13px; }
.stepper b { flex: 1; text-align: center; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .7rem; }
.chip, .choice {
  min-height: 44px; padding: .35rem .85rem; border-radius: 11px; border: 1.5px solid var(--line-strong);
  background: #fff; font: inherit; font-size: .92rem; font-weight: 650; cursor: pointer; color: var(--ink);
  transition: background .12s, border-color .12s;
}
.chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip:hover, .choice:hover { border-color: var(--primary); background: var(--primary-soft); }
.chip.on, .choice.on { background: var(--primary); border-color: var(--primary-dark); color: #fff; box-shadow: 0 2px 8px rgba(13, 107, 99, .3); }
.choices { display: flex; flex-wrap: wrap; gap: .45rem; }
.choices.two { display: grid; grid-template-columns: 1fr 1fr; }
.choices.two .choice { justify-content: center; padding: .35rem .4rem; }
.text-edit { background: #f7f4ee; border: 1.5px solid var(--line); border-radius: 14px; padding: .1rem .85rem .85rem; }
.text-edit .btn.wide { margin-top: 1.1rem; }
.size-row { display: flex; align-items: center; gap: .7rem; }
.size-row input { flex: 1; height: 32px; accent-color: var(--primary); cursor: pointer; }
.small-a { font-size: .85rem; font-weight: 800; }
.big-a { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.swatches { display: flex; flex-wrap: wrap; gap: .55rem; }
.swatch { width: 42px; height: 42px; border-radius: 50%; border: 2px solid rgba(27, 34, 51, .25); cursor: pointer; padding: 0; transition: transform .1s; }
.swatch:hover { transform: scale(1.1); }
.swatch.on { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--primary); }
.swatches.large .swatch { width: 104px; height: 64px; border-radius: 14px; }

/* ---------- timeline ---------- */
.timeline-wrap { grid-column: 1 / -1; background: var(--work-2); border-top: 1px solid var(--work-line); }
.timeline { display: flex; gap: .8rem; overflow-x: auto; padding: .9rem 1.2rem 1rem; scrollbar-color: #4a556b transparent; }
.slide-card {
  flex: 0 0 auto; width: 176px; padding: 5px; border-radius: 15px; border: 3px solid transparent;
  background: #2a3345; cursor: pointer; font: inherit; color: #e6ebf5; transition: border-color .12s, background .12s, transform .1s;
}
.slide-card:hover { background: #344056; transform: translateY(-2px); }
.slide-card.on { border-color: #35c2b3; background: #fff; color: var(--ink); box-shadow: 0 6px 20px rgba(0, 0, 0, .4); }
.slide-card.playing { border-color: var(--accent); }
.slide-card .thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 10px; background: #1b2233 center / cover no-repeat; overflow: hidden; }
.slide-card .words { position: absolute; left: 5px; right: 5px; bottom: 6px; color: #fff; font-size: .68rem; font-weight: 700; text-align: center; text-shadow: 0 1px 3px #000, 0 0 6px rgba(0, 0, 0, .6); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.slide-card .bar { position: absolute; left: 0; bottom: 0; height: 5px; width: 0; background: var(--accent); }
.slide-card:not(.playing) .bar { width: 0 !important; }
.slide-card .meta { display: flex; justify-content: space-between; align-items: center; padding: 5px 5px 1px; font-size: .84rem; font-variant-numeric: tabular-nums; opacity: .9; }
.slide-card .meta b { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; background: rgba(255, 255, 255, .14); font-size: .82rem; }
.slide-card.on .meta b { background: var(--primary); color: #fff; }
.slide-card.add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem;
  border: 3px dashed #4fb3a8; background: rgba(53, 194, 179, .1); color: #8fe3d9; font-weight: 700; min-height: 136px;
}
.slide-card.add:hover { background: rgba(53, 194, 179, .2); }
.slide-card.add .plus { font-size: 2rem; line-height: 1; }

/* ---------- pop-up windows ---------- */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(13, 17, 27, .66); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 1rem; animation: fade .15s ease-out; }
.modal { width: 100%; max-width: 580px; max-height: calc(100vh - 2rem); display: flex; flex-direction: column; background: var(--card); border-radius: 24px; box-shadow: var(--shadow-lg); animation: pop .18s ease-out; }
.modal.wide { max-width: 920px; }
.modal header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.2rem 1.1rem 1.5rem; border-bottom: 1px solid var(--line); }
.modal header h2 { font-size: 1.4rem; }
.modal-body { padding: 1.4rem 1.5rem 1.5rem; overflow-y: auto; }
.modal-body > form > label:first-child, .modal-body > label:first-child { margin-top: 0; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .7rem; margin-top: 1.4rem; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.tabs { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: 1rem; padding: .3rem; background: #efebe3; border-radius: 16px; }
.tab { flex: 1; min-height: 54px; padding: .5rem 1rem; border-radius: 12px; border: 0; background: transparent; font: inherit; font-weight: 700; cursor: pointer; color: var(--muted); white-space: nowrap; }
.tab:hover { color: var(--ink); background: rgba(255, 255, 255, .6); }
.tab.on { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.styles { margin-bottom: 1.2rem; }
.styles .choice { min-height: 50px; padding: .4rem 1.1rem; font-size: 1rem; }
.gen-result .lead { margin-top: 1.3rem; font-weight: 700; }
.gen-img { display: block; max-width: 100%; max-height: 46vh; border-radius: 14px; margin-top: 1rem; box-shadow: var(--shadow); }
.working { display: flex; align-items: center; gap: .9rem; padding: 1.3rem 0; font-size: 1.1rem; }
.spinner { width: 32px; height: 32px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--primary); animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.pic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; margin-top: 1.1rem; }
.pic { padding: 0; border: 3px solid transparent; border-radius: 14px; overflow: hidden; cursor: pointer; background: #2a3140; aspect-ratio: 16 / 9; transition: transform .1s, border-color .1s; }
.pic:hover { border-color: var(--primary); transform: scale(1.02); }
.pic-wrap { position: relative; }
.pic-wrap .pic { width: 100%; display: block; }
.pic-del {
  position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer;
  border-radius: 12px; border: 0; background: rgba(255, 255, 255, .92); color: var(--danger); box-shadow: var(--shadow-sm);
}
.pic-del:hover { background: var(--danger); color: #fff; }
.bin-item .thumb, .trash-card .thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 12px; background: #1b2233 center / cover no-repeat; overflow: hidden; margin-bottom: .5rem; }
.bin-item .words { position: absolute; left: 6px; right: 6px; bottom: 8px; color: #fff; font-size: .8rem; font-weight: 700; text-align: center; text-shadow: 0 1px 3px #000; }
.slide-card.add.bin { border-color: #6b7690; background: rgba(255, 255, 255, .05); color: #b9c2d3; font-size: .85rem; }
.slide-card.add.bin:hover { background: rgba(255, 255, 255, .12); }
.slide-card.add.bin .icon { width: 1.5rem; height: 1.5rem; }
.btn.revoice { margin-top: .7rem; }
.trash-section { margin-top: 2rem; }
.trash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.2rem; margin-top: 1rem; }
.trash-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: .8rem; box-shadow: var(--shadow-sm); }
.trash-card h3 { display: block; margin: .2rem 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-card p { font-size: .85rem; margin-bottom: .7rem; }
.trash-card .thumb { display: grid; place-items: center; }
.trash-card button.thumb { width: 100%; border: 0; padding: 0; cursor: zoom-in; }
.trash-card button.thumb:hover { filter: brightness(1.08); }
.gallery .trash-card p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.gen-img.big { max-height: 62vh; margin: 0 auto; }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }

.rec { text-align: center; padding: .4rem 0; }
.count { font-size: 4.4rem; font-weight: 800; line-height: 1.1; margin: .4rem 0 1rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.rec-on { color: #c62828; font-weight: 750; display: flex; align-items: center; justify-content: center; gap: .6rem; }
.dot { width: 18px; height: 18px; border-radius: 50%; background: #c62828; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.meter { height: 18px; background: #e9e4da; border-radius: 9px; overflow: hidden; margin: 0 auto 1.5rem; max-width: 400px; }
.meter span { display: block; height: 100%; width: 0; border-radius: 9px; background: linear-gradient(90deg, #2e9d59, #7ccf5a); transition: width .08s; }

.export video { display: block; width: 100%; max-height: 52vh; background: #000; border-radius: 14px; }
.progress { height: 28px; background: #e9e4da; border-radius: 14px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; border-radius: 14px; background: linear-gradient(90deg, var(--primary), #25a798); transition: width .2s; }
.pct { font-size: 2.6rem; font-weight: 800; text-align: center; margin: .6rem 0; font-variant-numeric: tabular-nums; }

#toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 30px); z-index: 80; max-width: min(90vw, 640px);
  background: #1b2233; color: #fff; padding: .9rem 1.4rem; border-radius: 16px; font-weight: 600; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.error { background: var(--danger); }

@media (max-width: 1100px) {
  .editor { grid-template-columns: minmax(0, 1fr) 350px; }
  .title-input { width: 22vw; }
  .save-state { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
