body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #fff8f0 0%, #ffe8d6 100%);
  min-height: 100vh;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding:100px 20px 40px;
  flex: 1;
  width: 100%;
  box-sizing: border-box;
}

/* コンテンツがヘッダーに隠れないように余白を確保 */
@media (max-width:600px){
  .site-header{ padding:8px 12px; height:55px; }
  .container{ padding-top:100px; }
}

h1 {
  text-align: center;
  color: #d35400;
  /* font-size: 2.5em; */
  margin-bottom: 30px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
  white-space: nowrap;      /* ← 折り返さない */
  font-size: clamp(25px, 4vw, 32px);  /* ← 画面幅に合わせて縮む */
}

/* 固定ヘッダー用スタイル */
/* .site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: linear-gradient(90deg, rgba(255,250,240,0.95), rgba(255,245,235,0.95));
  border-bottom: 1px solid rgba(200,170,150,0.25);
  box-shadow: 0 6px 18px rgba(34,20,8,0.08);
  backdrop-filter: blur(4px);
  z-index: 1000;
  font-family: "Yu Gothic","Meiryo",sans-serif;
} */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 0 5px;
  background: rgba(255, 236, 209); /* 屋根のベース色 */
  border-bottom: 2px solid #e0b070;
  z-index: 1000;
  font-family: "Yu Gothic","Meiryo",sans-serif;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  backdrop-filter: blur(4px);
}

/* ヘッダーボーダー */
.site-header::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 10px;
  background: repeating-linear-gradient(
    -45deg,
    #f8c291,
    #f8c291 15px,
    #e49220 15px,
    #e49220 30px
  );
  backdrop-filter: blur(4px);
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

.site-header .logo { display:flex; align-items:center; gap:8px; }
.site-header .logo img { height:70px; }
.site-header .nav { font-size:14px; color:#6b513b; }

.mission-button-container {
  text-align: center;
}

#missionBtn {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  border: none;
  padding: 14px 14px;
  font-size: clamp(12px, 1.6vw, 14px); /* ビューポートに応じて縮む */
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
  transition: transform 0.2s;
}

#missionBtn:hover {
  transform: translateY(-2px);
}




/* スタート画面 */
#startScreen {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  text-align: center;
}

#startScreen h2 {
  color: #e67e22;
  margin-bottom: 20px;
  font-size: 1.5em;
}

#storeCountInput {
  width: 200px;
  padding: 15px;
  font-size: 18px;
  border: 2px solid #f39c12;
  border-radius: 10px;
  text-align: center;
  margin: 20px 0;
}

#startBtn {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  color: white;
  border: none;
  padding: 15px 40px;
  font-size: 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

#startBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

#startBtn:active {
  transform: translateY(0);
}


/* ゲーム画面 */
#gameScreen {
  display: none;
}

.game-restart {
  text-align: center;
  margin-top: 50px;
}

.game-restart-btn {
   background: linear-gradient(135deg, #b0b0b0 0%, #7d7d7d 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.game-restart-btn:hover {
  transform: translateY(-2px);
}


/* スロット（ボード） */
.slot {
  background: white;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  transition: all 0.3s;
  border: 3px solid transparent;
}

.slot.active {
  border-color: #f39c12;
  box-shadow: 0 8px 30px rgba(243, 156, 18, 0.3);
}

.slot.completed {
  /* background: linear-gradient(135deg, #d4efdf 0%, #a9dfbf 100%); */
  border-color: #27ae60;
  opacity: 0.8;
}

.slot-header {
  display: flex;
  /* justify-content: space-between; */
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ecf0f1;
}

.slot-number {
  font-size: 1em;
  font-weight: bold;
  color: #e67e22;
  margin-right: 10px;
}

.mission-display {
  background: #fff3cd;
  padding: 10px 15px;
  border-radius: 8px;
  border-left: 4px solid #f39c12;
  margin-bottom: 20px;
  font-weight: bold;
  color: #856404;
}

.mission-display.empty {
  background: #e9ecef;
  color: #6c757d;
  border-left-color: #adb5bd;
}

.mission-display.completed {
  background: #d4edda;
  color: #155724;
  border-left-color: #28a745;
  margin-bottom: 5px;
}

.form-group {
  padding: 10px 0;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #34495e;
  font-weight: 600;
}

.form-group input[type="text"] {
  width: 100%;
  padding: 12px;
  border: 2px solid #ecf0f1;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

.form-group input[type="text"]:focus {
  outline: none;
  border-color: #f39c12;
}

.input-btn-wrapper {
  display: flex;
  gap: 0px;
}

.bought-item-label {
  display: block;
  margin-bottom: 8px;
  color: #34495e;
  font-weight: 600;
}

.bought-item-input  {
  flex: 1;
  padding: 12px;
  font-size: 16px;
  border: 2px solid #ecf0f1;
  border-radius: 8px 0 0 8px;
  outline: none;
  border-right: none;
}

.bought-item-input[type="text"]:focus {
  outline: none;
  border-color: #f39c12;
}

.add-btn {
  padding: 10px 15px;
  border: 2px solid #f39c12;
  border-left: none;
  background-color: #f39c12;
  color: #fff;
  font-weight: bold;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
}

.add-btn:hover {
  background-color: #e67e22;
}

.bought-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.bought-item {
  background: #fff3cd;
  padding: 8px 15px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.bought-item .remove-btn {
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.photo-preview {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-right: 10px;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview .remove-photo {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(231, 76, 60, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 14px;
}

.complete-btn {
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  margin-top: 20px;
  transition: transform 0.2s;
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.complete-btn:hover {
  transform: translateY(-2px);
}

.complete-btn:disabled {
  background: #95a5a6;
  cursor: not-allowed;
  transform: none;
}

.completed-stamp {
  margin-top: 15px;
  font-size: 1.2em;
  font-weight: bold;
  color: #27ae60;
  margin-right: 10px;
  text-align: center;
}

.completed-wrapper {
  height: 100%;
}

.completed-photo {
  display: flex;
  align-items: center;
  justify-content: left;
}

.slot-number.completed {
  margin-bottom: 5px;
  color: #27ae60;
}

/* ミッションポップアップ */
#missionPopup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

#missionPopup.show {
  display: flex;
}

.mission-card {
  background: white;
  border-radius: 20px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: popIn 0.3s ease-out;
}

@keyframes popIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.mission-card h3 {
  color: #e67e22;
  margin-bottom: 20px;
  font-size: 1.5em;
}

.mission-text {
  background: #fff3cd;
  padding: 20px;
  border-radius: 10px;
  font-size: 1.3em;
  font-weight: bold;
  color: #856404;
  margin-bottom: 30px;
  border: 3px solid #f39c12;
}

.mission-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.mission-btn {
  padding: 12px 25px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s;
}

.mission-btn.use {
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
  color: white;
}

.mission-btn.reroll {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
}

.mission-btn:hover {
  transform: translateY(-2px);
}

/* コンプリート画面 */
#completeScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

#completeScreen.show {
  display: flex;
}

.complete-content {
  /* background: white;
  border-radius: 20px;
  padding: 50px;
  text-align: center;
  max-width: 600px;
  width: 90%;
  animation: popIn 0.5s ease-out; */
  background: #fff8dc;  /* 古い紙風 */
  border: 5px solid #d4af37; /* 金色の枠 */
  border-radius: 20px;
  padding: 50px;
  text-align: center;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  position: relative;
}

.complete-content h2 {
  color: #D9773A;
  margin-bottom: 20px;
  white-space: nowrap;      /* ← 折り返さない */
  text-shadow: 1px 1px 2px #fff;
}

.complete-content p {
  font-size: 1.2em;
  color: #34495e;
  margin-bottom: 30px;
}

.complete-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.board-btn {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
  border: none;
  padding: 15px 20px;
  font-size: 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s;
}

.board-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.restart-btn {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  color: white;
  border: none;
  padding: 15px 20px;
  font-size: 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s;
}

.restart-btn:hover {
  transform: translateY(-2px);
}

.hidden {
  display: none !important;
}

/* フッタースタイル */
.footer-2 {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: column;
    flex-direction: row;
    padding: 13px 20px;
    background-color: #59390d;
    box-sizing: border-box;
    margin-top: auto;
}

.footer-2__sns-icon {
    width: 21px;
    height: 21px;
}

.footer-2__copyright {
    margin: 0;
    color: #ffffffb3;
    font-weight: bold;
    font-size: .8em;
}