:root{--sg-header-h:74px;font-family:ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;color:#392746;background:#f8f0fb}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 10% 8%,#ffe8f7,transparent 30%),radial-gradient(circle at 90% 10%,#e3e1ff,transparent 35%),#f8f0fb}button,input,select{font:inherit}button{cursor:pointer;border:1px solid #d9c5e7;background:#fff;color:#593673;border-radius:12px;padding:11px 14px;font-weight:700}button:hover{filter:brightness(.97)}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #a965db;outline-offset:2px}.mast{text-align:center;padding:28px 15px 23px;background:linear-gradient(115deg,#432351,#6c377d 48%,#422553);color:white;border-bottom:5px solid #d7ab56}.mast h1{font-family:Georgia,serif;font-size:clamp(27px,4vw,44px);color:#ffe1a1;margin:7px 0 3px;text-shadow:0 2px 1px #301737}.mast p{font-size:18px;letter-spacing:.06em;margin:0;color:#ffe6fb}.eyebrow,.step{font-size:11px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}.eyebrow{color:#f5c9ee}.step{color:#a35b9e}.workspace{max-width:1320px;margin:24px auto;display:grid;grid-template-columns:minmax(330px,465px) minmax(400px,1fr);gap:20px;padding:0 18px}.panel{background:#fff;border:1px solid #e8d8ee;border-radius:20px;box-shadow:0 9px 30px #4e255212;overflow:hidden}.editor{align-self:start}.section-head{padding:22px 23px 14px}.section-head h2,.preview h2,.inventory h2{font-family:Georgia,serif;color:#5d306e;margin:6px 0 8px;font-size:27px}.section-head p,.preview-note,.fineprint{color:#76657f;font-size:13px;line-height:1.55;margin:0}.tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;padding:0 18px 20px}.tabs button{font-size:12px;padding:12px 5px;min-height:56px}.tabs button.active{background:#5e3474;color:white;border-color:#5e3474;box-shadow:inset 0 -3px #d8a86b}.editing{border-top:1px solid #efdfef;padding:21px 23px}.editing-title{display:flex;justify-content:space-between;align-items:center;gap:8px}.editing h3{margin:0;font-family:Georgia,serif;font-size:23px}.editing-title span{font-size:11px;color:#977da0}.field{display:flex;flex-direction:column;gap:6px;margin-top:15px}.field label{font-size:12px;font-weight:750;color:#5c4564}.field select,.field input[type=text],.field input[type=number]{border:1px solid #dfcde6;border-radius:10px;background:white;padding:11px;width:100%;color:#46304e}.swatches{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:14px}.swatches .field{margin:0}.swatches input[type=color]{height:42px;width:100%;border:1px solid #dfcde6;border-radius:9px;background:#fff;padding:3px;cursor:pointer}.quantity{display:flex;align-items:center;gap:12px;margin-top:20px;background:#faf4fc;padding:12px;border-radius:12px}.quantity span{flex:1;font-weight:750;font-size:13px}.quantity button{width:35px;height:35px;padding:0}.quantity strong{min-width:22px;text-align:center}.print-actions{padding:0 23px 23px;display:grid;grid-template-columns:1fr 1fr;gap:9px}.print-actions .primary{grid-column:1/-1;background:linear-gradient(100deg,#6d3c83,#a1549b);color:white;border:0;padding:15px}.print-actions .quiet{grid-column:1/-1;border:0;background:transparent;color:#846e8d}.showcase{display:flex;flex-direction:column;gap:18px}.preview-heading{padding:19px 23px 4px;display:flex;justify-content:space-between;align-items:center;gap:8px}.preview h2{font-size:25px}.small{font-size:12px}.scene{margin:10px 18px 12px;border-radius:16px;background:radial-gradient(circle at 50% 32%,#fff6fd 0,#f9dff3 45%,#e7d4f4 100%);min-height:510px;display:grid;place-items:center;overflow:hidden;position:relative}.scene:before,.scene:after{content:'✦ ✧ ✦';position:absolute;color:#d6a553;font-size:28px;opacity:.5}.scene:before{top:20%;left:5%}.scene:after{right:6%;bottom:22%}#wandArt{width:100%;max-width:530px;height:520px;display:grid;place-items:center}#wandArt svg{width:100%;height:100%;filter:drop-shadow(0 9px 7px #54325b38)}.preview-note{padding:0 23px 22px}.inventory{padding:22px}.inventory h2{font-size:23px}#inventory{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin:15px 0}#inventory div{display:flex;justify-content:space-between;background:#faf4fb;border-radius:9px;padding:10px 12px;font-size:12px}#inventory b{color:#6b387f}.fineprint{border-top:1px solid #eee;padding-top:12px}footer{text-align:center;padding:18px;color:#875d90;font-family:Georgia,serif}@media(max-width:860px){.workspace{grid-template-columns:1fr}.scene{min-height:420px}#wandArt{height:420px}}@media(max-width:480px){.workspace{padding:0 9px;margin:12px auto}.tabs{grid-template-columns:repeat(2,1fr)}.scene{margin:8px;min-height:340px}#wandArt{height:360px}.preview-heading{padding:16px 14px 3px}.swatches{gap:6px}}

.wand-start { max-width: min(1100px, calc(100% - 2rem)); margin: 1rem auto; padding: 1.25rem; }
.wand-start h2 { margin-top: 0; }
.wand-start button { margin-right: .75rem; }
.wand-start a { color: inherit; }
.wand-start details { margin-top: 1rem; }
.wand-start summary { cursor: pointer; font-weight: 700; }
.wand-start img { display: block; width: 100%; height: auto; max-width: 780px; margin: .75rem auto; }


/* ---- shared sticky preview (wand + talking puppets) ---- */
.mast .eyebrow::before,.mast .eyebrow::after{content:none;margin:0}
.mast .eyebrow{margin-bottom:0;color:#f5c9ee}
.workspace{
  grid-template-areas:"editor preview" "kit preview";
  align-items:start;
}
.editor{grid-area:editor}
.preview{
  grid-area:preview;
  position:sticky;
  top:calc(var(--sg-header-h, 74px) + 12px);
  z-index:20;
  background:#fff;
  align-self:start;
  display:flex;
  flex-direction:column;
  max-height:calc(100vh - var(--sg-header-h, 74px) - 24px);
  overflow:hidden;
}
.inventory{grid-area:kit}
.workspace{scroll-margin-top:calc(var(--sg-header-h, 74px) + 8px)}

/* Definite max-height (not %) so the SVG actually shrinks to fit the sticky card. */
.preview #wandArt,
.preview #puppetArt{
  width:100%;
  height:auto;
  max-width:100%;
  min-height:0;
  display:flex;
  align-items:center;
  justify-content:center;
}
.preview .scene{min-height:0}
.preview #wandArt svg,
.preview #puppetArt svg{
  width:auto;
  height:auto;
  max-width:100%;
  max-height:min(520px, calc(100vh - var(--sg-header-h, 74px) - 180px));
}

@media (max-width:940px){
  html{--sg-header-h:148px}
}

@media (max-width:860px){
  .workspace{
    grid-template-columns:1fr;
    grid-template-areas:"preview" "editor" "kit";
    padding:0 9px;
    margin:12px auto;
    gap:12px;
  }
  .preview{
    top:var(--sg-header-h, 148px);
    z-index:40;
    max-height:38vh;
    border-radius:0 0 18px 18px;
    box-shadow:0 10px 24px #4e255230, 0 1px 0 #ead8f0;
    margin:0;
  }
  .preview-heading{
    padding:6px 12px 0;
    flex:0 0 auto;
    gap:6px;
  }
  .preview h2{
    font-size:16px;
    margin:0 0 2px;
    line-height:1.2;
  }
  .preview-heading .step{font-size:9px}
  .preview-heading .small{padding:6px 9px;font-size:11px;white-space:nowrap}
  .preview-note{display:none}
  .preview .scene{
    flex:1 1 auto;
    min-height:0 !important;
    height:auto;
    margin:4px 8px 8px;
    overflow:hidden;
  }
  .scene:before,.scene:after{display:none}
  .preview #wandArt,
  .preview #puppetArt{
    width:100%;
    height:100%;
    max-width:100%;
  }
  .preview #wandArt svg,
  .preview #puppetArt svg{
    max-height:calc(38vh - 72px);
  }
}

@media (max-width:860px) and (max-height:560px){
  .preview{max-height:30vh}
  .preview #wandArt svg,
  .preview #puppetArt svg{max-height:calc(30vh - 60px)}
}
