/* ================================================
   AI-FORM.CSS — AI Skin Analysis form (ai_form.html)
   White / light bg · green #00A86B · soft shadows
   ================================================ */

:root{
  --ai-green:   #00A86B;
  --ai-green2:  #00B97A;
  --ai-green-d: #008F60;
  --ai-ink:     #10231F;
  --ai-mute:    rgba(16,35,31,.55);
  --ai-mute2:   rgba(16,35,31,.42);
  --ai-line:    rgba(16,35,31,.09);
  --ai-accent:  #FF5B3D;
  --ai-accent2: #FF6547;
  --ai-soft:    0 10px 30px rgba(16,35,31,.06);
}

.hidden{ display: none !important; }

html.ai-consent-ok .ai-consent-modal {
  display: none !important;
}
/* pre-hide for users who already accepted (set by head script) -> no flash */
html.ai-consent-ok .ai-consent-modal{ display: none !important; }
#fi{ display: none; }

/* ===================== CONSENT MODAL ===================== */
.ai-consent-modal{
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(9,15,18,.62);
  backdrop-filter: blur(8px);
}

.ai-consent-box{
  width: 100%; max-width: 540px;
  background: #fff;
  border-radius: 26px;
  padding: 36px 34px 30px;
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
  animation: aiPop .35s cubic-bezier(.2,.8,.2,1);
}

@keyframes aiPop{ from{ opacity:0; transform: translateY(14px) scale(.97);} to{opacity:1;transform:none;} }

.ai-consent-icon{
  width: 60px; height: 60px; margin-bottom: 20px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,168,107,.10);
}
.ai-consent-icon svg{
  width: 30px; height: 30px;
  fill: none; stroke: var(--ai-green);
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.ai-consent-box h2{ margin: 0 0 18px; font: 700 26px var(--font-serif); color: var(--ai-ink); }
.ai-consent-box p{ margin: 0 0 14px; line-height: 1.65; color: var(--gray); font-size: 15px; }

.ai-consent-check{
  display: flex; align-items: flex-start; gap: 12px;
  margin: 24px 0 20px;
  font-size: 15px; color: var(--ai-ink); cursor: pointer; line-height: 1.5;
}
.ai-consent-check input,
.photo-data-agree input{ position: absolute; opacity: 0; width: 0; height: 0; }

.ai-check-box{
  flex: 0 0 22px; width: 22px; height: 22px; margin-top: 1px;
  border-radius: 7px; border: 2px solid rgba(16,35,31,.22);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: .18s ease;
}
.ai-check-box svg{ width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.5); transition: .18s ease; }
.ai-consent-check input:checked + .ai-check-box,
.photo-data-agree input:checked + .ai-check-box{ background: var(--ai-green); border-color: var(--ai-green); }
.ai-consent-check input:checked + .ai-check-box svg,
.photo-data-agree input:checked + .ai-check-box svg{ opacity: 1; transform: none; }

.ai-consent-links{ display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.ai-consent-links a{ color: var(--ai-green); font-size: 14px; font-weight: 600; }
.ai-consent-links a:hover{ text-decoration: underline; }

.ai-consent-btn{
  width: 100%; height: 54px; border: none; border-radius: 999px;
  background: linear-gradient(135deg, var(--ai-green2), var(--ai-green-d));
  color: #fff; font-weight: 700; font-size: 16px; cursor: pointer;
  box-shadow: 0 12px 26px rgba(0,168,107,.28);
  transition: .2s ease;
}
.ai-consent-btn:hover{ transform: translateY(-1px); }
.ai-consent-btn:disabled{ opacity: .4; cursor: not-allowed; box-shadow: none; transform: none; }

/* ===================== TOP BAR + STEPPER ===================== */
.ai-topbar{
  background: #fff;
  border-bottom: 1px solid var(--ai-line);
}
.ai-topbar-inner{
  max-width: 1180px; margin: 0 auto;
  padding: 16px 28px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.ai-topbar-brand{ display: flex; align-items: center; gap: 10px; }
.ai-topbar-mark{
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,168,107,.10);
}
.ai-topbar-mark svg{ width: 19px; height: 19px; fill: var(--ai-green); }
.ai-topbar-title{ font-size: 14px; font-weight: 700; color: var(--ai-ink); letter-spacing: -.01em; }

.ai-topbar-secure{
  justify-self: end;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(0,168,107,.08);
  border: 1px solid rgba(0,168,107,.18);
  font-size: 12.5px; font-weight: 600; color: var(--ai-green-d);
}
.ai-topbar-secure svg{ width: 15px; height: 15px; fill: none; stroke: var(--ai-green); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.steps-bar{
  display: flex; align-items: center; justify-content: center;
}
.step-item{ display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 96px; }
.step-num{
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 2px solid rgba(16,35,31,.14);
  color: rgba(16,35,31,.45); font-weight: 700; font-size: 14px;
  transition: .25s ease;
}
.step-num.active{ background: var(--ai-green); border-color: var(--ai-green); color: #fff; box-shadow: 0 6px 18px rgba(0,168,107,.30); }
.step-num.done{ background: var(--ai-green); border-color: var(--ai-green); color: #fff; }
.step-num.done svg{ width: 15px; height: 15px; }
.step-label{ font-size: 12.5px; font-weight: 600; color: rgba(16,35,31,.5); white-space: nowrap; }
.step-label.active{ color: var(--ai-ink); }
.step-divider{ width: 64px; height: 2px; margin-top: -22px; background: rgba(16,35,31,.12); border-radius: 2px; transition: .25s ease; }
.step-divider.done{ background: rgba(0,168,107,.55); }

/* ===================== LAYOUT / STAGES ===================== */
.form-main{ max-width: 1120px; margin: 0 auto; padding: 38px 28px 80px; }
.stage{ display: none; }
.stage.active{ display: block; animation: aiFade .35s ease; }
@keyframes aiFade{ from{ opacity:0; transform: translateY(8px);} to{opacity:1;transform:none;} }

.stage-header{ margin-bottom: 32px; }
.stage-tag{
  display: inline-flex; padding: 6px 12px; border-radius: 999px;
  background: rgba(0,168,107,.10); color: var(--ai-green);
  font: 600 11px var(--font-sans); letter-spacing: .08em; text-transform: uppercase;
}
.stage-title{ margin-top: 14px; font: 700 32px var(--font-serif); color: var(--ai-ink); line-height: 1.15; letter-spacing: -.02em; }
.stage-sub{ margin-top: 8px; max-width: 580px; font-size: 16px; color: var(--gray); line-height: 1.6; }

/* ===================== STAGE 1 LAYOUT ===================== */
.ai-stage-layout{ display: grid; grid-template-columns: 1fr 1.16fr; gap: 44px; align-items: start; }
.ai-block-label{ margin-bottom: 14px; font-size: 15px; font-weight: 700; color: var(--ai-ink); }

/* upload card */
.ai-upload-new{
  position: relative;
  min-height: 320px; border-radius: 22px;
  border: 1.6px dashed rgba(0,168,107,.38);
  background: rgba(0,168,107,.045);
  display: flex; align-items: center; justify-content: center; text-align: center;
  cursor: pointer; transition: .2s ease;
}
.ai-upload-new:hover{ border-color: rgba(0,168,107,.6); background: rgba(0,168,107,.07); }
.upload-preview{ display: none; }
.ai-upload-new.has{ padding: 0; overflow: hidden; border-style: solid; border-color: rgba(0,168,107,.25); }
.ai-upload-new.has .upload-preview{ display: block; width: 100%; height: 320px; object-fit: cover; }
.ai-upload-new.has #ucontent{ display: none; }

.upload-icon{ width: 60px; height: 60px; margin: 0 auto 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(0,168,107,.12); }
.upload-icon svg{ width: 28px; height: 28px; fill: none; stroke: var(--ai-green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.upload-title{ font-size: 18px; font-weight: 700; color: var(--ai-ink); }
.upload-hint{ margin-top: 8px; font-size: 13.5px; color: var(--ai-mute); padding: 0 22px; }
.ai-upload-btn{
  margin-top: 22px; height: 46px; padding: 0 28px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--ai-green2), var(--ai-green-d));
  color: #fff; font-weight: 700; font-size: 14px; cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,168,107,.25);
}
.ai-photo-change{
  display: none; position: absolute; right: 12px; bottom: 12px;
  padding: 8px 14px; border: none; border-radius: 10px;
  background: rgba(16,35,31,.82); color: #fff; font-size: 12.5px; font-weight: 600; cursor: pointer;
  backdrop-filter: blur(4px);
}
.ai-upload-new.has .ai-photo-change{ display: inline-block; }

/* photo tips */
.ai-photo-tips{ margin-top: 14px; display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.ai-photo-tips div{
  min-height: 56px; padding: 10px 6px;
  border: 1px solid var(--ai-line); border-radius: 13px; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-size: 11.5px; font-weight: 600; color: var(--ai-mute); text-align: center; line-height: 1.25;
}
.ai-photo-tips svg{ width: 18px; height: 18px; fill: none; stroke: var(--ai-green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* zone */
.ai-zone-content{ display: grid; grid-template-columns: 210px 1fr; gap: 28px; align-items: start; }
.ai-body-map{ position: relative; width: 200px; margin: 0 auto; }
.body-figure-img{ width: 100%; display: block; user-select: none; pointer-events: none; }

.body-dot{
  position: absolute; width: 13px; height: 13px; border-radius: 50%;
  background: rgba(0,168,107,.16); border: 1.5px solid rgba(0,168,107,.4);
  box-shadow: 0 0 0 3px rgba(0,168,107,.05);
  opacity: .5; transform: translate(-50%,-50%); transition: .22s ease; pointer-events: none;
}
.body-dot::after{ content:""; position: absolute; inset: 4px; border-radius: 50%; background: rgba(0,168,107,.35); }
.body-dot.active{
  width: 20px; height: 20px; opacity: 1; background: rgba(255,91,61,.2); border-color: var(--ai-accent2);
  box-shadow: 0 0 0 6px rgba(255,91,61,.13), 0 0 20px rgba(255,91,61,.35);
  animation: dotPulse 1.6s ease-in-out infinite;
}
.body-dot.active::after{ inset: 5px; background: var(--ai-accent2); }
.body-dot.active::after{ background: var(--ai-accent2); }
@keyframes dotPulse{ 0%,100%{ box-shadow: 0 0 0 7px rgba(255,91,61,.13), 0 0 22px rgba(255,91,61,.3);} 50%{ box-shadow: 0 0 0 10px rgba(255,91,61,.05), 0 0 26px rgba(255,91,61,.45);} }

/* dot positions tuned to images/body-map.png (9 anatomical points) */
#dot-head{ top: 11%;   left: 50%; }
#dot-neck{ top: 18.5%; left: 50%; }
#dot-chest{ top: 27%;  left: 50%; }
#dot-belly{ top: 38.5%; left: 50%; }
#dot-hand-l{ top: 48%; left: 29%; }
#dot-hand-r{ top: 48%; left: 70%; }
#dot-leg-l{ top: 70%;  left: 43%; }
#dot-leg-r{ top: 70%;  left: 56%; }
#dot-heel-r{ top: 85%; left: 57%; }
#dot-intimate{ top: 51%; left: 50%; }

/* zone cards */
.ai-zone-grid{ display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.zone-card{
  min-height: 64px; padding: 14px 12px;
  border: 1.5px solid rgba(0,168,107,.4); border-radius: 14px; background: #fff;
  box-shadow: 0 4px 14px rgba(0,168,107,.05);
  display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.3;
  color: var(--ai-ink); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: .18s ease;
}
.zone-card:hover{ border-color: var(--ai-green); background: rgba(0,168,107,.05); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,168,107,.12); }
.zone-card.active{
  background: rgba(255, 91, 61, .10);
  border-color: rgba(255, 91, 61, .58);
  color: #E94F35;
  box-shadow:
    0 10px 24px rgba(255, 91, 61, .14),
    inset 0 0 0 1px rgba(255, 91, 61, .08);
}

.zone-card.active:hover{
  background: rgba(255, 91, 61, .14);
  border-color: rgba(255, 91, 61, .68);
  color: #D9442D;
}

/* selected zone box */
.selected-zone-box{
  margin-top: 18px; min-height: 50px; padding: 12px 16px;
  display: flex; align-items: center; gap: 8px;
  border-radius: 14px; border: 1px solid var(--ai-line); background: #fff;
  font-size: 14px; color: var(--ai-mute);
}
.selected-zone-box strong{ color: var(--ai-ink); font-weight: 700; }
.selected-zone-box button{ margin-left: auto; border: none; background: none; color: var(--ai-green); font-weight: 700; font-size: 13.5px; cursor: pointer; }
.selected-zone-box button:hover{ text-decoration: underline; }
.selected-dot{ width: 10px; height: 10px; border-radius: 50%; background: var(--ai-accent); box-shadow: 0 0 0 5px rgba(255,91,61,.12); flex: 0 0 10px; }

/* consent row */
.ai-consent-row{ margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }
.photo-data-agree{
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px; border-radius: 16px; background: #fff; border: 1px solid var(--ai-line);
  font-size: 14.5px; line-height: 1.5; color: var(--ai-ink); cursor: pointer;
}
.ai-delete-note{ display: flex; align-items: center; gap: 9px; padding: 0 6px; font-size: 12.5px; color: var(--ai-mute2); }
.ai-delete-note svg{ width: 15px; height: 15px; fill: none; stroke: var(--ai-mute2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 15px; }

/* stage actions */
.stage-actions{ margin-top: 24px; display: flex; }
.stage-actions-end{ justify-content: flex-end; }
.ai-next-btn{ min-width: 200px; justify-content: center; }

/* ===================== STAGE 2 ===================== */
.q-card{
  background: #fff; border: 1px solid var(--ai-line); border-radius: 24px;
  padding: 32px; box-shadow: var(--ai-soft);
  display: flex; flex-direction: column; gap: 30px;
}
.q-section{ display: block; }
.q-title{
  font-size: 17px; font-weight: 700; color: var(--ai-ink);
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px;
}
.q-optional{ font-size: 12.5px; font-weight: 600; color: var(--ai-mute2); padding: 2px 9px; border-radius: 999px; background: rgba(16,35,31,.05); }
.q-subtitle{ font-size: 13.5px; color: var(--ai-mute); margin-bottom: 14px; }
.q-section .q-title + .symptom-grid,
.q-section .q-title + .pill-grid{ margin-top: 14px; }

/* symptom cards */
.symptom-grid{ display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.symptom-card{
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border: 1.5px solid var(--ai-line); border-radius: 14px; background: #fff;
  text-align: left; cursor: pointer; transition: .16s ease; color: var(--ai-ink);
}
.symptom-card:hover{ border-color: rgba(0,168,107,.35); }
.symptom-icon{ flex: 0 0 38px; width: 38px; height: 38px; border-radius: 11px; background: rgba(0,168,107,.09); display: flex; align-items: center; justify-content: center; transition: .16s ease; }
.symptom-icon::before{ content: ""; width: 13px; height: 13px; border-radius: 50%; background: var(--ai-green); transition: .16s ease; }
.symptom-text{ flex: 1; font-size: 14px; font-weight: 600; }
.symptom-check{
  flex: 0 0 22px; width: 22px; height: 22px; border-radius: 7px;
  border: 2px solid rgba(16,35,31,.18); background: #fff;
  display: flex; align-items: center; justify-content: center; transition: .16s ease;
}
.symptom-check svg{ width: 13px; height: 13px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.5); transition: .16s ease; }
.symptom-card.active{ border-color: var(--ai-green); background: rgba(0,168,107,.06); }
.symptom-card.active .symptom-icon{ background: var(--ai-green); }
.symptom-card.active .symptom-icon::before{ background: #fff; }
.symptom-card.active .symptom-check{ background: var(--ai-green); border-color: var(--ai-green); }
.symptom-card.active .symptom-check svg{ opacity: 1; transform: none; }

/* textarea */
.q-textarea-wrap{ position: relative; }
.q-textarea-wrap textarea{
  width: 100%; resize: vertical; min-height: 110px;
  padding: 14px 16px 30px; border: 1.5px solid var(--ai-line); border-radius: 14px;
  font-size: 14.5px; color: var(--ai-ink); background: #fff; line-height: 1.6;
  transition: border-color .16s ease;
}
.q-textarea-wrap textarea:focus{ outline: none; border-color: rgba(0,168,107,.55); }
.q-textarea-wrap textarea::placeholder{ color: var(--ai-mute2); }
.q-counter{ position: absolute; right: 14px; bottom: 10px; font-size: 12px; color: var(--ai-mute2); pointer-events: none; }

/* pills (duration / gender) */
.pill-grid{ display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.pill-grid-3{ grid-template-columns: repeat(3,1fr); }
.pill-opt{
  min-height: 50px; padding: 10px 14px; border: 1.5px solid var(--ai-line); border-radius: 13px;
  background: #fff; color: var(--ai-ink); font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: .16s ease; text-align: center;
}
.pill-opt:hover{ border-color: rgba(0,168,107,.35); }
.pill-opt.active{ border-color: var(--ai-green); background: rgba(0,168,107,.08); color: var(--ai-green-d); }

/* age input */
.q-input{
  width: 100%; max-width: 220px; height: 50px; padding: 0 16px;
  border: 1.5px solid var(--ai-line); border-radius: 13px; font-size: 15px; color: var(--ai-ink); background: #fff;
  transition: border-color .16s ease;
}
.q-input:focus{ outline: none; border-color: rgba(0,168,107,.55); }
.q-input::placeholder{ color: var(--ai-mute2); }
.q-input::-webkit-outer-spin-button,.q-input::-webkit-inner-spin-button{ -webkit-appearance: none; margin: 0; }

/* stage 2 footer */
.stage-footer{
  margin-top: 26px; display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 18px;
}
.ai-back-btn{ justify-content: center; }
.privacy-box{
  display: flex; align-items: flex-start; gap: 11px;
  padding: 12px 18px; border-radius: 14px; background: rgba(0,168,107,.05); border: 1px solid rgba(0,168,107,.16);
}
.privacy-box svg{ width: 20px; height: 20px; flex: 0 0 20px; margin-top: 1px; fill: none; stroke: var(--ai-green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.privacy-box strong{ display: block; font-size: 12.5px; font-weight: 700; color: var(--ai-ink); line-height: 1.4; }
.privacy-box span{ display: block; margin-top: 2px; font-size: 11.5px; color: var(--ai-mute); line-height: 1.45; }

/* ===================== LOADING ===================== */
.loading-screen{
  display: none; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 20px; text-align: center; gap: 20px;
}
.loading-screen.active{ display: flex; animation: aiFade .35s ease; }
.loading-spin{ width: 60px; height: 60px; border: 4px solid var(--ai-line); border-top-color: var(--ai-green); border-radius: 50%; animation: spin .8s linear infinite; }
.loading-title{ font: 700 21px var(--font-serif); color: var(--ai-ink); }
.loading-sub{ font-size: 14px; color: var(--gray); max-width: 300px; line-height: 1.6; }



/* ===================== STAGE 3 RESULT — V5 CLEAN ===================== */

#stage3{
  max-width: 760px;
  margin: 0 auto;
}

.result-header{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  text-align: center;
}

.result-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 18px;
  border-radius: 999px;
  font: 800 13px var(--font-sans);
  letter-spacing: .05em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

.result-badge.urgency-routine{
  background: rgba(0,168,107,.12);
  color: var(--ai-green-d);
}

.result-badge.urgency-soon{
  background: rgba(232,146,12,.14);
  color: #B45309;
}

.result-badge.urgency-urgent{
  background: rgba(255,91,61,.14);
  color: #C7341A;
}

.result-badge.urgency-unknown{
  background: rgba(16,35,31,.08);
  color: var(--ai-mute);
}

.result-disclaimer{
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 520px;
  padding: 11px 16px;
  border-radius: 15px;
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  font-size: 13px;
  font-weight: 700;
  color: #B45309;
  line-height: 1.35;
  text-align: left;
}

.result-disclaimer svg{
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: #EA9A36;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.result-card{
  background: #fff;
  border: 1px solid var(--ai-line);
  border-radius: 22px;
  padding: 28px 30px;
  margin-bottom: 18px;
  box-shadow: var(--ai-soft);
}

.result-block-label{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font: 800 12px var(--font-sans);
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ai-green);
}

.result-block-label svg{
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--ai-green);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.result-chip{
  display: block;
  padding: 0;
  margin: 0 0 12px;
  color: var(--ai-ink);
  font: 800 27px var(--font-serif);
  line-height: 1.22;
  letter-spacing: -.02em;
}

.result-summary-text{
  font-size: 17px;
  color: var(--gray);
  line-height: 1.85;
}

.result-tags,
.result-recs{
  display: block;
}

.v5-likely-box{
  width: 100%;
  padding: 20px 22px;
  border-radius: 19px;
  border: 1px solid rgba(0,168,107,.25);
  background: rgba(0,168,107,.055);
  color: var(--ai-ink);
  line-height: 1.55;
}

.v5-likely-title{
  font-size: 19px;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 5px;
}

.v5-likely-confidence{
  color: var(--ai-green-d);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 7px;
}

.v5-likely-text{
  color: var(--ai-mute);
  font-size: 15.5px;
  line-height: 1.65;
}

.v5-subtitle{
  margin: 26px 0 10px;
  font: 900 13px var(--font-sans);
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ai-green);
}

.v5-list{
  list-style: none;
  margin: 0;
  padding: 0;
}

.v5-list li{
  position: relative;
  padding: 14px 0 14px 30px;
  border-bottom: 1px dashed var(--ai-line);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ai-mute);
}

.v5-list li:last-child{
  border-bottom: none;
}

.v5-list li::before{
  content: "";
  position: absolute;
  left: 6px;
  top: 25px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ai-green);
}

.v5-list li strong{
  color: var(--ai-ink);
  font-weight: 900;
}

.doc-cta{
  background: linear-gradient(135deg, var(--dark), var(--dark2));
  border-radius: 24px;
  padding: 34px 28px;
  text-align: center;
  margin: 22px 0 4px;
}

.doc-cta h4{
  font: 800 23px var(--font-serif);
  color: #fff;
  margin-bottom: 9px;
}

.doc-cta p{
  font-size: 14px;
  color: rgba(255,255,255,.68);
  margin-bottom: 22px;
  line-height: 1.6;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

.doc-cta .btn-primary{
  min-width: 250px;
  justify-content: center;
}

.redo-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin: 18px auto 0;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ai-mute);
  text-decoration: none;
  background: none;
  border: 1px solid var(--ai-line);
  border-radius: 999px;
  cursor: pointer;
  width: auto;
  transition: .18s ease;
}

.redo-btn:hover{
  color: var(--ai-green);
  border-color: rgba(0,168,107,.4);
}

.redo-btn svg{
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stage#stage3 .redo-btn{
  display: flex;
}

/* ===================== MOBILE ===================== */
@media (max-width: 880px){
  .ai-topbar-inner{
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand secure" "steps steps";
    gap: 14px; padding: 14px 18px;
  }
  .ai-topbar-brand{ grid-area: brand; }
  .ai-topbar-secure{ grid-area: secure; }
  .steps-bar{ grid-area: steps; justify-content: space-between; }
  .step-item{ min-width: 0; flex: 1; }
  .step-divider{ flex: 1; width: auto; min-width: 20px; }
  .step-label{ font-size: 11.5px; }

  .form-main{ padding: 26px 16px 56px; }
  .stage-title{ font-size: 25px; }
  .stage-sub{ font-size: 14px; }

  .ai-stage-layout{ grid-template-columns: 1fr; gap: 30px; }
  .ai-upload-new{ min-height: 240px; }
  .ai-upload-new.has .upload-preview{ height: 240px; }

  .ai-zone-content{ grid-template-columns: 1fr; gap: 22px; }
  .ai-body-map{ width: 170px; }
  .ai-zone-grid{ grid-template-columns: repeat(3,1fr); gap: 10px; }
  .zone-card{ min-height: 56px; font-size: 12.5px; padding: 12px 8px; }

  .q-card{ padding: 22px 18px; gap: 26px; border-radius: 20px; }
  .symptom-grid{ grid-template-columns: 1fr; }
  .pill-grid{ grid-template-columns: repeat(2,1fr); }
  .pill-grid-3{ grid-template-columns: 1fr; }
  .q-input{ max-width: none; }

  .stage-footer{
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "privacy privacy" "back next";
    gap: 14px;
  }
  .privacy-box{ grid-area: privacy; }
  .ai-back-btn{ grid-area: back; }
  .stage-footer .ai-next-btn{ grid-area: next; min-width: 0; }

  .stage-actions-end .ai-next-btn{ width: 100%; }

  .result-disclaimer{ text-align: left; }
  .doc-cta{ padding: 26px 20px; }
  .doc-cta .btn-primary{ min-width: 0; width: 100%; }
  
    #stage3{
    max-width: 100%;
  }

  .result-card{
    padding: 20px 18px;
    border-radius: 18px;
  }

  .result-chip{
    font-size: 21px;
  }

  .result-summary-text{
    font-size: 14.5px;
  }

  .likely-box{
    padding: 15px 16px;
    border-radius: 15px;
  }

  .likely-box strong{
    font-size: 16px;
  }

  .possible-item{
    font-size: 14px;
    padding-left: 24px;
  }

  .result-rec{
    font-size: 14px;
    padding: 13px 14px;
  }

  .result-disclaimer{
    text-align: left;
    max-width: 100%;
  }

  .doc-cta{
    padding: 26px 20px;
  }

  .doc-cta .btn-primary{
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 420px){
  .ai-zone-grid{ grid-template-columns: repeat(2,1fr); }
  .ai-photo-tips{ grid-template-columns: repeat(2,1fr); }
  .ai-topbar-title{ font-size: 13px; }
  .ai-topbar-secure span{ display: none; }
  .ai-topbar-secure{ padding: 8px; }
}

/* Armenian font swap on small screens (consistent with base.css) */
@media (max-width: 859px){
  body.hy{ --font-serif: 'Noto Serif Armenian', serif; --font-sans: 'Noto Sans Armenian', sans-serif; }
}
/* ================================================
   AI FORM — Desktop layout correction
   upload fixed size · larger body map · wider layout
   ================================================ */

@media (min-width: 881px) {

  /* общий контейнер шире: левая часть левее, правая правее */
  .form-main {
    max-width: 1320px;
    padding-left: 44px;
    padding-right: 44px;
  }

  /* заголовок остаётся по общей левой линии */
  .stage-header {
    max-width: 1320px;
  }

  /* шаг 1: фиксируем левую колонку и расширяем правую */
  .ai-stage-layout {
    grid-template-columns: 430px minmax(0, 1fr);
    gap: 72px;
    align-items: start;
  }

  /* upload-блок всегда одинаковый на HY/RU/EN */
  .ai-upload-new {
    width: 100%;
    height: 280px;
    min-height: 280px;
  }

  .ai-upload-new.has .upload-preview {
    height: 280px;
  }

  /* чуть уменьшаем внутренности upload, чтобы длинный текст не растягивал */
  .upload-icon {
    width: 54px;
    height: 54px;
    margin-bottom: 14px;
  }

  .upload-icon svg {
    width: 25px;
    height: 25px;
  }

  .upload-title {
    font-size: 17px;
    line-height: 1.25;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }

  .upload-hint {
    font-size: 13px;
    line-height: 1.45;
    max-width: 330px;
    margin-left: auto;
    margin-right: auto;
  }

  .ai-upload-btn {
    margin-top: 18px;
    height: 44px;
    padding: 0 26px;
  }

  /* правая часть: силуэт + зоны */
  .ai-zone-content {
    grid-template-columns: 285px minmax(430px, 520px);
    gap: 58px;
    align-items: center;
    justify-content: end;
  }

  /* увеличиваем силуэт */
  .ai-body-map {
    width: 255px;
  }

  /* обычные кружки чуть больше */
  .body-dot {
    width: 16px;
    height: 16px;
    border-width: 1.7px;
    box-shadow: 0 0 0 4px rgba(0,168,107,.06);
  }

  .body-dot::after {
    inset: 4.5px;
  }

  /* активные кружки заметнее */
  .body-dot.active {
    width: 24px;
    height: 24px;
    box-shadow:
      0 0 0 8px rgba(255,91,61,.14),
      0 0 24px rgba(255,91,61,.38);
  }

  .body-dot.active::after {
    inset: 6px;
  }

  /* сетка зон стабильная и аккуратная */
  .ai-zone-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 520px;
  }

  .zone-card {
    min-height: 62px;
    padding: 12px 10px;
    font-size: 13.5px;
    border-radius: 14px;
  }
}
/* ================================================
   AI FORM — Mobile body map correction
   ================================================ */

@media (max-width: 880px) {

  .ai-zone-content {
    gap: 24px;
  }

  .ai-body-map {
    width: 205px;
  }

  .body-dot {
    width: 15px;
    height: 15px;
  }

  .body-dot.active {
    width: 23px;
    height: 23px;
  }

  .body-dot.active::after {
    inset: 5.5px;
  }
}

@media (max-width: 420px) {
  .ai-body-map {
    width: 195px;
  }
}


/* ===================== RESULT V5 MOBILE OVERRIDES ===================== */
@media (max-width: 880px){
  #stage3{
    max-width: 100%;
  }

  .result-header{
    gap: 9px;
    margin-bottom: 22px;
  }

  .result-badge{
    min-height: 34px;
    padding: 8px 15px;
    font-size: 12px;
  }

  .result-disclaimer{
    max-width: 100%;
    padding: 10px 13px;
    font-size: 12.5px;
  }

  .result-card{
    padding: 21px 18px;
    border-radius: 18px;
    margin-bottom: 16px;
  }

  .result-chip{
    font-size: 23px;
  }

  .result-summary-text{
    font-size: 15px;
    line-height: 1.75;
  }

  .v5-likely-box{
    padding: 16px 16px;
    border-radius: 16px;
  }

  .v5-likely-title{
    font-size: 17px;
  }

  .v5-likely-text{
    font-size: 14.5px;
  }

  .v5-list li{
    font-size: 14.5px;
    padding-left: 25px;
  }

  .v5-list li::before{
    left: 5px;
    top: 24px;
  }

  .doc-cta{
    padding: 27px 20px;
  }

  .doc-cta .btn-primary{
    min-width: 0;
    width: 100%;
  }
}
