/* AHProfi v497. Shared layout replaces responsive-fixes-v449.css on every page.
   Geometry/model coordinates are NOT scaled by CSS zoom. Only the stage's
   established rendering code handles product scale. */
:root {
  --ahp-app-height: 100vh;
  --ahp-header-height: calc(56px + env(safe-area-inset-top, 0px));
  --ahp-footer-height: calc(22px + env(safe-area-inset-bottom, 0px));
  --ahp-glyph-size: 35px;
  --ahp-control-size: 36px;
  --ahp-field-height: 48px;
  --ahp-ok: #199c4b;
}
@supports (height: 100dvh) { :root { --ahp-app-height: 100dvh; } }
html.ahp-layout-v497, html.ahp-layout-v497 body {
  width: 100% !important; min-width: 0 !important; max-width: 100% !important;
  height: 100% !important; min-height: 0 !important; max-height: 100% !important;
  margin: 0 !important; padding: 0 !important; overflow: hidden !important;
  zoom: 1 !important; overscroll-behavior: none;
}
html.ahp-layout-v497 body #app,
html.ahp-layout-v497 body > .ahp-checkout-page {
  position: fixed !important; inset: var(--ahp-viewport-top, 0px) 0 auto 0 !important;
  width: 100% !important; max-width: 100% !important; min-width: 0 !important;
  height: var(--ahp-app-height) !important; min-height: 0 !important;
  max-height: var(--ahp-app-height) !important; overflow: hidden !important;
  margin: 0 !important; padding: 0 !important; transform: none !important;
}
html.ahp-layout-v497 #app #startScreen,
html.ahp-layout-v497 #app #editorScreen {
  display: flex !important; flex-direction: column !important;
  height: calc(var(--ahp-app-height) - var(--ahp-footer-height)) !important;
  min-height: 0 !important; max-height: none !important;
  width: 100% !important; min-width: 0 !important;
  padding: var(--ahp-header-height) 0 0 !important; margin: 0 !important;
  box-sizing: border-box !important; overflow: hidden !important;
}
html.ahp-layout-v497 #app #startScreen.hidden,
html.ahp-layout-v497 #app #editorScreen.hidden,
html.ahp-layout-v497 .hidden,
html.ahp-layout-v497 [hidden] { display: none !important; }

/* HEADER: one flex row, no absolute-positioned text/navigation. */
html.ahp-layout-v497 body :is(#startHeader, #editorHeader, #checkoutHeader).app-header {
  position: fixed !important; inset: var(--ahp-viewport-top, 0px) 0 auto 0 !important;
  display: flex !important; align-items: center !important; justify-content: space-between !important;
  width: 100% !important; height: var(--ahp-header-height) !important;
  min-height: var(--ahp-header-height) !important; max-height: var(--ahp-header-height) !important;
  padding: env(safe-area-inset-top, 0px) max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px)) !important;
  gap: 20px !important; margin: 0 !important; box-sizing: border-box !important;
  background: #101010 !important; border: 0 !important; border-bottom: 2px solid #c11015 !important;
  overflow: visible !important; transform: none !important; z-index: 20000 !important;
  color: #fff !important; line-height: 1.2 !important;
}
html.ahp-layout-v497 :is(#startHeader, #editorHeader, #checkoutHeader) :is(.start-header-left, .editor-header-left, .start-header-right, .editor-header-right) {
  position: static !important; display: flex !important; align-items: center !important;
  justify-content: flex-start !important; flex-direction: row !important;
  gap: 18px !important; height: 100% !important; width: auto !important;
  min-width: 0 !important; max-width: none !important; margin: 0 !important;
  padding: 0 !important; transform: none !important; top: auto !important;
}
html.ahp-layout-v497 :is(#startHeader, #editorHeader, #checkoutHeader) :is(.start-header-left, .editor-header-left) { flex: 1 1 auto !important; }
html.ahp-layout-v497 :is(#startHeader, #editorHeader, #checkoutHeader) :is(.start-header-right, .editor-header-right) { flex: 0 0 auto !important; margin-left: auto !important; }
html.ahp-layout-v497 :is(#startHeader, #editorHeader, #checkoutHeader) :is(.brand, .brand-main-line, .brand-logo-link) {
  position: static !important; display: flex !important; align-items: center !important;
  height: auto !important; width: auto !important; min-width: 0 !important; flex: 0 0 auto !important;
  margin: 0 !important; padding: 0 !important; line-height: 1 !important; transform: none !important;
}
html.ahp-layout-v497 :is(#startHeader, #editorHeader, #checkoutHeader) .brand-logo {
  display: block !important; width: auto !important; height: var(--ahp-glyph-size) !important;
  min-width: 0 !important; max-width: 40vw !important; max-height: none !important;
  margin: 0 !important; padding: 0 !important; object-fit: contain !important;
}
html.ahp-layout-v497 :is(#startHeader, #editorHeader, #checkoutHeader) :is(.header-social-links, .editor-primary-actions, .start-header-wip-actions) {
  position: static !important; display: flex !important; align-items: center !important;
  flex: 0 0 auto !important; width: auto !important; height: auto !important;
  gap: 12px !important; margin: 0 !important; padding: 0 !important; transform: none !important;
}
html.ahp-layout-v497 :is(#startHeader, #editorHeader, #checkoutHeader) :is(.header-social-link) { width: var(--ahp-glyph-size) !important; height: var(--ahp-glyph-size) !important; }
html.ahp-layout-v497 :is(#startHeader, #editorHeader, #checkoutHeader) :is(.header-text-action, .start-header-action, .editor-primary-actions > button, .ahp-checkout-back) {
  position: relative !important; display: inline-flex !important; align-items: center !important;
  justify-content: center !important; flex: 0 0 auto !important;
  width: auto !important; min-width: 0 !important; height: 44px !important;
  padding: 0 2px !important; margin: 0 !important; font-size: 14px !important;
  line-height: 1.2 !important; white-space: nowrap !important; transform: none !important;
  border: 0 !important; box-shadow: none !important; background: transparent !important; color: #fff !important;
}
html.ahp-layout-v497 :is(#startHeader, #editorHeader, #checkoutHeader) :is(.top-summary-wrap, .header-menu-wrap, .ahp-mobile-header-controls, .ahp-mobile-header-menu-wrap) {
  position: relative !important; display: flex !important; align-items: center !important;
  justify-content: center !important; flex: 0 0 auto !important;
  min-width: 0 !important; width: auto !important; height: 100% !important;
  margin: 0 !important; padding: 0 !important; transform: none !important;
}
html.ahp-layout-v497 :is(#startHeader, #editorHeader, #checkoutHeader) :is(.top-summary-button, .header-menu-button, .ahp-mobile-menu-button, .ahp-mobile-cart-button) {
  position: relative !important; display: inline-flex !important; align-items: center !important; justify-content: center !important;
  flex: 0 0 auto !important; width: auto !important; min-width: 44px !important; max-width: none !important;
  height: 44px !important; min-height: 44px !important; max-height: none !important;
  gap: 8px !important; padding: 0 3px !important; margin: 0 !important;
  color: #fff !important; background: transparent !important; border: 0 !important;
  border-radius: 0 !important; box-shadow: none !important; transform: none !important;
  overflow: visible !important; line-height: 1 !important; transition: color .12s ease !important;
}
/* Remove the OLD CSS mask as well as the old image swaps. There is one SVG only. */
html.ahp-layout-v497 :is(#startHeader, #editorHeader, #checkoutHeader) :is(.top-summary-cart-visual, .top-summary-cart-icon, .ahp-header-icon-swap, .ahp-cart-icon-swap) {
  position: relative !important; display: flex !important; align-items: center !important; justify-content: center !important;
  flex: 0 0 var(--ahp-glyph-size) !important; width: var(--ahp-glyph-size) !important;
  min-width: var(--ahp-glyph-size) !important; max-width: var(--ahp-glyph-size) !important;
  height: var(--ahp-glyph-size) !important; min-height: var(--ahp-glyph-size) !important; max-height: var(--ahp-glyph-size) !important;
  inset: auto !important; margin: 0 !important; padding: 0 !important;
  -webkit-mask: none !important; mask: none !important; background: none !important;
  border: 0 !important; box-shadow: none !important; transform: none !important; overflow: visible !important;
}
html.ahp-layout-v497 :is(#startHeader, #editorHeader, #checkoutHeader) :is(.top-summary-cart-icon, .top-summary-cart-visual, .top-summary-button, .header-menu-button)::before,
html.ahp-layout-v497 :is(#startHeader, #editorHeader, #checkoutHeader) :is(.top-summary-cart-icon, .top-summary-cart-visual, .top-summary-button, .header-menu-button)::after { content: none !important; display: none !important; }
html.ahp-layout-v497 .app-header svg.ahp-header-glyph {
  display: block !important; position: static !important; width: var(--ahp-glyph-size) !important;
  height: var(--ahp-glyph-size) !important; min-width: 0 !important; max-width: none !important; max-height: none !important;
  margin: 0 !important; padding: 0 !important; transform: none !important; filter: none !important;
  overflow: visible !important; color: inherit !important;
}
html.ahp-layout-v497 .app-header .header-menu-label { display: none !important; }
html.ahp-layout-v497 :is(#startHeader, #editorHeader) .top-summary-cart-badge {
  position: absolute !important; left: auto !important; right: -3px !important; top: -1px !important;
  bottom: auto !important; transform: none !important; min-width: 19px !important;
  height: 17px !important; padding: 0 3px !important; display: grid !important; place-items: center !important;
  font-size: 10px !important; line-height: 1 !important; border: 1px solid currentColor !important;
  border-radius: 10px !important; color: inherit !important; background: #101010 !important; box-sizing: border-box !important;
}
html.ahp-layout-v497 .app-header .top-summary-main { display: flex !important; align-items: center !important; padding: 0 !important; margin: 0 !important; }
html.ahp-layout-v497 .app-header .top-summary-main strong { color: inherit !important; font-size: 16px !important; white-space: nowrap !important; }
@media (hover: hover) {
  html.ahp-layout-v497 :is(#startHeader, #editorHeader, #checkoutHeader) :is(.top-summary-button, .header-menu-button, .ahp-mobile-menu-button, .ahp-mobile-cart-button, .header-text-action, .start-header-action, .editor-primary-actions > button):hover {
    color: #e2232c !important; background: transparent !important; box-shadow: none !important; border-color: transparent !important;
  }
}
html.ahp-layout-v497 .app-header :is(button, a):focus-visible { outline: 2px solid #fff !important; outline-offset: 2px !important; }
@media (min-width: 1240px) {
  html.ahp-layout-v497 :is(#startHeader, #editorHeader, #checkoutHeader) :is(.header-menu-wrap, .ahp-mobile-header-controls) { display: none !important; }
}
@media (max-width: 1239.98px) {
  :root { --ahp-header-height: calc(48px + env(safe-area-inset-top, 0px)); --ahp-footer-height: calc(20px + env(safe-area-inset-bottom, 0px)); }
  html.ahp-layout-v497 :is(#startHeader, #editorHeader, #checkoutHeader) :is(.header-social-links, .editor-primary-actions, .start-header-wip-actions, .start-help-button, .editor-help-button, .ahp-checkout-back) { display: none !important; }
  html.ahp-layout-v497 :is(#startHeader, #editorHeader, #checkoutHeader) :is(.start-header-right, .editor-header-right) { gap: 8px !important; }
  html.ahp-layout-v497 .app-header .top-summary-main { display: none !important; }
}

/* Fixed application footer, including bottom safe-area. */
html.ahp-layout-v497 body .app-footer {
  position: fixed !important; inset: auto 0 auto 0 !important;
  top: calc(var(--ahp-viewport-top, 0px) + var(--ahp-app-height) - var(--ahp-footer-height)) !important;
  width: 100% !important; height: var(--ahp-footer-height) !important; min-height: var(--ahp-footer-height) !important;
  max-height: var(--ahp-footer-height) !important; margin: 0 !important;
  padding: 0 8px env(safe-area-inset-bottom, 0px) !important; box-sizing: border-box !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  background: #101010 !important; border-top: 1px solid #c11015 !important; line-height: 1.2 !important;
  z-index: 15000 !important; overflow: hidden !important; font-size: 11px !important;
}

/* Setup: the central content may scroll on a short phone, never the document. */
html.ahp-layout-v497 #startScreen .start-content-layout {
  display: flex !important; align-items: flex-start !important; justify-content: center !important;
  flex: 1 1 0 !important; width: 100% !important; min-width: 0 !important; max-width: none !important;
  height: auto !important; min-height: 0 !important; max-height: none !important;
  gap: 24px !important; overflow-x: hidden !important; overflow-y: auto !important;
  padding: clamp(12px, 2vh, 32px) clamp(12px, 3vw, 48px) !important; margin: 0 !important; box-sizing: border-box !important;
  overscroll-behavior: contain; scrollbar-gutter: stable;
}
html.ahp-layout-v497 #startScreen .start-card {
  flex: 1 1 auto !important; width: 100% !important; min-width: 0 !important; max-width: 1100px !important;
  height: auto !important; min-height: 0 !important; max-height: none !important; overflow: visible !important;
  margin: 0 !important; padding: clamp(18px, 2.8vw, 40px) !important; box-sizing: border-box !important;
}
html.ahp-layout-v497 #startScreen .start-usp { flex: 0 0 240px !important; width: 240px !important; max-width: 240px !important; }
html.ahp-layout-v497 #startScreen .start-title,
html.ahp-layout-v497 #startScreen .start-subtitle { white-space: normal !important; font-size: clamp(21px, 2vw, 32px) !important; line-height: 1.18 !important; }
html.ahp-layout-v497 #startScreen .chooser-block { margin: 16px 0 0 !important; padding: 0 !important; }
html.ahp-layout-v497 #startScreen .chooser-block h2 { font-size: 16px !important; line-height: 1.3 !important; margin: 0 0 10px !important; }
html.ahp-layout-v497 #startScreen .choice-grid {
  display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important; width: 100% !important; max-width: none !important;
}
html.ahp-layout-v497 #startScreen .choice-card,
html.ahp-layout-v497 #setupParamContent .setup-modal-option {
  position: relative !important; display: flex !important; align-items: center !important;
  gap: 12px !important; min-width: 0 !important; width: 100% !important;
  min-height: 54px !important; height: auto !important; max-height: none !important;
  padding: 9px 36px 9px 12px !important; margin: 0 !important; box-sizing: border-box !important;
  background: #fff !important; border: 2px solid #e0e4eb !important; border-radius: 15px !important;
  color: #111 !important; box-shadow: none !important; transform: none !important; text-align: left !important;
}
html.ahp-layout-v497 :is(#startScreen, #setupParamContent) :is(.choice-label, .setup-modal-option strong) { font-size: 14px !important; line-height: 1.25 !important; white-space: normal !important; }
html.ahp-layout-v497 :is(#startScreen, #setupParamContent) :is(.assembly-swatch, .numeric-swatch) { width: 32px !important; min-width: 32px !important; height: 32px !important; flex: 0 0 32px !important; }
html.ahp-layout-v497 :is(#startScreen, #setupParamContent) .color-brush-swatch { width: 60px !important; min-width: 60px !important; flex: 0 0 60px !important; height: 30px !important; }
html.ahp-layout-v497 :is(#startScreen, #setupParamContent) .color-brush-swatch img { width: 100% !important; height: 100% !important; object-fit: contain !important; }
html.ahp-layout-v497 #startScreen .choice-card.active,
html.ahp-layout-v497 #setupParamContent .setup-modal-option.active {
  border-color: var(--ahp-ok) !important; box-shadow: 0 0 0 3px rgb(25 156 75 / .14) !important;
}
html.ahp-layout-v497 #startScreen .choice-card.active::after,
html.ahp-layout-v497 #setupParamContent .setup-modal-option.active::after {
  content: "\2713" !important; position: absolute !important;
  top: 50% !important; right: 9px !important; bottom: auto !important; left: auto !important;
  transform: translateY(-50%) !important; width: 21px !important; height: 21px !important;
  box-sizing: border-box !important; display: grid !important; place-items: center !important;
  color: #fff !important; background: var(--ahp-ok) !important; border: 2px solid #fff !important;
  border-radius: 50% !important; font: 900 13px/1 Arial,sans-serif !important;
  box-shadow: 0 2px 6px rgb(22 112 56 / .24) !important; pointer-events: none !important;
}
html.ahp-layout-v497 #setupParamContent .setup-modal-option > input[type="radio"] { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
html.ahp-layout-v497 #startScreen .choice-card:focus-visible,
html.ahp-layout-v497 #setupParamContent .setup-modal-option:has(input:focus-visible) { outline: 2px solid #606b7a !important; outline-offset: 4px !important; }
@media (hover: hover) {
  html.ahp-layout-v497 #startScreen .choice-card:hover,
  html.ahp-layout-v497 #setupParamContent .setup-modal-option:hover { color: #c11015 !important; background: #fff !important; }
  html.ahp-layout-v497 #startScreen .choice-card:hover .choice-label,
  html.ahp-layout-v497 #setupParamContent .setup-modal-option:hover strong { color: #c11015 !important; }
}
html.ahp-layout-v497 :is(#startScreen .wall-input, #setupParamContent .setup-modal-input) { display: flex !important; flex-direction: column !important; gap: 7px !important; width: 100% !important; min-width: 0 !important; margin: 0 !important; }
html.ahp-layout-v497 :is(#startScreen .wall-input, #setupParamContent .setup-modal-input)::after { content: none !important; display: none !important; }
html.ahp-layout-v497 .ahp-wall-control { position: relative !important; display: block !important; width: 100% !important; height: var(--ahp-field-height) !important; }
html.ahp-layout-v497 :is(#startScreen, #setupParamContent) .ahp-wall-control input {
  display: block !important; width: 100% !important; min-width: 0 !important; height: var(--ahp-field-height) !important;
  margin: 0 !important; padding: 10px 40px 10px 12px !important; border: 1px solid #d3dbe7 !important;
  border-radius: 12px !important; box-sizing: border-box !important; font-size: 16px !important; line-height: 1.2 !important;
  box-shadow: none !important; background: #fff !important;
}
html.ahp-layout-v497 :is(#startScreen, #setupParamContent) .is-valid .ahp-wall-control input { border-color: var(--ahp-ok) !important; box-shadow: 0 0 0 3px rgb(25 156 75 / .14) !important; }
html.ahp-layout-v497 :is(#startScreen, #setupParamContent) .is-invalid .ahp-wall-control input { border-color: #c11015 !important; }
html.ahp-layout-v497 .ahp-wall-valid-mark {
  display: none !important; position: absolute !important; top: 50% !important; right: 10px !important;
  width: 21px !important; height: 21px !important; transform: translateY(-50%) !important; box-sizing: border-box !important;
  place-items: center !important; background: var(--ahp-ok) !important; color: #fff !important;
  border: 2px solid #fff !important; border-radius: 50% !important; font: 900 13px/1 Arial,sans-serif !important; pointer-events: none !important;
}
html.ahp-layout-v497 .is-valid > .ahp-wall-control > .ahp-wall-valid-mark { display: grid !important; }
html.ahp-layout-v497 #startScreen .wall-inputs { max-width: none !important; width: 66.66% !important; gap: 14px !important; }
html.ahp-layout-v497 #startScreen .start-actions { flex-wrap: wrap !important; gap: 10px !important; margin-top: 18px !important; }
html.ahp-layout-v497 #startScreen .start-actions > * { max-width: 100% !important; white-space: normal !important; min-height: 44px !important; }
html.ahp-layout-v497 #setupParamContent .setup-modal-options { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 10px !important; }
html.ahp-layout-v497 #setupParamContent .setup-modal-wall-corner { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 14px !important; }
@media (max-width: 1439px) { html.ahp-layout-v497 #startScreen .start-usp { display: none !important; } }
@media (max-width: 700px) {
  html.ahp-layout-v497 #startScreen .start-content-layout { padding: 10px !important; }
  html.ahp-layout-v497 #startScreen .start-card { padding: 18px 14px !important; border-radius: 20px !important; }
  html.ahp-layout-v497 #startScreen :is(.assembly-grid, .depth-grid) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  html.ahp-layout-v497 #startScreen .choice-grid { gap: 8px !important; }
  html.ahp-layout-v497 #startScreen .wall-inputs { width: 100% !important; }
  html.ahp-layout-v497 #startScreen .choice-card,
  html.ahp-layout-v497 #setupParamContent .setup-modal-option { gap: 7px !important; padding-left: 8px !important; padding-right: 28px !important; min-height: 52px !important; }
  html.ahp-layout-v497 :is(#startScreen, #setupParamContent) .color-brush-swatch { width: 28px !important; min-width: 28px !important; flex-basis: 28px !important; height: 22px !important; }
  html.ahp-layout-v497 #startScreen .choice-card.active::after,
  html.ahp-layout-v497 #setupParamContent .setup-modal-option.active::after { right: 5px !important; width: 19px !important; height: 19px !important; font-size: 11px !important; }
  html.ahp-layout-v497 #setupParamContent .setup-modal-options { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  html.ahp-layout-v497 #startScreen #colorChoices .choice-card { flex-direction: column !important; align-items: flex-start !important; gap: 3px !important; }
}
@media (max-width: 359px) {
  html.ahp-layout-v497 #startScreen :is(.assembly-swatch, .numeric-swatch) { display: none !important; }
  html.ahp-layout-v497 #startScreen .start-actions { display: grid !important; grid-template-columns: minmax(0,1fr) !important; }
}

/* EDITOR: bounded panes. Portrait uses a lower catalogue; landscape uses a sidebar. */
html.ahp-layout-v497 #editorScreen .editor-shell {
  display: grid !important; grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) !important;
  grid-template-areas: "workspace" "catalog" !important;
  flex: 1 1 0 !important; width: 100% !important; height: auto !important; min-height: 0 !important;
  max-height: none !important; min-width: 0 !important; gap: 0 !important; overflow: hidden !important;
  margin: 0 !important; padding: 0 !important;
}
html.ahp-layout-v497 #editorScreen :is(.catalog-panel, .workspace-panel) {
  min-height: 0 !important; min-width: 0 !important; max-height: none !important;
  max-width: none !important; width: 100% !important; height: 100% !important;
  position: relative !important; margin: 0 !important; box-sizing: border-box !important;
  display: flex !important; flex-direction: column !important; overflow: hidden !important;
}
html.ahp-layout-v497 #editorScreen .workspace-panel { grid-area: workspace !important; padding: 0 !important; }
html.ahp-layout-v497 #editorScreen .catalog-panel { grid-area: catalog !important; padding: 7px !important; gap: 6px !important; background: #fff !important; }
html.ahp-layout-v497 #editorScreen :is(.editor-promo-bar, .catalog-head, .corner-insert-panel, .category-tabs) { flex: 0 0 auto !important; margin: 0 !important; min-width: 0 !important; }
html.ahp-layout-v497 #editorScreen .catalog-head { display: block !important; height: auto !important; padding: 0 !important; }
html.ahp-layout-v497 #editorScreen #catalogModeTabs { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; width: 100% !important; gap: 6px !important; }
html.ahp-layout-v497 #editorScreen .catalog-mode-tab { display: block !important; min-width: 0 !important; min-height: 36px !important; padding: 6px !important; font-size: 14px !important; font-weight: 800 !important; line-height: 1.2 !important; border: 1px solid #d8dfe8 !important; border-radius: 9px !important; }
html.ahp-layout-v497 #editorScreen .catalog-mode-tab.active { color: #c11015 !important; background: #fff !important; border-color: #c11015 !important; }
html.ahp-layout-v497 #editorScreen #catalogStatus { display: none !important; }
html.ahp-layout-v497 #editorScreen #categoryTabs {
  display: grid !important; grid-template-columns: repeat(8,minmax(0,1fr)) !important;
  gap: 5px !important; height: auto !important; min-height: 0 !important;
  max-height: none !important; width: 100% !important; overflow: visible !important; padding: 0 !important;
}
html.ahp-layout-v497 #editorScreen #categoryTabs .category-icon-tab {
  width: 100% !important; min-width: 0 !important; max-width: none !important;
  height: 36px !important; min-height: 36px !important; padding: 4px !important; box-sizing: border-box !important;
}
html.ahp-layout-v497 #editorScreen #categoryTabs .category-icon-tab img { max-width: 100% !important; max-height: 100% !important; width: 100% !important; height: 100% !important; object-fit: contain !important; }
html.ahp-layout-v497 #editorScreen #productList.product-list {
  display: grid !important; grid-template-columns: repeat(auto-fit,minmax(min(100%, 240px),1fr)) !important;
  align-content: start !important; align-items: start !important; grid-auto-rows: max-content !important;
  flex: 1 1 0 !important; min-height: 0 !important; height: auto !important; max-height: none !important;
  width: 100% !important; min-width: 0 !important; overflow-x: hidden !important; overflow-y: auto !important;
  gap: 8px !important; padding: 2px 3px 8px !important; overscroll-behavior: contain; scrollbar-gutter: stable;
}
html.ahp-layout-v497 #editorScreen #productList :is(.product-card,.product-card-ref) {
  --pc-img-w: 64px !important; display: grid !important; grid-template-columns: 64px minmax(0,1fr) !important;
  grid-template-areas: "media main" "divider divider" "bottom bottom" !important;
  grid-template-rows: minmax(74px,auto) 1px 38px !important; gap: 5px 9px !important;
  width: 100% !important; min-width: 0 !important; max-width: none !important; min-height: 144px !important;
  height: auto !important; max-height: none !important; margin: 0 !important; padding: 8px !important;
  overflow: visible !important; flex: none !important; box-sizing: border-box !important;
}
html.ahp-layout-v497 #editorScreen #productList :is(.product-media, .product-main) { height: auto !important; min-height: 74px !important; max-height: none !important; min-width: 0 !important; overflow: visible !important; }
html.ahp-layout-v497 #editorScreen #productList .product-thumb { width: 64px !important; min-width: 64px !important; max-width: 64px !important; height: 72px !important; min-height: 72px !important; max-height: 72px !important; padding: 2px !important; }
html.ahp-layout-v497 #editorScreen #productList .product-title { font-size: 14px !important; line-height: 1.2 !important; max-height: none !important; white-space: normal !important; overflow: visible !important; display: block !important; -webkit-line-clamp: unset !important; overflow-wrap: anywhere; }
html.ahp-layout-v497 #editorScreen #productList :is(.product-code, .stock-line) { font-size: 12px !important; line-height: 1.2 !important; }
html.ahp-layout-v497 #editorScreen #productList .product-bottom { display: grid !important; grid-template-columns: minmax(0,1fr) auto !important; gap: 6px !important; min-width: 0 !important; min-height: 38px !important; height: auto !important; max-height: none !important; overflow: visible !important; }
html.ahp-layout-v497 #editorScreen #productList .product-controls { display: grid !important; grid-template-columns: repeat(3,32px) !important; width: 96px !important; min-width: 96px !important; max-width: 96px !important; height: 36px !important; min-height: 36px !important; gap: 0 !important; }
html.ahp-layout-v497 #editorScreen #productList :is(.product-sub,.product-add,.product-count,.product-count-input) { width: 32px !important; min-width: 32px !important; max-width: 32px !important; height: 36px !important; min-height: 36px !important; max-height: 36px !important; line-height: 36px !important; padding: 0 !important; }
html.ahp-layout-v497 #editorScreen #productList .product-price { align-items: flex-start !important; font-size: 14px !important; }
html.ahp-layout-v497 #editorScreen #productList .product-price-old { font-size: 11px !important; }
html.ahp-layout-v497 #editorScreen #cornerInsertPanel:empty { display: none !important; }

/* Toolbar controls never disappear into a horizontal off-screen strip. */
html.ahp-layout-v497 #editorScreen .workspace-toolbar {
  flex: 0 0 auto !important; display: flex !important; flex-wrap: wrap !important;
  align-items: center !important; justify-content: space-between !important;
  width: 100% !important; height: auto !important; min-height: 44px !important; max-height: none !important;
  padding: 4px 6px !important; gap: 4px 6px !important; overflow: visible !important; box-sizing: border-box !important;
}
html.ahp-layout-v497 #editorScreen .toolbar-main-controls {
  display: flex !important; flex: 1 1 auto !important; align-items: center !important; flex-wrap: wrap !important;
  min-width: 0 !important; width: auto !important; max-width: none !important; gap: 4px !important;
  height: auto !important; overflow: visible !important; padding: 0 !important;
}
html.ahp-layout-v497 #editorScreen .toolbar-group { flex: 0 0 auto !important; min-width: 0 !important; margin: 0 !important; }
html.ahp-layout-v497 #editorScreen .workspace-toolbar :is(button, .icon-btn, .toolbar-history-btn, .toolbar-layout-btn, .minimap-arrow) {
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  width: var(--ahp-control-size) !important; min-width: var(--ahp-control-size) !important; max-width: var(--ahp-control-size) !important;
  height: var(--ahp-control-size) !important; min-height: var(--ahp-control-size) !important; max-height: var(--ahp-control-size) !important;
  margin: 0 !important; padding: 0 !important; box-sizing: border-box !important;
}
html.ahp-layout-v497 #editorScreen .workspace-toolbar button :is(img,svg) { width: 20px !important; height: 20px !important; max-width: 20px !important; max-height: 20px !important; }
html.ahp-layout-v497 #editorScreen .workspace-toolbar #zoomLabel { width: 52px !important; min-width: 52px !important; max-width: 52px !important; font-size: 12px !important; }
html.ahp-layout-v497 #editorScreen .workspace-toolbar .floorplan-toolbar-button span { display: none !important; }
html.ahp-layout-v497 #editorScreen .toolbar-minimap.stage-minimap { position: static !important; inset: auto !important; order: 99 !important; flex: 0 0 auto !important; display: flex !important; height: 36px !important; width: auto !important; margin: 0 0 0 auto !important; visibility: visible !important; opacity: 1 !important; }
html.ahp-layout-v497 #editorScreen #stageViewport {
  flex: 1 1 0 !important; display: block !important; position: relative !important;
  width: 100% !important; height: auto !important; min-width: 0 !important; min-height: 0 !important;
  max-width: none !important; max-height: none !important; margin: 0 !important;
  padding: 28px 18px 36px 38px !important; box-sizing: border-box !important;
  overflow: auto !important; overscroll-behavior: contain; scrollbar-width: none !important;
}
html.ahp-layout-v497 #editorScreen #stageViewport::-webkit-scrollbar { display: none !important; }
html.ahp-layout-v497 #editorScreen #stageScaleShell { position: relative !important; flex: 0 0 auto !important; min-width: 0 !important; min-height: 0 !important; max-width: none !important; max-height: none !important; margin: 0 !important; padding: 0 !important; }
html.ahp-layout-v497 #editorScreen #stage { margin: 0 !important; padding: 0 !important; }
html.ahp-layout-v497 #editorScreen .mobile-nudge { flex: 0 0 auto !important; }
.minimap-object { min-width: 0 !important; min-height: 0 !important; }
@media (min-width: 1000px), (min-width: 640px) and (orientation: landscape), (min-width: 520px) and (max-height: 500px) and (orientation: landscape) {
  html.ahp-layout-v497 #editorScreen .editor-shell { grid-template-columns: clamp(230px,25vw,360px) minmax(0,1fr) !important; grid-template-rows: minmax(0,1fr) !important; grid-template-areas: "catalog workspace" !important; }
  html.ahp-layout-v497 #editorScreen #categoryTabs { grid-template-columns: repeat(4,minmax(0,1fr)) !important; }
  html.ahp-layout-v497 #editorScreen #productList.product-list { grid-template-columns: minmax(0,1fr) !important; }
}
@media (max-width: 999px) and (orientation: landscape) {
  html.ahp-layout-v497 #editorScreen .editor-shell { grid-template-columns: clamp(212px,29vw,270px) minmax(0,1fr) !important; }
  html.ahp-layout-v497 #editorScreen .catalog-panel { gap: 4px !important; padding: 5px !important; }
}
@media (max-width: 600px) and (orientation: portrait) {
  :root { --ahp-control-size: 32px; }
  html.ahp-layout-v497 #editorScreen .workspace-toolbar { gap: 4px !important; }
  html.ahp-layout-v497 #editorScreen .toolbar-main-controls { gap: 3px !important; }
  html.ahp-layout-v497 #editorScreen .toolbar-minimap.stage-minimap { width: 100% !important; justify-content: flex-end !important; height: 30px !important; }
  html.ahp-layout-v497 #editorScreen #stageViewport { padding: 22px 10px 28px 28px !important; }
}
@media (max-height: 620px) {
  html.ahp-layout-v497 #editorScreen .editor-promo-bar { padding-block: 4px !important; }
  html.ahp-layout-v497 #editorScreen .promo-progress { display: none !important; }
}
@media (min-width: 2400px) and (min-height: 1200px) {
  :root { --ahp-header-height: 64px; --ahp-footer-height: 26px; --ahp-glyph-size: 40px; --ahp-control-size: 42px; }
  html.ahp-layout-v497 #editorScreen .editor-shell { grid-template-columns: clamp(400px,15vw,520px) minmax(0,1fr) !important; }
  html.ahp-layout-v497 .app-header :is(.header-text-action, .start-header-action, .editor-primary-actions > button) { font-size: 17px !important; }
  html.ahp-layout-v497 #editorScreen #productList .product-title { font-size: 17px !important; }
  html.ahp-layout-v497 #editorScreen #productList :is(.product-code,.stock-line) { font-size: 14px !important; }
  html.ahp-layout-v497 #editorScreen #productList :is(.product-card,.product-card-ref) { min-height: 180px !important; }
  html.ahp-layout-v497 #editorScreen .catalog-mode-tab { min-height: 44px !important; font-size: 17px !important; }
  html.ahp-layout-v497 #editorScreen #categoryTabs .category-icon-tab { height: 46px !important; }
}

/* Cart and menus stay inside the visible viewport and only their item list scrolls. */
html.ahp-layout-v497 :is(#startHeader, #editorHeader) .top-summary-dropdown {
  position: fixed !important; top: calc(var(--ahp-viewport-top, 0px) + var(--ahp-header-height) + 8px) !important;
  right: max(8px,env(safe-area-inset-right,0px)) !important; left: auto !important;
  width: min(740px,calc(100vw - 16px)) !important; min-width: 0 !important; max-width: calc(100vw - 16px) !important;
  max-height: calc(var(--ahp-app-height) - var(--ahp-header-height) - var(--ahp-footer-height) - 16px) !important;
  overflow: hidden !important; z-index: 25000 !important; box-sizing: border-box !important;
}
html.ahp-layout-v497 :is(.ahp-mobile-header-menu, #headerMenuDropdown) {
  position: fixed !important; top: calc(var(--ahp-viewport-top,0px) + var(--ahp-header-height) + 4px) !important;
  right: max(8px, env(safe-area-inset-right,0px)) !important; left: auto !important;
  width: min(320px,calc(100vw - 16px)) !important; min-width: 0 !important;
  max-height: calc(var(--ahp-app-height) - var(--ahp-header-height) - var(--ahp-footer-height) - 8px) !important;
  overflow: auto !important; z-index: 26000 !important;
}
body:has(.top-summary-dropdown:not(.hidden)) .corner-config-gear-body,
body:has([data-ahp-mobile-menu]:not([hidden])) .corner-config-gear-body,
body:has(.setup-param-overlay:not(.hidden)) .corner-config-gear-body { display: none !important; }

/* Modal frames stay visible. Scrolling is confined to modal content. */
html.ahp-layout-v497 :is(.setup-param-overlay,.save-config-overlay,.help-overlay,.floorplan-overlay) {
  position: fixed !important; top: var(--ahp-viewport-top,0px) !important; left: 0 !important; right: 0 !important;
  bottom: auto !important; height: var(--ahp-app-height) !important; padding: 12px !important;
  box-sizing: border-box !important; overflow: hidden !important;
}
html.ahp-layout-v497 :is(.setup-param-modal,.save-config-modal,.help-modal,.floorplan-modal) {
  width: min(820px,calc(100vw - 24px)) !important; min-width: 0 !important; max-width: calc(100vw - 24px) !important;
  max-height: calc(var(--ahp-app-height) - 24px) !important; margin: auto !important;
  box-sizing: border-box !important; display: flex !important; flex-direction: column !important;
  overflow: hidden !important; padding: 20px !important;
}
html.ahp-layout-v497 :is(.setup-param-modal > h3,.save-config-modal > h3) { flex: 0 0 auto !important; margin: 0 44px 14px 0 !important; line-height: 1.25 !important; }
html.ahp-layout-v497 :is(.setup-param-content,.app-dialog-content,.help-modal-layout,.save-config-scroll-area) { flex: 1 1 auto !important; min-height: 0 !important; min-width: 0 !important; overflow-x: hidden !important; overflow-y: auto !important; padding: 4px !important; overscroll-behavior: contain; }
html.ahp-layout-v497 :is(.setup-param-actions,.save-config-actions) { flex: 0 0 auto !important; min-height: 44px !important; padding-top: 12px !important; margin: 0 !important; gap: 10px !important; flex-wrap: wrap !important; }
html.ahp-layout-v497 .setup-modal-section { margin: 0 0 18px !important; }
html.ahp-layout-v497 .setup-modal-section h4 { margin: 0 0 10px !important; font-size: 15px !important; line-height: 1.3 !important; }
html.ahp-layout-v497 .floorplan-modal { width: min(1280px,calc(100vw - 24px)) !important; height: calc(var(--ahp-app-height) - 24px) !important; }
html.ahp-layout-v497 .floorplan-modal-head { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; }
html.ahp-layout-v497 .floorplan-canvas-wrap { flex: 1 1 auto !important; min-height: 0 !important; }
html.ahp-layout-v497 .floorplan-meta { display: flex !important; flex-wrap: wrap !important; width: 100% !important; gap: 6px !important; }
@media (max-width: 600px) {
  html.ahp-layout-v497 :is(.setup-param-modal,.save-config-modal,.help-modal,.floorplan-modal) { padding: 16px 12px !important; border-radius: 16px !important; }
  html.ahp-layout-v497 #setupParamContent .setup-modal-wall-corner { gap: 10px !important; }
}

/* One shared tooltip; native popover puts it above even native <dialog>. */
html.ahp-layout-v497 [data-tooltip]::before,
html.ahp-layout-v497 [data-tooltip]::after { content: none !important; display: none !important; }
html.ahp-layout-v497 .ahp-safe-tooltip {
  position: fixed !important; inset: auto; margin: 0 !important; z-index: 2147483647 !important;
  width: max-content !important; max-width: min(330px,calc(100vw - 16px)) !important;
  padding: 10px 12px !important; border: 1px solid #cbd2da !important; border-radius: 9px !important;
  background: #fff !important; color: #161b22 !important; box-shadow: 0 8px 25px rgb(0 0 0 / .2) !important;
  font: 700 13px/1.4 Arial,sans-serif !important; white-space: normal !important; overflow-wrap: anywhere;
  pointer-events: none !important; box-sizing: border-box !important;
}
html.ahp-layout-v497 .ahp-safe-tooltip::backdrop { background: transparent; pointer-events: none; }

/* Checkout/confirmation are forms, not canvases: scroll their MAIN pane. */
html.ahp-layout-v497 :is(.ahp-checkout-main,.ahp-sent-main) {
  position: absolute !important; top: var(--ahp-header-height) !important;
  bottom: var(--ahp-footer-height) !important; left: 0 !important; right: 0 !important;
  width: 100% !important; height: auto !important; min-height: 0 !important; max-height: none !important;
  max-width: none !important; margin: 0 !important; padding: clamp(12px,2vw,32px) !important;
  overflow-x: hidden !important; overflow-y: auto !important; box-sizing: border-box !important;
  overscroll-behavior: contain; scrollbar-gutter: stable;
}
html.ahp-layout-v497 .ahp-checkout-grid,
html.ahp-layout-v497 .ahp-konfigurator-form-section,
html.ahp-layout-v497 .ahp-sent-content { max-width: 1440px !important; width: 100% !important; margin-left: auto !important; margin-right: auto !important; min-width: 0 !important; }
html.ahp-layout-v497 .ahp-checkout-page .ahp-cell-label { display: none !important; }
html.ahp-layout-v497 .ahp-checkout-page :is(.ahp-row-title,.ahp-row-code) { white-space: normal !important; overflow-wrap: anywhere !important; }
@media (min-width: 1100px) {
  html.ahp-layout-v497 .ahp-checkout-page :is(.ahp-row,.ahp-table-head,.ahp-section-total) { grid-template-columns: 64px minmax(0,1fr) 70px 104px 104px !important; gap: 12px !important; }
}
@media (max-width: 1099px) {
  html.ahp-layout-v497 .ahp-checkout-grid { grid-template-columns: minmax(0,1fr) !important; }
  html.ahp-layout-v497 .ahp-checkout-grid > * { grid-column: 1 !important; min-width: 0 !important; }
  html.ahp-layout-v497 .ahp-checkout-page .ahp-table-head { display: none !important; }
  html.ahp-layout-v497 .ahp-checkout-page .ahp-row { grid-template-columns: 56px minmax(0,1fr) !important; grid-template-rows: auto !important; gap: 8px 12px !important; padding: 14px 0 !important; }
  html.ahp-layout-v497 .ahp-checkout-page .ahp-row > .ahp-row-media { grid-column: 1 !important; grid-row: 1 !important; width: 56px !important; height: 64px !important; }
  html.ahp-layout-v497 .ahp-checkout-page .ahp-row > .ahp-row-main { grid-column: 2 !important; grid-row: 1 !important; min-width: 0 !important; }
  html.ahp-layout-v497 .ahp-checkout-page .ahp-row > .ahp-row-cell { grid-column: 1 / -1 !important; grid-row: auto !important; display: flex !important; justify-content: space-between !important; gap: 10px !important; margin: 0 !important; }
  html.ahp-layout-v497 .ahp-checkout-page .ahp-cell-label { display: block !important; color: #617086 !important; font-size: 12px !important; }
  html.ahp-layout-v497 .ahp-checkout-page .ahp-section-total { grid-template-columns: minmax(0,1fr) !important; gap: 8px !important; }
  html.ahp-layout-v497 .ahp-checkout-page .ahp-section-total > * { grid-column: 1 !important; display: flex !important; justify-content: space-between !important; }
}
html.ahp-layout-v497 .ahp-checkout-help-dialog { width: min(460px,calc(100vw - 24px)); max-height: calc(var(--ahp-app-height) - 24px); box-sizing: border-box; padding: 24px; overflow: auto; border: 1px solid #dfe4eb; border-radius: 18px; background: #fff; color: #111; }
html.ahp-layout-v497 .ahp-checkout-help-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #b62328; color: #fff; font-size: 26px; }

/* Explicit IDs resolve the last legacy header/minimap/image overrides. */
@media (max-width: 1239.98px) {
  html.ahp-layout-v497 #editorHeader #helpButton,
  html.ahp-layout-v497 #startHeader #startHelpButton,
  html.ahp-layout-v497 #checkoutHeader .ahp-checkout-back { display: none !important; }
}
html.ahp-layout-v497 #editorScreen #categoryTabs .category-icon-tab {
  display: flex !important; align-items: center !important; justify-content: center !important;
  overflow: hidden !important;
}
html.ahp-layout-v497 #editorScreen #categoryTabs .category-icon-tab img {
  display: block !important; width: 100% !important; height: 26px !important;
  min-width: 0 !important; min-height: 0 !important; max-width: 100% !important; max-height: 26px !important;
  margin: 0 !important; padding: 0 !important; object-fit: contain !important; transform: none !important;
}
html.ahp-layout-v497 #editorScreen #stageMinimap {
  width: auto !important; min-width: 0 !important; max-width: none !important;
  flex: 0 0 auto !important; overflow: visible !important; gap: 3px !important;
}
html.ahp-layout-v497 #editorScreen #stageMinimap #minimapTrack {
  width: var(--minimap-track-w,160px) !important; min-width: 60px !important;
  max-width: 220px !important; height: 26px !important; min-height: 0 !important;
  flex: 0 0 auto !important; margin: 0 !important;
}
@media (max-width: 600px) and (orientation: portrait) {
  html.ahp-layout-v497 #editorScreen #stageMinimap {
    width: 100% !important; justify-content: flex-end !important;
  }
  html.ahp-layout-v497 #editorScreen #stageMinimap #minimapTrack {
    width: min(42vw,180px) !important; max-width: 180px !important;
  }
}
@media (min-width: 2400px) and (min-height: 1200px) {
  html.ahp-layout-v497 #editorScreen #categoryTabs .category-icon-tab img { height: 36px !important; max-height: 36px !important; }
}
html.ahp-layout-v497 #setupParamContent [data-wall-mode].hidden,
html.ahp-layout-v497 #setupParamContent .ahp-wall-valid-mark.hidden,
html.ahp-layout-v497 .app-header .hidden,
html.ahp-layout-v497 #startScreen [hidden],
html.ahp-layout-v497 #editorScreen [hidden] { display: none !important; }
html.ahp-layout-v497 #app #startScreen .start-content-layout { flex-direction: row !important; }
html.ahp-layout-v497 #app #startScreen .hidden,
html.ahp-layout-v497 #app #editorScreen .hidden,
html.ahp-layout-v497 #app [hidden] { display: none !important; }
html.ahp-layout-v497 #app #startScreen .start-action-set { display: flex !important; flex-wrap: wrap !important; gap: 10px !important; }
html.ahp-layout-v497 #app #startScreen .start-action-set.hidden { display: none !important; }
html.ahp-layout-v497 #app #startScreen .start-action-set > button { white-space: normal !important; min-height: 44px !important; max-width: 100% !important; }
@media (max-width: 1239.98px) {
  html.ahp-layout-v497 #startHeader #startTopSummaryButton .top-summary-main,
  html.ahp-layout-v497 #editorHeader #topSummaryButton .top-summary-main { display: none !important; }
}
@media (max-width: 600px) and (orientation: portrait) {
  html.ahp-layout-v497 #editorScreen .toolbar-main-controls { display: contents !important; }
  html.ahp-layout-v497 #editorScreen #stageMinimap { width: auto !important; }
}
@media (max-width: 359px) {
  html.ahp-layout-v497 #app #startScreen .start-action-set > button { width: 100% !important; }
}
@media (max-width: 359px) {
  html.ahp-layout-v497 #app #startScreen #colorChoices { grid-template-columns: minmax(0,1fr) !important; }
  html.ahp-layout-v497 #app #startScreen #colorChoices .choice-card {
    flex-direction: row !important; align-items: center !important; gap: 10px !important;
  }
  html.ahp-layout-v497 #app #startScreen #colorChoices .choice-label { white-space: nowrap !important; }
}
@media (max-width: 1239.98px) {
  html.ahp-layout-v497 #checkoutHeader #sentHeaderHelpButton { display: none !important; }
  html.ahp-layout-v497 .ahp-sent-page #checkoutHeader .ahp-mobile-header-controls {
    display: flex !important; position: static !important; gap: 8px !important;
    width: auto !important; height: 44px !important; margin: 0 !important;
  }
  html.ahp-layout-v497 .ahp-sent-page #checkoutHeader .ahp-mobile-menu-button,
  html.ahp-layout-v497 .ahp-sent-page #checkoutHeader .ahp-mobile-cart-button {
    display: inline-flex !important; position: relative !important;
    align-items: center !important; justify-content: center !important;
    inset: auto !important; height: 44px !important; width: 44px !important;
    min-width: 44px !important; max-width: 44px !important; padding: 0 !important;
  }
}
html.ahp-layout-v497 #checkoutHeader .ahp-mobile-cart-badge {
  position: absolute !important; top: 0 !important; right: 0 !important; left: auto !important; bottom: auto !important;
  transform: none !important; height: 17px !important; min-width: 19px !important; padding: 0 3px !important;
  display: grid !important; place-items: center !important; box-sizing: border-box !important;
  font: 700 10px/1 Arial,sans-serif !important; border: 1px solid currentColor !important;
  border-radius: 10px !important; color: inherit !important; background: #101010 !important;
}
html.ahp-layout-v497 #checkoutHeader .ahp-mobile-cart-badge[hidden] { display: none !important; }
html.ahp-layout-v497 #editorScreen #productList .price-sale { font-size: 14px !important; line-height: 1.2 !important; white-space: nowrap !important; }
html.ahp-layout-v497 #editorScreen #productList .price-old { font-size: 11px !important; line-height: 1.2 !important; white-space: nowrap !important; }
html.ahp-layout-v497 #editorScreen #productList :is(.product-count-input,.product-sub,.product-add) { font-size: 14px !important; }
html.ahp-layout-v497 #saveConfigOverlay #saveConfigContent {
  display: flex !important; flex-direction: column !important; flex: 1 1 auto !important;
  min-height: 0 !important; overflow: hidden !important;
}
html.ahp-layout-v497 #saveConfigOverlay #saveConfigContent.hidden { display: none !important; }
@media (max-width: 600px) {
  html.ahp-layout-v497 :is(#startTopSummaryDropdown,#topSummaryDropdown) :is(.top-summary-cart-row,.top-summary-cart-head) {
    display: grid !important; grid-template-columns: 30px minmax(0,1fr) 54px 0 80px !important;
    column-gap: 5px !important; align-items: center !important;
  }
  html.ahp-layout-v497 :is(#startTopSummaryDropdown,#topSummaryDropdown) .top-summary-cart-media { width: 30px !important; min-width: 0 !important; }
  html.ahp-layout-v497 :is(#startTopSummaryDropdown,#topSummaryDropdown) .top-summary-cart-main { min-width: 0 !important; padding: 0 !important; }
  html.ahp-layout-v497 :is(#startTopSummaryDropdown,#topSummaryDropdown) .top-summary-cart-main strong { font-size: 13px !important; line-height: 1.25 !important; white-space: normal !important; overflow-wrap: anywhere !important; }
  html.ahp-layout-v497 :is(#startTopSummaryDropdown,#topSummaryDropdown) .top-summary-cart-head { font-size: 11px !important; padding: 8px 0 !important; margin: 0 2px !important; }
  html.ahp-layout-v497 :is(#startTopSummaryDropdown,#topSummaryDropdown) :is(.top-summary-cart-head,.top-summary-cart-row) > :nth-child(5) { grid-column: 5 !important; justify-self: start !important; }
  html.ahp-layout-v497 :is(#startTopSummaryDropdown,#topSummaryDropdown) .top-summary-cart-head > :nth-child(5) { white-space: nowrap !important; }
  html.ahp-layout-v497 :is(#startTopSummaryDropdown,#topSummaryDropdown) :is(.top-summary-cart-qty,.top-summary-cart-price) { font-size: 12px !important; white-space: nowrap !important; padding: 0 !important; }
}
@media (min-width: 2400px) and (min-height: 1200px) {
  html.ahp-layout-v497 #startScreen .start-card { max-width: 1440px !important; }
  html.ahp-layout-v497 #startScreen :is(.start-title,.start-subtitle) { font-size: 38px !important; }
  html.ahp-layout-v497 #startScreen .choice-card { min-height: 64px !important; }
  html.ahp-layout-v497 #startScreen :is(.choice-label,.chooser-block h2) { font-size: 18px !important; }
  html.ahp-layout-v497 #editorScreen #productList .price-sale { font-size: 17px !important; }
}

/* v498: targeted corrections only. Model dimensions and business rules unchanged. */
html.ahp-layout-v497 body :is(#startHeader,#editorHeader,#checkoutHeader).app-header {
  padding-left: max(16px,env(safe-area-inset-left,0px)) !important;
  padding-right: max(16px,env(safe-area-inset-right,0px)) !important;
}
html.ahp-layout-v497 :is(#startHeader,#editorHeader,#checkoutHeader) :is(.start-header-left,.editor-header-left) { gap: 26px !important; }
html.ahp-layout-v497 :is(#startHeader,#editorHeader,#checkoutHeader) :is(.start-header-right,.editor-header-right) { gap: 28px !important; }
html.ahp-layout-v497 :is(#startHeader,#editorHeader,#checkoutHeader) :is(.editor-primary-actions,.start-header-wip-actions) {
  gap: 20px !important; margin-left: clamp(12px,2vw,40px) !important;
}
html.ahp-layout-v497 :is(#startHeader,#editorHeader,#checkoutHeader) :is(.header-text-action,.start-header-action,.editor-primary-actions > button,.ahp-checkout-back) { position: relative !important; }
html.ahp-layout-v497 :is(#startHeader,#editorHeader,#checkoutHeader) :is(.header-text-action,.start-header-action,.editor-primary-actions > button,.ahp-checkout-back)::after {
  position: absolute !important; left: 2px !important; right: 2px !important; bottom: 5px !important;
  width: auto !important; height: 2px !important; margin: 0 !important;
}
@media (max-width: 1239.98px) {
  html.ahp-layout-v497 :is(#startHeader,#editorHeader,#checkoutHeader) :is(.start-header-left,.editor-header-left) { gap: 12px !important; }
  html.ahp-layout-v497 :is(#startHeader,#editorHeader,#checkoutHeader) :is(.start-header-right,.editor-header-right) { gap: 10px !important; }
  html.ahp-layout-v497 #checkoutHeader .ahp-checkout-desktop-help { display: none !important; }
}
/* Identical dark mobile menus, including checkout and confirmation. */
html.ahp-layout-v497 :is(.ahp-mobile-header-menu,#headerMenuDropdown) {
  background: #101010 !important; color: #fff !important; border: 1px solid #353535 !important;
  border-radius: 12px !important; box-shadow: 0 12px 28px rgb(0 0 0 / .28) !important; padding: 10px !important;
}
html.ahp-layout-v497 :is(.ahp-mobile-header-menu,#headerMenuDropdown) :is(a,button,.ahp-mobile-menu-social-title) {
  color: #fff !important; background: transparent !important; border-color: #353535 !important;
}
html.ahp-layout-v497 :is(.ahp-mobile-header-menu,#headerMenuDropdown) :is(a,button) {
  text-decoration: none !important; min-height: 40px; line-height: 1.35 !important;
}
@media (hover:hover) {
  html.ahp-layout-v497 :is(.ahp-mobile-header-menu,#headerMenuDropdown) :is(a,button):hover { color: #e31b23 !important; background: transparent !important; }
}
/* Remove inherited fixed/fr-based USP rows, not their contents. */
html.ahp-layout-v497 #startScreen .start-usp {
  position: static !important; top: auto !important; height: auto !important; min-height: 0 !important;
  grid-template-rows: none !important; grid-auto-rows: max-content !important;
  align-content: start !important; align-items: start !important; align-self: flex-start !important;
  justify-content: start !important; gap: 12px !important;
}
html.ahp-layout-v497 #startScreen .start-usp-item { height: auto !important; min-height: 0 !important; align-self: start !important; margin: 0 !important; }
/* Keep glyphs square even though their category buttons use a fluid grid. */
html.ahp-layout-v497 #editorScreen #categoryTabs .category-icon-tab img {
  width: 30px !important; height: 30px !important; max-width: 30px !important; max-height: 30px !important;
  flex: 0 0 30px !important; object-fit: contain !important; object-position: center !important;
}
html.ahp-layout-v497 #editorScreen #categoryTabs .category-icon-tab { padding: 2px !important; min-height: 36px !important; }
@media (min-width:2400px) and (min-height:1200px) {
  html.ahp-layout-v497 #editorScreen #categoryTabs .category-icon-tab img { width: 36px !important; height: 36px !important; max-width: 36px !important; max-height: 36px !important; flex-basis: 36px !important; }
}
/* The gear is now inside the scrollable shell, clipped by the scene viewport.
   No body-level fixed button, no global hit area over menus/modals. */
html.ahp-layout-v497 #editorScreen .workspace-panel { isolation: isolate; z-index: 0 !important; }
html.ahp-layout-v497 #stageViewport { isolation: isolate; z-index: 0 !important; }
html.ahp-layout-v497 #stageScaleShell { position: relative !important; }
html.ahp-layout-v497 #cornerControlsLayer {
  position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important;
  z-index: 200 !important; pointer-events: none !important; overflow: visible !important;
}
html.ahp-layout-v497 #cornerControlsLayer .corner-config-gear-body {
  position: absolute !important; z-index: 1 !important; pointer-events: auto !important;
  width: var(--corner-gear-hit-size) !important; height: var(--corner-gear-hit-size) !important;
  transform: translate(-50%,-50%) !important; touch-action: manipulation; margin: 0 !important;
}
html.ahp-layout-v497 #stage.stage-composite-scale { will-change: auto !important; backface-visibility: visible !important; }
html.ahp-layout-v497 #itemsLayer .canvas-item.is-virtual-offscreen { content-visibility: visible !important; contain: none !important; }
/* Paint-only seam correction: a half CSS pixel at model scale. Do not stretch
   the special perspective corner cabinet or change any placement/hitbox. */
html.ahp-layout-v497 #itemsLayer .canvas-item.behavior-worktop { overflow: visible !important; }
html.ahp-layout-v497 #itemsLayer .canvas-item.behavior-worktop > img {
  position: absolute !important; top: 0 !important; left: 0 !important; right: auto !important; bottom: auto !important;
  width: 100% !important; height: 100% !important;
  max-width: none !important; max-height: none !important; margin: 0 !important; object-fit: fill !important;
}
html.ahp-layout-v497 #itemsLayer .canvas-item.behavior-pegboard > img,
html.ahp-layout-v497 #itemsLayer .peg-rail > img {
  margin: 0 !important; position: absolute !important; top: 0 !important; left: 0 !important;
  width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important;
  object-fit: fill !important; object-position: 0 0 !important;
}
/* Help panels share the brand palette; avoid unstyled browser-blue links. */
html.ahp-layout-v497 :is(.help-modal,.ahp-checkout-help-dialog) {
  background: #fff !important; color: #111 !important; border: 1px solid #dce1e8 !important;
  box-shadow: 0 18px 60px rgb(0 0 0 / .22) !important;
}
html.ahp-layout-v497 :is(.help-modal,.ahp-checkout-help-dialog) a,
html.ahp-layout-v497 :is(.help-modal,.ahp-checkout-help-dialog) a:visited {
  color: #b62328 !important; text-decoration: none !important; font-weight: 700 !important; overflow-wrap: anywhere;
}
html.ahp-layout-v497 :is(.help-modal,.ahp-checkout-help-dialog) a:hover { text-decoration: underline !important; }
html.ahp-layout-v497 .ahp-checkout-help-dialog::backdrop { background: rgb(16 20 26 / .48); }
html.ahp-layout-v497 .ahp-checkout-help-dialog { margin: auto; font-size: 16px; line-height: 1.5; }
html.ahp-layout-v497 .ahp-checkout-help-dialog h2 { font-size: 22px; padding-right: 30px; margin: 0 0 14px; }
html.ahp-layout-v497 .ahp-checkout-help-dialog dd { margin: 0 0 12px; }
html.ahp-layout-v497 .ahp-checkout-help-dialog dt { font-weight: 700; }
html.ahp-layout-v497 .ahp-checkout-help-close { width: 44px; height: 44px; cursor: pointer; touch-action: manipulation; }
/* Plan's close button is anchored to the non-scrolling header, not its wrapping
   action row. Zoom/pan only affect the drawing below it. */
html.ahp-layout-v497 .floorplan-modal-head {
  position: relative !important; z-index: 2 !important; flex: 0 0 auto !important;
  padding-right: 48px !important; align-items: flex-start !important;
}
html.ahp-layout-v497 .floorplan-actions { flex-wrap: wrap !important; gap: 6px !important; min-width: 0 !important; }
html.ahp-layout-v497 #floorPlanClose {
  position: absolute !important; top: 0 !important; right: 0 !important; bottom: auto !important; left: auto !important;
  z-index: 3 !important; width: 44px !important; height: 44px !important; min-width: 44px !important;
  transform: none !important; margin: 0 !important; touch-action: manipulation;
}
html.ahp-layout-v497 .floorplan-canvas-wrap { position: relative !important; z-index: 0 !important; isolation: isolate; overflow: auto !important; }
/* A readable desktop form, preserving every field and validation message. */
html.ahp-layout-v497 .ahp-konfigurator-form-section { max-width: 1000px !important; padding: 24px !important; }
html.ahp-layout-v497 .ahp-contact-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; min-width: 0; }
html.ahp-layout-v497 .ahp-contact-group { min-width: 0; }
html.ahp-layout-v497 .ahp-contact-group .ahp-contact-field { margin-bottom: 0 !important; }
html.ahp-layout-v497 #ahp-konfigurator-contact-form :is(input,textarea) { min-width: 0; max-width: 100%; box-sizing: border-box; }
html.ahp-layout-v497 #ahp-konfigurator-contact-form textarea { min-height: 100px !important; height: 100px; }
html.ahp-layout-v497 #ahp-konfigurator-contact-form :is(input,textarea)[placeholder]:focus::placeholder { color: transparent !important; opacity: 0 !important; }
@media (max-width:700px) {
  html.ahp-layout-v497 .ahp-konfigurator-form-section { padding: 18px 12px !important; }
  html.ahp-layout-v497 .ahp-contact-grid { grid-template-columns: minmax(0,1fr); gap: 0; }
}
@media (max-width:1239.98px) {
  html.ahp-layout-v497 body #checkoutHeader.app-header :is(.ahp-checkout-back,.ahp-checkout-desktop-help,#sentHeaderHelpButton) { display: none !important; }
}
html.ahp-layout-v497 .ahp-contact-grid { margin-bottom: 16px; }
@media (max-width:700px) {
  html.ahp-layout-v497 .ahp-contact-grid { row-gap: 12px; }
}
html.ahp-layout-v497 :is(#helpOverlay,#sentHelpOverlay,#checkoutHelpDialog) a,
html.ahp-layout-v497 :is(#helpOverlay,#sentHelpOverlay,#checkoutHelpDialog) a:visited { color: #111 !important; }
html.ahp-layout-v497 :is(#helpOverlay,#sentHelpOverlay,#checkoutHelpDialog) a:hover,
html.ahp-layout-v497 :is(#helpOverlay,#sentHelpOverlay,#checkoutHelpDialog) a:focus-visible { color: #b62328 !important; }
html.ahp-layout-v497 :is(#helpOverlay,#sentHelpOverlay) .help-modal { position: relative !important; }
html.ahp-layout-v497 :is(#helpClose,#sentHelpClose) {
  position: absolute !important; z-index: 5 !important; top: 12px !important; right: 12px !important;
  width: 44px !important; height: 44px !important; transform: none !important; touch-action: manipulation;
}
html.ahp-layout-v497 :is(#helpOverlay,#sentHelpOverlay) .help-modal-heading { padding-right: 36px !important; }
html.ahp-layout-v497 .ahp-contact-group .ahp-field-error { margin: 6px 0 0 !important; }


/* v499: denser editor catalogue and square, non-stretched category glyphs */
html.ahp-layout-v497 #editorScreen #categoryTabs .category-icon-tab {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 6px !important;
  height: 44px !important;
  min-height: 44px !important;
  border-radius: 10px !important;
  overflow: hidden !important;
}
html.ahp-layout-v497 #editorScreen #categoryTabs .category-icon-tab img {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  max-width: 30px !important;
  max-height: 30px !important;
  object-fit: contain !important;
  flex: 0 0 30px !important;
}
html.ahp-layout-v497 #editorScreen #productList :is(.product-card,.product-card-ref) {
  grid-template-rows: minmax(68px,auto) 1px 36px !important;
  min-height: 126px !important;
  padding: 7px !important;
}
html.ahp-layout-v497 #editorScreen #productList :is(.product-media, .product-main) {
  min-height: 68px !important;
}
html.ahp-layout-v497 #editorScreen #productList .product-thumb {
  width: 60px !important;
  min-width: 60px !important;
  max-width: 60px !important;
  height: 68px !important;
  min-height: 68px !important;
  max-height: 68px !important;
}
html.ahp-layout-v497 #editorScreen #productList .product-title {
  font-size: 13px !important;
}
html.ahp-layout-v497 #editorScreen #productList .product-bottom {
  min-height: 36px !important;
}
@media (min-width: 1000px), (min-width: 640px) and (orientation: landscape), (min-width: 520px) and (max-height: 500px) and (orientation: landscape) {
  html.ahp-layout-v497 #editorScreen .editor-shell {
    grid-template-columns: clamp(214px, 22vw, 318px) minmax(0,1fr) !important;
  }
}
@media (max-width: 999px) and (orientation: landscape) {
  html.ahp-layout-v497 #editorScreen .editor-shell {
    grid-template-columns: clamp(204px, 27vw, 252px) minmax(0,1fr) !important;
  }
}

/* v514: the visual is one SVG in model coordinates; DOM boxes still handle
   selection, dragging and removal. Only hide fallback images after decode. */
#itemsLayer > .shared-floor-scene {
  position: absolute !important;
  display: block !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  border: 0 !important;
  padding: 0 !important;
  object-fit: fill !important;
  pointer-events: none !important;
  z-index: 12 !important;
}
#itemsLayer > .canvas-item.shared-floor-item {
  background: transparent !important;
  box-shadow: none !important;
  z-index: 12 !important;
}
#itemsLayer > .canvas-item.shared-floor-item > img {
  visibility: hidden !important;
}
#itemsLayer > .canvas-item.sink-worktop-aligned > img {
  position: absolute !important;
  left: 0 !important;
  right: auto !important;
  top: auto !important;
  bottom: 0 !important;
  width: 100% !important;
  height: var(--sink-visual-height-px) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  transform: none !important;
  object-fit: fill !important;
}


/* v523: mobile UX polish and stable controls */
@media (hover: none), (pointer: coarse) {
  button.setup-param-close,
  button.save-config-load-close,
  button.top-summary-close,
  .canvas-remove-overlay,
  .canvas-remove-btn {
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
  }
}

/* Corner settings on phones: preview remains visible, only option list scrolls. */
@media (max-width: 560px) {
  #cornerConfigOverlay.setup-param-overlay {
    overflow: hidden !important;
  }
  #cornerConfigOverlay .corner-config-modal {
    height: calc(100dvh - 12px) !important;
    max-height: calc(100dvh - 12px) !important;
    overflow: hidden !important;
  }
  #cornerConfigOverlay .corner-config-content {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  #cornerConfigOverlay .corner-modal-grid.corner-modal-grid-compact {
    height: 100% !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: 150px minmax(0, 1fr) !important;
    gap: 8px !important;
  }
  #cornerConfigOverlay .corner-modal-preview {
    position: relative !important;
    z-index: 2 !important;
    min-height: 0 !important;
    height: 150px !important;
    overflow: hidden !important;
    background: #fff !important;
  }
  #cornerConfigOverlay .corner-preview-box {
    width: min(100%, 176px) !important;
    height: 146px !important;
    max-height: 146px !important;
  }
  #cornerConfigOverlay .corner-preview-canvas-wrap {
    width: 55.1px !important;
    height: 134.6px !important;
  }
  #cornerConfigOverlay .corner-preview-canvas-scene {
    transform: translateX(-50%) scale(.255) !important;
  }
  #cornerConfigOverlay .compact-corner-options {
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    padding-right: 3px !important;
    scrollbar-gutter: stable !important;
  }
  #cornerConfigOverlay .corner-config-modal .setup-param-actions {
    position: relative !important;
    flex: 0 0 auto !important;
    margin-top: 8px !important;
    padding-top: 8px !important;
  }
}

/* Product rail: reserve a permanent slim scrollbar lane so the catalog never jumps. */
@media (max-width: 720px) {
  #editorScreen #productList.product-list {
    flex: 0 0 160px !important;
    height: 160px !important;
    min-height: 160px !important;
    max-height: 160px !important;
    padding: 1px 2px 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-gutter: stable !important;
    scrollbar-width: thin !important;
    scrollbar-color: #c11015 transparent !important;
  }
  #editorScreen #productList.product-list::-webkit-scrollbar { height: 4px !important; }
  #editorScreen #productList.product-list::-webkit-scrollbar-track { background: transparent !important; }
  #editorScreen #productList.product-list::-webkit-scrollbar-thumb { background: #c11015 !important; border-radius: 999px !important; }

  #editorScreen #productList .product-bottom {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 88px !important;
    align-items: center !important;
    column-gap: 4px !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
  }
  #editorScreen #productList .product-price {
    min-width: 0 !important;
    align-self: center !important;
    justify-self: stretch !important;
    line-height: 1.05 !important;
  }
  #editorScreen #productList .price-sale { font-size: 12px !important; white-space: nowrap !important; }
  #editorScreen #productList .price-old { font-size: 9px !important; white-space: nowrap !important; }
  #editorScreen #productList .product-controls {
    display: grid !important;
    grid-template-columns: 28px 32px 28px !important;
    width: 88px !important;
    min-width: 88px !important;
    max-width: 88px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
  }
  #editorScreen #productList :is(.product-sub,.product-add) {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    line-height: 30px !important;
    padding: 0 !important;
  }
  #editorScreen #productList :is(.product-count,.product-count-input) {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    line-height: 30px !important;
    padding: 0 !important;
  }
}

/* ===== v524: mobile modal, product cards and accessory feedback ===== */
@media (max-width: 560px) {
  #cornerConfigOverlay.setup-param-overlay {
    padding: 6px !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
  }
  #cornerConfigOverlay .corner-config-modal {
    display: flex !important;
    flex-direction: column !important;
    width: calc(100vw - 12px) !important;
    height: auto !important;
    max-height: calc(100dvh - 12px) !important;
    padding: 10px 10px 8px !important;
    overflow: hidden !important;
    border-radius: 18px !important;
  }
  #cornerConfigOverlay .corner-config-modal > h3 {
    flex: 0 0 auto !important;
    margin: 0 52px 6px 0 !important;
    font-size: clamp(20px, 5.6vw, 26px) !important;
    line-height: 1.08 !important;
  }
  #cornerConfigOverlay .corner-config-content {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  #cornerConfigOverlay .corner-modal-grid.corner-modal-grid-compact {
    height: 100% !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: minmax(108px, 20dvh) minmax(0, 1fr) !important;
    gap: 6px !important;
  }
  #cornerConfigOverlay .corner-modal-preview {
    min-height: 0 !important;
    height: auto !important;
    display: grid !important;
    place-items: center !important;
    overflow: hidden !important;
    background: #fff !important;
  }
  #cornerConfigOverlay .corner-preview-box {
    width: min(100%, 168px) !important;
    height: min(138px, 19dvh) !important;
    max-height: 138px !important;
    margin: 0 auto !important;
  }
  #cornerConfigOverlay .corner-preview-canvas-wrap {
    width: 52px !important;
    height: 127px !important;
  }
  #cornerConfigOverlay .corner-preview-canvas-scene {
    transform: translateX(-50%) scale(.24) !important;
  }
  #cornerConfigOverlay .compact-corner-options {
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
    scrollbar-color: #c11015 transparent !important;
    padding: 0 3px 4px 0 !important;
  }
  #cornerConfigOverlay .compact-corner-options::-webkit-scrollbar { width: 4px !important; }
  #cornerConfigOverlay .compact-corner-options::-webkit-scrollbar-track { background: transparent !important; }
  #cornerConfigOverlay .compact-corner-options::-webkit-scrollbar-thumb { background: #c11015 !important; border-radius: 999px !important; }
  #cornerConfigOverlay .setup-modal-section {
    margin: 0 0 7px !important;
  }
  #cornerConfigOverlay .setup-modal-section h4 {
    margin: 0 0 5px !important;
    font-size: 14px !important;
    line-height: 1.05 !important;
  }
  #cornerConfigOverlay .corner-option-row.three-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }
  #cornerConfigOverlay .compact-corner-options .setup-modal-option {
    min-height: 38px !important;
    padding: 6px 8px !important;
    border-radius: 10px !important;
  }
  #cornerConfigOverlay .compact-corner-options .setup-modal-option strong {
    font-size: 12px !important;
    line-height: 1.08 !important;
  }
  #cornerConfigOverlay .corner-color-option .color-brush-swatch,
  #cornerConfigOverlay .corner-color-option .color-brush-swatch img {
    width: 38px !important;
    min-width: 38px !important;
    height: 14px !important;
  }
  #cornerConfigOverlay .corner-config-modal .setup-param-actions {
    flex: 0 0 auto !important;
    position: static !important;
    margin: 6px 0 0 !important;
    padding: 6px 0 0 !important;
    min-height: 48px !important;
    background: #fff !important;
  }
  #cornerConfigOverlay .corner-config-modal .setup-param-actions .btn {
    min-height: 42px !important;
    padding: 7px 14px !important;
  }

  .toast.toast-success.toast-accessory {
    top: calc(var(--ahp-header-height, 56px) + 58px) !important;
    right: 10px !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    max-width: 190px !important;
    padding: 7px 10px !important;
    font-size: 11px !important;
    line-height: 1.15 !important;
    border-radius: 9px !important;
    box-shadow: 0 8px 20px rgba(16,142,75,.22) !important;
  }
}

@media (max-width: 560px) and (max-height: 760px) {
  #cornerConfigOverlay .corner-modal-grid.corner-modal-grid-compact {
    grid-template-rows: 96px minmax(0, 1fr) !important;
  }
  #cornerConfigOverlay .corner-preview-box {
    width: 142px !important;
    height: 92px !important;
  }
  #cornerConfigOverlay .corner-preview-canvas-wrap {
    width: 38.9px !important;
    height: 95.2px !important;
  }
  #cornerConfigOverlay .corner-preview-canvas-scene {
    transform: translateX(-50%) scale(.18) !important;
  }
  #cornerConfigOverlay .compact-corner-options .setup-modal-option {
    min-height: 34px !important;
    padding: 4px 7px !important;
  }
  #cornerConfigOverlay .setup-modal-section { margin-bottom: 5px !important; }
}

@media (max-width: 720px) {
  #editorScreen #productList.product-list {
    flex-basis: 148px !important;
    height: 148px !important;
    min-height: 148px !important;
    max-height: 148px !important;
  }
  #editorScreen #productList :is(.product-card,.product-card-ref) {
    min-height: 116px !important;
    height: 116px !important;
    grid-template-rows: 68px 1px 34px !important;
  }
  #editorScreen #productList .product-bottom {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
    width: 100% !important;
    min-height: 34px !important;
    height: 34px !important;
    max-height: 34px !important;
  }
  #editorScreen #productList .product-price {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    height: 32px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 1px !important;
    text-align: left !important;
  }
  #editorScreen #productList .price-sale,
  #editorScreen #productList .price-old {
    align-self: flex-start !important;
    text-align: left !important;
  }
  #editorScreen #productList .product-controls {
    flex: 0 0 82px !important;
    display: grid !important;
    grid-template-columns: 26px 30px 26px !important;
    width: 82px !important;
    min-width: 82px !important;
    max-width: 82px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    gap: 0 !important;
    overflow: hidden !important;
  }
  #editorScreen #productList :is(.product-sub,.product-add) {
    width: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    line-height: 28px !important;
  }
  #editorScreen #productList :is(.product-count,.product-count-input) {
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    line-height: 28px !important;
  }
}

/* v625: The native keyboard overlays the application, it never repositions
   the header/footer/root. Use ONLY an internal scrollport occlusion to expose
   the focused field above the OS keyboard. The footer remains in its unchanged
   baseline location underneath the native keyboard and does not animate. */
@media (max-width: 999.98px) {
  html.ahp-layout-v497.ahp-mobile-keyboard-open body > .ahp-checkout-page > .ahp-checkout-main,
  html.ahp-layout-v497.ahp-mobile-keyboard-open body > .ahp-checkout-page > .ahp-sent-main {
    margin-bottom: var(--ahp-keyboard-occlusion, 0px) !important;
    min-height: 0 !important;
    scroll-behavior: auto !important;
    scroll-padding-bottom: 14px !important;
    overscroll-behavior: contain !important;
  }
  html.ahp-layout-v497.ahp-mobile-keyboard-open #app #startScreen .start-content-layout,
  html.ahp-layout-v497.ahp-mobile-keyboard-open #app #startScreen.start-usp-below-v537.start-refined-v538 .start-content-layout {
    margin-bottom: var(--ahp-keyboard-occlusion, 0px) !important;
    min-height: 0 !important;
    scroll-behavior: auto !important;
    scroll-padding-bottom: 14px !important;
    overscroll-behavior: contain !important;
  }
  /* A numeric input in the catalogue is contained in the editor's own area;
     only the editor content yields space to the keyboard. */
  html.ahp-layout-v497.ahp-mobile-keyboard-open #app #editorScreen {
    padding-bottom: var(--ahp-keyboard-occlusion, 0px) !important;
  }
  /* Native keyboard and footer must never share a painted overlay surface. */
  html.ahp-layout-v497.ahp-mobile-input-active .ahp-mobile-floating-summary {
    display: none !important;
    pointer-events: none !important;
  }
}
