:root {
  color-scheme: light;
  --ink: #24221f;
  --muted: #746f68;
  --paper: #f7f2ec;
  --card: rgba(255,255,255,.78);
  --line: rgba(54,47,40,.1);
  --plum: #6d4b5c;
  --plum-dark: #503442;
  --sage: #9eaa96;
  --peach: #e8b69f;
  --sand: #d8c6ae;
  --sky: #9fc3d1;
  --sky-soft: #dcebf0;
  --sun: #eeb85f;
  --air: #a5b8ce;
  --index-accent: #66745f;
  --shadow: 0 18px 50px rgba(70,55,42,.09);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(circle at 8% 2%, rgba(232,182,159,.28), transparent 31rem),
    radial-gradient(circle at 92% 18%, rgba(159,195,209,.25), transparent 29rem),
    radial-gradient(circle at 74% 78%, rgba(238,184,95,.09), transparent 24rem);
}

.app-shell { width: min(100%, 760px); margin: 0 auto; padding: 0 20px 108px; }
.topbar { position: sticky; z-index: 30; top: 0; height: 84px; display: flex; align-items: center; justify-content: space-between; padding-inline: 4px; border-bottom: 1px solid rgba(109,75,92,.08); background: rgba(247,242,236,.88); box-shadow: 0 8px 24px rgba(66,52,43,.04); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; flex: 0 0 38px; width: 38px; min-width: 38px; height: 38px; aspect-ratio: 1; border-radius: 14px; background: rgba(255,255,255,.72); box-shadow: 0 8px 18px rgba(66,52,43,.08); overflow: hidden; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.brand-copy { display: grid; gap: 3px; }
.brand-copy strong { font-size: 18px; line-height: 1.05; }
.brand-copy small { color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.2; letter-spacing: 0; }
.icon-button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.62); cursor: pointer; }
.icon-button svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.topbar-actions { display: flex; align-items: center; gap: 7px; }
.header-location-button { display: flex; align-items: center; gap: 5px; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.62); color: var(--plum-dark); font-size: 11px; font-weight: 700; cursor: pointer; }
.header-location-copy { display: grid; gap: 1px; text-align: left; }
.header-location-copy strong { font-size: 11px; line-height: 1; }
.header-location-copy small { color: var(--muted); font-size: 9px; font-weight: 500; line-height: 1; }
.location-row { display: flex; align-items: end; justify-content: space-between; margin: 16px 2px 22px; }
.eyebrow { margin: 0 0 5px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.location-button { display: flex; align-items: center; gap: 7px; padding: 0; border: 0; background: transparent; font-size: 22px; font-weight: 700; cursor: pointer; }
.location-button svg { width: 19px; fill: none; stroke: var(--plum); stroke-width: 1.8; }
.updated { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: right; }
.updated span, .updated small { display: block; }
.updated small { font-size: 9px; opacity: .78; }
.demo-banner { display: flex; align-items: center; gap: 12px; margin: -7px 0 16px; padding: 12px 14px; border: 1px solid rgba(216,137,112,.2); border-radius: 15px; background: rgba(232,182,159,.13); }
.demo-banner strong { flex: 0 0 auto; color: #815744; font-size: 11px; }
.demo-banner span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.demo-banner.cached { border-color: rgba(216,198,174,.32); background: rgba(216,198,174,.18); }
.demo-banner.live { border-color: rgba(95,114,88,.22); background: rgba(142,165,130,.16); }
.demo-banner.live strong { color: #506845; }
.demo-banner.loading { border-color: rgba(83,139,157,.22); background: rgba(180,216,224,.18); }
.demo-banner.error { border-color: rgba(154,90,69,.22); background: rgba(226,183,170,.16); }

.hero-card { position: relative; overflow: hidden; display: grid; gap: 25px; min-height: 270px; padding: 34px; border: 1px solid rgba(255,255,255,.62); border-radius: 32px; background: linear-gradient(145deg, rgba(255,255,255,.94), rgba(227,239,241,.68) 54%, rgba(245,225,216,.78)); box-shadow: var(--shadow); }
.hero-card::after { content: ""; position: absolute; right: -60px; bottom: -110px; width: 240px; height: 240px; border: 48px solid rgba(109,75,92,.06); border-radius: 50%; }
.climate-story { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; min-height: 205px; overflow: hidden; border-radius: 23px; background: linear-gradient(135deg, rgba(115,158,176,.15), rgba(255,255,255,.42) 45%, rgba(232,182,159,.18)); }
.climate-story-copy { padding: 27px 0 27px 27px; }
.climate-story h1 { max-width: 430px; margin: 0; font-family: Georgia, serif; font-size: clamp(27px, 4.6vw, 39px); font-weight: 400; line-height: 1.04; letter-spacing: -.035em; }
.climate-story-copy > p:last-of-type { max-width: 430px; margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.climate-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 17px; }
.climate-tags span { padding: 6px 9px; border: 1px solid rgba(109,75,92,.09); border-radius: 999px; background: rgba(255,255,255,.58); color: var(--plum-dark); font-size: 10px; font-weight: 700; }
.climate-art { align-self: stretch; min-width: 220px; min-height: 205px; background-color: var(--sky-soft); }
.scene-image { width: 100%; height: 100%; background-repeat: no-repeat; background-size: cover; }
.scene-hero { background-image: url("assets/skin-index-hero-v2.png"); background-position: 50% 32%; }
.scene-before { background-image: url("assets/skin-index-before-v2.png"); background-position: 50% 30%; }
.scene-day { background-image: url("assets/skin-index-day-v2.png"); background-position: 50% 28%; }
.scene-evening { background-image: url("assets/skin-index-evening-v2.png"); background-position: 50% 27%; }
.index-visual { position: relative; z-index: 1; padding: 21px 21px 18px; border: 1px solid rgba(109,75,92,.1); border-radius: 22px; background: rgba(255,255,255,.65); }
.index-number { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.index-number > span { padding-bottom: 9px; color: var(--plum-dark); font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.index-number div { display: flex; align-items: end; gap: 7px; }
.index-number strong { font-family: Georgia, serif; font-size: 78px; font-weight: 400; line-height: .78; color: var(--index-accent); letter-spacing: -.05em; }
.index-number small { padding-bottom: 2px; color: var(--muted); font-size: 11px; }
.index-status-card { margin-top: 16px; padding: 13px 14px; border: 1px solid rgba(109,75,92,.12); border-radius: 17px; background: rgba(158,170,150,.18); }
.index-status-card strong { display: block; color: var(--index-accent); font-size: 18px; line-height: 1.15; }
.index-status-card span { display: block; margin-top: 5px; color: var(--ink); font-size: 13px; line-height: 1.45; }
.spectrum-wrap { position: relative; margin-top: 22px; padding: 14px 0 22px; }
.spectrum-bar { display: grid; grid-template-columns: repeat(5, 1fr); overflow: hidden; height: 15px; border: 3px solid white; border-radius: 999px; box-shadow: 0 2px 8px rgba(50,40,35,.12); }
.spectrum-bar span { min-width: 0; }
.spectrum-minimal { background: #aab9a1; }
.spectrum-low { background: #c8c9a0; }
.spectrum-moderate { background: #dfbd91; }
.spectrum-high { background: #d88970; }
.spectrum-very-high { background: #a85e6d; }
.spectrum-marker { position: absolute; z-index: 2; top: 7px; left: 29%; display: grid; place-items: center; transform: translateX(-50%); transition: left .5s ease; pointer-events: none; }
.spectrum-marker i { display: none; }
.spectrum-marker b { display: grid; place-items: center; width: 30px; height: 30px; border: 3px solid white; border-radius: 50%; background: var(--index-accent); color: white; font-size: 10px; line-height: 1; box-shadow: 0 4px 12px rgba(50,40,35,.16); }
.spectrum-ticks { display: flex; justify-content: space-between; margin-top: 8px; color: #5d554e; font-size: 10px; font-weight: 600; }
.spectrum-legends { display: flex; justify-content: space-between; margin-top: 12px; color: #5d554e; font-size: 11px; font-weight: 600; }
.hero-copy { position: relative; z-index: 1; }
.status-pill { display: none; }
.hero-copy h2 { max-width: 520px; margin: 0; font-family: Georgia, serif; font-size: clamp(27px, 4.7vw, 38px); font-weight: 400; line-height: 1.07; letter-spacing: -.035em; }
.hero-copy > p:last-child { max-width: 430px; margin: 15px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.score-explainer { position: relative; z-index: 1; padding: 17px 18px 15px; border: 1px solid rgba(109,75,92,.1); border-radius: 18px; background: rgba(255,255,255,.58); }
.score-explainer p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.score-explainer strong { color: var(--ink); }
.score-explainer .composition-note { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; }
.score-drivers { margin-top: 10px !important; color: #5f5a53 !important; font-size: 14px !important; line-height: 1.45 !important; font-weight: 400; }
.index-details-button { margin-top: 8px; padding-left: 0; }

.text-button { padding: 8px 0 8px 12px; border: 0; background: transparent; color: var(--plum); font-size: 13px; font-weight: 700; cursor: pointer; }

.section, .factors-section { margin-top: 42px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 16px; }
.section-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 28px; font-weight: 400; letter-spacing: -.02em; }
.action-count, .coverage { color: var(--muted); font-size: 12px; }
.plan-heading .action-count { font-size: 14px; font-weight: 700; color: var(--plum-dark); }
.section-intro { max-width: 590px; margin: -5px 0 17px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.plan-heading > p:last-child { max-width: 540px; margin: -8px 0 14px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.plan-heading h2 { margin: 0 0 10px; font-family: Georgia, serif; font-size: 31px; font-weight: 400; letter-spacing: -.025em; }
.plan-heading .plan-data-note { margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(216,198,174,.2); color: #75614d; font-size: 11px; }
.plan-title-row { display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.plan-title-row h2 { margin-bottom: 10px; }
.recommendations-section { padding-top: 4px; border-top: 1px solid var(--line); }
.daily-care-summary { margin: 16px 0 12px; padding: 19px 19px 18px; border: 1px solid rgba(109,75,92,.12); border-radius: 22px; background: linear-gradient(145deg, rgba(255,255,255,.86), rgba(232,182,159,.16)); box-shadow: 0 9px 24px rgba(66,52,43,.05); }
.daily-care-summary h3 { margin: 0; font-size: 20px; line-height: 1.24; color: var(--plum-dark); }
.daily-care-summary p:not(.eyebrow) { margin: 9px 0 0; color: var(--ink); font-size: 16px; line-height: 1.55; }
.daily-care-summary-chips { margin-top: 12px; }
.unified-plan { margin-top: 18px; }
.care-closing-card { margin: 14px 0 13px; padding: 18px 19px; border: 1px solid rgba(109,75,92,.1); border-radius: 22px; background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(158,170,150,.16)); text-align: center; }
.care-closing-card p { max-width: 560px; margin: 0 auto; color: var(--plum-dark); font-family: Georgia, serif; font-size: 22px; font-style: italic; line-height: 1.34; letter-spacing: 0; }
.action-section { margin-top: 28px; }
.action-list { display: grid; gap: 10px; }
.action-card { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: 0 9px 24px rgba(66,52,43,.05); }
.phase-visual { height: 148px; overflow: hidden; background: var(--sky-soft); }
.phase-visual .scene-image { display: block; }
.action-card-body { display: grid; grid-template-columns: 38px 1fr; gap: 14px; padding: 18px 19px 20px; }
.action-marker { display: grid; align-content: start; justify-items: center; gap: 8px; }
.action-number { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--plum); color: white; font-size: 12px; font-weight: 700; }
.action-symbol { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 10px; background: linear-gradient(145deg, rgba(159,195,209,.25), rgba(232,182,159,.22)); color: var(--plum-dark); font-size: 15px; }
.action-card h3 { margin: 0 0 6px; font-size: 15px; }
.action-timing { display: inline-flex; margin-bottom: 9px; padding: 6px 9px; border-radius: 999px; background: rgba(109,75,92,.08); color: var(--plum-dark); font-size: 11px; font-weight: 650; letter-spacing: .035em; text-transform: uppercase; }
.action-strength { display: inline-flex; margin: 0 0 9px 5px; padding: 5px 8px; border-radius: 999px; background: rgba(158,170,150,.18); color: #56624f; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.action-strength.important { border: 1px solid rgba(216,137,112,.28); background: rgba(216,137,112,.26); color: #7d3f2f; box-shadow: 0 2px 8px rgba(216,137,112,.12); }
.action-strength.optional { background: rgba(216,198,174,.25); color: #766149; }
.action-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.action-summary { color: var(--ink) !important; }
.action-details { margin-top: 14px; border-top: 1px solid var(--line); }
.action-details-content { padding-top: 3px; }
.action-why { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.action-details .action-why { padding-top: 6px; border-top: 0; }
.action-why strong { display: block; margin-bottom: 4px; color: var(--plum-dark); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.action-guide { margin-top: 8px !important; color: var(--ink) !important; font-size: 14px !important; }
.component-hints { margin-top: 13px; }
.component-hints-priority { margin: 12px 0 2px; padding: 11px 12px; border-radius: 14px; background: rgba(109,75,92,.055); }
.component-hints-priority > strong { color: var(--plum-dark) !important; font-size: 11px !important; }
.component-hints > strong { display: block; margin-bottom: 8px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.component-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.component-chips span { padding: 7px 9px; border: 1px solid rgba(109,75,92,.14); border-radius: 999px; background: rgba(255,255,255,.72); color: var(--plum-dark); font-size: 11px; font-weight: 700; }
.empty-card { padding: 20px; border: 1px dashed rgba(54,47,40,.18); border-radius: 20px; color: var(--muted); font-size: 14px; text-align: center; }
.plan-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 13px; }
.plan-tools .secondary-button { align-items: flex-start; justify-content: flex-start; min-height: 66px; text-align: left; }
.plan-tool-icon { display: grid; place-items: center; flex: 0 0 auto; width: 24px; height: 24px; border-radius: 8px; background: rgba(109,75,92,.08); }
.plan-tool-copy { display: grid; gap: 3px; }
.plan-tool-copy strong { font-size: 13px; }
.plan-tool-copy small { color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.35; }
.secondary-button { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 15px; border: 1px solid rgba(109,75,92,.18); border-radius: 15px; background: rgba(255,255,255,.7); color: var(--plum-dark); font-size: 13px; font-weight: 700; cursor: pointer; }
.utility-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 34px; }
.utility-card { padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.58); }
.utility-card h2 { margin: 0 0 8px; font-family: Georgia, serif; font-size: 22px; font-weight: 400; }
.utility-card > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.utility-action { padding-left: 0; }
.utility-links { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 8px; }
.support-action { width: 100%; margin-top: 15px; min-height: 48px; }
.support-mail-link { display: block; margin-top: 14px; text-align: center; text-decoration: none; }
.reference-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.58); }
.reference-card-copy { max-width: 460px; }
.reference-card h2 { margin: 0 0 7px; font-family: Georgia, serif; font-size: 22px; font-weight: 400; }
.reference-card-copy > p:last-child { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.reference-action { flex: 0 0 auto; min-height: 48px; }

.factor-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.factor-card { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.68); }
.factor-card.severity-calm { --severity: #8fa889; --severity-soft: rgba(143,168,137,.18); --severity-ink: #4f654b; border-color: rgba(143,168,137,.25); background: linear-gradient(145deg, rgba(255,255,255,.88), rgba(143,168,137,.15)); }
.factor-card.severity-low { --severity: #a9b47d; --severity-soft: rgba(169,180,125,.20); --severity-ink: #5e6840; border-color: rgba(169,180,125,.28); background: linear-gradient(145deg, rgba(255,255,255,.88), rgba(169,180,125,.16)); }
.factor-card.severity-moderate { --severity: #d3af63; --severity-soft: rgba(211,175,99,.22); --severity-ink: #795e27; border-color: rgba(211,175,99,.30); background: linear-gradient(145deg, rgba(255,255,255,.88), rgba(211,175,99,.17)); }
.factor-card.severity-high { --severity: #d88970; --severity-soft: rgba(216,137,112,.22); --severity-ink: #854b39; border-color: rgba(216,137,112,.30); background: linear-gradient(145deg, rgba(255,255,255,.88), rgba(216,137,112,.17)); }
.factor-card.severity-very-high { --severity: #a85e6d; --severity-soft: rgba(168,94,109,.22); --severity-ink: #743b48; border-color: rgba(168,94,109,.32); background: linear-gradient(145deg, rgba(255,255,255,.88), rgba(168,94,109,.18)); }
.factor-uvScore { background: linear-gradient(145deg, rgba(255,255,255,.82), rgba(238,184,95,.10)); }
.factor-temperatureScore { background: linear-gradient(145deg, rgba(255,255,255,.82), rgba(232,182,159,.12)); }
.factor-dryAirScore { background: linear-gradient(145deg, rgba(255,255,255,.82), rgba(125,179,198,.11)); }
.factor-windScore { background: linear-gradient(145deg, rgba(255,255,255,.82), rgba(165,184,206,.13)); }
.factor-airPollutionScore { background: linear-gradient(145deg, rgba(255,255,255,.82), rgba(158,170,150,.14)); }
.factor-uvScore .factor-icon { background: rgba(238,184,95,.18); color: #946c29; }
.factor-temperatureScore .factor-icon { background: rgba(232,182,159,.2); color: #93604c; }
.factor-dryAirScore .factor-icon { background: rgba(125,179,198,.18); color: #4e8194; }
.factor-windScore .factor-icon { background: rgba(165,184,206,.2); color: #617895; }
.factor-airPollutionScore .factor-icon { background: rgba(158,170,150,.2); color: #64705d; }
.factor-card:last-child { grid-column: 1 / -1; }
.factor-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.factor-name { display: flex; align-items: center; gap: 9px; }
.factor-icon { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; margin: 0 !important; border-radius: 11px; background: rgba(109,75,92,.09); color: var(--plum); font-size: 16px; }
.factor-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.factor-name strong { font-size: 14px; }
.factor-reading { margin-top: 13px; font-family: Georgia, serif; font-size: 24px; }
.factor-reading small { margin-left: 4px; color: var(--muted); font-family: Inter, sans-serif; font-size: 11px; }
.factor-forecast { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding: 10px 11px; border-radius: 12px; background: rgba(232,182,159,.17); }
.factor-forecast span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.factor-forecast strong { font-size: 12px; }
.factor-forecast b { padding: 4px 6px; border-radius: 999px; background: rgba(216,137,112,.18); color: #895540; font-size: 9px; }
.factor-level { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; background: var(--severity-soft, rgba(158,170,150,.18)); color: var(--severity-ink, #55604f); font-size: 10px; font-weight: 700; }
.factor-level.attention { background: var(--severity-soft, rgba(232,182,159,.26)); color: var(--severity-ink, #895b48); }
.factor-risk { min-height: 44px; margin: 12px 0 13px; color: #5f5a53; font-size: 13px; line-height: 1.5; }
.factor-meter { overflow: hidden; height: 5px; border-radius: 6px; background: rgba(109,75,92,.08); }
.factor-meter i { display: block; height: 100%; border-radius: inherit; background: var(--severity, var(--sage)); }
.notice { display: flex; align-items: center; gap: 12px; margin: 30px 0 0; padding: 18px; border: 1px solid rgba(109,75,92,.10); border-radius: 16px; background: rgba(216,198,174,.28); color: var(--ink); }
.notice svg { flex: 0 0 auto; width: 22px; fill: none; stroke: var(--plum); stroke-width: 1.7; }
.notice p { margin: 0; font-size: 14px; font-weight: 500; line-height: 1.5; }
.brand-footer { display: grid; justify-items: center; gap: 10px; margin: 26px 0 8px; padding: 25px 0 8px; border-top: 1px solid var(--line); text-align: left; }
.brand-footer .brand { justify-content: center; }
.studio-credit { margin: 0; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.studio-credit a { color: var(--plum-dark); text-decoration: none; }
.studio-credit a:hover { text-decoration: underline; }

.bottom-nav { position: fixed; z-index: 20; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(3, 1fr); width: min(calc(100% - 28px), 560px); padding: 7px; transform: translateX(-50%); border: 1px solid rgba(255,255,255,.7); border-radius: 20px; background: rgba(255,255,255,.88); box-shadow: 0 16px 45px rgba(51,40,34,.16); backdrop-filter: blur(18px); }
.bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px; border: 0; border-radius: 14px; background: transparent; color: var(--muted); font-size: 11px; text-decoration: none; cursor: pointer; }
.bottom-nav span { font-size: 17px; }
.bottom-nav .active { background: rgba(109,75,92,.1); color: var(--plum-dark); font-weight: 700; }

.sheet { width: min(100% - 20px, 640px); max-height: min(86vh, 760px); margin: auto auto 0; padding: 12px 24px max(28px, env(safe-area-inset-bottom)); border: 0; border-radius: 28px 28px 0 0; background: #fcfaf7; color: var(--ink); box-shadow: 0 -20px 70px rgba(45,35,31,.2); }
.sheet[open] { animation: sheet-in .25s ease-out; }
.sheet::backdrop { background: rgba(35,30,27,.3); backdrop-filter: blur(3px); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(25px); } }
.sheet-handle { width: 42px; height: 4px; margin: 0 auto 18px; border-radius: 4px; background: rgba(36,34,31,.16); }
.sheet-header { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.sheet-header h2 { margin: 0; font-family: Georgia, serif; font-size: 29px; font-weight: 400; }
.sheet-close { font-size: 25px; line-height: 1; }
.sheet-intro { margin: 14px 0 22px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.method-note { margin-bottom: 22px; padding: 15px; border-left: 3px solid var(--plum); border-radius: 4px 15px 15px 4px; background: rgba(109,75,92,.055); }
.method-note strong { font-size: 13px; }
.method-note p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.calculation-summary { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 8px; margin-bottom: 25px; padding: 14px; border-radius: 18px; background: rgba(109,75,92,.06); text-align: center; }
.calculation-summary div { display: grid; gap: 4px; }
.calculation-summary span { color: var(--muted); font-size: 9px; line-height: 1.2; text-transform: uppercase; }
.calculation-summary strong { font-family: Georgia, serif; font-size: 25px; font-weight: 400; }
.calculation-summary b { color: var(--muted); font-weight: 400; }
.calculation-summary .calculation-total { color: var(--plum-dark); }
.detail-heading { margin: 22px 0 13px; font-size: 14px; }
.detail-caption { margin: -7px 0 13px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.detail-list { display: grid; gap: 17px; }
.detail-item { display: grid; grid-template-columns: 100px 1fr 36px; align-items: center; gap: 12px; }
.detail-item span { font-size: 13px; }
.detail-bar { overflow: hidden; height: 8px; border-radius: 8px; background: rgba(109,75,92,.08); }
.detail-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sage), var(--plum)); }
.detail-item strong { text-align: right; font-size: 13px; }
.source-item { display: flex; align-items: start; justify-content: space-between; gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.source-item:last-child { border-bottom: 0; }
.source-item span { color: var(--muted); font-size: 12px; }
.source-item strong { max-width: 58%; font-size: 12px; font-weight: 700; text-align: right; }
fieldset { margin: 0 0 25px; padding: 0; border: 0; }
legend { margin-bottom: 12px; font-weight: 700; }
.field-hint { margin: -4px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-row input { position: absolute; opacity: 0; }
.choice-row span { display: inline-flex; padding: 10px 13px; border: 1px solid var(--line); border-radius: 999px; background: white; font-size: 13px; cursor: pointer; }
.choice-row input:checked + span { border-color: var(--plum); background: rgba(109,75,92,.1); color: var(--plum-dark); }
.toggle-list { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: white; }
.toggle-list label { display: flex; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.toggle-list label:last-child { border-bottom: 0; }
.toggle-list input { accent-color: var(--plum); }
.primary-button { width: 100%; padding: 15px 20px; border: 0; border-radius: 15px; background: var(--plum); color: white; font-weight: 700; cursor: pointer; }
.primary-button:disabled, .secondary-button:disabled { opacity: .55; cursor: wait; }
.compact-sheet { max-width: 540px; }
.city-options { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin: 18px 0; }
.city-option { position: relative; display: inline-flex; cursor: pointer; }
.city-option input { position: absolute; opacity: 0; }
.city-option span { display: inline-flex; align-items: center; min-height: 38px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.city-option input:checked + span { border-color: rgba(109,75,92,.48); background: var(--plum); color: white; box-shadow: 0 8px 18px rgba(109,75,92,.18); }
.city-actions { display: grid; grid-template-columns: 1fr; gap: 9px; }
.instruction-list { display: grid; gap: 10px; margin-top: 20px; }
.instruction-list > div, .support-placeholder { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.instruction-list strong, .support-placeholder strong { font-size: 14px; }
.instruction-list p, .support-placeholder p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 100px; max-width: calc(100% - 40px); padding: 12px 18px; transform: translate(-50%, 15px); border-radius: 999px; background: var(--ink); color: white; font-size: 13px; opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 620px) {
  .app-shell { padding-inline: 14px; }
  .topbar { height: 76px; }
  .demo-banner { display: grid; gap: 4px; }
  .hero-card { gap: 17px; padding: 22px 17px 24px; text-align: center; }
  .climate-story { grid-template-columns: 1fr; text-align: left; }
  .climate-story-copy { padding: 23px 20px 0; }
  .climate-art { min-width: 0; max-height: 165px; overflow: hidden; }
  .index-visual { width: 100%; text-align: left; }
  .index-number strong { font-size: 84px; }
  .hero-copy > p:last-child { margin-inline: auto; }
  .score-explainer { width: 100%; text-align: left; }
  .factor-grid { grid-template-columns: 1fr; }
  .factor-card:last-child { grid-column: auto; }
  .factor-risk { min-height: 0; }
  .plan-title-row { display: block; }
  .plan-title-row .action-count { display: block; margin: -3px 0 12px; }
  .utility-grid { grid-template-columns: 1fr; }
  .reference-card { align-items: stretch; flex-direction: column; gap: 15px; }
  .reference-action { width: 100%; }
  .phase-visual { height: 132px; }
  .action-card-body { grid-template-columns: 34px 1fr; padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
