body {
  font-family: sans-serif;
  margin: 0;
}

nav {
  background: #fff;
  border-bottom: 1px solid #ccc;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  text-align: center;
}

/* ヘッダー部分（ロゴ＋サイト名） */
.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.site-header a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.site-header img {
  height: 40px;
  /* ロゴサイズ調整 */
}

.site-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #222;
}

/* メニュー */
.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.menu>li {
  position: relative;
}

.menu>li>a,
.menu>li>p.has-mega {
  display: block;
  padding: 8px 12px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  cursor: pointer;
}

.menu>li>a:hover,
.menu>li>p.has-mega:hover {
  background: #f1f5f9;
}

/* メガメニュー（共通） */
.mega {
  position: absolute;
  top: 100%;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .1);
  padding: 16px;
  min-width: 760px;
  display: none;
  z-index: 10;

  /* 中央寄せ */
  text-align: center;

  max-width: calc(100vw - 20px);
  left: 50%;
  transform: translateX(-50%);
}

.menu>li:hover .mega {
  display: block;
}

/* メガメニュー内のリスト中央寄せ */
.mega-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* 横方向中央 */
  gap: 10px;
}

.mega-grid p {
  margin: 0;
}

.mega-grid a {
  display: inline-block;
  text-decoration: none;
}

/* モバイル（accordion表示） */
@media (max-width:959px) {
  .menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .menu>li {
    border-bottom: none;
  }

  .mega {
    position: static;
    transform: none;
    min-width: auto;
    box-shadow: none;
    border: 0;
    border-top: 1px solid #ddd;
    border-radius: 0;
    padding: 10px;
    display: none;
  }

  .menu>li.open .mega {
    display: block;
  }
}

table {
  margin-left: 1%;
  /* 左側に1%の余白をつけて少し右へ移動 */
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-left: 1%;
  /* 左側に1%の余白を追加 */
}

/* 国旗と地図の画像 */
.flag,
.map {
  margin-left: 1%;
}

/* 戻るリンクの段落 */
body>p {
  margin-left: 1%;
}

.link-area {
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
  font-size: 16px;
  margin-left: 1%;
}

.ad-area {
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.ad-area ins.adsbygoogle {
  max-width: 100% !important;
  height: auto !important;
}

#back-to-top {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom));
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0078d7;
  color: white;
  border: none;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999; /* 他の要素に埋もれないように */
}
#back-to-top:hover {
  transform: scale(1.1);
  background: #005bb5;
}
#back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

nav {
  position: relative;
  background-color: white; /* 白地 */
}

/* 赤丸（日の丸） */
nav::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;   /* 丸のサイズを調整 */
  height: 120px;
  background-color: #bc002d;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 0; /* 背景に置く */
}

/* 中身を日の丸の上に表示 */
nav .nav-inner {
  position: relative;
  z-index: 1;
}

#command-hint {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 80px;
  font-weight: bold;
  color: white;
  background: rgba(0,0,0,0.7);
  padding: 20px 40px;
  border-radius: 20px;
  display: none;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: pre;
}