/* Hair diagnosis page: intro, questionnaire, payment, report. */
.diag-page { padding: 104px 0 90px; min-height: 100vh; }
.diag-page .panel { border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); padding: clamp(20px, 3vw, 32px); display: grid; gap: 18px; }
.diag-narrow { max-width: 760px; margin: 0 auto; display: grid; gap: 20px; }
.diag-page h1, .diag-page h2, .diag-page h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; }
.diag-page h2 { font-size: clamp(24px, 3.4vw, 30px); }
.diag-page h3 { font-size: 20px; }
.diag-muted { color: var(--ink-2); }
.diag-small { font-size: 13.5px; color: var(--muted); }

/* Intro */
.diag-hero { position: relative; overflow: hidden; border-radius: 28px; padding: clamp(28px, 5vw, 56px); background: radial-gradient(120% 140% at 100% 0%, #6d2939 0%, #3a1520 55%, #22090f 100%); color: #f8ece6; display: grid; gap: 18px; }
.diag-hero h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.02; max-width: 15ch; }
.diag-hero p { max-width: 56ch; color: #ead7cf; font-size: 17px; }
.diag-hero .eyebrow { color: #e8c37d; text-transform: uppercase; letter-spacing: 0.16em; font-size: 12.5px; font-weight: 700; }
.diag-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px; }
.diag-price strong { font-family: var(--font-display); font-size: 40px; font-weight: 500; color: #fff; }
.diag-price span { color: #e8c37d; font-weight: 600; }
.diag-hero .btn-primary { background: #f3d9a4; color: #3a1520; border-color: #f3d9a4; }
.diag-hero-art { position: absolute; right: -60px; bottom: -60px; width: 260px; height: 260px; border-radius: 50%; border: 1px solid rgba(232, 195, 125, 0.35); box-shadow: 0 0 0 30px rgba(232, 195, 125, 0.06), 0 0 0 60px rgba(232, 195, 125, 0.04); pointer-events: none; }
.diag-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.diag-feature { padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 6px; }
.diag-feature .icon { width: 24px; height: 24px; color: var(--wine); }
.diag-feature strong { font-size: 15.5px; }
.diag-feature span { color: var(--ink-2); font-size: 14px; }
.diag-steps { counter-reset: step; display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.diag-steps li { counter-increment: step; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.diag-steps li::before { content: counter(step); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--wine-soft); color: var(--wine); font-weight: 700; }

/* Wizard */
.diag-progress { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.diag-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--wine), var(--gold)); border-radius: inherit; transition: width 0.4s var(--ease); }
.diag-step-head { display: grid; gap: 4px; }
.diag-step-head small { color: var(--gold); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; font-size: 12px; }
.diag-q { display: grid; gap: 10px; padding: 16px 0; border-top: 1px solid var(--line); }
.diag-q:first-of-type { border-top: 0; padding-top: 4px; }
.diag-q > label, .diag-q > strong { font-weight: 600; font-size: 15.5px; }
.diag-q .help { color: var(--muted); font-size: 13.5px; margin-top: -6px; }
.diag-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 8px; }
.diag-option { position: relative; display: flex; gap: 10px; align-items: center; padding: 12px 14px; min-height: 48px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--surface); cursor: pointer; font-size: 14.5px; line-height: 1.3; transition: border-color 0.15s, background 0.15s; }
.diag-option input { position: absolute; opacity: 0; pointer-events: none; }
.diag-option .tick { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; }
.diag-option.multi .tick { border-radius: 6px; }
.diag-option .tick .icon { width: 13px; height: 13px; opacity: 0; color: #fff; stroke-width: 3; }
.diag-option:has(input:checked) { border-color: var(--wine); background: var(--wine-soft); }
.diag-option:has(input:checked) .tick { background: var(--wine); border-color: var(--wine); }
.diag-option:has(input:checked) .tick .icon { opacity: 1; }
.diag-option:has(input:focus-visible) { outline: 3px solid rgba(109, 41, 57, 0.3); outline-offset: 2px; }
.diag-q textarea, .diag-q input[type=text], .diag-q input[type=email], .diag-q input[type=tel] { width: 100%; border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 16px; background: var(--surface); color: var(--ink); }
.diag-q.missing > label, .diag-q.missing > strong { color: var(--danger); }
.diag-nav { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.diag-error { padding: 10px 14px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-size: 14px; }

/* Photos */
.diag-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 12px; }
.diag-photo { position: relative; aspect-ratio: 3 / 4; border-radius: 16px; border: 1.5px dashed var(--line-strong); background: var(--surface-2); display: grid; place-items: center; text-align: center; padding: 10px; cursor: pointer; overflow: hidden; }
.diag-photo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.diag-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.diag-photo .label { position: relative; display: grid; gap: 4px; justify-items: center; font-size: 13.5px; font-weight: 600; }
.diag-photo .label .icon { width: 26px; height: 26px; color: var(--wine); }
.diag-photo .label small { font-weight: 400; color: var(--muted); font-size: 12px; }
.diag-photo.has { border-style: solid; border-color: var(--wine); }
.diag-photo.has .label { position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 6px; border-radius: 10px; background: rgba(255, 255, 255, 0.92); }
.diag-photo.has .label .icon, .diag-photo.has .label small { display: none; }
.diag-photo .req { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 700; color: var(--wine); background: #fff; padding: 2px 8px; border-radius: 999px; z-index: 1; }
.diag-photo.missing { border-color: var(--danger); }
.diag-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.diag-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--wine); flex: none; }

/* Status & payment */
.diag-status { text-align: center; justify-items: center; }
.diag-status .icon-xl { width: 54px; height: 54px; color: var(--wine); }
.diag-status h2 { max-width: 22ch; }
.checkout-frame { min-height: 360px; border-radius: 18px; overflow: hidden; background: #fff; }
.checkout-frame:empty { min-height: 0; }

/* Report */
.report { display: grid; gap: 20px; max-width: 900px; margin: 0 auto; }
.report-hero { border-radius: 28px; padding: clamp(24px, 4vw, 44px); color: #f8ece6; display: grid; gap: 14px; background: #3a1520; position: relative; overflow: hidden; }
.report-hero.ready { background: linear-gradient(135deg, #24533f, #163428); }
.report-hero.care { background: linear-gradient(135deg, #7a5320, #4a3010); }
.report-hero.recovery { background: linear-gradient(135deg, #6d2939, #3a1520); }
.report-hero h1 { font-size: clamp(28px, 4.6vw, 44px); line-height: 1.08; max-width: 24ch; }
.report-level { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); font-weight: 700; font-size: 13.5px; letter-spacing: 0.02em; }
.report-level i { width: 10px; height: 10px; border-radius: 50%; background: #9fe0bd; }
.report-hero.care .report-level i { background: #f4c76f; }
.report-hero.recovery .report-level i { background: #f29a9a; }
.report-meta { color: rgba(248, 236, 230, 0.75); font-size: 14px; }
.report-section { border-radius: 22px; background: var(--surface); border: 1px solid var(--line); padding: clamp(18px, 3vw, 28px); display: grid; gap: 14px; break-inside: avoid; }
.report-section > h2 { display: flex; align-items: center; gap: 10px; font-size: 22px; }
.report-section > h2 .icon { width: 22px; height: 22px; color: var(--wine); }
.report-summary { font-size: 17px; line-height: 1.6; color: var(--ink); }
.report-medical { display: flex; gap: 12px; padding: 16px 18px; border-radius: 18px; background: #eef3fb; color: #1f3d66; border: 1px solid #cddcf2; }
.report-medical .icon { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.report-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.report-chip { padding: 8px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.report-chip small { display: block; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.report-areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.report-area { padding: 14px; border-radius: 16px; border: 1px solid var(--line); display: grid; gap: 6px; }
.report-area strong { display: flex; align-items: center; gap: 8px; }
.report-area strong i { width: 10px; height: 10px; border-radius: 50%; background: #3d7057; }
.report-area.watch strong i { background: #c48a25; }
.report-area.concern strong i { background: #a5343b; }
.report-area span { font-size: 14px; color: var(--ink-2); }
.report-area em { font-style: normal; font-size: 12px; color: var(--muted); }
.report-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); gap: 8px; }
.report-photos figure { margin: 0; display: grid; gap: 4px; }
.report-photos img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; }
.report-photos figcaption { font-size: 12px; color: var(--muted); text-align: center; }
.report-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.report-compare h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 6px; }
.report-timeline { display: grid; gap: 12px; position: relative; }
.report-phase { display: grid; grid-template-columns: 44px 1fr; gap: 14px; }
.report-phase b { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--wine); color: #fff; font-family: var(--font-display); font-size: 18px; font-weight: 500; }
.report-phase h3 { font-size: 18px; }
.report-phase small { color: var(--gold); font-weight: 700; }
.report-phase ul, .report-list { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 5px; }
.report-routine { display: grid; gap: 8px; }
.report-routine div { display: grid; grid-template-columns: minmax(110px, 170px) 1fr; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.report-routine b { font-size: 13px; color: var(--wine); }
.report-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.report-product { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); }
.report-product .thumb { width: 64px; height: 64px; border-radius: 12px; background: var(--gold-soft); display: grid; place-items: center; overflow: hidden; }
.report-product .thumb img { width: 100%; height: 100%; object-fit: cover; }
.report-product .thumb .icon { width: 26px; height: 26px; color: var(--gold); }
.report-product small { display: block; color: var(--muted); font-size: 12px; }
.report-product p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-2); }
.report-product a { font-size: 13px; font-weight: 600; color: var(--wine); }
.report-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.report-two > div { padding: 16px; border-radius: 16px; background: var(--surface-2); }
.report-two h3 { font-size: 16px; font-family: var(--font-ui); font-weight: 700; display: flex; gap: 8px; align-items: center; }
.report-two .icon { width: 18px; height: 18px; }
.report-two .yes .icon { color: var(--success); }
.report-two .no .icon { color: var(--danger); }
.report-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.report-service { display: grid; gap: 10px; padding: 12px; border-radius: 18px; border: 1px solid var(--line); text-decoration: none; color: inherit; }
.report-service img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; }
.report-note { padding: 20px 22px; border-radius: 20px; background: var(--gold-soft); font-family: var(--font-display); font-size: 18px; line-height: 1.5; font-style: italic; }
.report-note small { display: block; margin-top: 10px; font-family: var(--font-ui); font-style: normal; font-size: 13px; color: var(--ink-2); }
.report-credit { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-radius: 18px; background: var(--success-soft); color: var(--success); font-weight: 600; }
.report-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.report-disclaimer { font-size: 12.5px; color: var(--muted); text-align: center; max-width: 70ch; margin: 0 auto; }
.preview-banner { position: sticky; top: 76px; z-index: 5; padding: 10px 16px; border-radius: 14px; background: var(--ink); color: #fff; text-align: center; font-weight: 600; font-size: 14px; }

@media print {
  .site-header, .chat-fab, .chat-panel, .report-actions, .preview-banner, .pwa-install-card { display: none !important; }
  .diag-page { padding: 0; }
  .report-hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .report-section { border-color: #ddd; }
}

/* Illustrated guides */
.diag-q-label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.diag-info { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 6px; border-radius: 999px; border: 1px solid var(--gold); background: var(--gold-soft); color: #7b5a1f; font: 600 12.5px var(--font-ui); cursor: pointer; }
.diag-info svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.diag-info:hover { background: #f1dfbd; }
.diag-info:focus-visible { outline: 3px solid rgba(184, 138, 62, 0.4); outline-offset: 2px; }
.guide-wrap { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(30, 10, 15, 0.55); backdrop-filter: blur(3px); animation: fade 0.2s ease; }
.guide-wrap.leaving { opacity: 0; transition: opacity 0.18s; }
.guide-sheet { width: min(860px, 100%); max-height: min(88vh, 900px); overflow-y: auto; overscroll-behavior: contain; border-radius: 26px; background: var(--surface); padding: clamp(18px, 3vw, 28px); display: grid; gap: 14px; box-shadow: var(--shadow-lg); animation: rise 0.3s var(--ease); }
.guide-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; position: sticky; top: calc(-1 * clamp(18px, 3vw, 28px)); margin: calc(-1 * clamp(18px, 3vw, 28px)) calc(-1 * clamp(18px, 3vw, 28px)) 0; padding: clamp(18px, 3vw, 28px) clamp(18px, 3vw, 28px) 8px; background: var(--surface); z-index: 1; }
.guide-head h2 { font-size: clamp(22px, 3.4vw, 28px); }
.guide-close { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; cursor: pointer; }
.guide-close .icon { width: 18px; height: 18px; }
.guide-intro { margin: 0; color: var(--ink-2); }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 12px; }
.guide-grid.many { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.guide-card { display: grid; gap: 6px; align-content: start; padding: 10px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface); text-align: left; font: inherit; color: inherit; }
button.guide-card { cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
button.guide-card:hover { border-color: var(--wine); transform: translateY(-2px); }
.guide-card.chosen { border-color: var(--wine); background: var(--wine-soft); }
.guide-art svg { display: block; width: 100%; height: auto; }
.guide-card strong { font-size: 15px; }
.guide-text { font-size: 13.5px; color: var(--ink-2); line-height: 1.4; }
.guide-pick { margin-top: 4px; justify-self: start; display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; background: var(--wine); color: #fff; font-weight: 600; font-size: 13px; }
.guide-pick .icon { width: 14px; height: 14px; stroke: #fff; }
.guide-card:not(.chosen) .guide-pick { background: transparent; color: var(--wine); border: 1px solid var(--wine); }
.guide-tip { display: flex; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--gold-soft); font-size: 14px; }
.guide-tip .icon { flex: none; width: 20px; height: 20px; color: #7b5a1f; }
@media (max-width: 560px) {
  .guide-wrap { padding: 0; place-items: end stretch; }
  .guide-sheet { border-radius: 24px 24px 0 0; max-height: 92vh; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .guide-grid, .guide-grid.many { grid-template-columns: 1fr 1fr; gap: 8px; }
  .guide-card { padding: 8px; }
}
