:root {
  color-scheme: light dark;
  --fg: #1a1a1a;
  --bg: #f5f6f8;
  --card-bg: #ffffff;
  --border: #e2e4e8;
  --accent: #0d6efd;
  --accent-fg: #ffffff;
  --muted: #666;
  --placeholder-a: #7fa8d9;
  --placeholder-b: #4a6fa5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #eee;
    --bg: #101114;
    --card-bg: #1b1c20;
    --border: #2c2e33;
    --accent: #4d9dff;
    --accent-fg: #0b1220;
    --muted: #9aa0a6;
    --placeholder-a: #2c4a72;
    --placeholder-b: #1a2c46;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 1.25rem 1rem 3rem;
  max-width: 1080px;
  margin-inline: auto;
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background: var(--bg);
  color: var(--fg);
}

header h1 {
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
}

.lead {
  color: var(--muted);
  margin-top: 0;
  font-size: 0.95rem;
}

.updated-at {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 0 0 0.75rem;
}

.home-link {
  color: var(--fg);
  text-decoration: none;
}

footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

footer nav {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

footer nav a {
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
}

footer nav a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-note {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 0;
}

.footer-note a {
  color: var(--muted);
}

.legal-page {
  max-width: 720px;
  margin-inline: auto;
  line-height: 1.7;
}

.legal-page h2 {
  font-size: 1.3rem;
  margin-top: 1.5rem;
}

.legal-page h3 {
  font-size: 1.05rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-page p, .legal-page ul, .legal-page ol {
  font-size: 0.92rem;
  color: var(--fg);
}

.legal-page ul, .legal-page ol {
  padding-left: 1.4rem;
}

.legal-page li {
  margin-bottom: 0.4rem;
}

.legal-page a {
  color: var(--accent);
}

.updated-note {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 2rem;
}

.legal-links {
  font-size: 0.85rem;
}

.mode-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.mode-tab {
  flex: 1;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.mode-tab.active {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--card-bg));
}

.mode-note {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0 0 0.75rem;
}

form {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.search-bar {
  display: flex;
  align-items: end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.field {
  flex: 1;
  min-width: 120px;
}

label {
  display: block;
  font-size: 0.78rem;
  margin-bottom: 0.3rem;
  color: var(--muted);
}

select, input[type="number"] {
  width: 100%;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  font-size: 0.95rem;
}

.pill-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.85rem;
}

.pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill span {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
  color: var(--fg);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.pill input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}

button {
  padding: 0.6rem 1.4rem;
  background: var(--accent);
  color: var(--accent-fg);
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

#status {
  min-height: 1.4rem;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.75rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.area-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

.card-image {
  position: relative;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  background-color: var(--placeholder-b);
  background-image: linear-gradient(135deg, var(--placeholder-a), var(--placeholder-b));
  display: flex;
  align-items: flex-end;
}

.card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.05) 60%, transparent 100%);
}

.card-image-text {
  position: relative;
  z-index: 1;
  padding: 0.65rem 0.75rem;
  color: #fff;
}

.card-area-name {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.card-office-name {
  font-size: 0.78rem;
  opacity: 0.9;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.card-weather {
  padding: 0.65rem 0.75rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.card-weather-main {
  font-size: 0.92rem;
  line-height: 1.5;
}

.card-weather-emoji {
  font-size: 1.05rem;
  margin-right: 0.15rem;
}

.card-weather-stats {
  display: flex;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.card-weather-note {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.4;
}

.empty-state {
  color: var(--muted);
  padding: 2rem 0;
  text-align: center;
}

.area-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.detail-hero {
  position: relative;
  aspect-ratio: 16 / 6;
  min-height: 160px;
  border-radius: 14px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-color: var(--placeholder-b);
  background-image: linear-gradient(135deg, var(--placeholder-a), var(--placeholder-b));
  display: flex;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.05) 55%, transparent 100%);
}

.detail-hero-text {
  position: relative;
  z-index: 1;
  padding: 1rem 1.25rem;
  color: #fff;
}

.detail-hero-text h2 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.detail-sub {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.95;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.detail-forecast-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.detail-forecast-row {
  display: flex;
  gap: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
}

.detail-forecast-date {
  flex: 0 0 90px;
  font-weight: 700;
  font-size: 0.9rem;
  padding-top: 0.1rem;
}

.detail-forecast-body {
  flex: 1;
  min-width: 0;
}

.detail-forecast-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.detail-forecast-text {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.detail-region-temp {
  color: var(--muted);
}

.detail-reliability {
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
}

/* ランディングページ */
.lp {
  max-width: 900px;
  margin-inline: auto;
}

.lp-hero {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
}

.lp-hero-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.4;
  margin: 0 0 1rem;
}

.lp-hero-lead {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
  max-width: 640px;
  margin: 0 auto 1.75rem;
}

.lp-cta-group {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.lp-cta {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}

.lp-cta-primary {
  background: var(--accent);
  color: var(--accent-fg);
}

.lp-cta-secondary {
  background: var(--card-bg);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.lp-section {
  padding: 2rem 1rem;
  border-top: 1px solid var(--border);
}

.lp-section h2 {
  text-align: center;
  font-size: 1.4rem;
  margin: 0 0 1.5rem;
}

.lp-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.lp-step {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
}

.lp-step-num {
  width: 2rem;
  height: 2rem;
  line-height: 2rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 700;
  margin: 0 auto 0.75rem;
}

.lp-step h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.lp-step p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0;
}

.lp-usecases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.lp-usecase {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
}

.lp-usecase h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.lp-usecase ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--fg);
  font-size: 0.9rem;
  line-height: 1.8;
}

.lp-note {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
  margin-top: 1.25rem;
}

.lp-note a {
  color: var(--accent);
}

.lp-final-cta {
  text-align: center;
}
