/* ============================================
   DENTICOR AI ENGINE V2 — CSS
   Mobile-first · Design Blueprint specs
   ============================================ */

/* TOOTH PICKER */
.ai-picker { text-align:center; }
.ai-picker-title { font-size:22px; font-weight:700; color:#1E2328; margin-bottom:4px; }
.ai-picker-sub { font-size:14px; color:#6B7280; margin-bottom:24px; }

.ai-jaw { margin-bottom:20px; }
.ai-jaw-label { font-size:12px; font-weight:600; color:#6B7280; text-transform:uppercase; letter-spacing:0.06em; margin:8px 0; }

.ai-teeth-row { display:flex; justify-content:center; gap:3px; flex-wrap:nowrap; }
.ai-teeth-gap { width:8px; flex-shrink:0; }

/* Mobile: grid 8 columns = 2 rows of 8, hide gap, big touch targets */
@media(max-width:600px){
  .ai-teeth-row { display:grid; grid-template-columns:repeat(8,1fr); gap:5px; justify-items:center; }
  .ai-teeth-gap { display:none; }
  .ai-tooth { width:100%; max-width:44px; height:52px; }
  .ai-t-shape { width:30px; height:34px; }
  .ai-t-num { font-size:10px; }
}

.ai-tooth { 
  width:clamp(28px,6vw,38px); height:clamp(40px,8vw,52px); 
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  cursor:pointer; border-radius:6px; transition:all .15s; position:relative;
  -webkit-tap-highlight-color:transparent;
}
.ai-tooth:active { transform:scale(0.92); }

.ai-t-shape {
  width:clamp(18px,4vw,26px); height:clamp(24px,5vw,34px);
  border-radius:4px 4px 6px 6px; transition:all .2s;
  border:1px solid transparent;
}
/* Main diagram uses the same colors as the helper map below it. */
.ai-t-central-incisor .ai-t-shape { background:#FCE4EC; border-color:#E0909A; }
.ai-t-lateral-incisor .ai-t-shape { background:#FFF3E0; border-color:#E0C090; }
.ai-t-canine .ai-t-shape { background:#E8F0E4; border-color:#9DC49A; }
.ai-t-premolar .ai-t-shape { background:#D9E8ED; border-color:#A4C4D0; }
.ai-t-molar .ai-t-shape { background:#EBE4D9; border-color:#C4B8A4; }
/* Backward compatibility if an older JS class remains cached. */
.ai-t-front .ai-t-shape { background:#FCE4EC; border-color:#E0909A; }
.ai-t-back .ai-t-shape { background:#EBE4D9; border-color:#C4B8A4; }
.ai-t-gone .ai-t-shape { background:#D4D0C8; border-color:#D4D0C8; opacity:0.35; }

.ai-t-num { font-size:9px; color:#6B7280; margin-top:2px; }
.ai-t-gone .ai-t-num { color:#A13F3F; font-weight:700; }

/* Legend */
.ai-legend { display:flex; gap:12px 14px; justify-content:center; flex-wrap:wrap; margin:16px 0; font-size:12px; color:#6B7280; }
.ai-leg-item { display:flex; align-items:center; gap:4px; }
.ai-leg-dot { width:10px; height:10px; border-radius:3px; border:1px solid transparent; }
.ai-leg-central { background:#FCE4EC; border-color:#E0909A; }
.ai-leg-lateral { background:#FFF3E0; border-color:#E0C090; }
.ai-leg-canine { background:#E8F0E4; border-color:#9DC49A; }
.ai-leg-premolar { background:#D9E8ED; border-color:#A4C4D0; }
.ai-leg-molar { background:#EBE4D9; border-color:#C4B8A4; }
.ai-leg-front { background:#FCE4EC; border-color:#E0909A; }
.ai-leg-back { background:#EBE4D9; border-color:#C4B8A4; }
.ai-leg-gone { background:#D4D0C8; border-color:#D4D0C8; opacity:0.45; }

/* Selected summary */
.ai-sel-summary { background:#FAF8F5; border-radius:12px; padding:16px; margin:16px 0; text-align:left; }
.ai-sel-title { font-size:14px; font-weight:600; color:#1E2328; margin-bottom:8px; }
.ai-sel-chip { display:inline-block; font-size:12px; background:#fff; border:1px solid #D4D0C8; border-radius:100px; padding:4px 10px; margin:2px 4px 2px 0; color:#4B5563; }

/* Buttons */
.ai-btn-next {
  display:block; width:100%; padding:16px; margin-top:16px;
  background:#244651; color:#fff; border:none; border-radius:12px;
  font-size:16px; font-weight:700; cursor:pointer; font-family:inherit;
  min-height:48px; transition:background .15s;
}
.ai-btn-next:hover { background:#1B3640; }

.ai-hint { font-size:14px; color:#6B7280; margin-top:16px; }
.ai-warn { background:#F7EAEA; border-left:4px solid #A13F3F; border-radius:0 12px 12px 0; padding:14px 16px; margin-top:16px; font-size:14px; color:#4B5563; text-align:left; }

/* SITUATION BUTTONS */
.ai-situation { text-align:center; }
.ai-sit-btn {
  display:flex; align-items:center; gap:12px; width:100%; padding:16px;
  margin-bottom:8px; background:#fff; border:2px solid #E2DED6;
  border-radius:12px; cursor:pointer; font-family:inherit; font-size:15px;
  color:#4B5563; text-align:left; min-height:48px; transition:all .15s;
}
.ai-sit-btn:hover { border-color:#244651; }
.ai-sit-icon { font-size:20px; flex-shrink:0; }
.ai-sit-label { flex:1; }

.ai-skip-btn {
  display:block; width:100%; padding:14px; margin-top:8px;
  background:transparent; border:none; color:#244651; font-size:14px;
  font-weight:600; cursor:pointer; font-family:inherit;
}
.ai-back-btn {
  display:block; width:100%; padding:14px; margin-top:4px;
  background:transparent; border:none; color:#6B7280; font-size:14px;
  cursor:pointer; font-family:inherit; text-align:center;
}

/* RESULT */
.ai-result { text-align:left; }

.ai-block {
  background:#fff; border-radius:16px; padding:20px;
  margin-bottom:12px; border:1px solid #E2DED6;
}
.ai-block-icon { font-size:24px; margin-bottom:8px; }
.ai-block-title { font-size:17px; font-weight:700; color:#1E2328; margin-bottom:12px; }
.ai-block-body { font-size:15px; color:#4B5563; line-height:1.7; }

/* Situation block */
.ai-block-situation { background:#FAF8F5; }
.ai-tooth-label { font-size:14px; color:#244651; font-weight:600; padding:2px 0; }
.ai-scenarios-label { font-size:13px; color:#6B7280; margin-top:8px; }

/* Metrics */
.ai-metrics { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.ai-metric { background:#FAF8F5; border-radius:10px; padding:12px; }
.ai-metric-label { font-size:12px; color:#6B7280; font-weight:600; text-transform:uppercase; letter-spacing:0.04em; margin-bottom:4px; }
.ai-metric-val { font-size:15px; font-weight:700; color:#1E2328; }
.ai-metric-big { font-size:18px; }
.ai-metric-bar { height:6px; background:#E2DED6; border-radius:3px; margin:6px 0; }
.ai-metric-fill { height:100%; background:#244651; border-radius:3px; transition:width .4s; }

/* Package block */
.ai-block-pkg { border:2px solid #244651; }
.ai-pkg-badge { font-size:12px; font-weight:700; color:#244651; text-transform:uppercase; letter-spacing:0.06em; margin-bottom:4px; }
.ai-pkg-name { font-size:22px; font-weight:800; color:#1E2328; }
.ai-pkg-price { font-size:18px; font-weight:600; color:#244651; margin-bottom:12px; }
.ai-pkg-refills { margin-bottom:12px; }
.ai-refill-chip { display:inline-block; font-size:13px; background:#FAF5E8; border:1px solid #8B7335; color:#8B7335; border-radius:100px; padding:4px 10px; margin:2px 4px 2px 0; font-weight:600; }
.ai-pkg-total { font-size:15px; font-weight:700; color:#1E2328; margin-top:8px; }
.ai-pkg-reason { font-size:14px; color:#4B5563; line-height:1.6; margin-bottom:16px; background:#FAF8F5; padding:12px; border-radius:10px; }

/* Material bars */
.ai-mat-section { margin-bottom:16px; }
.ai-mat-title { font-size:14px; font-weight:600; color:#1E2328; margin-bottom:10px; }
.ai-mat-row { margin-bottom:10px; }
.ai-mat-label { font-size:13px; font-weight:600; color:#4B5563; margin-bottom:4px; }
.ai-mat-bar { height:8px; background:#E2DED6; border-radius:4px; }
.ai-mat-fill { height:100%; border-radius:4px; transition:width .4s; }
.ai-mat-plus { background:#3A6B7C; }
.ai-mat-df { background:#5A8A6A; }
.ai-mat-nums { font-size:12px; color:#6B7280; margin-top:3px; }

/* Buy button */
.ai-btn-buy {
  display:block; width:100%; padding:16px; text-align:center;
  background:#244651; color:#fff; border-radius:12px;
  font-size:16px; font-weight:700; text-decoration:none;
  min-height:48px; line-height:1; transition:background .15s;
}
.ai-btn-buy:hover { background:#1B3640; color:#fff; }
.ai-btn-buy.ai-btn-secondary {
  background:transparent; border:2px solid #244651; color:#244651;
}
.ai-btn-buy.ai-btn-secondary:hover { background:#244651; color:#fff; }

.ai-btn-phone {
  display:block; width:100%; padding:14px; text-align:center;
  background:transparent; border:2px solid #244651; color:#244651;
  border-radius:12px; font-size:15px; font-weight:600; text-decoration:none;
  min-height:48px; margin-top:8px;
}

/* Guide teaser */
.ai-block-guide { background:#FAF5E8; border-color:#8B7335; }
.ai-guide-teaser { margin-bottom:10px; font-size:14px; color:#4B5563; }
.ai-guide-meta { font-size:13px; color:#6B7280; margin-top:2px; }
.ai-guide-includes { font-size:13px; color:#6B7280; margin-top:12px; padding-top:12px; border-top:1px solid rgba(139,115,53,.2); line-height:1.6; }

/* Rules */
.ai-rules { display:flex; flex-direction:column; gap:8px; }
.ai-rule { display:flex; gap:10px; align-items:flex-start; font-size:14px; color:#4B5563; line-height:1.6; }
.ai-rule-icon { font-size:16px; flex-shrink:0; margin-top:2px; }

/* Situation context */
.ai-block-sit { background:#E8F0F3; border-color:#3A6B7C; }
.ai-block-sit p { font-size:15px; color:#4B5563; line-height:1.7; margin:0; }

/* CTA block */
.ai-block-cta { text-align:center; background:#FAF8F5; border:none; }
.ai-cta-text { font-size:16px; font-weight:600; color:#1E2328; margin-bottom:16px; }
.ai-cta-note { font-size:13px; color:#6B7280; margin-top:12px; }

/* ============================================
   TABLET (768px+)
   ============================================ */
@media (min-width:768px) {
  .ai-tooth { width:38px; height:52px; }
  .ai-t-shape { width:26px; height:34px; }
  .ai-teeth-gap { width:16px; }
  .ai-metrics { grid-template-columns:repeat(4,1fr); }
  .ai-block { padding:24px; }
}

/* ============================================
   DESKTOP (1024px+)
   ============================================ */
@media (min-width:1024px) {
  .ai-tooth { width:42px; height:56px; }
  .ai-t-shape { width:28px; height:36px; }
  .ai-btn-next, .ai-btn-buy { max-width:400px; margin-left:auto; margin-right:auto; }
  .ai-btn-phone { max-width:400px; margin-left:auto; margin-right:auto; }
}

/* Universal rules block */
.ai-block-universal { background:#FAF8F5; }
.ai-rule-section { padding:14px 0; border-bottom:1px solid #E2DED6; }
.ai-rule-section:last-child { border-bottom:none; padding-bottom:0; }
.ai-rule-section:first-child { padding-top:0; }
.ai-rule-head { font-size:15px; font-weight:700; color:#1E2328; margin-bottom:4px; }
.ai-rule-text { font-size:14px; color:#4B5563; line-height:1.7; }
.ai-rule-text strong { color:#1E2328; }

/* ============================================
   MOBILE STEP-BY-STEP PICKER
   ============================================ */
.ai-mob-btn {
  display:flex;align-items:center;gap:12px;
  width:100%;padding:18px 20px;
  background:#fff;border:2px solid #E2DED6;border-radius:12px;
  font-size:16px;font-weight:600;color:#1E2328;
  cursor:pointer;text-align:left;
  font-family:'Plus Jakarta Sans',sans-serif;
  transition:border-color .15s,background .15s;
  min-height:56px;
}
.ai-mob-btn:hover,.ai-mob-btn:active{border-color:#244651;background:#F5F8FA}

.ai-mob-tooth {
  display:flex;align-items:center;justify-content:center;
  padding:16px 12px;
  background:#fff;border:2px solid #E2DED6;border-radius:10px;
  font-size:15px;font-weight:600;color:#1E2328;
  cursor:pointer;text-align:center;
  font-family:'Plus Jakarta Sans',sans-serif;
  transition:border-color .15s,background .15s;
  min-height:52px;
}
.ai-mob-tooth:hover,.ai-mob-tooth:active{border-color:#244651;background:#F5F8FA}

.ai-warn {
  background:#FEF3F2;border:1px solid #F5C6C6;border-radius:10px;
  padding:14px 18px;margin-top:16px;
  font-size:14px;color:#A13F3F;text-align:center;line-height:1.6;
}

/* Optional GPT low-effort helper inside manual diagram result */
.ai-manual-helper {
  background: #F2FAF7;
  border: 1px solid rgba(45,110,76,.18);
  border-radius: 16px;
  padding: 16px 18px;
  margin: 16px 0;
  color: #1E2328;
}
.ai-manual-helper-kicker {
  font-size: 12px;
  font-weight: 800;
  color: #2D6E4C;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}
.ai-manual-helper-title {
  font-size: 17px;
  font-weight: 800;
  color: #1E2328;
  line-height: 1.3;
  margin-bottom: 8px;
}
.ai-manual-helper-loading,
.ai-manual-helper p {
  font-size: 14px;
  color: #4B5563;
  line-height: 1.65;
  margin: 8px 0 0;
}
.ai-manual-helper small {
  display: block;
  font-size: 12px;
  color: #6B7280;
  line-height: 1.55;
  margin-top: 8px;
}
.ai-manual-helper-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.ai-manual-helper-chips span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(36,70,81,.14);
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  color: #244651;
}


/* ============================================
   PC tooth picker selected state — Mockup 02
   ============================================ */
.ai-picker-desktop .ai-picker-layout {
  display:grid;
  gap:20px;
  align-items:start;
  margin-top:22px;
}
.ai-picker-board {
  background:#fff;
  border:1px solid #E2DED6;
  border-radius:18px;
  padding:clamp(18px,3vw,28px);
}
.ai-picker-side {
  background:#F6FBFD;
  border:1px solid rgba(36,70,81,.14);
  border-radius:18px;
  padding:22px;
  text-align:left;
}
.ai-picker-side-kicker {
  font-size:11px;
  line-height:1.2;
  color:#244651;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
  margin-bottom:10px;
}
.ai-picker-side-title {
  font-size:22px;
  line-height:1.2;
  color:#1E2328;
  font-weight:800;
  letter-spacing:-.02em;
  margin:0 0 14px;
}
.ai-picker-side-empty {
  font-size:14px;
  color:#6B7280;
  line-height:1.6;
  margin:0;
}
.ai-sel-num-row {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:10px 0 16px;
}
.ai-sel-num-chip {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:40px;
  min-height:34px;
  padding:8px 12px;
  border-radius:10px;
  background:#A13F3F;
  color:#fff;
  font-size:13px;
  line-height:1;
  font-weight:800;
  box-shadow:0 6px 14px rgba(161,63,63,.18);
}
.ai-sel-groups {
  background:#fff;
  border:1px solid #E2DED6;
  border-radius:14px;
  padding:14px 16px;
  margin-top:12px;
}
.ai-sel-groups p {
  font-size:13px;
  color:#4B5563;
  line-height:1.55;
  margin:0;
}
.ai-sel-groups p + p { margin-top:8px; }
.ai-sel-groups strong { color:#1E2328; font-weight:800; }
.ai-picker-side .ai-btn-next { max-width:none; margin-top:18px; }
.ai-picker-side .ai-hint { text-align:left; margin-top:10px; }
.ai-picker-board-hint {
  margin:14px 0 0;
  padding:12px 14px;
  border:1px solid rgba(161,63,63,.22);
  background:#FEF3F2;
  border-radius:14px;
  color:#A13F3F;
  font-size:14px;
  line-height:1.35;
  font-weight:800;
  text-align:center;
}
.ai-picker-desktop .ai-jaw { margin-bottom:26px; }
.ai-picker-desktop .ai-teeth-row { gap:4px; }
.ai-picker-desktop .ai-tooth {
  border:1px solid transparent;
  background:#fff;
  border-radius:14px;
  padding:4px 2px 5px;
  height:66px;
}
.ai-picker-desktop .ai-tooth:hover {
  background:#FAF8F5;
  border-color:#E2DED6;
}
.ai-t-shape { position:relative; }
.ai-t-gone {
  background:#FEF3F2 !important;
  border:2px solid #A13F3F !important;
  box-shadow:0 0 0 3px rgba(161,63,63,.10), 0 8px 18px rgba(161,63,63,.16);
  opacity:1 !important;
}
.ai-t-gone:hover { background:#FEF3F2 !important; border-color:#8F3333 !important; }
.ai-t-gone .ai-t-shape {
  background:#A13F3F !important;
  border-color:#A13F3F !important;
  opacity:1 !important;
  border-radius:8px;
  box-shadow:none;
}
.ai-t-gone .ai-t-shape::before {
  content:"×";
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size:24px;
  font-weight:800;
  line-height:1;
}
.ai-t-gone .ai-t-num {
  color:#A13F3F;
  font-weight:800;
  font-size:11px;
  margin-top:3px;
}
.ai-t-missing {
  font-size:8px;
  line-height:1;
  color:#A13F3F;
  font-weight:800;
  letter-spacing:-.02em;
  margin-top:1px;
  text-transform:lowercase;
}
.ai-leg-gone { background:#A13F3F; border-color:#A13F3F; opacity:1; }


/* Keep non-picker AI screens readable after widening the diagram host. */
.ai-screening,
.ai-situation,
.ai-result {
  max-width:800px;
  margin-left:auto;
  margin-right:auto;
}
.ai-picker { max-width:none; }

@media (min-width:1180px) {
  .ai-picker-desktop .ai-picker-layout { grid-template-columns:minmax(0,1fr) 290px; }
  .ai-picker-side { position:sticky; top:96px; }
}
@media (max-width:1179px) {
  .ai-picker-side { max-width:680px; margin:0 auto; }
}
@media (max-width:767px) {
  .ai-picker-board,
  .ai-picker-side { padding:0; border:0; background:transparent; }
  .ai-picker-desktop .ai-tooth { height:52px; }
}

/* ============================================
   Visual tooth selector — approved Mockup 02 style
   ============================================ */
.ai-picker-visual {
  text-align:left;
  max-width:1180px;
  margin:0 auto;
  --selector-blue:#1D63D8;
  --selector-green:#13813A;
  --selector-red:#E21D2A;
  --selector-red-dark:#B91C1C;
  --selector-ink:#0B1736;
  --selector-muted:#667085;
  --selector-line:#E2E8F0;
}
.ai-picker-visual .ai-picker-title,
.ai-picker-visual .ai-picker-sub { text-align:left; }
.ai-picker-visual .ai-picker-title {
  color:var(--selector-ink);
  font-size:clamp(34px,4.2vw,46px);
  line-height:1.04;
  letter-spacing:-.045em;
  font-weight:900;
  margin:0 0 12px;
}
.ai-picker-visual .ai-picker-sub {
  max-width:760px;
  color:#344054;
  margin:0 0 22px;
  font-size:17px;
  line-height:1.45;
}
.ai-picker-info-pill {
  display:inline-flex;
  align-items:center;
  gap:12px;
  width:auto;
  max-width:600px;
  padding:12px 16px;
  margin:0 0 26px;
  background:#ECFDF3;
  border:1px solid #37B36B;
  border-radius:8px;
  color:#166534;
  font-size:15px;
  line-height:1.4;
  font-weight:600;
}
.ai-info-icon {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 22px;
  width:22px;
  height:22px;
  border-radius:50%;
  background:#13813A;
  color:#fff;
  font-size:13px;
  line-height:1;
  font-weight:900;
  font-style:normal;
}
.ai-picker-visual-layout {
  display:grid;
  gap:30px;
  align-items:start;
}
.ai-visual-main {
  min-width:0;
}
.ai-visual-summary {
  background:#fff;
  border:1px solid #E5E7EB;
  border-radius:12px;
  box-shadow:0 18px 44px rgba(31,41,55,.08);
  padding:18px;
}
.ai-visual-controls {
  display:grid;
  grid-template-columns:minmax(0,.8fr) minmax(0,1.55fr);
  gap:36px;
  align-items:end;
  margin-bottom:22px;
}
.ai-vstep-label {
  display:flex;
  align-items:center;
  gap:10px;
  color:#0B1736;
  font-size:15px;
  font-weight:900;
  margin-bottom:14px;
}
.ai-vstep-label span {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  border-radius:50%;
  background:#386E8D;
  color:#fff;
  font-size:15px;
  font-weight:900;
  box-shadow:0 6px 16px rgba(56,110,141,.18);
}
.ai-control-group {
  display:flex;
  gap:18px;
  min-width:0;
}
.ai-control-pill {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:60px;
  padding:14px 24px;
  border:1px solid #D8DEE8;
  border-radius:8px;
  background:#fff;
  color:#0B1736;
  font-family:inherit;
  font-size:15px;
  font-weight:900;
  line-height:1;
  cursor:pointer;
  transition:background .15s,border-color .15s,color .15s,box-shadow .15s,transform .15s;
  box-shadow:0 3px 10px rgba(31,41,55,.04);
  -webkit-tap-highlight-color:transparent;
}
.ai-control-row-pill { min-width:138px; }
.ai-control-zone-pill { flex:1 1 0; min-width:170px; }
.ai-control-pill:hover,
.ai-control-pill:focus-visible {
  border-color:#13813A;
  box-shadow:0 0 0 3px rgba(19,129,58,.08),0 6px 16px rgba(31,41,55,.08);
  outline:none;
}
.ai-control-pill:active { transform:scale(.98); }
.ai-control-pill.is-active {
  background:#13813A;
  border-color:#13813A;
  color:#fff;
  box-shadow:0 10px 24px rgba(19,129,58,.22);
}
.ai-control-chevron { display:none; }
.ai-control-ico {
  position:relative;
  display:inline-flex;
  width:30px;
  height:30px;
  align-items:center;
  justify-content:center;
  flex:0 0 30px;
  opacity:.75;
}
.ai-control-pill.is-active .ai-control-ico { opacity:1; }
.ai-control-ico::before,
.ai-control-ico::after { content:""; position:absolute; }
.ai-ico-arch-up::before,
.ai-ico-arch-down::before {
  width:27px; height:22px;
  border:2px dotted currentColor;
  border-bottom:none;
  border-radius:22px 22px 0 0;
}
.ai-ico-arch-down::before { transform:rotate(180deg); }
.ai-ico-front::before {
  width:28px; height:24px;
  background:linear-gradient(90deg,currentColor 0 22%,transparent 22% 26%,currentColor 26% 48%,transparent 48% 52%,currentColor 52% 74%,transparent 74% 78%,currentColor 78% 100%);
  opacity:.18;
  border-radius:8px 8px 12px 12px;
}
.ai-ico-side::before {
  width:26px; height:25px;
  border:2px solid currentColor;
  border-radius:10px 10px 14px 14px;
  opacity:.32;
}
.ai-ico-side::after {
  width:16px; height:23px;
  left:2px;
  border:2px solid currentColor;
  border-radius:10px 10px 12px 12px;
  opacity:.22;
}
.ai-ico-back::before {
  width:28px; height:26px;
  border:2px solid currentColor;
  border-radius:11px 11px 9px 9px;
  opacity:.32;
}
.ai-ico-back::after {
  width:28px; height:1px;
  top:13px;
  background:currentColor;
  opacity:.16;
}
.ai-orientation-strip {
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:14px;
  margin:0 0 18px;
  padding:0 4px;
  color:#667085;
  font-size:13px;
  line-height:1.2;
  font-weight:800;
  text-align:center;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.ai-orientation-strip span:nth-child(2) {
  color:#344054;
  position:relative;
  padding:0 18px;
}
.ai-orientation-strip span:nth-child(2)::before,
.ai-orientation-strip span:nth-child(2)::after {
  content:"";
  position:absolute;
  top:50%;
  width:260px;
  max-width:34vw;
  border-top:1px dotted rgba(102,112,133,.45);
}
.ai-orientation-strip span:nth-child(2)::before { right:100%; }
.ai-orientation-strip span:nth-child(2)::after { left:100%; }
.ai-visual-diagram {
  position:relative;
  padding:20px 28px 22px;
  border:1px solid #E5E7EB;
  border-radius:10px;
  background:#fff;
  overflow:hidden;
  box-shadow:0 10px 28px rgba(31,41,55,.04);
}
.ai-visual-diagram::before {
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:82px;
  background:linear-gradient(180deg,rgba(255,246,246,.86),rgba(255,255,255,0));
  pointer-events:none;
}
.ai-teeth-cards {
  position:relative;
  z-index:1;
  display:flex;
  justify-content:center;
  align-items:stretch;
  gap:18px;
  overflow-x:visible;
  padding:0;
}
.ai-visual-tooth-card {
  position:relative;
  flex:1 1 0;
  max-width:158px;
  min-width:118px;
  min-height:184px;
  padding:22px 12px 14px;
  border:1px solid #E5E7EB;
  border-radius:8px;
  background:#fff;
  color:#0B1736;
  font-family:inherit;
  text-align:center;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(31,41,55,.04);
  transition:transform .15s,border-color .15s,box-shadow .15s,background .15s;
  -webkit-tap-highlight-color:transparent;
}
.ai-visual-tooth-card:hover,
.ai-visual-tooth-card:focus-visible {
  border-color:#13813A;
  box-shadow:0 0 0 3px rgba(19,129,58,.08),0 12px 24px rgba(31,41,55,.08);
  outline:none;
}
.ai-visual-tooth-card:active { transform:scale(.98); }
.ai-vtooth-shape {
  display:block;
  width:54px;
  height:82px;
  margin:0 auto 14px;
  object-fit:contain;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:0 8px 14px rgba(31,41,55,.08);
  filter:drop-shadow(0 5px 7px rgba(31,41,55,.10));
  pointer-events:none;
}
.ai-vtooth-img { user-select:none; -webkit-user-drag:none; }
.ai-t-central-incisor .ai-vtooth-shape { width:58px; height:84px; }
.ai-t-lateral-incisor .ai-vtooth-shape { width:50px; height:80px; }
.ai-t-canine .ai-vtooth-shape { width:48px; height:84px; }
.ai-t-premolar .ai-vtooth-shape { width:60px; height:72px; }
.ai-t-molar .ai-vtooth-shape { width:68px; height:72px; }
.ai-vtooth-num {
  display:block;
  color:#0B1736;
  font-size:32px;
  line-height:1;
  font-weight:900;
  letter-spacing:-.05em;
}
.ai-vtooth-label {
  display:block;
  margin-top:8px;
  color:#0B1736;
  font-size:16px;
  line-height:1.25;
  font-weight:800;
}
.ai-vtooth-side {
  display:block;
  margin-top:6px;
  color:#667085;
  font-size:11px;
  line-height:1.2;
  font-weight:700;
}
.ai-visual-tooth-card.is-selected {
  background:#FFF1F2;
  border:1px solid #F04438;
  color:#0B1736;
  box-shadow:0 0 0 0 rgba(226,29,42,0),0 12px 26px rgba(226,29,42,.08);
}
.ai-visual-tooth-card.is-selected .ai-vtooth-num,
.ai-visual-tooth-card.is-selected .ai-vtooth-label,
.ai-visual-tooth-card.is-selected .ai-vtooth-side { color:#0B1736; }
.ai-vtooth-x {
  position:absolute;
  top:14px;
  left:14px;
  right:auto;
  display:flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  border-radius:50%;
  background:#D92D20;
  color:#fff;
  font-size:24px;
  line-height:1;
  font-weight:700;
  box-shadow:0 3px 8px rgba(217,45,32,.20);
}
.ai-vtooth-missing {
  display:inline-flex;
  justify-content:center;
  align-items:center;
  min-height:26px;
  padding:6px 12px;
  margin-top:10px;
  border-radius:6px;
  background:#D92D20;
  color:#fff;
  font-size:12px;
  line-height:1;
  font-weight:900;
  letter-spacing:.02em;
}
.ai-picker-action-note {
  display:flex;
  align-items:center;
  gap:10px;
  margin:18px 0 0;
  padding:12px 14px;
  border:1px solid #B9E0FF;
  border-radius:8px;
  background:#F0F8FF;
  color:#0B376D;
  font-size:14px;
  line-height:1.4;
  font-weight:600;
}
.ai-picker-action-note .ai-info-icon {
  background:#0B6EAA;
  color:#fff;
  flex-basis:20px;
  width:20px;
  height:20px;
  font-size:12px;
}
.ai-visual-legend {
  justify-content:flex-start;
  margin:24px 0 0;
  padding:16px 0 0;
  border-top:1px solid #EEF2F6;
  color:#667085;
}
.ai-visual-legend .ai-leg-item { gap:8px; }
.ai-leg-gone { background:#E21D2A; border-color:#E21D2A; opacity:1; }
.ai-picker-board-hint {
  margin:16px 0 0;
  padding:12px 14px;
  border:1px solid rgba(226,29,42,.22);
  background:#FEF3F2;
  border-radius:10px;
  color:#B91C1C;
  font-size:14px;
  line-height:1.35;
  font-weight:900;
  text-align:center;
}
.ai-picker-side-kicker {
  font-size:25px;
  line-height:1.2;
  color:#0B1736;
  font-weight:900;
  letter-spacing:-.03em;
  margin-bottom:16px;
  text-transform:none;
}
.ai-summary-choicebox {
  border:1px solid #FDA29B;
  background:#FFF6F6;
  border-radius:10px;
  padding:18px;
  margin-bottom:14px;
}
.ai-summary-scope {
  margin:0 0 20px;
  color:#C1121F;
  font-size:18px;
  line-height:1.2;
  font-weight:900;
}
.ai-summary-label {
  margin:0 0 10px;
  color:#0B1736;
  font-size:15px;
  line-height:1.3;
  font-weight:700;
}
.ai-visual-selected-chips {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0;
}
.ai-visual-selected-chip {
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:36px;
  padding:8px 10px;
  border:0;
  border-radius:6px;
  background:#D92D20;
  color:#fff;
  font-family:inherit;
  font-size:15px;
  line-height:1;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 5px 12px rgba(217,45,32,.18);
}
.ai-visual-selected-chip span { display:none; }
.ai-visual-selected-chip b { color:#fff; font-size:18px; line-height:1; }
.ai-summary-plainbox {
  border:1px solid #E5E7EB;
  background:#fff;
  border-radius:10px;
  padding:18px;
  margin-bottom:14px;
}
.ai-summary-plain-title {
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 14px;
  color:#0B1736;
  font-size:16px;
  line-height:1.3;
  font-weight:900;
}
.ai-summary-plain-title span { color:#13813A; font-size:23px; line-height:1; }
.ai-summary-plain-text {
  margin:0 0 14px;
  color:#0B1736;
  font-size:15px;
  line-height:1.55;
  font-weight:500;
}
.ai-mini-arch {
  display:flex;
  align-items:flex-end;
  justify-content:center;
  gap:4px;
  min-height:72px;
  padding:10px 0 0;
}
.ai-mini-arch span {
  display:block;
  width:20px;
  height:36px;
  background:#fff;
  border:1px solid #D4D0C8;
  border-radius:50% 50% 38% 38%;
  box-shadow:inset 0 -6px 10px rgba(185,172,150,.14),0 3px 7px rgba(31,41,55,.08);
}
.ai-mini-arch span:nth-child(1),
.ai-mini-arch span:nth-child(6) { height:28px; transform:translateY(8px); }
.ai-mini-arch span:nth-child(2),
.ai-mini-arch span:nth-child(5) { height:32px; transform:translateY(3px); }
.ai-mini-arch span.is-red {
  background:#F04438;
  border-color:#D92D20;
  box-shadow:inset 0 -6px 10px rgba(255,255,255,.12),0 3px 7px rgba(217,45,32,.18);
}
.ai-summary-tip {
  border:1px solid #FAD79A;
  background:#FFFAEB;
  border-radius:10px;
  padding:14px 16px;
  margin-bottom:14px;
  color:#667085;
  font-size:14px;
  line-height:1.45;
}
.ai-summary-tip strong {
  display:inline-block;
  margin-bottom:6px;
  color:#92400E;
  font-size:14px;
}
.ai-visual-summary .ai-btn-next {
  max-width:none;
  margin:0;
  min-height:58px;
  border-radius:8px;
  background:#13813A;
  font-size:20px;
  font-weight:900;
  box-shadow:0 10px 22px rgba(19,129,58,.22);
}
.ai-visual-summary .ai-btn-next:hover { background:#0F6A31; }
.ai-summary-safe {
  margin:14px 0 0;
  color:#667085;
  font-size:13px;
  line-height:1.35;
  text-align:center;
}
.ai-picker-side-title {
  font-size:20px;
  line-height:1.2;
  color:#0B1736;
  font-weight:900;
  margin:0 0 8px;
}
.ai-picker-side-empty {
  font-size:14px;
  color:#667085;
  line-height:1.55;
  margin:0;
}

@media (min-width:1180px) {
  .ai-picker-visual-layout { grid-template-columns:minmax(0,1fr) 300px; }
  .ai-visual-summary { position:sticky; top:96px; }
}
@media (max-width:1179px) and (min-width:768px) {
  .ai-picker-visual { max-width:920px; }
  .ai-picker-visual-layout { grid-template-columns:1fr; }
  .ai-visual-summary { max-width:720px; width:100%; justify-self:center; }
}
@media (max-width:767px) {
  .ai-picker-visual {
    max-width:430px;
    margin:0 auto;
    padding:0;
    --selector-blue:#0F63E6;
  }
  .ai-picker-visual .ai-picker-title {
    font-size:38px;
    line-height:1.08;
    margin:0 0 14px;
  }
  .ai-picker-visual .ai-picker-sub {
    font-size:19px;
    line-height:1.45;
    color:#667085;
    margin-bottom:20px;
  }
  .ai-desktop-break { display:none; }
  .ai-picker-info-pill {
    width:100%;
    max-width:none;
    box-sizing:border-box;
    background:#F2F6FF;
    border:0;
    border-radius:16px;
    padding:16px 18px;
    margin-bottom:24px;
    color:#344054;
    font-size:17px;
    font-weight:500;
  }
  .ai-picker-info-pill .ai-info-icon {
    background:#fff;
    color:#0F63E6;
    border:2px solid #0F63E6;
  }
  .ai-picker-visual-layout { display:block; }
  .ai-visual-main { min-width:0; }
  .ai-visual-summary {
    margin-top:18px;
    border:0;
    border-radius:0;
    box-shadow:none;
    padding:0;
    background:transparent;
  }
  .ai-picker-side-kicker { display:none; }
  .ai-visual-controls {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px;
    margin-bottom:24px;
  }
  .ai-vstep-label { display:none; }
  .ai-control-group { display:block; }
  .ai-control-group .ai-control-pill:not(.is-active) { display:none; }
  .ai-control-pill {
    width:100%;
    min-width:0;
    min-height:58px;
    justify-content:flex-start;
    gap:12px;
    padding:14px 18px;
    border:2px solid #0F63E6;
    border-radius:999px;
    background:#fff;
    color:#0F63E6;
    font-size:17px;
    box-shadow:none;
  }
  .ai-control-pill.is-active {
    background:#fff;
    border-color:#0F63E6;
    color:#0F63E6;
    box-shadow:none;
  }
  .ai-control-ico { width:26px; height:26px; flex-basis:26px; opacity:1; }
  .ai-control-chevron {
    display:block;
    margin-left:auto;
    color:#0F63E6;
    font-size:20px;
    line-height:1;
    transform:translateY(-1px);
  }
  .ai-orientation-strip {
    margin:0 0 20px;
    padding:12px 8px;
    border:1px solid #E5E7EB;
    border-radius:10px;
    background:#fff;
    color:#667085;
    font-size:16px;
    font-weight:500;
    text-transform:none;
    letter-spacing:0;
  }
  .ai-orientation-strip span:nth-child(2) {
    color:#344054;
    font-weight:600;
    padding:0 8px;
  }
  .ai-orientation-strip span:nth-child(2)::before,
  .ai-orientation-strip span:nth-child(2)::after {
    content:"";
    position:absolute;
    top:50%;
    width:1px;
    height:26px;
    border:0;
    background:#E5E7EB;
  }
  .ai-orientation-strip span:nth-child(2)::before { right:100%; }
  .ai-orientation-strip span:nth-child(2)::after { left:100%; }
  .ai-visual-diagram {
    margin:0 -8px;
    padding:96px 0 4px;
    border:0;
    border-radius:0;
    background:linear-gradient(180deg,#FFE1E3 0,#FFEDEE 45px,#fff 100px);
    box-shadow:none;
    overflow:visible;
  }
  .ai-visual-diagram::before {
    height:110px;
    background:radial-gradient(ellipse at center,rgba(229,115,125,.36),rgba(255,224,226,.75) 48%,rgba(255,255,255,0) 72%);
  }
  .ai-teeth-cards {
    justify-content:flex-start;
    gap:6px;
    overflow-x:auto;
    padding:0 8px 10px;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
  }
  .ai-teeth-cards::-webkit-scrollbar { height:4px; }
  .ai-teeth-cards::-webkit-scrollbar-thumb { background:#D0D5DD; border-radius:999px; }
  .ai-visual-tooth-card {
    flex:0 0 86px;
    min-width:86px;
    max-width:86px;
    min-height:154px;
    padding:14px 8px 10px;
    border:1px solid #E5E7EB;
    border-radius:10px;
    box-shadow:0 6px 16px rgba(31,41,55,.06);
    scroll-snap-align:center;
  }
  .ai-vtooth-shape {
    width:44px;
    height:68px;
    margin-bottom:10px;
  }
  .ai-t-central-incisor .ai-vtooth-shape { width:46px; height:70px; }
  .ai-t-lateral-incisor .ai-vtooth-shape { width:42px; height:66px; }
  .ai-t-canine .ai-vtooth-shape { width:40px; height:70px; }
  .ai-t-premolar .ai-vtooth-shape { width:48px; height:60px; }
  .ai-t-molar .ai-vtooth-shape { width:54px; height:58px; }
  .ai-vtooth-num { font-size:28px; }
  .ai-vtooth-label { font-size:15px; margin-top:6px; }
  .ai-vtooth-side { display:none; }
  .ai-visual-tooth-card.is-selected {
    background:#F22932;
    border-color:#D92D20;
    color:#fff;
    box-shadow:0 0 0 4px rgba(242,41,50,.11),0 12px 24px rgba(242,41,50,.20);
  }
  .ai-visual-tooth-card.is-selected .ai-vtooth-num,
  .ai-visual-tooth-card.is-selected .ai-vtooth-label { color:#fff; }
  .ai-visual-tooth-card.is-selected .ai-vtooth-shape {
    background:transparent;
    border:0;
    filter:drop-shadow(0 5px 8px rgba(0,0,0,.12));
  }
  .ai-vtooth-x {
    top:8px;
    right:8px;
    left:auto;
    width:24px;
    height:24px;
    background:transparent;
    color:#fff;
    box-shadow:none;
    font-size:32px;
    font-weight:400;
  }
  .ai-vtooth-missing {
    min-height:24px;
    padding:5px 8px;
    margin-top:8px;
    border-radius:8px;
    background:#fff;
    color:#D92D20;
    font-size:12px;
  }
  .ai-picker-action-note { display:none; }
  .ai-visual-legend {
    display:flex;
    overflow-x:auto;
    flex-wrap:nowrap;
    margin:12px 0 0;
    padding:14px 16px;
    border:1px solid #E5E7EB;
    border-radius:12px;
    background:#fff;
    justify-content:flex-start;
  }
  .ai-visual-legend .ai-leg-item { white-space:nowrap; }
  .ai-picker-board-hint { margin:14px 0 0; }
  .ai-summary-choicebox {
    border:1px solid #E5E7EB;
    background:#fff;
    border-radius:16px;
    padding:22px 24px;
    box-shadow:0 8px 22px rgba(31,41,55,.05);
    margin-bottom:16px;
  }
  .ai-summary-scope,
  .ai-summary-label,
  .ai-summary-plainbox,
  .ai-summary-tip,
  .ai-summary-safe { display:none; }
  .ai-summary-choicebox::before {
    content:"Chýba: ";
    display:inline;
    color:#D92D20;
    font-size:28px;
    line-height:1.1;
    font-weight:900;
    letter-spacing:-.04em;
  }
  .ai-visual-selected-chips {
    display:inline-flex;
    gap:4px;
    vertical-align:baseline;
  }
  .ai-visual-selected-chip {
    display:inline-flex;
    min-height:auto;
    padding:0;
    border:0;
    background:transparent;
    box-shadow:none;
    color:#D92D20;
    font-size:28px;
    line-height:1.1;
    font-weight:900;
    letter-spacing:-.04em;
  }
  .ai-visual-selected-chip:not(:last-child)::after { content:","; }
  .ai-visual-selected-chip b { display:none; }
  .ai-visual-summary .ai-btn-next {
    width:100%;
    margin:0;
    min-height:64px;
    border-radius:12px;
    background:#0F63E6;
    color:#fff;
    font-size:24px;
    font-weight:900;
    box-shadow:0 14px 26px rgba(15,99,230,.22);
  }
  .ai-visual-summary .ai-btn-next:hover { background:#0B56CC; }
}


/* Real tooth image assets inside the manual selector. */
.ai-visual-tooth-card.is-selected .ai-vtooth-img { opacity:1; }

/* 2026-05-16 patch: full-width visual tooth selector; summary moves below selector. */
.ai-picker-visual {
  width:100%;
  max-width:none;
}
.ai-picker-visual-layout {
  display:block;
  width:100%;
}
.ai-visual-main {
  width:100%;
}
.ai-visual-summary {
  position:static !important;
  top:auto !important;
  width:100%;
  max-width:none;
  margin:22px 0 0;
  box-sizing:border-box;
}
@media (min-width:1180px) {
  .ai-picker-visual-layout { display:block; }
  .ai-visual-summary { position:static !important; top:auto !important; }
}
@media (min-width:768px) {
  .ai-visual-summary.has-selection {
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(260px,.8fr);
    gap:18px;
    align-items:stretch;
    padding:22px;
  }
  .ai-visual-summary.has-selection .ai-picker-side-kicker {
    grid-column:1 / -1;
    margin:0 0 2px;
  }
  .ai-visual-summary.has-selection .ai-summary-choicebox,
  .ai-visual-summary.has-selection .ai-summary-plainbox,
  .ai-visual-summary.has-selection .ai-summary-tip,
  .ai-visual-summary.has-selection .ai-btn-next,
  .ai-visual-summary.has-selection .ai-summary-safe {
    margin:0;
  }
  .ai-visual-summary.has-selection .ai-summary-choicebox { grid-column:1; grid-row:2; }
  .ai-visual-summary.has-selection .ai-summary-plainbox { grid-column:1; grid-row:3; }
  .ai-visual-summary.has-selection .ai-summary-tip { grid-column:2; grid-row:2; }
  .ai-visual-summary.has-selection .ai-btn-next { grid-column:2; grid-row:3; align-self:end; }
  .ai-visual-summary.has-selection .ai-summary-safe { grid-column:1 / -1; }
  .ai-visual-summary.is-empty {
    padding:20px 22px;
    background:#F8FAFC;
    border-style:dashed;
  }
}

/* Attractive help section under the selector. */
.tooth-help-v2 {
  margin-top:var(--s-lg);
  max-width:1180px;
  margin-left:auto;
  margin-right:auto;
  background:linear-gradient(135deg,#FFFFFF 0%,#F8FBFF 55%,#FFF8F5 100%);
  border:1px solid rgba(36,70,81,.12);
  border-radius:22px;
  padding:clamp(20px,3vw,32px);
  box-shadow:0 12px 36px rgba(30,35,40,.06),0 1px 3px rgba(30,35,40,.06);
}
.tooth-help-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:22px;
}
.tooth-help-eyebrow {
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 11px;
  border-radius:999px;
  background:#EAF3FF;
  color:#0B4EA2;
  font-size:12px;
  line-height:1;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
  margin-bottom:10px;
}
.tooth-help-title {
  margin:0;
  color:#0B1736;
  font-size:clamp(23px,2.4vw,34px);
  line-height:1.08;
  letter-spacing:-.035em;
  font-weight:900;
}
.tooth-help-sub {
  margin:10px 0 0;
  color:#516070;
  font-size:15px;
  line-height:1.6;
  max-width:720px;
}
.tooth-help-steps {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}
.tooth-help-step {
  background:#fff;
  border:1px solid #E5EAF0;
  border-radius:18px;
  padding:17px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:12px;
  min-height:112px;
}
.tooth-help-num {
  width:34px;
  height:34px;
  border-radius:50%;
  background:#0F63E6;
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  font-size:15px;
  box-shadow:0 8px 18px rgba(15,99,230,.18);
}
.tooth-help-step strong {
  display:block;
  color:#0B1736;
  font-size:15px;
  line-height:1.25;
  margin:0 0 5px;
}
.tooth-help-step p {
  margin:0;
  color:#516070;
  font-size:13px;
  line-height:1.5;
}
.tooth-help-grid {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
}
.tooth-help-card {
  background:#fff;
  border:1px solid #E5EAF0;
  border-radius:18px;
  padding:15px 12px;
  text-align:center;
  box-shadow:0 8px 18px rgba(31,41,55,.035);
}
.tooth-help-card img {
  display:block;
  height:72px;
  max-width:88px;
  object-fit:contain;
  margin:0 auto 11px;
  filter:drop-shadow(0 6px 8px rgba(31,41,55,.10));
}
.tooth-help-card strong {
  display:block;
  color:#0B1736;
  font-size:14px;
  line-height:1.25;
  font-weight:900;
  margin-bottom:4px;
}
.tooth-help-card span {
  display:block;
  color:#667085;
  font-size:12px;
  line-height:1.35;
  min-height:32px;
}
@media (max-width:900px) {
  .tooth-help-head { display:block; }
  .tooth-help-steps { grid-template-columns:1fr; }
  .tooth-help-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:520px) {
  .tooth-help-v2 { border-radius:18px; padding:18px; }
  .tooth-help-grid { grid-template-columns:1fr; }
  .tooth-help-card { display:grid; grid-template-columns:72px minmax(0,1fr); gap:12px; text-align:left; align-items:center; }
  .tooth-help-card img { height:64px; max-width:72px; margin:0; }
  .tooth-help-card span { min-height:0; }
}

/* 2026-05-16 hotfix: mobile selector buttons must be tappable; molars/back teeth must be reachable. */
@media (max-width:767px) {
  .ai-picker-visual {
    width:100%;
    max-width:100%;
    box-sizing:border-box;
    padding-left:0;
    padding-right:0;
  }

  .ai-visual-controls {
    display:block;
    margin-bottom:18px;
  }

  .ai-vstep {
    margin-bottom:14px;
  }

  .ai-vstep-label {
    display:flex !important;
    align-items:center;
    gap:9px;
    margin:0 0 8px;
    color:#0B1736;
    font-size:14px;
    line-height:1.2;
    font-weight:900;
  }

  .ai-vstep-label span {
    width:26px;
    height:26px;
    font-size:13px;
    background:#0F63E6;
  }

  .ai-control-group {
    display:flex !important;
    gap:8px;
    overflow-x:auto;
    overflow-y:hidden;
    padding:2px 2px 8px;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-x;
  }

  .ai-control-group::-webkit-scrollbar { height:4px; }
  .ai-control-group::-webkit-scrollbar-thumb { background:#CBD5E1; border-radius:999px; }

  .ai-control-group .ai-control-pill,
  .ai-control-group .ai-control-pill:not(.is-active) {
    display:flex !important;
    flex:0 0 auto;
    width:auto;
    min-width:0;
    min-height:52px;
    padding:11px 13px;
    border:1px solid #D8DEE8;
    border-radius:12px;
    background:#fff;
    color:#0B1736;
    box-shadow:0 4px 12px rgba(31,41,55,.05);
    scroll-snap-align:start;
    cursor:pointer;
    pointer-events:auto;
    user-select:none;
    -webkit-user-select:none;
  }

  .ai-control-row-pill { min-width:146px !important; }
  .ai-control-zone-pill { min-width:136px !important; }

  .ai-control-pill.is-active {
    border-color:#0F63E6 !important;
    background:#0F63E6 !important;
    color:#fff !important;
    box-shadow:0 8px 18px rgba(15,99,230,.20) !important;
  }

  .ai-control-chevron { display:none !important; }

  .ai-control-ico {
    width:24px;
    height:24px;
    flex-basis:24px;
  }

  .ai-orientation-strip {
    margin:0 0 12px;
  }

  .ai-visual-diagram {
    margin:0;
    padding:18px 0 8px;
    border:1px solid #E5E7EB;
    border-radius:16px;
    background:#fff;
    overflow:hidden;
  }

  .ai-visual-diagram::before { display:none; }

  .ai-teeth-cards {
    display:flex;
    justify-content:flex-start;
    gap:10px;
    overflow-x:auto !important;
    overflow-y:hidden;
    padding:4px 14px 14px;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-x;
  }

  .ai-teeth-cards::after {
    content:"";
    flex:0 0 4px;
  }

  .ai-teeth-cards::-webkit-scrollbar { height:5px; }
  .ai-teeth-cards::-webkit-scrollbar-thumb { background:#CBD5E1; border-radius:999px; }

  .ai-visual-tooth-card {
    flex:0 0 92px;
    min-width:92px;
    max-width:92px;
    min-height:170px;
    pointer-events:auto;
    touch-action:manipulation;
  }

  .ai-zone-side .ai-visual-tooth-card,
  .ai-zone-back .ai-visual-tooth-card {
    flex-basis:98px;
    min-width:98px;
    max-width:98px;
  }

  .ai-zone-back .ai-t-molar .ai-vtooth-shape {
    width:62px;
    height:62px;
  }

  .ai-picker-action-note {
    display:flex !important;
    margin:12px 0 0;
    font-size:13px;
  }

  .ai-picker-action-note span:last-child::after {
    content:" Ak nevidíte všetky zuby, posuňte rad prstom do strany.";
    font-weight:800;
  }
}

/* 2026-05-16 patch: full-mouth selected-teeth simulation in the summary. */
.ai-fullmouth-map {
  margin-top:16px;
  padding:14px;
  border:1px solid #D7E2EE;
  border-radius:14px;
  background:linear-gradient(180deg,#FFFFFF 0%,#F8FBFF 100%);
}
.ai-fullmouth-title {
  color:#0B1736;
  font-size:15px;
  line-height:1.25;
  font-weight:900;
  margin:0 0 3px;
}
.ai-fullmouth-sub {
  color:#667085;
  font-size:12px;
  line-height:1.4;
  margin:0 0 12px;
}
.ai-fullmouth-orient {
  display:grid;
  grid-template-columns:1fr auto 1fr;
  gap:8px;
  align-items:center;
  margin:0 0 10px;
  color:#667085;
  font-size:11px;
  line-height:1.2;
  font-weight:800;
  text-align:center;
}
.ai-fullmouth-orient span:first-child { text-align:left; }
.ai-fullmouth-orient span:last-child { text-align:right; }
.ai-fullmouth-jaw {
  display:grid;
  grid-template-columns:78px minmax(0,1fr);
  gap:10px;
  align-items:center;
  margin:9px 0;
}
.ai-fullmouth-jaw-label {
  color:#0B1736;
  font-size:12px;
  line-height:1.2;
  font-weight:900;
}
.ai-fullmouth-row {
  display:grid;
  grid-template-columns:repeat(16,minmax(0,1fr));
  gap:4px;
}
.ai-fullmouth-tooth {
  position:relative;
  min-width:0;
  min-height:54px;
  padding:5px 2px 4px;
  border:1px solid #E5E7EB;
  border-radius:8px;
  background:#fff;
  color:#0B1736;
  display:grid;
  justify-items:center;
  align-content:center;
  gap:2px;
  font-family:inherit;
  cursor:pointer;
  box-shadow:0 3px 8px rgba(31,41,55,.035);
  -webkit-tap-highlight-color:transparent;
}
.ai-fullmouth-tooth img {
  display:block;
  width:20px;
  height:24px;
  object-fit:contain;
  filter:drop-shadow(0 2px 3px rgba(31,41,55,.12));
  pointer-events:none;
  user-select:none;
  -webkit-user-drag:none;
}
.ai-fullmouth-tooth.ai-t-premolar img { width:22px; height:22px; }
.ai-fullmouth-tooth.ai-t-molar img { width:23px; height:22px; }
.ai-fullmouth-tooth span:last-child {
  display:block;
  font-size:10px;
  line-height:1;
  font-weight:900;
}
.ai-fullmouth-tooth:hover,
.ai-fullmouth-tooth:focus-visible {
  outline:none;
  border-color:#0F63E6;
  box-shadow:0 0 0 2px rgba(15,99,230,.11),0 4px 10px rgba(31,41,55,.06);
}
.ai-fullmouth-tooth.is-selected {
  border-color:#D92D20;
  background:#D92D20;
  color:#fff;
  box-shadow:0 6px 14px rgba(217,45,32,.18);
}
.ai-fullmouth-tooth.is-selected img { filter:drop-shadow(0 2px 3px rgba(0,0,0,.18)); }
.ai-fullmouth-x {
  position:absolute;
  top:-6px;
  right:-5px;
  width:17px;
  height:17px;
  border-radius:50%;
  background:#fff;
  color:#D92D20;
  display:flex !important;
  align-items:center;
  justify-content:center;
  font-size:15px !important;
  line-height:1 !important;
  font-weight:900;
  box-shadow:0 2px 6px rgba(31,41,55,.14);
}

/* 2026-05-16 patch: mobile controls are all visible; no hidden area buttons; molars/back teeth are not hidden. */
@media (max-width:767px) {
  .ai-visual-controls {
    display:block !important;
    margin-bottom:16px;
  }
  .ai-vstep { margin-bottom:14px; }
  .ai-control-group {
    display:grid !important;
    overflow:visible !important;
    gap:8px;
    padding:0 !important;
    scroll-snap-type:none !important;
    touch-action:manipulation;
  }
  .ai-vstep-row .ai-control-group { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ai-vstep-zone .ai-control-group { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .ai-control-group .ai-control-pill,
  .ai-control-group .ai-control-pill:not(.is-active),
  .ai-control-row-pill,
  .ai-control-zone-pill {
    display:flex !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    min-height:52px;
    justify-content:center;
    gap:7px;
    padding:10px 7px !important;
    white-space:normal;
    line-height:1.15;
    font-size:13px;
    pointer-events:auto !important;
    touch-action:manipulation;
  }
  .ai-control-ico {
    width:22px !important;
    height:22px !important;
    flex:0 0 22px !important;
  }
  .ai-teeth-cards {
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr));
    justify-content:stretch !important;
    gap:10px !important;
    overflow:visible !important;
    padding:4px 10px 12px !important;
    scroll-snap-type:none !important;
  }
  .ai-teeth-cards::after { display:none !important; content:none !important; }
  .ai-visual-tooth-card,
  .ai-zone-side .ai-visual-tooth-card,
  .ai-zone-back .ai-visual-tooth-card {
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    flex:none !important;
    min-height:164px;
    padding:14px 6px 10px;
    pointer-events:auto !important;
    touch-action:manipulation;
  }
  .ai-vtooth-num { font-size:25px; }
  .ai-vtooth-label { font-size:13px; }
  .ai-fullmouth-map {
    padding:12px 10px;
    border-radius:14px;
  }
  .ai-fullmouth-jaw {
    display:block;
    margin:12px 0;
  }
  .ai-fullmouth-jaw-label {
    margin:0 0 7px;
    font-size:13px;
  }
  .ai-fullmouth-row {
    grid-template-columns:repeat(8,minmax(0,1fr));
    gap:5px;
  }
  .ai-fullmouth-tooth {
    min-height:50px;
    padding:5px 1px 4px;
    border-radius:8px;
  }
  .ai-fullmouth-tooth img {
    width:20px;
    height:22px;
  }
  .ai-fullmouth-tooth.ai-t-premolar img,
  .ai-fullmouth-tooth.ai-t-molar img { width:21px; height:21px; }
  .ai-fullmouth-orient {
    font-size:10px;
    gap:5px;
  }
}
@media (max-width:360px) {
  .ai-control-group .ai-control-pill,
  .ai-control-group .ai-control-pill:not(.is-active),
  .ai-control-row-pill,
  .ai-control-zone-pill {
    font-size:12px;
    padding-left:5px !important;
    padding-right:5px !important;
  }
  .ai-control-ico { display:none !important; }
  .ai-visual-tooth-card,
  .ai-zone-side .ai-visual-tooth-card,
  .ai-zone-back .ai-visual-tooth-card { min-height:156px; }
}



/* 2026-05-17 patch: replace phone fallback in tooth selection with AI tooth-selection helper. */
.tooth-help-ai {
  flex:0 0 auto;
  display:inline-flex;
  flex-direction:column;
  align-items:flex-start;
  gap:2px;
  padding:13px 17px;
  border-radius:14px;
  background:linear-gradient(135deg,#0F63E6 0%,#13813A 100%);
  border:0;
  color:#fff;
  font-family:inherit;
  font-size:14px;
  line-height:1.25;
  font-weight:900;
  text-decoration:none;
  box-shadow:0 12px 26px rgba(15,99,230,.18);
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.tooth-help-ai span {
  color:rgba(255,255,255,.86);
  font-size:12px;
  font-weight:800;
}
.tooth-help-ai:hover,
.tooth-help-ai:focus-visible {
  outline:none;
  transform:translateY(-1px);
  box-shadow:0 16px 32px rgba(15,99,230,.24);
}
.ai-tooth-ai-helper {
  margin:18px 0 16px;
  padding:16px;
  border:1px solid #B9D3FF;
  border-radius:18px;
  background:linear-gradient(180deg,#F7FBFF 0%,#FFFFFF 100%);
  box-shadow:0 10px 24px rgba(15,99,230,.07);
}
.ai-tooth-ai-head {
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:12px;
  align-items:start;
  margin-bottom:12px;
}
.ai-tooth-ai-badge {
  display:flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  border-radius:14px;
  background:#0F63E6;
  color:#fff;
  font-size:14px;
  font-weight:900;
  box-shadow:0 8px 18px rgba(15,99,230,.20);
}
.ai-tooth-ai-head strong {
  display:block;
  color:#0B1736;
  font-size:17px;
  line-height:1.25;
  font-weight:900;
  margin:0 0 3px;
}
.ai-tooth-ai-head p {
  margin:0;
  color:#516070;
  font-size:13px;
  line-height:1.45;
}
.ai-tooth-ai-bubble {
  margin:0 0 12px;
  padding:12px 13px;
  border:1px solid #D7E6FF;
  border-radius:14px 14px 14px 4px;
  background:#fff;
  color:#0B376D;
  font-size:14px;
  line-height:1.5;
  font-weight:700;
}

.ai-tooth-ai-quick-actions {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 12px;
}
.ai-tooth-ai-quick-actions button {
  padding:10px 13px;
  border:1px solid #B9D3FF;
  border-radius:999px;
  background:#EAF4FF;
  color:#0B376D;
  font-family:inherit;
  font-size:13px;
  font-weight:900;
  cursor:pointer;
}
.ai-tooth-ai-quick-actions button:hover,
.ai-tooth-ai-quick-actions button:focus-visible {
  outline:none;
  border-color:#0F63E6;
  box-shadow:0 0 0 3px rgba(15,99,230,.10);
}

.ai-tooth-ai-form {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:stretch;
}
.ai-tooth-ai-form textarea {
  width:100%;
  min-height:54px;
  resize:vertical;
  padding:12px 13px;
  border:1px solid #CBD5E1;
  border-radius:12px;
  background:#fff;
  color:#0B1736;
  font-family:inherit;
  font-size:14px;
  line-height:1.4;
  outline:none;
}
.ai-tooth-ai-form textarea:focus {
  border-color:#0F63E6;
  box-shadow:0 0 0 3px rgba(15,99,230,.10);
}
.ai-tooth-ai-form button {
  padding:0 18px;
  border:0;
  border-radius:12px;
  background:#13813A;
  color:#fff;
  font-family:inherit;
  font-size:14px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(19,129,58,.18);
}
.ai-tooth-ai-examples {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
.ai-tooth-ai-examples button {
  padding:8px 10px;
  border:1px solid #D7E2EE;
  border-radius:999px;
  background:#fff;
  color:#0B376D;
  font-family:inherit;
  font-size:12px;
  line-height:1;
  font-weight:800;
  cursor:pointer;
}
.ai-tooth-ai-examples button:last-child {
  color:#A13F3F;
  border-color:#F1C5C5;
}
@media (max-width:900px) {
  .tooth-help-ai { margin-top:14px; }
}
@media (max-width:767px) {
  .ai-tooth-ai-helper {
    margin:14px 0;
    padding:14px;
    border-radius:16px;
  }
  .ai-tooth-ai-form {
    grid-template-columns:1fr;
  }
  .ai-tooth-ai-form button {
    min-height:48px;
  }
  .ai-tooth-ai-examples {
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .ai-tooth-ai-examples button {
    white-space:normal;
    line-height:1.25;
    min-height:38px;
  }
}
@media (max-width:420px) {
  .ai-tooth-ai-examples { grid-template-columns:1fr; }
}


/* 2026-05-17: full-width confirmed selection block + clearer CTA wording */
@media (min-width:768px) {
  .ai-visual-summary.has-selection {
    grid-template-columns:minmax(0,1fr) minmax(280px,.85fr);
  }
  .ai-visual-summary.has-selection .ai-summary-plainbox {
    grid-column:1 / -1 !important;
    grid-row:3 !important;
  }
  .ai-visual-summary.has-selection .ai-btn-next {
    grid-column:2;
    grid-row:4;
    align-self:end;
  }
  .ai-visual-summary.has-selection .ai-summary-safe {
    grid-column:1 / 2;
    grid-row:4;
    align-self:center;
    text-align:left;
  }
}
.ai-fullmouth-map { width:100%; }
.ai-fullmouth-row { justify-content:space-between; }
