@import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@400;500;600;700;800;900&family=Caveat:wght@500;600;700&display=swap');
:root{font-family:'Inter',Arial,sans-serif;color:#191817;background:#f9f7f2;font-synthesis:none;--red:#cc1023;--line:#e1dcd4;--muted:#77716b}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer;color:inherit}button:focus-visible,a:focus-visible,input:focus-visible,#viewport:focus-visible{outline:3px solid #b11024;outline-offset:4px}button{transition:background .18s,border-color .18s,transform .18s}button:disabled{opacity:.3;cursor:not-allowed}header{height:82px;border-bottom:1px solid var(--line);padding:0 3%;display:flex;align-items:center;justify-content:space-between;position:relative;z-index:3;background:#faf8f4}.brand{font-weight:900;font-size:36px;letter-spacing:-2.5px;text-decoration:none;color:#111}.brand span{font-size:12px;vertical-align:top;letter-spacing:0;position:relative;top:8px;margin-left:4px}.nav-title{font-size:12px;letter-spacing:.28em;font-weight:600}.quiet{border:0;background:none;font-size:14px;padding:12px}.quiet:hover{color:var(--red)}main{display:grid;grid-template-columns:minmax(0,1fr) 400px;max-width:1920px;margin:auto;min-height:calc(100svh - 82px);padding-right:26px;gap:16px}.stage{position:relative;min-height:740px;height:calc(100svh - 82px);overflow:hidden;background:radial-gradient(ellipse at 50% 43%,#fffdf8 0%,#f7f2e9 65%,#eee7dd 100%)}.intro{position:absolute;top:37px;left:4.6%;z-index:1;pointer-events:none}.eyebrow{font-size:11px;letter-spacing:.18em;font-weight:500;margin:0 0 12px}.intro h1{font-family:'Anton',Impact,sans-serif;font-size:clamp(42px,5.8vw,87px);letter-spacing:-.01em;line-height:.86;margin:0;font-weight:400}.intro .eyebrow{font-size:10px}.script-note{position:absolute;z-index:1;font-family:'Caveat',cursive;font-weight:600;color:var(--red);line-height:1.05;font-size:26px;pointer-events:none;transform:rotate(-3deg)}
.script-note .swoop{position:absolute;width:110px;height:40px;left:8px;bottom:-30px;color:var(--red)}
.note-1{left:4%;top:47%}
.note-2{left:60%;top:66%;transform:rotate(-4deg)}
#viewport{position:absolute;inset:0;outline-offset:-5px!important}canvas{width:100%;height:100%;display:block}.stage-meta{position:absolute;bottom:139px;left:0;width:100%;text-align:center;pointer-events:none;display:flex;flex-direction:column;gap:5px}.stage-meta>span:first-child{font-size:15px;font-weight:600}.stage-meta>span:last-child{font-size:12px;color:var(--muted)}.builder{align-self:center;margin:26px 0;border:1px solid #dcd6cd;border-radius:25px;padding:29px;background:#fffcf8bd;box-shadow:0 8px 32px #72634606}.panel-heading .eyebrow{font-size:10px}.panel-heading h2{font-family:'Inter',Arial,sans-serif;font-size:44px;font-weight:800;letter-spacing:-.03em;line-height:1;margin:0 0 25px}.panel-heading h2 span{color:var(--red)}.steps{display:grid;grid-template-columns:repeat(3,1fr);border-bottom:1px solid var(--line);gap:12px}.steps button{display:flex;flex-direction:column;align-items:start;gap:3px;border:0;border-bottom:2px solid transparent;background:none;padding:0 0 13px;color:var(--muted);font-size:13px;min-height:44px}.steps b{font-size:14px;font-weight:500}.steps button[aria-selected=true]{border-color:var(--red);color:#171514}.steps button[aria-selected=true] b{font-weight:700}.layer-section{padding:15px 0 0}.section-label{display:flex;align-items:center;justify-content:space-between;font-weight:600;font-size:14px}.counter{display:flex;align-items:center;gap:14px}.counter button{height:44px;width:44px;border:1px solid var(--line);background:white;border-radius:50%;font-size:20px;line-height:1}.counter button:hover:enabled{border-color:var(--red);color:var(--red)}.counter output{font-size:16px;font-weight:600;min-width:14px;text-align:center}.helper{color:var(--muted);font-size:11px;margin:14px 0 6px}h3{font-size:14px;margin:21px 0 12px;font-weight:600}.choices{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.choices button{position:relative;border:1px solid var(--line);border-radius:10px;background:#f9f5ee;padding:11px 4px 10px;font-size:12px;display:flex;flex-direction:column;align-items:center;gap:10px;overflow:hidden;min-height:44px}.choices button.selected{border:1.5px solid var(--red);background:#fff9f3}.choices i{display:none;position:absolute;top:5px;right:5px;border-radius:50%;width:15px;height:15px;font-style:normal;background:var(--red);color:white;font-size:10px}.choices .selected i{display:block}.sample{display:block;width:100%;height:45px;background-size:cover;background-position:center;border-radius:4px}.sample.vanilla{background-image:url('./assets/sponge-vanilla.jpg')}.sample.chocolate{background-image:url('./assets/sponge-choc.jpg')}.sample.velvet{background-image:url('./assets/sponge-velvet.jpg')}.segments{display:flex;gap:8px}.segments button{flex:1;background:transparent;border:1px solid var(--line);border-radius:7px;padding:12px 4px;font-size:12px;min-height:44px}.segments button.selected{border-color:var(--red);background:#fff8f2;color:#ac0e1b;font-weight:600}.wrap{display:grid;grid-template-columns:1fr 1fr}.wrap button{padding:13px 7px}.panel-footer{margin-top:25px}.primary{background:var(--red);color:white;border:0;border-radius:40px;width:100%;padding:17px 23px;display:flex;justify-content:space-between;align-items:center;font-size:14px;font-weight:600;min-height:44px}.primary:hover:enabled{background:#aa091a;transform:translateY(-1px)}.primary span{font-size:21px;font-weight:400}.panel-footer p{font-size:10px;letter-spacing:.1em;text-align:center;color:var(--muted);margin:15px 0 0;min-height:15px}.outline-button{width:100%;background:none;border:1px solid var(--line);padding:12px;margin-top:24px;border-radius:7px;font-size:12px;min-height:44px}.outline-button:hover{border-color:var(--red)}.check{display:flex;flex-direction:row-reverse;align-items:center;justify-content:space-between;gap:12px;font-size:13px;margin-top:18px;min-height:48px;padding:0 14px 0 16px;border:1px solid var(--line);border-radius:7px;cursor:pointer;transition:border-color .18s,background .18s,color .18s}.check:hover{border-color:#c9c1b6}.check:has(input:checked){border-color:var(--red);background:#fff8f2;color:#ac0e1b;font-weight:600}.check input{appearance:none;-webkit-appearance:none;flex:none;width:40px;height:24px;margin:0;border-radius:12px;background:#e4ddd3;position:relative;cursor:pointer;transition:background .2s}.check input::before{content:'';position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0003;transition:transform .2s cubic-bezier(.3,.7,.4,1)}.check input:checked{background:var(--red)}.check input:checked::before{transform:translateX(16px)}.check input:focus-visible{outline:3px solid #b11024;outline-offset:3px}section[hidden]{display:none}
@media(min-width:1600px){main{grid-template-columns:minmax(0,1fr) 450px;padding-right:45px}.builder{padding:36px}.intro{left:6%}}
@media(max-width:1100px){main{grid-template-columns:minmax(0,1fr) 350px;padding-right:16px;gap:0}.builder{padding:23px}.intro h1{font-size:58px}.intro .eyebrow{max-width:155px;line-height:1.5}.intro{top:24px}}
@media(max-width:760px){header{height:64px;padding:0 20px}.brand{font-size:30px}.nav-title{font-size:9px;letter-spacing:.19em}header .quiet{font-size:12px}header .quiet span{display:none}main{display:flex;flex-direction:column;padding:0;gap:0}.stage{height:570px;min-height:570px}.intro{left:24px;top:22px}.intro h1{font-size:48px}.intro .eyebrow{font-size:8px;max-width:none}.builder{margin:0 14px 24px;align-self:stretch;border-radius:21px;padding:25px}.panel-heading h2{font-size:41px}.stage-meta{bottom:107px}.stage-meta>span:first-child{font-size:13px}.stage-meta>span:last-child{font-size:11px}.choices button,.segments button{font-size:14px}.sample{height:55px}.steps button{font-size:14px}.helper{font-size:12px}.primary{font-size:16px}.panel-footer p{font-size:11px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
#viewport{inset:100px 0 56px}.stage-meta{bottom:20px}.intro h1{font-size:clamp(44px,6.4vw,92px)}.intro .eyebrow{margin-bottom:8px;letter-spacing:.22em;font-weight:600}@media(max-width:760px){#viewport{inset:82px 0 46px}.intro h1{font-size:38px}.intro .eyebrow{font-size:8px}.stage-meta{bottom:16px}}
@media(max-width:760px){.stage{position:sticky;top:0;z-index:2;height:390px;min-height:390px;border-bottom:1px solid var(--line)}.intro{top:13px;left:20px}.intro h1{font-size:25px}.intro .eyebrow{display:none}#viewport{inset:40px 0 46px}.stage-meta{bottom:14px}.builder{margin-top:14px}}

@media(max-width:760px){.panel-heading .eyebrow{display:none}.panel-heading h2{font-size:30px;margin:0 0 16px}.builder{padding:20px 22px}.layer-section{padding-top:18px}}

@media(max-width:760px){.stage{border-bottom:0!important;box-shadow:0 12px 22px -12px rgba(70,45,20,.22)}}

/* Phones: the whole builder fits one screen, no scrolling. The cake takes whatever height is left
   after the header and the compact menu. dvh tracks the in-app browser's real visible height. */
@media(max-width:760px){
 html,body{height:100%;overflow:hidden}
 body{display:flex;flex-direction:column;height:100svh;height:100dvh}
 header{height:46px;flex:none;padding:0 16px}.brand{font-size:24px}.brand span{top:5px}
 main{flex:1;min-height:0;display:flex;flex-direction:column}
 .stage{position:relative!important;flex:1 1 auto;height:auto!important;min-height:0!important;box-shadow:none!important;border:0!important}
 .intro{top:10px;left:16px}.intro h1{font-size:22px}
 #viewport{inset:34px 0 30px!important}
 .stage-meta{bottom:6px!important;gap:1px}.stage-meta>span:first-child{font-size:12px}.stage-meta>span:last-child{font-size:10px}
 .builder{flex:none;margin:0!important;border-radius:18px 18px 0 0;border-bottom:0;padding:10px 16px calc(12px + env(safe-area-inset-bottom))!important;box-shadow:0 -8px 24px -12px rgba(70,45,20,.18)}
 .panel-heading{display:none}
 .steps{gap:6px}.steps button{flex-direction:row;align-items:baseline;gap:5px;font-size:12px!important;padding:4px 0 8px;white-space:nowrap}.steps b{font-size:12px}
 h3{font-size:13px;margin:10px 0 7px}
 .layer-section{padding-top:10px!important}.helper{margin:6px 0 2px}
 .choices{gap:8px}.choices button{padding:6px 4px;gap:5px;font-size:13px!important}.sample{height:30px!important}
 .segments{gap:6px}.segments button{min-height:40px;padding:8px 4px;font-size:13px!important}.wrap{gap:6px}
 .check{margin-top:8px;min-height:42px}
 .panel-footer{margin-top:10px}.primary{padding:12px 20px;font-size:15px!important;min-height:46px}
 .panel-footer p{display:none}
}
/* Phones, step 03: sugar and size share a row, and the panel keeps one height on every step so the
   cake never resizes between steps. */
@media(max-width:760px){
 #topping:not([hidden]){display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);column-gap:8px;align-items:end}
 #topping>h3:first-child,#topping>.segments.wrap{grid-column:1/-1}
 #topping>h3:nth-of-type(2){display:none}
 #topping .check{margin-top:8px;min-height:40px;padding:0 8px 0 12px;font-size:12px;white-space:nowrap}
 #topping .check input{width:34px;height:20px}#topping .check input::before{width:14px;height:14px}#topping .check input:checked::before{transform:translateX(14px)}
 #topping>.segments[data-choice=size]{margin-top:8px}#topping>.segments[data-choice=size] button{min-height:40px;padding:6px 2px;font-size:12px!important}
 .wrap button{min-height:38px!important;padding:6px 4px!important}
 .builder{min-height:288px;display:flex;flex-direction:column}.panel-footer{margin-top:auto;padding-top:10px}
}
