:root {
  color-scheme: light;
  --canvas: #f7f7ef;
  --paper: #fffefa;
  --ink: #162b31;
  --muted: #4f625f;
  --line: #dce1d7;
  --teal: #173e3c;
  --teal-deep: #102e2d;
  --teal-soft: #e4eee6;
  --acid: #d9eb78;
  --warm: #8a4a30;
  --warm-soft: #f7e9d9;
  --focus: #9a462c;
  --radius: 16px;
  --edge: clamp(1rem, 4vw, 2.75rem);
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 100%;
  line-height: 1.5;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 0; background: var(--canvas); }
body { min-width: 0; min-height: 100vh; margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, summary { color: inherit; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
a { color: var(--teal); text-underline-offset: .2em; }
img, svg { display: block; max-width: 100%; }
figure { margin: 0; }
h1, h2, h3, h4, p { margin: 0; overflow-wrap: anywhere; }
h1, h2, h3, h4 { line-height: 1.12; }
h1 { font-size: clamp(2.2rem, 5.1vw, 4.45rem); font-weight: 750; letter-spacing: -.065em; }
h2 { font-size: clamp(1.45rem, 3.6vw, 2.18rem); font-weight: 750; letter-spacing: -.045em; }
h3 { font-size: 1.14rem; letter-spacing: -.022em; }
h4 { font-size: 1rem; }
ul, ol { padding-inline-start: 1.3rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only, .svg-library { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { display: inline-block; flex: none; width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.skip-link { position: fixed; z-index: 20; top: 8px; left: 8px; padding: .65rem .9rem; transform: translateY(-150%); border-radius: 8px; background: var(--paper); font-weight: 700; }
.skip-link:focus { transform: none; }
.print-only { display: none; }
.muted { color: var(--muted); }

.app-header { position: relative; z-index: 5; border-bottom: 1px solid var(--line); background: var(--paper); }
.topbar, .app-view, .app-footer { width: min(100%, 1320px); margin-inline: auto; padding-inline: var(--edge); }
.topbar { display: grid; min-height: 81px; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
.brand { display: inline-flex; width: fit-content; max-width: 100%; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; line-height: 1.1; }
.brand-mark { flex: none; width: 43px; height: 43px; }
.brand strong { display: block; font-size: 1.4rem; font-weight: 800; letter-spacing: -.065em; }
.brand strong span { color: #477451; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: .73rem; font-weight: 650; white-space: nowrap; }
.bottom-nav { display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--canvas); }
.nav-link { display: flex; min-width: 0; min-height: 42px; align-items: center; justify-content: center; gap: .45rem; padding: .42rem .75rem; border-radius: 8px; color: var(--muted); font-size: .86rem; font-weight: 700; line-height: 1.16; text-decoration: none; }
.nav-link .icon { width: 18px; height: 18px; }
.nav-link:hover { background: var(--teal-soft); color: var(--teal); }
.nav-link[aria-current]:not([aria-current="false"]), .nav-link.active, .nav-link.is-active { background: var(--teal); color: var(--paper); }
.header-status { justify-self: end; min-width: 0; color: var(--muted); font-size: .75rem; font-weight: 650; text-align: right; }
.header-status::before { display: inline-block; width: 7px; height: 7px; margin-inline-end: 6px; border-radius: 50%; background: #668958; content: ""; }
.app-view { min-height: calc(100vh - 155px); padding-block: clamp(1.1rem, 3vw, 2rem) 3.25rem; }
.app-view:focus { outline: 0; }
.app-footer { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .7rem; padding-block: 1rem 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .77rem; }
.app-footer > :not(:first-child)::before { margin-inline-end: .7rem; content: "·"; }
.footer-brand { color: var(--ink); font-weight: 800; }
.footer-status { display: none; }
.status { position: fixed; z-index: 10; right: 1rem; bottom: 1rem; width: max-content; max-width: calc(100% - 2rem); padding: .7rem .9rem; border: 1px solid #4b6961; border-radius: 10px; background: var(--teal); color: var(--paper); font-size: .9rem; box-shadow: 0 6px 24px #172e2734; }
.status:empty { padding: 0; border: 0; clip-path: inset(50%); }

.loading-state { display: grid; min-height: 54vh; align-content: center; justify-items: center; text-align: center; }
.eyebrow { display: flex; align-items: center; gap: 6px; margin-bottom: .5rem; color: var(--teal); font-size: .72rem; font-weight: 800; letter-spacing: .13em; line-height: 1.3; text-transform: uppercase; }
.eyebrow .icon { width: 15px; height: 15px; }
.page-intro { margin-bottom: 1.35rem; }
.page-intro > p:not(.eyebrow), .lede { max-width: 60ch; margin-top: .55rem; color: var(--muted); font-size: clamp(.96rem, 1.6vw, 1.1rem); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .55rem; }
.button { display: inline-flex; min-width: 0; min-height: 44px; max-width: 100%; align-items: center; justify-content: center; gap: 7px; padding: 8px 13px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--teal); font-size: .89rem; font-weight: 750; line-height: 1.2; text-align: center; text-decoration: none; }
.button .icon { width: 17px; height: 17px; }
.button-primary { border-color: var(--teal); background: var(--teal); color: var(--paper); }
.button-primary:hover { border-color: #265b54; background: #265b54; }
.button-secondary { border-color: var(--line); background: var(--paper); }
.button-secondary:hover { border-color: #a9bdb2; background: var(--teal-soft); }
.button-quiet:hover { background: var(--teal-soft); }
.button[aria-pressed="true"], .button.is-active { border-color: #adbdad; background: var(--teal-soft); color: var(--teal); }
.icon-button { display: inline-grid; flex: none; width: 44px; height: 44px; min-height: 44px; place-items: center; padding: 0; }
.chip { display: inline-flex; width: fit-content; max-width: 100%; align-items: center; gap: 4px; padding: .22rem .51rem; border-radius: 999px; background: var(--teal-soft); color: var(--teal); font-size: .72rem; font-weight: 750; line-height: 1.2; }
.chip .icon { width: 14px; height: 14px; }
.chip-accent { background: var(--acid); color: var(--teal-deep); }
.chip-warm { background: var(--warm-soft); color: var(--warm); }
.notice { padding: .85rem 1rem; border: 1px solid #cdddcf; border-radius: 12px; background: #edf2e8; color: var(--ink); font-size: .94rem; }
.notice p + p { margin-top: .4rem; }
.notice-warning, .notice-warm, .notice-error { border-color: #ead0b7; background: var(--warm-soft); color: #693820; }
.empty-state { display: grid; justify-items: start; gap: .5rem; padding: clamp(1rem, 3vw, 1.65rem); border: 1px dashed #bccabc; border-radius: var(--radius); background: #eef2e8; }
.empty-state p { max-width: 60ch; color: var(--muted); }
.empty-state > .icon { width: 1.55rem; height: 1.55rem; color: var(--teal); }

.section { margin-top: clamp(1.3rem, 3.5vw, 2.2rem); }
.section-heading { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .5rem 1rem; margin-bottom: .85rem; }
.section-heading > p:not(.eyebrow) { color: var(--muted); }
.results-count { color: var(--muted); font-size: .85rem; font-weight: 700; }
.filter-panel { display: grid; gap: .72rem; margin-top: 1.05rem; padding: clamp(.7rem, 2vw, 1.12rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.filter-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(9rem, 13rem); gap: .6rem; }
.search-field { position: relative; display: block; min-width: 0; }
.search-field > .icon { position: absolute; z-index: 1; top: 50%; left: .75rem; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
.search-field input { width: 100%; min-width: 0; min-height: 46px; padding: .55rem .8rem .55rem 2.35rem; border: 1px solid #bac6bb; border-radius: 9px; background: var(--paper); color: var(--ink); font-size: 1rem; }
.search-field input::placeholder { color: #5a6b64; opacity: 1; }
.level-field select { width: 100%; min-width: 0; min-height: 46px; padding: .55rem .55rem .55rem .7rem; border: 1px solid #bac6bb; border-radius: 9px; background: var(--paper); color: var(--ink); font-size: 1rem; }
.category-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .34rem .42rem; }
.category-chip { min-height: 40px; flex: none; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--canvas); color: var(--teal); font-size: .82rem; font-weight: 700; line-height: 1.2; text-decoration: none; }
.category-chip:hover { border-color: #b5c6b8; background: var(--teal-soft); }
.category-chip[aria-pressed="true"], .category-chip[aria-current="true"], .category-chip.active, .category-chip.is-active { border-color: var(--teal); background: var(--teal); color: var(--paper); }

.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.65rem, 2vw, 1rem); }
.guide-card { position: relative; display: flex; min-width: 0; height: 100%; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.guide-card:hover { border-color: #b2c3b7; }
.guide-card-media { display: block; width: 100%; aspect-ratio: 1.75; overflow: hidden; background: var(--teal-soft); object-fit: cover; }
.guide-card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-glyph {
  display: grid;
  height: 100%;
  place-items: center;
  color: var(--teal);
  background: radial-gradient(circle at 50% 40%, #edf5e9, transparent 65%), var(--teal-soft);
}
.card-glyph .field-glyph { width: min(40%, 7rem); }
.batch-filters { display: flex; flex-wrap: wrap; gap: .45rem; padding-top: .55rem; }
.batch-chip { min-height: 42px; padding: .3rem .85rem; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--teal); font: inherit; font-weight: 680; }
.batch-chip[aria-pressed="true"] { border-color: var(--teal); background: var(--teal); color: var(--paper); }
.guide-card-media:empty:not(img) { background: repeating-linear-gradient(135deg, #c9dcca, #c9dcca 1px, transparent 1px, transparent 16px), var(--teal-soft); }
.guide-card-body { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: .45rem; padding: clamp(.7rem, 2vw, 1rem); }
.guide-card-title { font-size: clamp(1rem, 2vw, 1.28rem); font-weight: 750; letter-spacing: -.027em; line-height: 1.17; }
.guide-card-title a { color: inherit; text-decoration: none; }
.guide-card-title a:hover { text-decoration: underline; }
.guide-card-meta, .guide-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .42rem; color: var(--muted); font-size: .79rem; line-height: 1.32; }
.guide-card-meta .icon, .guide-meta .icon { width: 14px; height: 14px; }
.guide-card-body > p:not(.guide-card-title, .guide-card-meta, .eyebrow) { color: var(--muted); font-size: .9rem; }
.guide-card-body > .eyebrow { margin: 0; }
.guide-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: auto; padding-top: .2rem; }
.guide-card-actions .button-quiet { margin-inline-start: -7px; padding-inline: 7px; }
.guide-card .icon-button[aria-pressed="true"] .icon { fill: var(--acid); }

.guide-header { display: grid; grid-template-columns: minmax(0, 1.11fr) minmax(0, .9fr); align-items: center; gap: 1rem clamp(1.25rem, 4vw, 3rem); margin-bottom: 1.2rem; }
.guide-header > :not(.guide-cover, .guide-summary) { grid-column: 1 / -1; }
.guide-cover { grid-column: 2; grid-row: 1; width: 100%; height: auto; max-height: 345px; aspect-ratio: 1.55; overflow: hidden; border-radius: 17px; background: var(--teal-soft); object-fit: cover; }
.guide-cover img { width: 100%; height: 100%; object-fit: cover; }
.guide-cover:is(.guide-diagram, .guide-photo) { max-height: none; aspect-ratio: auto; background: var(--paper); border: 1px solid var(--line); break-inside: avoid; }
.field-observation { display: flex; align-items: center; gap: .9rem; padding: .8rem; border-radius: .7rem; background: var(--teal-soft); scroll-margin-top: 5rem; }
.field-observation .field-glyph { width: clamp(3rem, 12vw, 5.4rem); flex: none; color: var(--teal); }
:is(.guide-diagram, .guide-photo) img { width: 100%; height: auto; object-fit: contain; }
:is(.guide-diagram, .guide-photo) figcaption { padding: .6rem .8rem; color: var(--muted); font-size: .88rem; }
:is(.guide-diagram, .guide-photo) figcaption strong { display: block; color: var(--ink); }
.guide-photo figcaption .button { display: flex; width: fit-content; margin-top: .55rem; }
.guide-photo figcaption p { margin: .2rem 0 .35rem; }
.photo-origin { display: block; font-size: .76rem; }
.guide-panel .guide-diagram { max-width: 40rem; scroll-margin-top: 5rem; }
.guide-photo-detail { scroll-margin-top: 5rem; }
.panel-content:has(.inspection-grid) { max-width: 62rem; }
.inspection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; align-items: start; }
.inspection-grid figure { overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: .75rem; break-inside: avoid; }
@media (max-width: 700px) { .inspection-grid { grid-template-columns: 1fr; } }
.guide-summary { grid-column: 1; grid-row: 1; min-width: 0; }
.guide-summary h1 { font-size: clamp(2.1rem, 4.8vw, 4rem); }
.guide-summary > .button-quiet { margin: 0 0 .45rem -.6rem; padding-inline: .6rem; }
.guide-summary > p:not(.eyebrow) { max-width: 62ch; margin-top: .65rem; color: var(--muted); }
.guide-summary > .guide-meta, .guide-summary > .actions { margin-top: .7rem; }
.guide-summary .button { padding-inline: 10px; }
.guide-panels { display: grid; gap: .8rem; }
.guide-panel { min-width: 0; padding: clamp(.9rem, 3vw, 1.65rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); scroll-margin-top: calc(72px + env(safe-area-inset-top)); }
.panel-heading { margin-bottom: .7rem; }
.panel-content { max-width: 77ch; }
.panel-content > * + * { margin-top: .75rem; }
.panel-content ul, .panel-content ol { margin-block: .55rem; }
.panel-content li + li { margin-top: .36rem; }
.panel-content li::marker { color: var(--teal); font-weight: 800; }
.panel-content blockquote { margin-inline: 0; padding: .55rem 0 .55rem .8rem; border-inline-start: 3px solid #6a8d69; color: var(--muted); }
.decision-flow { --connector: #8fa99a; }
.flow-question { padding: .8rem 1rem; border-radius: .65rem; background: var(--teal); color: var(--paper); font-weight: 750; }
.panel-content .flow-routes { display: grid; gap: .55rem; margin: 0 0 0 1.05rem; padding: .7rem 0 0 .9rem; border-inline-start: 2px solid var(--connector); list-style: none; }
.panel-content .flow-route { position: relative; margin: 0; border: 1px solid var(--line); border-radius: .65rem; background: var(--canvas); }
.flow-route::before { position: absolute; top: 1.36rem; inset-inline-start: -.94rem; width: .9rem; height: 2px; background: var(--connector); content: ''; }
.flow-route summary, .flow-route > strong { padding: .65rem .8rem; color: var(--teal); font-weight: 750; overflow-wrap: anywhere; }
.flow-route summary { min-height: 44px; }
.flow-route > strong { display: block; }
.flow-route details[open] summary { border-bottom: 1px solid var(--line); }
.flow-result { padding: .62rem .8rem .8rem; }
.flow-result .button { margin-top: .65rem; }
.panel-content .flow-stop { background: var(--warm-soft); }
.flow-stop summary, .flow-stop > strong { color: var(--warm); }
.part-card, .repair-option { padding: .85rem 1rem; border: 1px solid var(--line); border-radius: .65rem; }
.part-card > * + *, .repair-option > * + * { margin-top: .45rem; }
.part-links { display: flex; flex-wrap: wrap; column-gap: 1rem; }
.part-links label { flex-basis: 100%; margin-top: .25rem; }
.part-links input { width: 100%; min-height: 44px; margin: .25rem 0; padding: .45rem; border: 1px solid #8fa99a; border-radius: .35rem; background: var(--paper); }
.part-links a { display: inline-flex; align-items: center; min-height: 44px; }
.repair-option h3 { scroll-margin-top: calc(85px + env(safe-area-inset-top)); }
.review-block { padding: .85rem 1rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--canvas); }
.review-block ul { margin-bottom: 0; }
.approaches { margin-block: .55rem 0; }
.approaches > div + div { margin-top: .7rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.approaches dt { font-weight: 750; }
.approaches dd { margin: .2rem 0 0; }
.safety-note { border-color: #ead0b7; background: var(--warm-soft); color: #693820; }
.download-list { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.download-list li { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .35rem .7rem; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.download-list li > a { font-weight: 700; }
.notice > h2 { margin-bottom: .42rem; font-size: clamp(1.2rem, 2.4vw, 1.6rem); }
.notice > .actions { margin-top: .65rem; }

.home-hero { position: relative; isolation: isolate; overflow: hidden; display: grid; min-height: 14.5rem; align-items: center; border-radius: 18px; background: var(--teal-deep); color: var(--paper); }
.home-hero > img { position: absolute; inset: 0 0 0 auto; z-index: -2; width: 62%; height: 100%; object-fit: cover; }
.home-hero::after { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #102e2d 26%, #102e2de8 48%, #102e2d00 90%); content: ''; }
.home-hero-copy { width: min(100%, 40rem); padding: clamp(1rem, 3vw, 2.1rem); }
.home-hero .eyebrow { color: var(--acid); }
.home-hero h1 { font-size: clamp(2rem, 6vw, 3.85rem); letter-spacing: -.062em; }
.home-hero-copy > p:not(.eyebrow) { margin-top: .35rem; color: #ecf2ea; }
.home-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; margin-top: .95rem; }
.home-search .button { border-color: var(--acid); background: var(--acid); color: var(--teal-deep); }
.home-search .button:hover { background: #edf5b4; }
.home-search .search-field { color: var(--teal); }
.home-categories { margin-top: 1.15rem; }
.home-categories .section-heading { align-items: center; }
.home-categories h2 { font-size: clamp(1.13rem, 4.4vw, 1.8rem); }
.home-categories .section-heading > a { flex: none; padding-inline: .3rem; font-size: .8rem; }
.room-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.room-card { overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); text-align: left; }
.room-card:hover { border-color: #809c89; background: var(--teal-soft); }
.room-card img { width: 100%; height: clamp(4rem, 10vw, 7rem); object-fit: cover; }
.room-card > span { display: flex; min-height: 44px; justify-content: space-between; align-items: center; gap: .2rem; padding: .3rem .6rem; color: var(--teal); font-size: .86rem; font-weight: 800; line-height: 1.15; }
.room-card .icon { width: 15px; height: 15px; }
.home-shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin-top: .75rem; }
.home-shortcuts a { display: flex; align-items: center; gap: .55rem; padding: .7rem .65rem; border: 1px solid var(--line); border-radius: 12px; background: var(--teal-soft); line-height: 1.25; text-decoration: none; }
.home-shortcuts a:hover { border-color: #809c89; }
.home-shortcuts a > .icon:last-child { margin-inline-start: auto; }
.home-shortcuts small { display: block; margin-top: 3px; color: var(--muted); font-size: .78rem; }
.pro-search, .pro-card { padding: .85rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.pro-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; align-items: end; }
.pro-field { display: grid; gap: .25rem; color: var(--teal); font-size: .85rem; font-weight: 750; }
.pro-field input, .pro-field select { width: 100%; min-height: 44px; padding: .4rem .55rem; border: 1px solid #a8b9aa; border-radius: 7px; background: var(--canvas); color: var(--ink); }
.pro-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.pro-card-header { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: .45rem; }
.pro-card-meta, .pro-status { margin-block: .35rem; color: var(--muted); font-size: .88rem; }
.pro-form-actions, .pro-card-actions { margin-top: .4rem; }

.scroll-guide { max-width: 1024px; margin-inline: auto; }
.guide-header { align-items: center; gap: .85rem 1.35rem; margin-bottom: .7rem; }
.guide-summary h1 { font-size: clamp(1.85rem, 4.65vw, 3.35rem); }
.guide-cover img { aspect-ratio: 1.85; object-fit: cover; }
.guide-cover figcaption { padding: .45rem .7rem; }
.context-cover img { aspect-ratio: 2.4; }
.section-nav { position: sticky; z-index: 3; top: env(safe-area-inset-top); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .3rem; margin: .75rem 0; padding: .3rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.section-nav button { display: inline-flex; justify-content: center; align-items: center; gap: .35rem; min-height: 44px; padding: .3rem .1rem; border: 0; border-radius: 8px; background: var(--teal-soft); color: var(--teal); font-size: .87rem; font-weight: 800; }
.section-nav button:hover { background: var(--acid); }
.section-nav .icon { width: 17px; height: 17px; }
.full-guide .panel-heading { display: flex; gap: .55rem; align-items: center; scroll-margin-top: calc(72px + env(safe-area-inset-top)); }
.full-guide .panel-heading > .icon { color: #486e56; }
.full-guide .panel-content { max-width: none; }
.full-guide .safety-note { display: flex; gap: .6rem; scroll-margin-top: calc(72px + env(safe-area-inset-top)); }
.safety-note .icon { margin-top: .1rem; }
.prep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.guide-extra { min-width: 0; padding: .55rem .85rem; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.guide-extra summary { padding: .45rem 0; color: var(--teal); font-weight: 800; }
.guide-extra > :not(summary) { margin-top: .6rem; }
.repair-option { margin-top: .6rem; padding: .75rem; }
.option-check { border-left: 3px solid #8fa99a; padding: .4rem .55rem; background: var(--teal-soft); }
.action-steps { display: grid; gap: .6rem; padding: 0; list-style: none; }
.action-step { display: grid; grid-template-columns: minmax(5rem, .30fr) minmax(0, 1fr); gap: .85rem; align-items: start; padding: .6rem; border: 1px solid var(--line); border-radius: 11px; background: #fbfcf7; break-inside: avoid; }
.action-step:has(.action-picture) { grid-template-columns: minmax(9rem, .84fr) minmax(0, 1fr); }
.action-picture { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.action-picture img { width: 100%; height: auto; object-fit: contain; }
.action-picture figcaption { padding: .45rem .55rem; color: var(--muted); font-size: .83rem; line-height: 1.35; }
.action-picture small { display: block; margin-top: .2rem; }
.action-illustration { display: grid; grid-template-columns: minmax(2rem, 3.5rem) 1.25rem; justify-content: center; align-items: center; gap: .25rem; min-height: 3.5rem; padding: .35rem; border-radius: 8px; background: var(--teal-soft); color: var(--teal); }
.action-illustration .icon { width: 1rem; height: 1rem; }
.action-copy { min-width: 0; padding: .12rem 0; }
.action-label { display: flex; align-items: center; gap: .48rem; margin-bottom: .35rem; }
.action-number { display: grid; flex: none; width: 1.65rem; height: 1.65rem; place-items: center; border-radius: 50%; background: var(--teal); color: var(--paper); font-size: .84rem; font-weight: 800; }
.action-cue { margin-top: .36rem; color: #3e5f51; font-size: .88rem; }
.print-guide { margin-top: .55rem; }

@media (max-width: 900px) {
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  :root { --edge: max(13px, env(safe-area-inset-left), env(safe-area-inset-right)); }
  html { scroll-padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  .topbar { display: flex; min-height: 63px; padding-top: env(safe-area-inset-top); }
  .brand-mark { width: 38px; height: 38px; }
  .brand strong { font-size: 1.28rem; }
  .brand small { margin-top: 2px; font-size: .69rem; }
  .header-status { margin-inline-start: auto; font-size: .69rem; }
  .bottom-nav { position: fixed; z-index: 5; inset: auto 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 5px max(7px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(7px, env(safe-area-inset-left)); border: 0; border-top: 1px solid var(--line); border-radius: 0; background: var(--paper); box-shadow: 0 -3px 20px #142e2311; }
  .nav-link { flex-direction: column; gap: 3px; min-height: 52px; padding: 4px 3px; overflow-wrap: anywhere; font-size: .73rem; text-align: center; }
  .nav-link[aria-current]:not([aria-current="false"]), .nav-link.active, .nav-link.is-active { background: var(--teal-soft); color: var(--teal); }
  .nav-link .icon { width: 20px; height: 20px; }
  .app-view { min-height: calc(100vh - 179px); padding-bottom: 1.55rem; }
  .app-footer { padding-bottom: calc(79px + env(safe-area-inset-bottom)); }
  .status { bottom: calc(74px + env(safe-area-inset-bottom)); }
  .filter-panel { margin-top: .75rem; }
  .category-chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -.15rem; padding: .1rem .15rem .25rem; scrollbar-color: #b9cbbb transparent; scrollbar-width: thin; }
  .category-chip { min-height: 44px; }
  .guide-header { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .guide-cover, .guide-summary { grid-column: 1; grid-row: auto; }
  .guide-cover { max-height: 235px; aspect-ratio: 2.05; }
  .guide-summary > .actions .button { padding-inline: 8px; font-size: .84rem; }
  .guide-card-body > p:not(.guide-card-title, .guide-card-meta, .eyebrow) { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
  .filter-row { grid-template-columns: minmax(0, 1fr); }
  .home-hero { min-height: 0; }
  .home-hero > img { width: 100%; }
  .home-hero::after { background: linear-gradient(90deg, #102e2df8 6%, #102e2dcb 70%, #102e2d99); }
  .home-hero-copy { padding: 1rem; }
  .room-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room-card img { height: clamp(3.65rem, 15vw, 6rem); }
  .guide-cover img { max-height: 13rem; }
}

@media (max-width: 530px) {
  .pro-form, .pro-result-grid { grid-template-columns: 1fr; }
  .home-shortcuts a { gap: .35rem; font-size: .86rem; }
  .home-shortcuts a > .icon:last-child { display: none; }
  .prep-grid { grid-template-columns: 1fr; }
  .action-step { grid-template-columns: 3.1rem minmax(0, 1fr); gap: .6rem; }
  .action-step:has(.action-picture) { grid-template-columns: minmax(0, 1fr); }
  .action-step:has(.action-picture) .action-copy { grid-row: 1; }
  .action-illustration { grid-template-columns: 1fr; justify-items: center; gap: 0; padding: .25rem; }
  .repair-option { padding: .58rem; }
  .section-nav button { gap: .22rem; font-size: .8rem; }
}

@media (max-width: 390px) {
  .header-status { display: none; }
  .footer-status { display: inline; }
  .nav-link { padding-inline: 0; font-size: .66rem; white-space: nowrap; }
  .home-search input { font-size: .9rem; }
  .guide-card-media { aspect-ratio: 1.5; }
  .guide-card-body { padding: .65rem; }
  .guide-card-actions .button { padding-inline: 6px; font-size: .81rem; }
}

@media (max-width: 345px) {
  .guide-grid { grid-template-columns: minmax(0, 1fr); }
  .guide-card-media { aspect-ratio: 1.82; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  @page { margin: 13mm; }
  html, body { min-height: auto; background: #fff; color: #111; }
  .app-view { width: 100%; min-height: 0; max-width: none; padding: 0; }
  .app-header, .app-footer, .skip-link, .status, .no-print, .actions, button, nav { display: none !important; }
  .print-only { display: revert; }
  .guide-header { display: block; margin: 0 0 1rem; }
  .guide-summary h1 { color: #111; font-size: 26pt; }
  .guide-cover { display: none; }
  .guide-cover:is(.guide-diagram, .guide-photo) { display: block; max-width: 5.2in; }
  .guide-panels { display: block; }
  .guide-panel, .guide-panel[hidden] { display: block !important; margin: .55rem 0; padding: .5rem 0; border: 0; border-top: 1px solid #aaa; border-radius: 0; background: #fff; }
  .panel-heading, h1, h2, h3 { break-after: avoid; }
  h2 { font-size: 15pt; }
  a { color: #111; }
}
