:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  background: #14241d;
  color: #f4eee3;
  --muted: #bac6b6;
  --line: #4a5d50;
  --accent: #e1b485;
}
* { box-sizing: border-box; }
body { margin: 0; }
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 21px max(5vw, 22px);
  border-bottom: 1px solid var(--line);
}
.brand, .header-label, .preview-label {
  text-transform: uppercase;
  letter-spacing: .17em;
  font-size: .76rem;
  font-weight: 700;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { font-size: 1.5rem; line-height: 1; color: var(--accent); }
.header-label, .preview-label, figcaption { color: var(--muted); }
.studio {
  width: min(1280px, 90vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(315px, .78fr) minmax(0, 1.22fr);
  gap: clamp(36px, 7vw, 110px);
  align-items: start;
  padding: clamp(28px, 4vw, 60px) 0;
}
h1 {
  font: 400 clamp(4rem, 7.4vw, 7.2rem)/.86 Georgia, serif;
  letter-spacing: -.077em;
  margin: 0;
}
h1 em { font-weight: 400; color: var(--accent); }
.intro { color: var(--muted); line-height: 1.55; max-width: 36ch; margin: 22px 0; }
.fields { display: grid; grid-template-columns: 1fr minmax(85px, .4fr); gap: 12px; }
.field { font-weight: 650; font-size: .83rem; }
.wide { grid-column: 1 / -1; }
.optional { color: var(--muted); font-weight: 400; }
input {
  width: 100%;
  min-height: 45px;
  margin-top: 5px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #1b2e25;
  color: inherit;
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
}
.field-note, .export-note, .status { margin: 0; color: var(--muted); font-size: .77rem; }
.field-note { margin-top: -6px; }
.palettes { border: 0; margin: 19px 0; padding: 0; }
legend { font-size: .83rem; font-weight: 650; padding: 0; margin-bottom: 7px; }
.choices { display: flex; gap: 7px; flex-wrap: wrap; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; }
.choice .option { display: flex; gap: 7px; align-items: center; min-height: 41px; border: 1px solid var(--line); padding: 7px 10px; border-radius: 3px; font-size: .8rem; }
.swatch { display: block; width: 14px; aspect-ratio: 1; border: 1px solid #ffffff50; border-radius: 50%; }
.choice input:checked + .option { border-color: var(--accent); background: #3a3a2d; color: #fff7e8; }
:focus-visible, .choice input:focus-visible + .option { outline: 2px solid #ffce99; outline-offset: 3px; }
.download {
  width: 100%;
  min-height: 53px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  font: inherit;
  font-weight: 750;
  background: var(--accent);
  color: #201c15;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
}
.download:hover { background: #f2c497; }
.download:disabled { cursor: wait; }
.export-note, .status { margin-top: 7px; }
.status:empty { display: none; }
.preview { min-width: 0; margin: 0; position: sticky; top: 20px; }
.preview-label { display: flex; justify-content: space-between; margin-bottom: 9px; }
.stage {
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 50px);
  border: 1px solid #526259;
  background: radial-gradient(ellipse at 43% 10%, #52665a, #273c32 65%, #1d3027);
  position: relative;
  isolation: isolate;
}
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(125deg, #ffffff05 0 1px, transparent 1px 5px);
}
.frame {
  width: min(100%, 430px);
  border: clamp(7px, 1.1vw, 14px) solid #362d24;
  border-color: #6d5843 #33291f #241c17 #574232;
  box-shadow: 0 19px 30px #07140fc7, 0 3px 7px #0009, 0 0 0 1px #261b14;
}
canvas { display: block; width: 100%; height: auto; background: #eee5d2; }
figcaption { font-size: .77rem; margin-top: 10px; }
@media (max-width: 710px) {
  .studio { grid-template-columns: minmax(0, 1fr); width: min(91vw, 520px); gap: 26px; }
  .editor { display: contents; }
  h1 { grid-row: 1; font-size: clamp(3.6rem, 13vw, 5.5rem); }
  h1 br { display: none; }
  h1 br::after { content: " "; }
  h1 em::before { content: " "; }
  .intro { grid-row: 2; margin: -12px 0 0; }
  .preview { grid-row: 3; position: static; }
  form { grid-row: 4; }
  .frame { width: min(76%, 255px); }
}
