@charset "UTF-8";

/* =========================================
   ベースリセット
   ========================================= */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  /* 横スクロール防止 */
  position: relative;
}

body {
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: #111;
  color: #fff;
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  line-height: 1.5;
}

img,
iframe {
  display: block;
  max-width: 100%;
}

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

/* =========================================
   アニメーション & ビジュアルエフェクト
   ========================================= */
/* ふわふわアニメーション */
@keyframes fuwafuwa {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0);
  }
}

.floating-chara {
  animation: fuwafuwa 3s ease-in-out infinite;
  display: inline-block;
  flex-shrink: 0;
  z-index: 10;
  transition: transform 0.3s;
}

/* 切り替えボタンエリアの調整 */
.view-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  padding: 20px 0;
  box-sizing: border-box;
}

/* キャラクター画像のサイズ設定 */
.char-img {
  height: 70px;
  width: auto;
  vertical-align: middle;
  filter: drop-shadow(0px 5px 15px rgba(0, 0, 0, 0.3));
}

/* キャラクター画像用のピンクネオンエフェクト */
.char-img-neon {
  filter:
    drop-shadow(0px 5px 15px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 2px #fff) drop-shadow(0 0 8px #ff69b4) drop-shadow(0 0 15px #ff1493);
}

/* ネオン風広告のスタイル */
.neon-ad-wrapper {
  display: inline-block;
  margin: 20px auto;
  padding: 3px;
  border-radius: 10px;
  background-color: #000;
  box-shadow:
    0 0 5px #fff,
    0 0 10px #fff,
    0 0 20px #00bfff,
    0 0 30px #00bfff,
    0 0 50px #00bfff;
}

.neon-ad-wrapper>* {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

@keyframes neon-pulse {
  from {
    opacity: 0.8;
  }

  to {
    opacity: 1;
    filter: brightness(1.2);
  }
}

/* =========================================
   レイアウトコンテナ
   ========================================= */
.banner-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.banner-image {
  width: 100%;
  height: auto;
  display: block;
}

.main-wrapper {
  width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  padding: 0.25rem;
  background-color: #3f6a91;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* =========================================
   ストリームセクション（緑のボックス）
   ========================================= */
.stream-section {
  margin: auto;
  width: 100%;
  border-radius: 0.75rem;
  background-color: #508c52;
  text-align: center;
  padding: 0.125rem;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* ページタイトル */
.page-header-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 1rem;
  text-align: center;
}

/* =========================================
   グリッドシステム（カメラ）
   ========================================= */
.camera-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.125rem;
  border-radius: 0.5rem;
  box-sizing: border-box;
}

/* PCビューのオーバーライド */
.camera-grid.grid-mode {
  grid-template-columns: repeat(2, 1fr);
  padding: 0.125rem;
  background-color: #353948;
}

@media (min-width: 800px) {
  .camera-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.125rem;
    padding: 0.125rem;
    background-color: #353948;
  }
}

/* ビューセレクター */
.view-selector {
  display: flex;
  justify-content: center;
  gap: 0.125rem;
  margin: 0.5rem 0;
}

.view-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 0.75rem;
  border: 0.125rem solid #555;
  background: #222;
  color: #ccc;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.5rem;
  padding: 0;
  margin: 0 auto;
}

.view-toggle-btn:hover {
  border-color: #777;
  background: #333;
  color: #fff;
}

.view-toggle-btn.view-toggle-active {
  border-color: #90c5ff;
  background: #1a3a52;
  color: #90c5ff;
  box-shadow: 0 0 10px rgba(144, 197, 255, 0.3);
}

.view-toggle-btn.view-toggle-active:hover {
  border-color: #b0d5ff;
  background: #1f4a62;
  box-shadow: 0 0 15px rgba(144, 197, 255, 0.5);
}

/* PC版では非表示 */
@media (min-width: 800px) {
  .view-selector {
    display: none;
  }
}

/* カメラアイテムカード */
.camera-card {
  background-color: #43485a;
  padding: 0.0625rem;
  margin: 0;
  border-radius: 0.5rem;
  box-sizing: border-box;
  border: 0.025rem solid rgb(139, 215, 255);
  border-color: rgb(139, 215, 255);
  box-shadow: 0 10px 16px -2px rgba(139, 215, 255, 0.5),
    0 4px 5px -3px rgba(139, 215, 255, 0.5);
}

@media (min-width: 800px) {
  .camera-card {
    overflow: hidden;
  }
}

.camera-label {
  color: #fff;
  text-align: center;
  padding-bottom: 0.125rem;
  margin: 0.25rem;
  font-size: 1.25rem;
  font-weight: 500;
}

.camera-iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  border-radius: 0.5rem;
  display: block;
  margin: 0 auto;
}

/* =========================================
   新幹線セクション
   ========================================= */
#shinkansen {
  width: 100%;
  border-radius: 1rem;
  background-color: #508c52;
  text-align: center;
  margin-top: 10px;
}

#toggle-btn {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 1rem;
  cursor: pointer;
  user-select: none;
  border-radius: 0.75rem;
  color: #fff;
  background: #111;
  padding: 12px 0;
}

#shinkansen-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s ease;
}

.shinkansen-frame-wrapper {
  border-radius: 0.75rem;
  display: flex;
  justify-content: center;
  background-color: #43485a;
  margin: 0;
  padding: 0;
  border: 2px solid #90c5ff;
  box-shadow: 0 10px 16px -2px rgba(43, 255, 237, 0.6),
    0 4px 5px -3px rgba(43, 255, 237, 0.6);
}

#shinkansen-iframe {
  width: 100%;
  border: 0;
  border-radius: 0.75rem;
  min-height: 1400px;
  min-width: 700px;
  overflow: hidden;
}

/* =========================================
   コンポーネント: リンク & ディバイダー
   ========================================= */
.divider {
  width: 90%;
  height: 1px;
  background: #444;
  margin: 30px auto 20px;
  border-radius: 50px;
}

.back-link {
  width: 90%;
  margin: 0 auto 20px;
  display: block;
  text-decoration: none;
  background: #222;
  color: #fff;
  padding: 10px 12px;
  text-align: center;
  font-size: 1.1rem;
  border-radius: 10px;
  border: 1px solid #333;
  transition: 0.2s;
  max-width: 500px;
}

.back-link:hover {
  background: #333;
}

.link-spacer {
  margin-bottom: 40px;
}

.line-link {
  width: 90%;
  margin: 0 auto 40px;
  display: block;
  text-decoration: none;
  background: #06c755;
  color: #fff;
  padding: 15px 18px;
  text-align: center;
  font-size: 1.15rem;
  border-radius: 12px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: 0.2s;
  max-width: 500px;
}

.line-link:hover {
  background: #05b24b;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.counter-table {
  margin-bottom: 20px;
}

/* =========================================
   フッター
   ========================================= */
.site-footer {
  display: flex;
  flex-direction: column;
  background-color: #000;
  color: #fff;
  align-items: center;
  padding: 1rem;
  width: 100%;
}

/* =========================================
   関空ページ固有
   ========================================= */
.kanku-container {
  width: 100%;
  border-radius: 0.5rem;
  background-color: #508c52;
  padding: 0.25rem;
  text-align: center;
  box-sizing: border-box;
}

.kanku-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem;
  width: 100%;
}

@media (min-width: 768px) {
  .kanku-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kanku-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  cursor: pointer;
  height: 50vh;
  display: block;
  text-decoration: none;
}

/* 背景エフェクト */
.kanku-bg-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right,
      rgba(6, 182, 212, 0.1),
      transparent,
      rgba(147, 51, 234, 0.2));
  z-index: 10;
  pointer-events: none;
}

.kanku-border-gradient {
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  padding: 2px;
  background: linear-gradient(to right, #d3eefd, #9333ea);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  background: transparent;
}

.kanku-card-border {
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  padding: 2px;
  background: linear-gradient(to right, #d3eefd, #9333ea);
}

.kanku-card-inner-bg {
  position: absolute;
  inset: 2px;
  background-color: #353948;
  border-radius: 0.9rem;
}

.kanku-link-content {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.kanku-image-wrapper {
  position: relative;
  overflow: hidden;
  flex: 1;
  background-color: #43485a;
}

.kanku-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kanku-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #353948, transparent, transparent);
  opacity: 0.6;
}

.kanku-text-area {
  position: relative;
  z-index: 20;
  flex-shrink: 0;
  padding: 1rem;
  background: linear-gradient(to bottom,
      rgba(31, 41, 55, 0.8),
      rgba(17, 24, 39, 0.9));
  backdrop-filter: blur(8px);
  text-align: left;
}

.kanku-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
  line-height: 1;
  margin-top: 0;
}

.kanku-desc {
  font-size: 1.5rem;
  color: #d1d5db;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.kanku-status {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ef4444;
  font-weight: 600;
  font-size: 0.75rem;
}

/* =========================================
   Index2（レガシー）固有
   ========================================= */
.container-legacy {
  display: block;
  padding: 10px;
}

@media (min-width: 800px) {
  .container-legacy {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}

.card-legacy {
  margin: 0 0 16px 0;
  border-radius: 8px;
  overflow: hidden;
  background: #222;
}

.label-legacy {
  margin: 0;
  padding: 6px 10px;
  font-size: 1rem;
  background: #111;
  text-align: center;
}

/* =========================================
   PC向けレイアウト最適化 (900px以上) - Dashboard Style
   ========================================= */
@media (min-width: 900px) {

  /* 確実に非表示にする */
  html body .view-selector {
    display: none !important;
  }

  /* Bodyを画面いっぱいに固定（詳細度を上げる） */
  html body {
    height: 100vh !important;
    overflow: hidden !important;
    /* 全体のスクロールを禁止 */
    display: flex !important;
    flex-direction: column !important;
    position: static !important;
    /* relativeによる影響を排除 */
  }

  /* ヘッダーエリア（トップバー） */
  html body .banner-container {
    height: 100px !important;
    /* 固定高さ */
    flex-shrink: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  html body .banner-image {
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
  }

  /* メインラッパー：残りの高さを占有 */
  html body .main-wrapper {
    flex-grow: 1;
    height: calc(100vh - 100px) !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background-color: #222;
    display: flex !important;
    /* Flexレイアウトを維持 */
    flex-direction: column !important;
  }

  /* ストリームセクション:2カラムグリッド */
  html body .stream-section {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 10px;
    border-radius: 0;
    display: grid !important;
    grid-template-columns: 1fr 340px !important;
    grid-template-rows: auto 1fr !important;
    /* 広告(auto) + 情報(1fr) */
    gap: 10px;
    box-sizing: border-box;
    background-color: #333;
    overflow: hidden !important;
    /* はみ出し防止 */
  }

  /* PC表示ではview-selectorを非表示 */
  html body .view-selector {
    display: none !important;
  }

  /* 左カラム：カメラグリッド（縦に貫通） */
  html body .camera-grid {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    /* 2行にまたがる */
    height: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-rows: repeat(2, 1fr) !important;
    gap: 8px;
    padding: 0;
    overflow: hidden !important;
    background: transparent;
  }

  html body .camera-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #555;
    border-radius: 4px;
    box-shadow: none;
    overflow: hidden;
  }

  html body .camera-label {
    font-size: 0.9rem;
    padding: 4px 0;
    margin: 0;
    background: #222;
    flex-shrink: 0;
  }

  html body .camera-iframe {
    flex-grow: 1;
    height: 0 !important;
    width: 100%;
    border-radius: 0 0 4px 4px;
    aspect-ratio: auto !important;
  }

  /* カメラ全画面表示スタイル */
  html body .camera-card.fullscreen {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    background: #000;
    border-radius: 0 !important;
    border: none !important;
    margin: 0;
    padding: 0;
    display: flex !important;
    flex-direction: column !important;
  }

  html body .camera-card.fullscreen .camera-label {
    font-size: 1.5rem;
    padding: 15px;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
    flex-shrink: 0;
    text-align: center;
  }

  html body .camera-card.fullscreen .camera-iframe {
    flex-grow: 1;
    height: 100% !important;
    border-radius: 0 !important;
  }

  /* 右カラム上部：広告エリア */
  html body .ad-section {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* 上揃え */
    background: #2a2a2a;
    border-radius: 4px;
    padding: 5px;
    height: auto !important;
    max-height: 150px;
    /* 広告の高さ制限 */
    overflow: hidden;
  }

  html body .neon-ad-wrapper {
    margin: 0;
    transform: scale(0.85);
    transform-origin: center;
  }

  /* 右カラム下部：情報エリア（ここだけスクロール） */
  html body .info-section {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto !important;
    /* スクロール有効化 */
    padding: 5px 10px 20px 5px;
    background: #2a2a2a;
    border-radius: 4px;
    height: 100%;
    /* コンテナいっぱいに */
  }

  /* サイドバー内の調整 */
  html body #shinkansen {
    margin-top: 0;
    margin-bottom: 10px;
    flex-shrink: 0;
  }

  /* PC表示では常に開いた状態にする */
  html body #shinkansen-content {
    max-height: none !important;
    overflow: visible !important;
  }

  html body #toggle-btn {
    cursor: default;
    margin: 0.5rem;
    font-size: 1.2rem;
  }

  /* 新幹線iframe - スマホ表示と同じ設定を使用 */
  html body #shinkansen-iframe {
    width: 100% !important;
    border: 0;
    border-radius: 0.75rem;
    min-height: 1400px !important;
    min-width: 700px !important;
    overflow: hidden;
  }

  html body .shinkansen-frame-wrapper {
    height: auto !important;
    max-height: 600px !important;
    /* スクロール可能な高さ */
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0.5rem;
    border-radius: 0.75rem;
    display: flex;
    justify-content: center;
    background-color: #43485a;
    border: 2px solid #90c5ff;
    box-shadow: 0 10px 16px -2px rgba(43, 255, 237, 0.6),
      0 4px 5px -3px rgba(43, 255, 237, 0.6);
  }

  /* リンク類 */
  html body .back-link,
  html body .line-link {
    width: 95%;
    margin: 0 auto 10px;
    font-size: 0.85rem;
    padding: 8px;
  }

  html body .line-link {
    margin-bottom: 20px;
  }

  /* フッターはサイドバー最下部に表示されてもよいが、スペース節約のため今回は非表示 */
  html body .site-footer {
    display: none !important;
  }
}