:root {
  --brown:      #4a3000;
  --orange:     #cc6600;
  --gray:       #aaaaaa;
  --bg-fallback:#f0e0c8;
  --font-main:  "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W3", Meiryo, sans-serif;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  color: var(--brown);
  background-color: var(--bg-fallback);
  background-image: url("https://akiratravels.github.io/images/bg.gif");
  background-repeat: repeat;
  margin: 0;
  padding: 0;
}

/* 管理者リンク (トップページのみで使用、国別からは削除) */
#admin-link {
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 100;
  font-size: 11px;
  color: var(--gray);
  background: rgba(255,255,255,0.6);
  padding: 3px 8px;
  border-radius: 10px;
  backdrop-filter: blur(4px);
}
#admin-link a {
  color: var(--gray);
  text-decoration: none;
}

/* 共通フッターレイアウト：すべてのアイコンを含めて中央揃え（メールは削除） */
.shared-footer {
  margin-top: 40px;
  padding-bottom: 30px;
  text-align: center;
}
.footer-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 15px;
}
.footer-icons a img, .footer-icons img {
  height: 32px;
  border: none;
  vertical-align: middle;
}
.copyright {
  font-size: 12px;
  color: var(--brown);
}

/* --- トップページ専用スタイル --- */
.top-wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 20px;
  text-align: center;
}
.top-logo img {
  max-width: 100%;
  height: auto;
}
.top-logo-fallback {
  font-size: 32px;
  font-weight: bold;
  color: var(--brown);
}
#country-list-wrap {
  margin-top: 30px;
}
.loading, .error-msg {
  text-align: center;
  padding: 20px;
}

/* 国名リスト（テーブル）要件：列ごとにセンタリング、左右余白を最小限に、太字プロポーショナル・拡大 */
.country-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
}
.country-table td {
  width: 50%;
  padding: 6px 2px;       /* 左右の余白を最小限に設定 */
  text-align: center;     /* 列ごとにセンタリング */
  vertical-align: top;
}
.country-link-cell {
  font-family: var(--font-main);
  font-size: 22px;
  font-weight: bold;
  line-height: 1.2;
  display: inline-block;
  text-align: center;
}
@media (min-width: 600px) {
  .country-link-cell {
    font-size: 26px;
  }
}
.has-posts {
  color: var(--orange);
  text-decoration: none;
}
.no-posts {
  color: var(--gray);
}
.country-subtitle {
  display: block;
  font-size: 13px;
  color: #7a5a20;
  font-weight: normal;
  margin-top: 2px;
  text-align: center;
}

/* --- 国別ページ専用スタイル --- */
.country-wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 20px;
}
.country-header {
  text-align: center;
  margin-bottom: 24px;
}
.country-title {
  font-size: 28px;
  color: var(--brown);
  margin: 0 0 10px 0;
}
.country-description {
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
  text-align: left;
  color: var(--brown);
}
.cover-photo-wrap {
  width: 100%;
  margin-bottom: 30px;
  overflow: hidden;
  cursor: pointer;
}
.cover-photo-wrap img {
  width: 100%;
  display: block;
  transition: transform 0.2s ease;
}
.cover-photo-wrap:hover img {
  transform: scale(1.01);
}
.post-chain {
  margin-bottom: 40px;
}
.chain-item {
  text-align: center;
  margin: 8px 0;
}
.chain-link {
  font-size: 18px;
  color: var(--orange);
  cursor: pointer;
  text-decoration: underline;
  font-weight: bold;
}
.chain-meta {
  display: block;
  font-size: 13px;
  color: var(--brown);
  margin-top: 2px;
}
.chain-arrow {
  color: var(--orange);
  font-size: 14px;
}

/* --- 詳細モーダル（要件：背景色を国別と統一、フォント色黒、個別キャプションサイズ変更＋改行再現） --- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: var(--bg-fallback);                 /* 背景色を国別ページと揃える */
  background-image: url("https://akiratravels.github.io/images/bg.gif"); /* 背景画像も揃える */
  background-repeat: repeat;
  z-index: 500;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-overlay.open {
  display: block;
}
.modal-sticky-bar {
  position: sticky;
  top: 0;
  z-index: 510;
  background: rgba(240, 224, 200, 0.95);
  backdrop-filter: blur(8px);
  padding: 12px 16px;
  border-bottom: 1px solid rgba(74, 48, 0, 0.15);
}
.modal-sticky-title {
  font-size: 16px; /* 仕様書定義を維持 */
  font-weight: bold;
  color: #000000;  /* フォント色は黒 */
}
.modal-sticky-meta {
  font-size: 12px;
  color: #444444;
  margin-top: 2px;
}
.modal-body {
  max-width: 600px;
  margin: 0 auto;
  padding-top: 20px;
}
.modal-caption {
  font-size: 15px; /* 全体の説明に関するフォントサイズは変えない */
  color: #000000;  /* フォント色は黒 */
  font-weight: normal;
  line-height: 1.75;
  white-space: pre-wrap;
  padding: 4px 16px 20px;
}
.media-item {
  margin-bottom: 20px;
}
.media-item img, .media-item video {
  width: 100%;
  display: block;
}
.media-item video {
  background: #000;
  cursor: pointer;
}
/* 要件：各メディアごとのキャプションのフォントをワンサイズ大きく(旧14px->16px)、かつ改行再現 */
.media-caption {
  font-size: 16px;        /* ワンサイズ大きく設定 */
  color: #000000;         /* フォント色は黒 */
  white-space: pre-wrap;  /* 元データに改行が含まれる場合はそれを再現 */
  padding: 8px 16px 16px;
  line-height: 1.6;
}
.modal-footer {
  padding: 24px 16px 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  background: rgba(74, 48, 0, 0.05);
}
.modal-footer img {
  height: 36px;
  cursor: pointer;
}
.modal-copyright {
  text-align: center;
  font-size: 11px;
  color: var(--brown);
  padding: 0 16px 20px;
}
