/* =========================================================
   毎日の天気図ポータル　By ＠sora  - style.css
   ========================================================= */
:root {
  --navy-900: #06263a;
  --navy-800: #0b3d5c;
  --navy-700: #12547a;
  --sky-500: #2b8ccc;
  --sky-400: #4aa8e0;
  --sky-100: #e6f2fa;
  --amber-500: #f0a13a;
  --amber-100: #fdf1de;
  --ink-900: #16232c;
  --ink-700: #33474f;
  --ink-500: #5d7078;
  --line: #d5e2ea;
  --bg: #f2f7fa;
  --card: #ffffff;
  --ok: #1f8a5f;
  --warn: #c1682a;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 3px rgba(6, 38, 58, .09);
  --shadow-md: 0 6px 20px rgba(6, 38, 58, .12);
  --shadow-lg: 0 18px 50px rgba(6, 38, 58, .30);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 132px; }

body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: var(--ink-900);
  background: var(--bg);
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; }

.wrap {
  width: min(1180px, 100% - 2.4rem);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- ヘッダー ---------- */
#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 0 .7rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
}

.brand-icon {
  font-size: 1.9rem;
  color: var(--amber-500);
  flex: none;
}

.brand-text h1 {
  margin: 0;
  font-size: 1.32rem;
  font-weight: 900;
  letter-spacing: .02em;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand-title-text {
  min-width: 0;
  margin-right: 1rem;
}

/* タイトル右横の円形アイコン（＠sora） */
.brand-avatar {
  flex: none;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--amber-500);
  background: #fff;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .4);
  vertical-align: middle;
}

.brand-sub {
  margin: .1rem 0 0;
  font-size: .78rem;
  color: #b9d7e8;
  font-weight: 500;
}

.clock-box {
  flex: none;
  text-align: right;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: var(--radius-sm);
  padding: .35rem .8rem;
  line-height: 1.25;
}

.clock-label {
  display: block;
  font-size: .66rem;
  color: #b9d7e8;
  letter-spacing: .06em;
}

#js-clock {
  display: block;
  font-size: 1.32rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

#js-date {
  display: block;
  font-size: .72rem;
  color: #d7e9f4;
  font-variant-numeric: tabular-nums;
}

/* ---------- ページ内ナビ ---------- */
#site-nav {
  background: rgba(255, 255, 255, .07);
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.nav-scroll {
  display: flex;
  gap: .1rem;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.nav-scroll a {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem .85rem;
  min-width: 0;
  font-size: .84rem;
  font-weight: 500;
  color: #dceef8;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
}

.nav-scroll a:hover,
.nav-scroll a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border-bottom-color: var(--amber-500);
}

/* ---------- イントロ ---------- */
.intro {
  margin: 1.6rem 0 .4rem;
  background: linear-gradient(120deg, var(--sky-100), #fff 70%);
  border: 1px solid var(--line);
  border-left: 5px solid var(--sky-500);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-sm);
}

.intro-text { margin: 0; font-size: .95rem; }

.intro-note {
  margin: .55rem 0 0;
  font-size: .82rem;
  color: var(--ink-500);
}

.intro-note i { color: var(--sky-500); }

/* ---------- セクション共通 ---------- */
.chart-section,
.embed-section,
.links-section {
  margin: 2.4rem 0;
  scroll-margin-top: 132px;
}

.section-head {
  margin-bottom: 1rem;
  padding-bottom: .55rem;
  border-bottom: 2px solid var(--line);
}

.section-head h2 {
  margin: 0;
  font-size: 1.24rem;
  font-weight: 900;
  color: var(--navy-800);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.section-head h2 i { color: var(--sky-500); }

.section-desc {
  margin: .22rem 0 0;
  font-size: .85rem;
  color: var(--ink-500);
}

.section-desc a { color: var(--sky-500); font-weight: 700; }

/* ---------- 天気図グリッド ---------- */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.chart-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .18s, transform .18s, border-color .18s;
}

.chart-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #b7d2e2;
}

/* ワイド表示の天気図カード（アジア地上解析図・24/48時間天気図 など） */
.chart-card--wide {
  grid-column: 1 / -1;
}

.chart-card--wide .chart-title {
  font-size: 1.02rem;
}

.chart-card--wide .chart-figure {
  min-height: 380px;
  padding: .85rem;
}

.chart-card--wide .chart-figure img {
  max-height: 860px;
  width: auto;
  max-width: 100%;
  margin-inline: auto;
}

.chart-card--wide .step-picker select {
  max-width: 15rem;
  font-size: .84rem;
}

/* 航空気象：4枚を2列で大きく表示 */
#grid-aviation {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.3rem;
}

#grid-aviation .chart-title {
  font-size: .95rem;
}

#grid-aviation .chart-code {
  font-size: .74rem;
}

#grid-aviation .chart-figure {
  min-height: 330px;
  padding: .8rem;
}

#grid-aviation .chart-figure img {
  max-height: 620px;
  width: auto;
  max-width: 100%;
  margin-inline: auto;
}

#grid-aviation .step-picker select {
  max-width: 15rem;
  font-size: .82rem;
}

.chart-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .6rem;
  padding: .7rem .85rem .55rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfdff, #f2f8fc);
}

.chart-code {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
  background: var(--navy-700);
  padding: .1rem .5rem;
  border-radius: 999px;
  margin-bottom: .28rem;
}

.chart-title {
  margin: 0;
  font-size: .88rem;
  font-weight: 700;
  color: var(--ink-900);
  line-height: 1.45;
}

.chart-meta {
  flex: none;
  text-align: right;
  font-size: .7rem;
  color: var(--ink-500);
  line-height: 1.5;
  white-space: nowrap;
}

.chart-meta .badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  padding: .08rem .45rem;
  border-radius: 999px;
  border: 1px solid currentColor;
}

.badge-ok { color: var(--ok); background: #e9f7f1; }
.badge-loading { color: var(--warn); background: var(--amber-100); }
.badge-error { color: #b0342e; background: #fdeceb; }

.chart-figure {
  margin: 0;
  padding: .6rem;
  background:
    linear-gradient(45deg, #eef4f8 25%, transparent 25%, transparent 75%, #eef4f8 75%) 0 0 / 16px 16px,
    linear-gradient(45deg, #eef4f8 25%, transparent 25%, transparent 75%, #eef4f8 75%) 8px 8px / 16px 16px,
    #f7fbfd;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 190px;
  position: relative;
}

.chart-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: 0 1px 4px rgba(6, 38, 58, .14);
  cursor: zoom-in;
  display: block;
}

.chart-figure img.is-loading { opacity: .35; }

.chart-figure .ph {
  color: var(--ink-500);
  font-size: .8rem;
  text-align: center;
  padding: 1rem;
}

.chart-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .5rem .85rem .7rem;
  border-top: 1px solid var(--line);
  background: #fbfdff;
}

.step-picker {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .76rem;
  color: var(--ink-700);
}

.step-picker label { font-weight: 700; }

.step-picker select {
  font: inherit;
  font-size: .78rem;
  padding: .18rem .4rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-900);
  max-width: 11.5rem;
}

.chart-actions { display: flex; gap: .35rem; flex: none; }

.btn-mini {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  font: inherit;
  font-size: .74rem;
  font-weight: 700;
  padding: .28rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy-700);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}

.btn-mini:hover,
.btn-mini:focus-visible {
  background: var(--navy-700);
  color: #fff;
  border-color: var(--navy-700);
}

.grid-status {
  margin: .8rem 0 0;
  font-size: .78rem;
  color: var(--ink-500);
}

/* ---------- 埋め込みカード ---------- */
.embed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.2rem;
}

.embed-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.embed-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  flex-wrap: wrap;
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfdff, #f2f8fc);
}

.embed-card-head h3 {
  margin: 0;
  font-size: .92rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .45rem;
  color: var(--ink-900);
}

.embed-card-head h3 i { color: var(--sky-500); }

.embed-actions { display: flex; gap: .35rem; flex: none; }

.iframe-box {
  position: relative;
  width: 100%;
  background: #dfe9ef;
}

/* 地域天気の埋め込みを大きく表示 */
.embed-grid--large {
  grid-template-columns: 1fr;
  gap: 1.4rem;
}

.embed-grid--large .embed-card {
  box-shadow: var(--shadow-md);
}

.embed-grid--large .embed-card-head h3 {
  font-size: 1.02rem;
}

.embed-grid--large .iframe-box.ratio-4-3 {
  padding-top: 58%;
}

.embed-grid--large .iframe-box {
  min-height: 480px;
}

.iframe-box iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.ratio-4-3 { padding-top: 75%; }
.ratio-16-9 { padding-top: 56.25%; }

/* ---------- ライブカメラ ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.video-card {
  position: relative;
  display: block;
  background: #10232e;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s;
}

.video-card:hover,
.video-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #10232e;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-thumb .play-badge {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(200, 32, 32, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .45);
  transition: transform .15s, background .15s;
}

.video-card:hover .play-badge { transform: scale(1.1); background: #e02020; }

.video-live {
  position: absolute;
  top: .5rem;
  left: .5rem;
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .08em;
  background: #e02020;
  color: #fff;
  padding: .1rem .45rem;
  border-radius: 4px;
}

.video-info { padding: .6rem .75rem .75rem; }

.video-info h3 {
  margin: 0;
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.5;
  color: #eaf4fa;
}

.video-info p, .video-meta {
  margin: .2rem 0 0;
  font-size: .72rem;
  color: #9dbccd;
}

/* サムネイル（ページ内再生ボタン） */
.video-thumb-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}

.video-thumb-btn:focus-visible {
  outline: 3px solid var(--amber-500);
  outline-offset: -3px;
}

/* カード内のボタン列 */
.video-actions {
  margin-top: .6rem;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.video-play-btn {
  flex: 1;
  min-width: 130px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  font: inherit;
  font-size: .76rem;
  font-weight: 700;
  padding: .35rem .6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--amber-500);
  background: var(--amber-500);
  color: #22303a;
  cursor: pointer;
  transition: filter .15s, transform .15s;
}

.video-play-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }

.video-watch {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .74rem;
  font-weight: 700;
  padding: .35rem .6rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, .35);
  color: #dceef8;
  text-decoration: none;
  transition: background .15s;
}

.video-watch:hover { background: rgba(255, 255, 255, .14); }

/* リンク型カードの全体リンク */
.video-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* モーダル内の動画プレーヤー */
.modal-video {
  width: 100%;
  max-width: 1000px;
  margin-inline: auto;
}

.modal-video[hidden] { display: none; }

.modal-video .modal-video-frame,
.modal-video iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  border-radius: 8px;
  background: #000;
  display: block;
}

.modal-video-note {
  margin: .6rem 0 0;
  font-size: .76rem;
  color: var(--ink-700);
  text-align: center;
  line-height: 1.6;
}

.modal-video-note i { color: var(--sky-500); }

/* リンク型のカメラカード（YouTube以外） */
.video-card--link .video-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy-800), var(--sky-500));
}

.video-thumb--link i {
  font-size: 2.6rem;
  color: rgba(255, 255, 255, .9);
}

.video-card--link .play-badge {
  background: rgba(255, 255, 255, .18);
}

/* ---------- リンク集 ---------- */
.link-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.1rem;
}

.link-group {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .85rem 1rem 1rem;
  box-shadow: var(--shadow-sm);
}

.link-group h3 {
  margin: 0 0 .6rem;
  font-size: .9rem;
  font-weight: 900;
  color: var(--navy-800);
  display: flex;
  align-items: center;
  gap: .45rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--line);
}

.link-group h3 i { color: var(--amber-500); }

.link-group ul { margin: 0; padding: 0; list-style: none; }

.link-group li { margin: .32rem 0; }

.link-group a {
  display: flex;
  align-items: baseline;
  gap: .45rem;
  font-size: .82rem;
  color: var(--ink-700);
  text-decoration: none;
  padding: .25rem .35rem;
  border-radius: 6px;
  transition: background .14s, color .14s;
}

.link-group a:hover,
.link-group a:focus-visible {
  background: var(--sky-100);
  color: var(--navy-800);
}

.link-group a .tag {
  flex: none;
  font-size: .66rem;
  font-weight: 700;
  color: #fff;
  background: var(--sky-500);
  border-radius: 4px;
  padding: .02rem .32rem;
}

.link-group a i.fa-arrow-up-right-from-square {
  font-size: .62rem;
  color: var(--ink-500);
  margin-left: auto;
}

/* ---------- サブ見出し／航空・資料 ---------- */
.sub-head {
  margin: 1.8rem 0 .8rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy-800);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.sub-head i { color: var(--amber-500); }

.embed-foot-note {
  margin: 0;
  padding: .5rem .85rem .7rem;
  font-size: .74rem;
  color: var(--ink-500);
}

/* 外部リンクの縦リスト */
.ext-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: .5rem;
}

.ext-link {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .8rem;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--sky-500);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--ink-900);
  font-size: .82rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: background .15s, border-color .15s, transform .15s;
}

.ext-link:hover,
.ext-link:focus-visible {
  background: var(--sky-100);
  border-left-color: var(--navy-700);
  transform: translateX(2px);
}

.ext-link .tag {
  flex: none;
  font-size: .64rem;
  font-weight: 700;
  color: #fff;
  background: var(--navy-700);
  border-radius: 4px;
  padding: .02rem .34rem;
}

.ext-link-text { flex: 1; min-width: 0; }

.ext-link i.fa-arrow-up-right-from-square {
  flex: none;
  font-size: .68rem;
  color: var(--ink-500);
}

/* MetAir（ログインが必要な案内） */
.metair-box {
  padding: 1rem 1.1rem 1.15rem;
  background: linear-gradient(120deg, var(--amber-100), #fff 75%);
}

.metair-note {
  margin: 0 0 .7rem;
  font-size: .82rem;
  line-height: 1.7;
  color: var(--ink-700);
}

.metair-note i { color: var(--warn); }

.metair-list { margin: 0; padding: 0; list-style: none; }

.metair-list li { margin: .35rem 0; }

.metair-list a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--navy-700);
  text-decoration: none;
  padding: .35rem .6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.metair-list a:hover { background: var(--sky-100); }

.metair-list .tag {
  display: inline-block;
  font-size: .62rem;
  font-weight: 700;
  color: #fff;
  background: var(--sky-500);
  border-radius: 4px;
  padding: .02rem .32rem;
  margin-right: .2rem;
}

/* 資料・外部カード */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.1rem;
}

.ext-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .9rem 1rem 1rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.ext-card h3 {
  margin: 0 0 .4rem;
  font-size: .92rem;
  font-weight: 900;
  color: var(--navy-800);
  display: flex;
  align-items: center;
  gap: .45rem;
}

.ext-card h3 i { color: #c0392b; }

.ext-card-desc {
  margin: 0 0 .25rem;
  font-size: .8rem;
  color: var(--ink-700);
}

.ext-card-note {
  margin: 0 0 .8rem;
  font-size: .74rem;
  color: var(--ink-500);
}

.ext-card-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}

.ext-card-actions .site-button { flex: 1; min-width: 150px; }

/* ---------- ボタン一覧（links.html） ---------- */
.btn-group {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .85rem 1rem 1rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.1rem;
}

.btn-group h3 {
  margin: 0 0 .7rem;
  font-size: .95rem;
  font-weight: 900;
  color: var(--navy-800);
  display: flex;
  align-items: center;
  gap: .45rem;
  padding-bottom: .45rem;
  border-bottom: 1px solid var(--line);
}

.btn-group h3 i { color: var(--amber-500); }

.btn-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: .5rem;
}

.btn-row {
  display: flex;
  align-items: stretch;
  gap: .4rem;
  min-width: 0;
}

.site-button {
  flex: 1;
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--navy-700), var(--sky-500));
  border: 1px solid var(--navy-700);
  border-radius: var(--radius-sm);
  padding: .5rem .65rem;
  font-size: .82rem;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(11, 61, 92, .18);
  transition: transform .14s, box-shadow .14s, filter .14s;
}

.site-button:hover,
.site-button:focus-visible {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(11, 61, 92, .26);
}

.site-button-tag {
  flex: none;
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .03em;
  background: rgba(255, 255, 255, .22);
  border-radius: 4px;
  padding: .03rem .38rem;
  white-space: nowrap;
}

.site-button-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-button-icon { font-size: .68rem; opacity: .9; flex: none; }

.btn-copy {
  flex: none;
  font: inherit;
  font-size: .74rem;
  font-weight: 700;
  padding: .35rem .6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy-700);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}

.btn-copy:hover { background: var(--sky-100); }

.btn-copy.is-copied {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}

/* ---------- コードボックス ---------- */
.code-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1.1rem;
}

.code-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  flex-wrap: wrap;
  padding: .6rem .85rem;
  background: linear-gradient(180deg, #fbfdff, #f2f8fc);
  border-bottom: 1px solid var(--line);
  font-size: .84rem;
  font-weight: 700;
  color: var(--navy-800);
}

.btn-primary {
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  padding: .35rem .8rem;
  border-radius: 999px;
  border: 1px solid var(--navy-700);
  background: var(--navy-700);
  color: #fff;
  cursor: pointer;
  transition: filter .15s;
}

.btn-primary:hover { filter: brightness(1.12); }

.code-box textarea {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  padding: .8rem .9rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: .76rem;
  line-height: 1.65;
  color: var(--ink-900);
  background: #f8fbfd;
  resize: vertical;
  display: block;
}

.code-hint {
  margin: 0;
  padding: .6rem .9rem .8rem;
  font-size: .76rem;
  color: var(--ink-500);
}

.code-hint code {
  background: var(--sky-100);
  padding: .05rem .32rem;
  border-radius: 4px;
  font-size: .74rem;
  color: var(--navy-800);
}

/* ---------- 解説資料（PDF） ---------- */
.kaisetsu-section { margin: 2.4rem 0; scroll-margin-top: 132px; }

.kaisetsu-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: linear-gradient(120deg, var(--amber-100), #fff 62%);
  border: 1px solid var(--line);
  border-left: 5px solid var(--amber-500);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-sm);
}

.kaisetsu-info { min-width: 0; }

.kaisetsu-info h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  color: var(--navy-800);
  display: flex;
  align-items: center;
  gap: .45rem;
}

.kaisetsu-info h3 i { color: #c0392b; }

.kaisetsu-meta {
  margin: .4rem 0 0;
  font-size: .84rem;
  color: var(--ink-700);
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
}

.kaisetsu-desc {
  margin: .35rem 0 0;
  font-size: .78rem;
  color: var(--ink-500);
}

.kaisetsu-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  flex: none;
}

.pdf-picker {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .76rem;
  color: var(--ink-700);
  font-weight: 700;
}

.pdf-picker input[type="date"] {
  font: inherit;
  font-size: .78rem;
  padding: .24rem .4rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-900);
}

.pdf-history {
  margin: .6rem 0 0;
  font-size: .78rem;
  color: var(--ink-500);
}

.pdf-history a { color: var(--sky-500); font-weight: 700; }

/* ---------- MetAir（ログイン必要） ---------- */
.metair-box { padding: .9rem 1rem 1rem; background: #fbfdff; }

.metair-note {
  margin: 0 0 .7rem;
  font-size: .8rem;
  color: var(--ink-700);
  background: var(--amber-100);
  border: 1px solid #f0d9b5;
  border-radius: var(--radius-sm);
  padding: .55rem .7rem;
  line-height: 1.6;
}

.metair-note i { color: var(--warn); }

.metair-list { margin: 0; padding: 0; list-style: none; }

.metair-list li { margin: .35rem 0; }

.metair-list a {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--navy-700);
  text-decoration: none;
  padding: .35rem .5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: background .14s, color .14s, border-color .14s;
}

.metair-list a:hover,
.metair-list a:focus-visible {
  background: var(--sky-100);
  border-color: #b7d2e2;
}

.metair-list .tag {
  flex: none;
  font-size: .66rem;
  font-weight: 900;
  color: #fff;
  background: var(--sky-500);
  border-radius: 4px;
  padding: .03rem .35rem;
}

.metair-list a i { margin-left: auto; font-size: .68rem; color: var(--ink-500); }

/* ---------- フッター ---------- */
#site-footer {
  margin-top: 3rem;
  background: var(--navy-900);
  color: #a9c8d9;
  padding: 1.4rem 0 1.6rem;
  font-size: .78rem;
}

.footer-note { margin: 0 0 .5rem; line-height: 1.75; }

.footer-copy {
  margin: 0;
  text-align: right;
  color: #6d93a9;
  font-weight: 700;
  letter-spacing: .06em;
}

/* ---------- モーダル ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 20, 30, .82);
  backdrop-filter: blur(2px);
}

.modal-panel {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: min(1100px, 100%);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  flex-wrap: wrap;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--navy-800);
  color: #fff;
}

.modal-head h3 { margin: 0; font-size: .98rem; font-weight: 700; }

.modal-tools { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }

.modal-time { font-size: .76rem; color: #b9d7e8; font-variant-numeric: tabular-nums; }

.modal-head .btn-mini {
  border-color: rgba(255, 255, 255, .4);
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.modal-head .btn-mini:hover {
  background: #fff;
  color: var(--navy-800);
}

.modal-body {
  overflow: auto;
  background: #eef4f8;
  text-align: center;
  padding: .6rem;
}

.modal-body img {
  width: auto;
  max-width: 100%;
  height: auto;
  background: #fff;
  border-radius: 6px;
}

.modal-iframe {
  width: 100%;
  height: 72vh;
}

.modal-iframe iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  border-radius: 6px;
  background: #fff;
}

.chart-title-box { min-width: 0; }

body.modal-open { overflow: hidden; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 900px) {
  .chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #grid-aviation { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .embed-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  html { scroll-padding-top: 118px; }
  .wrap { width: min(1180px, 100% - 1.6rem); }
  .header-inner { flex-wrap: wrap; gap: .5rem; padding-bottom: .55rem; }
  .brand-icon { font-size: 1.5rem; }
  .brand-text h1 { font-size: 1.05rem; }
  .brand-text h1 { gap: .7rem; }
  .brand-avatar { width: 54px; height: 54px; }
  .brand-sub { font-size: .68rem; }
  .clock-box { padding: .28rem .6rem; }
  #js-clock { font-size: 1.05rem; }
  .nav-scroll a { font-size: .78rem; padding: .45rem .55rem; }
  .nav-scroll { flex-wrap: wrap; overflow-x: visible; gap: 0; }
  .chart-grid { grid-template-columns: 1fr; }
  #grid-aviation { grid-template-columns: 1fr; }
  #grid-aviation .chart-figure { min-height: 200px; }
  .chart-card--wide .chart-figure { min-height: 220px; }
  .chart-card--wide .step-picker select { max-width: none; }
  .video-grid { grid-template-columns: 1fr; }
  .chart-card-foot { flex-wrap: wrap; }
  .step-picker { width: 100%; }
  .step-picker select { flex: 1; max-width: none; }
  .modal { padding: .4rem; }
  .modal-head { padding: .55rem .7rem; }
  .embed-grid--large .iframe-box { min-height: 380px; }
  .embed-grid--large .iframe-box.ratio-4-3 { padding-top: 72%; }
  .embed-grid--large .embed-card-head h3 { font-size: .92rem; }
  .footer-copy { text-align: left; }
}

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