:root {
  --ink: #10231f;
  --muted: #5c6e69;
  --paper: #f5f2e9;
  --card: #fffefa;
  --green: #0c493d;
  --green-2: #176a59;
  --mint: #d8eee7;
  --orange: #e76f36;
  --yellow: #f5c451;
  --red: #b72e35;
  --line: #d6ddd8;
  --shadow: 0 12px 34px rgba(12, 73, 61, .10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--paper); padding-bottom: 84px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--green-2); }
.skip-link { position: fixed; left: 8px; top: -50px; z-index: 100; background: white; padding: 10px; }
.skip-link:focus { top: 8px; }

.topbar { min-height: 72px; padding: max(14px, env(safe-area-inset-top)) 18px 12px; display: flex; align-items: center; justify-content: space-between; background: var(--green); color: white; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.75); border-radius: 14px; font-weight: 900; font-size: 22px; }
.brand strong, .brand span { display: block; }
.brand strong { letter-spacing: .045em; }
.brand span { opacity: .72; font-size: 12px; margin-top: 2px; }
.icon-button { border: 0; background: rgba(255,255,255,.12); color: white; width: 44px; height: 44px; border-radius: 13px; font-size: 21px; }
.demo-notice { padding: 9px 18px; background: #fff0c7; color: #6b4a00; font-size: 12px; text-align: center; border-bottom: 1px solid #ead18b; }
.demo-notice strong { background: #6b4a00; color: white; border-radius: 4px; padding: 2px 5px; margin-right: 5px; }

main { width: min(780px, 100%); margin: 0 auto; }
.hero { background: linear-gradient(150deg, var(--green) 0%, var(--green-2) 100%); color: white; margin: 16px; border-radius: 26px; padding: 25px 22px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.hero::after { content: ""; width: 180px; height: 180px; border: 32px solid rgba(255,255,255,.07); border-radius: 50%; position: absolute; right: -75px; top: -80px; }
.eyebrow { text-transform: uppercase; letter-spacing: .11em; font-weight: 800; font-size: 11px; opacity: .75; }
.hero h1 { margin: 7px 0 10px; font-size: clamp(28px, 8vw, 44px); line-height: 1.03; max-width: 540px; }
.hero p { margin: 0; max-width: 560px; line-height: 1.48; color: rgba(255,255,255,.83); }
.status-row { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 18px; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; font-size: 12px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #6dd6a8; box-shadow: 0 0 0 4px rgba(109,214,168,.14); }

.active-alert { margin: 16px; padding: 16px; background: #fff1ed; border: 2px solid #ef8b67; border-radius: 18px; }
.active-alert h2 { margin: 3px 0 5px; font-size: 19px; }
.active-alert p { margin: 0 0 12px; color: #6d3928; }
.section { padding: 7px 16px 20px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 12px 2px 13px; }
.section-head h2 { margin: 0; font-size: 22px; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.text-button { border: 0; color: var(--green-2); background: transparent; font-weight: 750; padding: 8px; }

.scenario-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.scenario-card { border: 1px solid var(--line); background: var(--card); border-radius: 18px; padding: 16px; text-align: left; color: var(--ink); min-height: 145px; box-shadow: 0 5px 18px rgba(16,35,31,.04); transition: transform .14s ease, box-shadow .14s ease; }
.scenario-card:active { transform: scale(.98); }
.scenario-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--mint); font-size: 23px; margin-bottom: 13px; }
.scenario-card strong { display: block; font-size: 16px; }
.scenario-card small { display: block; color: var(--muted); margin-top: 5px; line-height: 1.35; }

.quick-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 16px; }
.quick-bar a { text-decoration: none; background: white; border: 1px solid var(--line); border-radius: 15px; padding: 12px 8px; text-align: center; color: var(--ink); font-size: 12px; font-weight: 750; }
.quick-bar strong { display: block; color: var(--red); font-size: 18px; }

.page-head { padding: 24px 18px 12px; }
.back { border: 0; background: transparent; padding: 6px 0 14px; color: var(--green-2); font-weight: 750; }
.page-head h1 { margin: 3px 0 8px; font-size: 32px; line-height: 1.06; }
.page-head p { margin: 0; color: var(--muted); line-height: 1.45; }
.detail-icon { font-size: 38px; margin-bottom: 8px; }
.emergency-card { margin: 8px 16px 15px; border-radius: 18px; padding: 17px; background: #fff1ed; border: 1px solid #f1b098; }
.emergency-card strong { display: block; color: var(--red); margin-bottom: 4px; }
.emergency-card a { display: inline-block; background: var(--red); color: white; padding: 10px 14px; margin-top: 10px; border-radius: 10px; text-decoration: none; font-weight: 800; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { counter-increment: step; background: var(--card); border: 1px solid var(--line); padding: 15px 14px 15px 54px; border-radius: 15px; margin-bottom: 9px; position: relative; line-height: 1.4; }
.steps li::before { content: counter(step); position: absolute; left: 14px; top: 13px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: white; font-weight: 800; font-size: 13px; }
.source-box, .info-box { margin: 14px 0; padding: 14px; border-radius: 14px; background: var(--mint); line-height: 1.45; font-size: 13px; }
.source-box { background: #eef1ef; }
.source-box a { font-weight: 750; }

.place-list, .check-list { display: grid; gap: 10px; }
.place-card, .check-card { background: var(--card); border: 1px solid var(--line); border-radius: 17px; padding: 15px; }
.place-card .tag { display: inline-block; color: var(--green); background: var(--mint); border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 800; }
.place-card h3 { margin: 9px 0 4px; }
.place-card p { color: var(--muted); margin: 0; font-size: 13px; line-height: 1.4; }
.check-card { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.check-card input { width: 23px; height: 23px; accent-color: var(--green); flex: 0 0 auto; }
.check-card strong { display: block; }
.check-card small { color: var(--muted); }
.progress { height: 10px; border-radius: 99px; background: #dbe2de; overflow: hidden; margin: 10px 0 6px; }
.progress span { display: block; height: 100%; background: var(--green-2); transition: width .25s; }

.admin-panel { margin: 16px; background: #132e28; color: white; padding: 20px; border-radius: 20px; }
.admin-panel h2 { margin: 0 0 5px; }
.admin-panel p { color: rgba(255,255,255,.72); font-size: 13px; }
.field { display: grid; gap: 6px; margin-top: 13px; }
.field label { font-size: 12px; font-weight: 750; color: rgba(255,255,255,.8); }
.field input, .field textarea, .field select { width: 100%; border: 0; border-radius: 11px; padding: 12px; background: white; color: var(--ink); }
.field textarea { min-height: 80px; resize: vertical; }
.primary, .secondary { border: 0; border-radius: 12px; padding: 12px 15px; font-weight: 800; }
.primary { color: white; background: var(--orange); }
.secondary { color: var(--green); background: var(--mint); }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.menu-sheet { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.45); display: grid; align-items: end; }
.menu-card { background: var(--card); border-radius: 24px 24px 0 0; padding: 22px 18px calc(26px + env(safe-area-inset-bottom)); }
.menu-card h2 { margin: 0 0 14px; }
.menu-card button { width: 100%; text-align: left; background: white; border: 1px solid var(--line); padding: 14px; border-radius: 12px; margin: 5px 0; }

.bottom-nav { position: fixed; z-index: 40; bottom: 0; left: 0; right: 0; min-height: 70px; padding: 6px max(8px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255,254,250,.96); border-top: 1px solid var(--line); backdrop-filter: blur(14px); }
.bottom-nav button { border: 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 750; padding: 4px; }
.bottom-nav span { display: block; font-size: 21px; line-height: 1.1; margin-bottom: 3px; }
.bottom-nav button.active { color: var(--green); }
.toast { position: fixed; z-index: 90; left: 50%; bottom: 88px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #10231f; color: white; padding: 11px 15px; border-radius: 11px; transition: .2s; width: max-content; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 680px) {
  .scenario-grid { grid-template-columns: repeat(3, 1fr); }
  .hero { padding: 34px; }
  .section { padding-left: 24px; padding-right: 24px; }
  .bottom-nav { left: 50%; right: auto; width: 600px; transform: translateX(-50%); border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
