body {
  margin: 0;
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Arial", sans-serif;
  background: #fff;
}
#map {
  width: 100%;
  height: 40vh;
}

#game-status {
  height: 3vh;
  font-size: 1em;
  text-align: center;
  line-height: 3vh;
  background: #f8f8f8;
  border-top: 1px solid #ccc;
}

#button-area {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px;
  background: #fff;
}
#button-area button {
  flex: 1 1 48%;
  padding: 12px 10px;
  font-size: 18px;
  border-radius: 10px;
  border: none;
  background: #0078ff;
  color: #fff;
}
#message-area {
  height: 28vh;
  overflow: auto;
  padding: 12px;
  background: #fafafa;
  border-top: 1px solid #e0e0e0;
  font-size: 15px;
  scroll-behavior: smooth;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  padding-top: 5px;
  overflow-y: auto;
  z-index: 2000;
}

.modal-content {
  background-color: #fff;
  padding: 24px;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-align: left;
  font-size: 16px;
  line-height: 1.6;
  overflow-y: auto;
  max-height: 90vh;
  /* max-height: none;*/
}

.close-btn {
  margin-top: 12px;
  padding: 8px 16px;
  font-size: 16px;
  background-color: #ccc;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.close-btn:hover {
  background-color: #bbb;
}


    /* モーダルの基本スタイル */
    
    .modal-content button {
  margin-top: 16px;
  padding: 8px 16px;
  font-size: 16px;
  background-color: #0078d4;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}


    .modal-content button:hover {
      background-color: #005ea2;
    }
    
   /* イントロモーダルは黒背景＋白文字にする */
#introModal {
  position: fixed;
  top: 1vh;
  width: 100vw;
  height: 90vh;
  align-items: center;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.6); /* 半透明の背景 */
  display: none;
  justify-content: center;
  z-index: 3000;
}

#intro-modal-content {
  background-color: #000;
  color: #fff;
  padding: 18px;
  border-radius: 8px;
  max-width: 700px;
  overflow-y: auto;
  width: 90%;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
  text-align: left;
  font-size: 16px;
  line-height: 1.6;
}

    
.start-btn {
  display: block;
  margin: 24px auto 0 auto;
  padding: 12px 24px;
  font-size: 18px;
  background-color: #0078d4;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}


   /* イベントモーダルは黒背景＋白文字にする */
#eventModal {
  position: fixed;
  top: 1vh;
  left: 0vw;
  width: 100vw;
  height: 90vh;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.6); /* 半透明の背景 */
  display: none;
  justify-content: center;
  z-index: 3000;
}

#event-modal-content {
  background-color: #000;
  color: #fff;
  padding: 18px;
  border-radius: 8px;
  max-width: 700px;
  overflow-y: auto;
  width: 100%;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
  text-align: left;
  font-size: 16px;
  line-height: 1.6;
}

 .no-dot-list {
    list-style-type: none; /* 点を非表示にする */
    padding-left: 0;
    margin: 0;
  }
  
 @media (max-height: 500px) {
  .modal-content {
    font-size: 14px;
    padding: 16px;
  }

  .modal-content button,
  .close-btn {
    font-size: 14px;
    padding: 6px 12px;
  }

  .start-btn {
    font-size: 16px;
    padding: 10px 20px;
  }
}

/* --- PC・タブレット向けの上書き設定 --- */
@media (min-width: 512px) {

  #introModal,
  #eventModal {
    top: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 0;
  }

  #intro-modal-content,
  #event-modal-content,
  .modal-content {
    max-height: 95vh;
    width: 500px;
    margin: 0 auto;
  }
}

/* モーダル本体（40px 下げる） */
#entryDateModal {
  z-index: 3000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 40px;
}

/* modal-content を基準にする */
#entryDateModal .modal-content {
  position: relative; /* ← これが決定打 */
}

/* 非公式マーク（白い部分の左上に固定） */
#entryDateModal .modal-content::before {
  content: "非公式";
  position: absolute;
  top: 6px;
  left: 24px;
  font-size: 10px;
  color: #aaaaaa;
  opacity: 0.8;
  pointer-events: none;
  font-weight: 600;
}

/* ================================
   カレンダー全体
================================ */

.calendar-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse; /* ← これが決定打 */
}

.calendar-table th,
.calendar-table td {
  width: calc(100% / 7);
  padding: 0;
  margin: 0;
  text-align: center;
  background: #fff; /* 全セル白 */
}

/* ================================
   日付セル（共通）
================================ */
.calendar-day-btn {
  box-sizing: border-box;
  width: 100%;
  height: 58px;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;

  background: #fff !important;
  color: #000 !important;
}

.calendar-day-btn:hover,
.calendar-day-btn:active {
  background: #f0f0f0 !important;
}

/* 日付（数字） */
.calendar-day-number {
  font-size: 12px;
  margin-top: 0px !important;
  margin-bottom: 0px !important;
  color: #000 !important;
}

/* 曜日の文字サイズを小さく、ボールド解除 */
.calendar-table th {
  font-size: 12px !important;
  font-weight: normal !important; /* ← ボールド解除 */
  color: #000;
}

/* アイコン（人の混雑アイコン） */
.calendar-day-icon {
  height: 24px !important;       /* ← 28 → 24 に縮める */
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2px !important;    /* ← 日付との間 2px */
  margin-bottom: 3px !important; /* ← 下 3px */
  background: none !important;
}

/* アイコン内部の人型グループ */
.calendar-day-icon .icon-group {
  transform: scale(0.45); /* ← 0.45 → 0.40 に縮める */
  transform-origin: center;
  background: transparent !important;
}

/* ================================
   選択不可セル
================================ */
.calendar-cell-disabled {
  height: 58px;
  color: #aaa;
  vertical-align: top;
  background: #fff !important;
}

/* ================================
   ナビゲーション（prev / next）
================================ */
.calendar-nav-btn {
  background: none !important;
  border: none;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-nav-icon {
  width: 20px;
  height: 20px;
  display: block; /* Safari 対策 */
}

.calendar-nav-btn svg {
  flex-shrink: 0; /* Safari 対策 */
}

/* ================================
   ヘッダー（prev・年月・next）
================================ */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.calendar-title {
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
  height: 32px;          /* ← ボタンと同じ高さにする */
  line-height: 32px;     /* ← テキストを縦中央に配置 */
  display: flex;
  align-items: center;   /* ← Safari でも中央揃えを保証 */
  padding-top: 18px;
}

.calendar-title-area {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
}

.calendar-title-area h3 {
  margin: 0;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}

.calendar-table th {
  border-bottom: 1px solid #e0e0e0 !important;
}
/* 日曜（th の 1列目） */
.calendar-table th:nth-child(1) {
  color: #d9534f !important; /* 赤 */
}

/* 土曜（th の 7列目） */
.calendar-table th:nth-child(7) {
  color: #0275d8 !important; /* 青 */
}
/* 日曜の列（td の 1列目） */
.calendar-table td:nth-child(1) .calendar-day-number {
  color: #d9534f !important; /* 赤 */
}

/* 土曜の列（td の 7列目） */
.calendar-table td:nth-child(7) .calendar-day-number {
  color: #0275d8 !important; /* 青 */
}


