/* =========================
🎨 テーマ変数（デフォルト）
========================= */

body {
  --accent-color: #ff6a00;
  --accent-gradient: linear-gradient(45deg, #ff6a00, #ff8c00);
  --result-bg: linear-gradient(135deg, #ffeaa7, #fab1a0);
  --sub-color: #ff6a00;
}

/* =========================
🍽 グルメテーマ
========================= */
body.gourmet-theme {
  --accent-color: #ff6b35;
  --accent-gradient: linear-gradient(45deg, #ff6b35, #ff8c00);
  --result-bg: linear-gradient(135deg, #ffeaa7, #fab1a0);
  --sub-color: #ff6b35;
}

/* =========================
🏯 観光テーマ
========================= */
body.tourism-theme {
  --accent-color: #0984e3;
  --accent-gradient: linear-gradient(45deg, #0984e3, #74b9ff);
  --result-bg: linear-gradient(135deg, #dfe6e9, #b2bec3);
  --sub-color: #0984e3;
}

/* =========================
🌳 自然テーマ
========================= */
body.nature-theme {
  --accent-color: #00b894;
  --accent-gradient: linear-gradient(45deg, #00b894, #55efc4);
  --result-bg: linear-gradient(135deg, #dff9fb, #c7ecee);
  --sub-color: #00b894;
}

/* =========================
🏍 気持ちよく走れる道テーマ
========================= */
body.goodRoad-theme {
  --accent-color: #19a7b8;
  --accent-gradient: linear-gradient(45deg, #19a7b8, #63d2db);
  --result-bg: linear-gradient(135deg, #e4f9fb, #d6f4f7);
  --sub-color: #19a7b8;
}

body.goodRoad-theme .confetti {
  background-color: #19a7b8 !important;
}

.fallback-note {
  margin: 8px 0 10px;
  font-size: 13px;
  color: #226b74;
  background: rgba(255, 255, 255, 0.6);
  padding: 6px 10px;
  border-radius: 10px;
}




/* =========================
共通反映（既存CSS上書き）
========================= */

/* サブタイトル */
.subTitle {
  color: var(--sub-color);
}

/* 入力エリアボタン */
.panel-top button {
  background: var(--accent-gradient);
}

/* フォーカス */
.panel-top input:focus,
.panel-top select:focus {
  border: 2px solid var(--accent-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color) 30%, transparent);
}

/* 結果背景 */
.results {
  background: var(--result-bg);
  border-radius: 16px;
}

/* ジャンル文字 */
.genre {
  color: var(--accent-color);
}

/* ナビボタン */
.page-nav button.active {
  background: var(--accent-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 再抽選ボタン */
.reroll-btn {
  background: var(--accent-gradient);
}

/* モードボタン */
.mode-switch button.active {
  background: var(--accent-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 紙吹雪テーマ対応 */
body.gourmet-theme .confetti {
  background-color: #ff6b35 !important;
}

body.tourism-theme .confetti {
  background-color: #0984e3 !important;
}

body.nature-theme .confetti {
  background-color: #00b894 !important;
}

.card:nth-child(1) {
  border-top: 5px solid #ff6b35;
}

/* グルメ */
.card:nth-child(2) {
  border-top: 5px solid #0984e3;
}

/* 観光 */
.card:nth-child(3) {
  border-top: 5px solid #00b894;
}

/* 自然 */

/* =========================
🐶 検索中わんこアニメ
========================= */

.loading-box {
  text-align: center;
  padding: 24px 16px;
  border-radius: 16px;
  background: #fff;
  margin-top: 16px;
}

.loading-dog {
  display: inline-block;
  animation: dogBounce 0.9s ease-in-out infinite;
  margin-bottom: 10px;
}

.loading-dog-image {
  width: 36px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.loading-text {
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 8px;
}

.loading-subtext {
  font-size: 13px;
  opacity: 0.85;
}

@keyframes dogBounce {

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

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

/* 検索中は空の結果枠を消す */
.results .result-item:empty {
  display: none;
}

/* ローディング中は結果全体の余白を少し整える */
.results.loading {
  padding-top: 16px;
}

/* 検索中は loading-box だけ見せる */
.results.loading .loading-box {
  display: block;
}

/* 中身がない result-item は完全に消す */
.result-item:empty {
  display: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  min-height: 0 !important;
}

/* =========================
🍔ハンバーガーメニュー
========================= */

.menu-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 5000;
  width: 48px;
  height: 48px;
  margin-top: 0;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: #ff6b35;
  color: #222;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
  display: none;
  align-items: center;
  justify-content: center;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -260px;
  width: 240px;
  height: 100vh;
  background: #111;
  padding: 88px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: right 0.25s ease;
  z-index: 5001;
  box-shadow: -6px 0 20px rgba(0, 0, 0, 0.35);
  overflow-y: auto;
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 4990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu a {
  display: block;
  background: #1d1d1d;
  padding: 14px;
  border-radius: 12px;
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.mobile-menu-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5002;
  width: 40px;
  height: 40px;
  margin-top: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: #222;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .page-nav {
    display: none !important;
  }
}

.header {
  padding: 20px 16px 12px;
}



@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .page-nav {
    display: none !important;
  }
}

.mobile-submenu-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mobile-submenu-toggle {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: #1d1d1d;
  padding: 14px;
  border-radius: 12px;
  border: none;
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
}

.mobile-submenu {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.mobile-submenu.open {
  display: flex;
}

/* 子メニューを少しだけ階層っぽく見せたいなら */
.mobile-submenu a {
  margin-left: 12px;
}

/* =========================
🤍 白ベース調整
========================= */

body.gourmet-theme {
  background: linear-gradient(180deg, #fffdfb 0%, #fff4ec 100%);
}

body.tourism-theme {
  background: linear-gradient(180deg, #fbfdff 0%, #eef7ff 100%);
}

body.nature-theme {
  background: linear-gradient(180deg, #fbfffd 0%, #eefcf7 100%);
}

body.goodRoad-theme {
  background: linear-gradient(180deg, #fbfeff 0%, #eefbfd 100%);
}

.results {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.loading-box {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.mobile-menu {
  background: #fff;
  box-shadow: -6px 0 20px rgba(0, 0, 0, 0.12);
  border-left: 1px solid rgba(0, 0, 0, 0.06);
}

.mobile-menu-overlay {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(2px);
}

.mobile-menu a {
  background: #fff;
  color: #222;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.mobile-menu-close {
  background: #fff;
  color: #222;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.mobile-submenu-toggle {
  background: #fff;
  color: #222;
  border: 1px solid rgba(0, 0, 0, 0.06);
}


body.gourmet-theme .panel-top input,
body.gourmet-theme .panel-top select {
  background: #fff0e7;
  border: 2px solid rgba(255, 107, 53, 0.36);
}

body.tourism-theme .panel-top input,
body.tourism-theme .panel-top select {
  background: #ebf5ff;
  border: 2px solid rgba(9, 132, 227, 0.34);
}

body.nature-theme .panel-top input,
body.nature-theme .panel-top select {
  background: #ebfff7;
  border: 2px solid rgba(0, 184, 148, 0.34);
}

body.goodRoad-theme .panel-top input,
body.goodRoad-theme .panel-top select {
  background: #ebfafc;
  border: 2px solid rgba(25, 167, 184, 0.34);
}

/* =========================
🎨 ページ背景（テーマ別）
========================= */

/* グルメ */
body.gourmet-theme {
  background: linear-gradient(180deg, #fffdfb 0%, #fff3eb 100%);
}

/* 観光 */
body.tourism-theme {
  background: linear-gradient(180deg, #fbfdff 0%, #eef6ff 100%);
}

/* 自然 */
body.nature-theme {
  background: linear-gradient(180deg, #fbfffd 0%, #effcf7 100%);
}

/* 気持ちよく走れる道 */
body.goodRoad-theme {
  background: linear-gradient(180deg, #fbfeff 0%, #eefbfd 100%);
}

/* =========================
🎨 入力エリア全体背景（テーマ別）
========================= */

body.gourmet-theme .panel-top {
  background: linear-gradient(180deg, #fff7f2 0%, #fff1e8 100%);
}

body.tourism-theme .panel-top {
  background: linear-gradient(180deg, #f4f9ff 0%, #edf6ff 100%);
}

body.nature-theme .panel-top {
  background: linear-gradient(180deg, #f4fffb 0%, #ecfff7 100%);
}

body.goodRoad-theme .panel-top {
  background: linear-gradient(180deg, #f4fcfd 0%, #ecfafc 100%);
}

/* =========================
🎨 テーマ色で枠線・区切り線を統一
========================= */

.page-nav {
  border-bottom: 3px solid var(--accent-color);
}

.page-nav button {
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.panel-top {
  border-bottom: 3px solid var(--accent-color);
}

.panel-top input:focus,
.panel-top select:focus {
  border: 2px solid var(--accent-color);
}

.subTitle {
  color: var(--accent-color);
}

.page-nav button:hover {
  background: var(--accent-color);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.menu-toggle{
  background: var(--accent-color);
  color: white;
}
