/* ===== ベース設定 ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  background: linear-gradient(180deg, #ffffff 0%, #fff8f3 100%);
  color: #111111;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== タイトル（①） ===== */
.app-title {
  flex: 0.8;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 3px solid #ff6a00;
  box-shadow: 0 2px 10px rgba(255, 106, 0, 0.08);
}

.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 16px 12px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}


.TitleName {
  margin: 0;
  font-size: 23px;
  line-height: 1.25;
  text-align: center;
  font-weight: bold;
  letter-spacing: 1px;
}

.subTitle {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  color: #ff6a00;
  font-weight: normal;
  line-height: 1.4;
  text-align: center;
  opacity: 0.85;
}

.page-lead {
  margin: 10px auto 0;
  width: 100%;
  max-width: 320px;
  font-size: 15px;
  line-height: 1.8;
  text-align: center;
  color: #222;
}

/* ===== 入力エリア（②） ===== */
.panel-top {
  flex: 1.5;
  padding: 10px 15px;
  background: #fffaf6;
  border-bottom: 3px solid #ff6a00;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(255, 106, 0, 0.08);
}

.panel-top input,
.panel-top select,
.panel-top button {
  width: 100%;
  margin-top: 10px;
  padding: 14px;
  font-size: 16px;
  border-radius: 10px;
  border: none;

  min-height: 50px;   /* ←スマホで押しやすくする */
}

.panel-top button {
  background: #ff6a00;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

/* ===== 地図エリア（④） ===== */
.panel-map{
flex:3;
margin-top:20px;
height:400px;
}

#map{
width:90%;
height:90%;
margin: 10px auto;
}

/* =========================
   📱 スマホ最適化
========================= */
@media (max-width: 768px) {

  .panel-top {
    padding: 18px 20px;
  }

  .panel-top input,
  .panel-top select {
    background: white;
    color: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  }

  .panel-top button {
    padding: 14px;
    font-size: 17px;
    border-radius: 14px;
    background: linear-gradient(45deg, #ff6a00, #ff8800);
  }

  #map {
    aspect-ratio: 1 / 1;
  }

}

/* =========================
   💻 PC
========================= */
@media (min-width: 769px) {

  #map {
    height: 700px;
    /* PCは横長 */
  }

}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.site-icon {
  width: 64px;
  height: auto;
  display: block;
  margin: 0 auto;
}


@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(-5deg);
  }

  70% {
    opacity: 1;
    transform: scale(1.1) rotate(3deg);
  }

  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

/* 🎉 紙吹雪 */
.confetti {
  position: fixed;
  width: 8px;
  height: 12px;
  top: -20px;
  opacity: 0.9;
  animation: fall linear forwards;
  z-index: 9999;
}

@keyframes fall {
  to {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

.site-description {
  text-align: center;
  max-width: 600px;
  margin: 10px auto 20px;
  line-height: 1.8;
  font-size: 15px;
}

@media (max-width: 768px) {
  .site-description {
    font-size: 16px;
    line-height: 1.9;
  }
}

/* =========================
📱 スマホUX強化
========================= */
@media (max-width: 768px) {

  /* 入力エリア余白 */
  .panel-top {
    padding: 22px 20px;
    gap: 10px;
  }

  /* 入力欄タップ領域強化 */
  .panel-top input,
  .panel-top select,
  .panel-top button {
    padding: 16px;
    font-size: 18px;
    margin-top: 12px;
    min-height: 52px;
  }

  /* ボタン押しやすく */
  .panel-top button {
    font-size: 19px;
    font-weight: bold;
    letter-spacing: 1px;
    min-height: 56px;
    transition: transform 0.1s;
  }

  .panel-top button:active {
    transform: scale(0.97);
  }

  /* 結果エリアを読みやすく */
  .results {
    margin-top: 25px;
    padding: 26px 20px;
    font-size: 16px;
    line-height: 1.5;
  }

  /* Googleマップボタン */
  .results a {
    display: block;
    margin-top: 14px;
    padding: 14px;
    font-size: 18px;
    border-radius: 12px;
    background: #0984e3;
    color: white;
    text-decoration: none;
    font-weight: bold;
  }

  /* 地図を少し大きく */
  #map {
    aspect-ratio: 1 / 1;
    border-top: 3px solid #ff6a00;
  }

}

/* =========================
📱 Amazon風スマホ入力UI
========================= */
@media (max-width: 768px) {

  /* 入力エリア余白 */
  .panel-top {
    padding: 24px 20px;
  }

  /* 入力欄 */
  .panel-top input,
  .panel-top select {

    width: 100%;
    height: 56px;

    padding: 0 16px;

    font-size: 18px;

    background: white;
    color: #2a2a2a;

    border-radius: 12px;
    border: 2px solid #444;

    margin-top: 14px;

    transition: all 0.2s ease;
  }

  /* フォーカス時（Amazon風） */
  .panel-top input:focus,
  .panel-top select:focus {

    outline: none;

    border: 2px solid #ff6a00;

    box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.25);

    background: white;
  }

  /* ボタン */
  .panel-top button {

    height: 60px;

    font-size: 19px;

    margin-top: 18px;

    border-radius: 14px;

    background: linear-gradient(45deg, #ff6a00, #ff8c00);

    font-weight: bold;

    letter-spacing: 1px;

    transition: transform 0.1s ease;
  }

  .panel-top button:active {
    transform: scale(0.97);
  }

}

/* =========================
📱 モード切替UX
========================= */

.mode-switch {
  display: flex;
  gap: 10px;
  padding: 12px 15px;
}

.mode-switch button {

  flex: 1;

  height: 56px;

  font-size: 17px;

  border-radius: 14px;

  border: 2px solid #ff6a00;

  background: white;

  color: #1f1f1f;

  font-weight: bold;

  cursor: pointer;

  transition: all 0.15s ease;
}

/* タップ演出 */
.mode-switch button:active {
  transform: scale(0.95);
}

/* ホバー（PC） */
.mode-switch button:hover {
  background: #ff6a00;
}

/* スマホ最適化 */
@media (max-width:768px) {

  .mode-switch {
    padding: 15px;
    gap: 12px;
  }

  .mode-switch button {

    height: 60px;

    font-size: 18px;

    letter-spacing: 1px;

    border-radius: 16px;

    background: linear-gradient(45deg, #1f1f1f, #1f1f1f);

    border: none;

    box-shadow: 0 4px 10px rgb(255, 81, 1);

  }

}

/* アクティブモード */

.mode-switch button.active {

  background: #ff5900;

  color: white;

  border: none;

  box-shadow: 0 4px 12px rgba(255, 106, 0, 0.5);

}

.spot-section {
  text-align: center;
  margin-top: 40px;
}

#spotButton {
  background: #ff6b35;
  color: white;
  border: none;
  padding: 14px 28px;
  font-size: 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
}

#spotButton:hover {
  transform: scale(1.05);
}

#gachaResult {
  margin-top: 30px;
}

.hidden{
  display:none !important;
}

.spot-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin: 15px auto;
  max-width: 420px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.genre {
  font-weight: bold;
  color: #ff6b35;
  margin-bottom: 6px;
}

.spot-name {
  font-size: 18px;
  margin-bottom: 10px;
}

.map-btn {
  background: #4285F4;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
}

.reroll-btn {

  width: 90%;
  max-width: 400px;

  margin: 20px auto;

  display: block;

  height: 55px;

  font-size: 18px;

  border-radius: 14px;

  border: none;

  background: linear-gradient(45deg, #00b894, #00cec9);

  color: white;

  font-weight: bold;

  cursor: pointer;

  transition: 0.15s;
}

.reroll-btn:active {
  transform: scale(0.95);
}

/* =========================
🎲 ガチャ結果UI
========================= */

.results {
  margin-top: 30px;
  display: none;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  padding: 10px 15px;
  box-shadow: 0 8px 24px rgba(255, 106, 0, 0.10);
}

.results.show {
  display: flex;
}

/* カード */

.result-item {
  width: 95%;
  max-width: 420px;
  background: white;
  color: #2d3436;
  border-radius: 16px;
  padding: 20px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.08),
    0 10px 24px rgba(255, 106, 0, 0.12);
  text-align: center;
  animation: gachaPop 0.4s ease;
}

/* ジャンル */

.genre {

  font-size: 14px;

  font-weight: bold;

  color: #ff6a00;

  margin-bottom: 6px;

  letter-spacing: 1px;

}

/* スポット名 */

.spot-name {

  font-size: 22px;

  font-weight: bold;

  margin-bottom: 12px;

}

/* GoogleMapボタン */

.map-btn {

  display: inline-block;

  background: #4285F4;

  color: white;

  padding: 10px 18px;

  border-radius: 8px;

  text-decoration: none;

  font-size: 15px;

  font-weight: bold;

  transition: 0.15s;

}

.map-btn:hover {
  transform: scale(1.05);
}

/* =========================
🎰 ガチャ出現アニメ
========================= */

@keyframes gachaPop {

  0% {
    opacity: 0;
    transform: scale(0.6);
  }

  60% {
    transform: scale(1.05);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }

}

h1 {
  font-size: 28px;
  line-height: 1.3;
}

@media (max-width: 600px) {
  h1 {
    font-size: 24px;
    line-height: 1.4;
  }
}

/* =========================
📌 ナビゲーション
========================= */

.page-nav {
  display: flex;
  gap: 10px;
  padding: 12px 15px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 3px solid #ff6a00;
  box-shadow: 0 2px 10px rgba(255, 106, 0, 0.08);
}


.page-nav button {
  flex: 1;
  height: 50px;
  border-radius: 12px;
  border: 1px solid rgba(255, 106, 0, 0.18);
  background: #fffaf6;
  color: #1f1f1f;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.15s;
}


.page-nav button:hover {
  background: #ff6a00;
}

.page-nav button.active {

  background: #ff6a00;

  box-shadow: 0 4px 12px rgba(255,106,0,0.4);

}

.page-nav button:active {
  transform: scale(0.96);
}

#map {
  touch-action: manipulation;
}

.panel-map,
#map {
  position: relative;
  z-index: 1;
}

.genre-dog{
width:50px;
height:50px;
display:block;
margin:0 auto 6px auto;
}

.card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  text-align: center;
  font-size: 14px;
  color: #777;
}

.footer a {
  color: #555;
  text-decoration: none;
  margin: 0 8px;
}

.footer a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .header {
    padding: 20px 60px 12px 60px;
  }
}

.loading-dog-image {
  width: 40px;
}

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

.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: #ff6a00;
  color: white;
  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: #fffaf6;
  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.14);
  overflow-y: auto;
  border-left: 1px solid rgba(255, 106, 0, 0.12);
}


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

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 248, 243, 0.82);
  backdrop-filter: blur(2px);
  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: white;
  padding: 14px;
  border-radius: 12px;
  color:  #222;
  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: #fff;
  color:  #222;
  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: #fff;
  padding: 14px;
  border-radius: 12px;
  border: none;
  color: #222;
  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;
}

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

.loading-box {
  text-align: center;
  padding: 24px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.08);
  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);
  }
}

.spot-photo-wrap {
  margin: 12px 0;
  border-radius: 16px;
  overflow: hidden;
}

.spot-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.spot-copy {
  margin: 10px 0 14px;
  line-height: 1.6;
  font-size: 0.95rem;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share-button {
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.95rem;
  cursor: pointer;
}
