body {
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
  background: #eef6ec;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  margin-left: 20px;
  margin-bottom: -12px;
}

header h1 {
  font-family: 'Cambria Math','Cambria',sans-serif;
  font-size: 2.5rem;
}

p {
  text-align: center;
}

input {
  padding: 0.5rem;
  width: 200px;
}

.demo-overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 1000;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1s ease, transform 1s ease;
}

.demo-overlay.active {
  opacity: 1;
  transform: scale(1);
}

.welcome {
  position: absolute;
  top: 10%; 
  left: 5%;
  transform: translate(-50%, -50%);
  font-size: 3.8vw; 
  font-weight: 500;
  font-family: 'Constantia','Yu Mincho Light','YuMincho','Yu Mincho','游明朝体',sans-serif;
  color: #222;
  z-index: 10; 
  line-height: 1.3;
  text-align: left;
  opacity: 0;
  transform: translateX(50px); 
  transition: opacity 1.5s ease, transform 1.5s ease, opacity 1.6s ease-in-out;
  white-space: pre-line;
}

.welcome.visible {
  opacity: 1;
  transform: translateX(0);
}

.welcome .subtitle {
  font-size: 2.0vw;
  font-weight: 100;
  display: block;
  margin-top: -2.0em;
}

.demo-images {
  opacity: 0;
  transition: opacity 1.5s ease 0.3s;
}

.demo-images.visible { 
  opacity: 1; 
}
  
.demo-images img {
  position: absolute; 
  width: 30%;
  height: 27%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 2s cubic-bezier(0.22, 1, 0.36, 1), 
                opacity 1.6s ease-in-out;
}

.demo-images img.vertical{
  position: absolute; 
  width: 20%;
  height: 40%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 2s cubic-bezier(0.22, 1, 0.36, 1), 
              opacity 1.6s ease-in-out;
}

.demo-images img:nth-child(1) {
  top: 54%; 
  left: 40%;
  transform: translate(-50%, -50%);
}

.demo-images img:nth-child(2) {
  top: 33%;
  left: 60%;
  transform: translate(-50%, -50%);
}

.demo-images img:nth-child(3) {
  top: 73%; 
  left: 60%;
  transform: translate(-50%, -50%);
}

.demo-overlay.exit {
  opacity: 0;
  transform: scale(1.1);
  transition: opacity 1.6s ease-in-out, transform 1.6s ease-in-out;
}
  
.welcome.exit {
  transform: translate(-100px, -100px) scale(1.2);  
  opacity: 0;
}
  
.demo-images.exit img:nth-child(1) { 
  transform: translate(-300px, 100px) scale(1.2); 
  opacity: 0; 
}

.demo-images.exit img:nth-child(2) { 
  transform: translate(150px, -150px) scale(1.2); 
  opacity: 0; 
}

.demo-images.exit img:nth-child(3) { 
  transform: translate(150px, 150px) scale(1.2); 
  opacity: 0; 
}

/* ===== メニューボタン (PC表示時) ===== */
.menu-button {
  position: fixed;
  top: 5%;
  right: 20px;
  z-index: 250;
  background-color: rgb(180, 144, 144);
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 4px;
}

.menu-button:hover {
  background-color: rgb(202, 161, 161);
}

.menu-button.active {
  background-color: #2b3232;
}
.menu-button.active:hover {
  background-color: #454e4e;
}

/* ===== サイドバー ===== */
.sidebar {
  width: 250px;
  height: 100vh;
  background-color: #2d3232;
  color: white;
  padding-top: 20px;
  position: fixed;
  top: 0;
  right: -250px;
  transition: right 0.3s ease;
  z-index: 200;
}

.sidebar.open {
  right: 0;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar ul li a {
  display: block;
  padding: 15px 20px;
  text-decoration: none;
  color: white;
  border-bottom: 1px solid #444;
}

.sidebar ul li a:hover {
  background-color: #45514f;
}

/* ===== オーバーレイ背景 ===== */
.overlay-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 150;
}

.overlay-bg.show {
  opacity: 1;
  visibility: visible;
}

.page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.search-section {
  margin: 2rem auto;
  text-align: center;
  gap: 2rem; 
  padding: 1rem;
  position: relative;
}

/* === 2カラムレイアウト === */
.map-search-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

/* 左：地図 */
.map-column {
  flex: 0 0 55%;
  gap: 1.5rem;
}

.map-title {
  position: absolute;
  top: 18.8px;
  left: 16.5px;
  background-color: #f9ebab;
  color: #000;
  font-weight: bold;
  font-size: 1.1em;
  padding: 8px 12px;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.japan-map-container {
  flex: 1 1 45%; 
  position: relative; 
  max-width: 600px;
}

.japan-map {
  width: 100%;
  display: block;
  height: auto;
  background: #adf5ff;
  border: 2px solid #f9ebab;
  border-top: 4.5px solid #f9ebab;
}

.region {
  position: absolute;
  background: rgba(255,255,255,0.9);
  font-weight: bold;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}

.region:hover {
  background: #4ecdc4;
  color: #fff;
}

/* 右：検索・条件・タグ */
.search-column {
  flex: 0 0 40%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding:0% 2rem;
}

.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
#searchInput {
  flex: 1;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
}
#searchBtn {
  padding: 0 20px;
  background: #2196F3;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.search-box input {
  flex: 1;
  padding: 0.6rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.search-box button {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  background-color: #2196f3;
  color: #fff;
  cursor: pointer;
}

.tag-btn {
  background: #FFECB3;
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  color: #d89615;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.tag-btn:hover {
  background: #ffd740;
  transform: translateY(-2px);
}

.tag-btn a {
  text-decoration: none;
  color: inherit;
}

.filter-content select {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
}
.filter-content label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #333;
}

#conditionSearchBtn {
  width: 100%;
  padding: 12px;
  background: #2196F3;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

#conditionSearchBtn:hover {
  background-color: #1976d2;
}

.search-panel {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.search-panel .panel-header {
  text-align: center;
  font-weight: bold;
  color: #333;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.tag-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.dropdown {
  position: absolute;
  top: 40%; 
  left: 50%;
  transform: translate(-50%, -10%);
  min-width: 160px;
  max-width: 320px;
  background: #eee;
  border: 1px solid #333;
  padding: 6px;
  border-radius: 6px;
  min-width: 100px;
  z-index: 10;
}

.dropdown.hidden {
  display: none !important;
}

#prefList {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
}

#prefList li {
  cursor: pointer;
  padding: 6px 8px;
  white-space: nowrap;
}

#prefList li:hover {
  background: #4ecdc4;
  color: #fff;
}

/* フッター */
footer {
  background-color: #264653;
  color: whitesmoke;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================
   PC専用スタイル
   ================ */
@media (min-width: 769px) {
  .mobile-tabs,
  .card-inner,
  .mobile-nav,
  #today-hikyo {
    display: none !important;
  }

  .search-panel {
    display: block !important;
  }
  
  .text-area h3 {
    font-size: 1.2rem;
    margin: 0;
  }
  .text-area p {
    margin: 5px 0 0;
    font-size: 0.9rem;
    color: #555;
  }
}


/* ===================
   モバイル専用スタイル
   =================== */
@media (max-width: 768px) {
  .japan-map-container,
  .menu-button,
  .map-title{
    display: none !important;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 20px; 
    margin-left: 10px;
    margin-bottom: -25px;
  }

  header h1 {
    font-size: 1.5rem;
    margin: 0;
  }

  .search-section {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 0;
    margin: 1rem auto;
  }

 .map-search-layout {
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    gap: 1rem;
  }

  .map-column,
  .search-column {
    flex: none;
    width: 100%;
    padding: 0 1rem;
  }

  .search-box {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
  }

  .search-box input {
    flex: 1;
    min-width: 0;
    padding: 0.6rem;
  }

  .search-box button {
    padding: 0.6rem;
    height: 40px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 6px;
  }

  .mobile-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 0 10px;
  }
  
  /* ノンアクティブ */
  .tab-btn {
    flex: 1;
    padding: 12px 0;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #f0f0f0;
    color: #999;
    max-width: 200px;
  }

  /* アクティブ */
  .tab-btn.active {
    background-color: #5cc6bc;
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  }

  .tab-icon {
    margin-right: 5px;
  }
  
  .search-panel {
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin: 0 0 20px 0;
    padding: 15px;
  }

  .search-panel.active {
    display: block; 
  }

  .search-panel .panel-header {
    display: none;
  }

  .tag-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  .mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex !important;
    justify-content: space-around; 
    align-items: center;
    background-color: #509a91;
    padding: 10px 0;
    border-top: 2px solid #1c6f64;
    z-index: 300;
  }

  .mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: 0.8rem;
    width: 20%; 
  }

  .mobile-nav a img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
    margin: 0 auto; 
  }
  
  footer {
    margin-bottom: 60px; 
    text-align: center;
  }

  .special-search-card {
    width: 100%;
    margin: 20px 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    transition: transform .2s;
    text-align: center;
  }

  .special-search-card a{
    text-decoration: none;
    color: inherit;
  }

  .card-inner {
    display: flex !important; 
    align-items: center;
    padding: 12px;
    justify-content: center;
  }

  #today-hikyo {
    margin-top: 15px;
    margin-bottom: 25px;
  }

  #today-hikyo h2 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: bold;
  }

  .today-hikyo-card {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: 0.3s;
  }

  .today-hikyo-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
  }

  .today-hikyo-card .info {
    padding: 12px;
  }

  .today-hikyo-card .loading {
    font-size: 1.1rem;
    font-weight: bold;
  }

  .today-hikyo-card .desc {
    font-size: 0.9rem;
    margin: 6px 0 12px;
    color: #444;
  }

  .today-hikyo-card .detail-btn {
    display: inline-block;
    padding: 8px 14px;
    background: #2196F3;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
  }
}
