/* 共通設定 */
body {
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
  background: #ffff;
  color: #666;
  overflow-x: hidden;
}
.sp-only {
  display: none;
}


a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
/* =========================================
   ヘッダー一式（置き換えOK）
   - 下スクロールで隠す / 上スクロールで再表示
   - 影の付与（スクロール時）
   - モーション配慮
   ========================================= */

/* 固定ヘッダー分の押し下げ：JSで高さを代入（--header-h） */
:root { --header-h: 0px; }
body { padding-top: var(--header-h); }

/* レイアウト */
.site-header {
  background: #1C5896;      /* C85 M50 Y4 K0 */
  color: #fff;
  position: sticky;         /* fixedでもOK。sticky推奨 */
  top: 0;
  z-index: 9999;
  margin-bottom: 20px;      /* ヘッダーとfirst-viewの余白 */

  /* アニメーション/視覚 */
  will-change: transform;
  transition: transform .28s ease, box-shadow .2s ease, background-color .2s ease;
  background: #1C5896; /* 透過しない場合はそのまま */
}

/* コンテンツの横並び */
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
}

/* 下スクロール時に隠す（JSで .hide を付与） */
.site-header.hide {
  transform: translateY(-100%);
}

/* 少しでもスクロールしたら影を付ける（JSで .is-scrolled を付与） */
.site-header.is-scrolled {
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}

/* モーション控えめ設定に配慮 */
@media (prefers-reduced-motion: reduce) {
  .site-header { transition: none; }
}

/* スマホ時のレイアウト（必要なら） */
@media (max-width: 768px) {
  .site-header .container { flex-direction: column; }
}

/* フローティングボタン：指定色に統一＆ホバーは濃色 */
/* ===== ヘッダー内の floating-icon を“ボタン化” ===== */
.floating-icon {
  display: inline-block;
  background: linear-gradient(135deg, #ffffff, #e6e8ec); /* ← 白〜薄グレー */
  color: #1C5896;                  /* 差し色：ブランド青 */
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.5px;
  border: 2px solid rgba(28,88,150,0.25);  /* 青みの薄い枠でブランド感 */
  box-shadow:
    0 8px 18px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.9);     /* うっすら内側ハイライト */
  backdrop-filter: saturate(120%) blur(2px); /* ガラス感の演出（対応ブラウザで効く） */
  transition: background .3s ease, transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.floating-icon:hover {
  transform: translateY(-3px) scale(1.04);
  background: linear-gradient(135deg, #f9fafc, #dfe3e8); /* 少しコントラストUP */
  border-color: rgba(28,88,150,0.45);                   /* 枠を濃くして強調 */
  box-shadow: 0 10px 22px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,1);
}

.floating-icon:active {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 6px 14px rgba(0,0,0,.2), inset 0 2px 0 rgba(0,0,0,.05);
}

/* キーボードフォーカス（アクセシビリティ） */
.floating-icon:focus-visible {
  outline: 3px solid rgba(28,88,150,.35);
  outline-offset: 2px;
}

/* リボン付きバリエーション：ベースを継承して差し色を強調 */
.floating-icon--ribbon {
  position: relative;
  padding-right: 40px;                            /* リボン分の余白 */
  border-color: rgba(28,88,150,0.45) !important;  /* 枠は少し強めに */
}

/* リボン（“NEW”バッジ）。色はゴールド＋細枠に青の影を少し */
.floating-icon--ribbon::after {
  content: "NEW";
  position: absolute;
  top: -10px;
  right: -10px;
  background: #FFD700;     /* ゴールド */
  color: #222;
  font-weight: 900;
  font-size: 0.7rem;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid rgba(28,88,150,.25);
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  transform: rotate(8deg);
}

.floating-icon--ribbon:hover {
  /* hover時はベースのhoverが効くので transform だけ軽く上乗せ */
  transform: translateY(-3px) scale(1.05);
}

.logo-area {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo {
  height: 60px;
}
.brand-name {
  color: #fff;
  font-weight: bold;
  margin-left: 8px;
  font-size: 1.4rem;
}

nav a {
  margin-left: 20px;
  font-weight: bold;
  color: #fff;
}

/* === ファーストビューのPCレイアウト === */
.first-view-top {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}
.location-title {
  font-family: "Noto Sans JP", sans-serif;
  position: absolute;
  top: 10px;
  left: 10px;
  margin: 0;
  padding: 6px 12px;

  display: flex;
  align-items: center;
  gap: 10px;

  color: #fff;                         /* 白文字 */
  background: rgba(0,0,0,0.6);         /* 黒半透明 */
  border-radius: 8px;
  font-size: clamp(10px, 2vw, 18px);

  z-index: 3;
  pointer-events: none; /* iframe操作を邪魔しない */
}

/* 長い地名は省略表示 */
.location-title .js-location-name{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 56vw;
}

/* 赤いLIVEピル */
.live-pill{
  pointer-events: none;
  font-weight: 800;
  font-size: 11px;
  line-height: 1;
  padding: 5px 8px 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff3b3b, #d40000);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  text-shadow: 0 1px 1px rgba(0,0,0,0.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 2px 6px rgba(0,0,0,.2);
  letter-spacing: .06em;
}

/* （任意）ピルの左に小さな発光ドットを付けたい場合 */
 .live-pill::before{
   content:"";
   display:inline-block;
   width:6px; height:6px;
   margin-right:6px;
   border-radius:50%;
   background:#fff;
   box-shadow: 0 0 6px rgba(255,255,255,.9);
 }

@media (max-width: 768px){
  .location-title{
    top: 200px; left: 8px;
    padding: 6px 10px;
    gap: 8px;
  }
  .location-title .js-location-name{ max-width: 64vw; }
  .live-pill{ font-size: 10px; padding: 4px 7px 3px; }
}

/* ライブ映像ラッパー */
.live-wrapper {
  flex: 0 0 73%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  position: relative;
}

.live-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover; /* 黒帯防止 */
}

/* 広告エリア */
.ads-grid {
  flex: 0 0 27%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ads-grid .ad-box {
  width: 300px;
  height: 160px;         /* 固定高さ（ここが基準サイズ） */
  border-radius: 10px;
  background: #ccc;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.ads-grid .ad-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;     /* 余白なしで切り抜き */
}
/* ===== ライブ切替サムネ（first-view下） ===== */
.camera-thumbs {
  margin: 14px 0 20px;
  width: 73%;
  max-width: 1200px;
  /* ここは“枠”なのでスクロールを持たせない */
  display: block;              /* ← flexである必要なし（任意） */
  box-sizing: border-box;
}

/* SPは全幅に */
@media (max-width: 768px) {
  .camera-thumbs { width: 100%; }
}

/* 中身が流れる“窓”：← ここをスクロール可能にする */
.camera-thumbs .thumbs-viewport {
  overflow-x: auto;            /* ← 横スクロールは viewport に */
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  padding: 6px 0 10px;       /* 余白はここで付ける */
  scroll-snap-type: x proximity;/* 止まりを少し良くする（任意） */
}

/* 横一列の“トラック”（ここだけを横に長くする） */
.camera-thumbs .thumbs-track {
  display: flex;
  flex-wrap: nowrap;           /* ← 折り返さない */
  gap: 12px;
  align-items: stretch;
  will-change: transform;
}

/* 1カードの幅（PCは固定、SPは画面に合わせて少し広めに） */
.camera-thumbs .thumb {
  flex: 0 0 200px;             /* PCの1枚幅 */
  scroll-snap-align: start;
}
@media (max-width: 1024px) { .camera-thumbs .thumb { flex-basis: 180px; } }
@media (max-width: 768px)  { .camera-thumbs .thumb { flex-basis: 62vw; } }

/* 見た目（既存のまま流用） */
.camera-thumbs .thumb {
  appearance: none;
  border: 2px solid transparent;
  background: #fff;
  border-radius: 10px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
  transition: transform .15s ease, box-shadow .15s ease, border-color .2s ease;
}
.camera-thumbs .thumb:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0,0,0,.12); }
.camera-thumbs .thumb.is-active { border-color: #1C5896; box-shadow: 0 10px 18px rgba(28,88,150,.18); }
.camera-thumbs .thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.camera-thumbs .thumb span { font-size: .9rem; font-weight: 600; color: #333; line-height: 1.2; text-align: center; }

/* （任意）スクロールバーの見た目 */
.camera-thumbs .thumbs-viewport::-webkit-scrollbar { height: 8px; }
.camera-thumbs .thumbs-viewport::-webkit-scrollbar-thumb { background: rgba(0,0,0,.2); border-radius: 4px; }

/* ===== サムネ＋CTA行 ===== */
.thumbs-row {
  display: flex;
  gap: 16px;                    /* ← 行間の余白。CTA幅の計算に使うので下のcalcと合わせる */
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}

/* 右側CTA（PCのみ表示） */
.livecam-cta {
  /* 73%（サムネ） + 27%（CTA） + gap だとオーバーするので gap 分を引く */
  flex: 0 0 calc(27% - 16px);   /* ← gap と同じ値を引く */
  width: 100%;
  margin: 14px 0 20px;   /* 上下余白を揃える */
  padding: 6px 4px 10px; /* 内側余白を揃える */
  box-sizing: border-box;
  display: flex;
  align-items: center;   /* 中身の縦位置をそろえる */
}

/* CTAカードの見た目（サイズ控えめに） */
.livecam-cta__inner {
  width: 100%;
  height: 100%;
  min-height: 140px;            /* ← 少し低めに調整（以前:160px） */
  padding: 14px 14px;           /* ← 余白を控えめに */
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff, #f3f7fb);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  border: 1px solid rgba(0,0,0,.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}

.livecam-cta__title {
  margin: 0 0 6px;
  font-size: 1.15rem;           /* ← 以前より少し小さく */
  font-weight: 800;
  line-height: 1.3;
  color: #023a4e;
}

.livecam-cta__text {
  margin: 0 0 10px;             /* ← 余白を詰める */
  font-size: .9rem;
  line-height: 1.5;
  color: #566;
}

.livecam-cta__btn {
  display: inline-block;
  padding: 10px 16px;           /* ← ボタンも少し小さめに */
  border-radius: 999px;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  background: linear-gradient(135deg, #1C5896, #2a7d9e);
  color: #fff;
  box-shadow: 0 6px 14px rgba(28,88,150,.18);
  transition: transform .15s ease, box-shadow .15s ease, opacity .2s ease;
}
.livecam-cta__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(28,88,150,.24);
}

/* SPはCTAを非表示、サムネは全幅へ */
@media (max-width: 768px) {
  .thumbs-row { display: block; }
  .livecam-cta { display: none; }
  .camera-thumbs { width: 100%; } /* 既存と整合 */
}

/* 1024px以下（狭めPC/タブレット横）での微調整 */
@media (max-width: 1024px) {
  .thumbs-row { gap: 14px; }
  .livecam-cta {
    flex-basis: calc(27% - 14px);
    max-width: 300px;
    min-width: 240px;
  }
  .livecam-cta__title { font-size: 1.05rem; }
  .livecam-cta__text  { font-size: .88rem; }
  .livecam-cta__btn   { padding: 9px 14px; font-size: .88rem; }
}
/* サーフラインチャートセクション */
/* ===== Surflineチャート全体セクション ===== */
.surfline-chart-section {
  width: 100%;
  max-width: 1200px;      /* 最大幅を1200pxに制限 */
  margin: 0 auto;         /* センター配置 */
  padding: 0;
  position: relative;
  background-color: #ffff;
}
@media (max-width: 768px) {
  .surfline-chart-section {
    padding: 0 20px;
    border-radius: 15%;
    box-sizing: border-box;
  }
}
.chart-section-title {
  position: absolute;
  top: 10px;
  left: 10px;
  margin: 0;
  padding: 6px 12px;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  font-size: clamp(14px, 2vw, 18px);
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  z-index: 5;
  pointer-events: none; /* iframe操作の邪魔をしない */
}

@media (max-width: 768px) {
  .chart-section-title {
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    font-size: 14px;
  }
}

/* ===== チャートを表示するコンテナ ===== */
.chart-container {
  position: relative;
  width: 100%;
  height: 90vh;  /* 調整可能 */
  overflow: hidden;
}
@media (max-width: 768px) {
  .chart-container {
    height: 70vh;  /* 調整可能 */
  }
}
/* ▼ 右下に重ねる土台 */
.chart-overlay-btn {
  position: absolute;
  right: 16px;
  bottom: 50px; /* ← 少し上に調整（before: 12px） */
  z-index: 20;
  pointer-events: auto;

  /* floating-icon と同じデザインを流用 */
  display: inline-block;
  background: linear-gradient(135deg, #ffffff, #e6e8ec);
  color: #1C5896;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 50px;
  font-size: 1rem;
  letter-spacing: 0.5px;
  border: 2px solid rgba(28,88,150,0.25);
  box-shadow: 0 8px 18px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: saturate(120%) blur(2px);
  transition: background .3s ease, transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.chart-overlay-btn:hover {
  transform: translateY(-3px) scale(1.04);
  background: linear-gradient(135deg, #f9fafc, #dfe3e8);
  border-color: rgba(28,88,150,0.45);
  box-shadow: 0 10px 22px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,1);
}

/* ▼ スマホ対応（幅いっぱいに広げすぎない） */
@media (max-width: 768px) {
  .chart-overlay-btn {
    bottom: 65px;  /* ← 50px → 80px にして、Go Premium の上に常時かぶせる */
    right: 10px;
    font-size: 0.9rem;
    padding: 10px 16px;
    max-width: 80vw;
    text-align: center;
    z-index: 9998; /* ← 強制的に一番上に */
  }
}

/* ===== チャート埋め込みiframe ===== */
.chart-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
/* ===================== Promo Hero ===================== */
.promo-hero { margin: 32px 0 24px; }
.promo-hero .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

/* 1つのカードで囲む（画像＋説明） */
.promo-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr; /* 左：画像 / 右：テキスト */
  gap: 20px;
  align-items: center;
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;                 /* ← 枠外は出さない */
}

/* 左：画像 */
.promo-visual {
  border-radius: 12px;
  overflow: hidden;                 /* 角丸を画像に適用 */
}
.promo-visual .promo-image {
  display: block;
  width: 100%;
  height: auto;                     /* ← 高さ固定をやめる */
  aspect-ratio: 16 / 9;             /* ← 比率で制御（iOSでもOK） */
  object-fit: cover;
  object-position: center;
  max-height: 360px;                /* PCでの過拡大は上限を設定 */
}

/* 右：説明＋ボタン（縦並び） */
.promo-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 説明ボックス（中央揃え） */
.promo-desc {
  padding: 20px 22px;
  text-align: center;
  /* ↓ はみ出し防止（日本語でも安全に折り返し） */
  word-break: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
  box-sizing: border-box;
}
.promo-desc h2 {
  margin: 0 0 6px;
  font-weight: 800;
  color: #023a4e;
}
.promo-desc p {
  margin: 0;
  color: #334;
  line-height: 1.9;
}

/* CTAボタン（= LIVECAM一覧ボタンと同ルック） */
.promo-cta { text-align: center; }
.promo-cta .promo-cta__btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, #1C5896, #2a7d9e);
  box-shadow: 0 6px 14px rgba(28,88,150,.18);
  transition: transform .15s ease, box-shadow .15s ease, opacity .2s ease;
}
.promo-cta .promo-cta__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(28,88,150,.24);
}
.promo-cta .promo-cta__btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(28,88,150,.25), 0 10px 18px rgba(28,88,150,.24);
}
.promo-cta .promo-cta__btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(28,88,150,.18);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .promo-visual .promo-image { max-height: 340px; }
}

@media (max-width: 768px) {
  .promo-card {
    grid-template-columns: 1fr;  /* 縦積み */
    gap: 14px;
    padding: 12px;
  }
  .promo-visual .promo-image {
    aspect-ratio: 16 / 9;
    max-height: 260px;            /* 端末により過大化しないように上限 */
  }

  .promo-desc {
    padding: 16px;
    max-width: 640px;
    margin: 0 auto;               /* 中央寄せ */
  }
  .promo-desc br { display: none; }
  .promo-desc h2 { font-size: 1.3rem; }
  .promo-desc p  { font-size: .98rem; line-height: 1.85; }

  .promo-cta .promo-cta__btn {
    width: auto;
    min-width: 220px;
    padding: 12px 18px;
    font-size: .95rem;
    margin: 6px auto 0;
  }
  .promo-hero .container {
    padding: 0 20px;
  }
}

@media (max-width: 420px) {
  .promo-desc { padding: 14px; max-width: 92vw; }
  .promo-desc h2 { font-size: 1.2rem; }
  .promo-desc p  { font-size: .95rem; line-height: 1.8; }
  .promo-cta .promo-cta__btn { width: 100%; max-width: 250px; margin-bottom: 20px; }
}

/* 念のため：画像は常に枠内に収める（他所からのスタイル干渉対策） */
.promo-hero img { max-width: 100%; height: auto; display: block; }

/* フッター */
.site-footer {
  position: static;
  width: 100%;
  background: #1C5896; /* 添付の青に近い色味。必要なら微調整OK */
  color: #fff;
  text-align: center;
  padding: 18px 0 20px;
  font-size: 14px;
  box-sizing: border-box;
}

.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.footer-social,
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-social {
  gap: 6px;
  margin-bottom: 10px;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #fff;
  border-radius: 50%;
  /* アニメーション/トランジションは無し（リクエスト通り） */
}

.footer-links {
  margin: 6px 0 8px;
}
.footer-links li {
  padding: 0 12px;
  position: relative;
  white-space: nowrap;
}
.footer-links li + li {
  border-left: 1px solid rgba(255,255,255,.7);
}
.footer-links a { color: #fff; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

.footer-copy {
  font-size: 12px;
  opacity: .95;
}

/* モバイル微調整 */
@media (max-width: 768px) {
  .footer-links { flex-wrap: wrap; gap: 8px; }
  .footer-links li { border-left: none !important; padding: 0 6px; }
  .footer-copy { font-size: 11px; }
}


.adsense-placeholder {
  width: 100%;
  overflow-x: hidden;  /* ✅ 横はみ出し防止 */
  box-sizing: border-box;
  padding: 10px;
  margin: 30px auto;
}

.adsense-placeholder img {
  display: block;      /* ✅ inline-blockによるズレ防止 */
  max-width: 100%;
  width: 100%;         /* ✅ 強制的に親幅に合わせる */
  height: auto;
  object-fit: contain; /* ✅ 内容を歪めず収める */
}

@media (max-width: 768px) {

  /* ===== ファーストビュー全体 ===== */
  .first-view {
    flex-direction: column;
    padding: 10px;
    gap: 16px;
  }

  .first-view-top{
    display: grid;                       /* ← flexの代わりにgridで重ねられるように */
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
      "ads"
      "live";
    gap: 16px;                           /* 既存のgap相当。お好みで調整可 */
  }

  /* コンテナ余白削除 */
  .first-view .container {
    padding: 0;
  }

  /* ===== LIVEエリア ===== */
  .live-wrapper {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    grid-area: live;
    position: relative;
  }

  .live-wrapper iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: none;
  }

  /* ===== PC版広告はSPでは非表示 ===== */
  .ads-grid {
    display: none !important;
  }

  /* ===== SP専用広告スライダー（順序だけ変更） ===== */
  .ads-slider {
    order: -1;              /* ← 追加：LIVEの上に移動（親がflexのとき有効） */
    overflow: hidden;
    width: 100%;
    position: relative;
    margin-top: 10px;       /* ← ここはそのまま（他を変えない方針） */
    /* ※ 下に余白を付けたい場合のみ margin: 0 0 10px; に変更 */
    grid-area: ads;
  }

  .ads-track {
    display: flex;
    flex-direction: row;
    gap: 10px;
    will-change: transform;
  }

  .ads-track .ad {
    flex: 0 0 auto;
    width: 80vw; /* 1枚の横幅 */
    height: 160px;
    border-radius: 10px;
    overflow: hidden;
  }

  .ads-track .ad img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* ===== フッター ===== */
  .site-footer {
    position: static;
  }

  /* ===== ヘッダー ===== */
  .site-header .container {
    flex-direction: column;
  }

  .logo-area {
    margin-bottom: 8px;
  }

  .brand-name {
    font-size: 1.2rem;
  }
  .sp-only {
    display: inline;
  }
}

/* ====== ベース ====== */
.chart-block {
  position: relative;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

.chart-scroll-container {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  padding-bottom: 10px;
  position: relative;
}

.chart-inner {
  display: block;
  position: relative;
}

/* overlayCanvas */
#overlayCanvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: auto;
  z-index: 10;
}
/* 折れ線グラフ（スマホ対応） */
@media (max-width: 768px) {
  .tide-only .canvas-wrapper {
    overflow: visible;        /* 線や円が切れないように */
    position: relative;
  }
  #tideLineCanvas {
    height: 160px !important; /* ← 数値はお好みで 120–180 */
    display: block;
    position: relative;
    z-index: 1;
  }

  /* グラフ領域が隠れないように */
  .chart-scroll-container {
    overflow-x: auto;
    overflow-y: visible;
  }
}


/* ====== 共通ブロック ====== */
.forecast-block {
  background: transparent;
  padding: 6px 0;
  position: relative;
  background: linear-gradient(to bottom, #e5f6ff, #f0fbf9);
}

.block-title {
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 4px;
  color: #333;
  position: sticky;
  left: 0;
  z-index: 10;
  width: 140px; /* 固定幅を設定 */
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.canvas-wrapper {
  overflow: hidden;
}

.forecast-block canvas {
  display: block;
  height: 60px;
}

/* ====== タイムライン ====== */
/* タイムライン上の Today ピル */
.timeline-header{
  position: absolute;     /* ← 必須 */
  left: 8px;
  right: auto;            /* ← 念のため right を無効化 */
  max-width: calc(100% - 16px); /* 端末幅から左右余白を差し引く */
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;

  /* 既存の黒半透明デザイン */
  background: rgba(0,0,0,0.3);
  color: #fff;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  line-height: 1.6;
  pointer-events: none;
}

@media (max-width: 768px){
  .timeline-header{
    font-size: 11px;
    padding: 2px 8px;
  }
}
.time-axis {
  display: flex;
  overflow-x: auto;
  border-radius: 6px;
  margin: 12px 0;
  border: 1px solid rgba(0,0,0,0.05);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.time-axis::-webkit-scrollbar {
  display: none;
}

.time-labels {
  display: flex;
  min-width: max-content;
  width: calc(50px * 24); /* 24時間分のラベルに対応 */
}

.time-labels div {
  flex: 0 0 50px;
  width: 50px;
  text-align: center;
  font-size: 10px;
  padding: 6px 0;
  transition: background 0.3s;
  box-sizing: border-box;
}

/* 昼と夜の色分け */
.time-labels div.day {
  background: rgba(255, 215, 0, 0.12);
  color: #444;
}

.time-labels div.night {
  background: rgba(25, 25, 112, 0.12);
  color: #222;
}

/* 現在時刻 */
.time-labels .current {
  background: rgba(0, 191, 255, 0.2);
  font-weight: bold;
  box-shadow: inset 0 -2px 0 #00bfff;
}

/* ====== Overlay（Surfline風） ====== */
.overlay-highlight {
  background-color: rgba(0, 191, 255, 0.15);
}
.overlay-line {
  border-left: 2px solid rgba(0, 191, 255, 0.9);
}

/* ====== Tooltip ====== */
#tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.4;
  pointer-events: none;
  z-index: 20;
  display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  animation: fadeIn 0.15s ease-in-out;
  max-width: 180px;
}
#tooltip strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  color: #2a7d9eff;
}
#tooltip span.label {
  display: inline-block;
  min-width: 50px;
  font-weight: bold;
  color: #ccc;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-2px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ====== 波高＋潮汐 ====== */
.wave-tide canvas {
  background: transparent;
}
.wave-tide .block-title {
  color: #2a7d9eff;
  border-left: 4px solid #2a7d9eff;
  padding-left: 6px;
}
#waveValueCanvas {
  height: 28px;   /* 数値の1行分だけ */
  display: block;
}

#waveTideCanvas {
  height: 150px;  /* 棒＋潮汐の描画エリア */
  display: block;
}
/* 潮汐（折れ線のみ） */
.tide-only canvas { background: transparent; }
.tide-only .block-title {
  color: #2a7d9e;
  border-left: 4px solid #2a7d9e;
  padding-left: 6px;
}
#tideLineCanvas { height: 120px; display: block; }

/* ====== 風速＋風向 ====== */
.wind-combo canvas {
  background: transparent;
}
.wind-combo .block-title {
  color: #2a7d9eff;
  border-left: 4px solid #2a7d9eff;
  padding-left: 6px;
}

/* ====== 気温 ====== */
.temperature canvas {
  background: transparent;
}
.temperature .block-title {
  color: #2a7d9eff;
  border-left: 4px solid #2a7d9eff;
  padding-left: 6px;
}

/* ====== PC ====== */
@media (min-width: 1025px) {
  .chart-inner {
    width: 100%;
  }
  .forecast-block { padding: 10px 0; }
  .block-title { 
    font-size: 14px; 
    width: 150px; /* PC用の幅調整 */
  }
  .forecast-block canvas { height: 70px; }
  .time-labels { font-size: 11px; }
}

/* ====== タブレット ====== */
@media (max-width: 1024px) and (min-width: 769px) {
  .forecast-block { padding: 8px 0; }
  .block-title { 
    font-size: 14px;
    width: 145px; /* タブレット用の幅調整 */
  }
  .forecast-block canvas { height: 60px; }
}

/* ====== スマホ ====== */
@media (max-width: 768px) {
  .forecast-block {
    padding: 6px 8px;
    margin-bottom: 10px;
  }
  .block-title {
    margin-bottom: 4px;
    font-size: 13px;
    width: 120px; /* スマホ用の幅 */
    position: sticky;
    left: 0; /* 横スクロール時の固定位置 */
    z-index: 10;
    padding: 4px 0;
  }
  .forecast-block canvas { height: 55px; }
  .time-axis { padding: 5px; }
  .time-labels { font-size: 9px; }
}

/* ====== 極小端末 ====== */
@media (max-width: 480px) {
  .forecast-block { padding: 5px 6px; }
  .block-title { font-size: 12px; }
  .forecast-block canvas { height: 50px; }
  .time-labels { font-size: 8px; }
}

/* ================================
   NEWS 全体レイアウト
   - PC: 左NEWS / 右サイド(サービス訴求→広告)
   - SP/タブレット: 1カラム
   ================================ */

.news-heading {
  font-size: 1.4rem;
  font-weight: 800;
  text-align: left;
  margin: 0 0 16px;
  color: #023a4e;
}

.news-section { margin: 24px auto; }
.news-section .container { display: block; }

/* PCレイアウト（>=1025px）
   見出しは1行占有／右サイドは固定幅で必ず右に配置 */
@media (min-width: 1025px) {
  .news-section .container {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;              /* 見出しを上段、左右カラムを下段に */
  }
  .news-heading {
    flex: 0 0 100%;
    margin-bottom: 12px;
  }
  /* 右サイドは固定幅で折り返しを防止（広告幅に合わせて調整可） */
  .news-side {
    flex: 0 0 320px;
    width: 320px;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 0;
  }
  /* 左は余り幅すべてを使う */
  .news-main {
    flex: 1 1 0;
    min-width: 0;                 /* はみ出し防止 */
  }
}

/* ================================
   一覧（news-list / news-item）
   ================================ */
.news-list {
  display: grid;
  grid-template-columns: 1fr;     /* 基本は1カラム */
  gap: 12px;
}

/* デフォルト（SP/タブレット/共通）カード：横型（サムネ左・テキスト右） */
.news-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  background: #f7fbfd;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 10px;
  padding: 10px;
  color: inherit;
  text-decoration: none;
  transition: transform .15s ease;
}
.news-item:hover { transform: translateY(-2px); }

.news-item img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.news-content .badge {
  display: inline-block;
  font-size: 0.7rem;
  background: #e0f7fa;
  color: #0077be;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.news-content .news-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #023a4e;
  line-height: 1.4;
  margin-bottom: 2px;
}
.news-content .news-date {
  font-size: 0.8rem;
  color: #667;
}

.news-empty, .news-error {
  color: #c00;
  padding: 8px 0;
}

/* PC：左カラム一覧を2カラムに＆“縦カード”へ切替（画像上・テキスト下） */
@media (min-width: 1025px) {
  .news-main .news-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .news-main .news-item {
    display: block;                        /* 縦カード */
    background: #fff;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 12px;
    padding: 0;                            /* 中身側で余白 */
    overflow: hidden;                      /* 角丸を効かせる */
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
    transition: transform .15s ease;
  }
  .news-main .news-item:hover { transform: translateY(-2px); }

  .news-main .news-item img {
    width: 100%;
    height: 200px;                         /* 180〜220pxで微調整可 */
    object-fit: cover;
    display: block;
    border-radius: 12px 12px 0 0;          /* 上だけ角丸 */
  }
  .news-main .news-item .news-content {
    padding: 12px 14px 16px;               /* テキスト側の余白 */
  }
  .news-main .news-item .news-title { margin-bottom: 6px; }
  .news-main .news-item .news-date { margin-top: 4px; }
}

/* ================================
   SPのはみ出し対策 & 画像の扱い
   ================================ */
@media (max-width: 768px) {
  .news-list { grid-template-columns: minmax(0, 1fr); }

  .news-item {
    grid-template-columns: 1fr;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  .news-content { min-width: 0; }
  .news-item img {
    width: 100%;
    height: auto;
    display: block;
  }
  .news-content .news-title,
  .news-content .news-date {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* ================================
   右サイド（サービス訴求 + サイド広告）
   ================================ */
.news-service-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  border: 1px solid rgba(0,0,0,.05);
  text-align: left;
}
.news-service-card .news-service-logo {
  display: block;
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin: 0 auto 12px;
}
.news-service-card h3 {
  margin: 0 0 10px;
  text-align: center;
  font-size: 1.1rem;
  color: #023a4e;
}
.news-service-card p {
  margin: 0 0 14px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #334;
}
.news-service-card .news-service-cta {
  display: block;
  text-align: center;
  font-weight: 700;
  text-decoration: none;
  background: #00c853;
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
}

/* サイドバー広告ボックス（サービス訴求の“下”に縦積み） */
.adsense-box {
  background: #fff;
  border: 1px solid rgba(0,0,0,.05);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.adsense-box .adsbygoogle {
  display: block !important;
  width: 100% !important;
  min-height: 250px;              /* 300x250 / 336x280 目安 */
}

/* ================================
   SP 記事中広告（.news-item と同幅・同テイスト）
   - JSは <div class="news-item mobile-adsense-ad">…</div> を出力
   ================================ */
.news-item.mobile-adsense-ad {
  display: block;                 /* ins 単体なので block でOK */
  grid-template-columns: 1fr;     /* 保険：display:gridでも1カラムに */
  padding: 10px;                  /* 通常カードと同じ余白 */
}
.news-item.mobile-adsense-ad .adsbygoogle {
  display: block !important;
  width: 100% !important;         /* news-item と同じ横幅 */
  min-height: 100px;
  border-radius: 6px;
}
.news-list .mobile-adsense-ad { grid-column: 1 / -1; } /* 行全幅を確保 */
