/* Cupcake designer: reuses the bento designer's layout (bento-designer.css) with a flat box preview. */
.cd-stage{display:flex;flex-direction:column}
.cd-box{padding:18px;display:grid;place-items:center;background:radial-gradient(circle at 50% 40%,#fff 0,#f6eefb 75%)}
.cd-box svg{width:100%;height:auto;max-height:calc(100vh - 220px);filter:drop-shadow(0 10px 18px rgba(70,40,90,.12))}
.cd-page .bd-hint{padding-top:10px}
.cd-page .bd-price span::after{content:none}
.cd-page .bd-price{cursor:default}
.cd-page .bd-price:hover{background:none}
.cd-page .bd-step.is-done b{background:#e6f4ea;color:#2c7a43}

.cd-presets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.cd-preset{border:1.5px solid var(--bd-line);background:#fff;border-radius:14px;padding:8px 6px 10px;cursor:pointer;display:grid;justify-items:center;gap:2px;font:inherit;color:inherit;min-height:44px}
.cd-preset:hover{border-color:#cdb5e2}
.cd-preset strong{font-size:.78rem;color:var(--bd-plum);text-align:center;line-height:1.2}
.cd-preset small{font-size:.7rem;color:var(--bd-muted)}
.cd-preset-pic,.cd-style-pic{display:block;width:56px;height:56px}
.cd-preset-pic svg,.cd-style-pic svg{width:100%;height:100%}
.cd-styles .bd-card{grid-template-columns:48px 1fr;grid-template-rows:auto auto;column-gap:10px;align-items:center}
.cd-styles .cd-style-pic{grid-row:1/3;width:48px;height:48px}
.cd-styles .bd-card small{font-size:.76rem;color:var(--bd-muted)}
.cd-patterns{grid-template-columns:repeat(3,minmax(0,1fr))}
.bd-card small{font-size:.78rem;color:var(--bd-muted)}

.cd-need b{color:var(--bd-plum)}
.cd-chosen{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px}
.cd-chip{display:inline-flex;align-items:center;gap:6px;background:var(--bd-soft);border-radius:999px;padding:4px 10px 4px 4px;font-size:.78rem;color:var(--bd-ink)}
.cd-chip i{width:18px;height:18px;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}
.cd-tip{font-size:.8rem;background:#fff7e6;border:1px solid #f1dcae;color:#6d5320;border-radius:10px;padding:8px 10px;margin:0 0 10px}
.bd-swatch-group{font:600 .74rem 'DM Sans',sans-serif;color:var(--bd-muted);margin:10px 0 6px;text-transform:uppercase;letter-spacing:.05em}
.bd-swatch.is-on{box-shadow:0 0 0 3px var(--bd-purple)}
.cd-num{position:absolute;inset:auto -4px -4px auto;min-width:20px;height:20px;border-radius:999px;background:var(--bd-purple);color:#fff;font:700 .7rem/20px 'DM Sans',sans-serif;font-style:normal;text-align:center;padding:0 4px;box-shadow:0 0 0 2px #fff}

.cd-themes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.cd-theme{border:1.5px solid var(--bd-line);background:#fff;border-radius:14px;padding:10px 4px;cursor:pointer;display:grid;justify-items:center;gap:2px;font:inherit;color:inherit;min-height:44px}
.cd-theme span{font-size:1.5rem;line-height:1}
.cd-theme strong{font-size:.78rem;color:var(--bd-plum);text-align:center}
.cd-theme small{font-size:.7rem;color:var(--bd-muted)}
.cd-theme[aria-checked="true"],.cd-preset:focus-visible{border-color:var(--bd-purple);background:#faf5fe;box-shadow:0 0 0 3px rgba(125,82,168,.12)}
.cd-qty-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0 8px}

/* Custom chooser: bento cake or cupcakes */
.cd-chooser{margin:auto;inset:0;max-height:calc(100dvh - 32px);overflow:auto;border:0;border-radius:20px;padding:20px;max-width:520px;width:calc(100% - 32px);color:#3a2840;font-family:'DM Sans',sans-serif;box-shadow:0 24px 60px rgba(50,20,70,.25)}
.cd-chooser::backdrop{background:rgba(40,20,55,.45)}
.cd-chooser-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.cd-chooser-head h2{margin:0;font:700 1.2rem 'DM Sans',sans-serif;color:#4f3163}
.cd-chooser-head .bd-tool{font-size:1.3rem;border:1px solid #ebe2f0;background:#fff;border-radius:10px;min-width:44px;min-height:44px;cursor:pointer;color:#4f3163}
.cd-chooser-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.cd-chooser-grid button{border:1.5px solid #ebe2f0;background:#fdf8f2;border-radius:16px;padding:16px 12px;cursor:pointer;display:grid;justify-items:center;gap:4px;text-align:center;font:inherit;color:inherit}
.cd-chooser-grid button:hover,.cd-chooser-grid button:focus-visible{border-color:#7d52a8;background:#faf5fe;outline:none;box-shadow:0 0 0 3px rgba(125,82,168,.15)}
.cd-chooser-grid span{font-size:2.2rem;line-height:1}
.cd-chooser-grid strong{font-size:1rem;color:#4f3163}
.cd-chooser-grid small{font-size:.8rem;color:#78658a}

@media (max-width:900px){
  body[data-customer-page="cupcake"] .customer-mobile-nav{display:none}
  body[data-customer-page="cupcake"] #customer-chat-toggle{display:none!important}
  .cd-box{padding:10px;height:min(34vh,300px)}
  .cd-box svg{max-height:100%;width:auto;max-width:100%}
  .cd-presets,.cd-themes{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media (max-width:480px){
  .cd-presets{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cd-patterns{grid-template-columns:1fr}
  .cd-styles{grid-template-columns:1fr}
  .cd-chooser-grid{grid-template-columns:1fr}
}

/* Realistic 3D box (cupcake-scene.js); the flat picture is the fallback without WebGL. */
.cd-canvas{aspect-ratio:4/3;background:radial-gradient(circle at 50% 38%,#fff 0,#f4ecf9 72%)}
.cd-page [data-cd-box][hidden],.cd-page [data-cd-bar][hidden],.cd-page [data-cd-3d][hidden]{display:none!important}
@media (max-width:900px){.cd-canvas{aspect-ratio:auto;height:min(38vh,320px)}}
.cd-page .bd-input{display:block;width:100%;box-sizing:border-box;min-height:44px;border:1.5px solid #dccde8;border-radius:12px;padding:10px 12px;font:500 .95rem "DM Sans",sans-serif;color:var(--bd-ink);background:#fff}
.cd-page .bd-input:focus{outline:none;border-color:var(--bd-purple);box-shadow:0 0 0 3px rgba(125,82,168,.15)}
@media (max-width:900px){.cd-stage .bd-stage-bar{flex-wrap:nowrap;gap:4px;padding:6px 8px}.cd-stage .bd-seg button{padding:6px 9px;min-height:36px;font-size:.75rem}}
@media (max-width:360px){.cd-stage .bd-seg button{padding:6px 6px;font-size:.7rem}}
.cd-h1-short{display:none}
@media (max-width:420px){.cd-page .cd-h1-long{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.cd-page .cd-h1-short{display:inline}.cd-page .bd-head h1{min-width:0;overflow:hidden;text-overflow:ellipsis}}

/* Packing (after Add to cart): only the box and the finish panel show. */
#page-cupcake.is-packing .bd-steps,#page-cupcake.is-packing .bd-foot,#page-cupcake.is-packing .bd-tools,#page-cupcake.is-packing [data-cd-bar]{display:none!important}
#page-cupcake.is-packing .bd-panel{padding-bottom:0}

/* Mini donut designer (shares the cupcake designer's look). */
.dd-steps{grid-template-columns:repeat(5,1fr)}
.dd-flavors{grid-template-columns:repeat(2,minmax(0,1fr))}
.dd-flavors .bd-card{grid-template-columns:28px 1fr;column-gap:10px;align-items:center}
.dd-dough{grid-row:1/3;width:28px;height:28px;border-radius:50%;box-shadow:inset 0 0 0 5px rgba(255,255,255,.35),0 0 0 1px rgba(0,0,0,.08)}
.dd-letters{display:flex;flex-wrap:wrap;gap:6px}
.dd-letters span{min-width:38px;padding:6px 10px;border-radius:999px;background:var(--bd-soft);color:var(--bd-plum);font:800 .95rem 'Baloo 2','DM Sans',sans-serif;text-align:center}
.cd-chooser-grid:has(> :nth-child(3)){grid-template-columns:repeat(3,1fr)}
.cd-page.is-packing .bd-steps,.cd-page.is-packing .bd-foot,.cd-page.is-packing .bd-tools,.cd-page.is-packing .bd-stage-bar{display:none!important}
@media (max-width:900px){
  body[data-customer-page="donut"] .customer-mobile-nav{display:none}
  body[data-customer-page="donut"] #customer-chat-toggle{display:none!important}
  .dd-steps .bd-step{font-size:.72rem}
}
@media (max-width:560px){.cd-chooser-grid:has(> :nth-child(3)){grid-template-columns:1fr}}
.cd-page [data-dd-box][hidden],.cd-page [data-dd-bar][hidden],.cd-page [data-dd-3d][hidden]{display:none!important}
.cd-chooser-grid:has(> :nth-child(4)){grid-template-columns:repeat(2,1fr)}
@media (max-width:900px){body[data-customer-page="cakepop"] .customer-mobile-nav{display:none}body[data-customer-page="cakepop"] #customer-chat-toggle{display:none!important}}

/* Fondant letters per cupcake / per mini donut (shared/letter-pieces.js) — "pcl" = piece letters (".lp" is the landing page) */
.pcl{display:grid;gap:10px;margin-top:12px}
.pcl-hint{margin:0;color:var(--bd-muted,#6d6278);font-size:.82rem;line-height:1.45}
.pcl-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(52px,1fr));gap:6px;max-height:208px;overflow:auto;padding:2px}
.pcl-chip{display:grid;place-items:center;gap:0;min-height:48px;padding:4px 2px;border:1.5px solid #e2d8ee;border-radius:12px;background:#fff;color:#4b3a6b;cursor:pointer;font:inherit;line-height:1.1}
.pcl-chip small{font-size:.62rem;color:#9a8db0}
.pcl-chip b{font-size:.78rem;font-weight:800;letter-spacing:.02em;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.pcl-chip:not(.has-text) b{color:#c2b5d8;font-weight:600}
.pcl-chip.has-text{background:#f6f1fd;border-color:#cdb9ef}
.pcl-chip.is-active{border-color:#6d4bc3;box-shadow:0 0 0 2px #e6dcfa;background:#fff}
.pcl-chip:focus-visible{outline:2px solid #6d4bc3;outline-offset:2px}
.pcl-editor{display:grid;gap:6px;padding:10px;border:1px solid #e9e1f4;border-radius:14px;background:#fbf9fe}
.pcl-label{font-size:.82rem;font-weight:700;color:#3a2160}
.pcl-row{display:flex;gap:6px;align-items:center}
.pcl-row .bd-input{flex:1;min-width:0;margin:0}
.pcl-input{text-transform:uppercase;font-weight:800;letter-spacing:.12em;text-align:center;font-size:1.05rem}
.pcl-step{flex:none;width:42px;height:44px;border:1.5px solid #e2d8ee;border-radius:12px;background:#fff;color:#5a3a99;font-size:1.3rem;cursor:pointer}
.pcl-step:disabled{opacity:.35;cursor:default}
.pcl-meta{display:flex;flex-wrap:wrap;gap:4px 12px;align-items:center;color:var(--bd-muted,#6d6278);font-size:.76rem}
.pcl-clear{margin-left:auto;border:0;background:none;color:#a3324b;font:600 .76rem inherit;cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.pcl-fill>summary{cursor:pointer;color:#5a3a99;font-weight:700;font-size:.82rem}
.pcl-fill[open]>*:not(summary){margin-top:8px}
.pcl-note{margin:4px 0 0;color:var(--bd-muted,#6d6278);font-size:.74rem}
.pcl-error{margin:0;padding:8px 10px;border-radius:9px;background:#fdf0f2;color:#a73345;font-size:.8rem}
.pcl-error[hidden]{display:none}
