:root{
  --bg:#0a0c10;
  --fg:#e9eef6;
  --muted:#9aa6b2;
  --card:rgba(18,22,30,0.82);
  --stroke:rgba(255,255,255,0.08);
  --blue:#5aa7ff;
  --blue2:#2f6cff;
  --white:#ffffff;
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
  /* Reserved height for AR bottom pattern strip (tabs) */
  --ar-bottom-strip: 84px;
  /* Reserved height for AR top strip (title + reset) */
  --ar-top-strip: 64px;
  --ar-ui-top-extra: 0px;
}
*{box-sizing:border-box;}
html,body{margin:0;padding:0;background:#000;color:var(--fg);font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;height:100%;}

#xrCanvas{
  position:fixed;inset:0;
  width:100vw;height:100vh;
  display:block;
  background:#000;
}

.overlayRoot{position:fixed;inset:0;pointer-events:none;}
.screen{position:absolute;inset:0;display:flex;flex-direction:column;pointer-events:auto;}
.screen[hidden]{display:none !important;}
/* Ensure native [hidden] attribute always wins over layout rules (e.g. .finalBar{display:flex}) */
[hidden]{display:none !important;}
.screen--active{display:flex;}

/* Main (catalog) screen background */
#screenCatalog{background: rgb(51,51,51);} /* #333333 */
#screenDetail{background:linear-gradient(180deg, #f3f5f8 0%, #eef2f7 100%);}

/* Header */
.appHeader{
  padding:calc(10px + var(--safe-top)) 14px 10px;
  display:flex;align-items:center;gap:10px;
  background:linear-gradient(to bottom, rgba(0,0,0,0.65), rgba(0,0,0,0));
}
.headerTitle{flex:1;text-align:center;font-weight:900;letter-spacing:1px;font-size:24px;color:var(--white);}
.headerTitle--withLogo{display:flex;align-items:center;justify-content:center;gap:10px;}
.headerTitleLogo{height:34px;width:auto;display:block;}

/* Minimal back button (requested) */
.backText{
  appearance:none;
  -webkit-appearance:none;
  border:0;
  background:transparent;
  color: rgb(118,152,255);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 12px;
}
.backText:active{background: rgba(255,255,255,0.18);}

.iconCircle{
  width:44px;height:44px;border-radius:22px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.10);
  color:var(--white);
  font-size:20px;
  display:grid;place-items:center;
}
.iconCircle.backBlue{
  border:0;
  background: rgb(118,152,255); /* #7698FF */
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}
.iconCircle.ghost{background:transparent;border-color:transparent;color:rgba(255,255,255,0.6);}
.hidden{display:none !important;}

/* Catalog */
.catalogWrap{padding:0 14px 0;flex:1;overflow:auto;}
.search{
  width:100%;margin:0 0 12px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.06);
  color:var(--white);
  outline:none;
}

.quickArSection{
  margin:0 0 16px;
  padding:12px 12px 14px;
  border-radius:18px;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.08);
}
.quickArHeader{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px;}
.quickArTitle{font-size:17px;font-weight:900;color:#fff;line-height:1.1;}
.quickArSub{margin-top:4px;font-size:13px;line-height:1.35;color:rgba(255,255,255,0.72);}
.quickArRail{
  display:flex;
  gap:12px;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  scroll-snap-type:x proximity;
  padding:2px 2px 10px;
}
.quickArRail:empty{display:none;}
.quickArRail::-webkit-scrollbar{height:8px;}
.quickArRail::-webkit-scrollbar-track{background:transparent;}
.quickArRail::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.18);border-radius:999px;}
.quickArRail{scrollbar-color:rgba(255,255,255,0.18) transparent;scrollbar-width:thin;}
.quickArCard{
  min-width:146px;
  max-width:146px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.04);
  color:#fff;
  border-radius:16px;
  padding:0;
  overflow:hidden;
  text-align:left;
  scroll-snap-align:start;
}
.quickArCardPreview{
  height:108px;
  background:#20242d center/cover no-repeat;
}
.quickArCardMeta{padding:10px 10px 12px;}
.quickArCardShape{font-size:11px;font-weight:800;letter-spacing:.3px;text-transform:uppercase;color:rgba(255,255,255,0.66);line-height:1.25;}
.quickArCardTile{margin-top:4px;font-size:14px;font-weight:800;line-height:1.2;color:#fff;min-height:34px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.quickArCard:active{transform:translateY(1px);}
.quickArToggle{
  flex:0 0 auto;
  align-self:center;
  min-height:36px;
  padding:0 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(255,255,255,0.06);
  color:#fff;
  font-weight:800;
  font-size:13px;
}
.quickArToggle[hidden]{display:none !important;}
.quickArExpanded{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:12px;
  margin-top:12px;
}
.quickArExpanded[hidden]{display:none !important;}
.quickArExpanded .quickArCard{
  min-width:0;
  max-width:none;
  width:100%;
}
.quickArCtaWrap{margin-top:12px;}
.quickArCtaBtn{width:100%;}
.quickArCtaBtn[hidden]{display:none !important;}
@media (min-width: 900px){
  .quickArExpanded{grid-template-columns:repeat(4, minmax(0,1fr));}
}

.catalogCards{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  padding-bottom:22px;
}
.catalogFooterCta{
  display:flex;
  justify-content:center;
  padding:0 0 calc(18px + var(--safe-bottom));
}
.catalogFooterBtn{
  display:flex;
  align-items:center;
  justify-content:center;
  width:min(100%, 780px);
  min-height:54px;
  padding:14px 18px;
  border-radius:16px;
  border:1px solid rgba(90,167,255,0.36);
  background:rgba(90,167,255,0.18);
  color:#fff;
  font-weight:900;
  font-size:16px;
  line-height:1.2;
  text-align:center;
  text-decoration:none;
  box-shadow:0 12px 28px rgba(0,0,0,0.24);
}
.catalogFooterBtn:hover,
.catalogFooterBtn:active{
  background:rgba(90,167,255,0.28);
}
.catalogFooterBtn:focus-visible{
  outline:2px solid rgba(255,255,255,0.95);
  outline-offset:3px;
}
.catalogCard{
  position:relative;
  height:0;
  padding-bottom:125%; /* 4:5 карточка */
  border-radius:5px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,0.12);
  background:#222;
  background-size:cover;
  background-position:center;
}
.catalogCard--square{padding-bottom:125%;}
.catalogCardBg{position:absolute;inset:0;background-size:cover;background-position:center;filter:saturate(1.05) contrast(1.05);}
.catalogCardShade{position:absolute;inset:0;background:linear-gradient(to right, rgba(0,0,0,0.55), rgba(0,0,0,0.05));}
.catalogCardTitle{
  position:absolute;left:10px;right:10px;bottom:10px;
  font-weight:900;
  font-size:16px;
  letter-spacing:0.4px;
  text-transform:uppercase;
  color:var(--white);
  text-shadow:0 8px 24px rgba(0,0,0,0.55);
  line-height:1.05;
}
.catalogCardTitle--small{opacity:0; pointer-events:none; font-size:15px;}
.catalogEmptyState{
  grid-column:1 / -1;
  min-height:140px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px 20px;
  border-radius:14px;
  border:1px dashed rgba(255,255,255,0.16);
  background:rgba(255,255,255,0.04);
  color:rgba(255,255,255,0.82);
  text-align:center;
  line-height:1.45;
}

/* Detail */
.detailTop{
  padding:calc(10px + var(--safe-top)) 14px 10px;
  display:flex;align-items:center;gap:10px;
  background:rgba(255,255,255,0.92);
  color:#0a0c10;
}
.detailTopTitle{flex:1;font-weight:800;font-size:18px;opacity:0.9;}
.detailScroll{flex:1;overflow:auto;-webkit-overflow-scrolling:touch;background:transparent;}
.detailHero{height:240px;background:#ddd;background-position:center;background-size:cover;}
.detailBody{flex:none;overflow:visible;background:#fff;color:#0a0c10;padding:16px 14px 110px;}
.detailRow{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px;}
.detailName{font-size:34px;font-weight:900;line-height:1.05;}
.detailSub{margin-top:6px;font-weight:800;color:#111;opacity:0.65;white-space:nowrap;}
.card{background:#f4f6f8;border-radius:5px;padding:14px 14px 10px;border:1px solid rgba(0,0,0,0.05);}
.cardTitle{font-weight:800;margin-bottom:10px;display:flex;align-items:center;gap:8px;}
.kv{display:flex;flex-direction:column;gap:10px;font-size:14px;}
.kvRow{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;}
.kvK{font-weight:700;opacity:.85;min-width:120px;}
.kvV{font-weight:800;text-align:right;word-break:break-word;}
.kvRowFull{justify-content:flex-start;}
.kvFull{width:100%;text-align:left;font-weight:800;word-break:break-word;}
.kv b{font-weight:800;}
.sectionTitle{margin:18px 2px 10px;font-weight:900;font-size:20px;}

.colorTechGrid{display:flex;flex-direction:column;gap:10px;margin:0 2px 6px;}
.colorTechImg{width:100%;height:auto;display:block;border-radius: 5px;box-shadow:0 6px 18px rgba(0,0,0,0.06);}
.layoutRow{display:flex;gap:10px;overflow:auto;padding-bottom:6px;}
.layoutCard{min-width:120px;border:0;background:transparent;text-align:left;}
.layoutThumb{height:72px;border-radius:14px;background:#ccc;background-size:cover;background-position:center;border:1px solid rgba(0,0,0,0.08);}
.layoutLbl{margin-top:8px;font-weight:800;color:#0a0c10;}
.layoutCard.active .layoutThumb{outline:3px solid var(--blue);}

/*
  "Цвета и поверхности" — превью текстур.
  Делаем отображение и поведение как у галереи "Однотонная":
  горизонтальный скролл + 3 карточки в видимой области.
*/
.swatchRow{
  display:flex;
  gap:12px;
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding: 0 0 10px;
  margin: 0 0 6px;
}
.swatchRow::-webkit-scrollbar{height:6px;}
.swatchRow::-webkit-scrollbar-thumb{background:rgba(0,0,0,0.18);border-radius:6px;}

/* Default swatch style (used elsewhere, e.g. in AR final bar) */
.swatch{
  width:62px;
  height:62px;
  padding:0;
  border-radius:14px;
  border:1px solid rgba(0,0,0,0.10);
  background-color:transparent;
  background-size:cover;
  background-position:center;
  position:relative;
  cursor:pointer;
  -webkit-appearance:none;
  appearance:none;
}

/* Card look inside the "Цвета и поверхности" horizontal scroller */
.swatchRow .swatch{
  flex: 0 0 calc((100% - 20px) / 3); /* 3 cards per viewport */
  width: auto;
  height: auto;
  aspect-ratio: 3 / 4;
  border-radius: 5px;
  border: 1px solid rgba(0,0,0,0.10);
  box-sizing: border-box;
  overflow: hidden;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: transparent;
  background-position: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  scroll-snap-align: start;
}

/* Active state (JS uses .swatch--active) */
.swatchRow .swatch.swatch--active,
.swatchRow .swatch.active{
  /* Use inset ring so it never gets clipped by scroll containers and matches rounded corners */
  outline: none;
  border-color: var(--blue);
  box-shadow: inset 0 0 0 3px var(--blue), 0 6px 18px rgba(0,0,0,0.12);
}

/* Keyboard focus parity */
.swatchRow .swatch:focus-visible{
  outline: none;
  border-color: var(--blue);
  box-shadow: inset 0 0 0 3px var(--blue), 0 6px 18px rgba(0,0,0,0.12);
}


.detailCta{
  position:fixed;left:0;right:0;bottom:0;
  padding:12px 14px calc(12px + var(--safe-bottom));
  background:rgba(255,255,255,0.92);
  border-top:1px solid rgba(0,0,0,0.06);
  transition:transform .18s ease, opacity .18s ease;
}
.detailCta--calculatorHidden{
  opacity:0;
  pointer-events:none;
  transform:translateY(calc(100% + 12px));
}
.btnPrimary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 18px;
  border: none;
  border-radius: 14px;
  /* Match "Связь с менеджером" CTA color */
  background: rgba(90, 170, 255, 0.65);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.btnPrimaryText{white-space:nowrap;}
.btnPrimaryLogo{height:100%;width:auto;flex:0 0 auto;display:block;}

.appFatalState{
  position:absolute;
  inset:0;
  z-index:2200;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px 14px calc(18px + var(--safe-bottom));
  background:rgba(7,10,16,0.74);
  backdrop-filter:blur(12px);
  pointer-events:auto;
}
.appFatalCard{
  width:min(100%, 440px);
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:18px;
  border-radius:22px;
  background:rgba(18,22,30,0.96);
  border:1px solid rgba(255,255,255,0.12);
  box-shadow:0 20px 48px rgba(0,0,0,0.36);
}
.appFatalEyebrow{
  color:rgba(255,255,255,0.62);
  font-size:11px;
  font-weight:900;
  letter-spacing:0.22px;
  text-transform:uppercase;
}
.appFatalTitle{
  color:#fff;
  font-size:24px;
  line-height:1.12;
  font-weight:1000;
}
.appFatalText{
  color:rgba(255,255,255,0.9);
  font-size:15px;
  line-height:1.45;
}
.appFatalMeta{
  color:rgba(255,255,255,0.62);
  font-size:12px;
  line-height:1.4;
  padding:10px 12px;
  border-radius:14px;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.08);
  white-space:pre-wrap;
  word-break:break-word;
}
.appFatalActions{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:10px;
}
.appFatalSecondary{
  width:100%;
  justify-content:center;
  text-decoration:none;
  min-height:48px;
  display:flex;
  align-items:center;
}
@media (min-width: 560px){
  .appFatalActions{grid-template-columns:minmax(0,1fr) minmax(0,1fr);}
}

/* AR */
.arTop{
  position:absolute;left:0;right:0;top:0;
  padding:calc(14px + var(--safe-top) + var(--ar-ui-top-extra)) 12px 12px;
  display:flex;align-items:flex-start;gap:10px;
  min-height:calc(76px + var(--safe-top) + var(--ar-ui-top-extra));
  background:linear-gradient(to bottom, rgba(0,0,0,0.58), rgba(0,0,0,0));
}
.arTopText{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:4px;padding-top:1px;}
.arTitle{
  font-weight:900;
  font-size:clamp(13px,3.6vw,17px);
  line-height:1.18;
  white-space:normal;
  overflow:visible;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  word-break:break-word;
  text-wrap:balance;
  max-width:100%;
}
.arArea{
  font-weight:800;
  font-size:clamp(10px,3.1vw,13px);
  line-height:1.24;
  color:rgba(255,255,255,0.82);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
}

.scanHint{
  position:absolute;left:12px;right:12px;top:calc(var(--ar-top-strip) + 10px);
  padding:16px 16px;
  border-radius:22px;
  background:rgba(0,0,0,0.45);
  border:1px solid rgba(255,255,255,0.10);
}
.scanTitle{font-weight:1000;font-size:24px;letter-spacing:1px;text-align:center;margin-bottom:10px;}
.scanText{font-size:14px;line-height:1.35;color:rgba(255,255,255,0.86);text-align:center;}

.contourHint{
  position:absolute;left:12px;right:12px;
  /* Above the main + button (and above the bottom strip, if present) */
  bottom:calc(var(--ar-bottom-strip) + 124px + var(--safe-bottom));
  padding:12px 14px;
  border-radius:18px;
  background:rgba(0,0,0,0.35);
  border:1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(10px);
}
.contourHintText{
  font-size:14px;
  font-weight:900;
  line-height:1.25;
  color:rgba(255,255,255,0.92);
  text-align:center;
}

.arDebugOverlay{
  position:absolute;
  left:10px;
  top:calc(var(--ar-top-strip) + 8px);
  max-width:calc(100vw - 20px);
  padding:10px 12px;
  border-radius:14px;
  background:rgba(0,0,0,0.55);
  border:1px solid rgba(255,255,255,0.14);
  color:rgba(255,255,255,0.92);
  font-size:12px;
  line-height:1.25;
  font-weight:700;
  white-space:pre-line;
  z-index:50;
  pointer-events:none;
  backdrop-filter: blur(10px);
}

.arBottomCenter{
  position:absolute;left:0;right:0;
  /* Keep main buttons above the bottom pattern strip */
  bottom:calc(var(--ar-bottom-strip) + 18px + var(--safe-bottom));
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:10px;
  align-items:center;
}
.arBottomCenterMain{
  display:flex;
  justify-content:center;
  gap:18px;
  align-items:center;
}
.arDraftAssist{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:8px;
  width:min(440px, calc(100vw - 28px));
  padding:8px 10px;
  border-radius:16px;
  background:rgba(10,14,22,0.42);
  border:1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  box-shadow:0 10px 24px rgba(0,0,0,0.14);
}
.arDraftAssistHint{
  color:rgba(255,255,255,0.94);
  font-size:12px;
  line-height:1.3;
  font-weight:900;
  text-align:center;
}
.arDraftAssistActions{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.btnGhost--compact{
  flex:0 0 auto;
  min-width:112px;
  padding:10px 12px;
  border-radius:12px;
  font-size:13px;
  font-weight:900;
}
.fabPlus{
  width:88px;height:88px;border-radius:44px;
  border:3px solid rgba(90,167,255,0.95);
  background:rgba(255,255,255,0.94);
  color:var(--blue);
  font-size:44px;
  font-weight:900;
}
.fabOk{
  width:88px;height:88px;border-radius:44px;
  border:3px solid rgba(90,167,255,0.95);
  background:rgba(90,167,255,0.95);
  color:#fff;
  font-size:22px;
  font-weight:900;
}

.postCloseBar{
  position:absolute;left:0;right:0;
  /* Sit above the bottom pattern strip so "Готово" is never covered */
  bottom:calc(var(--ar-bottom-strip) + var(--safe-bottom));
  padding:14px 14px 12px;
  background:rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
}
.postCloseTitle{font-weight:900;text-align:center;margin-bottom:10px;letter-spacing:0.6px;}
.postCloseBtns{display:flex;gap:10px;}
.btnGhost{
  flex:1;
  background:rgba(255,255,255,0.90);
  border:1px solid rgba(0,0,0,0.08);
  border-radius:14px;
  padding:12px 10px;
  font-weight:900;
  color:#0a0c10;
}
.btnGhost--primary{
  background:rgba(90,167,255,0.95);
  border-color:rgba(90,167,255,0.98);
  color:#fff;
  box-shadow:0 10px 22px rgba(47,108,255,0.22);
}
.btnGhost.is-active,
.btnGhost--primary.is-active{
  background:rgba(90,167,255,0.98);
  border-color:rgba(90,167,255,1);
  color:#fff;
  box-shadow:0 12px 24px rgba(47,108,255,0.28);
}
.btnPrimaryWide{
  width:100%;margin-top:10px;
  background:rgba(90,167,255,0.95);
  border:2px solid rgba(90,167,255,0.95);
  border-radius:16px;
  padding:14px 12px;
  font-weight:1000;
  font-size:18px;
  color:#fff;
}

.finalBar{
  position:absolute;left:0;right:0;bottom:0;
  padding:10px 10px calc(10px + var(--safe-bottom));
  background:rgba(0,0,0,0.40);
  backdrop-filter: blur(10px);
  display:flex;flex-direction:column;gap:10px;
}
.finalPatterns{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  justify-content:flex-start;
  flex-wrap:nowrap;
  overflow-x:auto;
  overflow-y:hidden;
  padding-bottom:2px;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.finalPatterns::-webkit-scrollbar{display:none;}
.texLoadStatus{
  width:100%;
  font-size:12px;
  line-height:1.2;
  color:rgba(255,255,255,0.78);
  margin-top:2px;
}
.texLoadBarWrap{
  width:100%;
  height:3px;
  background:rgba(255,255,255,0.12);
  border-radius:999px;
  overflow:hidden;
  opacity:0;
  transition:opacity 180ms ease;
}
.texLoadBarWrap.is-visible{opacity:1;}
.texLoadBar{
  height:100%;
  width:0%;
  background:#22c55e;
  border-radius:999px;
  transition:width 120ms linear;
}

.patternTab{
  border:0;
  background:rgba(255,255,255,0.12);
  color:#fff;
  padding:10px 12px;
  border-radius:14px;
  font-weight:900;
  flex:0 0 auto;
  white-space:nowrap;
}
.patternTab.active{background:rgba(90,167,255,0.92);}
.patternTab--calc{
  background:rgba(90,167,255,0.18);
  box-shadow:inset 0 0 0 1px rgba(90,167,255,0.28);
}
.patternTab--calc:hover,
.patternTab--calc:focus-visible{
  background:rgba(90,167,255,0.24);
}
.patternTab--admin{display:none;}
.patternTab--admin.is-enabled{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;}
.patternTab--snapshot{white-space:nowrap;}

.patternTab--zone{white-space:nowrap;}
.arZoneCompact{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  min-width:0;
  padding:8px 12px;
  border-radius:16px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.12);
  box-shadow:0 10px 24px rgba(0,0,0,0.10);
}
.arZoneCompactMain{
  min-width:0;
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.arZoneCompactTitle{
  color:#fff;
  font-size:13px;
  line-height:1.2;
  font-weight:1000;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.arZoneCompactMeta{
  color:rgba(255,255,255,0.78);
  font-size:11px;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.arZoneCompactAction{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(90,167,255,0.30);
  background:rgba(90,167,255,0.18);
  color:#fff;
  font-weight:900;
  font-size:12px;
  line-height:1.1;
  white-space:nowrap;
  box-shadow:inset 0 0 0 1px rgba(90,167,255,0.12);
}
.arZoneCompactAction:hover,
.arZoneCompactAction:focus-visible{
  background:rgba(90,167,255,0.24);
  border-color:rgba(90,167,255,0.40);
}
.arZoneBar{
  display:flex;
  flex-direction:column;
  gap:10px;
  width:100%;
  padding:12px;
  border-radius:20px;
  background:rgba(10,14,22,0.68);
  border:1px solid rgba(255,255,255,0.12);
  box-shadow:0 14px 32px rgba(0,0,0,0.18);
}
.arZoneBarHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.arZoneBarClose{
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(255,255,255,0.10);
  color:#fff;
  border-radius:12px;
  padding:8px 10px;
  font-weight:900;
  line-height:1;
  white-space:nowrap;
}
.arZoneBarTopActions{display:flex;gap:8px;width:100%;}
.arZoneBarTopActions .btnGhost{width:100%;}
.arZoneBarHint{
  color:rgba(255,255,255,0.78);
  font-size:12px;
  line-height:1.35;
}
.arZoneSummary{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:10px 12px;
  border-radius:16px;
  background:rgba(255,255,255,0.10);
  border:1px solid rgba(255,255,255,0.14);
  box-shadow:0 10px 24px rgba(0,0,0,0.12);
}
.arZoneSummaryEyebrow{
  color:rgba(255,255,255,0.62);
  font-size:10px;
  font-weight:900;
  letter-spacing:0.24px;
  text-transform:uppercase;
}
.arZoneSummaryTitle{
  color:#fff;
  font-size:15px;
  line-height:1.2;
  font-weight:1000;
}
.arZoneSummaryMeta{
  color:rgba(255,255,255,0.82);
  font-size:12px;
  line-height:1.35;
}
.arZoneBarLabel{
  color:rgba(255,255,255,0.72);
  font-size:11px;
  font-weight:900;
  letter-spacing:0.24px;
  text-transform:uppercase;
}
.arZoneChips{
  display:flex;
  gap:8px;
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  padding-bottom:2px;
}
.arZoneChip{
  flex:0 0 auto;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:2px;
  min-width:118px;
  border:1px solid rgba(255,255,255,0.16);
  background:rgba(255,255,255,0.10);
  color:#fff;
  padding:10px 12px;
  border-radius:18px;
  text-align:left;
}
.arZoneChip__label{
  font-weight:900;
  font-size:13px;
  line-height:1.15;
  white-space:nowrap;
}
.arZoneChip__meta{
  color:rgba(255,255,255,0.72);
  font-size:11px;
  line-height:1.2;
  white-space:nowrap;
}
.arZoneChip.is-active{
  background:rgba(90,167,255,0.94);
  border-color:rgba(90,167,255,0.98);
  box-shadow:0 8px 18px rgba(47,108,255,0.24);
}
.arZoneChip.is-active .arZoneChip__meta{
  color:rgba(255,255,255,0.92);
}
.arZoneChip[data-status="draft"]::after,
.arZoneChip[data-status="mask"]::after{
  content:" •";
  opacity:0.78;
}
.arZoneChip:disabled{opacity:0.65;}
.arZoneActions{
  display:flex;
  gap:8px;
  width:100%;
}
.arZoneActions .btnGhost{
  min-width:0;
  padding:11px 10px;
}
.btnGhost--danger{
  background:rgba(255,86,86,0.94);
  border-color:rgba(255,86,86,0.98);
  color:#fff;
}
.btnGhost:disabled,
.btnGhost--danger:disabled{
  opacity:0.55;
}

.arDialogBackdrop{
  position:absolute;
  inset:0;
  z-index:72;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding:12px 12px calc(12px + var(--safe-bottom));
  background:rgba(0,0,0,0.16);
  backdrop-filter: blur(6px);
}
.arDialogCard{
  width:min(100%, 420px);
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:14px;
  border-radius:20px;
  background:rgba(22,26,34,0.94);
  border:1px solid rgba(255,255,255,0.12);
  box-shadow:0 18px 44px rgba(0,0,0,0.34);
}
.arDialogTitle{
  color:#fff;
  font-size:18px;
  line-height:1.2;
  font-weight:1000;
}
.arDialogText{
  color:rgba(255,255,255,0.88);
  font-size:14px;
  line-height:1.45;
}
.arDialogMeta{
  color:rgba(255,255,255,0.66);
  font-size:12px;
  line-height:1.35;
}
.arDialogActions{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:10px;
  width:100%;
}
.arDialogActions .btnGhost{
  margin:0;
  min-height:46px;
}

.arDialogCard--sheet{
  width:min(100%, 440px);
}
.arDialogActions--stack{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:10px;
}
.arFieldBlock{
  display:flex;
  flex-direction:column;
  gap:6px;
  width:100%;
}
.arFieldLabel{
  color:rgba(255,255,255,0.76);
  font-size:11px;
  font-weight:900;
  letter-spacing:0.22px;
  text-transform:uppercase;
}
.arFieldSelect{
  width:100%;
  min-height:46px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(255,255,255,0.10);
  color:#fff;
  padding:0 12px;
  font-size:14px;
  font-weight:800;
}
.arFieldSelect option{
  color:#111827;
}
.arFieldSelect--hidden{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}
.arChoiceChips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.arChoiceChip{
  appearance:none;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(255,255,255,0.08);
  color:#fff;
  padding:10px 12px;
  border-radius:14px;
  font-size:12px;
  line-height:1.2;
  font-weight:900;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.arChoiceChip.is-active,
.arChoiceChip[aria-pressed="true"]{
  background:linear-gradient(180deg, rgba(94,175,255,1), rgba(44,117,255,0.98));
  border-color:rgba(150,210,255,1);
  color:#fff;
  box-shadow:0 0 0 2px rgba(122,193,255,0.28), 0 12px 28px rgba(47,108,255,0.34), inset 0 1px 0 rgba(255,255,255,0.32);
}
.arChoiceChip.is-active .arChoiceChipSwatch,
.arChoiceChip[aria-pressed="true"] .arChoiceChipSwatch{
  border-color:rgba(255,255,255,0.88);
  box-shadow:0 0 0 2px rgba(255,255,255,0.28), inset 0 1px 2px rgba(255,255,255,0.24);
}
.arChoiceChip--swatch{
  min-width:98px;
  justify-content:flex-start;
}
.arChoiceChipSwatch{
  width:14px;
  height:14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.28);
  box-shadow:inset 0 1px 2px rgba(255,255,255,0.22);
  flex:0 0 auto;
}
.arChoiceChipSwatch--gray{background:#8E949B;}
.arChoiceChipSwatch--graphite{background:#5E6670;}
.arChoiceChipSwatch--sand{background:#C8B18A;}
.arCurbPreview{
  display:flex;
  flex-direction:column;
  gap:4px;
  width:100%;
  padding:12px 13px;
  border-radius:16px;
  background:linear-gradient(180deg, rgba(90,167,255,0.18), rgba(255,255,255,0.06));
  border:1px solid rgba(90,167,255,0.28);
}
.arCurbPreviewEyebrow{
  color:rgba(255,255,255,0.64);
  font-size:10px;
  font-weight:900;
  letter-spacing:0.22px;
  text-transform:uppercase;
}
.arCurbPreviewTitle{
  color:#fff;
  font-size:15px;
  line-height:1.2;
  font-weight:1000;
}
.arCurbPreviewMeta{
  color:rgba(255,255,255,0.82);
  font-size:12px;
  line-height:1.35;
}
.arCurbSegmentsWrap{
  display:flex;
  flex-direction:column;
  gap:8px;
  width:100%;
  padding:10px 12px;
  border-radius:16px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.12);
}
.arCurbSegments{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.arCurbSegmentChip{
  appearance:none;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(255,255,255,0.08);
  color:#fff;
  padding:9px 10px;
  border-radius:14px;
  font-size:12px;
  line-height:1.25;
  font-weight:800;
  text-align:left;
}
.arCurbSegmentChip.is-active,
.arCurbSegmentChip[aria-pressed="true"]{
  background:linear-gradient(180deg, rgba(94,175,255,1), rgba(44,117,255,0.98));
  border-color:rgba(150,210,255,1);
  box-shadow:0 0 0 2px rgba(122,193,255,0.22), 0 10px 22px rgba(47,108,255,0.3), inset 0 1px 0 rgba(255,255,255,0.28);
}
.arCurbSegmentChip:disabled{
  opacity:0.5;
}

.snapshotToast{
  position:absolute;
  left:12px;
  right:12px;
  top:calc(var(--ar-top-strip) + 12px);
  padding:12px 14px;
  border-radius:16px;
  background:rgba(0,0,0,0.62);
  border:1px solid rgba(255,255,255,0.12);
  color:rgba(255,255,255,0.96);
  font-size:13px;
  line-height:1.35;
  font-weight:900;
  text-align:center;
  z-index:58;
  pointer-events:none;
  backdrop-filter: blur(10px);
}
.snapshotLogoOverlay{
  position:absolute;
  right:calc(12px + env(safe-area-inset-right));
  bottom:calc(12px + var(--safe-bottom));
  width:min(24vw, 112px);
  padding:6px 8px;
  border-radius:14px;
  background:rgba(0,0,0,0.16);
  backdrop-filter: blur(6px);
  box-shadow:0 8px 22px rgba(0,0,0,0.14);
  z-index:56;
  pointer-events:none;
}
.snapshotLogoOverlay img{
  display:block;
  width:100%;
  height:auto;
}
.snapshotDismissLayer{
  position:absolute;
  inset:0;
  z-index:55;
  background:transparent;
}
.rotationPanel{
  display:flex;
  flex-direction:column;
  gap:10px;
  width:100%;
  padding:12px;
  border-radius:18px;
  background:rgba(255,255,255,0.10);
  border:1px solid rgba(255,255,255,0.14);
  box-shadow:0 10px 28px rgba(0,0,0,0.18);
}
.rotationPanelHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.rotationPanelTitle{
  color:#fff;
  font-weight:900;
  letter-spacing:0.2px;
}
.rotationResetBtn,
.rotationStepBtn{
  border:0;
  border-radius:12px;
  background:rgba(255,255,255,0.14);
  color:#fff;
  font-weight:900;
}
.rotationResetBtn{
  padding:8px 10px;
  white-space:nowrap;
}
.rotationPanelMeta{
  color:rgba(255,255,255,0.86);
  font-size:12px;
  line-height:1.35;
  font-weight:800;
}
.rotationHint{
  color:rgba(255,255,255,0.78);
  font-size:12px;
  line-height:1.35;
}
.rotationStepRow{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  gap:10px;
  align-items:center;
}
.rotationStepBtn{
  min-height:42px;
  padding:10px 12px;
}
.rotationValue{
  min-width:64px;
  text-align:center;
  color:#fff;
  font-weight:1000;
  font-size:18px;
}
.rotationSlider{
  width:100%;
  margin:2px 0 0;
}
.calibrationPanel{
  position:fixed;
  right:10px;
  bottom:calc(var(--ar-bottom-strip) + 18px + var(--safe-bottom) + 12px);
  z-index:26;
  width:min(42vw, 380px);
  max-width:min(42vw, 380px);
  max-height:min(72vh, 640px);
  overflow:hidden;
  overscroll-behavior:contain;
  gap:10px;
  padding:12px;
  pointer-events:auto;
  touch-action:manipulation;
  background:rgba(9,16,34,0.90);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  border:1px solid rgba(112,170,255,0.18);
  box-shadow:0 18px 36px rgba(0,0,0,0.30);
}
.calibrationPanel::-webkit-scrollbar{width:0;height:0;}
.calibrationPanelBody{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:0;
  overflow:hidden;
}
.calibrationPanelHeader{align-items:flex-start;}
.calibrationPanelHeaderActions{display:flex;align-items:center;gap:8px;flex:0 0 auto;}
.calibrationCollapseBtn{background:rgba(255,255,255,0.10);}
.calibrationStepRow .rotationValue{min-width:72px;}
.calibrationTabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;flex:0 0 auto;}
.calibrationTab{
  min-height:40px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(255,255,255,0.06);
  color:rgba(255,255,255,0.84);
  font-weight:900;
}
.calibrationTab,
.calibrationCollapseBtn,
.calibrationPanel .rotationResetBtn,
.calibrationPanel .rotationStepBtn{
  touch-action:manipulation;
  user-select:none;
  -webkit-user-select:none;
  -webkit-tap-highlight-color:transparent;
}
.calibrationPanel .rotationSlider,
.calibrationParamSlider{
  touch-action:none;
}
.calibrationTab.is-active{
  color:#fff;
  border-color:rgba(97,168,255,0.78);
  background:linear-gradient(180deg, rgba(66,129,255,0.34), rgba(43,96,192,0.24));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,0.10), 0 10px 24px rgba(25,79,180,0.18);
}
.calibrationSection{display:flex;flex-direction:column;gap:10px;min-height:0;}
.calibrationParamScroll{
  max-height:min(44vh, 360px);
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y;
  padding-right:2px;
}
.calibrationParamScroll::-webkit-scrollbar{width:0;height:0;}
.calibrationParamList{display:flex;flex-direction:column;gap:10px;}
.calibrationParam{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:10px 12px;
  border-radius:16px;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.08);
}
.calibrationParamTop{display:flex;align-items:center;justify-content:space-between;gap:12px;}
.calibrationParamLabel{color:#fff;font-size:13px;font-weight:900;line-height:1.2;}
.calibrationParamValue{color:rgba(255,255,255,0.92);font-size:12px;font-weight:1000;letter-spacing:0.01em;}
.calibrationParamSlider{margin:0;}
@media (max-width: 640px){
  .calibrationPanel{
    width:min(54vw, 296px);
    max-width:min(54vw, 296px);
    right:8px;
    bottom:calc(var(--ar-bottom-strip) + 18px + var(--safe-bottom) + 10px);
    padding:10px 11px;
    border-radius:16px;
  }
  .calibrationParamScroll{max-height:min(40vh, 300px);}
  .calibrationPanel .rotationPanelTitle{font-size:14px;line-height:1.2;}
  .calibrationPanel .rotationHint{font-size:11px;line-height:1.3;}
  .calibrationPanel .rotationPanelMeta{font-size:11px;}
  .calibrationPanelHeaderActions{width:100%;justify-content:flex-end;}
  .calibrationPanel .rotationResetBtn,
  .calibrationPanel .calibrationCollapseBtn{padding:7px 8px;font-size:11px;}
  .calibrationPanel .calibrationStepRow{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
  .calibrationPanel .calibrationStepRow .rotationValue{grid-column:1 / -1;order:-1;min-width:0;font-size:16px;}
  .calibrationPanel .rotationStepBtn{min-height:38px;padding:8px 8px;font-size:12px;}
  .calibrationPanel .calibrationParam{padding:8px 9px;gap:6px;border-radius:14px;}
  .calibrationPanel .calibrationParamTop{align-items:flex-start;gap:6px;}
  .calibrationPanel .calibrationParamLabel{font-size:12px;}
  .calibrationPanel .calibrationParamValue{font-size:11px;}
  .finalPatterns{gap:8px;padding-right:10px;}
  .patternTab{padding:9px 11px;border-radius:13px;font-size:13px;}
  .arZoneCompact{padding:8px 10px;gap:8px;}
  .arZoneCompactTitle{font-size:12px;}
  .arZoneCompactMeta{font-size:10px;}
  .arZoneCompactAction{min-height:36px;padding:9px 10px;font-size:11px;border-radius:12px;}
    .arDraftAssist{width:min(420px, calc(100vw - 24px));padding:7px 8px;gap:6px;}
  .arDraftAssistHint{font-size:11px;}
  .arDraftAssistActions{gap:6px;}
  .btnGhost--compact{min-width:96px;padding:9px 10px;font-size:12px;}
  .arZoneChip{min-width:104px;}
  .arZoneSummaryTitle{font-size:14px;}
  .arZoneActions{flex-wrap:wrap;}
  .arZoneActions .btnGhost{flex:1 1 calc(50% - 6px);}
  .arZoneActions .btnGhost--danger{flex-basis:100%;}
  .arFieldSelect{min-height:44px;font-size:13px;}
}
.finalColors{display:flex;gap:12px;overflow-x:auto;overflow-y:hidden;padding:2px 0 4px;align-items:flex-start;-webkit-overflow-scrolling:touch;}
.finalColors .swatch{flex:0 0 77px;width:77px;height:77px;border-radius:16px;border-color:rgba(255,255,255,0.20);background-color:rgba(255,255,255,0.04);}
.finalColors--grouped{gap:10px;align-items:center;}
.finalColorSection{display:flex;flex-direction:row;align-items:center;gap:8px;min-width:max-content;flex:0 0 auto;}
.finalColorSectionLabel{display:inline-flex;align-items:center;gap:6px;min-height:16px;padding:0 2px 0 0;border-radius:0;background:transparent;border:0;color:rgba(255,255,255,0.76);font-size:10px;font-weight:900;letter-spacing:0.22px;line-height:1;text-transform:uppercase;white-space:nowrap;flex:0 0 auto;}
.finalColorSectionLabel::before{content:"";display:block;width:1px;height:14px;border-radius:999px;background:rgba(255,255,255,0.18);}
.finalColorSection:first-child .finalColorSectionLabel::before{display:none;}
.finalColorSectionRow{display:flex;gap:10px;align-items:center;}
.finalColors--grouped .swatch.swatch--active,
.finalColors--grouped .swatch:focus-visible{outline:none;border-color:rgba(255,255,255,0.98);box-shadow:inset 0 0 0 3px rgba(90,167,255,0.98), 0 0 0 1px rgba(255,255,255,0.20);}
.finalColorRailHint{display:flex;align-items:center;justify-content:center;min-width:160px;min-height:77px;padding:0 16px;border-radius:18px;background:rgba(255,255,255,0.10);border:1px dashed rgba(255,255,255,0.18);color:rgba(255,255,255,0.82);font-size:12px;font-weight:900;line-height:1.25;text-align:center;flex:0 0 auto;}

.measureLayer{position:absolute;inset:0;pointer-events:none;}
.measureLabel{
  position:absolute;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(90,167,255,0.86);
  color:#fff;
  font-weight:900;
  font-size:14px;
  transform:translate(-50%,-50%);
  white-space:nowrap;
}

@media (min-width: 820px){
  .catalogCards{max-width:780px;margin:0 auto;padding-bottom:24px;}
  .catalogFooterCta{max-width:780px;margin:0 auto;}
}

@media (min-width: 980px){
  .detailTop{
    width:min(1240px, calc(100% - 32px));
    margin:0 auto 14px;
    padding:calc(14px + var(--safe-top)) 18px 14px;
    border-radius:0 0 22px 22px;
    background:rgba(255,255,255,0.9);
    box-shadow:0 12px 30px rgba(15,23,42,0.08);
    backdrop-filter:saturate(1.05) blur(6px);
  }
  .detailTopTitle{
    min-width:0;
    font-size:clamp(19px, 2vw, 24px);
    line-height:1.18;
    opacity:0.92;
  }
  .detailHero{
    width:min(1240px, calc(100% - 32px));
    margin:0 auto;
    height:clamp(320px, 31vw, 500px);
    border-radius:30px;
    background:#eef2f6;
    box-shadow:0 18px 52px rgba(15,23,42,0.12);
  }
  .heroTrack,
  .heroSlide{height:100%;}
  .heroSlide img{
    object-fit:contain;
    background:#eef2f6;
  }
  .detailBody{
    max-width:1240px;
    margin:0 auto;
    padding:22px 18px 126px;
    background:transparent;
  }
  .detailBody > *{
    width:min(100%, 560px);
    margin-left:auto;
    margin-right:auto;
  }
  .detailRow{
    align-items:flex-end;
    margin-bottom:14px;
  }
  .detailName{font-size:clamp(38px, 4vw, 56px);}
  .detailSub{font-size:clamp(18px, 1.8vw, 24px);opacity:0.72;}
  .calculatorMount{
    width:min(1240px, calc(100% - 32px));
    margin:28px auto 40px;
  }
  .calculatorEmbed{
    border-radius:30px;
    box-shadow:0 22px 58px rgba(15,23,42,0.12);
  }
  .calculatorEmbed__head{
    padding:18px 22px 14px;
    border-radius:30px 30px 0 0;
  }
  .calculatorEmbed__body{border-radius:0 0 30px 30px;}
}


/* --- Антика: карусель в шапке страницы формы --- */
.detailHero{
  position: relative;
  overflow: hidden;
}
.heroCarousel{
  width: 100%;
  height: 100%;
  position: relative;
}
.heroTrack{
  width: 100%;
  height: 100%;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.heroTrack::-webkit-scrollbar{ display:none; }
.heroSlide{
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: start;
}
.heroSlide img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.heroDots{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}
.heroDot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.45);
}
.heroDot.active{
  background: rgba(255,255,255,.90);
}

/* --- Аккордеон "Технические параметры" --- */
.techToggle{
  width: 100%;
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  cursor: pointer;
}
.techToggle .chev{
  opacity: .8;
  transition: transform .15s ease;
}
.techToggle[aria-expanded="true"] .chev{ transform: rotate(180deg); }


/* Tech params toggle */
.techHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.techTitle{
  font-weight:700;
}
.btnSmall{
  background:rgba(0,0,0,0.06);
  border:none;
  padding:8px 12px;
  border-radius:10px;
  font-weight:600;
  cursor:pointer;
}
.btnSmall:active{ transform:scale(0.98); }
.techBody{
  position:relative;
  padding-top:6px;
}
.techClose{
  position:absolute;
  top:6px;
  right:8px;
  width:30px;
  height:30px;
  border-radius:15px;
  border:none;
  background:rgba(0,0,0,0.06);
  font-size:18px;
  line-height:30px;
  cursor:pointer;
}


/* StoneMix palette (horizontal gallery, 3 items visible) */
.stonemixPaletteBlock{
  margin-top: 10px;
  margin-bottom: 16px;
}

.stonemixPaletteTitle{
  font-size: 16px;
  font-weight: 700;
  margin: 8px 0 10px;
  opacity: 0.9;
}

.stonemixPaletteScroll{
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.stonemixPaletteScroll::-webkit-scrollbar{
  height: 6px;
}
.stonemixPaletteScroll::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,0.18);
  border-radius: 6px;
}

.stonemixPaletteItem{
  flex: 0 0 calc((100% - 20px) / 3); /* 3 cards per viewport (2 gaps) */
  aspect-ratio: 3 / 4;
  border-radius: 5px;
  border: 1px solid rgba(0,0,0,0.10);
  background-size: cover;
  background-position: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  scroll-snap-align: start;
}

/* ===== Splash screen (2.5s) ===== */
body.splash-active { overflow: hidden; }
body.splash-active #app { opacity: 0; pointer-events: none; }
#app { transition: opacity 0.35s ease; }

#splashScreen{
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  overflow: hidden;
}
#splashScreen::before{
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/ui/splash.webp") center / contain no-repeat;
  transform-origin: center;
  animation: splashZoom 3s ease-in-out forwards;
}
#splashScreen::after{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.18);
}
#splashScreen.fadeout {
  opacity: 0;
  transition: opacity 0.35s ease;
}

@keyframes splashZoom{
  from { transform: scale(0.94); }
  to   { transform: scale(1.00); }
}
to   { transform: scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
  #splashScreen { animation: none; }
}


/* --- AR Shape Picker --- */
.shapePickerBackdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.0);
  z-index:9998;
}
.shapePickerPanel{
  position:fixed;
  right:0;
  /* Keep clear of the top AR controls and align with the top edge of the bottom bar */
  /* Provide safe fallbacks in case JS didn't set the variables yet */
  top:var(--ar-top-strip, 64px);
  bottom:var(--ar-bottom-strip, 92px);
  /* Shrink-wrap to the preview cards (removes empty right-panel space on mobile). */
  width:fit-content;
  max-width:70vw;
  min-width:0;
  /* Match the bottom AR bar style */
  background:rgba(0,0,0,0.40);
  backdrop-filter: blur(10px);
  border-left:1px solid rgba(255,255,255,0.10);
  border-radius:7px 0 0 0;
  z-index:9999;
  transform:translateX(100%);
  transition:transform 180ms ease;
  display:flex;
  flex-direction:column;
}

/* Mobile AR: the drawer must be wide enough so preview images remain readable.
   Keep desktop narrow, but allow a wider panel on phones. */
@media (max-width: 520px) {
  .shapePickerPanel{
    /* Keep a safe cap so the panel never covers too much of the camera view */
    max-width:78vw;
  }
}
.shapePickerPanel.open{
  transform:translateX(0);
}
.shapePickerHeader{
  /* Keep the header from inflating the shrink-wrapped panel width */
  align-self:center;
  padding:10px 0 8px;
  font-size:12px;
  font-weight:900;
  letter-spacing:0.4px;
  text-transform:uppercase;
  opacity:0.9;
  border-bottom:1px solid rgba(255,255,255,0.10);
}
.shapePickerList{
  flex:1;
  overflow-y:auto;
  /* Slightly tighter horizontal padding so the drawer matches the preview width */
  padding:10px 0 12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  /* Do not stretch cards to full width — let them take the preview width */
  align-items:center;
}
.shapePickerItem{
  border:1px solid rgba(255,255,255,0.12);
  border-radius:7px;
  overflow:hidden;
  background:rgba(255,255,255,0.04);
  /* Fit the card to the preview width (no extra empty fields) */
  width:fit-content;
  max-width:100%;
  /* Mobile-first: keep thumbnails large; list scrolls naturally */
  height:auto;
  min-height:150px;
  max-height:none;
}
.shapePickerItem button{
  width:fit-content;
  padding:0;
  border:0;
  background:transparent;
  color:#fff;
  text-align:left;
  display:flex;
  flex-direction:column;
  /* Do not stretch inner blocks wider than the preview */
  align-items:center;
  height:100%;
  /* Critical for mobile Safari flexbox: allow inner preview to shrink instead of overflowing (which looks like "cropped") */
  min-height:0;
}
.shapePickerThumbWrap{
  flex:1;
  /* Fit the inner container to the image width while keeping the same height */
  width:fit-content;
  max-width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  background:transparent;
  border-radius:7px;
  /* No horizontal auto margins: keep wrapper tight to the image */
  margin:8px 0 0;
  align-self:center;
  /* Allow shrink inside flex column; prevent overflow clipping by the parent card */
  min-height:0;
  overflow:hidden;
  /* Ensure the preview is big enough on mobile. Card height becomes (thumb + name). */
  height:clamp(140px, 26vh, 240px);
}
.shapePickerThumb{
  /* Keep the full image visible (no cropping), but let width follow aspect ratio */
  width:auto;
  height:100%;
  max-width:100%;
  max-height:100%;
  object-fit:contain !important;
  object-position:center;
  display:block;
  border-radius:7px;
}
.shapePickerName{
  /* Keep the label within the preview width (no extra side padding) */
  padding:6px 0 10px;
  width:100%;
  box-sizing:border-box;
  font-size:12px;
  line-height:1.2;
  opacity:0.95;
  text-align:center;
  /* Keep layout stable: don't force the card wider than the preview */
  max-width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.shapePickerItem.active{
  border-color: rgba(90, 167, 255, 0.85);
  box-shadow: 0 0 0 2px rgba(90, 167, 255, 0.28);
}

/* Fix23: Compact conversion CTA replacing tech params (non-AR only) */
#detailTechCard #btnTechToggle{display:none !important;}
#detailTechCard .techHeader{align-items:center;}
#detailTechCard .techTitle{font-weight:700;}
#detailTechCard .convBody{
  display:flex;
  flex-direction:row;
  gap:10px;
  padding:10px 12px 12px;
}
#detailTechCard .convBtn{
  position:relative;
  flex:1 1 0;
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 10px;
  border-radius:14px;
  text-decoration:none;
  color:#fff;
  background:rgba(0,0,0,0.32);
  overflow:hidden;
  isolation:isolate;
}
#detailTechCard .convBtn:active,
#detailTechCard .convBtn:hover{
  background:rgba(0,0,0,0.46);
}
#detailTechCard .convBtn.convPrimary{
  /* Give primary CTA a bit more width so the full label fits reliably */
  flex:1.9 1 0;
  background:rgba(90, 170, 255, 0.65);
}
#detailTechCard .convBtn.convPrimary:active,
#detailTechCard .convBtn.convPrimary:hover{
  background:rgba(90, 170, 255, 0.82);
}
#detailTechCard .convIcon{
  position:relative;
  z-index:2;
  width:20px;
  height:20px;
  flex:0 0 20px;
}
#detailTechCard .convBtnSite{
  padding-right:34px;
}
#detailTechCard .convBtnSite .convIconCart{
  position:absolute;
  right:8px;
  top:50%;
  transform:translateY(-50%);
  z-index:1;
  width:21px;
  height:24px;
  object-fit:cover;
  object-position:center;
  opacity:0.92;
  pointer-events:none;
}

#detailTechCard .convText{
  position:relative;
  z-index:3;
  font-weight:700;
  /* Responsive sizing: keep on one line without truncation */
  font-size:clamp(11px, 3.15vw, 13px);
  line-height:1.05;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:clip;
}
@media (max-width: 360px){
  #detailTechCard .convBody{gap:8px;}
  #detailTechCard .convBtn{padding:11px 8px;}
  #detailTechCard .convIcon{width:18px;height:18px;flex:0 0 18px;}
  #detailTechCard .convBtnSite{padding-right:31px;}
  #detailTechCard .convBtnSite .convIconCart{right:7px;top:50%;width:19px;height:21px;}
  #detailTechCard .convText{font-size:clamp(10px, 3.05vw, 12px);}
}


@media (max-width: 420px){
  .arTop{
    padding-left:10px;
    padding-right:10px;
    gap:8px;
  }
  .arTitle{font-size:13px;line-height:1.16;}
  .arArea{font-size:10px;}
}

.calculatorMount{
  width:min(100%, 1240px);
  margin:20px auto 28px;
}

.calculatorEmbed{
  border:1px solid rgba(148,163,184,.24);
  border-radius:22px;
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.98));
  box-shadow:0 18px 46px rgba(15,23,42,.08);
  overflow:hidden;
}

.calculatorEmbed__head{
  padding:16px 18px 12px;
  border-bottom:1px solid rgba(148,163,184,.18);
  background:linear-gradient(180deg, rgba(241,245,249,.92), rgba(255,255,255,.72));
}

.calculatorEmbed__body{
  padding:0;
  background:#f8fafc;
  border-radius:0 0 22px 22px;
  overflow:hidden;
}

.calculatorEmbed__title{
  font-size:22px;
  line-height:1.1;
  font-weight:900;
  color:#0f172a;
}

.calculatorEmbed__sub{
  margin-top:6px;
  font-size:13px;
  line-height:1.4;
  color:#475569;
}

.calculatorEmbed__frameWrap{
  padding:0;
  background:#f8fafc;
}

.calculatorEmbed__frame{
  display:block;
  width:100%;
  min-height:960px;
  border:0;
  background:#f8fafc;
}

@media (max-width: 760px){
  .calculatorMount{
    margin:16px auto 22px;
  }
  .calculatorEmbed{
    border-radius:18px;
  }
  .calculatorEmbed__body{
    border-radius:0 0 18px 18px;
  }
  .calculatorEmbed__head{
    padding:14px 14px 10px;
  }
  .calculatorEmbed__title{
    font-size:18px;
  }
  .calculatorEmbed__sub{
    font-size:12.5px;
  }
}
