:root {
  color-scheme: light;
  --bg: #fafaf8;
  --surface: #f3f2ee;
  --raised: #ffffff;
  --ink: #1a1a1a;
  --muted: #6e6e6e;
  --line: #e8e6e1;
  --blue: #2563eb;
  --blue-soft: #eaf1ff;
  --green: #059669;
  --green-soft: #e8f6f0;
  --gold: #b45309;
  --gold-soft: #fff2dd;
  --red: #b42318;
  --red-soft: #fcebea;
  --teal: #0f766e;
  --teal-soft: #e5f4f1;
  --quick: 160ms;
  --normal: 240ms;
  --ease: cubic-bezier(.2, .8, .2, 1);
  font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang TC", "Heiti TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); }
button, input, select, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }

.skip-link { position: fixed; left: 12px; top: -80px; z-index: 100; padding: 10px 14px; color: #fff; background: var(--ink); border-radius: 10px; }
.skip-link:focus { top: 12px; }

.app-shell { width: min(1540px, calc(100% - 32px)); min-height: calc(100vh - 32px); margin: 16px auto; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); }
.topbar { position: relative; z-index: 30; min-height: 74px; display: grid; grid-template-columns: minmax(250px, 1fr) auto auto auto; align-items: center; gap: 14px; padding: 13px 20px; border-bottom: 1px solid var(--line); background: rgba(250,250,248,.94); backdrop-filter: blur(16px); }
.brand { min-width: 0; display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; flex: none; color: white; background: var(--ink); border-radius: 8px; font-size: 12px; font-weight: 850; letter-spacing: .08em; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: -.02em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.topbar-promises { display: flex; align-items: center; gap: 15px; color: var(--muted); font-size: 10px; font-weight: 750; }
.topbar-promises span { white-space: nowrap; }
.topbar-promises i { color: var(--green); font-style: normal; }
.locale-control { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 750; white-space: nowrap; }
.locale-control select { appearance: none; min-height: 34px; min-width: 98px; padding: 6px 22px; border: 1px solid var(--line); border-radius: 999px; background-color: var(--raised); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%236e6e6e' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 10px 8px; text-align: center; text-align-last: center; font-size: 11px; font-weight: 750; cursor: pointer; }
.chip, .button { min-height: 38px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--raised); font-size: 12px; font-weight: 750; transition: transform var(--quick) var(--ease), background var(--quick) var(--ease), border-color var(--quick) var(--ease), color var(--quick) var(--ease); }
.chip.is-active, .chip[aria-pressed="true"], .button.primary { color: #fff; border-color: var(--ink); background: var(--ink); }
.privacy-control { position: relative; }
.privacy-pill { padding: 8px 10px; color: var(--green); background: var(--green-soft); border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; list-style: none; cursor: pointer; }
.privacy-pill::-webkit-details-marker { display: none; }
.privacy-pill:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.privacy-explanation { position: absolute; z-index: 1; top: calc(100% + 10px); right: 0; width: min(340px,calc(100vw - 32px)); padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--raised); box-shadow: 0 12px 30px rgba(26,26,26,.12); font-size: 12px; line-height: 1.7; }
.privacy-explanation strong { display: block; color: var(--green); }
.privacy-explanation p { margin: 8px 0 0; }
.beta-mark { display: inline-block; margin-left: 5px; padding: 2px 6px; color: var(--gold); background: var(--gold-soft); border-radius: 999px; font-size: 8px; letter-spacing: .08em; vertical-align: 2px; }
.beta-notice { color: #42554d; background: #f2f8f5; border-bottom: 1px solid var(--line); font-size: 10px; line-height: 1.5; }
.beta-notice summary { display: flex; align-items: center; gap: 9px; padding: 9px 20px; cursor: pointer; list-style: none; }
.beta-notice summary::-webkit-details-marker { display: none; }
.beta-notice summary::after { margin-left: auto; content: '＋'; color: var(--gold); font-size: 14px; font-weight: 800; }
.beta-notice[open] summary::after { content: '−'; }
.beta-notice strong { color: var(--gold); }
.beta-notice summary > span:last-of-type { color: #62736b; }
.beta-notice p { margin: 0; padding: 0 20px 11px 48px; max-width: 1120px; }
.notice-shield { width: 18px; height: 18px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 5px; font-size: 7px; }

html[lang="en"] .screen-heading h1,
html[lang="en"] .launch-copy h1 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -.025em; }
html[lang="ja"] .screen-heading h1,
html[lang="ja"] .launch-copy h1 { font-family: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif; letter-spacing: -.02em; }

.app-body { min-height: 760px; display: grid; grid-template-columns: 194px minmax(0, 1fr); }
.journey { padding: 22px 14px; border-right: 1px solid var(--line); background: var(--surface); }
.progress-card { margin-bottom: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--raised); }
.progress-card > div:first-child { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.progress-card strong { color: var(--blue); }
.progress-track { height: 5px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: var(--line); }
.progress-track i { width: 25%; height: 100%; display: block; border-radius: inherit; background: var(--blue); transition: width var(--normal) var(--ease); }
.journey-step { width: 100%; min-height: 62px; display: grid; grid-template-columns: 28px minmax(0,1fr); align-items: center; gap: 9px; margin-bottom: 5px; padding: 9px; text-align: left; border: 0; border-radius: 13px; background: transparent; transition: transform var(--quick) var(--ease), background var(--quick) var(--ease); }
.journey-step > span { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--raised); font-size: 11px; }
.journey-step strong, .journey-step small { display: block; }
.journey-step strong { font-size: 12px; }
.journey-step small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.3; }
.journey-step.is-current { color: var(--blue); background: var(--blue-soft); }
.journey-step.is-complete > span { color: #fff; border-color: var(--green); background: var(--green); }
.journey-note { margin: 18px 6px 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

.main-stage { min-width: 0; padding: 24px; outline: none; }
.status-banner { min-height: 50px; margin-bottom: 0; overflow: hidden; color: var(--green); background: var(--green-soft); border-radius: 12px; font-size: 11px; font-weight: 700; transition: min-height var(--normal) var(--ease), margin var(--normal) var(--ease), padding var(--normal) var(--ease); }
.status-banner:not(:empty) { min-height: 50px; margin-bottom: 0; padding: 11px 13px; }
.status-banner:empty { background: transparent; }
.status-banner.is-error { color: var(--red); background: var(--red-soft); }
.screen { animation: enter var(--normal) var(--ease) both; }
[hidden] { display: none !important; }
.screen[hidden] { display: none; }
@keyframes enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.screen-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.screen-heading.compact { margin-bottom: 13px; }
.eyebrow { color: var(--blue); font-size: 10px; font-weight: 850; letter-spacing: .14em; }
.screen-heading h1 { margin: 5px 0 5px; font-family: "Noto Serif TC", "Songti TC", Georgia, serif; font-size: clamp(25px, 3vw, 40px); font-weight: 600; line-height: 1.18; letter-spacing: -.035em; }
.screen-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.screen-state, .ready-pill { flex: none; padding: 8px 10px; border-radius: 999px; color: var(--gold); background: var(--gold-soft); font-size: 10px; font-style: normal; font-weight: 800; }
.ready-pill { color: var(--green); background: var(--green-soft); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.launch-hero { position: relative; min-height: 510px; display: grid; grid-template-columns: minmax(310px,.84fr) minmax(490px,1.16fr); align-items: center; gap: clamp(28px,4vw,60px); padding: clamp(24px,3.5vw,50px); overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--raised); }
.launch-hero::before { position: absolute; inset: 0 auto 0 0; width: 7px; content: ''; background: linear-gradient(180deg,var(--green) 0 34%,var(--blue) 34% 67%,var(--gold) 67% 100%); pointer-events: none; }
.launch-copy { position: relative; z-index: 1; color: var(--ink); }
.launch-copy .eyebrow { color: var(--green); font-size: 9px; letter-spacing: .19em; }
.launch-copy h1 { max-width: 600px; margin: 15px 0 17px; font-family: "Noto Serif TC", "Songti TC", Georgia, serif; font-size: clamp(38px,4.3vw,60px); font-weight: 600; line-height: 1.16; letter-spacing: -.045em; }
.launch-copy > p { max-width: 540px; margin: 0; color: var(--muted); font-size: clamp(13px,1.15vw,16px); line-height: 1.72; }
.launch-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.launch-actions .button { min-height: 46px; padding-inline: 17px; border-radius: 8px; font-size: 12px; }
.launch-actions .primary { color: white; border-color: var(--ink); background: var(--ink); box-shadow: none; }
.launch-actions .secondary { color: var(--ink); border-color: #c9c7c1; background: var(--raised); }
.launch-actions .button[aria-pressed="true"] { outline: 2px solid color-mix(in srgb,var(--green) 45%,transparent); outline-offset: 2px; }
.launch-proof { display: flex; align-items: center; gap: 11px; margin-top: 25px; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .03em; }
.launch-proof span { display: inline-flex; align-items: center; gap: 6px; }
.launch-proof b { color: var(--green); font-size: 8px; letter-spacing: .08em; }
.launch-proof i { width: 24px; height: 1px; background: var(--line); }

.outcome-demo { position: relative; z-index: 1; margin: 0; padding: 10px; color: var(--ink); border: 1px solid #d8d5ce; border-radius: 12px; background: #fff; box-shadow: 0 16px 36px rgba(49,43,33,.09); transition: transform var(--normal) var(--ease), box-shadow var(--normal) var(--ease); }
.outcome-demo:hover { transform: translateY(-2px); box-shadow: 0 20px 42px rgba(49,43,33,.12); }
.outcome-demo figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 4px 9px; color: var(--muted); font-size: 7px; font-weight: 850; letter-spacing: .16em; }
.outcome-demo figcaption span { display: inline-flex; align-items: center; gap: 6px; }
.outcome-demo figcaption i { width: 6px; height: 6px; background: var(--green); border-radius: 1px; }
.outcome-demo figcaption em { color: var(--ink); font-style: normal; letter-spacing: .02em; }
.outcome-map { position: relative; height: 248px; overflow: hidden; border: 1px solid #dedbd5; border-radius: 7px; background: #f3f3ef; }
.outcome-map > svg { width: 100%; height: 100%; display: block; }
.demo-grid { fill: none; stroke: #d8d9d5; stroke-width: 1; opacity: .62; }
.demo-contour { fill: url(#terrainFill); }
.demo-contour-line { fill: none; stroke: #aeb9ae; stroke-width: 1.4; }
.demo-contour-line.soft { opacity: .55; }
.demo-lake { fill: #cfe8f4; stroke: #8fc1d8; stroke-width: 2; opacity: .92; }
.demo-lake.small { fill: #d9edf6; }
.demo-route-shadow { fill: none; stroke: white; stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; opacity: .95; }
.demo-route { fill: none; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; filter: url(#routeGlow); }
.demo-route.day-one { stroke: var(--blue); }
.demo-route.day-two { stroke: var(--gold); }
.demo-route.day-three { stroke: var(--green); }
.demo-pin circle { fill: white; stroke: var(--blue); stroke-width: 4; }
.demo-pin text { fill: var(--blue); font-size: 10px; font-weight: 900; text-anchor: middle; }
.demo-pin.start circle { stroke: var(--green); }
.demo-pin.start text { fill: var(--green); }
.demo-pin.end circle { fill: var(--green); stroke: var(--green); }
.demo-pin.end text { fill: white; }
.demo-mountain path:first-child { fill: #ccd0cf; opacity: .9; }
.demo-mountain path:last-child { fill: white; opacity: .95; }
.demo-day-tag rect { fill: var(--blue); }
.demo-day-tag.two rect { fill: var(--gold); }
.demo-day-tag.three rect { fill: var(--green); }
.demo-day-tag text { fill: white; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-anchor: middle; }
.demo-place-label { fill: #575b57; font-size: 12px; font-weight: 700; paint-order: stroke; stroke: rgba(255,255,255,.9); stroke-width: 4px; stroke-linejoin: round; }
.demo-place-label.mountain-label { fill: #313331; font-family: "Noto Serif TC", "Songti TC", Georgia, serif; font-size: 14px; font-weight: 700; }
.map-coordinates { position: absolute; right: 10px; top: 9px; color: #646862; font-size: 7px; font-weight: 700; letter-spacing: .08em; }
.map-legend { position: absolute; left: 13px; bottom: 13px; display: flex; gap: 4px; padding: 5px; color: white; background: rgba(255,255,255,.9); border: 1px solid #dedbd5; border-radius: 4px; }
.map-legend span { min-width: 24px; padding: 3px 4px; border-radius: 2px; font-size: 7px; font-weight: 850; text-align: center; }
.map-legend .d1 { background: var(--blue); }
.map-legend .d2 { background: var(--gold); }
.map-legend .d3 { background: var(--green); }
.map-chip { position: absolute; display: grid; grid-template-columns: auto auto; align-items: center; gap: 0 6px; padding: 8px 9px; border: 1px solid #d7d4cd; border-radius: 5px; background: rgba(255,255,255,.94); box-shadow: 0 7px 18px rgba(45,42,35,.08); }
.map-chip span { grid-row: 1 / 3; font-size: 20px; }
.map-chip b { font-size: 11px; }
.map-chip small { color: var(--muted); font-size: 8px; }
.map-chip.weather { top: 13px; left: 13px; }
.map-chip.distance { right: 13px; bottom: 13px; display: block; }
.map-chip.distance b, .map-chip.distance small { display: block; }
.outcome-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 13px 4px 9px; }
.outcome-title small, .outcome-title strong { display: block; }
.outcome-title small { color: var(--blue); font-size: 8px; font-weight: 850; letter-spacing: .14em; }
.outcome-title strong { margin-top: 3px; font-family: "Noto Serif TC", "Songti TC", Georgia, serif; font-size: 18px; font-weight: 600; letter-spacing: -.025em; }
.outcome-title > span { padding: 4px 7px; color: #176965; border: 1px solid #9ecbc8; border-radius: 4px; background: #e8f5f3; font-size: 7px; font-weight: 850; letter-spacing: .08em; }
.outcome-signals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.signal { position: relative; min-width: 0; padding: 9px 8px 9px 31px; border: 1px solid #d3dcdf; border-radius: 6px; background: white; }
.signal-icon { position: absolute; left: 8px; top: 13px; width: 17px; height: 17px; display: grid; place-items: center; color: white; background: var(--blue); border-radius: 3px; font-size: 9px; font-weight: 900; }
.signal.alert .signal-icon { background: var(--gold); }
.signal small, .signal strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signal small { color: var(--muted); font-size: 7px; }
.signal strong { margin-top: 2px; font-size: 9px; }
.mini-elevation { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px; margin-top: 7px; padding: 7px 9px; color: var(--muted); border: 1px solid #dedbd5; border-radius: 5px; background: #f6f5f2; font-size: 7px; font-weight: 800; letter-spacing: .08em; }
.mini-elevation svg { width: 100%; height: 30px; }
.mini-elevation path { fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.mini-elevation b { color: var(--ink); font-size: 9px; }

.value-strip { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; margin: 14px 0 30px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--line); }
.value-strip > div { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 15px; background: var(--raised); }
.value-strip p, .value-strip strong, .value-strip small { display: block; margin: 0; }
.value-strip strong { font-size: 12px; }
.value-strip small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.value-orbit { position: relative; width: 34px; height: 34px; display: grid; place-items: center; flex: none; border: 1px solid #b9cbd5; border-radius: 6px; background: #f0f5f7; }
.value-orbit i, .value-orbit b { position: absolute; display: block; }
.map-orbit i { width: 22px; height: 11px; border-bottom: 3px solid var(--blue); border-radius: 50%; transform: rotate(-18deg); }
.map-orbit b { width: 7px; height: 7px; left: 8px; bottom: 9px; border: 2px solid var(--blue); border-radius: 50%; background: white; }
.layers-orbit::before, .layers-orbit::after, .layers-orbit i { width: 20px; height: 12px; content: ''; border: 2px solid var(--green); border-radius: 4px; transform: skewY(-10deg); }
.layers-orbit::before { position: absolute; transform: translateY(-5px) skewY(-10deg); }
.layers-orbit::after { position: absolute; transform: translateY(5px) skewY(-10deg); }
.gap-orbit { color: var(--gold); border-color: #d9c29a; background: #faf5eb; font-weight: 900; }
.gap-orbit i { font-style: normal; }

.mission-builder { padding: clamp(18px,2.7vw,32px); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.builder-heading { margin-bottom: 16px; }
.builder-heading h2 { margin: 4px 0 3px; font-family: "Noto Serif TC", "Songti TC", Georgia, serif; font-size: clamp(22px,2.6vw,32px); font-weight: 600; letter-spacing: -.035em; }
.builder-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.type-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 9px; }
.type-grid button { position: relative; min-width: 0; text-align: left; border: 1px solid #cbd6dc; background: var(--raised); transition: transform var(--quick) var(--ease), border-color var(--quick) var(--ease), background var(--quick) var(--ease), box-shadow var(--quick) var(--ease); }
.type-grid button[aria-pressed="true"] { border-color: var(--teal); background: #f4fbfa; box-shadow: inset 3px 0 0 var(--teal); }
.type-featured { grid-column: span 2; min-height: 174px; padding: 9px; border-radius: 8px; }
.type-visual { height: 78px; display: grid; place-items: center; overflow: hidden; border: 1px solid #dbe3e7; border-radius: 5px; background: #f0f4f5; }
.place-type .type-visual, .event-type .type-visual { background: #f0f4f5; }
.type-visual svg { width: 90%; height: 72px; }
.type-visual .visual-grid { fill: none; stroke: #cedbe4; stroke-width: 1; }
.type-visual .visual-route { fill: none; stroke: var(--teal); stroke-width: 4; stroke-linecap: round; }
.type-visual circle { fill: white; stroke: var(--teal); stroke-width: 3; }
.type-visual .visual-ring { fill: none; stroke: var(--teal); stroke-width: 2.5; }
.type-visual .visual-ring.soft { opacity: .45; }
.type-visual .visual-cross { fill: none; stroke: #b9cec0; stroke-width: 2; }
.type-visual .visual-line { fill: none; stroke: #9ab1bd; stroke-width: 3; }
.type-visual .visual-tick { fill: none; stroke: white; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.event-type .type-visual circle { fill: #456f84; stroke: white; }
.type-copy { display: block; padding: 10px 3px 2px; }
.type-copy small, .type-copy strong, .type-copy em { display: block; }
.type-copy small { color: var(--muted); font-size: 7px; font-weight: 850; letter-spacing: .1em; }
.type-copy strong { margin-top: 3px; font-size: 13px; }
.type-copy em { margin-top: 3px; color: var(--muted); font-size: 9px; font-style: normal; line-height: 1.35; }
.type-check { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; display: none; place-items: center; color: white; background: var(--teal); border-radius: 3px; font-size: 9px; }
.type-grid button[aria-pressed="true"] .type-check { display: grid; }
.type-compact { grid-column: span 3; min-height: 62px; display: grid; grid-template-columns: 32px minmax(0,1fr); align-items: center; gap: 10px; padding: 10px 12px; border-radius: 7px; }
.type-compact .type-icon { width: 32px; height: 32px; display: grid; place-items: center; color: #426a80; border: 1px solid #ccdade; border-radius: 5px; background: #f0f4f5; font-size: 16px; }
.type-compact strong, .type-compact small { display: block; }
.type-compact strong { font-size: 11px; }
.type-compact small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.mission-inputs { display: grid; grid-template-columns: 165px minmax(0,1fr); align-items: center; gap: 10px 14px; margin-top: 20px; padding: 16px; border: 1px solid #d7e0e4; border-radius: 8px; background: white; }
.mission-inputs .field input, .mission-inputs .field textarea { background: white; }
.input-step { display: flex; align-items: center; gap: 9px; }
.input-step > span { width: 30px; height: 30px; display: grid; place-items: center; color: white; background: #2f5369; border-radius: 4px; font-size: 8px; font-weight: 850; letter-spacing: .06em; }
.input-step p, .input-step strong, .input-step small { display: block; margin: 0; }
.input-step strong { font-size: 10px; }
.input-step small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.mission-input-foot { grid-column: 2; display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--green); font-size: 9px; font-weight: 750; }
.mission-input-foot i { font-style: normal; }
.sample-link { padding: 3px; color: var(--blue); border: 0; background: transparent; font-size: 9px; font-weight: 800; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.screen-state-stack { display: grid; justify-items: end; gap: 6px; }
.connection-state { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; color: var(--green); border: 1px solid color-mix(in srgb, var(--green) 26%, var(--line)); border-radius: 999px; background: var(--green-soft); font-size: 8px; font-weight: 800; white-space: nowrap; }
.connection-state::before { width: 7px; height: 7px; content: ''; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent); }
.connection-state.is-offline { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 35%, var(--line)); background: var(--gold-soft); }
.form-grid.roomy { margin-top: 20px; }
.field { min-width: 0; display: block; }
.field.full { grid-column: 1 / -1; }
.field > span { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 750; }
.field b { color: var(--red); font-size: 9px; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; min-height: 44px; padding: 10px 11px; color: var(--ink); border: 1px solid var(--line); border-radius: 11px; background: var(--raised); }
.field textarea { resize: vertical; }
.field > small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, .drop-zone:focus-within { outline: 3px solid color-mix(in srgb, var(--blue) 35%, transparent); outline-offset: 2px; }

.map-layout { display: grid; grid-template-columns: minmax(320px,.75fr) minmax(0,1.25fr); gap: 16px; }
.panel, .map-preview { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.quick-route { margin-top: 16px; padding: 14px; border: 1px solid color-mix(in srgb, var(--blue) 34%, var(--line)); border-radius: 15px; background: linear-gradient(145deg, var(--raised), color-mix(in srgb, var(--blue-soft) 68%, white)); }
.quick-route-head { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 12px; }
.quick-route-head h2 { margin: 3px 0 4px; font-size: 16px; }
.quick-route-head p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.quick-route > small { display: block; margin-top: 9px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.quick-route a { color: var(--blue); }
.place-results { display: grid; gap: 6px; margin-top: 11px; }
.place-result { width: 100%; min-width: 0; padding: 9px 10px; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.86); }
.place-result span, .place-result small { display: block; }
.place-result span { font-size: 10px; font-weight: 750; line-height: 1.35; overflow-wrap: anywhere; }
.place-result small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.place-result.is-selected { border-color: var(--green); background: var(--green-soft); }
.place-result-note { display: block; padding: 9px 10px; color: var(--muted); border-radius: 10px; background: rgba(255,255,255,.56); font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }
.place-result-note.is-error { color: var(--red); background: var(--red-soft); }
.place-result-note.is-selected { color: var(--green); background: var(--green-soft); }
.place-retry { justify-self: start; min-height: 34px; padding: 6px 11px; font-size: 9px; }
.place-preserved { color: var(--green); font-size: 8px; font-weight: 750; }
.sketch-controls { display: grid; grid-template-columns: auto minmax(82px,1fr) auto auto; align-items: center; gap: 6px; margin-top: 10px; }
.sketch-controls label { color: var(--muted); font-size: 9px; font-weight: 750; }
.sketch-controls select { min-width: 0; min-height: 38px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--raised); font-size: 10px; }
.sketch-controls .button { min-height: 36px; padding-inline: 10px; border-radius: 9px; }
.quick-route-status { margin: 9px 0 0; color: var(--blue); font-size: 9px; font-weight: 750; line-height: 1.45; }
.route-divider { display: flex; align-items: center; gap: 8px; margin: 15px 0 0; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.route-divider::before, .route-divider::after { height: 1px; flex: 1; content: ''; background: var(--line); }
.drop-zone { min-height: 142px; display: grid; place-items: center; align-content: center; gap: 5px; margin-top: 18px; padding: 18px; text-align: center; border: 1px dashed var(--blue); border-radius: 14px; background: color-mix(in srgb, var(--blue-soft) 65%, transparent); cursor: pointer; }
.drop-zone.is-dragging { border-style: solid; background: var(--blue-soft); }
.drop-zone input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.drop-icon { width: 28px; height: 28px; display: grid; place-items: center; color: #fff; background: var(--blue); border-radius: 50%; }
.drop-zone strong { font-size: 13px; }
.drop-zone small { color: var(--muted); font-size: 10px; }
.file-summary { margin-top: 12px; padding: 11px; color: var(--muted); background: var(--green-soft); border-radius: 11px; font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.file-summary strong { color: var(--green); }
.map-preview { background: linear-gradient(145deg, var(--raised), var(--blue-soft)); }
.preview-top { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; font-weight: 800; letter-spacing: .09em; }
.preview-top span { color: var(--blue); }
.preview-top em { color: var(--gold); font-style: normal; letter-spacing: normal; }
.preview-top > div { display: flex; align-items: center; gap: 8px; }
.map-mode-button { min-height: 30px; padding: 5px 9px; color: var(--blue); border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.82); font-size: 9px; font-weight: 800; letter-spacing: normal; }
.map-mode-button:disabled { opacity: .5; cursor: not-allowed; }
.live-map-shell { position: relative; min-height: 360px; margin-top: 10px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--blue) 28%, var(--line)); border-radius: 14px; background: #dfe9f0; }
.live-map-shell[hidden] { display: none; }
.keyboard-route-preview[hidden] { display: none; }
.live-map { width: 100%; height: 360px; }
.map-load-status { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; align-content: center; gap: 10px; padding: 20px; color: var(--muted); background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(224,236,245,.92)); font-size: 11px; font-weight: 800; text-align: center; pointer-events: none; }
.map-load-status .button { min-height: 34px; padding: 6px 11px; font-size: 9px; pointer-events: auto; }
.map-load-status.is-network { inset: auto 12px 12px; place-items: start; grid-template-columns: minmax(0,1fr) auto; align-items: center; padding: 10px 12px; text-align: left; border: 1px solid color-mix(in srgb, var(--gold) 34%, var(--line)); border-radius: 11px; background: rgba(255,251,235,.94); box-shadow: 0 8px 24px rgba(23,37,55,.16); pointer-events: auto; }
.map-load-status[hidden] { display: none; }
.maplibregl-ctrl-attrib { font-size: 9px; }
.maplibregl-ctrl-attrib a { color: #24577f; }
.planning-map-focus { position: relative; display: flex; align-items: center; flex-direction: column; gap: 7px; pointer-events: none; }
.planning-map-focus-label { min-width: 112px; max-width: 190px; display: block; padding: 7px 10px 6px; color: var(--ink); text-align: center; border: 1px solid rgba(255,255,255,.92); border-radius: 9px; background: rgba(255,255,255,.92); box-shadow: 0 7px 22px rgba(23,37,55,.22); backdrop-filter: blur(8px); }
.planning-map-focus-label strong, .planning-map-focus-label small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.planning-map-focus-label strong { font-size: 10px; font-weight: 850; }
.planning-map-focus-label small { margin-top: 2px; color: var(--green); font-size: 8px; font-weight: 800; letter-spacing: .04em; }
.planning-map-focus-pin { position: relative; width: 18px; height: 18px; display: block; border: 4px solid white; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(5,150,105,.3), 0 5px 13px rgba(23,37,55,.3); }
.planning-map-focus-pin::after { position: absolute; inset: -10px; content: ''; border: 2px solid rgba(5,150,105,.56); border-radius: 50%; animation: focus-pulse 2.4s var(--ease) infinite; }
@keyframes focus-pulse { 0%,35% { opacity: .78; transform: scale(.62); } 75%,100% { opacity: 0; transform: scale(1.22); } }
.route-map-marker { width: 28px; height: 28px; display: grid; place-items: center; color: var(--blue); border: 3px solid var(--blue); border-radius: 50%; background: white; box-shadow: 0 4px 12px rgba(23,37,55,.2); font-size: 10px; font-weight: 900; }
.route-map-marker.is-start { color: var(--green); border-color: var(--green); }
.route-map-marker.is-end { color: white; border-color: var(--blue); background: var(--blue); }
.map-preview svg { width: 100%; height: auto; margin-top: 10px; color: var(--muted); border-radius: 14px; outline: none; }
.map-preview svg.is-ready { cursor: crosshair; }
.map-preview svg:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 35%, transparent); outline-offset: 3px; }
.grid-line { fill: none; stroke: #cbd8e2; stroke-width: 1; }
.canvas-boundary { fill: rgba(255,255,255,.2); stroke: color-mix(in srgb, var(--blue) 45%, var(--line)); stroke-width: 2; stroke-dasharray: 7 8; pointer-events: none; }
svg [hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .planning-map-focus-pin::after { animation: none; opacity: .4; transform: scale(.9); }
}

.beta-feedback-fab { position: fixed; z-index: 30; right: 20px; bottom: 20px; padding: 12px 18px; color: #fff; background: var(--ink); border: 1px solid rgba(255,255,255,.45); border-radius: 999px; box-shadow: 0 10px 30px rgba(23,37,55,.24); font: inherit; font-weight: 850; cursor: pointer; }
.beta-feedback-fab:hover { transform: translateY(-1px); }
.beta-feedback-dialog { width: min(620px, calc(100% - 28px)); max-height: min(780px, calc(100vh - 28px)); overflow: auto; padding: 0; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 80px rgba(23,37,55,.32); }
.beta-feedback-dialog::backdrop { background: rgba(23,37,55,.58); backdrop-filter: blur(3px); }
.beta-feedback-dialog form { padding: 24px; }
.beta-feedback-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.beta-feedback-head h2 { margin: 4px 0 0; font-size: 23px; }
.dialog-close { width: 40px; height: 40px; color: var(--ink); background: var(--bg); border: 0; border-radius: 50%; font: inherit; font-size: 24px; cursor: pointer; }
.feedback-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 18px; }
.feedback-grid .full { grid-column: 1 / -1; }
.feedback-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.feedback-privacy { padding: 10px 12px; color: var(--muted); background: var(--bg); border-radius: 10px; font-size: 10px; }
.feedback-actions { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
#betaFeedbackStatus { color: var(--muted); font-size: 11px; }
#routePath, #briefRoutePath { fill: none; stroke: var(--blue); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 4px 5px rgba(53,107,152,.14)); }
#routePlaceholder, #briefRouteEmpty { fill: var(--muted); font-size: 16px; }
#routeHint { fill: var(--muted); font-size: 10px; }
.route-waypoint circle { fill: var(--raised); stroke: var(--blue); stroke-width: 4; }
.route-waypoint.is-start circle { stroke: var(--green); }
.route-waypoint.is-end circle { fill: var(--blue); }
.route-waypoint text { fill: var(--blue); font-size: 10px; font-weight: 850; pointer-events: none; }
.route-waypoint.is-end text { fill: white; }
#routeCursor { fill: rgba(255,255,255,.9); stroke: var(--gold); stroke-width: 4; stroke-dasharray: 3 3; pointer-events: none; }
.map-preview p { margin: 0; color: var(--muted); font-size: 10px; text-align: center; }

.elevation-quest { margin-top: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, var(--raised), var(--green-soft)); }
.elevation-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.elevation-head h2 { margin: 4px 0; font-size: 18px; }
.elevation-head p { max-width: 760px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.elevation-action { display: flex; flex: none; align-items: center; gap: 9px; }
.elevation-action > span { color: var(--gold); font-size: 10px; font-weight: 800; white-space: nowrap; }
.elevation-progress { height: 5px; margin-top: 14px; overflow: hidden; border-radius: 999px; background: rgba(204,216,226,.8); }
.elevation-progress i { width: 0; height: 100%; display: block; background: var(--green); transition: width var(--normal) var(--ease); }
.elevation-quest.is-loading .elevation-progress i { width: 72%; animation: terrain-scan 1.1s var(--ease) infinite alternate; }
@keyframes terrain-scan { from { transform: translateX(-22%); } to { transform: translateX(38%); } }
.elevation-result { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(220px,.6fr); gap: 14px; margin-top: 14px; }
.elevation-result[hidden] { display: none; }
.elevation-chart { min-width: 0; padding: 10px; border-radius: 13px; background: rgba(255,255,255,.75); }
.elevation-chart svg { width: 100%; height: auto; display: block; }
#elevationPath, #briefElevationPath { fill: none; stroke: var(--blue); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 4px 5px rgba(53,107,152,.14)); }
.elevation-chart small { color: var(--muted); font-size: 9px; }
.elevation-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.elevation-metrics > div { padding: 11px; border-radius: 11px; background: rgba(255,255,255,.78); }
.elevation-metrics span, .elevation-metrics strong { display: block; }
.elevation-metrics span { color: var(--muted); font-size: 8px; }
.elevation-metrics strong { margin-top: 4px; font-size: 13px; }
.elevation-source { margin: 11px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }

.weather-quest { margin-bottom: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, var(--raised), var(--blue-soft)); }
.weather-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.weather-head h2 { margin: 4px 0; font-size: 18px; }
.weather-head p { max-width: 660px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.weather-action { min-width: 360px; display: grid; grid-template-columns: minmax(150px,1fr) auto; align-items: end; gap: 7px; }
.weather-action label { grid-column: 1 / -1; color: var(--muted); font-size: 9px; font-weight: 800; }
.weather-action select { min-width: 0; min-height: 38px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); font-size: 11px; }
.weather-action .weather-scan { grid-column: 1 / -1; }
.weather-slots { min-height: 38px; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; padding: 8px; border: 1px dashed var(--line); border-radius: 12px; background: rgba(255,255,255,.46); }
.weather-slot { display: inline-flex; align-items: center; gap: 7px; padding: 7px 8px 7px 11px; border-radius: 999px; color: var(--ink); background: var(--raised); box-shadow: 0 2px 8px rgba(23,37,55,.07); font-size: 10px; font-weight: 800; }
.weather-slot b { color: var(--blue); font-size: 8px; }
.weather-slot button { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; color: var(--muted); background: var(--blue-soft); cursor: pointer; }
.weather-slot-empty { align-self: center; color: var(--muted); font-size: 9px; }
.weather-progress { height: 5px; margin-top: 14px; overflow: hidden; border-radius: 999px; background: rgba(204,216,226,.8); }
.weather-progress i { width: 0; height: 100%; display: block; background: var(--blue); transition: width var(--normal) var(--ease); }
.weather-quest.is-loading .weather-progress i { width: 72%; animation: terrain-scan 1.1s var(--ease) infinite alternate; }
.weather-result { display: grid; gap: 10px; margin-top: 13px; }
.weather-result[hidden] { display: none; }
.weather-summary { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: baseline; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.72); }
.weather-summary span, .weather-summary small { color: var(--muted); font-size: 8px; }
.weather-summary strong { font-size: 12px; }
.weather-regions { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 9px; }
.weather-region { min-width: 0; padding: 12px; border: 1px solid rgba(201,213,223,.9); border-radius: 14px; background: rgba(255,255,255,.76); }
.weather-region header { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.weather-region h3 { margin: 0; font-size: 13px; }
.weather-region h3 small { color: var(--muted); font-size: 7px; font-weight: 750; }
.weather-region header span { color: var(--muted); font-size: 8px; text-align: right; }
.weather-region .weather-days { margin-top: 9px; }
.weather-region .weather-day { padding: 9px; background: var(--blue-soft); }
.weather-region .weather-day > span { font-size: 19px; }
.weather-region .weather-day strong { font-size: 9px; }
.weather-region .weather-metrics { margin-top: 8px; }
.weather-region .weather-alert { margin-top: 8px; }
.weather-days { min-width: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.weather-day { min-width: 0; padding: 12px; border-radius: 13px; background: rgba(255,255,255,.78); }
.weather-day span, .weather-day strong, .weather-day small { display: block; }
.weather-day > span { color: var(--blue); font-size: 23px; }
.weather-day strong { margin: 5px 0 4px; font-size: 11px; line-height: 1.35; }
.weather-day small { color: var(--muted); font-size: 8px; line-height: 1.4; }
.weather-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.weather-metrics > div { min-width: 0; padding: 10px; border-radius: 11px; background: rgba(255,255,255,.78); }
.weather-metrics span, .weather-metrics strong { display: block; }
.weather-metrics span { color: var(--muted); font-size: 8px; }
.weather-metrics strong { margin-top: 4px; font-size: 10px; overflow-wrap: anywhere; }
.weather-alert { grid-column: 1 / -1; padding: 10px 12px; color: var(--gold); border-left: 4px solid var(--gold); border-radius: 9px; background: var(--gold-soft); font-size: 9px; font-weight: 750; line-height: 1.5; }
.weather-alert.is-quiet { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.weather-alert.is-unknown { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.weather-source { margin: 10px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }

.intel-summary { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin-bottom: 11px; }
.intel-summary > div { padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.intel-summary span, .intel-summary strong { display: block; }
.intel-summary span { color: var(--muted); font-size: 9px; }
.intel-summary strong { margin-top: 4px; font-size: 12px; }
.scenario-control { display: grid; grid-template-columns: minmax(0,1fr) minmax(200px,320px) auto; align-items: center; gap: 12px; margin-bottom: 15px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--blue-soft); }
.scenario-control label { font-size: 10px; font-weight: 800; }
.scenario-control select { width: 100%; min-width: 0; min-height: 38px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--raised); }
.intel-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.intel-card { position: relative; min-width: 0; padding: 16px 16px 16px 40px; border: 1px solid var(--line); border-radius: 15px; background: var(--raised); animation: intel-in var(--normal) var(--ease) both; animation-delay: calc(var(--index) * 40ms); }
@keyframes intel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.intel-dot { position: absolute; left: 16px; top: 20px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.intel-card[data-snapshot-state="current"] .intel-dot { background: var(--green); }
.intel-card[data-snapshot-state="missing"] .intel-dot, .intel-card[data-snapshot-state="error"] .intel-dot, .intel-card[data-snapshot-state="invalid"] .intel-dot, .intel-card[data-snapshot-state="version-mismatch"] .intel-dot { background: var(--red); }
.intel-card[data-snapshot-state="stale"] .intel-dot, .intel-card[data-snapshot-state="partial"] .intel-dot, .intel-card[data-snapshot-state="unknown"] .intel-dot { background: var(--gold); }
.intel-card h2 { margin: 0; font-size: 14px; }
.intel-card .intel-meta { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.intel-card .intel-meta span { padding: 4px 6px; color: var(--muted); background: var(--bg); border-radius: 999px; font-size: 9px; }
.intel-card p { margin: 7px 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.intel-card small { color: var(--red); font-size: 9px; line-height: 1.4; }
.boundary-card { margin-top: 12px; padding: 13px 15px; border-left: 4px solid var(--red); border-radius: 10px; background: var(--red-soft); }
.boundary-card strong { font-size: 11px; }
.boundary-card p { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.snapshot-gate { min-height: 0; margin-bottom: 0; overflow: hidden; border-radius: 11px; font-size: 10px; font-weight: 750; }
.snapshot-gate:not(:empty) { min-height: 38px; margin-bottom: 12px; padding: 11px 13px; color: var(--gold); background: var(--gold-soft); }
.snapshot-gate.is-blocked:not(:empty) { color: var(--red); background: var(--red-soft); }
.ready-pill.is-blocked { color: var(--red); background: var(--red-soft); }

.workbench { display: flex; flex-direction: column; gap: 14px; }
.workbench > .brief-area { order: -1; }
.advanced-options { margin-top: 16px; min-width: 0; }
.advanced-options > summary { cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 750; padding: 12px 0; }
.advanced-options > summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.toolbox { width: 100%; }
.toolbox h2 { margin: 0 0 14px; font-size: 14px; }
.toolbox fieldset { margin: 18px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.toolbox legend { padding: 0 4px; color: var(--muted); font-size: 10px; }
.toolbox fieldset label { display: block; margin: 8px 0; font-size: 10px; }
.privacy-card { padding: 11px; color: var(--green); background: var(--green-soft); border-radius: 11px; }
.privacy-card strong { font-size: 11px; }
.privacy-card p { margin: 4px 0 0; font-size: 9px; line-height: 1.45; }
.full-button { width: 100%; margin-top: 12px; border-radius: 10px; }
.brief-area { min-width: 0; }
.brief-toolbar { flex-wrap: wrap; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.brief-toolbar > span { color: var(--muted); font-size: 10px; }
.brief-toolbar > div { flex-wrap: wrap; display: flex; gap: 6px; }
.brief-canvas { min-width: 0; overflow-wrap: anywhere; aspect-ratio: 16 / 9; min-height: 455px; display: grid; grid-template-rows: auto auto minmax(0,1fr) auto auto; gap: 8px; padding: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: radial-gradient(circle at 85% 5%, rgba(169,120,49,.13), transparent 30%), linear-gradient(145deg, var(--raised), var(--blue-soft)); }
.brief-canvas.ratio-4-5 { aspect-ratio: 4 / 5; max-width: 680px; margin-inline: auto; }
.brief-canvas.ratio-9-16 { aspect-ratio: 9 / 16; max-width: 500px; margin-inline: auto; }
.brief-canvas header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.brief-canvas header small { color: var(--blue); font-size: 9px; font-weight: 850; letter-spacing: .12em; }
.brief-canvas h2 { margin: 5px 0 0; font-size: clamp(24px,3vw,40px); line-height: 1.05; letter-spacing: -.045em; }
.brief-canvas header > span { padding: 6px 8px; color: var(--gold); background: var(--gold-soft); border-radius: 999px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.brief-objective { margin: 2px 0 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.brief-visual { min-height: 0; display: grid; grid-template-columns: minmax(0,1.35fr) minmax(160px,.65fr); gap: 12px; }
.route-card { min-height: 0; padding: 12px; background: rgba(224,236,245,.78); border-radius: 13px; }
.route-card > span { font-size: 9px; font-weight: 800; }
.route-card svg { width: 100%; height: min(30vh,250px); display: block; }
.route-card svg[hidden] { display: none; }
.route-card > small { color: var(--muted); font-size: 8px; }
.fact-stack { display: grid; gap: 7px; }
.fact-stack > div { min-width: 0; padding: 11px; background: rgba(255,255,255,.78); border-radius: 11px; }
.fact-stack span, .fact-stack strong { display: block; }
.fact-stack span { color: var(--muted); font-size: 8px; }
.fact-stack strong { margin-top: 4px; font-size: 13px; overflow-wrap: anywhere; }
.brief-weather { min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; background: rgba(255,255,255,.78); }
.brief-weather[hidden] { display: none; }
.brief-weather > span { color: var(--blue); font-size: 22px; }
.brief-weather small, .brief-weather strong { display: block; }
.brief-weather small { color: var(--muted); font-size: 7px; font-weight: 800; letter-spacing: .08em; }
.brief-weather strong { margin-top: 2px; font-size: 10px; }
.brief-weather em { color: var(--gold); font-size: 8px; font-style: normal; font-weight: 800; text-align: right; }
.brief-canvas footer { display: flex; justify-content: space-between; gap: 12px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; }
.evidence-strip { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; margin-top: 8px; }
.evidence-strip > div { padding: 8px 10px; border-top: 3px solid var(--green); background: var(--surface); border-radius: 0 0 9px 9px; }
.evidence-strip > div:nth-child(2) { border-color: var(--gold); }
.evidence-strip > div:nth-child(3) { border-color: var(--red); }
.evidence-strip strong, .evidence-strip small { display: block; }
.evidence-strip strong { font-size: 10px; }
.evidence-strip small { margin-top: 3px; color: var(--muted); font-size: 8px; }

.stage-actions { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.stage-actions .button { min-width: 105px; border-radius: 11px; }
.button:disabled { opacity: .42; cursor: not-allowed; }
#validationMessage { color: var(--red); font-size: 10px; text-align: right; }

@media (hover:hover) and (pointer:fine) {
  .chip:hover, .button:not(:disabled):hover, .type-grid button:hover { transform: translateY(-2px); }
  .journey-step:hover { background: color-mix(in srgb, var(--blue-soft) 65%, transparent); }
}
.chip:active, .button:not(:disabled):active, .type-grid button:active { transform: scale(.985); }

@media (max-width: 1040px) {
  .topbar { grid-template-columns: minmax(220px,1fr) auto; }
  .privacy-control { grid-column: 1 / -1; justify-self: start; }
  .privacy-explanation { left: 0; right: auto; }
  .launch-hero { grid-template-columns: minmax(280px,.8fr) minmax(390px,1.2fr); padding: 28px; }
  .launch-copy h1 { font-size: 44px; }
  .outcome-map { height: 215px; }
  .intel-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .screen-state-stack { justify-items: start; }
  .app-shell { width: 100%; min-height: 100vh; margin: 0; border-width: 0; border-radius: 0; }
  .topbar { grid-template-columns: 1fr; align-items: start; }
  .topbar-promises { flex-wrap: wrap; }
  .app-body { grid-template-columns: 1fr; }
  .journey { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5px; padding: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .progress-card { grid-column: 1 / -1; margin: 0; }
  .journey-step { grid-template-columns: 1fr; justify-items: center; min-height: 60px; margin: 0; text-align: center; }
  .journey-step small, .journey-note { display: none; }
  .main-stage { padding: 16px; }
  .launch-hero { grid-template-columns: 1fr; padding: 27px 22px 20px; border-radius: 12px; }
  .launch-copy { text-align: left; }
  .launch-copy h1 { margin-inline: 0; font-size: clamp(36px,9.5vw,50px); }
  .launch-copy > p { margin-inline: 0; }
  .launch-actions, .launch-proof { justify-content: flex-start; }
  .outcome-demo { width: min(540px,100%); margin-inline: auto; transform: none; }
  .value-strip { grid-template-columns: 1fr; }
  .value-strip > div { padding: 11px 14px; }
  .type-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .type-featured { grid-column: span 1; }
  .type-featured:last-of-type { grid-column: 1 / -1; }
  .type-compact { grid-column: span 1; }
  .map-layout, .workbench { grid-template-columns: 1fr; }
  .sketch-controls { grid-template-columns: auto minmax(90px,1fr) auto auto; }
  .elevation-result { grid-template-columns: 1fr; }
  .weather-result { grid-template-columns: 1fr; }
  .weather-regions { grid-template-columns: 1fr; }
  .intel-grid { grid-template-columns: 1fr; }
  .scenario-control { grid-template-columns: 1fr; }
  .toolbox { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .toolbox h2, .privacy-card, .toolbox .full-button { grid-column: 1 / -1; }
  .toolbox fieldset { margin: 0; }
}

@media (max-width: 520px) {
  .beta-notice summary { align-items: flex-start; flex-wrap: wrap; padding: 9px 16px; }
  .beta-notice summary > span:last-of-type { width: calc(100% - 28px); margin-left: 27px; }
  .beta-notice summary::after { position: absolute; right: 16px; }
  .beta-notice p { padding: 0 16px 11px; }
  .beta-feedback-fab { right: 12px; bottom: 12px; }
  .feedback-grid { grid-template-columns: 1fr; }
  .feedback-actions { align-items: stretch; flex-direction: column; }
  .topbar { padding: 13px 15px; }
  .topbar-promises { gap: 9px; }
  .privacy-control { display: none; }
  .main-stage { padding: 11px; }
  .launch-hero { min-height: 0; padding: 27px 16px 13px; border-radius: 10px; }
  .launch-copy h1 { font-size: 37px; line-height: 1.07; }
  .launch-copy > p { font-size: 13px; }
  .launch-actions { display: grid; grid-template-columns: 1fr; }
  .launch-actions .button { width: 100%; }
  .launch-proof { gap: 7px; font-size: 8px; }
  .launch-proof i { width: 12px; }
  .outcome-demo { padding: 7px; border-radius: 8px; }
  .outcome-map { height: 190px; }
  .outcome-title strong { font-size: 15px; }
  .signal { padding-left: 8px; }
  .signal-icon { display: none; }
  .value-strip { margin-bottom: 18px; }
  .mission-builder { padding: 16px 12px; border-radius: 9px; }
  .type-grid { grid-template-columns: 1fr; }
  .type-featured, .type-featured:last-of-type, .type-compact { grid-column: auto; }
  .type-featured { min-height: 160px; }
  .type-visual { height: 82px; }
  .mission-inputs { grid-template-columns: 1fr; padding: 12px; }
  .mission-input-foot { grid-column: auto; align-items: flex-start; flex-direction: column; }
  .form-grid, .intel-summary, .toolbox { grid-template-columns: 1fr; }
  .field.full, .toolbox h2, .privacy-card, .toolbox .full-button { grid-column: auto; }
  .screen-heading { display: block; }
  .quick-route-head { grid-template-columns: 1fr; }
  .quick-route-head .button { width: 100%; }
  .preview-top { align-items: flex-start; }
  .preview-top > div { align-items: flex-end; flex-direction: column; }
  .live-map-shell { min-height: 300px; }
  .live-map { height: 300px; }
  .sketch-controls { grid-template-columns: 1fr 1fr; }
  .sketch-controls label { align-self: center; }
  .sketch-controls .button { width: 100%; }
  .elevation-head { display: block; }
  .elevation-action { justify-content: space-between; margin-top: 12px; }
  .weather-head { display: block; }
  .weather-action { min-width: 0; margin-top: 12px; }
  .weather-summary { grid-template-columns: 1fr; gap: 3px; }
  .weather-days { grid-template-columns: 1fr; }
  .screen-heading .screen-state, .screen-heading .ready-pill { display: inline-block; margin-top: 10px; }
  .brief-visual { grid-template-columns: 1fr; }
  .brief-canvas { aspect-ratio: auto; min-height: 700px; }
  .brief-toolbar { align-items: stretch; flex-direction: column; }
  .brief-toolbar > div { display: grid; grid-template-columns: 1fr 1fr; }
  .brief-canvas footer { flex-direction: column; }
  .brief-weather { grid-template-columns: auto minmax(0,1fr); }
  .brief-weather em { grid-column: 2; text-align: left; }
  .evidence-strip { grid-template-columns: 1fr; }
  .stage-actions { grid-template-columns: 1fr 1fr; }
  #validationMessage { grid-column: 1 / -1; grid-row: 1; text-align: left; }
}

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

/* Outcome first: show a completed example before asking for mission inputs. */
.app-shell[data-step="1"] .app-body { grid-template-columns: 1fr; }
.app-shell[data-step="1"] .journey { display: none; }
.launch-hero { grid-template-columns: minmax(260px,.82fr) minmax(390px,1.18fr); gap: 35px; padding: 35px; background: linear-gradient(120deg,#fff 35%,#f0f6f1); }
.launch-copy h1 { font-family: inherit; font-size: clamp(32px,3.35vw,48px); font-weight: 750; line-height: 1.28; letter-spacing: -.04em; }
html[lang="en"] .launch-copy h1,
html[lang="ja"] .launch-copy h1 { font-family: inherit; letter-spacing: -.03em; }
.launch-copy .eyebrow { font-size: 12px; letter-spacing: .06em; }
.launch-actions .primary { background: #204c38; border-color: #204c38; }
.launch-proof { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); font-size: 12px; gap: 8px; }
.launch-proof i { display: none; }
.launch-proof span { white-space: normal; line-height: 1.5; }
.launch-proof b { font-size: 11px; }
.launch-copy > .weather-coverage { margin-top: 9px; font-size: 13px; color: #3f6851; line-height: 1.6; }
.completed-example { padding: 0; overflow: hidden; }
.completed-example figcaption { padding: 13px 17px; background: #edf5ef; letter-spacing: 0; font-size: 11px; }
.completed-example figcaption strong { font-size: 13px; color: #244d3b; }
.completed-example-image { display: block; width: 100%; height: auto; }
.example-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 0; padding: 16px; background: #fff; }
.example-facts > div { min-width: 0; }
.example-facts dt { color: var(--muted); font-size: 12px; }
.example-facts dd { margin: 5px 0 0; font-size: 20px; font-weight: 750; color: #244d3b; overflow-wrap: anywhere; }
.example-image-button { display: block; width: 100%; padding: 0; border: 0; background: white; text-align: center; }
.example-image-button > span { display: block; padding: 8px; font-size: 12px; font-weight: 700; color: #244d3b; background: #edf5ef; }
.example-image-button:focus-visible { outline: 3px solid #327458; outline-offset: -3px; }
.example-note { margin: 0; padding: 11px 17px; color: #63766a; font-size: 11px; line-height: 1.6; }
.completed-example-dialog { width: min(880px,calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 24px; color: var(--ink); border: 1px solid var(--line); border-radius: 18px; background: white; }
.completed-example-dialog::backdrop { background: rgba(12,35,25,.5); }
.example-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.example-dialog-head h2 { margin: 5px 0 12px; font-size: 25px; }
.completed-example-dialog > p { color: var(--muted); font-size: 14px; line-height: 1.65; }
.example-zoom-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.example-zoom-controls .button { flex: none; min-height: 40px; }
.example-image-viewport { max-height: min(52dvh,490px); overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.example-image-viewport.is-zoomed .completed-example-image { width: 1600px; max-width: none; }
.example-image-viewport:focus-visible { outline: 3px solid #327458; outline-offset: 2px; }
.example-dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 12px; }
.example-dialog-actions a { display: inline-flex; align-items: center; text-decoration: none; }
.mission-launch .beta-notice { margin: 18px 0; border: 1px solid var(--line); border-radius: 10px; }
@media (max-width: 900px) {
  .launch-hero { grid-template-columns: 1fr; padding: 24px; gap: 22px; }
  .completed-example { width: min(620px,100%); }
}
@media (max-width: 520px) {
  .topbar { grid-template-columns: minmax(0,1fr) auto; gap: 8px; padding: 12px; min-height: 0; }
  .brand { gap: 8px; }
  .brand strong { font-size: 13px; }
  .brand small { font-size: 9px; }
  .brand-mark { width: 32px; height: 32px; }
  .topbar-promises { grid-column: 1 / -1; grid-row: 2; font-size: 10px; }
  .locale-control > span { display: none; }
  .locale-control select { min-width: 90px; max-width: 95px; padding: 6px 20px; }
  .launch-hero { padding: 18px 13px 10px; gap: 15px; }
  .launch-copy h1 { margin: 10px 0; font-size: 29px; line-height: 1.22; }
  .launch-copy > p { font-size: 13px; }
  .launch-copy > .weather-coverage { font-size: 12px; }
  .launch-copy .eyebrow { font-size: 10px; }
  .launch-actions { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
  .launch-actions .button { padding-inline: 8px; font-size: 11px; min-height: 39px; }
  .launch-proof { font-size: 11px; margin-top: 12px; gap: 6px; }
  .launch-proof b { font-size: 9px; }
  .launch-proof i { width: 10px; }
  .completed-example figcaption { align-items: flex-start; gap: 6px; padding: 10px; }
  .completed-example figcaption strong { font-size: 11px; }
  .completed-example figcaption > span { font-size: 9px; }
  .example-facts { gap: 8px; padding: 12px 10px; }
  .example-facts dt { font-size: 11px; }
  .example-facts dd { font-size: 16px; }
  .example-note { padding: 9px 10px; font-size: 12px; }
  .completed-example-dialog { padding: 15px; }
  .example-zoom-controls { align-items: flex-start; font-size: 12px; }
  .example-dialog-actions { display: grid; grid-template-columns: 1fr; }
}

.launch-copy h1 > span { color: #327458; }
.beta-feedback-fab { position: static; display: block; width: max-content; margin: 0 20px 20px auto; font-size: 12px; box-shadow: none; }
.topbar-support { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 0; }
.feedback-entry { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; max-width: 100%; padding: 10px 14px; color: var(--green); background: var(--green-soft); border: 1px solid var(--line); border-radius: 999px; font: inherit; font-size: 14px; font-weight: 750; line-height: 1.5; text-align: center; }
.feedback-entry:hover { background: var(--surface); }
.beta-feedback-fab.feedback-entry { color: var(--green); background: var(--green-soft); font-size: 14px; font-weight: 750; }
.feedback-result { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--raised); }
.feedback-result p { flex: 1 1 180px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
@media (max-width: 520px) {
  .topbar-support { grid-column: 1 / -1; grid-row: 2; align-items: stretch; gap: 10px; }
  .topbar-support .topbar-promises { justify-content: flex-start; }
  .feedback-result .feedback-entry { width: 100%; }
}


/* Keep source, date and terrain limits readable in every preview width. */
.brief-canvas { aspect-ratio: auto; grid-template-rows: none; overflow: visible; gap: 14px; }
.brief-canvas.ratio-4-5, .brief-canvas.ratio-9-16 { aspect-ratio: auto; }
.brief-visual { align-items: start; }
.route-card > span, .brief-terrain > span { display: block; font-size: 12px; font-weight: 800; }
.route-card > small, .brief-terrain small { display: block; font-size: 12px; line-height: 1.65; }
.brief-terrain { margin-top: 12px; padding-top: 12px; border-top: 1px solid #c9d5df; }
.brief-terrain[hidden] { display: none; }
.brief-terrain svg { height: 145px; }
.segment-control, .waypoint-control { display: grid; grid-template-columns: minmax(0,1fr) minmax(140px,180px); gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.segment-control select, .waypoint-control select { width: 100%; min-height: 38px; }
.waypoint-list { max-height: 360px; overflow: auto; }
.transition-controls, .waypoint-add { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; padding-block: 14px; }
.transition-controls .field, .waypoint-add .field { flex: 1 1 160px; min-width: 0; }
.append-gpx { display: flex; gap: 8px; align-items: center; margin-block: 12px; font-size: 13px; }
.brief-route-details { margin-top: 18px; font-size: 13px; line-height: 1.7; }
.brief-route-details p { margin: 8px 0; overflow-wrap: anywhere; }
.global-weather-attribution { font-size: 12px; line-height: 1.7; }
@media(max-width:520px) { .segment-control, .waypoint-control { grid-template-columns: minmax(0,1fr) 130px; gap: 8px; } }
.fact-stack span { font-size: 11px; }
.fact-stack p { margin: 5px 0; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.fact-stack a { display: inline-block; margin-top: 7px; font-size: 12px; color: var(--blue); }
.brief-weather { grid-template-columns: auto minmax(0,1fr); align-items: start; padding: 14px; }
.brief-weather.is-limited { background: #fff2dc; border: 1px solid #e5cca2; }
.brief-weather small { font-size: 11px; }
.brief-weather strong { font-size: 16px; line-height: 1.5; }
.brief-weather p { margin: 6px 0 0; font-size: 12px; line-height: 1.7; }
.brief-weather p span, .brief-weather em span { display: block; }
.brief-weather em { grid-column: 2; font-size: 12px; line-height: 1.7; text-align: left; overflow-wrap: anywhere; }
.brief-canvas footer { font-size: 12px; line-height: 1.65; flex-wrap: wrap; }
.route-entry-help { margin-top: 14px; padding: 14px; background: var(--blue-soft); border-radius: 12px; }
.route-entry-help strong { font-size: 14px; }
.route-entry-help p, .route-reference-options p { font-size: 12px; line-height: 1.7; }
.example-catalog { margin: 26px 0; }
.example-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.example-cards article { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; display: flex; flex-direction: column; }
.example-thumbnail { width: 100%; padding: 0; border: 0; background: #edf3f7; border-radius: 10px; }
.example-thumbnail img { display: block; width: 100%; height: 210px; object-fit: contain; }
.example-thumbnail:focus-visible { outline: 3px solid var(--green); }
.example-cards h3 { margin: 12px 0 6px; font-size: 16px; }
.example-cards p { font-size: 12px; line-height: 1.7; flex: 1; }
.example-cards .button { width: 100%; }
@media (max-width: 700px) {
  .example-cards { grid-template-columns: 1fr; }
  .example-thumbnail img { height: 240px; }
  .brief-visual { grid-template-columns: 1fr; }
  .brief-weather p, .brief-weather em, .fact-stack p, .route-card > small, .brief-terrain small { font-size: 13px; }
  .brief-weather { grid-template-columns: 24px minmax(0,1fr); }
}

/* Field notebook: paper, contour lines and a restrained outdoor palette. */
:root {
  --bg: #f6f3eb;
  --surface: #eeeee3;
  --raised: #fffdf8;
  --ink: #263d34;
  --muted: #686e61;
  --line: #dad8ca;
  --blue: #356875;
  --blue-soft: #e7efec;
  --green: #456b4d;
  --green-soft: #eaf0e5;
  --gold: #976436;
  --gold-soft: #f7ecd9;
  --teal: #3d655b;
  --teal-soft: #e5eee6;
}
body {
  background-color: var(--bg);
  background-image: radial-gradient(ellipse at 5% 0%,rgba(174,183,151,.2),transparent 48%), repeating-linear-gradient(90deg,transparent 0 3px,rgba(99,90,64,.014) 3px 4px);
}
.app-shell { border-radius: 12px; border-color: #d2d0c1; box-shadow: 0 12px 50px rgba(41,55,38,.045); }
.topbar { background: rgba(255,253,248,.95); }
.brand-mark { background: #2c4c3c; border-radius: 5px; box-shadow: inset 0 0 0 4px rgba(255,255,255,.13); }
.brand strong { letter-spacing: .015em; }
.button.primary, .launch-actions .primary { background: #2c4c3c; border-color: #2c4c3c; }
.button.primary:hover { background: #3f624c; border-color: #3f624c; }
.button.secondary { background: #fffdf7; border-color: #c9cabb; }
.button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.launch-hero {
  isolation: isolate;
  background: linear-gradient(115deg,#fffdf8 25%,#eff0e4 100%);
  border-color: #d4d6c5;
  border-radius: 10px;
}
.launch-hero::before { inset: 24px auto 24px 15px; width: 1px; background: #d4d6c5; }
.launch-hero::after {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(90deg,rgba(255,253,248,.88) 0%,rgba(255,253,248,.8) 37%,rgba(255,253,248,.16) 100%),url('assets/field-notebook-landscape.webp') center / cover no-repeat;
  opacity: .72;
  pointer-events: none;
}
.launch-copy h1 {
  font-family: 'Noto Serif TC','Songti TC','STSong',Georgia,serif;
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.28;
}
html[lang="en"] .launch-copy h1 { font-family: Georgia,'Times New Roman',serif; }
html[lang="ja"] .launch-copy h1 { font-family: 'Yu Mincho','Hiragino Mincho ProN',serif; }
.launch-copy h1 > span { color: #456b4d; }
.launch-copy .eyebrow { color: #667751; font-weight: 750; letter-spacing: .12em; }
.launch-copy > p { line-height: 1.8; }
.launch-actions .button { border-radius: 5px; }
.launch-proof { border-top: 1px solid #d7dbc8; padding-top: 16px; }
.launch-proof b { font-family: Georgia,serif; color: #947049; }
.completed-example {
  padding: 7px;
  border: 1px solid #c8ceba;
  border-radius: 5px;
  background: #fffdf6;
  box-shadow: 0 4px 0 -1px #e7e7d8,0 6px 0 -2px #cbd1bd,0 18px 32px rgba(41,55,38,.09);
}
.completed-example figcaption { padding: 11px 12px; background: #e9efdf; border-bottom: 1px solid #d2dcc5; }
.completed-example figcaption > span { padding: 4px 6px; color: #596c46; border: 1px solid #c3ccb5; border-radius: 3px; font-size: 10px; }
.example-facts { background: #fffdf6; }
.example-facts dd { font-family: Georgia,'Noto Serif TC','Songti TC',serif; font-weight: 650; }
.example-image-button { background: #f5f6ef; }
.example-image-button > span { background: #edf0e6; color: #426145; }
.example-note { background: #fffdf6; }
.example-catalog { border-top: 1px solid var(--line); padding-top: 20px; }
.example-catalog h2, .builder-heading h2, .brief-canvas h2 { font-family: 'Noto Serif TC','Songti TC',Georgia,serif; font-weight: 600; }
.example-cards article { padding: 13px; border-radius: 5px; border-top: 3px solid #7c9680; background: #fffdf7; box-shadow: 0 6px 16px rgba(41,55,38,.035); }
.example-cards article:nth-child(2) { border-top-color: #618493; }
.example-cards article:nth-child(3) { border-top-color: #b28b5c; }
.example-thumbnail { border-radius: 3px; background: #f0f2e9; }
.example-cards h3 { font-family: 'Noto Serif TC','Songti TC',Georgia,serif; font-weight: 650; }
.example-cards .button { border-radius: 5px; }
.mission-builder { border-radius: 7px; background: #eeeee4; }
.journey { background: #eeeee4; }
.progress-card, .panel, .canvas-wrap { border-radius: 8px; }
.field input, .field select, .field textarea { border-radius: 6px; background: #fffdf8; }
.brief-canvas { background: radial-gradient(ellipse at 100% 0%,rgba(170,180,133,.16),transparent 40%),#fffdf7; border-radius: 7px; border-color: #d0d5c0; box-shadow: 0 8px 24px rgba(41,55,38,.045); }
.route-card { background: #eaf0e4; border-radius: 5px; }
.fact-stack > div { border-radius: 5px; background: #f8faf4; }
.brief-terrain { border-top-color: #cdd6c5; }
@media (max-width: 520px) {
  .launch-hero::after { display: none; }
  .launch-hero::before { display: none; }
  .launch-copy h1 { font-size: 29px; }
  .launch-proof { padding-top: 10px; }
  .completed-example { padding: 4px; box-shadow: 0 3px 0 -1px #e7e7d8,0 8px 15px rgba(41,55,38,.06); }
}
.app-shell[data-step="1"] .status-banner:empty { min-height: 0; }
@media (max-width: 520px) {
  .example-facts > div:first-child dd { font-family: inherit; font-size: 14px; line-height: 1.5; overflow-wrap: normal; }
}
@media (max-width: 520px) {
  .example-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .example-facts > div:first-child { grid-column: 1 / -1; }
}
/* Rider preparation: clear numbers, readable sources, and controls for touch. */
#typeGrid { grid-template-columns: 1fr; }
#typeGrid > [data-type="change"], #typeGrid > [data-type="network"] { display: none; }
.other-purposes { grid-column: 1 / -1; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.other-purposes summary { cursor: pointer; font-size: 14px; }
.other-purposes .type-grid { grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 14px; }
.ride-goals { margin: 0; border: 0; padding: 8px 0; display: flex; flex-wrap: wrap; gap: 10px 20px; }
.ride-goals legend { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.ride-goals label { min-height: 44px; display: flex; align-items: center; gap: 8px; }
.ride-goals input, .ride-check-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: #355a42; }
.ride-settings { margin: 20px 0; padding: 16px; background: #f4f6eb; border-radius: 6px; }
.ride-settings h2 { font-size: 19px; margin-top: 0; }
.ride-settings p { font-size: 13px; line-height: 1.7; }
.ride-overview { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 18px 0; }
.ride-overview > div { min-width: 0; padding: 14px; border: 1px solid #d6decc; background: #f1f5e9; border-radius: 5px; }
.ride-overview span { display: block; font-size: 12px; color: #53644e; }
.ride-overview strong { display: block; margin-top: 6px; font-size: 19px; overflow-wrap: anywhere; }
.ride-overview > p { grid-column: 1/-1; margin: 0; font-size: 13px; }
.ride-hourly, .ride-checklist { margin: 20px 0; padding-top: 16px; border-top: 1px solid #d6decc; }
.ride-hourly h3, .ride-checklist h3 { font-size: 18px; }
#rideWeatherWindow p { font-size: 13px; line-height: 1.7; margin: 8px 0; overflow-wrap: anywhere; }
.ride-checklist > p { font-size: 13px; line-height: 1.7; }
.ride-check-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.4fr); gap: 8px 20px; padding: 14px 0; border-bottom: 1px solid #e0e4d8; }
.ride-check-row > label:first-child { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; }
.ride-check-row > small { grid-column: 1/-1; font-size: 12px; color: #6f6d56; }
.ride-check-row input[type="text"], .ride-check-row input:not([type]) { min-width: 0; }
.ride-checklist details { margin-top: 15px; font-size: 13px; }
.ride-checklist .waypoint-add { margin: 16px 0; }
#briefElevationChart text, #elevationAxes text { font-size: 20px; }
@media(max-width: 620px) {
  .ride-overview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ride-check-row { grid-template-columns: 1fr; }
  .other-purposes .type-grid { grid-template-columns: 1fr; }
  .brief-toolbar > div { grid-template-columns: 1fr; }
  .ride-overview strong { font-size: 18px; }
}

.launch-hero { align-items: start; }
.waypoint-control { display: grid; gap: 10px; }
.waypoint-control input[type=checkbox] { width: 20px; height: 20px; }

.download-ready { display: block; padding: 12px; margin-bottom: 14px; color: #244d3b; background: #edf5ef; overflow-wrap: anywhere; }

/* Public race notes: official event facts are distinct from the editable trip. */
.race-catalog { margin-top: 28px; }
.race-catalog .race-card-date { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; color: #496250; }
.race-card-date span { font-size: 12px; }
.race-card-date time { font-size: 23px; font-weight: 650; font-variant-numeric: tabular-nums; }
.race-catalog .example-thumbnail { overflow: hidden; }
.race-catalog .example-thumbnail img { object-fit: cover; object-position: top; }
.race-brief { padding: 20px; border: 1px solid #cbd5bc; border-radius: 8px; background: #f1f5eb; }
.race-brief h3 { margin: 8px 0; font-size: clamp(21px,2.5vw,29px); line-height: 1.5; font-family: 'Noto Serif TC',Georgia,serif; }
.race-brief h4 { margin: 18px 0 6px; font-size: 15px; }
.race-brief p, .race-brief li { font-size: 14px; line-height: 1.8; }
.race-brief dl { display: grid; grid-template-columns: minmax(90px,.28fr) minmax(0,1fr); gap: 0 14px; }
.race-brief dt, .race-brief dd { margin: 0; padding: 10px 0; border-bottom: 1px solid #d7dfcd; font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.race-brief dt { color: #526650; }
.race-brief dd { font-weight: 600; }
.race-brief ul { padding-inline-start: 22px; }
.race-sources, .race-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.race-sources a { font-size: 14px; }
.race-actions .button { white-space: normal; }
@media(max-width:600px) { .race-brief { padding: 14px; } .race-brief dl { grid-template-columns: 1fr; } .race-brief dt { padding-bottom: 0; border-bottom: 0; font-size: 12px; } .race-brief dd { padding-top: 3px; } .race-actions .button { flex: 1 1 180px; } }

/* Keep the first action close, and make outdoor reading and touch comfortable. */
html { scroll-padding-bottom: 120px; }
.browse-examples { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; color: var(--blue); font-size: 14px; text-underline-offset: 4px; }
.launch-hero .example-image-button img { height: clamp(210px,28vw,320px); object-fit: cover; object-position: top; }
.mission-builder { margin-top: 24px; scroll-margin-top: 20px; }
.mission-builder .stage-actions { margin-top: 22px; }
.app-shell[data-step="1"] #backButton { display: none; }
.app-shell[data-step="1"] .stage-actions { grid-template-columns: minmax(0,1fr) auto; }
.app-shell[data-step="1"] #validationMessage { grid-column: 1; grid-row: auto; }
.field > span { font-size: 14px; }
.field b { font-size: 12px; }
.field input, .field select, .field textarea { font-size: 16px; }
.field > .field-error { margin-top: 8px; color: var(--red); font-size: 14px; line-height: 1.6; }
[aria-invalid="true"] { border-color: var(--red) !important; }
.button, .map-mode-button, .dialog-close, .sample-link, .locale-control select { min-height: 44px; }
:is(.sketch-controls,.map-load-status,.example-zoom-controls) .button { min-height: 44px; }
.button { font-size: 14px; line-height: 1.5; }
.dialog-close { min-width: 44px; }
.place-result { min-height: 60px; }
.place-result span { font-size: 14px; line-height: 1.5; }
.place-result small, .place-result-note, .quick-route > small, .quick-route-status,
.sketch-controls label, .connection-state, .elevation-source, .weather-source,
.weather-action label, .weather-slot-empty, .weather-slot b,
.weather-summary span, .weather-summary small, .weather-region header > span { font-size: 12px; line-height: 1.7; }
.quick-route-head p, .weather-head p, .weather-day span, .weather-day small,
.weather-alert, .weather-slot, .weather-batch-meta { font-size: 14px; line-height: 1.7; }
.weather-day strong { font-size: 15px; }
.weather-action select, .sketch-controls select { min-height: 44px; font-size: 14px; }
.weather-slot button { width: 44px; height: 44px; flex: none; font-size: 20px; }
.weather-slot { max-width: 100%; flex-wrap: wrap; }
.clear-session-dialog { width: min(480px,calc(100% - 32px)); padding: 24px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--raised); }
.clear-session-dialog::backdrop { background: rgba(22,36,27,.5); }
.clear-session-dialog h2 { margin-top: 0; font-size: 22px; line-height: 1.5; }
.clear-session-dialog p { font-size: 15px; line-height: 1.8; }
.clear-session-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.button.danger { color: var(--red); border-color: var(--red); background: var(--red-soft); }
:is(a,summary):focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
@media(max-width:700px) {
  .app-shell[data-step="2"] .main-stage, .app-shell[data-step="3"] .main-stage { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
  .app-shell:is([data-step="2"],[data-step="3"]) .stage-actions { position: fixed; z-index: 25; inset: auto 0 0; margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); box-shadow: 0 -5px 20px rgba(35,47,38,.09); }
  .stage-actions #validationMessage:empty { display: none; }
  .launch-actions .button { min-height: 46px; font-size: 13px; }
  .brief-toolbar > div { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .brief-toolbar .button { min-height: 52px; padding-inline: 8px; }
  .screen-heading h1 { line-height: 1.4; }
  .example-cards p, .builder-heading p { font-size: 14px; line-height: 1.8; }
  .clear-session-actions .button { flex: 1; }
}
