@font-face{font-family:DM;src:url('/template/smilestar/fonts/dm-sans.ttf');font-weight:400 700;font-display:swap}*{box-sizing:border-box}body{margin:0;font:14px/1.55 DM,Arial,sans-serif;color:#27322f;background:#f8faf8}button,input{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible{outline:2px solid #32695d;outline-offset:4px}[hidden]{display:none!important}.studio{display:grid;grid-template-columns:1.1fr 1fr;min-height:570px;gap:32px;padding:10px}.preview{position:relative;min-height:540px;background:#e8f1ec;border-radius:14px;overflow:hidden;isolation:isolate}#model{position:absolute;inset:50px 0 70px}#model canvas{display:block;width:100%;height:100%}#status{position:absolute;bottom:52px;left:24px;right:24px;text-align:center;font-size:11px;color:#597566}.view-controls{position:absolute;bottom:18px;left:0;right:0;display:flex;justify-content:center;gap:8px}.view-controls button,.mode-tabs button{border:0;border-radius:25px;background:#f8faf8;color:#5e7067;font-size:12px;padding:9px 16px}.view-controls button[aria-pressed=true],.mode-tabs button[aria-pressed=true]{background:#78bcac;color:#183d34}.editor{padding:12px 0}.mode-tabs{display:flex;gap:6px;background:#e7f1ec;border-radius:30px;padding:4px;margin-bottom:22px;width:fit-content}label{display:block;font-size:12px;font-weight:500}input[type=text],#brand-text,input[type=file]{display:block;width:100%;margin:8px 0 20px;padding:12px;border:1px solid #c7d8ce;border-radius:6px;background:white;font-size:16px}small{display:block;font-size:11px;color:#65756d;margin-top:-12px;margin-bottom:22px}.size-row{display:flex;justify-content:space-between;align-items:center}output{font-size:12px;color:#52695e}input[type=range]{width:100%;accent-color:#32695d;margin:10px 0 16px;min-height:24px}.ink-label{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}input[type=color]{padding:3px;border:1px solid #c7d8ce;border-radius:5px;width:55px;height:30px;background:white}fieldset{border:0;padding:0;margin:0 0 20px}legend{font-size:12px;font-weight:500;width:100%;display:flex;justify-content:space-between}legend span{color:#65756d;font-weight:400}.swatches{display:flex;gap:14px;margin-top:12px}.swatches button{width:31px;height:31px;border:3px solid #f8faf8;border-radius:50%;background:var(--swatch);outline:1px solid #c9d7cf}.swatches button[aria-pressed=true]{outline:2px solid #32695d}.note{font-size:11px;color:#65756d;margin:20px 0}.primary{width:100%;background:#78bcac;color:#183d34;border:0;border-radius:30px;padding:14px 20px;font-size:12px;font-weight:600}.primary:hover{background:#8ac9ba}.secondary-actions{display:flex;justify-content:space-between;margin-top:14px}.secondary-actions button{background:none;border:0;padding:5px 0;font-size:12px;color:#486858;text-decoration:underline;text-underline-offset:4px}#editor-message{font-size:12px;color:#32695d;min-height:18px}.fallback{position:absolute;inset:95px 20px 95px;text-align:center}.fallback-case{margin:35px auto;width:75%;height:65%;border-radius:44%;background:#222b29;box-shadow:0 15px 20px #27322f20,inset 0 -9px 0 #0002;display:flex;align-items:center;justify-content:center;overflow:hidden}.fallback-case span{color:white;font-size:20px;max-width:48%;text-align:center}.fallback-case img{max-width:100%;max-height:90px}.fallback p{font-size:11px;color:#65756d}@media(min-width:1800px){.studio{min-height:700px}.preview{min-height:660px}.editor{padding:35px 10px}body{font-size:16px}}@media(max-width:640px){.studio{display:block;padding:0;min-height:0}.preview{min-height:330px}.editor{padding:25px 4px 0}#model{inset:30px 0 55px}#status{bottom:45px}.view-controls{bottom:12px}.mode-tabs{margin-bottom:20px}.note{margin:17px 0}.fallback{inset:45px 20px 70px}}
@media(min-width:641px) and (max-height:550px){.studio{min-height:450px;gap:25px;padding:5px}.preview{min-height:450px}.editor{padding:0}.mode-tabs{margin-bottom:12px}.mode-tabs button{padding:7px 13px}input[type=text],#brand-text,input[type=file]{padding:9px;margin-bottom:12px;margin-top:6px}.ink-label{margin-bottom:12px}fieldset{margin-bottom:12px}.swatches{margin-top:8px}.note{margin:10px 0;font-size:10px}.primary{padding:11px 16px}.secondary-actions{margin-top:8px}#editor-message{font-size:11px;min-height:14px;margin:5px 0}.size-row label{font-size:11px}input[type=range]{margin:4px 0 8px}.swatches button{width:28px;height:28px}}

body{overflow:hidden}.editor{display:flow-root}
@media(min-width:641px) and (max-height:480px){.studio{min-height:0;height:100vh;padding:5px;gap:22px;grid-template-columns:1.1fr 1fr}.preview{min-height:0;height:100%}.editor{padding:0}.mode-tabs{margin-bottom:8px;padding:3px}.mode-tabs button{padding:6px 13px;font-size:11px}label,legend{font-size:11px}#brand-text,input[type=file]{padding:7px 10px;margin-top:5px;margin-bottom:9px;font-size:14px}.size-row{line-height:1.2}input[type=range]{margin:2px 0 6px;min-height:18px}.ink-label{margin-bottom:9px}input[type=color]{height:24px}.swatches{margin-top:6px;gap:12px}.swatches button{width:25px;height:25px}fieldset{margin-bottom:8px}.note{font-size:10px;line-height:1.4;margin:8px 0}.primary{padding:9px 12px;font-size:11px}.secondary-actions{margin-top:6px}.secondary-actions button{font-size:11px;padding:3px 0}#editor-message{font-size:10px;min-height:12px;margin:3px 0}#model{inset:25px 0 60px}#status{bottom:43px;font-size:10px;margin:5px 0}.view-controls{bottom:12px}.view-controls button{padding:6px 12px;font-size:10px}}
/* English upload control, independent of the browser's localized native button. */
.field-label{display:block;font-size:12px;font-weight:500;margin-bottom:8px}.upload-zone{position:relative;display:flex;align-items:center;gap:14px;padding:16px;border:1px dashed #9ebfaf;border-radius:10px;background:#eef6f1;margin:0;cursor:pointer;overflow:hidden}.upload-zone:hover{background:#e3f1e9;border-color:#4c927c}.upload-zone:focus-within{outline:2px solid #32695d;outline-offset:3px}.upload-zone svg{width:26px;height:26px;fill:none;stroke:#47765f;stroke-width:1.5;flex:none}.upload-zone>span:nth-child(2){flex:1;min-width:0}.upload-zone strong{display:block;font-size:13px;font-weight:600;line-height:1.4}.upload-zone small{display:block;font-size:10px;color:#597365;margin:4px 0 0}.upload-browse{font-size:11px;color:#285640;background:#dceee3;border-radius:20px;padding:7px 12px}.upload-zone input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;margin:0;padding:0;cursor:pointer}.file-name{display:block;font-size:11px;margin-top:7px;color:#3b624e;overflow-wrap:anywhere}.upload-help{font-size:10px;color:#65756d;margin:5px 0 16px}#model{filter:none;opacity:1}#model canvas{filter:none;opacity:1;image-rendering:auto}#logo-size{accent-color:#32695d}.swatches button{transition:outline-color .15s}
@media(min-width:641px) and (max-height:480px){.field-label{font-size:11px;margin-bottom:5px}.upload-zone{padding:10px;gap:9px}.upload-zone svg{width:21px;height:21px}.upload-zone strong{font-size:12px}.upload-browse{font-size:10px;padding:5px 9px}.upload-help{margin-bottom:9px;font-size:9px}.file-name{font-size:10px;margin-top:5px}}
@media(max-width:420px){.upload-zone{padding:13px;gap:10px}.upload-browse{padding:6px 9px}.upload-zone strong{font-size:12px}}

/* Content-sized embeds must not derive their height from the iframe viewport:
   the parent measures this content to size that same viewport. */
html[data-sizing="content"] .studio{height:auto!important;min-height:570px!important}
html[data-sizing="content"] .preview{height:auto!important;min-height:540px!important}
@media(min-width:1800px){html[data-sizing="content"] .studio{min-height:700px!important}html[data-sizing="content"] .preview{min-height:660px!important}}
@media(max-width:640px){html[data-sizing="content"] .studio{min-height:0!important}html[data-sizing="content"] .preview{min-height:330px!important}}

/* The gesture controller owns only the canvas; vertical swipes scroll the host. */
#model{touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none}#model.is-rotating{cursor:grabbing}#model:focus,#model:focus-visible{outline:none}

.view-controls{flex-wrap:wrap}.view-controls #toggle-lid{background:#d5e9e0;color:#244f41}.view-controls #toggle-lid[aria-pressed=true]{background:#32695d;color:white}.view-controls #toggle-lid:disabled{opacity:.45;cursor:wait}

.view-controls button{display:inline-flex;align-items:center;justify-content:center;gap:7px}.view-controls button svg{flex:none}

/* Read-only product gallery mode, sharing the original GLB and hinge. */
html[data-mode=product],html[data-mode=product] body{height:100%;overflow:hidden;background:#e7f0eb}
html[data-mode=product] .studio{display:block;height:100%!important;min-height:0!important;padding:0!important}
html[data-mode=product] .editor{display:none!important}html[data-mode=product] .preview{height:100%!important;min-height:0!important;border-radius:0}
html[data-mode=product] .view-controls{top:14px;bottom:auto;left:14px;right:14px;justify-content:flex-end}
html[data-mode=product] .view-controls [data-view]{display:none}
html[data-mode=product] #model{inset:62px 0 48px}html[data-mode=product] #status{bottom:12px;font-size:11px;margin:0}


html[data-mode=product] #status{display:none}

/* Prominent opening action in the product gallery. */
html[data-mode=product] .view-controls #toggle-lid{min-width:124px;min-height:48px;padding:12px 22px;font-size:16px;font-weight:600;line-height:1.25;background:#32695d;color:#fff;border:1px solid #32695d;box-shadow:0 5px 14px #244f4120;gap:9px;animation:product-open-intro .65s cubic-bezier(.16,1,.3,1) both;transition:background-color .18s,transform .18s}
html[data-mode=product] #toggle-lid::before{content:"";display:block;width:20px;height:20px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 11h16v9H4zM4 11l2-7 15 4-1 3M12 7V2m-3 3 3-3 3 3' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat}
html[data-mode=product] .view-controls #toggle-lid:hover{background:#245347;transform:translateY(-2px)}html[data-mode=product] .view-controls #toggle-lid:active{transform:translateY(0)}
html[data-mode=product] #model{top:78px}
@keyframes product-open-intro{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:640px){html[data-mode=product] .view-controls #toggle-lid{min-width:108px;min-height:44px;font-size:15px;padding:10px 16px}}
@media(prefers-reduced-motion:reduce){html[data-mode=product] .view-controls #toggle-lid{animation:none;transition:none}}

/* Text-only opening action with a restrained invitation pulse. */
html[data-mode=product] #toggle-lid::before{content:none;display:none}
html[data-mode=product] .view-controls #toggle-lid{animation:product-open-breathe 2.8s ease-in-out infinite}
html[data-mode=product] .view-controls #toggle-lid:hover,html[data-mode=product] .view-controls #toggle-lid:focus-visible{animation-play-state:paused}
html[data-mode=product] .view-controls #toggle-lid[aria-pressed=true]{animation:none}
@keyframes product-open-breathe{0%,100%{transform:scale(1);background-color:#32695d}50%{transform:scale(1.035);background-color:#3c7b6c}}
@media(prefers-reduced-motion:reduce){html[data-mode=product] .view-controls #toggle-lid{animation:none}}

/* The homepage frame owns its desktop height. Fill it without affecting
   content-sized customization pages or the product-only gallery. */
@media(min-width:641px){
  html:not([data-sizing="content"]):not([data-mode="product"]) .studio{
    height:100svh;min-height:0;grid-template-rows:minmax(0,1fr)
  }
  html:not([data-sizing="content"]):not([data-mode="product"]) .preview{
    height:100%;min-height:0
  }
  html:not([data-sizing="content"]):not([data-mode="product"]) .editor{
    min-height:0;overflow-y:auto;scrollbar-width:thin
  }
}

/* Independent insert colors, ordered like the supplied two-row color reference. */
.swatches{padding:6px}
.swatches button{flex-shrink:0}
.silicone-swatches{display:grid;grid-template-columns:repeat(5,max-content);gap:10px 14px;width:max-content;max-width:100%}
.silicone-swatches button:focus-visible{outline:2px solid #32695d;outline-offset:4px}

/* Shared zoom controls for every 3D product. */
.view-controls .zoom-control{min-width:38px;min-height:38px;padding:7px 10px;font-size:19px;line-height:1}
.view-controls .zoom-control:disabled{opacity:.4;cursor:default}
@media(max-width:640px){.view-controls{gap:6px}.view-controls button{padding:8px 10px;font-size:11px}.view-controls .zoom-control{min-width:34px;min-height:36px;padding:6px 8px;font-size:18px}}

/* Fixed-height product screens. The form can scroll on short/narrow displays. */
html[data-sizing=screen],html[data-sizing=screen] body{height:100%;overflow:hidden}
html[data-sizing=screen] .studio{height:100%;min-height:0;grid-template-rows:minmax(0,1fr);padding:10px;gap:clamp(16px,2vw,32px)}
html[data-sizing=screen] .preview{height:100%;min-height:0}
html[data-sizing=screen] .editor{min-height:0;padding:clamp(4px,1.7vh,24px) 0;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-color:#a9cbbd transparent}
html[data-sizing=screen] #editor-message:empty{display:none}
@media(min-width:641px) and (max-height:650px){
 html[data-sizing=screen] .editor{padding:0}
 html[data-sizing=screen] .mode-tabs{margin-bottom:7px}
 html[data-sizing=screen] .mode-tabs button{padding:6px 12px;font-size:11px}
 html[data-sizing=screen] label,html[data-sizing=screen] legend{font-size:11px}
 html[data-sizing=screen] #brand-text{padding:8px 10px;margin:5px 0 10px;font-size:14px;line-height:1.3}
 html[data-sizing=screen] input[type=range]{margin:3px 0 6px;min-height:20px}
 html[data-sizing=screen] .ink-label{margin-bottom:10px}
 html[data-sizing=screen] input[type=color]{height:26px}
 html[data-sizing=screen] fieldset{margin-bottom:8px}
 html[data-sizing=screen] .swatches{margin-top:7px;gap:8px 12px}
 html[data-sizing=screen] .swatches button{width:27px;height:27px}
 html[data-sizing=screen] .note{font-size:10px;line-height:1.45;margin:7px 0}
 html[data-sizing=screen] .primary{padding:10px 14px;font-size:11px}
 html[data-sizing=screen] .secondary-actions{margin-top:7px}
 html[data-sizing=screen] #editor-message{font-size:11px;line-height:1.4;min-height:16px;margin:5px 0 0}
 html[data-sizing=screen] .upload-zone{padding:10px}
 html[data-sizing=screen] .upload-help{margin-bottom:10px}
}
@media(max-width:640px){
 html[data-sizing=screen] .studio{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(160px,42%) minmax(0,1fr);gap:10px;padding:0}
 html[data-sizing=screen] .preview{min-height:0}
 html[data-sizing=screen] .editor{padding:8px 7px 16px}
 html[data-sizing=screen] #model{inset:32px 0 76px}
 html[data-sizing=screen] #status{bottom:43px;line-height:1.3;font-size:9px;margin:0}
 html[data-sizing=screen] .view-controls{bottom:8px;gap:4px}
 html[data-sizing=screen] .view-controls button{padding:7px 8px;font-size:10px;gap:4px}
 html[data-sizing=screen] .view-controls .zoom-control{min-width:30px;min-height:32px;padding:5px 7px;font-size:18px}
}
