:root {
  --v9-blue: #1749d2;
  --v9-blue-dark: #0d2f91;
  --v9-yellow: #ffd84d;
  --v9-cyan: #35d4dc;
  --v9-cream: #fffaf0;
}

body.session-pending > :not(.skip) { visibility: hidden; }
body.is-guest > .sidebar,
body.is-guest > .app-frame,
body.is-guest > .mobile-nav { display: none !important; }
body.is-member > .guest-site { display: none; }

.guest-site { min-height: 100vh; background: #fff; color: var(--ink); }
.guest-header {
  position: sticky; top: 0; z-index: 40; min-height: 82px; padding: 14px max(24px, calc((100vw - 1120px) / 2));
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  border-bottom: 1px solid #e6ecf7; background: #fffffff2; backdrop-filter: blur(16px);
}
.guest-header .brand { margin: 0; }
.guest-actions, .guest-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.guest-main { max-width: 1120px; margin: 0 auto; padding: 58px 24px 80px; }
.guest-hero {
  min-height: 570px; display: grid; grid-template-columns: 1.03fr .97fr; align-items: center; gap: 58px;
  padding: 56px; border-radius: 38px; overflow: hidden; color: #fff;
  background: radial-gradient(circle at 88% 12%, #3e70f0 0 18%, transparent 44%), linear-gradient(135deg, var(--v9-blue-dark), var(--v9-blue));
  box-shadow: 0 26px 70px #1749d22d;
}
.guest-hero h1 { margin: 22px 0 18px; font-size: clamp(40px, 5.2vw, 68px); line-height: 1.05; letter-spacing: -3px; }
.guest-hero h1 em { color: var(--v9-yellow); font-style: normal; }
.guest-hero-copy > p { max-width: 600px; color: #d8e3ff; font-size: 16px; line-height: 1.8; }
.guest-hero-copy > small { display: block; margin-top: 18px; color: #bfcfff; }
.guest-hero .chip { background: #ffffff16; border: 1px solid #ffffff2d; color: #fff; }
.guest-cta { margin-top: 30px; }
.guest-cta .btn { min-width: 190px; min-height: 54px; font-size: 13px; }
.guest-hero-art { min-height: 420px; position: relative; display: grid; place-items: center; }
.guest-hero-art:before { content: ''; position: absolute; width: 92%; aspect-ratio: 1; border-radius: 50%; background: var(--v9-yellow); }
.guest-hero-art img { position: relative; width: 115%; max-width: none; filter: drop-shadow(0 25px 35px #05206c55); }
.guest-streak { position: absolute; right: 0; bottom: 34px; display: grid; gap: 2px; padding: 15px 19px; border-radius: 16px; background: #fff; color: var(--v9-blue-dark); box-shadow: 0 15px 40px #09236e3d; }
.guest-streak b { font-size: 23px; }
.guest-streak small { color: #6c7890; }
.guest-intro { max-width: 720px; margin: 112px auto 44px; text-align: center; }
.guest-intro h2 { margin: 10px 0 16px; font-size: clamp(31px, 4vw, 46px); line-height: 1.15; letter-spacing: -1.8px; }
.guest-intro > p:last-child { color: var(--muted); font-size: 15px; line-height: 1.8; }
.guest-feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.guest-feature { min-height: 310px; padding: 31px; border: 1px solid #dfe6f2; border-radius: 27px; box-shadow: 0 16px 50px #233a6d12; }
.guest-feature > span { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 20px; background: #fff; box-shadow: 0 8px 25px #153b9220; }
.guest-feature > span svg { width: 29px; height: 29px; }
.guest-feature h3 { margin: 32px 0 13px; font-size: 23px; line-height: 1.25; letter-spacing: -.6px; }
.guest-feature p { color: #64718b; font-size: 13px; line-height: 1.8; }
.guest-feature.blue { background: #eef4ff; color: var(--v9-blue); }
.guest-feature.yellow { background: #fff7d8; color: #8c6810; }
.guest-feature.cyan { background: #e9fbfc; color: #087b85; }
.guest-story { margin-top: 110px; padding: 60px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 68px; align-items: center; border-radius: 32px; background: var(--v9-cream); border: 1px solid #f3e8c9; }
.guest-story h2 { margin: 12px 0 17px; font-size: 39px; line-height: 1.16; letter-spacing: -1.5px; }
.guest-story p:not(.eyebrow) { color: #6b7181; font-size: 14px; line-height: 1.9; }
.story-card { min-height: 245px; padding: 30px; display: flex; flex-direction: column; justify-content: center; gap: 13px; border-radius: 25px; background: var(--v9-blue); color: #fff; box-shadow: 0 22px 50px #1749d22c; }
.story-card svg { color: var(--v9-yellow); width: 40px; height: 40px; margin-bottom: 13px; }
.story-card b { font-size: 22px; }
.story-card span { color: #d6e1ff; }
.guest-final { margin-top: 90px; padding: 38px 45px; display: flex; justify-content: space-between; align-items: center; gap: 30px; border-radius: 27px; background: var(--v9-blue); color: #fff; }
.guest-final h2 { margin: 8px 0 0; font-size: 31px; }
.guest-final .eyebrow { color: #bacbff; }
.guest-final .btn { min-width: 230px; min-height: 54px; }
.guest-footer { max-width: 1120px; margin: 0 auto; padding: 28px 24px 45px; display: flex; justify-content: space-between; color: #8a95aa; font-size: 11px; }

.home-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 0 0 23px; }
.home-action { min-height: 130px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 17px; padding: 23px; border-radius: 18px; border: 1px solid var(--line); color: var(--ink); background: #fff; box-shadow: var(--shadow); }
.home-action > svg:first-child { width: 28px; height: 28px; padding: 14px; box-sizing: content-box; border-radius: 16px; }
.home-action > svg:last-child { color: #8c9ab3; }
.home-action small { font-size: 8px; letter-spacing: 1.2px; color: var(--muted); font-weight: 700; }
.home-action h2 { margin: 5px 0; font-size: 19px; }
.home-action p { margin: 0; color: var(--muted); font-size: 11px; }
.home-action.scan > svg:first-child { color: #fff; background: var(--v9-blue); }
.home-action.diary > svg:first-child { color: #5d4700; background: var(--v9-yellow); }
.mission-card { background: linear-gradient(145deg, #edf4ff, #fff); }
.mission-card h2 { font-size: 26px; line-height: 1.3; margin: 18px 0 10px; }
.mission-card p { color: var(--muted); font-size: 12px; line-height: 1.8; }

.diary-layout { grid-template-columns: 1.35fr 1fr !important; }
.journal-scan-link { display: block; text-align: center; margin-top: 15px; }
.scan-layout { display: grid; grid-template-columns: minmax(390px, .82fr) minmax(530px, 1.18fr); gap: 24px; align-items: start; }
.scan-result-column { min-width: 0; }
.result-card { padding: 24px; }
.shot-list { grid-template-columns: repeat(3, 1fr); }
.scan-privacy { margin: 12px 0 0; }
.scan-consent { margin-top: 17px; }
.result-summary { padding: 4px 3px 20px; border-bottom: 1px solid var(--line); }
.result-summary h3 { margin: 14px 0 7px; font-size: 19px; line-height: 1.45; }
.review-badge { display: inline-block; margin-left: 7px; padding: 4px 8px; border-radius: 6px; background: #e8fbfc; color: #087b85; font-size: 9px; font-weight: 700; }
.result-pairs { display: grid; gap: 19px; margin-top: 19px; }
.result-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 16px; border: 1px solid #dce5f4; border-radius: 18px; background: #fbfcff; }
.result-visual-column, .result-comment-column { min-width: 0; }
.result-image { margin: 0; border-radius: 14px; box-shadow: inset 0 0 0 1px #dce4f0; }
.image-caption { margin: 10px 3px 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.result-image svg polygon.focus-shape,
.result-image svg rect.focus-shape { fill: #ffd84d2e; stroke: #29c6d1; stroke-width: 6; stroke-dasharray: 17 11; vector-effect: non-scaling-stroke; filter: url(#rxGlow); }
.result-image svg .urgent .focus-shape { fill: #ffd84d42; stroke: #ffbd2f; }
.target-halo { fill: #35d4dc20; stroke: #fff; stroke-width: 7; vector-effect: non-scaling-stroke; }
.target-core { fill: #35d4dc; stroke: #fff; stroke-width: 7; vector-effect: non-scaling-stroke; }
.urgent .target-halo { fill: #ffd84d31; }
.urgent .target-core { fill: #ffbd2f; }
.marker-label circle { fill: #123fae; stroke: #fff; stroke-width: 6; vector-effect: non-scaling-stroke; }
.result-image svg .marker-label text { fill: #fff; stroke: none; font-size: 29px; font-weight: 800; }
.finding-card { padding: 13px; border-radius: 13px; background: #fff; border: 1px solid #e1e7f1; margin-bottom: 10px; }
.finding-title { display: flex; gap: 10px; align-items: flex-start; }
.finding-title h4 { margin: 1px 0 3px; font-size: 13px; line-height: 1.35; }
.finding-title p { margin: 0; color: var(--muted); font-size: 9px; }
.finding-number { flex: 0 0 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: var(--v9-blue); color: #fff; font-size: 11px; font-weight: 800; }
.finding-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 11px 0 7px; }
.finding-card > p, .finding-card details p { font-size: 10px; line-height: 1.65; color: #5c6a82; }
.finding-card details { padding: 10px 11px; margin-top: 8px; }
.finding-card summary { font-size: 10px; color: var(--v9-blue); }
.tag.confidence { background: #e9fbfc; color: #087b85; }
.healthy-reference { margin-top: 10px; padding: 11px; background: #fff8dd; border-color: #f1d978; }
.healthy-reference summary { color: #725600; }
.healthy-reference-body { display: grid; gap: 10px; margin-top: 11px; }
.healthy-reference-body img { width: 100%; max-height: 155px; object-fit: cover; border-radius: 10px; }
.healthy-reference-body p { margin: 4px 0; font-size: 9px; line-height: 1.55; }
.healthy-reference-body small { color: #85764b; font-size: 8px; line-height: 1.45; display: block; }
.result-more { margin-top: 18px; }
.result-disclaimer { margin-top: 18px; }
.result-intro { margin-top: 12px; }

.clinic-results { display: grid; gap: 12px; }
.clinic-card { padding: 18px; border-radius: 15px; border: 1px solid var(--line); background: #fff; }
.clinic-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.clinic-card h3 { margin: 0 0 6px; font-size: 14px; }
.clinic-card p { margin: 5px 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.clinic-distance { flex: 0 0 auto; padding: 5px 8px; border-radius: 8px; background: #e9fbfc; color: #087b85; font-size: 9px; font-weight: 700; }
.clinic-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.provider-credit { margin-top: 14px; color: var(--muted); font-size: 9px; }

@media (max-width: 1120px) {
  .scan-layout { grid-template-columns: 1fr; }
  .result-pair { grid-template-columns: minmax(250px, .9fr) minmax(280px, 1.1fr); }
}

@media (max-width: 760px) {
  .guest-header { min-height: 70px; padding: 10px 17px; }
  .guest-header .brand small { display: none; }
  .guest-header .brand { font-size: 22px; }
  .guest-header .brand img { width: 36px; }
  .guest-actions .btn { min-height: 42px; padding: 9px 12px; font-size: 10px; }
  .guest-main { padding: 18px 14px 55px; }
  .guest-hero { min-height: auto; grid-template-columns: 1fr; gap: 24px; padding: 31px 24px 22px; border-radius: 27px; }
  .guest-hero h1 { font-size: 42px; letter-spacing: -2px; }
  .guest-hero-copy > p { font-size: 13px; }
  .guest-cta { display: grid; }
  .guest-cta .btn { width: 100%; }
  .guest-hero-art { min-height: 280px; }
  .guest-hero-art img { width: 105%; }
  .guest-streak { bottom: 8px; }
  .guest-intro { margin: 74px auto 30px; }
  .guest-intro h2 { font-size: 33px; }
  .guest-feature-grid { grid-template-columns: 1fr; }
  .guest-feature { min-height: 230px; }
  .guest-story { margin-top: 70px; padding: 32px 24px; grid-template-columns: 1fr; gap: 28px; }
  .guest-story h2 { font-size: 32px; }
  .guest-final { margin-top: 60px; padding: 30px 24px; align-items: stretch; flex-direction: column; }
  .guest-final .btn { width: 100%; }
  .guest-footer { flex-direction: column; gap: 6px; }
  .home-actions-grid { grid-template-columns: 1fr; }
  .home-action { min-height: 112px; }
  .scan-layout { grid-template-columns: 1fr; }
  .result-pair { grid-template-columns: 1fr; }
  .shot-list { grid-template-columns: repeat(3, 1fr); }
  .shot { min-height: 92px; }
}
