html:has(.viewer-first) { scroll-behavior: auto; scroll-padding-top: 12px; }
.viewer-first { --edge: #645039; --accent: #efc37c; --scene-height: clamp(220px, 53svh, 540px); }
.viewer-first main, .entry-header { box-sizing: border-box; width: min(100%, 1280px); margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); }
.entry-header { display: flex; align-items: center; justify-content: space-between; min-height: 60px; border-bottom: 1px solid var(--edge); }
.entry-brand { font: 800 24px/1.1 Manrope, sans-serif; letter-spacing: -1px; }
.entry-brand span, .entry-back, .entry-model strong { color: var(--accent); }
.entry-back { font-size: 15px; padding: 10px 0; }
.entry-heading { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 19px 0; }
.entry-heading h1 { font: 700 clamp(26px, 3vw, 38px)/1.1 Manrope, sans-serif; letter-spacing: -.035em; margin: 0; }
.entry-model summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 15px; cursor: pointer; min-height: 44px; padding: 8px 12px; border: 1px solid var(--edge); border-radius: 10px; font: 600 15px/1.4 Manrope, sans-serif; }
.entry-model summary::-webkit-details-marker { display: none; }
.entry-model summary:hover { border-color: var(--accent); }
.entry-details-action { display: inline-flex; align-items: center; gap: 7px; color: #f4d29e; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.entry-details-action::after { content: ''; flex: none; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.entry-model[open] .entry-details-action::after { transform: translateY(2px) rotate(225deg); }
.entry-model:not([open]) .when-open, .entry-model[open] .when-closed { display: none; }
.entry-model[open] { grid-column: 1/-1; }
.entry-model[open] summary { width: fit-content; }
.entry-model .order-cart { margin: 12px 0 0; }
.viewer-first .studio { display: grid; grid-template-columns: minmax(0,1.12fr) minmax(0,1fr); align-items: stretch; }
.viewer-first .preview-column { display: block; min-width: 0; }
.viewer-first .preview-sticky { display: flex; flex-direction: column; position: sticky; top: 8px; padding: 12px; border-radius: 16px; }
.viewer-first .preview-sticky > :is(.preview-top,.panel-dimensions,.preview-flat-caption,.preview-bottom,.material-caption,.share-note) { display: none; }
.viewer-first .preview-sticky .product-stage, .viewer-first .preview-sticky > #entry-still { height: var(--scene-height); }
#entry-still { border-radius: 12px; background: #495237 var(--entry-poster) center/contain no-repeat; }
.product-stage > #entry-still { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.viewer-first #entry-still[hidden] { display: none; }
.viewer-first .preview-sticky .product-visualizer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.viewer-first .product-visualizer > .product-viewer-slot { flex: 0 0 100%; }
.viewer-first .product-visualizer > .product-expand { position: static; margin: 0; min-height: 44px; padding: 6px 10px; font-size: 14px; }
.viewer-first .preview-sticky .product-stage-label { display: none; }
.viewer-first .preview-sticky:has(> #entry-still)::before { content: '3D'; display: flex; align-items: center; min-height: 44px; margin-bottom: 8px; color: var(--accent); }
.viewer-first .product-preview-tabs { margin: 0; padding: 3px; width: fit-content; align-self: flex-start; }
.viewer-first .product-preview-tabs button { font: 600 14px/1.3 Manrope,sans-serif; padding: 6px 14px; min-height: 36px; }
.viewer-first .product-render-status { inset: auto 10px 10px auto; z-index: 1; max-width: calc(100% - 20px); margin: 0; padding: 6px 12px; line-height: 1.4; }
.viewer-first .preview-sticky .product-controls-hint { display: none; }
.viewer-first .preview-actions { margin: 10px 0 0; }
.viewer-first .preview-sticky { container-type: inline-size; }
.order-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 9px;
  background: var(--accent);
  color: #291b10;
  font: 750 14px/1.25 Manrope, Arial, sans-serif;
  text-align: center;
  text-decoration: none;
}
.viewer-first .order-shortcut:hover { background: #f7d49c; }
.viewer-first .order-shortcut:focus-visible { outline: 2px solid #fff2d9; outline-offset: 2px; }
.viewer-first .preview-sticky > .order-shortcut { align-self: flex-end; }
.viewer-first .product-visualizer > .order-shortcut { margin-inline-start: auto; }
@container (max-width: 450px) {
  .viewer-first .product-visualizer > .product-preview-tabs { width: 100%; }
}
.viewer-first .preview-sticky .status:empty { display: none; }
.viewer-first .editor { min-width: 0; }
.viewer-first .editor .preview-product-context { display: contents; }
.viewer-first .editor .preview-product-context :is(.preview-product-photo,.preview-part-copy) { display: none; }
.viewer-first .mobile-product-open { display: none; }
.viewer-first .editor .surface-switch { margin: 0 0 16px; }
.lid-orientation[hidden] { display: none; }
.lid-orientation:not([hidden]) {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 16px;
  padding: 5px 0;
  min-height: 44px;
  cursor: pointer;
}
.lid-orientation input[type=checkbox] {
  width: 20px;
  height: 20px;
  min-height: 0;
  flex: none;
  margin: 1px 0 0;
  accent-color: var(--accent);
}
.lid-orientation strong, .lid-orientation small { display: block; }
.lid-orientation strong { color: #f3dfc1; font-size: 15px; line-height: 1.4; }
.lid-orientation small { margin-top: 3px; color: #d4c1a8; font-size: 13px; line-height: 1.45; }
.entry-tools { display: none; }
.viewer-first #entry-flat-message { margin: 8px 0; font-size: 15px; color: #f3d9af; }
.viewer-first .entry-back:focus-visible,.viewer-first .entry-model summary:focus-visible,.entry-tools a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media(max-width:760px) {
  .viewer-first { --scene-height: clamp(170px, 38svh, 355px); }
  .viewer-first main, .entry-header { padding-inline: 12px; }
  .entry-header { min-height: 42px; }
  .entry-brand { font-size: 21px; }
  .entry-back { font-size: 14px; }
  .entry-heading { gap: 8px; padding: 10px 0; }
  .entry-heading h1 { font-size: clamp(20px, 5.6vw, 26px); }
  .entry-model summary { font-size: 14px; padding: 10px 8px; }
  .viewer-first .studio { display: block; }
  .viewer-first .preview-sticky { position: static; padding: 8px; }
  .viewer-first .preview-column { margin: 0 0 10px; height: auto; }
  .viewer-first .preview-sticky .preview-actions { display: flex; }
  .viewer-first .preview-sticky .preview-actions #download-png { min-height: 44px; }
  .viewer-first .preview-sticky .preview-actions .whatsapp-link { display: none; }
  .viewer-first .product-view-buttons { margin-top: 6px; }
  .viewer-first .product-view-buttons button { min-height: 42px; padding: 6px 3px; }
  .viewer-first .editor { padding: 0 10px 12px; }
  .entry-tools { display: flex; position: sticky; z-index: 4; top: 0; background: #281e17; gap: 14px; align-items: center; border-bottom: 1px solid var(--edge); margin-bottom: 10px; }
  .entry-tools a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 650; color: var(--accent); }
  .entry-tools a:last-child { margin-left: auto; }
  .viewer-first :is(#panel-design, #panel-text) { scroll-margin-top: 50px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .viewer-first { --scene-height: 43svh; }
  .entry-header { min-height: 36px; }
  .entry-heading { padding-block: 5px; }
}
@media(max-width:385px) {
  .viewer-first .product-preview-tabs button { padding-inline: 8px; }
  .viewer-first .product-visualizer > .product-expand { padding-inline: 6px; font-size: 13px; }
}

.viewer-first.embedded { --scene-height: clamp(175px, calc(var(--host-height, 750px) * .46), 485px); }
.viewer-first.embedded main { width: 100%; padding: 0 6px; }
.embedded .entry-heading { gap: 8px; padding: 4px 0 8px; }
.embedded .entry-heading h2 { margin: 0; font: 700 clamp(20px, 2.6vw, 30px)/1.1 Manrope, sans-serif; color: #f4e5d3; letter-spacing: -.025em; }
.entry-selection { white-space: nowrap; }
.embedded .entry-model .intro-chat { display: inline-block; margin-top: 8px; }
.viewer-first.embedded .preview-sticky { position: relative; top: 0; }
@media (min-width:761px) and (pointer:coarse) {
  .viewer-first.embedded { --scene-height: clamp(175px, 29vw, 420px); }
}
@media(max-width:760px) {
  /* The browser toolbar changes the visible height during a swipe. Keep the inline camera frame stable. */
  .viewer-first.embedded { --scene-height: clamp(135px, 68vw, 350px); }
  .viewer-first.embedded main { padding: 0 10px; }
  .embedded .entry-model summary { font-size: 13px; }
  .embedded .entry-heading { grid-template-columns: minmax(min-content,1fr) minmax(0,auto); }
  .embedded .entry-model summary { flex-direction: column; align-items: flex-start; gap: 2px; padding: 5px 9px; }
  .entry-details-action { font-size: 13px; line-height: 1.3; }
}
