:root { color-scheme: dark; font-family: system-ui, "Microsoft YaHei", sans-serif; background: #18191d; color: #fff8ed; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; display: grid; place-items: center; }
#stage { position: relative; width: min(100vw, 177.7778dvh); aspect-ratio: 16/9; overflow: hidden; background: #272324; }
canvas { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; outline: none; }
.panel { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: min(620px, 92%); padding: 28px 32px; background: #202125f5; border: 1px solid #6c6457; border-radius: 16px; box-shadow: 0 12px 60px #0009; }
.eyebrow { color: #ffbe6c; font-size: 12px; letter-spacing: .16em; margin: 0 0 8px; }
h1 { font-size: 30px; margin: 0 0 12px; } h2 { margin-top: 0; }
p { line-height: 1.5; margin: 10px 0; color: #d1ccc4; font-size: 14px; }
.file { display: block; padding: 14px 0; border-top: 1px solid #ffffff24; border-bottom: 1px solid #ffffff24; }
.file input { margin-top: 8px; display: block; width: 100%; }
.options { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 16px 0; font-size: 14px; }
label { color: #ebe0d3; } input, select, button { font: inherit; }
select, input[type=number] { border: 1px solid #847967; border-radius: 5px; padding: 5px; background: #2a2a2e; color: #fff; }
input[type=number] { width: 72px; } input[type=checkbox] { accent-color: #ed8155; }
button { min-height: 44px; padding: 10px 22px; border-radius: 7px; border: 1px solid #807363; color: #fff8ed; background: #353236; cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #ffdc99; outline-offset: 3px; }
button.primary { background: #ef7443; color: #231710; border-color: #ef7443; font-weight: 700; }
button:disabled { opacity: .5; cursor: wait; }
#start { width: 100%; } #status { min-height: 22px; color: #ffd69a; }
.help { color: #b8b4ae; font-size: 12px; margin-bottom: 0; }
.compact { width: min(460px, 90%); text-align: center; }
.compact button { margin: 5px; }
.panel { max-height: 94%; overflow-y: auto; }
.stage-settings { margin: 12px 0; font-size: 14px; }
.stage-settings summary { cursor: pointer; padding: 6px 0; }
.stage-options { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin: 10px 0 0; padding: 0; border: 0; }
.stage-options label { display: grid; gap: 4px; }
.stage-options select { width: 100%; }
.stage-options:disabled { opacity: .5; }
#pause-button { position: absolute; top: max(10px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); background: #272324cf; }
[hidden] { display: none !important; }
@media (max-height: 560px) and (orientation: landscape) {
    .panel { padding: 12px 22px; } h1 { font-size: 22px; margin-bottom: 5px; }
    p { margin: 5px 0; font-size: 12px; } .file { padding: 7px 0; } .options { margin: 8px 0; gap: 10px; }
    .help { font-size: 11px; } .eyebrow { display: none; }
}
@media (orientation: portrait) { #stage { overflow: visible; } #menu { position: relative; left: auto; top: auto; transform: none; width: 94%; max-height: none; margin: -20px auto 20px; } }
