.mbph-studio {
  --mbph-thread-color: #f6f1e8;
  color: var(--ink, var(--brand-ink, #29221E));
  font-family: var(--font-ui, system-ui, sans-serif);
  scroll-margin-top: 140px;
}
.mbph-studio *, .mbph-studio *::before, .mbph-studio *::after { box-sizing: border-box; }
.mbph-studio [hidden] { display: none !important; }
.mbph-studio button, .mbph-studio input, .mbph-studio select { font: inherit; }
.mbph-studio button { cursor: pointer; }
.mbph-studio button:disabled { cursor: wait; opacity: .55; }
.mbph-studio :where(a, button, input, select):focus-visible { outline: 3px solid var(--pine, var(--brand-action, #A34E32)); outline-offset: 4px; }
.mbph-studio svg { display: block; flex: 0 0 24px; width: 24px; height: 24px; }
.mbph-studio__intro { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 12px; }
.mbph-breadcrumb { display: none; gap: 8px; margin-bottom: 10px; font-size: 14px; }
.mbph-breadcrumb a:hover { text-decoration: underline; }
.mbph-studio__intro h1, .mbph-studio__intro h2 { margin: 0; font-size: clamp(24px, 2vw, 30px); font-weight: 700; line-height: 1.12; letter-spacing: -.045em; }
.mbph-studio__intro p { margin: 4px 0 0; font-size: 15px; line-height: 1.35; }
.mbph-steps { display: flex; flex: 0 0 320px; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 0; list-style: none; }
.mbph-steps li { position: relative; flex: 1; }
.mbph-steps li:not(:last-child)::after { display: none; content: ''; position: absolute; top: 22px; left: calc(50% + 34px); right: calc(-50% + 18px); height: 1px; background: var(--brand-line, #D8CDC2); }
.mbph-steps button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; padding: 0; border: 0; color: var(--muted, var(--brand-muted, #6B6058)); background: transparent; font-size: 16px; }
.mbph-step-number { position: relative; display: grid; flex: 0 0 28px; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--ink, var(--brand-ink, #29221E)); background: var(--line, var(--brand-line, #D8CDC2)); font-size: 14px; }
.mbph-steps button[aria-current="step"] { color: var(--ruby, var(--brand-action, #A34E32)); font-weight: 600; }
.mbph-steps button[aria-current="step"] .mbph-step-number { color: #fff; background: var(--ruby, var(--brand-action, #A34E32)); }
.mbph-steps .is-complete .mbph-step-number { color: transparent; background: var(--brand-success, #43583D); }
.mbph-steps .is-complete .mbph-step-number::after { content: ''; position: absolute; width: 15px; height: 8px; border-bottom: 2px solid #fff; border-left: 2px solid #fff; transform: translateY(-2px) rotate(-45deg); }
.mbph-steps .is-complete button { color: var(--ink, var(--brand-ink, #29221E)); }
.mbph-studio__status { margin: 0; font-size: 16px; }
.mbph-studio__status:not(:empty) { margin: 12px 0 20px; padding: 14px 16px; border-left: 3px solid var(--ruby, var(--brand-action, #A34E32)); background: var(--brand-soft, #EEE5DB); }
.mbph-form { margin: 0; }
.mbph-workspace { display: grid; grid-template-columns: minmax(0, 1.46fr) minmax(0, 1fr); gap: clamp(28px, 3vw, 48px); align-items: start; }
.mbph-preview-column, .mbph-editor { min-width: 0; }
.mbph-stage { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) auto auto auto auto; overflow: hidden; border-radius: 7px; background: transparent; }
.mbph-stage__label { position: absolute; top: 20px; left: 24px; z-index: 2; font-size: 16px; }
.mbph-stage__viewport { position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; width: 100%; aspect-ratio: 1.12; overflow: hidden; }
.mbph-stage__product { position: relative; width: 100%; aspect-ratio: 1.12; transform-origin: 50% 74%; transition: transform 180ms ease; }
.mbph-stage__photo { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.mbph-print-area { position: absolute; }
.mbph-stage__product.is-template { mix-blend-mode: multiply; }
.is-template .mbph-stage__photo { mix-blend-mode: normal; }
.is-template-front .mbph-stage__photo { position: relative; z-index: 1; pointer-events: none; }
.is-template-front .mbph-print-area { z-index: 0; }
.mbph-studio[data-step="2"] .mbph-print-area { outline: 1px dashed var(--pine, var(--brand-action, #A34E32)); outline-offset: 2px; background: var(--brand-area-tint, #DBE3D433); }
.mbph-print-area__label { position: absolute; bottom: calc(100% + 6px); left: 0; padding: 2px 6px; border-radius: 3px; background: var(--paper, var(--brand-paper, #FBF7F2)); color: var(--pine, var(--brand-action, #A34E32)); font-size: 14px; white-space: nowrap; pointer-events: none; }
.mbph-studio:not([data-step="2"]) .mbph-print-area__label { display: none; }
.mbph-stage__art { position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 100%; height: 100%; color: var(--mbph-thread-color); font-size: clamp(18px, 2.2vw, 34px); font-weight: 800; line-height: 1.05; text-align: center; text-shadow: 0 1px 1px #0005; }
.mbph-stage__art--graphic { z-index: 1; }
.mbph-stage__art--text { z-index: 2; }
.mbph-studio[data-step="2"] .mbph-stage__art { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; outline: 1px dashed var(--brand-area-line, #43583D80); }
.mbph-studio[data-step="2"] .mbph-stage__art.is-selected { outline: 2px solid var(--ruby, var(--brand-action, #A34E32)); }
.mbph-stage__art.is-dragging { cursor: grabbing; }
.mbph-stage__art:focus-visible { outline: 3px solid var(--ruby, var(--brand-action, #A34E32)); outline-offset: 3px; }
.mbph-stage__art > * { pointer-events: none; }
.mbph-text-tools { position: absolute; top: 8px; left: 8px; z-index: 4; display: flex; align-items: flex-end; gap: 10px; width: 360px; max-width: calc(100% - 16px); padding: 10px; border: 1px solid var(--line, var(--brand-line, #D8CDC2)); border-radius: 8px; background: #fff; box-shadow: 0 6px 24px var(--brand-shadow-color, #29221E24); }
.mbph-text-tools > label { display: grid; flex: 1 1 0; gap: 4px; min-width: 0; margin: 0; }
.mbph-text-tools > label > span:first-child { color: var(--muted, var(--brand-muted, #6B6058)); font-size: 12px; font-weight: 600; line-height: 1.3; }
.mbph-studio .mbph-text-tools select, .mbph-studio .mbph-text-tools input { width: 100%; min-width: 0; min-height: 44px; height: 44px; margin: 0; padding: 8px; border: 1px solid var(--brand-line, #D8CDC2); border-radius: 4px; color: var(--ink, var(--brand-ink, #29221E)); background: #fff; font-size: 16px; line-height: 1.2; }
.mbph-text-tools > .mbph-text-tools__size { flex: 0 0 100px; }
.mbph-text-tools__number { display: flex; align-items: center; gap: 4px; font-size: 14px; }
.mbph-studio .mbph-text-tools input { font-variant-numeric: tabular-nums; }
.mbph-text-tools > button { flex: 0 0 32px; min-height: 44px; padding: 0; border: 0; border-radius: 4px; color: var(--muted, var(--brand-muted, #6B6058)); background: transparent; font-size: 26px; line-height: 1; }
.mbph-text-tools > button:hover { background: var(--line, var(--brand-line, #D8CDC2)); }
.mbph-placement__range { display: block; margin: 0 0 10px; }
.mbph-placement__range > span { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; }
.mbph-placement__range output { color: var(--muted, var(--brand-muted, #6B6058)); font-size: 14px; }
.mbph-placement__range input { display: block; width: 100%; min-height: 44px; margin: 0; padding: 0; accent-color: var(--ruby, var(--brand-action, #A34E32)); }
.mbph-placement__actions { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.mbph-placement legend > button { min-height: 44px; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; font-weight: 600; text-align: left; }
.mbph-placement.is-selected legend > button { color: var(--ruby, var(--brand-action, #A34E32)); }
.mbph-stage__art > span { max-width: 100%; overflow-wrap: anywhere; }
.mbph-stage__art > img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1px 1px #0004); }
.mbph-stitch-preview { position: absolute; inset: 0; width: 100%; height: 100%; }
.mbph-stage__art.has-stitch-preview > span { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mbph-stage.is-detail .mbph-stage__product { transform: scale(2); }
.mbph-stage__controls { position: relative; z-index: 2; display: flex; justify-content: center; gap: 8px; padding: 4px 16px; }
.mbph-stage__controls button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--brand-line, #D8CDC2); border-radius: 24px; color: var(--muted, var(--brand-muted, #6B6058)); background: var(--paper, var(--brand-paper, #FBF7F2)); font-size: 14px; }
.mbph-stage__controls svg { width: 20px; height: 20px; flex-basis: 20px; }
.mbph-stage__controls .is-active { border-color: var(--ruby, var(--brand-action, #A34E32)); color: var(--ink, var(--brand-ink, #29221E)); }
.mbph-preview-toolbar { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 16px; padding: 8px 12px; }
.mbph-preview-toolbar .mbph-stage__controls { padding: 0; }
.mbph-studio .mbph-generate { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; padding: 10px 18px; border: 1px solid var(--ruby, var(--brand-action, #A34E32)); border-radius: 6px; color: #fff; background: var(--ruby, var(--brand-action, #A34E32)); font-size: 15px; font-weight: 700; }
.mbph-studio .mbph-generate:hover:not(:disabled) { background: var(--brand-action-hover, #873F29); border-color: var(--brand-action-hover, #873F29); }
.mbph-preview-loading { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; background: var(--brand-loading, #FBF7F2EB); backdrop-filter: blur(5px); text-align: center; }
.mbph-preview-loading__spinner { flex: 0 0 auto; display: block; width: clamp(48px, 5vw, 76px); height: clamp(48px, 5vw, 76px); border: 5px solid var(--brand-action-soft, #A34E3226); border-top-color: var(--ruby, var(--brand-action, #A34E32)); border-radius: 50%; animation: mbph-mockup-spin 1s linear infinite; }
.mbph-preview-loading > strong { font-size: clamp(18px, 2vw, 26px); line-height: 1.2; font-weight: 700; letter-spacing: -.025em; }
.mbph-preview-loading > span:last-child { max-width: 36ch; color: var(--muted, var(--brand-muted, #6B6058)); font-size: 15px; line-height: 1.45; }
.mbph-stage__note { position: relative; z-index: 2; margin: 6px 0 0; padding: 0 20px 14px; color: var(--muted, var(--brand-muted, #6B6058)); font-size: 14px; line-height: 1.45; text-align: center; }
.mbph-mockup-status { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 0 16px 12px; font-size: 14px; line-height: 1.4; text-align: center; }
.mbph-mockup-status:empty { display: none; }
.mbph-stage.has-product-preview .mbph-stage__label { color: var(--pine, var(--brand-action, #A34E32)); font-weight: 700; }
@keyframes mbph-mockup-spin { to { transform: rotate(360deg); } }
.mbph-product-summary { display: flex; align-items: center; gap: 12px; min-height: 64px; margin-bottom: 16px; padding: 8px 12px; border: 1px solid var(--line, var(--brand-line, #D8CDC2)); border-radius: 6px; }
.mbph-product-summary > img { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 4px; object-fit: contain; background: transparent; mix-blend-mode: multiply; }
.mbph-product-summary > div { min-width: 0; }
.mbph-product-summary strong { display: block; font-size: 18px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.mbph-product-summary > div > span { display: block; margin-top: 3px; color: var(--muted, var(--brand-muted, #6B6058)); font-size: 14px; line-height: 1.4; }
.mbph-text-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0; border: 0; color: var(--ruby, var(--brand-action, #A34E32)); background: transparent; font-size: 16px; text-decoration: underline; text-underline-offset: 4px; }
.mbph-product-summary .mbph-text-button { flex: 0 0 auto; margin-left: auto; }
.mbph-product-summary .mbph-text-button svg { width: 20px; height: 20px; flex-basis: 20px; }
.mbph-panel { margin: 0; padding: 0; border: 0; }
.mbph-panel h2 { margin: 0 0 16px; font-size: clamp(28px, 2.7vw, 36px); font-weight: 700; line-height: 1.2; letter-spacing: -.035em; }
.mbph-studio fieldset { min-width: 0; margin: 0 0 24px; padding: 0; border: 0; }
.mbph-studio legend, .mbph-field > span:first-child { display: block; margin-bottom: 10px; padding: 0; font-size: 16px; font-weight: 600; }
.mbph-studio legend > span { margin-left: 6px; color: var(--muted, var(--brand-muted, #6B6058)); font-weight: 400; }
.mbph-field { display: block; margin: 0 0 24px; }
.mbph-studio input[type="text"], .mbph-studio select { width: 100%; min-width: 0; min-height: 60px; margin: 0; padding: 14px 18px; border: 1px solid var(--brand-line, #D8CDC2); border-radius: 6px; color: var(--ink, var(--brand-ink, #29221E)); background: transparent; font-size: 18px; line-height: 1.45; }
.mbph-text-input { position: relative; display: block; }
.mbph-text-input input { padding-right: 90px !important; }
.mbph-text-input > span { position: absolute; top: 50%; right: 18px; transform: translateY(-50%); color: var(--muted, var(--brand-muted, #6B6058)); font-size: 14px; font-weight: 400; }
.mbph-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 24px !important; border: 1px solid var(--line, var(--brand-line, #D8CDC2)) !important; border-radius: 6px; }
.mbph-mode label, .mbph-fonts label, .mbph-thread-colors label { position: relative; min-width: 0; cursor: pointer; }
.mbph-mode input, .mbph-fonts input, .mbph-thread-colors input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.mbph-mode label > span { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 10px 12px; border: 1px solid transparent; border-radius: 5px; color: var(--ink, var(--brand-ink, #29221E)); font-size: 16px; line-height: 1.3; }
.mbph-mode input:checked + span, .mbph-fonts input:checked + span { border-color: var(--ruby, var(--brand-action, #A34E32)); box-shadow: inset 0 0 0 1px var(--ruby, var(--brand-action, #A34E32)); background: var(--brand-paper, #FBF7F2); }
.mbph-mode input:checked + span { color: var(--ruby, var(--brand-action, #A34E32)); font-weight: 600; }
.mbph-mode input:checked + span::after { content: '✓'; margin-left: 4px; font-size: 18px; }
.mbph-mode input:focus-visible + span, .mbph-fonts input:focus-visible + span, .mbph-thread-colors input:focus-visible + span { outline: 3px solid var(--pine, var(--brand-action, #A34E32)); outline-offset: 4px; }
.mbph-text-icon { font-family: Georgia, serif; font-size: 29px; font-weight: 500; line-height: 1; }
.mbph-fonts > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mbph-fonts label > span { display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 90px; padding: 10px 8px; border: 1px solid var(--line, var(--brand-line, #D8CDC2)); border-radius: 6px; font-size: 16px; }
.mbph-fonts b { font-size: 36px; font-weight: 700; line-height: 1.05; }
.mbph-studio [data-font="sans"] { font-family: "Manrope", system-ui, sans-serif; }
.mbph-studio [data-font="serif"] { font-family: Georgia, serif; }
.mbph-studio [data-font="rounded"] { font-family: ui-rounded, "Arial Rounded MT Bold", sans-serif; }
.mbph-swatch-list { display: flex; flex-wrap: wrap; gap: 12px; padding: 4px; }
.mbph-swatch { display: block; width: 44px; height: 44px; border: 4px solid var(--paper, var(--brand-paper, #FBF7F2)); border-radius: 50%; background: var(--swatch, var(--brand-line, #D8CDC2)); box-shadow: 0 0 0 1px var(--brand-line, #D8CDC2); }
.mbph-thread-colors label { display: block; width: 44px; height: 44px; }
.mbph-thread-colors input:checked + .mbph-swatch { box-shadow: 0 0 0 2px var(--ink, var(--brand-ink, #29221E)), 0 0 0 6px var(--paper, var(--brand-paper, #FBF7F2)), 0 0 0 7px var(--ink, var(--brand-ink, #29221E)); }
.mbph-studio .mbph-stage .mbph-beanie-colors { min-width: 0; width: 100%; margin: 0; padding: 8px 16px; border-top: 1px solid var(--brand-line, #D8CDC2); background: var(--paper, var(--brand-paper, #FBF7F2)); }
.mbph-beanie-colors__row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mbph-beanie-colors__row > p { flex: 0 0 100px; margin: 0; color: var(--muted, var(--brand-muted, #6B6058)); font-size: 14px; line-height: 1.3; }
.mbph-beanie-colors__row > p > strong { display: block; margin-top: 3px; color: var(--ink, var(--brand-ink, #29221E)); font-size: 15px; font-weight: 700; }
.mbph-beanie-colors__row > .mbph-swatch-list { flex: 1 1 0%; flex-wrap: nowrap; gap: 10px; min-width: 0; padding: 7px; overflow-x: auto; scrollbar-width: thin; }
.mbph-beanie-colors .mbph-color-button { flex: 0 0 44px; }
.mbph-studio [data-mbph-color-slot="models"] .mbph-beanie-colors { margin: 0 0 18px; padding: 16px 4px 0; border-top: 1px solid var(--line, var(--brand-line, #D8CDC2)); }
[data-mbph-color-slot="models"] .mbph-beanie-colors__row { flex-wrap: wrap; gap: 8px; }
[data-mbph-color-slot="models"] .mbph-beanie-colors__row > p { display: flex; flex: 1 1 100%; align-items: baseline; gap: 8px; font-size: 16px; font-weight: 600; }
[data-mbph-color-slot="models"] .mbph-beanie-colors__row > p > strong { margin: 0; font-size: 15px; }
[data-mbph-color-slot="models"] .mbph-beanie-colors__row > .mbph-swatch-list { flex: 1 1 100%; flex-wrap: wrap; overflow: visible; }
.mbph-color-button { display: block; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; }
.mbph-color-button img { object-fit: contain; }
.mbph-color-button[aria-pressed="true"] .mbph-swatch { box-shadow: 0 0 0 2px var(--ink, var(--brand-ink, #29221E)), 0 0 0 5px var(--paper, var(--brand-paper, #FBF7F2)), 0 0 0 6px var(--ink, var(--brand-ink, #29221E)); }
.mbph-studio.has-js .mbph-native-variant { display: none; }
.mbph-models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 4px; }
.mbph-model-card { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 8px 8px 10px; border: 1px solid var(--line, var(--brand-line, #D8CDC2)); border-radius: 7px; color: var(--ink, var(--brand-ink, #29221E)); background: var(--paper, var(--brand-paper, #FBF7F2)); text-decoration: none; }
.mbph-model-card:hover { border-color: var(--ruby, var(--brand-action, #A34E32)); }
.mbph-model-card[aria-current="true"] { border-color: var(--ruby, var(--brand-action, #A34E32)); box-shadow: 0 0 0 1px var(--ruby, var(--brand-action, #A34E32)); background: var(--brand-paper, #FBF7F2); }
.mbph-model-card__image { position: relative; display: block; }
.mbph-model-card__image > img { display: block; width: 100%; height: clamp(64px, 6vw, 104px); object-fit: contain; mix-blend-mode: multiply; }
.mbph-model-card strong { font-size: 14px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.mbph-model-card small { margin-top: auto; color: var(--muted, var(--brand-muted, #6B6058)); font-size: 13px; }
.mbph-model-card__check { position: absolute; top: 0; right: 0; display: none; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; background: var(--ruby, var(--brand-action, #A34E32)); }
.mbph-model-card__check svg { width: 16px; height: 16px; }
.mbph-model-card[aria-current="true"] .mbph-model-card__check { display: grid; }
.mbph-model-card[aria-disabled="true"] { cursor: wait; }
.mbph-model-card.is-loading { opacity: .55; }
.mbph-helper { margin: 20px 0 0; color: var(--muted, var(--brand-muted, #6B6058)); font-size: 14px; line-height: 1.5; }
.mbph-upload { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: 260px; padding: 28px 20px; border: 1px dashed var(--brand-muted, #6B6058); border-radius: 6px; text-align: center; cursor: pointer; }
.mbph-upload__icon { color: var(--ruby, var(--brand-action, #A34E32)); }
.mbph-upload__icon svg { width: 34px; height: 34px; }
.mbph-upload > strong { font-size: 22px; font-weight: 700; }
.mbph-upload > span:not(.mbph-upload__icon) { font-size: 16px; }
.mbph-upload > small { color: var(--muted, var(--brand-muted, #6B6058)); font-size: 14px; }
.mbph-upload__button { min-height: 44px; padding: 10px 18px; border-radius: 4px; color: #fff; background: var(--ink, var(--brand-ink, #29221E)); }
.mbph-upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.mbph-upload:focus-within { outline: 3px solid var(--pine, var(--brand-action, #A34E32)); outline-offset: 4px; }
.mbph-upload-name { margin: 12px 0 0; font-size: 16px; overflow-wrap: anywhere; }
.mbph-review dl { display: grid; grid-template-columns: minmax(100px, .7fr) minmax(0, 1fr); gap: 16px 24px; margin: 0 0 28px; font-size: 16px; line-height: 1.5; }
.mbph-review dt { color: var(--muted, var(--brand-muted, #6B6058)); }
.mbph-review dd { margin: 0; overflow-wrap: anywhere; }
.mbph-quantity > span:last-child { display: grid; grid-template-columns: 44px 64px 44px; width: fit-content; min-height: 48px; overflow: hidden; border: 1px solid var(--line, var(--brand-line, #D8CDC2)); border-radius: 4px; }
.mbph-quantity button { min-height: 48px; border: 0; color: var(--ink, var(--brand-ink, #29221E)); background: transparent; font-size: 24px; }
.mbph-quantity input { min-width: 0; width: 100%; border: 0; border-inline: 1px solid var(--line, var(--brand-line, #D8CDC2)); border-radius: 0; color: var(--ink, var(--brand-ink, #29221E)); background: transparent; font-size: 18px; text-align: center; appearance: textfield; -moz-appearance: textfield; }
.mbph-quantity input::-webkit-inner-spin-button { -webkit-appearance: none; }
.mbph-approval { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; margin: 0; font-size: 16px; line-height: 1.5; cursor: pointer; }
.mbph-approval input { flex: 0 0 20px; width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--ruby, var(--brand-action, #A34E32)); }
.mbph-actions { position: sticky; bottom: 0; z-index: 30; display: grid; grid-template-columns: minmax(100px, 1fr) minmax(210px, .7fr) auto minmax(220px, .8fr); align-items: center; gap: 28px; margin-top: 24px; padding: 18px 0; border-top: 1px solid var(--line, var(--brand-line, #D8CDC2)); background: var(--snow, var(--brand-paper, #FBF7F2)); }
.mbph-back { display: inline-flex; align-items: center; gap: 12px; justify-self: start; min-height: 48px; padding: 0; border: 0; color: var(--ink, var(--brand-ink, #29221E)); background: transparent; font-size: 18px; text-align: left; }
.mbph-price-details { display: grid; gap: 4px; padding: 0 28px; border-inline: 1px solid var(--line, var(--brand-line, #D8CDC2)); font-size: 14px; }
.mbph-price-details > span { display: flex; justify-content: space-between; gap: 16px; }
.mbph-price-details > span > span { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.mbph-total { display: grid; gap: 2px; text-align: right; }
.mbph-total strong { color: var(--ink, var(--brand-ink, #29221E)); font-size: 28px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mbph-total > span { color: var(--muted, var(--brand-muted, #6B6058)); font-size: 14px; }
.mbph-studio .mbph-primary { display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; min-width: 0; min-height: 62px; margin: 0; padding: 14px 26px; border: 1px solid var(--ruby, var(--brand-action, #A34E32)); border-radius: 5px; color: #fff; background: var(--ruby, var(--brand-action, #A34E32)); font-size: 18px; font-weight: 600; line-height: 1.4; }
.mbph-studio .mbph-primary:hover { background: var(--brand-action-hover, #873F29); border-color: var(--brand-action-hover, #873F29); }
.mbph-configurator-page .personalizer-page { padding: 12px 0 0; }
.mbph-configurator-page .site-header__inner { min-height: 60px; }
.mbph-configurator-page .site-header .brand { min-height: 60px; font-size: 26px; }
.mbph-configurator-page .site-header .brand img { width: 34px; height: 34px; flex-basis: 34px; }
.mbph-configurator-page .nav-menu a[aria-current="page"] { text-decoration-color: var(--ruby, var(--brand-action, #A34E32)); }
.mbph-configurator-page .site-footer { margin-top: 24px; }
.personalizer-page .woocommerce-error, .personalizer-page .woocommerce-message, .personalizer-page .woocommerce-info { margin: 0 0 24px; padding: 16px 20px; border: 1px solid var(--line, var(--brand-line, #D8CDC2)); border-left: 3px solid var(--ruby, var(--brand-action, #A34E32)); color: var(--ink, var(--brand-ink, #29221E)); background: var(--paper, var(--brand-paper, #FBF7F2)); font-size: 16px; }
/* Keep the preview and purchase action in the viewport; only the settings scroll. */
.mbph-studio.is-viewport-fit { display: flex; flex-direction: column; height: var(--mbph-available-height); min-height: 0; }
.is-viewport-fit .mbph-studio__intro, .is-viewport-fit .mbph-studio__status { flex: 0 0 auto; }
.is-viewport-fit .mbph-form { display: flex; flex: 1 1 0%; flex-direction: column; min-height: 0; }
.is-viewport-fit .mbph-workspace { flex: 1 1 0%; min-height: 0; align-items: stretch; }
.is-viewport-fit .mbph-preview-column { min-height: 0; }
.is-viewport-fit .mbph-stage { height: 100%; }
.is-viewport-fit .mbph-stage__viewport { height: 100%; aspect-ratio: auto; }
.is-viewport-fit .mbph-editor { min-height: 0; padding: 4px 8px 16px 4px; overflow-y: auto; scrollbar-width: thin; scrollbar-gutter: stable; }
.is-viewport-fit .mbph-product-summary { min-height: 64px; gap: 12px; margin-bottom: 14px; padding: 8px 12px; }
.is-viewport-fit .mbph-product-summary > img { flex-basis: 44px; width: 44px; height: 44px; }
.is-viewport-fit .mbph-product-summary strong { font-size: 18px; }
.is-viewport-fit[data-step="1"] .mbph-product-summary { display: none; }
.is-viewport-fit .mbph-actions { position: relative; bottom: auto; flex: 0 0 auto; margin-top: 14px; padding-block: 12px; }
@media (min-width: 901px) and (max-height: 850px) {
  .is-viewport-fit .mbph-studio__intro { margin-bottom: 12px; }
  .is-viewport-fit .mbph-studio__intro h1, .is-viewport-fit .mbph-studio__intro h2 { font-size: 28px; }
  .is-viewport-fit .mbph-studio__intro p { margin-top: 4px; font-size: 14px; }
  .is-viewport-fit .mbph-panel h2 { font-size: 28px; }
  .is-viewport-fit .mbph-field, .is-viewport-fit fieldset { margin-bottom: 18px; }
  .is-viewport-fit .mbph-mode { margin-bottom: 18px !important; }
  .is-viewport-fit input[type="text"], .is-viewport-fit select { min-height: 50px; padding-block: 10px; }
  .is-viewport-fit .mbph-fonts label > span { min-height: 76px; }
}
@media (max-width: 980px) {
  .mbph-configurator-page .site-header__inner, .mbph-configurator-page .site-header .brand { min-height: 52px; }
  .mbph-configurator-page .site-header .brand { font-size: 24px; }
  .mbph-configurator-page .site-navigation .nav-menu a { font-size: 14px; }
}
@media (max-width: 1100px) {
  .mbph-workspace { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; }
  .mbph-product-summary { gap: 12px; padding: 12px; }
  .mbph-product-summary > img { flex-basis: 44px; width: 44px; height: 44px; }
  .mbph-product-summary strong { font-size: 18px; }
  .mbph-product-summary .mbph-text-button svg { display: none; }
  .mbph-steps { flex-basis: 300px; }
  .mbph-actions { gap: 16px; grid-template-columns: minmax(80px, 1fr) minmax(180px, .7fr) auto minmax(190px, .8fr); }
  .mbph-price-details { padding-inline: 16px; }
  .mbph-studio .mbph-primary { padding-inline: 18px; gap: 12px; }
}
@media (max-width: 900px) {
  .mbph-studio { scroll-margin-top: 180px; }
  .mbph-studio__intro { flex-wrap: wrap; gap: 12px; }
  .mbph-steps { flex: 0 1 350px; }
  .mbph-workspace { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .mbph-stage__viewport { aspect-ratio: 1.15; max-height: 520px; }
  .mbph-stage__art { font-size: clamp(18px, 3.8vw, 32px); }
  .mbph-editor { width: 100%; }
  .mbph-actions { grid-template-columns: 1fr auto; gap: 10px 20px; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .mbph-back { grid-column: 1; grid-row: 1; min-height: 44px; font-size: 16px; }
  .mbph-price-details { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 0; border: 0; }
  .mbph-total { grid-column: 1; grid-row: 3; justify-self: start; text-align: left; }
  .mbph-studio .mbph-primary { grid-column: 2; grid-row: 3; min-height: 54px; }
  .mbph-total strong { font-size: 24px; }
  .is-viewport-fit .mbph-studio__intro { flex-wrap: nowrap; align-items: center; gap: 12px; margin-bottom: 10px; }
  .is-viewport-fit .mbph-studio__intro h1, .is-viewport-fit .mbph-studio__intro h2 { font-size: 28px; }
  .is-viewport-fit .mbph-studio__intro p { margin-top: 4px; font-size: 14px; }
  .is-viewport-fit .mbph-breadcrumb { display: none; }
  .is-viewport-fit .mbph-steps { flex: 0 0 280px; gap: 8px; }
  .is-viewport-fit .mbph-steps button { min-height: 44px; gap: 8px; font-size: 14px; }
  .is-viewport-fit .mbph-step-number { width: 28px; height: 28px; font-size: 14px; }
  .is-viewport-fit .mbph-steps li:not(:last-child)::after { top: 17px; left: calc(50% + 24px); right: calc(-50% + 16px); }
  .is-viewport-fit .mbph-workspace { grid-template-rows: minmax(260px, 1.35fr) minmax(110px, 1fr); gap: 12px; }
  .is-viewport-fit .mbph-stage__viewport { max-height: none; }
  .is-viewport-fit .mbph-stage__label { top: 10px; left: 12px; font-size: 14px; }
  .is-viewport-fit .mbph-stage__controls { position: static; gap: 4px; padding: 0; }
  .is-viewport-fit .mbph-stage__controls button { width: 44px; height: 44px; min-height: 44px; padding: 10px; gap: 0; overflow: hidden; font-size: 0; }
  .is-viewport-fit .mbph-stage__note { display: none; }
  .is-viewport-fit .mbph-stage { grid-template-rows: minmax(0, 1fr) auto auto auto; }
  .is-viewport-fit .mbph-mockup-status { padding: 5px 10px; font-size: 12px; background: transparent; }
  .is-viewport-fit .mbph-preview-toolbar { justify-content: space-between; gap: 4px 8px; padding: 6px 8px; }
  .is-viewport-fit .mbph-generate { min-height: 44px; padding: 9px 10px; gap: 8px; font-size: 14px; }
  .is-viewport-fit .mbph-generate svg { width: 18px; height: 18px; flex-basis: 18px; }
  .is-viewport-fit .mbph-preview-loading { flex-direction: row; gap: 12px; padding: 12px; }
  .is-viewport-fit .mbph-preview-loading__spinner { width: 48px; height: 48px; border-width: 4px; }
  .is-viewport-fit .mbph-preview-loading > strong { max-width: 20ch; }
  .is-viewport-fit .mbph-preview-loading > span:last-child { display: none; }
  .is-viewport-fit .mbph-product-summary { min-height: 48px; margin-bottom: 14px; padding: 0 0 10px; border: 0; border-bottom: 1px solid var(--line, var(--brand-line, #D8CDC2)); border-radius: 0; }
  .is-viewport-fit .mbph-product-summary > img { display: none; }
  .is-viewport-fit .mbph-product-summary strong { font-size: 16px; }
  .is-viewport-fit .mbph-product-summary > div > span { margin-top: 2px; font-size: 14px; }
  .is-viewport-fit .mbph-panel h2 { font-size: 24px; }
  .is-viewport-fit .mbph-actions { grid-template-columns: 44px auto minmax(0, 1fr); gap: 6px 12px; margin-top: 10px; padding: 8px 0 max(8px, env(safe-area-inset-bottom)); }
  .is-viewport-fit .mbph-back { grid-column: 1; grid-row: 2; width: 44px; justify-content: center; }
  .is-viewport-fit .mbph-back > span { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .is-viewport-fit .mbph-price-details { grid-column: 1 / -1; grid-row: 1; display: flex; justify-content: space-between; gap: 4px 12px; font-size: 14px; }
  .is-viewport-fit .mbph-total { grid-column: 2; grid-row: 2; }
  .is-viewport-fit .mbph-total strong { font-size: 22px; }
  .is-viewport-fit .mbph-total > span { font-size: 12px; }
  .is-viewport-fit .mbph-primary { grid-column: 3; grid-row: 2; min-height: 50px; padding: 10px 12px; gap: 8px; font-size: 16px; }
  .is-viewport-fit .mbph-primary svg { width: 18px; height: 18px; flex-basis: 18px; }
}
@media (max-width: 540px) {
  .mbph-configurator-page .site-header .brand { font-size: 22px; }
  .mbph-configurator-page .site-header .brand img { width: 30px; height: 30px; flex-basis: 30px; }
  .mbph-studio .mbph-stage .mbph-beanie-colors { padding: 6px 8px; }
  .mbph-beanie-colors__row { gap: 6px; }
  .mbph-beanie-colors__row > p { flex-basis: 86px; }

  .mbph-studio__intro h1, .mbph-studio__intro h2 { font-size: 24px; }
  .mbph-studio__intro p { display: none; }
  .mbph-steps { flex: 1 1 100%; gap: 12px; margin: 0; }
  .mbph-steps button { font-size: 16px; }
  .mbph-stage__label { top: 14px; left: 16px; font-size: 14px; }
  .mbph-stage__viewport { aspect-ratio: 1; }
  .mbph-stage__note { padding-inline: 12px; }
  .mbph-product-summary { gap: 12px; }
  .mbph-product-summary .mbph-text-button { font-size: 16px; }
  .mbph-mode label > span { gap: 6px; padding-inline: 8px; min-height: 60px; }
  .mbph-mode svg { width: 20px; height: 20px; flex-basis: 20px; }
  .mbph-fonts > div { gap: 8px; }
  .mbph-fonts label > span { padding-inline: 4px; }
  .mbph-review dl { gap: 12px; }
  .mbph-price-details { gap: 4px 16px; }
  .mbph-price-details > span { gap: 10px; }
  .mbph-studio .mbph-primary { gap: 12px; padding-inline: 16px; font-size: 16px; }
  .mbph-actions { gap: 8px 12px; }
  .mbph-total strong { font-size: 22px; }
  .is-viewport-fit .mbph-studio__intro { flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
  .is-viewport-fit .mbph-studio__intro h1, .is-viewport-fit .mbph-studio__intro h2 { font-size: 24px; }
  .is-viewport-fit .mbph-steps { flex: 1 1 100%; margin: 0; }
  .is-viewport-fit .mbph-steps button { display: flex; justify-content: center; gap: 8px; min-height: 44px; }
  .is-viewport-fit .mbph-steps li:not(:last-child)::after { display: none; }
  .is-viewport-fit .mbph-step-number { width: 28px; height: 28px; font-size: 14px; }
  .is-viewport-fit .mbph-model-card__image > img { height: 60px; }
  .is-viewport-fit .mbph-primary { padding-inline: 10px; }
  .is-viewport-fit .mbph-price-details > span { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { .mbph-stage__product { transition: none; } .mbph-preview-loading__spinner { animation: none; } }
