/* Custom cake studio: warm bakery neutrals with a brighter frosting palette. */
.cake-studio {
  --cake-paper: #fbf7f1;
  --cake-card: #fffdf9;
  --cake-ink: #2e2430;
  --cake-muted: #71646c;
  --cake-line: #e7dcd6;
  --cake-plum: #773a56;
  --cake-plum-dark: #572841;
  --cake-peach: #e8a16f;
  --cake-green: #2d6b52;
  max-width: 1320px;
  margin: 0 auto;
  color: var(--cake-ink);
}
.cake-studio h1,
.cake-studio h2,
.cake-studio h3,
.cake-studio p { margin: 0; }
.cake-studio h1,
.cake-studio h2 { letter-spacing: -.04em; }
.cake-studio h1 { font-size: clamp(2rem, 5vw, 3.45rem); line-height: .98; }
.cake-studio h2 { font-size: clamp(1.35rem, 2.4vw, 1.95rem); }
.cake-studio p { line-height: 1.55; }
.cake-studio-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.65rem;
}
.cake-studio-header > div:first-child { display: grid; gap: .55rem; }
.cake-studio-header > div:first-child > p:last-child { color: var(--cake-muted); max-width: 62ch; }
.cake-header-actions { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; justify-content: end; }
.cake-draft-note { color: var(--cake-muted); font-size: .75rem; }
.cake-studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, .78fr); gap: 1.15rem; align-items: start; }
.cake-builder-column { min-width: 0; }
.cake-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--cake-line);
  background: var(--cake-card);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: .55rem;
  margin-bottom: 1rem;
}
.cake-step {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  border: 0;
  border-radius: 10px;
  padding: .62rem .55rem;
  background: transparent;
  color: var(--cake-muted);
  text-align: left;
}
.cake-step:hover { background: #f8efec; color: var(--cake-plum-dark); }
.cake-step.is-active { color: var(--cake-plum-dark); background: #f1e4e9; }
.cake-step-number {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid #d7c5ca;
  background: #fff;
  color: var(--cake-plum);
  font-size: .75rem;
  font-weight: 800;
}
.cake-step.is-active .cake-step-number { background: var(--cake-plum); border-color: var(--cake-plum); color: #fff; }
.cake-step > span:last-child { display: grid; gap: .08rem; min-width: 0; }
.cake-step strong { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cake-step small { font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cake-builder-form { min-width: 0; }
.cake-panel,
.cake-preview-card {
  border: 1px solid var(--cake-line);
  border-radius: 16px;
  background: var(--cake-card);
  box-shadow: var(--shadow);
}
.cake-panel { padding: clamp(1rem, 2.4vw, 1.55rem); }
.cake-panel-heading,
.cake-preview-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.cake-panel-heading > div { display: grid; gap: .42rem; }
.cake-panel-heading > div > p:last-child { color: var(--cake-muted); font-size: .9rem; }
.cake-panel-count { color: var(--cake-muted); font-size: .78rem; font-weight: 750; padding-top: .2rem; }
.cake-panel fieldset { margin: 0 0 1rem; border-color: var(--cake-line); padding: .9rem; }
.cake-panel legend { color: var(--cake-plum-dark); font-size: .87rem; font-weight: 750; }
.cake-choice-grid { display: grid; gap: .6rem; }
.cake-choice-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cake-choice-grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cake-choice-grid--five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cake-choice-grid--sizes { grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); }
.cake-choice {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}
.cake-choice-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.cake-choice-body {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 53px;
  padding: .62rem .68rem;
  border: 1px solid var(--cake-line);
  border-radius: 10px;
  background: #fffefa;
  transition: border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease;
}
.cake-choice:hover .cake-choice-body { border-color: #cfaab9; transform: translateY(-1px); }
.cake-choice:has(input:checked) .cake-choice-body { border-color: var(--cake-plum); background: #f8edf1; box-shadow: 0 0 0 2px #773a5622; }
.cake-choice:has(input:focus-visible) .cake-choice-body { outline: 3px solid #b15b75; outline-offset: 2px; }
.cake-choice-icon { display: grid; place-items: center; min-width: 1.55rem; color: var(--cake-plum); font-size: 1.25rem; line-height: 1; }
.cake-choice-copy { display: grid; gap: .05rem; min-width: 0; }
.cake-choice-copy strong { font-size: .8rem; line-height: 1.2; }
.cake-choice-copy small { color: var(--cake-muted); font-size: .69rem; line-height: 1.2; }
.cake-help,
.cake-field-hint { color: var(--cake-muted); font-size: .75rem; }
.cake-help { margin-top: .75rem; }
.cake-serving-field { display: grid; grid-template-columns: auto minmax(150px, 230px); align-items: center; gap: .6rem; margin-top: .75rem; font-size: .8rem; font-weight: 700; }
.cake-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; margin-bottom: 1rem; }
.cake-form-grid label,
.cake-upload-field > label { display: grid; gap: .38rem; color: var(--cake-ink); font-size: .82rem; font-weight: 700; }
.cake-form-grid select,
.cake-form-grid input,
.cake-panel textarea,
.cake-upload-field input[type=file] { width: 100%; }
.cake-form-grid--finish { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.cake-form-grid--finish label { align-content: start; }
.cake-panel textarea { min-height: 100px; resize: vertical; }
.cake-panel label > input,
.cake-panel label > select,
.cake-panel label > textarea { margin-top: .04rem; }
.cake-color-grid { display: flex; flex-wrap: wrap; gap: .7rem; }
.cake-color-choice { position: relative; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; cursor: pointer; }
.cake-color-choice:has(input:focus-visible) { outline: 3px solid #b15b75; outline-offset: 3px; border-radius: 50%; }
.cake-color-dot { display: block; width: 1.75rem; height: 1.75rem; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #d7c9c5, 0 2px 5px #321a2618; transition: transform .16s ease; }
.cake-color-choice:hover .cake-color-dot { transform: scale(1.09); }
.cake-color-choice:has(input:checked) .cake-color-dot { box-shadow: 0 0 0 2px var(--cake-plum), 0 0 0 4px #fff, 0 0 0 5px var(--cake-plum); }
.cake-color-choice--cream .cake-color-dot { background: #fff1d5; }
.cake-color-choice--pink .cake-color-dot { background: #f38a9f; }
.cake-color-choice--sky .cake-color-dot { background: #80c9df; }
.cake-color-choice--mint .cake-color-dot { background: #8dd4bb; }
.cake-color-choice--lavender .cake-color-dot { background: #b6a0e2; }
.cake-color-choice--chocolate .cake-color-dot { background: #754536; }
.cake-accent-choice--berry .cake-color-dot { background: #a43d61; }
.cake-accent-choice--rose .cake-color-dot { background: #e26d8a; }
.cake-accent-choice--blue .cake-color-dot { background: #3f75a3; }
.cake-accent-choice--gold .cake-color-dot { background: #d69b3d; }
.cake-accent-choice--sage .cake-color-dot { background: #4c866b; }
.cake-accent-choice--plum .cake-color-dot { background: #713b55; }
.cake-flavor-note { display: flex; align-items: center; gap: .6rem; margin: .35rem 0 1.25rem; padding: .75rem .85rem; border-radius: 10px; background: #fff6e8; color: #76502b; font-size: .78rem; }
.cake-flavor-icon { color: #d78848; font-size: 1rem; }
.cake-upload-field { display: grid; gap: .4rem; align-content: start; min-width: 0; }
.cake-upload-field input[type=file] { font-size: .8rem; }
.cake-upload-field input[type=file]::file-selector-button { border: 0; border-radius: 7px; background: #f2e4e9; color: var(--cake-plum-dark); padding: .42rem .62rem; margin-right: .5rem; font: inherit; font-weight: 700; cursor: pointer; }
.cake-image-options { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .35rem; padding: .7rem; border: 1px solid var(--cake-line); border-radius: 10px; background: #fffaf6; }
.cake-image-options label { display: grid; gap: .3rem; font-size: .74rem; font-weight: 700; }
.cake-reference-preview { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: .55rem; padding: .55rem; border: 1px solid var(--cake-line); border-radius: 9px; background: #fffaf6; }
.cake-reference-preview img { width: 48px; height: 48px; object-fit: cover; border-radius: 7px; background: #eadcd1; }
.cake-reference-preview span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cake-muted); font-size: .72rem; }
.cake-quote-notice { display: grid; gap: .25rem; margin: 1rem 0; padding: .85rem .95rem; border-left: 3px solid var(--cake-peach); border-radius: 0 9px 9px 0; background: #fff6ea; color: #6c4b32; font-size: .78rem; }
.cake-quote-notice strong { color: var(--cake-plum-dark); font-size: .83rem; }
.cake-status { min-height: 1.4em; color: var(--cake-green); font-size: .82rem; }
.cake-panel-actions { display: flex; justify-content: space-between; align-items: center; gap: .7rem; padding-top: .25rem; }
.cake-preview-card { position: sticky; top: 84px; padding: clamp(1rem, 2.4vw, 1.45rem); min-width: 0; overflow: hidden; }
.cake-preview-heading { align-items: center; margin-bottom: .75rem; }
.cake-preview-heading > div { display: grid; gap: .38rem; }
.cake-preview-badge { padding: .24rem .55rem; border-radius: 99px; background: #f5e7d5; color: #7d542d; font-size: .68rem; font-weight: 750; }
.cake-visual-wrap { display: grid; gap: .55rem; }
.cake-visual { position: relative; min-height: 340px; overflow: hidden; border-radius: 14px; background: linear-gradient(145deg, #42273c, #2d1e2d 68%, #1f1925); }
.cake-visual canvas { display: block; width: 100%; min-height: 270px; height: auto; }
.cake-visual::before { content: ''; position: absolute; inset: auto -22% -42% -22%; height: 82%; border-radius: 50%; background: radial-gradient(ellipse, #d98b633c, transparent 67%); }
.cake-scene { position: relative; display: grid; place-items: center; min-height: 340px; padding: 2rem 1rem 3.2rem; }
.cake-sparkles { position: absolute; top: 2.2rem; right: 13%; color: #ffd8a7; font-size: .82rem; letter-spacing: .2em; opacity: .85; }
.cake-stack { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: end; width: min(100%, 340px); min-height: 210px; padding-bottom: 1.9rem; }
.cake-tier { position: relative; flex: 0 0 auto; border: 1px solid #6d3d4a; border-bottom: 0; background: linear-gradient(120deg, #ffe1c6, #f4b488); box-shadow: inset 0 7px 0 #fff8e58c, inset 0 -11px 14px #7b33451c, 0 8px 18px #150d1638; }
.cake-tier[hidden] { display: none; }
.cake-tier--bottom { width: min(86%, 300px); height: 83px; border-radius: 18px 18px 13px 13px; }
.cake-tier--middle { width: min(70%, 248px); height: 65px; border-radius: 16px 16px 11px 11px; margin-bottom: -7px; }
.cake-tier--top { width: min(52%, 188px); height: 53px; border-radius: 15px 15px 10px 10px; margin-bottom: -6px; }
.cake-icing { position: absolute; inset: -5px 0 auto; height: 18px; border-radius: 50%; background: #fff3d9; box-shadow: 0 2px 0 #d98a7250; }
.cake-border { position: absolute; z-index: 2; inset: auto 8px 7px; height: 8px; border-radius: 99px; background: #fff3d9; box-shadow: 0 2px 4px #6e2f4220; }
.cake-border-scallop .cake-border { background: radial-gradient(circle at 6px 2px, #fff6df 0 6px, transparent 6.5px) 0 0 / 14px 10px repeat-x; height: 10px; bottom: 4px; }
.cake-border-rosettes .cake-border { background: radial-gradient(circle, #fff4df 0 5px, #e99f96 5.5px 7px, transparent 7.5px) 0 0 / 16px 10px repeat-x; height: 11px; bottom: 4px; }
.cake-border-none .cake-border { display: none; }
.cake-tone-cream .cake-tier { background: linear-gradient(120deg, #fff0d8, #efb68a); }
.cake-tone-pink .cake-tier { background: linear-gradient(120deg, #ffb8bd, #ec7188); }
.cake-tone-sky .cake-tier { background: linear-gradient(120deg, #a9e5ee, #6ebacf); }
.cake-tone-mint .cake-tier { background: linear-gradient(120deg, #b0ead1, #6fc2aa); }
.cake-tone-lavender .cake-tier { background: linear-gradient(120deg, #d6c9f2, #a28bd4); }
.cake-tone-chocolate .cake-tier { background: linear-gradient(120deg, #9b6147, #68382e); }
.cake-tone-chocolate .cake-icing,
.cake-tone-chocolate .cake-border { background: #f0d4a8; }
.cake-shape-sheet .cake-tier { border-radius: 10px 10px 7px 7px; }
.cake-shape-heart .cake-tier { border-radius: 50% 50% 12px 12px; clip-path: polygon(50% 100%, 0 34%, 0 18%, 13% 5%, 28% 3%, 50% 23%, 72% 3%, 87% 5%, 100% 18%, 100% 34%); }
.cake-shape-heart .cake-stack { padding-bottom: 1.45rem; }
.cake-plate { position: absolute; z-index: 0; bottom: 2.35rem; width: min(92%, 350px); height: 23px; border-radius: 50%; background: linear-gradient(#eee6ed, #a991a5); box-shadow: 0 10px 13px #160d1a66; }
.cake-topper-visual { position: relative; z-index: 3; min-height: 2.1rem; color: #ffd3a4; font-size: 2.25rem; line-height: 1; text-shadow: 0 3px 10px #1008118c; }
.cake-inscription-visual { position: absolute; z-index: 4; bottom: 4.3rem; max-width: 70%; overflow: hidden; color: #7d354e; font-family: Georgia, serif; font-size: .8rem; font-weight: 700; text-align: center; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 0 #fff8; }
.cake-preview-alt { color: var(--cake-muted); font-size: .74rem; line-height: 1.4; }
.cake-summary { margin-top: 1rem; padding-top: .95rem; border-top: 1px solid var(--cake-line); }
.cake-summary-heading { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .45rem; }
.cake-summary-heading strong { font-size: .84rem; }
.cake-summary-heading span { color: #8a5b37; font-size: .69rem; font-weight: 750; }
.cake-summary dl { display: grid; gap: .05rem; margin: 0; }
.cake-summary dl > div { display: flex; justify-content: space-between; gap: .8rem; padding: .3rem 0; border-bottom: 1px solid #f0e8e2; }
.cake-summary dt { color: var(--cake-muted); font-size: .72rem; }
.cake-summary dd { margin: 0; color: var(--cake-ink); font-size: .72rem; font-weight: 700; text-align: right; }
.cake-summary-note { color: var(--cake-muted); font-size: .7rem; margin-top: .55rem !important; }
.cake-preview-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin-top: 1rem; }
.cake-preview-actions .btn { min-height: 39px; font-size: .76rem; }
.cake-mobile-summary { display: none; }

@media (max-width: 960px) {
  .cake-studio-grid { grid-template-columns: 1fr; }
  .cake-preview-card { position: static; }
  .cake-preview-card { order: -1; }
  .cake-preview-card .cake-visual { min-height: 270px; }
  .cake-preview-card .cake-scene { min-height: 270px; }
  .cake-preview-card .cake-stack { min-height: 175px; }
}
@media (max-width: 680px) {
  .cake-studio-header { align-items: start; flex-direction: column; }
  .cake-header-actions { justify-content: start; }
  .cake-progress { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: thin; }
  .cake-step { min-width: 9rem; }
  .cake-choice-grid--four,
  .cake-choice-grid--five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cake-form-grid,
  .cake-form-grid--finish { grid-template-columns: 1fr; }
  .cake-preview-card { margin-bottom: .8rem; }
  .cake-mobile-summary { position: sticky; bottom: .75rem; z-index: 4; display: flex; align-items: center; gap: .6rem; margin-top: .85rem; padding: .65rem .75rem; border: 1px solid var(--cake-line); border-radius: 12px; background: #fffdf9f5; box-shadow: 0 8px 24px #2b1b2d24; backdrop-filter: blur(8px); }
  .cake-mobile-summary-icon { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; flex: 0 0 auto; border-radius: 50%; background: var(--cake-plum); color: #ffd5a9; }
  .cake-mobile-summary > span:nth-child(2) { display: grid; gap: .08rem; min-width: 0; }
  .cake-mobile-summary strong { font-size: .76rem; }
  .cake-mobile-summary small { color: var(--cake-muted); font-size: .69rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cake-mobile-summary .btn { margin-left: auto; flex: 0 0 auto; }
}
@media (max-width: 430px) {
  .cake-panel { padding: .9rem; }
  .cake-choice-grid--three { grid-template-columns: 1fr; }
  .cake-choice-body { min-height: 48px; }
  .cake-preview-actions { grid-template-columns: 1fr; }
  .cake-reference-preview { grid-template-columns: 42px minmax(0, 1fr); }
  .cake-reference-preview img { width: 42px; height: 42px; }
  .cake-reference-preview .btn { grid-column: 2; justify-self: start; }
}

.cake-panel .cake-choice {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.cake-choice-body {
  width: 100%;
  min-width: 0;
}
.cake-choice-icon {
  min-width: 1rem;
  font-size: 1rem;
}
.cake-step-number {
  width: 1.45rem;
  height: 1.45rem;
}
