:root {
  --background: #fafcfb;
  --foreground: #202d2b;
  --card: #ffffff;
  --primary: #177e72;
  --primary-strong: #12695f;
  --action: #233b37;
  --action-text: #ffffff;
  --muted: #f3f5f4;
  --muted-foreground: #596761;
  --border: #dce5df;
  --warning: #925d1c;
  --warning-soft: #fff3df;
  --danger: #a33c37;
  --focus: #12695f;
  --font: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', Meiryo, sans-serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --motion: 180ms;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --background: #1c201e;
  --foreground: #e2e8e4;
  --card: #252b27;
  --primary: #99c6b1;
  --primary-strong: #b9ddc9;
  --action: #c1d5c7;
  --action-text: #202a23;
  --muted: #2a312c;
  --muted-foreground: #bac9bf;
  --border: #3b443e;
  --warning: #e2b876;
  --warning-soft: #3d3020;
  --danger: #e8a49b;
  --focus: #b9ddc9;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--background); color: var(--foreground); font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
button, select { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; opacity: .48; }
button:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
button, a, select, summary { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
p, h1, h2, h3, figure { margin: 0; }
h1, h2, h3 { line-height: 1.35; letter-spacing: -.025em; }
h1 { font-size: clamp(28px, 5vw, 36px); font-weight: 700; }
h2 { font-size: 21px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
svg { display: block; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.app-shell { width: min(100%, 760px); min-height: 100dvh; margin-inline: auto; padding-inline: clamp(18px, 5vw, 36px); }
.topbar { min-height: 88px; border-bottom: 1px solid var(--border); justify-content: space-between; --od-gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--foreground); text-decoration: none; font-size: 18px; font-weight: 700; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-sm); background: var(--action); color: var(--action-text); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--card); color: var(--foreground); transition: background var(--motion); }
.icon-button[aria-pressed='true'] { background: var(--muted); color: var(--primary-strong); }
.tabbar { display: flex; gap: 32px; height: 64px; align-items: stretch; }
.tab { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 84px; min-height: 44px; padding: 0 4px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted-foreground); font-size: 15px; font-weight: 600; text-decoration: none; }
.tab[aria-current='page'] { color: var(--primary-strong); border-bottom-color: var(--primary); }
.tab-label { display: block; }
.view { padding-block: 20px 60px; }
.demo-banner { --od-gap: 12px; justify-content: space-between; padding: 10px 14px; background: var(--muted); border-radius: var(--radius-sm); color: var(--muted-foreground); font-size: 13px; font-weight: 600; }
.demo-banner svg { color: var(--primary-strong); }
.location-row { --od-gap: 12px; justify-content: space-between; margin-top: 24px; color: var(--muted-foreground); font-size: 14px; }
.city-select { display: inline-flex; align-items: center; gap: 6px; max-width: 58%; min-height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); color: var(--foreground); font-weight: 600; }
.city-select select { width: 100%; min-width: 0; border: 0; background: transparent; color: inherit; appearance: none; cursor: pointer; }
.city-select option { color: var(--foreground); background: var(--card); }
.hero { padding-top: 24px; }
.hero-intro { --od-gap: 12px; justify-content: space-between; }
.hero-copy { flex: 1 1 0; min-width: 0; }
.eyebrow { color: var(--muted-foreground); font-size: 14px; font-weight: 600; }
.hero h1 { margin-top: 8px; }
.hero-subtitle { margin-top: 12px; color: var(--muted-foreground); font-size: 16px; }
.cloud-art { display: block; width: 120px; max-width: 30%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; }
.status-line { --od-gap: 8px; margin-top: 14px; color: var(--primary-strong); font-weight: 700; font-size: 14px; }
.status-line.warning { color: var(--warning); }
.status-dot { display: block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chart-wrap { margin-top: 24px; padding: 16px 12px 8px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); }
.pressure-svg { display: block; width: 100%; height: auto; }
.chart-axis { display: flex; justify-content: space-between; padding: 4px 4px 0; color: var(--muted-foreground); font-size: 12px; }
.chart-legend { --od-gap: 8px; margin-top: 8px; color: var(--muted-foreground); font-size: 13px; }
.legend-swatch { display: block; width: 16px; height: 4px; border-radius: 2px; background: var(--primary); }
.legend-swatch.warm { background: var(--warning); }
.change-summary { --od-gap: 12px; justify-content: space-between; margin-top: 20px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.change-copy { --od-gap: 2px; }
.change-copy strong { display: block; font-size: 18px; line-height: 1.35; }
.change-copy span { display: block; color: var(--muted-foreground); font-size: 14px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 2px; border: 0; background: transparent; color: var(--primary-strong); font-weight: 700; white-space: nowrap; }
.checkin { padding-top: 24px; }
.section-heading { --od-gap: 12px; justify-content: space-between; }
.section-heading .icon-button { border-color: transparent; background: transparent; }
.choices { --od-gap: 12px; margin-top: 18px; }
.choice { display: inline-flex; align-items: center; justify-content: center; gap: 10px; flex: 1 1 0; min-width: 0; min-height: 66px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); font-weight: 700; white-space: nowrap; transition: background var(--motion), transform var(--motion); }
.choice.primary-choice { border-color: var(--action); background: var(--action); color: var(--action-text); }
.choice.confirmed { border-color: var(--primary); color: var(--primary-strong); background: var(--muted); }
.hint { margin-top: 10px; color: var(--muted-foreground); font-size: 14px; }
.active-panel { margin-top: 16px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); }
.active-time { --od-gap: 8px; color: var(--muted-foreground); font-size: 14px; }
.active-actions { --od-gap: 12px; margin-top: 18px; }
.primary-button, .secondary-button, .danger-button, .quiet-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; border-radius: var(--radius-sm); font-weight: 700; text-align: center; transition: background var(--motion), transform var(--motion); }
.primary-button { border: 1px solid var(--action); background: var(--action); color: var(--action-text); }
.secondary-button { border: 1px solid var(--border); background: var(--card); color: var(--foreground); }
.quiet-button { border: 0; background: transparent; color: var(--muted-foreground); }
.danger-button { border: 1px solid var(--danger); background: transparent; color: var(--danger); }
.page-heading { --od-gap: 12px; justify-content: space-between; margin: 16px 0 22px; }
.page-lede { margin-top: 6px; color: var(--muted-foreground); font-size: 15px; }
.period-tabs, .filter-tabs { --od-gap: 8px; margin: 0 0 18px; }
.segment { display: inline-flex; align-items: center; justify-content: center; flex: 1 1 0; min-width: 0; min-height: 46px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); color: var(--muted-foreground); font-size: 14px; font-weight: 700; white-space: nowrap; }
.segment[aria-selected='true'] { border-color: var(--primary); background: var(--muted); color: var(--primary-strong); }
.forecast-state { --od-gap: 2px; margin: 18px 0 4px; }
.forecast-state strong { display: block; font-size: 19px; }
.forecast-state span { display: block; color: var(--muted-foreground); font-size: 14px; }
.readout { --od-gap: 12px; justify-content: space-between; margin-top: 16px; }
.readout strong { font-size: 19px; white-space: nowrap; }
.readout small { font-size: 13px; font-weight: 400; }
.disclosure { margin-top: 22px; border-top: 1px solid var(--border); }
.disclosure summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; cursor: pointer; font-weight: 700; list-style: none; }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure[open] summary svg { transform: rotate(90deg); }
.disclosure-body { padding: 4px 0 18px; color: var(--muted-foreground); }
.metric-row { --od-gap: 8px; justify-content: space-between; padding: 7px 0; color: var(--foreground); }
.metric-row span { display: block; }
.metric-row strong { display: block; white-space: nowrap; }
.info-note { color: var(--muted-foreground); font-size: 14px; line-height: 1.65; }
.records-summary { padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.records-summary strong { color: var(--primary-strong); font-size: 26px; white-space: nowrap; }
.calendar-title { margin-top: 24px; font-size: 16px; }
.calendar { --od-gap: 6px; --od-cols: 7; margin-top: 12px; }
.calendar-day { display: grid; place-items: center; gap: 1px; min-width: 0; min-height: 66px; padding: 6px 2px; border-radius: var(--radius-sm); background: var(--muted); text-align: center; }
.calendar-day strong { font-size: 15px; line-height: 1.1; }
.calendar-day span { display: block; font-size: 11px; color: var(--muted-foreground); white-space: nowrap; }
.calendar-day.headache { background: var(--warning-soft); }
.calendar-day.headache strong, .calendar-day.headache span { color: var(--warning); }
.calendar-day.clear { background: var(--muted); }
.calendar-day.clear strong { color: var(--primary-strong); }
.calendar-legend { --od-gap: 16px; margin-top: 12px; font-size: 13px; color: var(--muted-foreground); }
.calendar-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; background: var(--warning); }
.calendar-legend .clear-key { background: var(--primary); }
.list-heading { --od-gap: 12px; justify-content: space-between; margin-top: 30px; margin-bottom: 12px; }
.record-list { margin-top: 6px; }
.record-row { --od-gap: 14px; justify-content: space-between; width: 100%; min-height: 72px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--border); background: transparent; text-align: left; }
.record-symbol { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--warning-soft); color: var(--warning); }
.record-symbol.clear { background: var(--muted); color: var(--primary-strong); }
.record-meta { --od-gap: 1px; }
.record-meta strong { display: block; font-size: 16px; }
.record-meta span { display: block; color: var(--muted-foreground); font-size: 13px; }
.empty-state { padding: 36px 16px; border: 1px dashed var(--border); border-radius: var(--radius-md); text-align: center; color: var(--muted-foreground); }
.empty-state strong { display: block; color: var(--foreground); }
.empty-state p { margin-top: 6px; }
.footer { padding: 0 0 40px; color: var(--muted-foreground); font-size: 13px; line-height: 1.6; }
.footer a { color: var(--primary-strong); text-underline-offset: 3px; }
.toast { position: fixed; z-index: 70; left: 50%; bottom: 24px; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); padding: 11px 16px; border-radius: var(--radius-sm); background: var(--action); color: var(--action-text); box-shadow: 0 8px 24px #0002; font-size: 14px; font-weight: 700; text-align: center; }
.error-box { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--danger); border-radius: var(--radius-sm); color: var(--danger); }
.error-box button { margin-top: 8px; }
.modal-root:empty { display: none; }
.modal-root { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; border: 0; background: #0009; }
.dialog { position: relative; width: min(100%, 520px); max-height: min(88dvh, 760px); overflow-y: auto; overscroll-behavior: contain; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); box-shadow: 0 24px 70px #0003; }
.dialog-head { --od-gap: 12px; justify-content: space-between; margin-bottom: 18px; }
.dialog-head h2 { font-size: 23px; }
.dialog-head .icon-button { width: 44px; height: 44px; }
.setting-row { --od-gap: 12px; justify-content: space-between; min-height: 64px; border-bottom: 1px solid var(--border); }
.setting-row .od-field { --od-gap: 0; }
.setting-row label, .setting-row strong { display: block; font-weight: 700; }
.setting-row small { display: block; font-size: 13px; color: var(--muted-foreground); line-height: 1.5; }
.switch { position: relative; display: inline-flex; align-items: center; width: 52px; height: 32px; padding: 4px; border: 1px solid var(--border); border-radius: 20px; background: var(--muted); }
.switch::after { content: ''; display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--muted-foreground); transition: transform var(--motion), background var(--motion); }
.switch[aria-checked='true'] { background: var(--primary); }
.switch[aria-checked='true']::after { transform: translateX(19px); background: var(--card); }
.settings-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 54px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--border); background: transparent; text-align: left; font-weight: 700; }
.settings-action .od-row { --od-gap: 10px; }
.dialog .danger-button { width: 100%; margin-top: 22px; }
.dialog .info-note { margin-top: 16px; }
.dialog .disclosure { margin-top: 12px; }
.dialog-actions { --od-gap: 10px; justify-content: flex-end; margin-top: 24px; }
.saved-time { --od-gap: 8px; color: var(--muted-foreground); font-size: 14px; }
.detail-block { margin-top: 18px; }
.detail-block h3 { margin-bottom: 8px; }
.severity { --od-gap: 8px; }
.severity button { flex: 1 1 0; min-height: 46px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); }
.severity button[aria-pressed='true'] { border-color: var(--primary); background: var(--muted); color: var(--primary-strong); font-weight: 700; }
@media (hover: hover) {
  .icon-button:hover, .secondary-button:hover, .choice:hover, .segment:hover, .city-select:hover { background: var(--muted); }
  .primary-button:hover, .choice.primary-choice:hover { background: var(--primary-strong); }
  .text-link:hover, .tab:hover { background: var(--muted); }
  .record-row:hover, .settings-action:hover { background: var(--muted); }
}
@media (max-width: 600px) {
  .app-shell { padding-inline: 20px; }
  .topbar { min-height: 72px; border-bottom: 0; }
  .brand { gap: 8px; font-size: 17px; }
  .brand-mark { width: 34px; height: 34px; }
  .tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(68px + env(safe-area-inset-bottom)); padding: 4px max(16px, env(safe-area-inset-left)) calc(4px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-right)); gap: 0; border-top: 1px solid var(--border); background: var(--background); }
  .tab { flex: 1 1 0; min-width: 0; height: 60px; flex-direction: column; gap: 0; border-bottom: 0; font-size: 12px; }
  .tab[aria-current='page'] { background: var(--muted); border-radius: var(--radius-sm); }
  .tab svg { width: 21px; height: 21px; }
  .view { padding-block: 0 calc(96px + env(safe-area-inset-bottom)); }
  .location-row { margin-top: 16px; }
  .hero { padding-top: 18px; }
  .cloud-art { width: 96px; }
  .hero h1 { font-size: clamp(25px, 7vw, 30px); }
  .chart-wrap { margin-top: 20px; }
  .choices { --od-gap: 10px; }
  .choice { padding: 10px; font-size: 15px; }
  .toast { bottom: calc(78px + env(safe-area-inset-bottom)); }
  .footer { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) {
  .app-shell { padding-inline: 16px; }
  .hero-intro { --od-gap: 4px; }
  .cloud-art { width: 72px; }
  .choice { gap: 6px; font-size: 14px; }
  .calendar { --od-gap: 3px; }
  .calendar-day { min-height: 58px; }
  .calendar-day span { font-size: 10px; }
  .period-tabs .segment { padding-inline: 3px; font-size: 12px; }
  .dialog { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0ms !important; animation-duration: 0ms !important; }
}
