/* Okipo天気・災害 — 001×002 統合スタイル */
:root {
  --ink: #1a1a1a;
  --ink-2: #444;
  --ink-3: #767676;
  --ink-4: #999;
  --line: #e5e5e5;
  --line-2: #ededed;
  --bg: #ffffff;
  --bg-page: #f0f1f2;
  --bg-tint: #f6f7f8;
  --bg-warm: #faf6f2;
  --brand: #0b5da8;
  --brand-2: #074c8d;
  --brand-bg: #eaf2fa;
  --accent: #e85d2f;
  --accent-bg: #fff6f0;
  --alert: #d33a2c;
  --alert-bg: #fdebea;
  --warn: #d9802b;
  --rain: #2f6fbf;
  --hot: #d33a2c;
  --cold: #2f6fbf;
  --marine: #2f9fb8;
  --good: #2c8a4a;
  --radius: 0;
  --shadow: 0 2px 12px rgba(26, 26, 26, 0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg-page);
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.shell { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.page-wrap { background: var(--bg); min-height: 100vh; }

/* Header */
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 0; cursor: pointer; padding: 0; text-align: left;
}
.brand-mark {
  background: var(--brand); color: #fff; font-weight: 700;
  font-size: 14px; padding: 4px 8px; border-radius: 0;
}
.brand-title { font-size: 17px; font-weight: 700; color: var(--ink); }
.brand-title .sep { color: var(--ink-3); font-weight: 400; margin: 0 4px; }
.brand-sub { font-size: 11px; color: var(--ink-3); margin-left: 4px; display: none; }
.top-links { margin-left: auto; display: flex; gap: 14px; font-size: 12px; }
.top-links a { color: var(--ink-2); }

.searchbar { background: var(--brand); color: #fff; }
.searchbar-inner { display: flex; gap: 8px; align-items: center; padding: 8px 16px; }
.searchbar input {
  flex: 1; height: 32px; border: 0; padding: 0 10px; border-radius: 0;
}
.searchbar .pick, .searchbar .btn {
  height: 32px; border: 0; cursor: pointer; font-size: 12px;
}
.searchbar .pick { background: #fff; padding: 0 12px; }
.searchbar .btn { background: var(--brand-2); color: #fff; padding: 0 16px; font-weight: 700; }
.searchbar .btn.amber { background: #f5a623; color: #3a2700; }

.subnav { background: var(--bg-tint); border-bottom: 1px solid var(--line); }
.subnav-inner { display: flex; align-items: center; overflow-x: auto; }
.subnav button {
  background: none; border: 0; border-right: 1px solid var(--line);
  padding: 9px 14px; font-size: 12px; color: var(--brand); cursor: pointer; white-space: nowrap;
}
.subnav button:first-child { border-left: 1px solid var(--line); }
.subnav button.is-active { background: #fff; color: var(--ink); font-weight: 700; }
.subnav .updated { margin-left: auto; font-size: 11px; color: var(--ink-3); padding: 0 8px; white-space: nowrap; }

.alert-ribbon { background: var(--alert-bg); border-bottom: 1px solid #f4cfca; font-size: 12px; }
.alert-ribbon-inner { display: flex; align-items: center; gap: 10px; padding: 8px 16px; flex-wrap: wrap; }
.alert-pill { background: var(--alert); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 0; }
.alert-ribbon strong { color: var(--alert); }
.alert-ribbon .spacer { flex: 1; }
.linkish { background: none; border: 0; color: var(--brand); cursor: pointer; font-size: 12px; }

/* Layout */
.main-layout {
  display: grid; grid-template-columns: 1fr 260px; gap: 16px;
  padding: 16px 16px 32px; align-items: start;
}
.main-col { min-width: 0; }
.detail-layout { padding: 0 16px 32px; max-width: 900px; }

/* Sections */
.h-row {
  margin: 24px 0 10px; display: flex; align-items: baseline; gap: 10px;
  border-bottom: 1px solid var(--line); padding-bottom: 4px;
}
.h-row h2 {
  margin: 0; font-size: 15px; font-weight: 700;
  border-left: 3px solid var(--brand); padding-left: 8px;
}
.h-row .sub { font-size: 11px; color: var(--ink-3); }

.box { border: 1px solid var(--line); background: #fff; margin-bottom: 14px; }
.box-h {
  background: var(--bg-tint); padding: 6px 12px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px; font-size: 12px;
}
.box-h h2 { margin: 0; font-size: 13px; font-weight: 700; }
.box-h .meta, .box-h .right { color: var(--ink-3); font-size: 11px; }
.box-h .right { margin-left: auto; }
.box-body { padding: 12px; }

/* Typhoon banner (001) */
.typhoon-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--accent-bg); border: 1px solid #f3c9b2; border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 16px;
}
.typhoon-banner-ic {
  width: 44px; height: 44px; border-radius: 0; background: var(--alert);
  display: grid; place-items: center; font-size: 22px;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.typhoon-banner strong { display: block; font-size: 14px; color: #c23b22; }
.typhoon-banner p { margin: 4px 0 0; font-size: 12px; color: #8a6052; }
.pill {
  background: var(--alert); color: #fff; font-size: 10px;
  padding: 2px 7px; border-radius: 0; margin-right: 6px;
}

/* Hero (001 warm card) */
.hero-card {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px;
  background: #fff; border: 1px solid #efe7e1; border-radius: 0;
  padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.hero-loc { font-size: 12px; color: var(--ink-3); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.pin-dot { width: 8px; height: 8px; border-radius: 0; background: var(--accent); }
.hero-now { display: flex; gap: 14px; align-items: flex-start; margin-top: 12px; }
.hero-temp { font-size: 72px; font-weight: 700; line-height: 0.9; letter-spacing: -0.02em; }
.hero-temp span { font-size: 28px; color: var(--ink-3); font-weight: 500; }
.hero-cond { font-size: 16px; font-weight: 700; margin-top: 4px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hero-stats div {
  background: var(--bg-warm); border-radius: 0; padding: 7px 11px;
  font-size: 11px; color: var(--ink-3); font-weight: 700;
}
.hero-stats b { color: var(--ink); font-size: 13px; }
.hero-aside { background: var(--bg-warm); border-radius: 0; padding: 4px 12px; }
.hero-day {
  display: grid; grid-template-columns: 90px 36px 1fr 40px 70px; gap: 8px; align-items: center;
  padding: 11px 0; border-top: 1px solid #efe7e1;
}
.hero-day:first-child { border-top: 0; }
.hero-day-label { font-size: 12px; font-weight: 700; }
.hero-day-cond { font-size: 12px; color: var(--ink-2); }
.hero-day-pop { font-size: 12px; color: var(--rain); font-weight: 700; text-align: right; }
.hero-day-temp { text-align: right; font-weight: 700; }
.hero-day-temp .hi { color: var(--hot); font-size: 16px; }
.hero-day-temp .lo { color: var(--cold); font-size: 16px; }
.hero-day-temp span { color: #cbbfb6; margin: 0 2px; }

.cta {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  background: var(--accent); color: #fff; border: 0; border-radius: 0;
  font-weight: 700; font-size: 13px; padding: 10px 16px; cursor: pointer;
  box-shadow: 0 3px 10px rgba(232, 93, 47, 0.28);
}
.cta.sm { margin-top: 0; padding: 8px 14px; font-size: 12px; }
.cta.dark { background: var(--ink); box-shadow: none; }

/* Map */
.map-wrap { background: #eef4f9; }
.map-svg { width: 100%; display: block; height: auto; }
.map-pin { cursor: pointer; }
.map-pin .pin-box { fill: #fff; stroke: #bbb; }
.map-pin.is-active .pin-box { fill: var(--brand); stroke: var(--brand); }
.map-pin .pin-temp { font-size: 11px; font-weight: 700; fill: var(--ink); }
.map-pin.is-active .pin-temp, .map-pin.is-active .pin-name { fill: #fff; }
.map-pin .pin-name { font-size: 9px; fill: #666; }
.map-pin .pin-ic-label { font-size: 8px; font-weight: 700; fill: #fff; }
.pin-swatch.pin-sun { fill: #e9b432; }
.pin-swatch.pin-sunCloud { fill: #aab; }
.pin-swatch.pin-cloud { fill: #888; }
.pin-swatch.pin-rain { fill: #2f6fbf; }
.pin-swatch.pin-thunder { fill: #5b4a8a; }
.map-legend {
  display: flex; gap: 12px; padding: 6px 12px; font-size: 11px; color: var(--ink-3);
  border-top: 1px solid var(--line);
}
.map-legend span { display: inline-flex; align-items: center; gap: 4px; }
.map-legend i { width: 8px; height: 8px; display: inline-block; border-radius: 0; }
.map-legend .sun { background: #e9b432; }
.map-legend .sunCloud { background: #aab; }
.map-legend .cloud { background: #888; }
.map-legend .rain { background: #2f6fbf; }
.map-legend .thunder { background: #5b4a8a; }

.headline-box {
  padding: 12px 14px; background: var(--bg-tint); border: 1px solid var(--line);
  font-size: 12px; line-height: 1.75; margin-bottom: 4px;
}
.headline-box .sig { color: var(--ink-3); font-size: 11px; margin-left: 4px; }

/* Location cards */
.loc-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px;
}
.loc-card {
  text-align: left; background: #fff; border: 1px solid #efe7e1; border-radius: 0;
  padding: 16px; cursor: pointer; transition: 0.15s ease;
}
.loc-card:hover { border-color: var(--accent); box-shadow: 0 8px 22px rgba(26, 26, 26, 0.08); transform: translateY(-2px); }
.loc-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.loc-card-top strong { display: block; font-size: 16px; }
.loc-card-top span { font-size: 11px; color: var(--ink-3); }
.loc-card-temp { font-size: 40px; font-weight: 700; line-height: 1; margin-top: 10px; }
.loc-card-temp span { font-size: 16px; color: var(--ink-3); }
.loc-card-cond { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.loc-card-meta {
  display: flex; gap: 12px; margin-top: 12px; padding-top: 10px;
  border-top: 1px solid #f2ebe5; font-size: 11px; color: var(--ink-3);
}

/* Mini cards / indices */
.quad-grid, .index-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px;
}
.mini-card, .index-card {
  background: #fff; border: 1px solid #efe7e1; border-radius: 0; padding: 14px;
}
.mini-card .k, .index-name { font-size: 12px; color: var(--ink-3); font-weight: 700; }
.mini-card .v.big { font-size: 34px; font-weight: 700; line-height: 1; margin-top: 6px; }
.mini-card .v.big small { font-size: 14px; color: var(--ink-3); }
.mini-card .v.big.marine { color: var(--marine); }
.mini-card .note { font-size: 11px; color: var(--ink-2); margin-top: 4px; }
.tide { font-size: 12px; margin-top: 8px; }
.tide em { font-size: 10px; font-weight: 700; margin-right: 6px; font-style: normal; }
.tide em.hi { color: var(--accent); }
.tide em.lo { color: var(--cold); }
.tide span { margin-right: 8px; font-weight: 600; }
.index-card p { margin: 8px 0 0; font-size: 11px; color: var(--ink-3); line-height: 1.5; }

.chip {
  display: inline-block; margin-top: 8px; padding: 4px 10px; border-radius: 0;
  font-size: 12px; font-weight: 700; color: var(--chip);
  background: color-mix(in srgb, var(--chip) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--chip) 28%, transparent);
}

.hi { color: var(--hot); }
.lo { color: var(--cold); }
.rain { color: var(--rain); }

/* Warnings */
.warn-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.warn-table td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.warn-table tr:last-child td { border-bottom: 0; }
.warn-table .when { color: var(--ink-3); font-size: 11px; white-space: nowrap; text-align: right; width: 150px; }
.tag { display: inline-block; font-size: 11px; padding: 2px 8px; font-weight: 700; color: #fff; border-radius: 0; }
.tag.alert { background: var(--alert); }
.tag.warn { background: var(--warn); }
.tag.info { background: #6c8aa6; }

/* Dual UV / marine */
.dual-section { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.kv-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.kv-table th, .kv-table td { text-align: left; padding: 5px 0; border-bottom: 1px solid var(--line-2); }
.kv-table th { color: var(--ink-3); font-weight: 500; width: 30%; }
.uv-num { display: flex; align-items: baseline; gap: 8px; }
.uv-num .n { font-size: 28px; font-weight: 700; color: var(--alert); }
.uv-num .lvl { font-size: 13px; font-weight: 700; color: var(--alert); }
.uv-num .lvl small { display: block; font-size: 10px; font-weight: 400; color: var(--ink-3); }
.uv-bar { height: 8px; margin-top: 8px; background: linear-gradient(90deg, #2c8a4a, #c8b425, #e98b27, #d33a2c, #7a3092); position: relative; }
.uv-bar i { position: absolute; top: -2px; width: 2px; height: 12px; background: #000; }
.uv-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--ink-3); margin-top: 4px; }
.uv-tip { font-size: 11px; color: var(--ink-2); line-height: 1.6; margin-top: 10px; }

/* Radar */
.radar { position: relative; min-height: 280px; background: repeating-linear-gradient(45deg, #eef3f5, #eef3f5 13px, #e6eef1 13px, #e6eef1 26px); }
.radar-tabs {
  position: absolute; top: 12px; left: 12px; display: flex; background: #fff;
  border-radius: 0; overflow: hidden; box-shadow: var(--shadow); font-size: 11px; font-weight: 700;
}
.radar-tabs span { padding: 6px 12px; color: var(--ink-3); }
.radar-tabs .on { background: var(--marine); color: #fff; }
.radar-ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: ui-monospace, monospace; font-size: 12px; color: #8aa3ac;
  background: rgba(255, 255, 255, 0.72); margin: auto; width: fit-content; height: fit-content; padding: 8px 14px; border-radius: 0;
}
.radar-scale {
  position: absolute; bottom: 12px; right: 12px; background: rgba(255, 255, 255, 0.92);
  padding: 8px 10px; border-radius: 0; box-shadow: var(--shadow);
}
.radar-scale .k { font-size: 10px; color: var(--ink-3); font-weight: 700; }
.radar-scale .bar { width: 140px; height: 8px; border-radius: 0; background: linear-gradient(90deg, #bfe3f0, #5db4e0, #2f7fe8, #e8a23f, #e8452f); margin-top: 4px; }
.radar-scale .labels { display: flex; justify-content: space-between; font-size: 9px; color: var(--ink-3); }

/* Typhoon block */
.typhoon-box { display: grid; grid-template-columns: 1fr 260px; overflow: hidden; }
.typhoon-map { min-height: 240px; background: #eaf0f5; border-right: 1px solid var(--line); }
.typhoon-info { padding: 14px; }
.typhoon-info h3 { margin: 0 0 4px; font-size: 16px; color: #c23b22; }
.typhoon-info h3 span { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.typhoon-info .state { margin: 0 0 12px; font-size: 12px; color: var(--ink-3); }
.typhoon-stats { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 12px; margin: 0; }
.typhoon-stats dt { color: var(--ink-3); margin: 0; }
.typhoon-stats dd { margin: 0; font-weight: 700; }
.typhoon-stats dd.alert { color: var(--alert); }
.impact-note {
  margin-top: 12px; padding: 8px 10px; background: var(--alert-bg);
  border-left: 3px solid var(--alert); font-size: 11px; line-height: 1.55; color: #6b1c14;
}

/* News */
.news-box { padding: 0 12px; }
.news-row {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line-2); cursor: pointer;
}
.news-row:last-child { border-bottom: 0; }
.news-row:hover .news-title { color: var(--brand); text-decoration: underline; }
.news-cat {
  font-size: 10px; background: var(--bg-tint); border: 1px solid var(--line);
  padding: 3px 6px; text-align: center;
}
.news-cat.alert { background: var(--alert-bg); color: var(--alert); border-color: #f4cfca; }
.news-cat.warn { background: #fcf2e6; color: var(--warn); }
.news-cat.info { background: var(--brand-bg); color: var(--brand); }
.news-title { font-size: 13px; line-height: 1.5; }
.news-src, .news-row time { font-size: 11px; color: var(--ink-3); }

/* Sidebar */
.side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 8px; }
.side-locs h2, .side-links h2 {
  margin: 0; padding: 6px 12px; font-size: 12px; font-weight: 700;
  background: var(--bg-tint); border-bottom: 1px solid var(--line);
}
.side-locs ul, .side-links ul { margin: 0; padding: 0; list-style: none; }
.side-locs li {
  display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center;
  padding: 7px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer;
}
.side-locs li.has-detail:hover, .side-locs li.is-active { background: var(--brand-bg); }
.side-locs li strong { display: block; font-size: 12px; }
.side-locs li small { font-size: 10px; color: var(--ink-3); }
.side-locs .temps { font-size: 11px; text-align: right; }
.side-links ul { display: grid; grid-template-columns: 1fr 1fr; }
.side-links li { padding: 7px 12px; border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); }
.side-links li:nth-child(2n) { border-right: 0; }
.side-links a { font-size: 11px; color: var(--brand); }

/* Detail page */
.crumbs { font-size: 11px; color: var(--ink-3); padding: 12px 0 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.crumbs button { background: none; border: 0; color: var(--accent); cursor: pointer; font-size: 11px; padding: 0; }
.page-title { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 16px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.page-title h1 { margin: 0; font-size: 24px; font-weight: 700; }
.page-title span { font-size: 12px; color: var(--ink-3); }
.detail-now { padding: 18px; border-radius: 0; }
.detail-now-main { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.detail-now-main p { margin: 6px 0 0; font-size: 12px; color: var(--ink-3); }
.detail-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 16px;
}
.detail-stats div { background: var(--bg-warm); border-radius: 0; padding: 10px; }
.detail-stats span { display: block; font-size: 10px; color: var(--ink-3); font-weight: 700; }
.detail-stats b { font-size: 18px; }
.hourly-scroll { display: flex; gap: 0; overflow-x: auto; padding: 8px; }
.hour-cell { flex: 0 0 56px; text-align: center; padding: 6px 0; }
.hour-cell .h { font-size: 11px; color: var(--ink-3); font-weight: 700; }
.hour-cell .t { font-size: 18px; font-weight: 700; }
.hour-cell .p { font-size: 10px; color: var(--rain); font-weight: 700; }
.hour-cell .w { font-size: 9px; color: var(--ink-4); margin-top: 4px; }
.weekly-list { padding: 4px 12px; }
.week-row {
  display: grid; grid-template-columns: 90px 1fr 50px 70px; gap: 8px; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--line-2); cursor: pointer;
}
.week-row:first-child { border-top: 0; }
.week-row.is-active { background: var(--brand-bg); margin: 0 -12px; padding-left: 12px; padding-right: 12px; }
.week-row .dow { font-weight: 700; }
.week-row .dow.sat { color: var(--cold); }
.week-row .dow.sun { color: var(--hot); }
.week-row .dow span { font-size: 11px; color: var(--ink-3); font-weight: 400; margin-left: 4px; }
.week-row .ics { display: flex; align-items: center; gap: 4px; color: var(--ink-4); }
.sun-card { display: flex; justify-content: space-around; align-items: center; text-align: center; }
.sun-card span { display: block; font-size: 10px; color: var(--ink-3); }
.sun-card b { font-size: 18px; }
.back-link {
  margin-top: 20px; background: none; border: 0; color: var(--accent);
  font-weight: 700; font-size: 13px; cursor: pointer; padding: 0;
}

/* Icons */
.w-icon { display: inline-flex; line-height: 0; }
.w-icon svg { width: 48px; height: 48px; display: block; }
.w-icon.xl svg { width: 72px; height: 72px; }
.w-icon.md svg { width: 32px; height: 32px; }
.w-icon.sm svg { width: 24px; height: 24px; }
.w-icon.xs svg { width: 18px; height: 18px; }

/* Footer */
.foot {
  border-top: 1px solid var(--line); padding: 16px; margin-top: 8px;
  font-size: 11px; color: var(--ink-3); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.foot a { color: var(--ink-3); margin-right: 12px; }
.foot p { margin: 0; }

/* Responsive */
@media (min-width: 720px) {
  .brand-sub { display: inline; }
}
@media (max-width: 900px) {
  .main-layout { grid-template-columns: 1fr; }
  .side { position: static; }
  .dual-section, .typhoon-box { grid-template-columns: 1fr; }
  .typhoon-map { border-right: 0; border-bottom: 1px solid var(--line); }
  .hero-day { grid-template-columns: 1fr 32px; grid-template-areas: "label icon" "cond cond" "pop temp"; }
  .hero-day-label { grid-area: label; }
  .hero-day .w-icon { grid-area: icon; }
  .hero-day-cond { grid-area: cond; }
  .hero-day-pop { grid-area: pop; text-align: left; }
  .hero-day-temp { grid-area: temp; text-align: right; }
}
