:root { font: 16px/1.55 "Atkinson Hyperlegible Next", "Aptos", system-ui, sans-serif; color: #211b14; background: #f6f3ea; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: #263f33; }
header, footer { display: flex; align-items: center; gap: 1rem; padding: .85rem clamp(1rem, 5vw, 4rem); justify-content: space-between; }
header { border-bottom: 1px solid #d9d4c7; }
footer { border-top: 1px solid #d9d4c7; font-size: .9rem; }
footer p { margin: 0; }
footer nav { display: flex; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: inherit; text-decoration: none; font-weight: 730; }
.brand img { border-radius: 8px; }
main { max-width: 75rem; min-height: 72vh; margin: auto; padding: clamp(1.6rem, 4.5vw, 4rem) 1rem 2.5rem; }
h1 { margin: 0; font-size: clamp(2rem, 6vw, 4rem); letter-spacing: -.064em; line-height: 1.08; }
h2 { margin: 0; font-size: 1.1rem; }
.lead, .hint, small { color: #565044; }
.lead { margin: .8rem 0 1.5rem; }
.layout { display: grid; grid-template-columns: minmax(18rem, 1fr) minmax(0, 1.75fr); gap: 1rem; }
.options, .work, main > section { background: #fffcf4; border: 1px solid #d9d4c7; border-radius: 16px; padding: clamp(.8rem, 2vw, 1.3rem); }
.preview-header, .dimensions, .file-actions, .buttons { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.preview-header { justify-content: space-between; margin-bottom: .7rem; }
#stage { background: #161d29; margin: 0 auto; overflow: hidden; border-radius: 9px; position: relative; aspect-ratio: 9 / 16; width: 15rem; max-width: 100%; }
#stage video { display: block; width: 100%; height: 100%; position: absolute; inset: 0; }
#result { object-fit: contain; }
#toggle-preview { margin-top: .9rem; }
button, .primary, input, select { font: inherit; }
button, .primary { border: 1px solid #b9b2a1; border-radius: 8px; padding: .52rem .75rem; color: inherit; text-decoration: none; font-weight: 650; background: #fffdf8; cursor: pointer; }
.primary { display: inline-flex; background: #243d34; border-color: #243d34; color: #fffdf5; }
.choose { position: relative; }
.choose input { cursor: pointer; position: absolute; inset: 0; opacity: 0; width: 100%; }
:focus-visible, .choose:focus-within { outline: 2px solid #a2432f; outline-offset: 3px; }
:disabled, .choose:has(:disabled) { opacity: .6; cursor: default; }
.hint, small, #status { font-size: .9rem; }
#filename { overflow-wrap: anywhere; }
#preset { width: 100%; margin: .4rem 0 .75rem; }
#preset, .dimensions input { border: 1px solid #b9b2a1; border-radius: 8px; background: white; padding: .4rem .55rem; }
.dimensions { flex-wrap: nowrap; }
.dimensions label { flex: 1; min-width: 0; }
.dimensions input { width: 100%; margin-top: .3rem; }
fieldset { margin: 1rem 0; border: 0; padding: 0; }
legend { margin-bottom: .2rem; font-weight: 700; }
fieldset label { display: flex; gap: .55rem; padding: .28rem 0; align-items: flex-start; cursor: pointer; }
fieldset input { accent-color: #243d34; margin-top: .38rem; }
small { display: block; }
.padding-control { display: flex; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.padding-control input { width: 2.4rem; min-height: 2rem; border: 0; background: transparent; }
progress { width: 100%; margin-top: .8rem; accent-color: #243d34; }
#status:empty, #details:empty, #size-error:empty { display: none; }
#size-error { color: #913b2c; }
main > section { margin-top: 1.4rem; }
@media (max-width: 760px) { .layout { grid-template-columns: 1fr; } }
