@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');
:root{font-family:'DM Sans',sans-serif;color:#222523;background:#f5f5ef;font-size:14px}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input[type=range]{cursor:pointer}button{border:1px solid #d8dbd3;background:transparent;border-radius:8px;padding:10px 14px;color:inherit}button:hover{filter:brightness(.94);background-color:#e9ece2}button:disabled{opacity:.5;cursor:wait}header{height:86px;display:flex;align-items:center;justify-content:space-between;padding:0 4%;border-bottom:1px solid #dedfd7}.brand{font-family:'Space Grotesk',sans-serif;font-size:26px;font-weight:700;color:inherit;text-decoration:none;display:flex;align-items:center;gap:8px}.brand>span:last-child{font-weight:400;margin-left:-7px}.logo{background:#d8fb72;border-radius:12px;width:40px;height:40px;text-align:center;font-size:30px}.tag{font-size:10px;letter-spacing:2px;color:#6c7369}main{max-width:1510px;margin:auto;padding:38px 4% 0}.intro{display:flex;justify-content:space-between;align-items:center;margin-bottom:32px}.eyebrow{font-size:10px;letter-spacing:2px;color:#67705e;font-weight:700}h1{font-family:'Space Grotesk',sans-serif;font-size:43px;line-height:1.08;letter-spacing:-2px;margin:14px 0}h1 em{font-style:normal;color:#7d896b}.intro p{color:#737a70}.steps{display:flex;gap:28px}.steps b{color:#73845c;font-size:12px}.steps span{display:block;color:#656c60;font-size:12px;font-weight:400;margin-top:8px}.workspace{display:grid;grid-template-columns:minmax(250px,1fr) minmax(310px,1.4fr) minmax(240px,1fr);gap:24px;align-items:start}.panel{background:#fff;border:1px solid #e0e2d9;padding:23px;border-radius:14px}.panelhead{display:flex;align-items:center;justify-content:space-between}.panelhead>span{font-size:10px;color:#79816f;background:#f0f3e9;padding:5px 8px;border-radius:5px}h2{font-size:16px;font-weight:600;margin:0 0 14px;font-family:'Space Grotesk',sans-serif}.panelhead h2{margin:0}.hint{color:#81877a;font-size:11px;line-height:1.65}.level{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid #eef0e8}.thumb{width:44px;height:44px;border:0;border-radius:50%;padding:0;font-size:27px;flex-shrink:0;overflow:hidden;background:var(--color)}.thumb img{width:100%;height:100%;object-fit:cover}.levelinfo{flex:1;min-width:0}.levelinfo strong{display:block;font-size:12px}.sound{font-size:10px;border:0;color:#838b79;padding:5px 0;max-width:135px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:block}.tiny{border:0;padding:5px;font-size:12px;color:#858a80}.add{width:100%;margin-top:18px;border-style:dashed;color:#667652;font-size:12px}.tip{margin-top:22px;font-size:10px;line-height:1.8;color:#919788}.preview{background:#e9ece3;border:1px solid #dde1d5;border-radius:14px;padding:16px 22px}.previewhead{display:flex;justify-content:space-between;font-size:9px;color:#7b8473;letter-spacing:.5px;margin-bottom:14px}i{display:inline-block;width:6px;height:6px;background:#8ca66d;border-radius:50%;margin-right:5px}.canvaswrap{position:relative;max-width:300px;margin:auto;box-shadow:0 15px 32px #26302122;border-radius:12px;overflow:hidden;line-height:0}canvas{width:100%;height:auto;touch-action:none}#paused{position:absolute;bottom:25px;left:0;right:0;text-align:center;font-size:9px;color:#b8c1cd;letter-spacing:3px;pointer-events:none}.transport{display:flex;justify-content:center;gap:6px;margin-top:18px;flex-wrap:wrap}.transport button{font-size:10px;padding:10px}.primary{background:#d7f795;border-color:#c3de88;font-weight:700}.center{text-align:center;margin-bottom:0}.settings label{display:block;color:#737b6a;font-size:11px;margin:20px 0}.settings input:not([type=range]),select{display:block;width:100%;border:1px solid #dde1d5;background:#fafbf7;color:#384030;border-radius:7px;padding:11px;margin-top:9px;font-size:12px}.swatches{display:flex;gap:10px;margin-top:12px}.swatches button{width:29px;height:29px;background:var(--c);border:3px solid white;outline:1px solid #ddd;padding:0;border-radius:50%}.swatches .selected{outline:2px solid #a4bc7b}input[type=range]{display:block;width:100%;accent-color:#899f62;margin:15px 0}output{float:right;color:#444d39}hr{border:0;border-top:1px solid #e9ece3;margin:26px 0}.export{background:#263827;color:#e4f3cc;border:0;width:100%;font-weight:600;padding:14px}.export:hover{background:#354c35}#status{margin-top:18px;font-size:11px;line-height:1.5;color:#6c7c5c}#download{display:block;color:#3f692c;margin-top:12px;font-weight:600}#download[hidden]{display:none}footer{display:flex;justify-content:space-between;font-size:9px;color:#919788;letter-spacing:.6px;padding:28px 0}button:focus-visible,a:focus-visible{outline:3px solid #90ac5f;outline-offset:3px}
/* Flexible containers also protect tablet widths and long file names. */
html{scroll-behavior:smooth;scroll-padding-top:20px}
.workspace>*{min-width:0}.intro>div{min-width:0}
canvas{display:block;max-width:100%;touch-action:pan-y}
.panelhead{gap:10px}.panelhead>span{flex-shrink:0}
#status,#download,.hint,.tip{overflow-wrap:anywhere}
.mobile-nav{display:none}
@media(min-width:1500px){.canvaswrap{max-width:340px}}
@media(max-width:1100px){
  main{padding:26px 20px 0}
  .workspace{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:16px}
  .settings{grid-column:1/-1}.tag,.steps{display:none}
}
@media(max-width:760px){
  header{min-height:72px;height:auto;gap:12px;padding:14px max(16px,env(safe-area-inset-left)) 14px max(16px,env(safe-area-inset-right));flex-wrap:wrap}
  .brand{font-size:24px;gap:7px;white-space:nowrap}
  .logo{width:34px;height:34px;font-size:26px;border-radius:10px}
  header button{min-height:44px;font-size:12px;padding:10px}
  main{padding:24px max(16px,env(safe-area-inset-left)) 0 max(16px,env(safe-area-inset-right))}
  .intro{margin-bottom:20px}.eyebrow{font-size:9px;letter-spacing:1.2px}
  h1{font-size:clamp(28px,7.5vw,42px);letter-spacing:-1.4px;line-height:1.12}
  .intro p{font-size:13px;line-height:1.5;margin-bottom:0}
  .mobile-nav{display:flex;gap:8px;margin:0 0 16px}
  .mobile-nav a{flex:1;min-width:0;min-height:44px;display:flex;align-items:center;justify-content:center;padding:10px 6px;border:1px solid #d8dbd3;border-radius:8px;color:#526044;text-decoration:none;font-size:12px;background:#fff}
  .workspace{display:flex;flex-direction:column;gap:16px}
  .workspace>.panel,.workspace>.preview{width:100%}
  .preview{order:-1;padding:16px;border-radius:12px}
  .previewhead{gap:8px;flex-wrap:wrap;font-size:9px;line-height:1.5}
  .canvaswrap{width:100%;max-width:420px}
  .transport{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin-top:16px}
  .transport #play{grid-column:1/-1}
  .transport button{min-height:46px;font-size:13px;padding:12px 8px}
  .hint{font-size:12px;line-height:1.65}.center{margin-top:12px}
  .panel{padding:20px 16px;border-radius:12px}
  h2{font-size:18px}.panelhead>span{font-size:11px}
  .level{gap:10px;padding:12px 0}
  .thumb{width:48px;height:48px;font-size:30px}
  .levelinfo strong{font-size:14px}
  .sound{min-height:44px;max-width:100%;width:100%;font-size:12px;padding:10px 0;text-align:left}
  .tiny{width:44px;min-width:44px;min-height:44px;padding:10px;font-size:19px}
  .add{min-height:48px;font-size:14px}.tip{font-size:12px}
  .settings label{font-size:14px;margin:24px 0}
  .settings input:not([type=range]),.settings select{font-size:16px;min-height:48px;padding:12px}
  .swatches{gap:14px;flex-wrap:wrap}.swatches button{width:44px;height:44px;border-width:5px}
  input[type=range]{height:44px;margin:8px 0;touch-action:pan-y}
  input[type=range]::-webkit-slider-thumb{width:26px;height:26px}
  input[type=range]::-moz-range-thumb{width:26px;height:26px}
  .export{min-height:52px;font-size:16px}
  #status{font-size:13px}#download{min-height:48px;padding:14px 0;font-size:14px}
  footer{display:block;font-size:10px;line-height:1.8;padding:24px 0 max(24px,env(safe-area-inset-bottom))}
  footer span{display:block;margin-bottom:5px}
}
@media(max-width:360px){
  header{gap:8px}.brand{font-size:21px}.logo{width:30px;height:30px;font-size:24px}
  header button{font-size:11px;padding:8px}
  main{padding-left:12px;padding-right:12px}
  .panel,.preview{padding:14px 12px}.level{gap:6px}.tiny{width:40px;min-width:40px}
  .levelinfo strong{font-size:13px}
}
@media(max-width:760px) and (orientation:landscape){.canvaswrap{max-width:380px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
.brand>.brand-name{font-weight:700;margin-left:0;font-size:clamp(19px,2vw,26px)}@media(max-width:760px){header .brand{flex:1 1 100%}.brand>.brand-name{font-size:clamp(20px,6vw,26px)}header #reset{margin-left:auto}}
.mic-button{display:block;min-height:38px;padding:8px 10px;margin:3px 0 0;border-color:#d4dfc4;background:#f2f7e9;color:#536c3d;font-size:11px;text-align:left}.mic-button.is-recording{background:#fff0ed;color:#ae3b30;border-color:#eab5ac}.mic-status{display:block;font-size:11px;line-height:1.5;color:#727c66;margin-top:8px;overflow-wrap:anywhere}.mic-cancel{min-height:36px;border:0;padding:5px 0;font-size:11px;color:#8a5148}.level{align-items:flex-start}.level>.thumb,.level>.tiny{margin-top:4px}@media(max-width:760px){.mic-button{min-height:44px;font-size:13px;padding:10px 12px}.mic-status{font-size:12px}.mic-cancel{min-height:44px;font-size:12px}}

#preview{scroll-margin-top:12px}.preview-status{font-size:12px;line-height:1.6;text-align:center;color:#536640}.preview-download{display:block;min-height:48px;padding:14px;text-align:center;color:#365d29;font-weight:600}.preview-download[hidden],.preview-status[hidden]{display:none}

/* Interface theme; the video's own background is configured independently. */
:root{color-scheme:light}
:root[data-theme="dark"]{color-scheme:dark;background:#0f151e;color:#e8edf5}
.theme-toggle{min-height:44px;flex-shrink:0;font-size:12px}
[data-theme="dark"] header{border-color:#293545}
[data-theme="dark"] .panel{background:#171f2b;border-color:#2b384b}
[data-theme="dark"] .preview{background:#1b2635;border-color:#304158}
[data-theme="dark"] h1 em{color:#b6c6dc}
[data-theme="dark"] .tag,[data-theme="dark"] .hint,[data-theme="dark"] .tip,[data-theme="dark"] footer,[data-theme="dark"] .previewhead,[data-theme="dark"] .intro p,[data-theme="dark"] .settings label,[data-theme="dark"] .sound,[data-theme="dark"] .tiny,[data-theme="dark"] .mic-status{color:#aebbd0}
[data-theme="dark"] .panelhead>span{background:#29394d;color:#d4e2f6}
[data-theme="dark"] button{border-color:#40536c}
[data-theme="dark"] button:hover{background-color:#293a51;filter:none}
[data-theme="dark"] .primary{background:#d7f795;color:#24311b;border-color:#c3de88}
[data-theme="dark"] .primary:hover{background:#e2ffab}
[data-theme="dark"] .export{background:#c5e994;color:#20311a}
[data-theme="dark"] .export:hover{background:#d6f5b0}
[data-theme="dark"] .level,[data-theme="dark"] hr{border-color:#2c3a4d}
[data-theme="dark"] .settings input:not([type=range]),[data-theme="dark"] .settings select{background:#101925;border-color:#40536c;color:#edf2fa}
[data-theme="dark"] input::placeholder{color:#9baec7}
[data-theme="dark"] output{color:#dbe7f8}
[data-theme="dark"] .add,[data-theme="dark"] #status,[data-theme="dark"] #download,[data-theme="dark"] .preview-status,[data-theme="dark"] .preview-download{color:#bbd5f5}
[data-theme="dark"] .swatches button{border-color:#1b2635;outline-color:#5d7390}
[data-theme="dark"] .swatches .selected{outline-color:#d1f49b}
[data-theme="dark"] .mic-button{background:#24354b;color:#d2e4fb;border-color:#425f80}
[data-theme="dark"] .mic-button.is-recording{background:#4b2625;color:#ffcbc2;border-color:#aa6960}
[data-theme="dark"] .mic-cancel{color:#efb5a8}
[data-theme="dark"] .mobile-nav a{background:#1b2635;color:#d4e2f6;border-color:#40536c}
[data-theme="dark"] .steps b,[data-theme="dark"] .steps span{color:#b6c6dc}
@media(max-width:760px){header .theme-toggle{margin-left:auto;min-height:44px}}

/* Photo banner keeps the title legible in both themes. */
header{
  min-height:190px;height:auto;position:relative;isolation:isolate;gap:20px;flex-wrap:wrap;
  padding-top:28px;padding-bottom:28px;
  background:#15121f url('assets/header-halloween.jpg') center 42% / cover no-repeat;
  color:#fff;border-bottom:1px solid #4e405a;
}
header::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,rgba(8,12,21,.85),rgba(8,12,21,.35) 65%,rgba(8,12,21,.65))}
header .brand{color:#fff;text-shadow:0 2px 12px #000}
header .tag,[data-theme="dark"] header .tag{color:#f1e7f7;text-shadow:0 1px 6px #000}
header .theme-toggle,[data-theme="dark"] header .theme-toggle{background:rgba(15,21,30,.85);color:#fff;border-color:#a4a4b0}
header .theme-toggle:hover,[data-theme="dark"] header .theme-toggle:hover{background:#253147}
@media(max-width:760px){header{min-height:210px;padding-top:24px;padding-bottom:20px;background-position:center 40%;gap:16px;align-content:space-between}header::before{background:linear-gradient(90deg,rgba(8,12,21,.75),rgba(8,12,21,.3))}header .brand{flex-basis:100%}}
