@charset "UTF-8";
:root {
  --ink: #17251f;
  --ink-soft: #2b3b33;
  --paper: #f2f4ee;
  --surface: #ffffff;
  --surface-muted: #e9ede5;
  --line: #d8ded4;
  --text: #1d2a24;
  --muted: #68736c;
  --accent: #e76535;
  --accent-dark: #bd4923;
  --accent-soft: #fbe8de;
  --moss: #557264;
  --moss-soft: #dfe9e1;
  --danger: #c94134;
  --danger-dark: #8d261f;
  --danger-soft: #fbe9e6;
  --warning: #9b681c;
  --warning-soft: #f8efd9;
  --shadow: 0 18px 50px rgba(23, 37, 31, .13);
  --radius: 14px;
  --font-body: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --font-display: "DengXian", "Microsoft YaHei", sans-serif;
  --font-mono: "Cascadia Mono", "Consolas", monospace;
}
[data-theme="night"] {
  --paper: #111a16;
  --surface: #1a2620;
  --surface-muted: #24332b;
  --line: #34463b;
  --text: #e5ebe5;
  --muted: #a0aea5;
  --accent-soft: #4a2d22;
  --moss-soft: #293d32;
  --danger-soft: #432723;
  --warning-soft: #413722;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--font-body); font-size: 15px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 8px 14px; background: var(--surface); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 252px; padding: 28px 20px 20px; display: flex; flex-direction: column; overflow-y: auto; background: var(--ink); color: #eef3ed; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.brand-mark { width: 43px; height: 43px; display: grid; place-items: center; color: var(--accent); border: 1px solid #4b5b53; border-radius: 50%; }
.brand-mark svg { width: 26px; height: 26px; }
.brand strong { display: block; font-family: var(--font-display); font-size: 21px; letter-spacing: .12em; line-height: 1.3; }
.brand span { display: block; margin-top: 3px; font: 9px var(--font-mono); letter-spacing: .14em; color: #99a99f; }
.manual-tag { margin: 25px 8px 22px; padding-top: 15px; border-top: 1px solid #38483f; display: flex; justify-content: space-between; color: #94a399; font: 10px var(--font-mono); letter-spacing: .08em; }
.main-nav { display: flex; flex-direction: column; gap: 5px; }
.nav-section-label { padding: 12px 13px 5px; color: #7f9286; font: 10px var(--font-mono); letter-spacing: .13em; }
.nav-item { width: 100%; min-height: 45px; padding: 10px 13px; border: 0; border-radius: 8px; display: flex; align-items: center; gap: 12px; background: transparent; color: #b8c5bc; text-align: left; transition: background .18s, color .18s; }
.nav-item svg { width: 19px; height: 19px; }
.nav-item:hover { color: #fff; background: #24362d; }
.nav-item.active { background: #f0f3eb; color: var(--ink); font-weight: 700; }
.nav-item.active svg { color: var(--accent); }
.nav-item .nav-count { margin-left: auto; font: 11px var(--font-mono); opacity: .65; }
.sidebar-bottom { margin-top: auto; }
.offline-note { margin: 16px 5px 0; padding: 14px 9px; border-top: 1px solid #38483f; display: flex; align-items: flex-start; gap: 9px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #7fa68d; box-shadow: 0 0 0 4px rgba(127, 166, 141, .1); flex: 0 0 auto; }
.offline-note .status-dot { margin-top: 7px; }
.offline-note strong, .offline-note span { display: block; }
.offline-note strong { font-size: 11px; font-weight: 600; }
.offline-note div span { color: #8ea095; font-size: 10px; }
.sidebar-bottom > p { margin: 2px 13px 0; color: #72867a; font-size: 10px; line-height: 1.7; }
.workspace { min-height: 100vh; margin-left: 252px; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 82px; padding: 17px clamp(24px, 4vw, 58px); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: color-mix(in srgb, var(--paper) 94%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); backdrop-filter: blur(12px); }
.search-box { width: min(490px, 55%); height: 45px; display: flex; align-items: center; gap: 11px; padding: 0 13px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; }
.search-box svg { width: 19px; color: var(--muted); }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 13px; }
.search-box input::placeholder { color: var(--muted); }
kbd { padding: 1px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: var(--paper); font: 11px var(--font-mono); }
.topbar-actions { display: flex; align-items: center; gap: 20px; }
.local-badge { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.emergency-button { min-height: 44px; padding: 0 15px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--danger); border-radius: 8px; background: var(--danger); color: #fff; font-size: 13px; font-weight: 700; }
.emergency-button:hover { background: var(--danger-dark); }
.emergency-button svg { width: 18px; }
.key-hint { padding-left: 10px; border-left: 1px solid rgba(255,255,255,.35); font: 10px var(--font-mono); opacity: .75; }
.mobile-header { display: none; }
#main-content { flex: 1; width: 100%; max-width: 1500px; margin: 0 auto; padding: 36px clamp(24px, 4vw, 58px) 60px; }
.app-footer { padding: 18px clamp(24px, 4vw, 58px); display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font: 10px var(--font-mono); letter-spacing: .04em; }
.page-enter { animation: page-in .25s ease-out; }
@keyframes page-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.eyebrow { display: block; color: var(--accent-dark); font: 10px var(--font-mono); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.page-heading { margin-bottom: 28px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.page-heading h1 { margin: 5px 0 6px; font-family: var(--font-display); font-size: clamp(28px, 3vw, 40px); line-height: 1.2; letter-spacing: -.03em; }
.page-heading p { max-width: 650px; margin: 0; color: var(--muted); font-size: 13px; }
.page-code { color: var(--line); font: 52px var(--font-mono); line-height: 1; }
.primary-button, .secondary-button, .text-button { min-height: 43px; padding: 0 17px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 700; }
.primary-button { border: 1px solid var(--ink); background: var(--ink); color: #fff; }
.primary-button:hover { background: var(--ink-soft); }
.secondary-button { border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.secondary-button:hover { border-color: var(--moss); }
.text-button { border: 0; background: transparent; color: var(--moss); }
.icon-button { width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 8px; display: inline-grid; place-items: center; background: var(--surface); }
.icon-button:hover { background: var(--surface-muted); }
/* Home */
.home-hero { position: relative; min-height: 312px; overflow: hidden; padding: clamp(30px, 4vw, 52px); display: grid; grid-template-columns: minmax(0, 1fr) 245px; align-items: center; gap: 30px; border-radius: 16px; background: var(--ink); color: #f6f7f2; }
.contour-map { position: absolute; inset: 0 0 0 auto; width: 58%; height: 100%; opacity: .18; pointer-events: none; }
.hero-copy { position: relative; z-index: 1; }
.hero-copy .eyebrow { color: #a4b7a9; }
.hero-copy h1 { max-width: 590px; margin: 15px 0 16px; font-family: var(--font-display); font-size: clamp(37px, 4.5vw, 58px); font-weight: 700; line-height: 1.16; letter-spacing: -.055em; }
.hero-copy h1 span { color: #f38a5f; }
.hero-copy p { max-width: 540px; margin: 0 0 26px; color: #b6c3ba; font-size: 14px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; }
.hero-actions .primary-button { border-color: var(--accent); background: var(--accent); }
.hero-actions .primary-button:hover { background: #f07a4d; }
.hero-actions .secondary-button { border-color: #516158; background: transparent; color: #eef3ed; }
.hero-actions .secondary-button:hover { background: #263a30; }
.readiness-dial { position: relative; z-index: 1; width: 210px; margin: auto; text-align: center; }
.dial-svg { width: 178px; height: 178px; transform: rotate(-90deg); }
.dial-track { stroke: #3c5044; }
.dial-value { stroke: var(--accent); transition: stroke-dashoffset .5s ease; }
.dial-number { position: absolute; top: 48px; left: 0; right: 0; }
.dial-number strong { display: block; font: 44px var(--font-mono); line-height: 1; letter-spacing: -.06em; }
.dial-number span { color: #9fb0a4; font-size: 11px; }
.readiness-dial > p { margin: -4px 0 0; color: #aebbb2; font-size: 11px; }
.readiness-dial > p strong { color: #fff; }
.hero-coordinate { position: absolute; right: 18px; bottom: 13px; color: #6e8175; font: 9px var(--font-mono); letter-spacing: .1em; }
.home-grid { margin-top: 28px; display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, .8fr); gap: 28px; align-items: start; }
.section-head { margin-bottom: 15px; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.section-head h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.section-head span, .section-head button { color: var(--muted); font-size: 11px; }
.section-head button { border: 0; background: transparent; }
.module-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.module-row { width: 100%; min-height: 85px; padding: 17px 20px; display: grid; grid-template-columns: 45px minmax(0, 1fr) auto 20px; align-items: center; gap: 15px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.module-row:last-child { border-bottom: 0; }
.module-row:hover { background: var(--surface-muted); }
.module-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 10px; background: var(--moss-soft); color: var(--moss); }
.module-icon svg { width: 22px; height: 22px; }
.module-text strong { display: block; font-size: 14px; }
.module-text span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.module-meta { color: var(--muted); font: 10px var(--font-mono); white-space: nowrap; }
.module-row > svg { width: 17px; color: var(--muted); }
.first-actions { padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.first-actions h2 { margin: 0 0 5px; font-size: 17px; }
.first-actions > p { margin: 0 0 17px; color: var(--muted); font-size: 11px; }
.mini-check { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.mini-check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--accent); }
.mini-check span { font-size: 12px; }
.mini-check input:checked + span { color: var(--muted); text-decoration: line-through; }
.first-actions .secondary-button { width: 100%; margin-top: 15px; }
.home-note { margin-top: 28px; padding: 17px 20px; display: flex; align-items: flex-start; gap: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.home-note svg { width: 18px; margin-top: 2px; color: var(--moss); }
/* Categories and cards */
.category-banner { position: relative; overflow: hidden; margin-bottom: 25px; padding: 28px 31px; display: flex; align-items: center; gap: 22px; border-radius: var(--radius); background: var(--moss-soft); }
.category-banner .module-icon { width: 58px; height: 58px; background: var(--surface); }
.category-banner .module-icon svg { width: 29px; height: 29px; }
.category-banner h1 { margin: 3px 0 4px; font-family: var(--font-display); font-size: 31px; line-height: 1.25; }
.category-banner p { margin: 0; color: var(--muted); font-size: 12px; }
.category-index { margin-left: auto; align-self: flex-start; color: var(--moss); font: 12px var(--font-mono); }
.filter-row { margin-bottom: 19px; display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chip { min-height: 34px; padding: 5px 13px; border: 1px solid var(--line); border-radius: 20px; background: transparent; color: var(--muted); font-size: 11px; }
.filter-chip.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.guide-card { position: relative; min-height: 206px; padding: 22px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .18s, transform .18s; }
.guide-card:hover { border-color: var(--moss); transform: translateY(-2px); }
.guide-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.guide-label { color: var(--accent-dark); font: 10px var(--font-mono); letter-spacing: .1em; }
.bookmark-button { width: 35px; height: 35px; margin: -8px -8px 0 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.bookmark-button:hover { background: var(--surface-muted); }
.bookmark-button.saved { color: var(--accent); }
.bookmark-button.saved svg { fill: currentColor; }
.bookmark-button svg { width: 18px; height: 18px; }
.guide-open { padding: 0; border: 0; background: transparent; text-align: left; }
.guide-card h3 { margin: 11px 0 8px; font-size: 18px; line-height: 1.4; letter-spacing: -.02em; }
.guide-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.guide-card-bottom { margin-top: auto; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; }
.guide-card-bottom span { display: flex; align-items: center; gap: 5px; }
.guide-card-bottom svg { width: 14px; height: 14px; }
.urgent-tag { color: var(--danger); }
/* Checklist */
.checklist-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 27px; align-items: start; }
.checklist-panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.checklist-group { padding: 21px 23px; border-bottom: 1px solid var(--line); }
.checklist-group:last-child { border-bottom: 0; }
.checklist-group h3 { margin: 0 0 12px; display: flex; justify-content: space-between; font-size: 13px; }
.checklist-group h3 span { color: var(--muted); font: 10px var(--font-mono); }
.check-item { min-height: 51px; padding: 10px 0; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 11px; align-items: center; border-top: 1px solid color-mix(in srgb, var(--line) 65%, transparent); cursor: pointer; }
.check-item input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.check-item-text strong { display: block; font-size: 12px; font-weight: 600; }
.check-item-text span { display: block; color: var(--muted); font-size: 10px; }
.check-item input:checked ~ .check-item-text { opacity: .48; text-decoration: line-through; }
.check-qty { color: var(--moss); font: 10px var(--font-mono); white-space: nowrap; }
.checklist-summary { position: sticky; top: 105px; padding: 24px; border-radius: var(--radius); background: var(--ink); color: #eff4ee; }
.checklist-summary .eyebrow { color: #91a69a; }
.checklist-summary h2 { margin: 6px 0 20px; font-size: 20px; }
.summary-progress { display: flex; align-items: baseline; gap: 6px; }
.summary-progress strong { font: 46px var(--font-mono); line-height: 1.1; }
.summary-progress span { color: #a2b2a8; font-size: 12px; }
.progress-track { height: 5px; margin: 12px 0 21px; overflow: hidden; border-radius: 4px; background: #3c4f44; }
.progress-track span { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.household-control { padding: 13px 0; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #3c4f44; }
.household-control label { color: #b6c4ba; font-size: 11px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border: 1px solid #53665b; border-radius: 5px; background: transparent; color: #fff; }
.stepper button:hover { background: #31453a; }
.stepper svg { width: 13px; }
.stepper strong { min-width: 45px; text-align: center; font: 12px var(--font-mono); }
.water-calculation { margin: 13px 0 18px; padding: 14px; border-radius: 8px; background: #24372d; }
.water-calculation span { display: block; color: #a8b8ae; font-size: 10px; }
.water-calculation strong { display: block; margin-top: 2px; color: #f5aa88; font: 24px var(--font-mono); }
.water-calculation small { display: block; margin-top: 5px; color: #93a69a; font-size: 9px; line-height: 1.6; }
.summary-actions { display: grid; gap: 8px; }
.checklist-summary .secondary-button { border-color: #4b6053; background: transparent; color: #eaf0eb; }
.checklist-summary .secondary-button:hover { background: #2b4034; }
.reset-checks { border: 0; background: transparent; color: #9eb0a4; font-size: 10px; }
/* Search, empty and sources */
.results-count { margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.empty-state { padding: 65px 25px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; }
.empty-state svg { width: 38px; height: 38px; color: var(--muted); }
.empty-state h2 { margin: 15px 0 5px; font-size: 20px; }
.empty-state p { margin: 0 0 20px; color: var(--muted); font-size: 12px; }
.source-panel { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.source-panel h2 { margin: 0 0 12px; font-size: 15px; }
.source-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
.source-link { padding: 10px 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; text-decoration: none; }
.source-link:hover { color: var(--accent-dark); }
.source-link svg { width: 14px; }
/* Dialogs */
dialog { max-width: none; max-height: none; padding: 0; border: 0; color: var(--text); background: var(--surface); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(8, 18, 13, .7); backdrop-filter: blur(4px); }
.guide-dialog { width: min(760px, calc(100vw - 40px)); height: min(880px, calc(100vh - 40px)); border-radius: 15px; }
#guide-dialog-content { min-height: 100%; }
.guide-detail-head { position: relative; padding: 36px 42px 30px; border-bottom: 1px solid var(--line); background: var(--paper); }
.guide-detail-head .dialog-close { position: absolute; top: 18px; right: 18px; }
.guide-detail-head h2 { max-width: 580px; margin: 10px 40px 10px 0; font-family: var(--font-display); font-size: 31px; line-height: 1.3; letter-spacing: -.03em; }
.guide-detail-head p { max-width: 590px; margin: 0; color: var(--muted); font-size: 12px; }
.guide-detail-meta { margin-top: 17px; display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 10px; }
.guide-detail-meta span { display: flex; align-items: center; gap: 5px; }
.guide-detail-meta svg { width: 14px; }
.guide-detail-tools { position: absolute; right: 29px; bottom: 27px; display: flex; gap: 7px; }
.guide-detail-body { padding: 31px 42px 45px; font-size: var(--guide-font, 15px); }
.guide-detail-body section { margin-bottom: 27px; }
.guide-detail-body h3 { margin: 0 0 10px; font-size: 1.06em; }
.guide-detail-body p { margin: 0 0 11px; line-height: 1.9; }
.guide-detail-body ul, .guide-detail-body ol { margin: 8px 0 0; padding-left: 1.4em; }
.guide-detail-body li { margin: 8px 0; padding-left: 4px; line-height: 1.8; }
.step-list { list-style: none; padding: 0 !important; counter-reset: steps; }
.step-list li { position: relative; min-height: 34px; padding: 2px 0 12px 43px; counter-increment: steps; }
.step-list li::before { content: counter(steps, decimal-leading-zero); position: absolute; left: 0; top: 1px; color: var(--accent-dark); font: 11px var(--font-mono); }
.step-list li:not(:last-child)::after { content: ""; position: absolute; left: 10px; top: 25px; bottom: 0; border-left: 1px solid var(--line); }
.guide-alert { margin: 20px 0; padding: 15px 17px; display: flex; align-items: flex-start; gap: 11px; border-radius: 8px; background: var(--danger-soft); color: var(--danger-dark); font-size: .88em; }
[data-theme="night"] .guide-alert { color: #f0b1a7; }
.guide-alert.tip { background: var(--moss-soft); color: var(--moss); }
[data-theme="night"] .guide-alert.tip { color: #b6cfbd; }
.guide-alert svg { width: 19px; margin-top: 3px; }
.guide-sources { padding-top: 20px; border-top: 1px solid var(--line); }
.guide-sources h3 { font-size: 12px; }
.guide-sources a { display: block; margin: 8px 0; color: var(--moss); font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.medical-disclaimer { margin: 0 0 25px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 11px; }
.guide-figure { margin: 24px 0 29px; overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.medical-figure { display: block; width: 100%; min-width: 560px; height: auto; color: var(--text); }
.guide-figure figcaption { padding: 12px 16px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.7; }
.figure-scroll-note { display: none; margin-left: 8px; color: var(--accent-dark); white-space: nowrap; }
.fig-panel { fill: var(--paper); stroke: var(--line); }
.fig-label { fill: currentColor; font: 700 16px var(--font-body); }
.fig-number { fill: var(--accent-dark); font: 700 14px var(--font-mono); }
.fig-small { fill: var(--muted); font: 13px var(--font-body); }
.fig-skin { fill: #e6b69a; stroke: #8d6b55; stroke-width: 1.5; }
.fig-hand { fill: var(--moss-soft); stroke: var(--moss); stroke-width: 2; }
.fig-bandage { fill: #fff; stroke: var(--moss); stroke-width: 2; }
.fig-bandage-wrap, .fig-bandage-cross { fill: none; stroke: #fff; stroke-width: 18; stroke-linecap: round; }
.fig-bandage-cross { stroke-width: 15; }
.fig-roll { fill: #fff; stroke: var(--moss); stroke-width: 2; }
.fig-roll-inner { fill: var(--paper); stroke: var(--moss); stroke-width: 2; }
.fig-wound { fill: var(--danger); }
.fig-arrow { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.fig-person { fill: var(--moss-soft); stroke: var(--moss); stroke-width: 2; }
.fig-person-line { fill: var(--moss-soft); stroke: var(--moss); stroke-width: 3; stroke-linejoin: round; }
.fig-skin-line { fill: none; stroke: #b78970; stroke-width: 18; stroke-linecap: round; stroke-linejoin: round; }
.fig-sling { fill: #fff; stroke: var(--moss); stroke-width: 2; }
.fig-sling-line { fill: none; stroke: var(--moss); stroke-width: 3; stroke-linecap: round; }
.fig-knot { fill: var(--accent); }
.fig-tourniquet { fill: var(--accent); stroke: var(--accent-dark); stroke-width: 2; }
.fig-rod { fill: none; stroke: currentColor; stroke-width: 8; stroke-linecap: round; }
.fig-clip { fill: var(--moss-soft); stroke: var(--moss); stroke-width: 2; }
.fig-clock { fill: var(--surface); stroke: var(--accent); stroke-width: 3; }
.fig-clock-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.fig-device { fill: var(--moss-soft); stroke: var(--moss); stroke-width: 2; }
.fig-water { fill: none; stroke: #4b8ba5; stroke-width: 6; stroke-linecap: round; }
.fig-pole { fill: none; stroke: #876847; stroke-width: 8; stroke-linecap: round; }
.fig-blanket { fill: var(--moss-soft); stroke: var(--moss); stroke-width: 2; }
.emergency-dialog { width: min(820px, calc(100vw - 36px)); max-height: calc(100vh - 36px); padding: 34px; border-radius: 15px; }
.emergency-head { display: flex; justify-content: space-between; gap: 20px; }
.emergency-head h2 { margin: 6px 0 6px; font-size: 30px; line-height: 1.25; }
.emergency-head p { margin: 0; color: var(--muted); font-size: 12px; }
.emergency-head .eyebrow { color: var(--danger); }
.emergency-call-row { margin: 24px 0 15px; display: flex; gap: 9px; }
.call-button { min-height: 62px; padding: 10px 19px; flex: 1; display: flex; align-items: center; gap: 11px; border-radius: 8px; background: var(--danger); color: #fff; text-decoration: none; }
.call-button span { font-size: 12px; }
.call-button strong { margin-left: auto; font: 26px var(--font-mono); }
.secondary-call { min-width: 92px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 12px; text-decoration: none; }
.emergency-rule { padding: 14px 16px; display: flex; gap: 11px; background: var(--danger-soft); border-radius: 8px; color: var(--danger-dark); }
[data-theme="night"] .emergency-rule { color: #f0b1a7; }
.emergency-rule p { margin: 0; font-size: 11px; }
.emergency-rule svg { width: 19px; margin-top: 2px; }
.emergency-topics { margin-top: 19px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.emergency-group-label { grid-column: 1 / -1; margin: 13px 0 2px; padding-bottom: 7px; border-bottom: 1px solid var(--line); color: var(--muted); font: 10px var(--font-mono); letter-spacing: .12em; }
.emergency-group-label:first-child { margin-top: 0; }
.emergency-topic { min-height: 76px; padding: 13px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-align: left; }
.emergency-topic:hover { border-color: var(--danger); background: var(--danger-soft); }
.emergency-topic svg { width: 20px; color: var(--danger); }
.emergency-topic strong { display: block; font-size: 12px; }
.emergency-topic span { display: block; color: var(--muted); font-size: 9px; }
.emergency-disclaimer { margin: 18px 0 0; color: var(--muted); font-size: 10px; }
.personal-contact { margin-bottom: 14px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; }
.personal-contact a { color: var(--moss); font-weight: 700; }
.phone-directory-link { width: 100%; min-height: 49px; margin-top: 19px; padding: 10px 15px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--ink); border-radius: 8px; background: var(--ink); color: #fff; text-align: left; }
.phone-directory-link:hover { background: var(--ink-soft); }
.phone-directory-link strong { margin-left: auto; color: #b7c5bb; font: 10px var(--font-mono); }
.phone-directory-link svg { width: 18px; }
.call-prep { padding: 27px 29px; display: grid; grid-template-columns: minmax(210px, .75fr) minmax(0, 1.25fr); gap: 30px; border-radius: var(--radius); background: var(--ink); color: #f0f4ef; }
.call-prep .eyebrow { color: #93a79a; }
.call-prep h2 { margin: 7px 0 8px; font-size: 22px; line-height: 1.4; }
.call-prep p { margin: 0; color: #a8b8ad; font-size: 11px; }
.call-prep ol { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 20px; list-style: none; }
.call-prep li { display: flex; align-items: flex-start; gap: 10px; }
.call-prep li strong { color: var(--accent); font: 11px var(--font-mono); }
.call-prep li span { display: block; color: #aebcb2; font-size: 10px; }
.call-prep li b { display: block; color: #fff; font-size: 12px; }
.personal-phone-card { width: 100%; margin: 15px 0 4px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); text-align: left; }
.personal-phone-card:hover { background: var(--surface-muted); }
.personal-phone-card > span { display: flex; align-items: center; gap: 12px; }
.personal-phone-card > span > svg { color: var(--accent); }
.personal-phone-card strong, .personal-phone-card span span { display: block; }
.personal-phone-card strong { font-size: 12px; }
.personal-phone-card span span { color: var(--muted); font-size: 10px; }
.personal-phone-card > svg { width: 17px; color: var(--muted); }
.phone-group { margin-top: 27px; }
.phone-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.phone-card { min-height: 240px; padding: 21px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.phone-card.urgent { border-top: 3px solid var(--danger); }
.phone-card-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.phone-card-head svg { width: 18px; }
.phone-card.urgent .phone-card-head svg { color: var(--danger); }
.phone-type { font: 10px var(--font-mono); letter-spacing: .1em; }
.phone-card h3 { margin: 13px 0 7px; font-size: 17px; line-height: 1.45; }
.phone-card p { margin: 0 0 14px; color: var(--muted); font-size: 11px; line-height: 1.75; }
.phone-number-row { margin-top: auto; padding: 12px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.phone-number-row > strong { color: var(--accent-dark); font: 29px var(--font-mono); line-height: 1.2; letter-spacing: -.05em; }
.phone-card.urgent .phone-number-row > strong { color: var(--danger); }
.phone-call { min-height: 39px; padding: 0 14px; display: inline-flex; align-items: center; gap: 7px; border-radius: 7px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; text-decoration: none; }
.phone-call:hover { background: var(--accent); }
.phone-call svg { width: 15px; }
.phone-card small { display: block; padding-top: 11px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.phone-disclaimer { margin-top: 23px; padding: 16px 18px; display: flex; align-items: flex-start; gap: 11px; border-radius: 8px; background: var(--warning-soft); color: var(--warning); }
.phone-disclaimer svg { width: 19px; margin-top: 2px; }
.phone-disclaimer p { margin: 0; font-size: 11px; line-height: 1.8; }
.settings-dialog { width: min(590px, calc(100vw - 36px)); padding: 31px; border-radius: 15px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.dialog-head h2 { margin: 5px 0 0; font-size: 25px; }
.settings-section { margin-top: 25px; }
.settings-section h3 { margin: 0 0 10px; font-size: 13px; }
.setting-row { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); }
.setting-row strong, .setting-row span { display: block; }
.setting-row strong { font-size: 12px; }
.setting-row div > span { color: var(--muted); font-size: 10px; }
.segmented { padding: 3px; display: flex; border-radius: 7px; background: var(--surface-muted); }
.segmented button { min-height: 31px; padding: 0 13px; border: 0; border-radius: 5px; background: transparent; font-size: 11px; }
.segmented button.active { background: var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.switch { position: relative; width: 43px; height: 24px; padding: 0; border: 0; border-radius: 20px; background: var(--line); }
.switch span { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--moss); }
.switch[aria-checked="true"] span { transform: translateX(19px); }
.settings-help { margin: -4px 0 12px; color: var(--muted); font-size: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid label { color: var(--muted); font-size: 10px; }
.form-grid input { width: 100%; height: 42px; margin-top: 5px; padding: 0 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--text); font-size: 12px; }
.settings-actions { margin-top: 27px; display: flex; align-items: center; justify-content: space-between; }
.danger-text { color: var(--danger); font-size: 11px; }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 24px; align-items: start; }
.tool-form { display: grid; gap: 15px; }
.tool-form section, .custom-phone-list { padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tool-form h2 { margin: 0 0 17px; font-size: 16px; }
.tool-grid { display: grid; gap: 15px; }
.tool-field { display: block; color: var(--muted); font-size: 11px; }
.tool-field > span { display: block; margin-bottom: 6px; font-weight: 700; }
.tool-field input, .tool-field textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--text); font: 12px var(--font-body); line-height: 1.7; }
.tool-field input { height: 44px; }
.tool-field textarea { min-height: 82px; resize: vertical; }
.tool-field input:focus, .tool-field textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent) 30%, transparent); border-color: var(--accent); }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tool-aside, .location-preview { position: sticky; top: 105px; padding: 24px; border-radius: var(--radius); background: var(--ink); color: #edf3ed; }
.tool-aside .eyebrow, .location-preview .eyebrow { color: #98ab9e; }
.tool-aside h2, .location-preview h2 { margin: 7px 0 16px; font-size: 20px; }
.tool-aside ol { margin: 0; padding-left: 20px; color: #b6c4ba; font-size: 12px; }
.tool-aside li { margin: 12px 0; }
.tool-aside p { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid #3d5045; color: #91a399; font-size: 10px; }
.location-preview > p { min-height: 135px; margin: 0; padding: 16px; border-radius: 8px; background: #26392e; color: #f4f6f1; font-size: 13px; line-height: 1.9; }
.quick-call-row { margin: 15px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.quick-call-row a { padding: 8px 0; border: 1px solid #4b6053; border-radius: 6px; color: #fff; text-align: center; text-decoration: none; font: 12px var(--font-mono); }
.quick-call-row a:hover { background: var(--accent); border-color: var(--accent); }
.location-preview small { color: #9fb0a5; font-size: 10px; }
.custom-phone-row { padding: 14px 0; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); }
.custom-phone-row > div:first-child strong, .custom-phone-row > div:first-child span, .custom-phone-row > div:first-child small { display: block; }
.custom-phone-row strong { font-size: 13px; }
.custom-phone-row span { margin-top: 3px; color: var(--accent-dark); font: 18px var(--font-mono); }
.custom-phone-row small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.custom-phone-row > div:last-child { display: flex; gap: 7px; }
.custom-phone-row a, .custom-phone-row button { width: 37px; height: 37px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--muted); }
.custom-phone-row a:hover { color: var(--accent); }
.custom-phone-row button:hover { color: var(--danger); }
.custom-phone-row svg { width: 16px; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 28px; max-width: calc(100vw - 30px); padding: 11px 19px; border-radius: 8px; background: var(--ink); color: #fff; box-shadow: var(--shadow); font-size: 12px; opacity: 0; transform: translate(-50%, 15px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.nav-scrim { display: none; }
.noscript { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--paper); }
@media (max-width: 1100px) {
  .home-hero { grid-template-columns: minmax(0, 1fr) 190px; }
  .readiness-dial { width: 180px; }
  .dial-svg { width: 160px; height: 160px; }
  .dial-number { top: 42px; }
  .home-grid { grid-template-columns: 1fr; }
  .first-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
  .first-actions h2, .first-actions > p, .first-actions .secondary-button { grid-column: 1 / -1; }
  .checklist-layout { grid-template-columns: minmax(0, 1fr) 250px; }
  .local-badge { display: none; }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s; }
  .sidebar.open { transform: translateX(0); }
  .nav-scrim { position: fixed; inset: 0; z-index: 25; border: 0; background: rgba(8,18,13,.55); }
  .nav-scrim.show { display: block; }
  .workspace { margin-left: 0; }
  .mobile-header { min-height: 58px; padding: 8px 17px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
  .mobile-brand { font-weight: 700; letter-spacing: .1em; }
  .mobile-header .icon-button { border: 0; background: transparent; }
  .emergency-icon { color: var(--danger); }
  .topbar { min-height: 70px; padding: 12px 20px; }
  .search-box { width: 100%; }
  .topbar-actions { display: none; }
  #main-content { padding: 25px 20px 45px; }
  .home-hero { grid-template-columns: minmax(0, 1fr) 180px; padding: 30px; }
  .hero-copy h1 { font-size: 38px; }
  .checklist-layout { grid-template-columns: 1fr; }
  .tool-layout { grid-template-columns: 1fr; }
  .tool-aside, .location-preview { position: static; }
  .checklist-summary { position: static; grid-row: 1; }
  .summary-actions { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 14px; }
  #main-content { padding: 20px 15px 38px; }
  .topbar { padding: 10px 15px; }
  .search-box kbd { display: none; }
  .app-footer { padding: 16px; flex-direction: column; gap: 3px; }
  .home-hero { min-height: 0; padding: 28px 24px; grid-template-columns: 1fr; }
  .hero-copy h1 { max-width: 340px; font-size: 38px; }
  .hero-copy p { font-size: 12px; }
  .contour-map { width: 100%; opacity: .1; }
  .readiness-dial { width: 100%; margin: 0; padding-top: 19px; display: grid; grid-template-columns: 70px 1fr; align-items: center; border-top: 1px solid #3b4e43; text-align: left; }
  .dial-svg { width: 66px; height: 66px; grid-row: 1 / 3; }
  .dial-number { position: static; margin-left: 5px; }
  .dial-number strong { display: inline; font-size: 26px; }
  .dial-number span { margin-left: 7px; }
  .readiness-dial > p { margin: 0 0 0 5px; }
  .hero-coordinate { display: none; }
  .home-grid { margin-top: 23px; gap: 24px; }
  .module-row { min-height: 80px; padding: 15px; grid-template-columns: 41px minmax(0, 1fr) 17px; gap: 12px; }
  .module-meta { display: none; }
  .module-text span { max-width: 220px; }
  .first-actions { display: block; }
  .page-heading { align-items: flex-start; }
  .page-code { display: none; }
  .page-heading h1 { font-size: 29px; }
  .category-banner { padding: 22px; gap: 14px; }
  .category-banner .module-icon { width: 45px; height: 45px; }
  .category-banner h1 { font-size: 25px; }
  .category-index { display: none; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-card { min-height: 190px; }
  .source-list { grid-template-columns: 1fr; }
  .checklist-group { padding: 18px; }
  .check-item { grid-template-columns: 20px minmax(0, 1fr); }
  .check-qty { grid-column: 2; margin-top: -6px; }
  .guide-dialog { width: 100vw; height: 100vh; border-radius: 0; }
  .guide-detail-head { padding: 29px 23px 24px; }
  .guide-detail-head h2 { font-size: 26px; }
  .guide-detail-tools { position: static; margin-top: 17px; }
  .guide-detail-body { padding: 25px 23px 40px; }
  .figure-scroll-note { display: block; margin: 4px 0 0; }
  .emergency-dialog { width: 100vw; height: 100vh; max-height: 100vh; padding: 24px 19px; border-radius: 0; }
  .emergency-head h2 { font-size: 25px; }
  .emergency-call-row { flex-wrap: wrap; }
  .call-button { flex-basis: 100%; }
  .secondary-call { min-height: 39px; flex: 1; }
  .emergency-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .call-prep { padding: 23px; grid-template-columns: 1fr; gap: 20px; }
  .phone-grid { grid-template-columns: 1fr; }
  .phone-card { min-height: 225px; }
  .phone-number-row > strong { font-size: 26px; }
  .page-heading > .secondary-button { flex-shrink: 0; padding: 0 11px; font-size: 11px; }
  .settings-dialog { padding: 25px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .settings-actions { gap: 10px; }
}
@media print {
  .sidebar, .topbar, .mobile-header, .app-footer, .guide-detail-tools, .dialog-close, .home-hero, .checklist-summary, .filter-row { display: none !important; }
  .workspace { margin: 0; }
  #main-content { padding: 0; }
  body { background: #fff; color: #000; }
  dialog[open] { position: static; width: 100%; height: auto; box-shadow: none; }
  dialog::backdrop { display: none; }
  .guide-detail-head, .guide-detail-body { padding: 20px 0; background: #fff; }
  .guide-card, .checklist-panel { break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
