/* =========================================================================
   ひなた気象台 — HINATA WEATHER SERVICE
   架空の気象機関。日向坂46を「天気そのもの」として観測・予報する。
   三部作の三作目（櫻坂=夜の映画 / 乃木坂=美術館 / 日向坂=気象台）。
   唯一のラウンド書体。あたたかく、丸く、晴れている。
   Prefix: hw- (hinata weather). Vanilla. Google Fonts only.
   ========================================================================= */

/* ---------- カラートークン（§1） ---------- */
:root {
  --ink:    #27445E;             /* 空紺 — 全文字色。黒は使わない */
  --accent: #29A8E0;             /* 日向坂の空色 */
  --sun:    #FFB73B;             /* 太陽 */
  --sun-hi: #FF8E3C;             /* 夕方の太陽 */
  --card:   rgba(255,255,255,.86); /* すりガラスの予報カード */
  --line:   rgba(39,68,94,.16);
  --happy:  #FF7DA3;             /* ハッピーオーラのピンク、控えめに */

  /* 空のフェーズ（body[data-sky] で 1.2s クロスフェード — §1表） */
  --sky-top:    #CBEAFA;
  --sky-bottom: #EAF7FD;

  /* これらは派生トークン。dusk帯で --ink が反転しても全カードが読めるよう、
     カードのインク/サブインク/罫はフェーズ変数を「経由」して読む。 */
  --paper-ink:  var(--ink);                  /* カード内本文色 */
  --paper-dim:  rgba(39,68,94,.62);          /* カード内サブ・EN小書き */
  --paper-line: var(--line);                 /* カード内の細罫 */
  --field-ink:  var(--ink);                  /* カード外（空の上）の文字色 */
  --field-dim:  rgba(39,68,94,.66);

  --w: min(1180px, 92vw);
  --pad: clamp(84px, 13vh, 168px);
  --radius: 18px;

  /* ふわっと浮かぶオーバーシュート（§1） */
  --ease-up:   cubic-bezier(.34, 1.4, .64, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);

  --ff-jp: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  --ff-en: "Quicksand", "Zen Maru Gothic", sans-serif;

  --shadow:  0 12px 34px rgba(39,68,94,.12), 0 2px 8px rgba(39,68,94,.07);
  --shadow-h:0 20px 52px rgba(39,68,94,.18), 0 4px 12px rgba(39,68,94,.10);
}

/* =========================================================================
   空のフェーズ転調 — §1表。body[data-sky] が app.js から付く。
   背景グラデと派生インクが 1.2s でクロスフェード。
   sky.js の canvas はこのグラデの「前面」に浮く（雲・太陽）。
   ========================================================================= */
body[data-sky="morning"]   { --sky-top:#CBEAFA; --sky-bottom:#EAF7FD; }
body[data-sky="noon"]      { --sky-top:#8FD0F2; --sky-bottom:#C8EAF8; }
body[data-sky="afternoon"] { --sky-top:#9ED4EF; --sky-bottom:#FFE9C9; }
body[data-sky="golden"]    { --sky-top:#FFD9A0; --sky-bottom:#FFB877; }

/* dusk — 薄暮（藍＋残照）。--ink を反転、ただしカードは半透明白のまま読める。
   field（空の上の文字）は明色に、card（すりガラス）内は濃インクのまま。 */
body[data-sky="dusk"] {
  --sky-top:#8E7BB8; --sky-bottom:#F2A48F;
  --ink:#F6EFE9;
  --field-ink:#FBF4EE;                /* 空の上の文字は明色 */
  --field-dim:rgba(251,244,238,.74);
  --paper-ink:#27445E;               /* カード内は濃インクのまま（白カードで可読） */
  --paper-dim:rgba(39,68,94,.62);
  --paper-line:rgba(39,68,94,.16);
}

/* ---------- リセット ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  min-height: 100svh;
  /* bodyグラデ＝空（sky.js canvas はこの上に描く）。フェーズ変数で 1.2s クロスフェード */
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 100%) fixed;
  background-color: var(--sky-bottom);
  color: var(--field-ink);
  font-family: var(--ff-jp);
  font-weight: 500;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition:
    background-color 1.2s var(--ease-soft),
    color 1.2s var(--ease-soft);
}
/* グラデ自体はbackgroundのため変数遷移を効かせる擬似要素で重ねクロスフェードを補強 */
body::before {
  content: "";
  position: fixed; inset: 0;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 100%);
  z-index: 0;
  pointer-events: none;
  transition: background 1.2s var(--ease-soft);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ol, ul { list-style: none; }
em { font-style: italic; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(41,168,224,.22); }

/* sky.js canvas — 全画面fixed・z1（bodyグラデ z0 の前面、コンテンツ z2 の背面） */
#hw-sky {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 1;
  pointer-events: none;
  display: block;
}

.hw-en { font-family: var(--ff-en); }

/* =========================================================================
   HNFLOW — 横移動トラベルレイアウト（一日が左→右へ流れる）
   #hw-flow の height は flow.js が設定（手で書かない）。
   #hw-stage を sticky に固定し、その中で #hw-track を translateX。
   各 .hw-panel は1画面幅・1画面高に収め、縦スクロールバーを出さない。
   ========================================================================= */
#hw-flow  { position: relative; z-index: 2; }
#hw-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
#hw-track { display: flex; height: 100%; will-change: transform; }

.hw-panel {
  flex: 0 0 auto;
  width: 100vw;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  padding: clamp(64px, 8vh, 110px) clamp(40px, 6vw, 120px);
  overflow: hidden;          /* パネル内に縦スクロールバーを出さない */
  position: relative;
}

/* ---------- 共通レイアウト ---------- */
/* 横レイアウトでは hw-wrap は中身の整列箱。幅は親パネル幅に従う。 */
.hw-wrap { width: 100%; max-width: var(--w); margin: 0 auto; position: relative; }
/* v1の .hw-section 縦パディングは横では不要（パネルが padding を持つ） */
.hw-section { position: relative; }

/* =========================================================================
   上部アルマナックHUD — 時刻 06:00→20:00 と 太陽が空を渡る細バー
   z-index はコンテンツ上・theater/modal(z60)下。
   ========================================================================= */
#hw-almanac {
  position: fixed;
  top: clamp(10px, 2vh, 22px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: clamp(.6em, 1.4vw, 1.1em);
  width: min(640px, 92vw);
  padding: .5em clamp(.9em, 2vw, 1.4em);
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  color: #27445E;                       /* dusk でも読めるよう固定（白地のため） */
  font-size: clamp(.66rem, 1.3vw, .8rem);
  line-height: 1.2;
  pointer-events: none;                 /* HUDはクリックを奪わない */
}
.hw-alm__label {
  flex: none; font-weight: 900; letter-spacing: .02em;
  color: var(--accent);
}
.hw-alm__time {
  flex: none;
  font-family: var(--ff-en); font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 1.18em; letter-spacing: .04em;
  color: #27445E;
}
.hw-alm__track {
  position: relative;
  flex: 1 1 auto; min-width: 60px;
  height: 3px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(41,168,224,.32), rgba(255,183,59,.5), rgba(255,142,60,.55));
}
.hw-alm__sun {
  position: absolute;
  top: 50%; left: 0;
  transform: translate(-50%, -50%);
  font-size: 1.15em; line-height: 1;
  color: var(--sun);
  text-shadow: 0 0 10px rgba(255,183,59,.85);
  transition: left .25s var(--ease-soft);
  will-change: left;
}
.hw-alm__wx {
  flex: none; font-weight: 700;
  color: rgba(39,68,94,.66);
  white-space: nowrap;
}

/* =========================================================================
   下部タイムライン — 8ステーション。flow.js が .is-active を付ける。
   ========================================================================= */
#hw-timeline {
  position: fixed;
  bottom: clamp(10px, 2.4vh, 22px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: stretch;
  gap: clamp(2px, .5vw, 8px);
  max-width: 96vw;
  padding: .3em .4em;
  border-radius: 18px;
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
}
#hw-timeline button {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: .05em;
  padding: .42em clamp(.5em, 1.2vw, 1em);
  border-radius: 12px;
  color: rgba(39,68,94,.7);
  line-height: 1.1;
  transition: background .28s var(--ease-soft), color .28s var(--ease-soft), transform .28s var(--ease-up);
}
#hw-timeline button:hover { transform: translateY(-2px); color: var(--accent); }
#hw-timeline button b {
  font-family: var(--ff-en); font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: clamp(.84rem, 1.7vw, 1.02rem);
  letter-spacing: .02em;
}
#hw-timeline button span {
  font-weight: 700;
  font-size: clamp(.56rem, 1.1vw, .68rem);
  white-space: nowrap;
}
#hw-timeline button.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(41,168,224,.34);
}
/* 現在地マーカー（上に小さな三角） */
#hw-timeline button.is-active::before {
  content: "";
  position: absolute;
  top: -7px; left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 6px solid var(--accent);
}

/* ---------- 見出し: 気象記号◯＋セクション名＋EN小書き ---------- */
.hw-head {
  display: flex; align-items: baseline; flex-wrap: wrap;
  gap: .2em .5em;
  font-weight: 900;
  font-size: clamp(1.5rem, 3.6vw, 2.5rem);
  letter-spacing: .01em;
  color: var(--field-ink);
  margin-bottom: .5em;
}
.hw-head__mark { color: var(--sun); text-shadow: 0 0 18px rgba(255,183,59,.5); }
.hw-head__ja { }
.hw-head__en {
  font-family: var(--ff-en);
  font-weight: 600;
  font-size: clamp(.72rem, 1.5vw, .98rem);
  letter-spacing: .14em;
  color: var(--field-dim);
}

.hw-lead {
  max-width: 42em;
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  color: var(--field-ink);
  margin: 0 0 2.2em;
}

/* ---------- 等圧線罫（SVGでなくCSS波線3本、ゆっくり横ドリフト） ---------- */
.hw-isobar {
  --iso: rgba(39,68,94,.14);
  height: 26px;
  margin: 0 0 clamp(40px, 7vh, 88px);
  background-image:
    radial-gradient(circle at 12px -8px, transparent 11px, var(--iso) 11px, var(--iso) 12px, transparent 12px),
    radial-gradient(circle at 12px -8px, transparent 11px, var(--iso) 11px, var(--iso) 12px, transparent 12px),
    radial-gradient(circle at 12px -8px, transparent 11px, var(--iso) 11px, var(--iso) 12px, transparent 12px);
  background-size: 24px 26px, 24px 26px, 24px 26px;
  background-position: 0 0, 8px 7px, 16px -6px;
  background-repeat: repeat-x;
  opacity: .9;
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  animation: hw-iso-drift 26s linear infinite;
}
body[data-sky="dusk"] .hw-isobar { --iso: rgba(251,244,238,.30); }
@keyframes hw-iso-drift { to { background-position: 240px 0, 248px 7px, 256px -6px; } }

/* ---------- カード共通（すりガラスの予報カード） ---------- */
.hw-card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(8px) saturate(1.15);
  backdrop-filter: blur(8px) saturate(1.15);
  color: var(--paper-ink);
  transition: transform .5s var(--ease-up), box-shadow .5s var(--ease-up);
}

/* ---------- 数字（巨大数字は Quicksand 700 tabular-nums） ---------- */
.hw-num {
  font-family: var(--ff-en);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

/* ---------- 出現アニメ（ふわっと浮かぶ・軽いオーバーシュート） ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px) scale(.98);
  transition: opacity .7s var(--ease-up), transform .7s var(--ease-up);
  will-change: opacity, transform;
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* =========================================================================
   2. HERO
   ========================================================================= */
/* hero パネルは予報カード（左）と大書き（右）の横構図 */
.hw-hero__wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 5vw, 80px);
  text-align: left;
}
.hw-forecast {
  flex: 0 1 min(520px, 46%);
  padding: clamp(24px, 2.6vw, 44px) clamp(22px, 2.4vw, 48px) clamp(26px, 2.6vw, 44px);
  text-align: center;
}
.hw-forecast__station {
  display: flex; align-items: center; justify-content: center; gap: .55em;
  margin-bottom: 1.1em;
}
.hw-sun-glyph {
  width: 1.5em; height: 1.5em; flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, var(--sun) 0 42%, var(--sun-hi) 64%, transparent 70%);
  box-shadow: 0 0 0 4px rgba(255,183,59,.18), 0 0 22px rgba(255,183,59,.6);
  position: relative;
}
.hw-sun-glyph::before {
  content: ""; position: absolute; inset: -42%;
  background:
    conic-gradient(from 0deg,
      rgba(255,183,59,.0) 0 6%, rgba(255,183,59,.55) 8%, rgba(255,183,59,0) 12%) ;
  mask: radial-gradient(circle, transparent 52%, #000 53%);
  -webkit-mask: radial-gradient(circle, transparent 52%, #000 53%);
  animation: hw-spin 18s linear infinite;
}
.hw-forecast__name {
  font-weight: 900;
  font-size: clamp(1.4rem, 3.4vw, 2.05rem);
  line-height: 1.25;
  color: var(--paper-ink);
  display: flex; flex-direction: column; gap: .12em;
}
.hw-forecast__name .hw-en {
  font-weight: 600;
  font-size: .42em;
  letter-spacing: .16em;
  color: var(--paper-dim);
}
.hw-forecast__date {
  font-family: var(--ff-en);
  font-weight: 600;
  letter-spacing: .08em;
  font-size: clamp(.95rem, 1.8vw, 1.12rem);
  color: var(--accent);
  margin-bottom: .7em;
}
.hw-forecast__lead {
  font-weight: 900;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.18;
  letter-spacing: .02em;
  color: var(--paper-ink);
  margin-bottom: .5em;
}
.hw-forecast__data {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: .4em 1em;
  margin: 0 auto 1.1em;
  font-size: clamp(.92rem, 1.7vw, 1.08rem);
}
.hw-forecast__metric { display: flex; align-items: baseline; gap: .5em; }
.hw-forecast__metric dt { color: var(--paper-dim); font-weight: 700; }
.hw-forecast__metric dd { display: flex; align-items: baseline; gap: .08em; }
.hw-forecast__metric .hw-num { font-size: 1.7em; color: var(--accent); }
.hw-forecast__metric .hw-unit { font-family: var(--ff-en); font-weight: 700; color: var(--accent); }
.hw-forecast__div { color: var(--paper-line); font-weight: 700; }
.hw-forecast__note {
  font-size: clamp(.84rem, 1.5vw, .96rem);
  color: var(--paper-dim);
}

/* タグライン大書き — ページ最大の文字（右側、縦書き気味の改行で伸びやかに） */
.hw-tagline {
  flex: 0 1 auto;
  font-weight: 900;
  font-size: clamp(2.6rem, 7.6vw, 6.4rem);
  line-height: 1.04;
  letter-spacing: .02em;
  color: var(--field-ink);
  text-shadow: 0 6px 26px rgba(255,255,255,.45);
}

/* 速報チップ */
.hw-flash {
  position: absolute;
  right: clamp(14px, 4vw, 64px);
  bottom: clamp(86px, 14vh, 140px);
  display: flex; align-items: center; gap: .6em;
  max-width: min(380px, 84vw);
  padding: .7em 1.1em;
  background: var(--card);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 999px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--paper-ink);
  font-size: clamp(.74rem, 1.4vw, .86rem);
  line-height: 1.35;
  text-align: left;
  transition: transform .4s var(--ease-up), box-shadow .4s var(--ease-up);
}
.hw-flash:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); }
.hw-flash__dot {
  width: .62em; height: .62em; flex: none; border-radius: 50%;
  background: var(--happy);
  box-shadow: 0 0 0 0 rgba(255,125,163,.6);
  animation: hw-pulse 1.8s ease-out infinite;
}
.hw-flash__label {
  flex: none; font-weight: 700; color: var(--happy);
  font-size: .92em;
}
.hw-flash__body { color: var(--paper-dim); font-weight: 700; }

.hw-scrollcue {
  position: absolute; left: clamp(40px, 6vw, 120px); bottom: clamp(86px, 14vh, 140px);
  transform: none;
  font-family: var(--ff-en); font-weight: 600;
  letter-spacing: .1em;
  font-size: .86rem;
  color: var(--field-dim);
  display: inline-flex; align-items: center; gap: .4em;
}
.hw-scrollcue span { animation: hw-bob 2.2s ease-in-out infinite; }

@keyframes hw-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,125,163,.55); }
  70% { box-shadow: 0 0 0 10px rgba(255,125,163,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,125,163,0); }
}
@keyframes hw-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@keyframes hw-spin { to { transform: rotate(360deg); } }

/* =========================================================================
   3. 観測速報 — 最新シングル
   ========================================================================= */
/* 観測速報パネル: 見出しを詰めて100svh内に */
.hw-observation .hw-head { margin-bottom: clamp(.4em, 2vh, .8em); }
.hw-observation__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  max-height: min(74svh, 620px);
}
/* 左サムネは縦に溢れないよう上限を設ける */
.hw-obs__thumbwrap { min-width: 0; }
/* 右レポートは中身が多い場合のみ内部スクロール（パネル本体は無スクロール維持） */
.hw-obs__report { max-height: min(74svh, 620px); overflow: auto; }
.hw-obs__thumbwrap { position: relative; }
.hw-obs__thumb {
  display: block; width: 100%; position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 16/9;
  background: rgba(255,255,255,.4);
  border: 1px solid rgba(255,255,255,.5);
  transition: transform .5s var(--ease-up), box-shadow .5s var(--ease-up);
}
.hw-obs__thumb:hover { transform: translateY(-4px) scale(1.01); box-shadow: var(--shadow-h); }
.hw-obs__thumb img { width: 100%; height: 100%; object-fit: cover; }
/* MV未収録時の「観測準備中」プレースホルダ（晴れ間の地に太陽） */
.hw-obs__pending {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center; gap: .35em;
  text-align: center;
  background: linear-gradient(170deg, #DFF1FB 0%, #FBF0D8 100%);
}
.hw-obs__pending b {
  font-size: 2.8rem; line-height: 1; color: var(--sun);
  filter: drop-shadow(0 4px 10px rgba(255,183,59,.4));
  animation: hw-pending-pulse 3.2s ease-in-out infinite;
}
@keyframes hw-pending-pulse { 0%,100% { transform: scale(1); opacity: .92; } 50% { transform: scale(1.08); opacity: 1; } }
.hw-obs__pending-ja { font-family: var(--ff-jp, inherit); font-weight: 700; font-size: .92rem; color: var(--ink); }
.hw-obs__pending .hw-en { font-size: .62rem; letter-spacing: .24em; color: var(--paper-dim); }
@media (prefers-reduced-motion: reduce) { .hw-obs__pending b { animation: none; } }
.hw-obs__play {
  position: absolute; inset: 0; margin: auto;
  width: 72px; height: 72px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--card);
  color: var(--accent);
  font-size: 1.5rem;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
/* 観測印（円スタンプ風） */
.hw-stamp {
  position: absolute; top: 14px; right: 14px;
  width: clamp(86px, 13vw, 116px); height: clamp(86px, 13vw, 116px);
  border-radius: 50%;
  border: 2px solid var(--sun-hi);
  background: rgba(255,255,255,.82);
  color: var(--sun-hi);
  display: grid; place-content: center; text-align: center;
  font-weight: 900; line-height: 1.25;
  font-size: clamp(.62rem, 1.3vw, .76rem);
  transform: rotate(-9deg);
  box-shadow: 0 4px 14px rgba(255,142,60,.22);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.hw-stamp b { display: block; font-size: 1.18em; }
.hw-stamp .hw-en { font-family: var(--ff-en); font-size: .82em; letter-spacing: .04em; }

/* 観測レポートプラカード（右） */
.hw-obs__report {
  padding: clamp(22px, 3vw, 34px);
  display: flex; flex-direction: column;
}
.hw-obs__no {
  font-family: var(--ff-en); font-weight: 700;
  color: var(--accent); letter-spacing: .06em;
  font-size: .9rem; margin-bottom: .3em;
}
.hw-obs__title {
  font-weight: 900; font-size: clamp(1.3rem, 3vw, 1.8rem); line-height: 1.2;
  color: var(--paper-ink); margin-bottom: .6em;
}
.hw-obs__meta {
  font-size: .92rem; color: var(--paper-dim);
  border-top: 1px solid var(--paper-line);
  padding-top: .8em; margin-top: .2em;
}
.hw-obs__meta dl { display: grid; grid-template-columns: auto 1fr; gap: .25em .9em; }
.hw-obs__meta dt { font-weight: 700; color: var(--paper-dim); }
.hw-obs__meta dd { color: var(--paper-ink); font-weight: 700; }
.hw-obs__tracks {
  margin-top: 1em; padding-top: .9em;
  border-top: 1px solid var(--paper-line);
  display: flex; flex-direction: column; gap: .15em;
}
.hw-obs__tracks-cap { font-size: .78rem; font-weight: 700; color: var(--paper-dim); margin-bottom: .3em; letter-spacing: .04em; }
.hw-track {
  display: flex; align-items: center; gap: .5em;
  width: 100%; text-align: left;
  padding: .42em .6em; border-radius: 12px;
  font-size: .92rem; color: var(--paper-ink);
  transition: background .25s var(--ease-soft);
}
button.hw-track:hover { background: rgba(41,168,224,.1); }
.hw-track__mark { color: var(--sun); flex: none; }
.hw-track__c { margin-left: auto; font-size: .82em; color: var(--paper-dim); font-weight: 700; }
.hw-track__play { color: var(--accent); font-size: .82em; flex: none; }

/* =========================================================================
   4. 日照記録
   ========================================================================= */
/* ---- 日照記録パネル = 横一列フィルムストリップ ----
   このパネルだけ width:auto（中身幅）。先頭に見出し＋ランキングの
   プレートを置き、17枚の観測カードが右へ流れる。 */
#hw-records {
  width: auto;
  flex-direction: row;
  align-items: center;
  gap: clamp(24px, 3vw, 56px);
}
.hw-records__top {
  flex: 0 0 auto;
  align-self: center;
  width: clamp(220px, 22vw, 300px);
  display: flex; flex-direction: column; gap: clamp(14px, 2.4vh, 26px);
  margin-bottom: 0;
}
.hw-records__top .hw-head { margin-bottom: 0; flex-direction: column; align-items: flex-start; }
.hw-rank {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 14px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding: .85em 1.1em;
  min-width: 0; width: 100%;
  color: var(--paper-ink);
}
.hw-rank__cap {
  font-weight: 900; font-size: .82rem; color: var(--sun-hi);
  margin-bottom: .35em; letter-spacing: .04em;
}
.hw-rank__list { display: flex; flex-direction: column; gap: .12em; font-size: .82rem; }
.hw-rank__row { display: flex; align-items: baseline; gap: .5em; }
.hw-rank__pos { font-family: var(--ff-en); font-weight: 700; color: var(--accent); flex: none; }
.hw-rank__title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-rank__views { margin-left: auto; color: var(--paper-dim); font-weight: 700; flex: none; }

.hw-records__grid {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;          /* カードは内容高で中央寄せ（縦の余白を作らない） */
  gap: clamp(16px, 1.6vw, 26px);
  max-height: min(78svh, 600px);
}
.hw-rec {
  flex: 0 0 auto;
  width: clamp(180px, 18vw, 230px);
  display: flex; flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.hw-rec__thumb {
  position: relative; display: block;
  aspect-ratio: 16/9; overflow: hidden;
  background: rgba(255,255,255,.4);
}
.hw-rec__thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity .35s var(--ease-soft);
}
.hw-rec__sun {
  position: absolute; top: 9px; left: 9px;
  font-size: 1.15rem; color: var(--sun);
  text-shadow: 0 0 12px rgba(255,183,59,.7);
}
.hw-rec__play {
  position: absolute; inset: auto 9px 9px auto;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card); color: var(--accent);
  font-size: .85rem; box-shadow: var(--shadow);
  opacity: 0; transition: opacity .3s var(--ease-soft);
}
.hw-rec:hover .hw-rec__play { opacity: 1; }
.hw-rec__body { padding: .9em 1em 1.1em; display: flex; flex-direction: column; gap: .12em; }
.hw-rec__no { font-family: var(--ff-en); font-weight: 700; color: var(--accent); font-size: .78rem; letter-spacing: .04em; }
.hw-rec__title { font-weight: 900; font-size: 1rem; line-height: 1.3; color: var(--paper-ink); }
.hw-rec__date { font-family: var(--ff-en); font-weight: 600; font-size: .8rem; color: var(--paper-dim); }
.hw-rec__center { font-size: .82rem; color: var(--paper-dim); font-weight: 700; }
.hw-rec__views {
  margin-top: .35em; font-size: .82rem; color: var(--paper-ink);
  display: flex; align-items: baseline; gap: .4em;
}
.hw-rec__views .hw-num { color: var(--sun-hi); }
.hw-rec__views small { font-family: var(--ff-en); font-weight: 600; color: var(--paper-dim); letter-spacing: .06em; }

/* 末尾の空カード No.18 観測待ち（予報円の点線枠） */
.hw-rec--empty {
  flex: 0 0 auto;
  width: clamp(180px, 18vw, 230px);
  border-radius: var(--radius);
  background: rgba(255,255,255,.4);
  border: 2px dashed var(--paper-line);
  box-shadow: none;
  display: grid; place-content: center; text-align: center;
  min-height: 200px; gap: .3em;
  color: var(--paper-dim);
}
.hw-rec--empty .hw-rec__circle {
  width: 54px; height: 54px; margin: 0 auto .3em;
  border-radius: 50%; border: 2px dashed var(--accent); opacity: .6;
}
.hw-rec--empty .hw-rec__no { color: var(--accent); }
.hw-rec--empty .hw-rec__wait { font-weight: 900; color: var(--paper-dim); }

/* =========================================================================
   5. 太陽図鑑 — 日輪ポートレート
   ========================================================================= */
/* ---- 太陽図鑑パネル = 横に少し長い密なクラウド（120vw許容） ---- */
/* 太陽図鑑は「横に流れる太陽の回廊」。内容幅(width:auto)で右へ続く。
   左に序文＋フィルタの縦コラム、右に大きな日輪が縦2段で横へ流れる。 */
#hw-encyclopedia { width: auto; }
.hw-encyclopedia__wrap {
  max-width: none;
  width: auto;
  height: 100%;
  display: flex; flex-direction: row; align-items: center;
  gap: clamp(36px, 4vw, 84px);
}
.hw-encyclopedia__head {
  flex: 0 0 auto;
  width: clamp(300px, 26vw, 400px);
  display: flex; flex-direction: column; gap: .6em;
}
.hw-encyclopedia .hw-head { margin-bottom: 0; }
.hw-encyclopedia .hw-lead { margin: 0; max-width: 50em; }

.hw-filter {
  display: flex; flex-wrap: wrap; gap: .5em;
  margin-bottom: 0;
}
.hw-chip {
  padding: .5em 1.1em; border-radius: 999px;
  font-weight: 700; font-size: .9rem;
  color: var(--field-ink);
  background: var(--card);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 4px 12px rgba(39,68,94,.08);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform .3s var(--ease-up), background .3s var(--ease-soft), color .3s var(--ease-soft);
}
.hw-chip:hover { transform: translateY(-2px); }
.hw-chip.is-on { background: var(--accent); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(41,168,224,.34); }

.hw-suns {
  flex: 0 0 auto;
  height: 100%;
  /* 縦に2段、上から詰めて右の新しい列へ折り返す＝横へ流れる太陽の列 */
  display: flex; flex-direction: column; flex-wrap: wrap;
  align-content: flex-start; justify-content: center;
  gap: clamp(18px, 3vh, 40px) clamp(30px, 2.8vw, 58px);
  padding: 0;
  overflow: visible;
}
.hw-sun {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: .6em;
  transition: transform .5s var(--ease-up), opacity .45s var(--ease-soft);
}
/* 横回廊では大きな日輪を整列。浮遊オフセットは使わない（縦フォールバックで復活） */

.hw-sun__halo {
  position: relative;
  border-radius: 50%;
  padding: 6px;
  background: conic-gradient(from 0deg,
    var(--sun) 0deg, var(--sun-hi) 60deg, rgba(255,255,255,.0) 120deg,
    var(--sun) 180deg, var(--sun-hi) 240deg, rgba(255,255,255,.0) 300deg, var(--sun) 360deg);
  box-shadow: 0 8px 24px rgba(255,183,59,.28);
  transition: box-shadow .5s var(--ease-up), transform .5s var(--ease-up);
}
.hw-sun__halo::after {
  /* 回転する光冠（ホバーで強まる） */
  content: ""; position: absolute; inset: -8px;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    rgba(255,183,59,.0) 0deg, rgba(255,183,59,.6) 20deg, rgba(255,183,59,0) 40deg,
    rgba(255,183,59,.0) 120deg, rgba(255,183,59,.55) 140deg, rgba(255,183,59,0) 160deg,
    rgba(255,183,59,.0) 240deg, rgba(255,183,59,.5) 260deg, rgba(255,183,59,0) 280deg);
  opacity: 0; pointer-events: none;
  transition: opacity .6s var(--ease-soft);
}
.hw-sun__photo {
  width: 100%; aspect-ratio: 1; border-radius: 50%;
  overflow: hidden; background: rgba(255,255,255,.55);
  display: block;
}
.hw-sun__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.hw-sun__name { font-weight: 700; font-size: .9rem; color: var(--field-ink); text-align: center; line-height: 1.3; }
.hw-sun__grad { font-size: .68rem; font-weight: 700; color: var(--happy); }

/* 大きさ3段（期生で）— 横回廊なので大きく。視認性優先で従来比およそ3倍。
   svh基準で縦2段が必ず1画面に収まるよう自動調整。 */
.hw-sun__halo { width: 100%; }
.hw-sun--lg { width: clamp(230px, 30svh, 320px); }
.hw-sun--md { width: clamp(208px, 27svh, 288px); }
.hw-sun--sm { width: clamp(188px, 24svh, 256px); }
.hw-sun__name { font-size: clamp(.92rem, 1.1vw, 1.12rem); }
.hw-sun__grad { font-size: clamp(.72rem, .9vw, .84rem); }
/* 大きな日輪は整列させて視認性を優先（浮遊オフセットは無効化） */
.hw-sun:nth-child(3n), .hw-sun:nth-child(4n) { transform: none; }
.hw-sun:nth-child(5n+2) { transform: translateY(-11px); }
.hw-sun:nth-child(7n+1) { transform: translateY(9px); }

.hw-sun button.hw-sun__halo { cursor: pointer; display: block; }
.hw-sun button.hw-sun__halo:hover { transform: scale(1.05); box-shadow: 0 14px 34px rgba(255,183,59,.45); }
.hw-sun button.hw-sun__halo:hover::after { opacity: 1; animation: hw-spin 9s linear infinite; }

/* =========================================================================
   6. 全国晴れ予報 — ドット日本地図
   ========================================================================= */
/* ---- 全国晴れ予報パネル: 地図(左)＋予報ボード(右) を100svh内に ---- */
.hw-forecast-map__wrap {
  height: 100%;
  display: flex; flex-direction: column;
  justify-content: center;
  gap: clamp(12px, 2vh, 24px);
}
.hw-forecast-map__intro { flex: 0 0 auto; }
.hw-forecast-map__intro .hw-head { margin-bottom: .25em; }
.hw-forecast-map__intro .hw-lead { margin: 0; }
.hw-map__grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, .95fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: center;
}
.hw-map__stage {
  display: flex; align-items: center; justify-content: center;
  height: 100%;
  /* 気象レーダー盤＝ほぼ白の不透明カード。どの空の色でもドットが明瞭に読める下地。 */
  background:
    radial-gradient(120% 120% at 50% 40%, rgba(255,255,255,.97), rgba(234,247,253,.95));
  border: 1px solid rgba(41,168,224,.22);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding: clamp(14px, 2vw, 26px);
}
/* SVGは高さ100svh内にfit（縦が支配的なviewBoxなので max-height で抑える） */
.hw-map {
  display: block;
  width: auto; max-width: 100%;
  height: 100%; max-height: min(64svh, 540px);
  overflow: hidden;          /* viewBox外（北方の離島など）はカード内でクリップ */
}

/* 日本列島の地図（実データ輪郭・県境付き）。空色のやわらかい陸地＋細い海岸線。 */
.hw-japan path {
  fill: rgba(41,168,224,.16);
  stroke: rgba(41,168,224,.5);
  stroke-width: 1;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* 県ドット（控えめ）。陸地の上の県庁所在地マーカー。 */
.hw-dot { fill: rgba(39,68,94,.32); transition: fill .3s var(--ease-soft); }
body[data-sky="dusk"] .hw-dot { fill: rgba(39,68,94,.32); }

/* 公演地（☀点灯・明滅） */
.hw-sundot { cursor: default; }
.hw-sundot__glow { fill: var(--sun); opacity: .28; animation: hw-blink 3.2s ease-in-out infinite; }
.hw-sundot__core { fill: var(--sun); }
.hw-sundot__ray  { stroke: var(--sun-hi); stroke-width: 1.6; stroke-linecap: round; }
.hw-sundot.is-hot .hw-sundot__glow { opacity: .55; animation-duration: 1.1s; }
.hw-sundot.is-hot .hw-sundot__core { fill: var(--sun-hi); }
@keyframes hw-blink { 0%,100% { opacity: .22; } 50% { opacity: .5; } }

.hw-chip-date {
  font-family: var(--ff-en); font-weight: 700; font-size: 11px;
  fill: var(--ink);
}
.hw-chip-bg { fill: rgba(255,255,255,.9); stroke: var(--sun-hi); stroke-width: 1; }
body[data-sky="dusk"] .hw-chip-date { fill: #27445E; }

/* 予報ボード */
.hw-board {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding: clamp(18px, 2.4vw, 28px);
  color: var(--paper-ink);
  max-height: min(64svh, 540px); overflow-y: auto;
}
.hw-board__cap { font-weight: 900; color: var(--sun-hi); margin-bottom: .8em; font-size: 1rem; }
.hw-board__cap span { color: var(--sun); }
.hw-board__list { display: flex; flex-direction: column; gap: .35em; }
.hw-show {
  display: grid; grid-template-columns: auto 1fr; gap: .2em .8em;
  align-items: baseline;
  padding: .65em .7em; border-radius: 12px;
  transition: background .25s var(--ease-soft);
  cursor: default;
}
.hw-show.is-hot, .hw-show:hover { background: rgba(255,183,59,.16); }
.hw-show__date {
  grid-row: span 2;
  font-family: var(--ff-en); font-weight: 700; color: var(--accent);
  font-size: .92rem; white-space: nowrap;
}
.hw-show__name { font-weight: 700; font-size: .92rem; color: var(--paper-ink); line-height: 1.35; }
.hw-show__venue { font-size: .8rem; color: var(--paper-dim); }
.hw-show__today {
  display: inline-block; margin-left: .5em;
  font-size: .68rem; font-weight: 900; color: #fff;
  background: var(--happy); border-radius: 999px;
  padding: .1em .7em; vertical-align: middle;
}
.hw-board__empty { color: var(--paper-dim); font-size: .9rem; }

/* =========================================================================
   7a. 観測統計
   ========================================================================= */
.hw-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 2vw, 28px);
  text-align: center;
  margin-bottom: 1.6em;
}
.hw-stat {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding: clamp(20px, 3vw, 36px) 1em;
  color: var(--paper-ink);
}
.hw-stat .hw-num {
  display: block;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1; color: var(--accent);
  margin-bottom: .2em;
}
.hw-stat dt { font-weight: 700; font-size: .92rem; color: var(--paper-dim); }
.hw-stat--wide .hw-num { color: var(--sun-hi); }
.hw-stats__note {
  text-align: center;
  font-size: clamp(.95rem, 1.7vw, 1.1rem);
  color: var(--field-ink); font-weight: 700;
}

/* =========================================================================
   7b. おひさまへ
   ========================================================================= */
.hw-tothe__lead {
  font-weight: 900; font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  line-height: 1.4; color: var(--field-ink); margin-bottom: .4em;
}
.hw-tothe__sub {
  font-size: clamp(1rem, 1.9vw, 1.25rem); color: var(--field-ink);
  margin-bottom: 2.4em;
}
.hw-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2vw, 24px);
}
.hw-link {
  display: flex; flex-direction: column; gap: .35em;
  padding: clamp(20px, 3vw, 30px);
  border-radius: var(--radius);
}
.hw-link:hover { transform: translateY(-5px); box-shadow: var(--shadow-h); }
.hw-link__label { font-weight: 900; color: var(--accent); font-size: 1rem; }
.hw-link__val { font-family: var(--ff-en); font-weight: 600; color: var(--paper-dim); font-size: .92rem; line-height: 1.5; }

/* =========================================================================
   7c. 奥付
   ========================================================================= */
.hw-colophon { position: relative; }
.hw-colophon .hw-wrap { max-width: 52em; }
.hw-colophon__close {
  font-weight: 900; font-size: clamp(1.2rem, 3vw, 1.8rem);
  line-height: 1.5; color: var(--field-ink); margin-bottom: .3em;
}
.hw-colophon__en {
  font-family: var(--ff-en); font-weight: 600; letter-spacing: .04em;
  color: var(--field-dim); margin-bottom: 2.2em;
}
.hw-colophon__fine { font-size: .82rem; color: var(--field-dim); line-height: 1.9; }
.hw-colophon__fine a { color: var(--field-ink); border-bottom: 1px solid var(--field-dim); }

/* 地平線に半分沈む小さな太陽（横レイアウトでは右下に沈む） */
.hw-horizon {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: clamp(80px, 18vh, 180px);
  overflow: hidden; pointer-events: none;
}
.hw-horizon__sun {
  position: absolute; right: clamp(48px, 12vw, 200px); bottom: -48px;
  width: clamp(96px, 14vw, 160px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, var(--sun-hi) 0 55%, var(--happy) 100%);
  box-shadow: 0 0 60px 14px rgba(255,142,60,.5);
}
/* 縦フォールバックでは中央に戻す */
body.hw-vertical .hw-horizon__sun {
  right: auto; left: 50%; transform: translateX(-50%); bottom: -42px;
  width: 96px;
}

/* =========================================================================
   シアター（YouTube facade モーダル）
   ========================================================================= */
.hw-theater, .hw-modal {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: clamp(14px, 4vw, 48px);
}
.hw-theater__scrim, .hw-modal__scrim {
  position: absolute; inset: 0;
  background: rgba(39,68,94,.5);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .35s var(--ease-soft);
}
.hw-theater.is-open .hw-theater__scrim, .hw-modal.is-open .hw-modal__scrim { opacity: 1; }
.hw-theater__box {
  position: relative; width: min(960px, 100%);
  aspect-ratio: 16/9;
  border-radius: var(--radius); overflow: hidden;
  background: #0b1726;
  box-shadow: 0 30px 80px rgba(39,68,94,.5);
  transform: translateY(18px) scale(.97); opacity: 0;
  transition: transform .4s var(--ease-up), opacity .4s var(--ease-up);
}
.hw-theater.is-open .hw-theater__box { transform: none; opacity: 1; }
.hw-theater__frame { width: 100%; height: 100%; }
.hw-theater__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.hw-theater__close, .hw-modal__close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--card); color: var(--ink);
  font-size: 1.4rem; line-height: 1;
  display: grid; place-items: center;
  box-shadow: var(--shadow);
}

/* 観測データカード（モーダル） */
.hw-modal__card {
  position: relative; width: min(560px, 100%);
  max-height: 88svh; overflow-y: auto;
  padding: clamp(24px, 4vw, 40px);
  transform: translateY(18px) scale(.97); opacity: 0;
  transition: transform .4s var(--ease-up), opacity .4s var(--ease-up);
}
.hw-modal.is-open .hw-modal__card { transform: none; opacity: 1; }
.hw-modal__close { top: 12px; right: 12px; }
.hw-modal__portrait {
  width: clamp(140px, 34vw, 190px); aspect-ratio: 1; margin: 0 auto 1.2em;
  border-radius: 50%; overflow: hidden;
  padding: 6px;
  background: conic-gradient(from 0deg, var(--sun), var(--sun-hi), var(--happy), var(--sun));
  box-shadow: 0 10px 30px rgba(255,183,59,.32);
}
.hw-modal__portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; border-radius: 50%; }
.hw-modal__body { text-align: center; }
.hw-modal__name { font-weight: 900; font-size: clamp(1.4rem, 4vw, 1.9rem); color: var(--paper-ink); }
.hw-modal__kana { font-size: .92rem; color: var(--paper-dim); }
.hw-modal__romaji { font-family: var(--ff-en); font-weight: 600; letter-spacing: .1em; color: var(--accent); font-size: .82rem; margin-bottom: 1em; }
.hw-modal__grad {
  display: inline-block; margin: 0 0 1em;
  font-size: .76rem; font-weight: 900; color: #fff;
  background: var(--happy); border-radius: 999px; padding: .2em 1em;
}
/* 気象観測表の様式 */
.hw-modal__table {
  display: grid; grid-template-columns: auto 1fr;
  gap: .1em 0; text-align: left;
  border-top: 1px solid var(--paper-line);
  margin-top: .4em;
}
.hw-modal__row { display: contents; }
.hw-modal__row dt, .hw-modal__row dd {
  padding: .6em .2em; border-bottom: 1px solid var(--paper-line);
  font-size: .92rem;
}
.hw-modal__row dt { font-weight: 700; color: var(--paper-dim); }
.hw-modal__row dd { color: var(--paper-ink); font-weight: 700; text-align: right; }
.hw-modal__ig {
  display: inline-block; margin-top: 1.2em;
  padding: .55em 1.4em; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: .9rem;
  box-shadow: 0 6px 18px rgba(41,168,224,.3);
}

/* =========================================================================
   縦フォールバック — body.hw-vertical（flow.js が モバイル<=860px / reduced-motion で付与）
   横移動を解除し v1相当の縦積みに戻す（読みやすさ確保）。
   ========================================================================= */
body.hw-vertical #hw-flow  { height: auto !important; }
body.hw-vertical #hw-stage { position: static; height: auto; overflow: visible; }
body.hw-vertical #hw-track { flex-direction: column; height: auto; transform: none !important; will-change: auto; }

body.hw-vertical .hw-panel {
  width: 100% !important;
  height: auto;
  min-height: auto;
  overflow: visible;
  justify-content: flex-start;
  padding: clamp(72px, 10vh, 120px) clamp(20px, 6vw, 64px);
}
/* heroだけは縦でも余白多めの“扉”に */
body.hw-vertical #hw-hero {
  min-height: 100svh;
  justify-content: center;
  padding-top: clamp(96px, 14vh, 160px);
}

/* hero: 縦は中央寄せの一列（v1相当） */
body.hw-vertical .hw-hero__wrap {
  flex-direction: column; align-items: center; text-align: center;
  gap: clamp(28px, 5vh, 56px);
}
body.hw-vertical .hw-forecast { flex: 0 0 auto; width: min(640px, 100%); }
body.hw-vertical .hw-tagline { font-size: clamp(2.8rem, 11vw, 7.2rem); }
body.hw-vertical .hw-scrollcue {
  left: 50%; transform: translateX(-50%);
  bottom: clamp(18px, 4vh, 32px);
}
body.hw-vertical .hw-flash {
  right: clamp(14px, 4vw, 44px); bottom: clamp(20px, 6vh, 90px);
}

/* 観測速報: 内部スクロール解除・縦積み */
body.hw-vertical .hw-observation__grid { max-height: none; }
body.hw-vertical .hw-obs__report { max-height: none; overflow: visible; }

/* 日照記録: 横スワイプのフィルムストリップ（パネルは全幅に戻す） */
body.hw-vertical #hw-records { width: 100% !important; flex-direction: column; align-items: stretch; gap: clamp(24px, 4vh, 44px); }
body.hw-vertical .hw-records__top {
  flex-direction: row; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 16px 24px;
  width: auto;
}
body.hw-vertical .hw-records__top .hw-head { flex-direction: row; }
body.hw-vertical .hw-records__grid {
  height: auto;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: .4em;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
body.hw-vertical .hw-rec { scroll-snap-align: start; }

/* 太陽図鑑: 縦時は「見出し → 太陽(中央寄せ折返し)」の縦積み。
   横回廊用の row + 固定幅見出しコラムを解除しないと、狭い画面で太陽が押し出される。 */
body.hw-vertical #hw-encyclopedia { width: 100% !important; }
body.hw-vertical .hw-encyclopedia__wrap {
  flex-direction: column; align-items: stretch;
  width: 100%; height: auto;
  justify-content: flex-start; gap: clamp(18px, 3vh, 32px);
}
body.hw-vertical .hw-encyclopedia__head { width: 100%; }
body.hw-vertical .hw-suns {
  height: auto; flex: 0 0 auto; overflow: visible;
  flex-direction: row; flex-wrap: wrap;
  justify-content: center; align-content: flex-start;
  gap: clamp(14px, 3vw, 22px);
}
body.hw-vertical .hw-sun--lg { width: clamp(120px, 30vw, 168px); }
body.hw-vertical .hw-sun--md { width: clamp(104px, 26vw, 144px); }
body.hw-vertical .hw-sun--sm { width: clamp(90px, 22vw, 124px); }

/* 全国晴れ予報: 縦は1カラム、地図高さ制限を解除 */
body.hw-vertical .hw-forecast-map__wrap { height: auto; }
body.hw-vertical .hw-map__grid { display: grid; grid-template-columns: 1fr; }
body.hw-vertical .hw-map__stage { height: auto; }
body.hw-vertical .hw-map { width: 100%; height: auto; max-height: none; }
body.hw-vertical .hw-board { max-height: none; }

/* 統計: 縦は2列 */
body.hw-vertical .hw-colophon { padding-bottom: clamp(120px, 20vh, 220px); }

/* =========================================================================
   レスポンシブ
   ========================================================================= */
@media (max-width: 860px) {
  .hw-observation__grid { grid-template-columns: 1fr; }
  .hw-map__grid { grid-template-columns: 1fr; }
  .hw-board { max-height: none; }
  .hw-stats__grid { grid-template-columns: repeat(2, 1fr); }
  .hw-stat--wide { grid-column: span 2; }
  .hw-links { grid-template-columns: 1fr; }
  .hw-flash { right: 50%; transform: translateX(50%); }
  .hw-flash:hover { transform: translateX(50%) translateY(-3px); }
  .hw-sun:nth-child(n) { transform: none; }   /* モバイルは整列、空浮遊オフセット解除 */

  /* タイムラインはモバイルでは横スクロール可（全幅の細バー）。HUDは上部に残す */
  #hw-timeline {
    left: 0; right: 0; transform: none;
    width: 100%; max-width: 100%;
    border-radius: 0;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  #hw-timeline::-webkit-scrollbar { display: none; }
  #hw-timeline button { flex: 0 0 auto; }
  /* タイムライン分の下余白を確保（縦積み最後のパネル） */
  body.hw-vertical #hw-colophon { padding-bottom: clamp(110px, 18vh, 180px); }
  #hw-almanac { width: 94vw; }
}
@media (max-width: 520px) {
  body.hw-vertical .hw-rec { width: clamp(150px, 64vw, 200px); }
  .hw-rank { min-width: 0; width: 100%; }
  .hw-alm__wx { display: none; }   /* 狭幅は天気文を省略してバーを優先 */
}

/* =========================================================================
   reduced-motion — 完全対応（出現は即時表示、各アニメ停止）
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .hw-sundot__glow { opacity: .4 !important; }
  .hw-scrollcue span, .hw-flash__dot { animation: none !important; }
}
