:root {
  font: 16px/1.45 system-ui, sans-serif;
  color: #202638;
  background: #f4f6fb;
  --ink: #202638;
  --muted: #56617a;
  --accent: #354297;
  --pastel: #e8ebff;
  --border: #d9dfed;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--accent); }
button, select, input { font: inherit; }
button, select, .actions a { border: 1px solid var(--border); border-radius: 7px; background: white; color: inherit; padding: 8px 14px; }
button, select, input, .actions a { cursor: pointer; }
button:disabled { cursor: default; opacity: .52; }
:focus-visible { outline: 3px solid #5d70e5; outline-offset: 3px; }
.bar, footer { display: flex; align-items: center; gap: 20px; padding: 15px max(24px, calc((100vw - 1180px) / 2)); }
.bar { background: #fff; border-bottom: 1px solid var(--border); justify-content: space-between; }
.bar a, footer a { text-decoration: none; font-weight: 650; }
.brand { display: flex; align-items: center; color: var(--ink); gap: 10px; }
main { width: min(1180px, calc(100% - 48px)); margin: 36px auto 0; }
h1 { font-size: clamp(31px, 4vw, 49px); line-height: 1.05; letter-spacing: -.045em; margin: 0 0 12px; }
.lead { margin: 0 0 24px; color: var(--muted); }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 330px); gap: 18px; align-items: start; }
.preview, .controls { border: 1px solid var(--border); border-radius: 11px; overflow: hidden; }
.preview { background: #121627; color: #f4f6ff; }
.preview-toolbar, .player { display: flex; align-items: center; padding: 9px 12px; gap: 12px; background: #1c2236; }
.preview-toolbar { justify-content: space-between; font-weight: 650; }
.segmented { display: flex; gap: 5px; }
.segmented button, .player button { color: #f4f6ff; background: transparent; border-color: #515b79; padding: 5px 8px; font-size: .84rem; }
.segmented button[aria-pressed="true"] { color: #202638; background: #e2e7ff; border-color: #e2e7ff; }
.picture { position: relative; width: min(100%, var(--width-for-height, 100%)); margin: auto; aspect-ratio: var(--aspect, 16 / 9); overflow: hidden; }
.picture video { width: 100%; height: 100%; display: block; }
.picture img { position: absolute; pointer-events: none; }
.placeholder { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; }
.placeholder img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .83; }
.placeholder div { position: relative; }
.placeholder button { background: white; color: var(--ink); font-weight: 700; box-shadow: 0 2px 20px #1216278c; }
.player input { flex: 1; min-width: 0; accent-color: #aeb8ff; }
.controls { padding: 17px; background: white; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 6px; }
legend { font-size: 1.15rem; font-weight: 710; padding: 0 0 10px; }
fieldset > label { font-size: .91rem; font-weight: 650; margin-top: 6px; }
.file { display: grid; gap: 3px; padding: 8px 9px; border-radius: 7px; background: #f3f5fa; }
.file input { width: 100%; font-size: .81rem; }
.file input::file-selector-button { font: inherit; border: 1px solid var(--border); padding: 3px 7px; background: white; border-radius: 4px; color: var(--ink); cursor: pointer; }
.file span:last-child { color: var(--muted); font-size: .78rem; font-weight: 450; overflow-wrap: anywhere; }
select { width: 100%; padding: 4px 7px; }
fieldset label[for] { display: flex; justify-content: space-between; }
fieldset input[type="range"] { width: 100%; margin: 0; accent-color: var(--accent); }
output { color: var(--accent); }
#status { color: var(--muted); font-size: .84rem; margin: 11px 0; }
#status[data-error] { color: #9a2929; }
#progress { width: 100%; margin: 0 0 8px; accent-color: var(--accent); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
#export { color: white; background: var(--accent); border-color: var(--accent); font-weight: 700; }
#download { color: var(--accent); background: var(--pastel); border-color: #cdd4fa; font-weight: 700; text-decoration: none; }
footer { color: var(--muted); font-size: .83rem; margin-top: 17px; flex-wrap: wrap; }
footer span { margin-right: auto; }
.info { width: min(760px, calc(100% - 40px)); }
.info section { margin: 22px 0; padding: 16px 20px; background: #fff; border: 1px solid var(--border); border-radius: 11px; }
.info h2 { margin: 0; }
@media (max-width: 760px) {
  main { width: calc(100% - 28px); margin-top: 25px; }
  .editor { grid-template-columns: 1fr; }
  .bar, footer { padding-inline: 14px; }
}
