:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-soft: #f0f1ed;
  --ink: #171817;
  --muted: #666b67;
  --line: #e4e6e1;
  --accent: #087f5b;
  --accent-dark: #056347;
  --accent-soft: #e6f4ee;
  --warm: #f5eee2;
  --night: #e9e8f5;
  --sea: #e4f1f4;
  --danger: #b42318;
  --shadow: 0 14px 40px rgba(28, 35, 31, .10);
  --radius-sm: 14px;
  --radius: 20px;
  --radius-lg: 28px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.app-shell { width: 100%; min-height: 100vh; padding-bottom: calc(100px + var(--safe-bottom)); }
.app-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; height: calc(70px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px)); background: rgba(247, 247, 245, .88); border-bottom: 1px solid rgba(228, 230, 225, .78); backdrop-filter: blur(18px) saturate(140%); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--ink); color: white; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.brand strong, .brand small { display: block; line-height: 1.05; }
.brand strong { font-size: 15px; letter-spacing: -.02em; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.plan-pill { display: flex; align-items: center; gap: 8px; padding: 8px 9px 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 650; cursor: pointer; box-shadow: 0 2px 8px rgba(20, 30, 25, .04); }
.plan-pill b { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: white; font-size: 12px; }

.view { display: none; width: min(100%, 920px); margin: 0 auto; animation: view-in .22s ease; }
.view.active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } }

.hero { padding: 48px 20px 24px; }
.kicker, .eyebrow { margin: 0 0 9px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .13em; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 680px; margin-bottom: 14px; font-size: clamp(38px, 8vw, 64px); line-height: .98; letter-spacing: -.055em; }
h2 { margin-bottom: 0; font-size: 23px; line-height: 1.12; letter-spacing: -.035em; }
.hero-copy { max-width: 580px; margin-bottom: 24px; color: var(--muted); font-size: 16px; line-height: 1.55; }
.prompt-search { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 680px; min-height: 60px; padding: 10px 12px 10px 18px; border: 1px solid #d9dcd7; border-radius: 18px; background: var(--surface); color: #777c78; text-align: left; cursor: pointer; box-shadow: 0 8px 26px rgba(27, 39, 33, .07); }
.prompt-search > span:nth-child(2) { flex: 1; font-size: 15px; }
.prompt-arrow { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--ink); color: white; font-size: 18px; }
.search-icon { position: relative; width: 17px; height: 17px; border: 2px solid currentColor; border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; right: -5px; bottom: -3px; width: 7px; height: 2px; background: currentColor; transform: rotate(45deg); border-radius: 2px; }

.section-block { padding: 26px 20px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-heading.compact { margin-bottom: 13px; }
.section-heading .eyebrow { margin-bottom: 6px; }
.text-button { min-height: 44px; padding: 6px 0; border: 0; background: transparent; color: var(--accent-dark); font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 20px 4px; margin: 0 -20px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar, .card-rail::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; min-height: 44px; flex: 0 0 auto; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: #535854; font-size: 13px; font-weight: 650; cursor: pointer; }
.chip.active { border-color: var(--ink); background: var(--ink); color: white; }
.chip b { margin-left: 7px; padding: 1px 7px; border-radius: 999px; background: rgba(23, 24, 23, .08); font-size: 11px; font-weight: 750; }
.chip.active b { background: rgba(255, 255, 255, .18); }
.chip-row.subtle .chip { background: transparent; }
.chip-row.subtle .chip.active { background: var(--accent-soft); border-color: #acd6c5; color: var(--accent-dark); }
.gps-button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin-top: 12px; border: 1px solid #acd6c5; border-radius: 14px; background: var(--accent-soft); color: var(--accent-dark); font-size: 14px; font-weight: 750; cursor: pointer; }
.gps-button:active { transform: scale(.985); }
.status-bar { position: sticky; top: calc(70px + env(safe-area-inset-top, 0px)); z-index: 29; display: flex; align-items: center; gap: 7px; padding: 5px max(20px, env(safe-area-inset-right, 0px)) 5px max(20px, env(safe-area-inset-left, 0px)); background: var(--accent-soft); border-bottom: 1px solid #d3e9df; font-size: 11.5px; font-weight: 650; color: var(--accent-dark); }
.status-place { max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-sep { opacity: .5; }
.status-time { white-space: nowrap; }
.status-weather { white-space: nowrap; }
.status-share { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; margin-left: auto; border: 1px solid #acd6c5; border-radius: 50%; background: var(--surface); color: var(--accent-dark); font-size: 13px; font-weight: 800; cursor: pointer; }
.status-share:active { transform: scale(.92); }
.phrase-audio { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; margin: 10px 0 4px; padding: 0 16px; border: 1px solid #acd6c5; border-radius: 14px; background: var(--accent-soft); color: var(--accent-dark); font-size: 14px; font-weight: 750; cursor: pointer; }
.phrase-audio:active { transform: scale(.985); }
.phrase-card { margin: 12px 0 4px; padding: 16px; border: 1px solid #d3e9df; border-radius: 18px; background: var(--accent-soft); }
.phrase-thai { font-size: 26px; font-weight: 700; line-height: 1.5; color: var(--accent-dark); }
.phrase-line { display: flex; gap: 8px; margin-top: 7px; font-size: 14.5px; line-height: 1.45; }
.phrase-label { flex: 0 0 84px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding-top: 2px; }
.nearby-note { margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.card-distance { position: absolute; top: 11px; left: 11px; z-index: 2; padding: 6px 10px; border-radius: 999px; background: rgba(23, 24, 23, .82); color: white; font-size: 11px; font-weight: 750; backdrop-filter: blur(6px); }
.guide-paths { padding-top: 4px; }
.path-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.path-card { display: grid; grid-template-columns: 44px minmax(0,1fr) 20px; align-items: center; gap: 11px; min-height: 84px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: left; cursor: pointer; box-shadow: 0 7px 22px rgba(28,35,31,.06); }
.path-card > span:nth-child(2) { min-width: 0; }
.path-card strong, .path-card small { display: block; }
.path-card strong { font-size: 15px; line-height: 1.2; }
.path-card small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.path-card b { color: var(--muted); font-size: 18px; }
.path-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--surface-soft); font-size: 20px; }
.path-places .path-icon { background: var(--sea); }
.path-knowledge .path-icon { background: var(--warm); }
.path-language .path-icon { background: var(--night); }
.path-card:active { transform: scale(.985); }

.region-landing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 20px 0; }
.region-landing-card { display: grid; grid-template-columns: 38px minmax(0,1fr) 16px; align-items: center; gap: 9px; min-height: 68px; padding: 11px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-align: left; cursor: pointer; }
.region-landing-card.active { border-color: var(--accent); background: var(--accent-soft); }
.region-landing-card strong, .region-landing-card small { display: block; }
.region-landing-card strong { font-size: 13px; line-height: 1.2; }
.region-landing-card small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.region-landing-card em { display: block; margin-top: 3px; overflow: hidden; color: var(--accent-dark); font-size: 9.5px; font-style: normal; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.region-landing-card > b { color: var(--muted); font-size: 15px; }
.region-landing-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--surface-soft); font-size: 18px; }
.region-focus { position: relative; display: grid; grid-template-columns: 42px 1fr; gap: 12px; margin: 0 0 18px; padding: 16px; border-radius: 18px; background: var(--accent-soft); }
.region-focus > span { font-size: 26px; }
.region-focus h2, .region-focus p { margin: 0; }
.region-focus p:last-child { margin-top: 5px; color: #426457; font-size: 12px; line-height: 1.45; }
.region-focus-close { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.75); font-size: 20px; }
.region-landing { padding: 20px 0 40px; }
.region-landing-hero { position: relative; margin: 0 20px 18px; padding: 20px 20px 18px; border-radius: 22px; background: var(--accent-soft); border: 1px solid #d3e9df; }
.region-back { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; margin-bottom: 12px; padding: 8px 15px; border: 1px solid #acd6c5; border-radius: 999px; background: var(--surface); color: var(--accent-dark); font-size: 13px; font-weight: 750; cursor: pointer; }
.region-back:active { transform: scale(.96); }
.region-landing-big-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--surface); font-size: 26px; }
.region-landing-hero h1 { margin: 10px 0 0; font-size: 30px; letter-spacing: -.04em; }
.region-tagline { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: #24352d; }
.region-quick-facts { margin-top: 14px; }
.region-quick-facts .region-fact.identity { margin-bottom: 8px; }
.region-quick-facts .region-fact.identity p { margin: 0; font-size: 13.5px; line-height: 1.5; }
.region-quick-facts .region-fact span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.region-fact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.region-fact { padding: 10px 12px; border: 1px solid #d3e9df; border-radius: 14px; background: var(--surface); }
.region-fact strong, .region-fact small { display: block; }
.region-fact strong { font-size: 13.5px; line-height: 1.3; }
.region-fact small { margin-top: 3px; color: var(--muted); font-size: 10.5px; line-height: 1.35; }
.region-landing-body { padding-top: 4px; }
.page-padded { margin: 0 20px; }
.compact-head { padding: 18px 20px 14px; }
#places-global { padding-top: 6px; }
.knowledge-nav { margin: -8px 0 16px; }
/* chip-rows in unpadded containers must not bleed past the viewport */
.knowledge-nav .chip-row, .region-landing-body .chip-row { margin-left: 0; margin-right: 0; padding-left: 20px; padding-right: 20px; }
.knowledge-section { padding-top: 0; }
.help-section { margin-top: 10px; }
.knowledge-row-list { display: grid; gap: 8px; margin: 0 20px; padding: 0; list-style: none; }
.knowledge-row { display: grid; grid-template-columns: minmax(0,1fr); align-items: stretch; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; box-shadow: 0 3px 12px rgba(28,35,31,.04); }
.knowledge-row-open { display: grid; gap: 3px; align-content: center; min-height: 56px; padding: 11px 14px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.knowledge-row-open strong, .knowledge-row-open small { grid-column: 1; }
.knowledge-chevron { grid-column: 2; grid-row: 1 / span 2; }
.knowledge-row-open strong { font-size: 14.5px; line-height: 1.25; }
.knowledge-row-open small { overflow: hidden; color: var(--muted); font-size: 11.5px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-row-plus { width: 44px; border: 0; border-left: 1px solid var(--line); background: var(--surface-soft); color: var(--accent-dark); font-size: 19px; font-weight: 700; cursor: pointer; }
.knowledge-row-plus.saved { background: var(--accent); color: white; }
.knowledge-count { margin: 12px 20px 0; color: var(--muted); font-size: 11.5px; }

.language-grid { display: grid; gap: 10px; padding: 0 20px 40px; }
.language-card { display: grid; grid-template-columns: 1fr 48px; min-height: 94px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; box-shadow: 0 5px 18px rgba(28,35,31,.05); }
.language-open { display: grid; grid-template-columns: minmax(112px,.7fr) 1fr; grid-template-rows: auto auto; align-items: center; gap: 2px 12px; padding: 13px 14px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.language-thai { grid-row: 1 / 3; color: var(--accent-dark); font-size: 22px; font-weight: 700; line-height: 1.4; }
.language-open strong { align-self: end; font-size: 14px; }
.language-open small { align-self: start; color: var(--muted); font-size: 12px; }
.language-play { border: 0; border-left: 1px solid #d3e9df; background: var(--accent-soft); color: var(--accent-dark); font-size: 18px; cursor: pointer; }
.knowledge-section { padding-left: 0; padding-right: 0; }
.knowledge-section .section-heading { padding-left: 20px; padding-right: 20px; }


.intent-grid { display: grid; gap: 10px; }
.intent-card { display: grid; grid-template-columns: 43px 1fr 22px; align-items: center; gap: 12px; width: 100%; min-height: 78px; padding: 14px; border: 0; border-radius: var(--radius); text-align: left; cursor: pointer; }
.intent-card > span:nth-child(2) strong, .intent-card > span:nth-child(2) small { display: block; }
.intent-card strong { margin-bottom: 5px; font-size: 16px; letter-spacing: -.015em; }
.intent-card small { color: #5e625f; font-size: 12px; }
.intent-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 14px; background: rgba(255,255,255,.7); font-size: 22px; }
.intent-sun { background: var(--warm); }
.intent-sea { background: var(--sea); }
.intent-night { background: var(--night); }

.card-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(268px, 82vw); gap: 14px; overflow-x: auto; padding: 4px 20px 20px; margin: 0 -20px -18px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.guide-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; box-shadow: 0 3px 14px rgba(30, 37, 33, .045); scroll-snap-align: start; transition: transform .18s ease, box-shadow .18s ease; }
.guide-card:active { transform: scale(.985); }
.card-image { position: relative; aspect-ratio: 1.48; overflow: hidden; background: #dfe4df; }
.card-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.guide-card:hover .card-image img { transform: scale(1.025); }
.card-gradient { position: absolute; inset: auto 0 0; height: 50%; background: linear-gradient(transparent, rgba(8, 15, 11, .38)); }
.card-category { position: absolute; left: 12px; bottom: 11px; padding: 6px 9px; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--ink); font-size: 10px; font-weight: 800; letter-spacing: .06em; backdrop-filter: blur(8px); }
.add-button { position: absolute; top: 11px; right: 11px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 14px; background: rgba(255,255,255,.94); color: var(--ink); font-size: 23px; line-height: 1; cursor: pointer; box-shadow: 0 3px 12px rgba(0,0,0,.12); }
.add-button.saved { background: var(--accent); color: white; }
.card-body { padding: 15px 15px 16px; }
.card-location { display: flex; gap: 6px; align-items: center; margin-bottom: 7px; color: var(--accent-dark); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.card-open { display: block; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.card-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.card-title { display: block; font-size: 18px; font-weight: 720; line-height: 1.16; letter-spacing: -.025em; }
.card-summary { display: -webkit-box; overflow: hidden; margin-top: 8px; margin-bottom: 12px; color: var(--muted); font-size: 13px; line-height: 1.46; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-footer { display: flex; gap: 7px; color: #777c78; font-size: 11px; }
.card-footer span { padding: 5px 8px; border-radius: 7px; background: var(--surface-soft); }

.utility-card { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 28px 20px 6px; padding: 22px; border-radius: var(--radius-lg); background: var(--ink); color: white; }
.utility-card .eyebrow { color: #72c3a6; }
.utility-card h2 { margin-bottom: 8px; }
.utility-card p:not(.eyebrow) { max-width: 520px; margin-bottom: 0; color: #b9bfbb; font-size: 13px; line-height: 1.45; }
.secondary-button { flex: 0 0 auto; min-height: 42px; padding: 0 15px; border: 1px solid #4d504e; border-radius: 12px; background: #2c2e2d; color: white; font-weight: 700; font-size: 12px; cursor: pointer; }

.page-head { padding: 42px 20px 24px; }
.page-head h1 { font-size: clamp(38px, 8vw, 58px); }
.page-head > p:last-child { max-width: 600px; color: var(--muted); line-height: 1.5; }
.search-field { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 720px; min-height: 56px; margin-top: 24px; padding: 0 15px 0 18px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 6px 22px rgba(30, 37, 33, .05); }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; }
.search-field button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--surface-soft); cursor: pointer; }
.filter-panel { position: sticky; top: calc(70px + env(safe-area-inset-top, 0px) + var(--status-h, 0px)); z-index: 20; padding: 12px 20px 10px; background: rgba(247,247,245,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.filter-panel .chip-row { margin-bottom: 5px; }
.result-meta { display: flex; justify-content: space-between; align-items: center; padding: 21px 20px 12px; }
.result-meta strong { font-size: 13px; }
.card-grid { display: grid; gap: 14px; padding: 0 20px 30px; }
.empty-state { padding: 80px 30px; text-align: center; color: var(--muted); }
.empty-state span { display: block; margin-bottom: 12px; font-size: 38px; }
.empty-state h2 { margin-bottom: 8px; color: var(--ink); }

.planner-head { padding-bottom: 12px; }
.planner-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 20px 20px; padding: 14px 16px; border: 1px solid #c6dfd4; border-radius: 16px; background: var(--accent-soft); color: var(--accent-dark); }
.planner-summary strong { font-size: 14px; }
.planner-summary button { border: 0; background: transparent; color: var(--danger); font-size: 12px; font-weight: 700; cursor: pointer; }
.plan-section { padding: 8px 20px 20px; }
.plan-section-title { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.plan-section-title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.plan-item { display: grid; grid-template-columns: 76px 1fr 36px; gap: 12px; align-items: center; margin-bottom: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); cursor: pointer; }
.plan-item img { width: 76px; height: 76px; object-fit: cover; border-radius: 11px; }
.plan-item strong, .plan-item small { display: block; }
.plan-item strong { margin-bottom: 5px; font-size: 14px; line-height: 1.2; }
.plan-item small { color: var(--muted); font-size: 11px; }
.plan-item .plan-open { display: block; width: 100%; height: auto; padding: 3px 0; border: 0; border-radius: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.plan-item .plan-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 5px; }
.planner-empty { margin: 16px 20px; padding: 42px 24px; border: 1px dashed #cdd1cc; border-radius: var(--radius-lg); text-align: center; }
.planner-empty .empty-visual { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); font-size: 28px; }

/* --- planner: lists, pool, drag & drop --- */
.planner-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 20px 16px; }
.planner-toolbar .primary-button { flex: 1; }
.plan-list { margin: 0 20px 16px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 4px 16px rgba(28,35,31,.05); }
.plan-list-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.plan-list-titles { flex: 1; min-width: 0; }
.plan-list-name { width: 100%; padding: 4px 0; border: 0; border-bottom: 1px dashed transparent; background: transparent; font: inherit; font-size: 16px; font-weight: 750; color: var(--ink); }
.plan-list-name:focus { outline: none; border-bottom-color: var(--accent); }
.plan-list-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.plan-list-date { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); font-size: 12px; cursor: pointer; }
.plan-list-date input { position: absolute; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; }
.plan-list-date em { color: var(--accent-dark); font-size: 12px; font-style: normal; font-weight: 700; }
.plan-list-count { color: var(--muted); font-size: 12px; font-style: normal; }
.plan-list-delete { width: 38px; height: 38px; border: 0; border-radius: 12px; background: var(--surface-soft); font-size: 15px; cursor: pointer; }
.plan-dropzone { min-height: 12px; border-radius: 12px; }
.plan-dropzone.drop-ready { outline: 2px dashed var(--accent); outline-offset: 4px; background: var(--accent-soft); }
.plan-list-items { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.plan-list-item { display: grid; grid-template-columns: 16px 54px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 7px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.plan-list-item.dragging { opacity: .45; }
.plan-grip { color: #b9bdb9; font-size: 13px; text-align: center; cursor: grab; }
.plan-list-item img { width: 54px; height: 54px; object-fit: cover; border-radius: 10px; }
.plan-list-open { display: grid; gap: 2px; border: 0; background: transparent; text-align: left; cursor: pointer; padding: 2px 0; }
.plan-list-open strong { font-size: 13.5px; line-height: 1.25; }
.plan-list-open small { color: var(--muted); font-size: 11px; }
.plan-list-ctrl { display: grid; gap: 3px; }
.plan-list-ctrl button { width: 34px; height: 26px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); color: var(--muted); font-size: 12px; cursor: pointer; }
.plan-list-ctrl .plan-list-remove { color: var(--danger); font-size: 14px; }
.plan-pool { margin: 8px 0 0; padding: 18px 0 6px; border-top: 1px solid var(--line); }
.plan-pool .plan-section-title { padding: 0 20px; }
.plan-pool .plan-section-title b { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 11px; }
.plan-pool-note { margin: 0 20px 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.plan-pool-rail { padding-bottom: 14px; }
.pool-card { display: grid; gap: 8px; width: 250px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.pool-card.dragging { opacity: .45; }
.pool-card img { width: 100%; height: 96px; object-fit: cover; border-radius: 11px; }
.pool-open { display: grid; gap: 2px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.pool-open strong { font-size: 13.5px; line-height: 1.25; }
.pool-open small { color: var(--muted); font-size: 11px; }
.pool-assign { display: flex; gap: 6px; flex-wrap: wrap; }
.pool-assign button { min-height: 32px; padding: 4px 11px; border: 1px solid #acd6c5; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 11.5px; font-weight: 700; cursor: pointer; }
.pool-assign-hint { color: var(--muted); font-size: 11.5px; }
.plan-drop-hint { margin: 6px 0; padding: 16px; border: 1px dashed #cdd1cc; border-radius: 14px; color: var(--muted); font-size: 12px; text-align: center; }

/* --- knowledge accordion --- */
.knowledge-row.open { border-color: #acd6c5; }
.knowledge-row-open { grid-template-columns: minmax(0,1fr) 26px; }
.knowledge-chevron { display: grid; place-items: center; color: var(--muted); font-size: 16px; transition: transform .18s ease; }
.knowledge-row.open .knowledge-chevron { transform: rotate(180deg); color: var(--accent-dark); }
.knowledge-row-body { padding: 0 14px 14px; }
.knowledge-facts { display: grid; gap: 6px; margin-bottom: 10px; }
.knowledge-facts span { padding: 8px 11px; border-radius: 11px; background: var(--accent-soft); color: #174d3c; font-size: 12.5px; font-weight: 700; line-height: 1.35; }
.knowledge-row-body p { margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.knowledge-row-body ul { margin: 0 0 10px; padding-left: 18px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.knowledge-row-body a { display: inline-block; color: var(--accent-dark); font-size: 12.5px; font-weight: 700; }
.planner-empty h2 { margin-bottom: 9px; }
.planner-empty p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.primary-button { min-height: 46px; padding: 0 18px; border: 0; border-radius: 13px; background: var(--ink); color: white; font-weight: 750; cursor: pointer; }

.emergency-card { margin: 0 20px 18px; padding: 23px; border-radius: var(--radius-lg); background: #173d34; color: white; }
.eyebrow.light { color: #8bd0b6; }
.emergency-card h2 { margin-bottom: 18px; }
.emergency-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.emergency-grid a { padding: 13px; border: 1px solid rgba(255,255,255,.13); border-radius: 14px; background: rgba(255,255,255,.07); text-decoration: none; }
.emergency-grid span, .emergency-grid strong { display: block; }
.emergency-grid span { margin-bottom: 5px; color: #c5d5cf; font-size: 11px; }
.emergency-grid strong { font-size: 22px; }
.source-note { margin: 15px 0 0; color: #adc2ba; font-size: 10px; }
.info-list { margin: 0 20px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.info-row { display: grid; grid-template-columns: 39px 1fr 20px; gap: 12px; align-items: center; padding: 15px; border-bottom: 1px solid var(--line); text-decoration: none; }
.info-row:last-child { border-bottom: 0; }
.info-icon { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-dark); font-weight: 800; }
.info-row strong, .info-row small { display: block; }
.info-row strong { margin-bottom: 4px; font-size: 14px; }
.info-row small { color: var(--muted); font-size: 11px; }
.notice-card { margin: 18px 20px 32px; padding: 17px; border-radius: 16px; background: var(--warm); }
.notice-card strong { font-size: 13px; }
.notice-card p { margin: 6px 0 0; color: #6c665b; font-size: 12px; line-height: 1.5; }

.bottom-nav { position: fixed; left: 50%; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); width: min(100%, 680px); min-height: calc(68px + var(--safe-bottom)); padding: 8px 5px var(--safe-bottom); transform: translateX(-50%); border: 1px solid rgba(221,224,219,.92); border-bottom: 0; border-radius: 24px 24px 0 0; background: rgba(255,255,255,.94); box-shadow: 0 -8px 26px rgba(25, 31, 28, .08); backdrop-filter: blur(20px) saturate(150%); }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; background: transparent; color: #868a87; font-size: 10px; font-weight: 650; cursor: pointer; }
.nav-item.active { color: var(--accent-dark); }
.nav-icon { display: block; width: 22px; height: 22px; }
.nav-icon svg { display: block; width: 100%; height: 100%; }
.nav-item span:last-child { letter-spacing: .01em; }

.sheet-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(7, 10, 8, .46); backdrop-filter: blur(3px); animation: fade-in .18s ease; }
.detail-sheet { position: fixed; left: 50%; bottom: 0; z-index: 90; width: min(100%, 680px); max-height: 92vh; max-height: 92dvh; overflow-y: auto; transform: translateX(-50%); border-radius: 28px 28px 0 0; background: var(--surface); box-shadow: 0 -18px 55px rgba(0,0,0,.22); animation: sheet-in .28s cubic-bezier(.2,.8,.2,1); }
@keyframes fade-in { from { opacity: 0; } }
@keyframes sheet-in { from { transform: translate(-50%, 100%); } }
.sheet-close { position: sticky; top: 13px; z-index: 4; display: block; width: 40px; height: 40px; margin: 13px 13px -53px auto; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.94); font-size: 25px; line-height: 40px; cursor: pointer; box-shadow: 0 3px 13px rgba(0,0,0,.18); }
.detail-hero { position: relative; aspect-ratio: 1.15; max-height: 440px; background: #dfe4df; }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-body { padding: 22px 20px calc(30px + var(--safe-bottom)); }
.detail-body .card-location { margin-bottom: 11px; }
.detail-body h2 { margin-bottom: 11px; font-size: 31px; line-height: 1.02; }
.detail-key-facts { display: grid; gap: 8px; margin: 18px 0 16px; }
.detail-key-fact { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 48px; padding: 10px 12px; border: 1px solid #cfe3da; border-radius: 14px; background: var(--accent-soft); color: #174d3c; font-size: 14px; font-weight: 760; line-height: 1.3; }
.detail-key-fact::before { content: "✓"; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--accent); color: white; font-size: 13px; }
.detail-summary { margin-bottom: 20px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.detail-actions { position: sticky; bottom: 0; z-index: 3; display: grid; grid-template-columns: 1fr auto auto; gap: 9px; margin: 20px -20px calc(-30px - var(--safe-bottom)); padding: 12px 20px calc(12px + var(--safe-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.detail-actions .primary-button.saved { background: var(--accent); }
.source-button { display: grid; place-items: center; min-width: 62px; padding: 0 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); text-decoration: none; font-size: 12px; font-weight: 750; }
.detail-section { padding: 18px 0; border-top: 1px solid var(--line); }
.detail-section h3 { margin-bottom: 12px; font-size: 14px; }
.detail-list { margin: 0; padding: 0; list-style: none; }
.detail-list li { position: relative; margin-bottom: 10px; padding-left: 20px; color: #4e534f; font-size: 14px; line-height: 1.5; }
.detail-list li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.detail-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.detail-tags span { padding: 7px 9px; border-radius: 8px; background: var(--surface-soft); color: #5f6460; font-size: 11px; }
.toast { position: fixed; left: 50%; bottom: calc(82px + var(--safe-bottom)); z-index: 120; width: max-content; max-width: calc(100% - 32px); padding: 12px 16px; transform: translateX(-50%); border-radius: 12px; background: var(--ink); color: white; font-size: 13px; font-weight: 650; box-shadow: var(--shadow); animation: toast-in .18s ease; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

@media (min-width: 700px) {
  .app-header { padding-left: 32px; padding-right: 32px; }
  .hero, .section-block, .page-head { padding-left: 32px; padding-right: 32px; }
  .path-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .region-block .chip-row, .section-block .card-rail { margin-left: -32px; margin-right: -32px; padding-left: 32px; padding-right: 32px; }
  .intent-grid { grid-template-columns: repeat(3, 1fr); }
  .intent-card { grid-template-columns: 43px 1fr; }
  .intent-card > span:last-child { display: none; }
  .card-rail { grid-auto-columns: 310px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 32px 40px; }
  .filter-panel { padding-left: 32px; padding-right: 32px; }
  .filter-panel .chip-row { margin-left: -32px; margin-right: -32px; padding-left: 32px; padding-right: 32px; }
  .result-meta { padding-left: 32px; padding-right: 32px; }
  .utility-card, .emergency-card, .info-list, .notice-card, .planner-summary { margin-left: 32px; margin-right: 32px; }
  .plan-section { padding-left: 32px; padding-right: 32px; }
  .region-landing-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .language-grid { grid-template-columns: repeat(2, minmax(0,1fr)); padding-left: 32px; padding-right: 32px; }
}

@media (min-width: 1040px) {
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

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

@media (max-width: 420px) {
  .path-card { min-height: 72px; }
  .hero { padding-top: 34px; }
  .card-rail { grid-auto-columns: min(286px, calc(100vw - 48px)); }
  .utility-card { align-items: stretch; flex-direction: column; }
  .detail-sheet { max-height: 94vh; max-height: 94dvh; }
  .detail-hero { aspect-ratio: 1.35; max-height: 42vh; }
  .detail-actions { grid-template-columns: 1fr 1fr; }
  .detail-actions .primary-button { grid-column: 1 / -1; }
  .source-button { min-height: 46px; }
}
