/* ======================================
   Components: Nav / Buttons / Cards / Pickup / Mobile Menu / Intro
====================================== */

/* ======================================
   Nav
====================================== */
.site-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.site-nav a {
  text-decoration: none;
  color: var(--color-text-main);
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-nav a:hover {
  color: var(--color-primary);
}

.site-nav a:hover::after {
  width: 100%;
}

/* SNS Icon */
.sns-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-main);
  transition: all 0.3s ease;
}

.sns-icon {
  width: 1.5rem;
  height: 1.5rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.sns-link:hover {
  transform: translateY(-2px);
}

.sns-link.instagram:hover {
  color: #E1306C;
}

.sns-link.x:hover {
  color: #000000;
}

.sns-icon.filled {
  fill: currentColor;
  stroke: none;
}

/* ======================================
   Buttons
====================================== */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.8em 2em;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(6, 78, 59, 0.25);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.2),
      transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(6, 78, 59, 0.35);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
}



/* ======================================
   Intro Overlay
====================================== */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s;
}

body.intro-done .intro-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Stylish reveal */
.intro-center {
  text-align: center;
  position: relative;
}

.intro-logo {
  width: min(20rem, 70vw);
  animation: logoFadeIn 1.5s ease-out;
}

@keyframes logoFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.intro-skip {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.2);
  color: var(--color-text-sub);
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  z-index: 1010;
  transition: all 0.3s ease;
  font-family: "Outfit", sans-serif;
}

.intro-skip:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* ======================================
   Cards (HIGHLIGHTS, GUIDE)
====================================== */
.highlight-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.highlight-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.highlight-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(6, 78, 59, 0.1);
}

.highlight-card:hover::after {
  transform: scaleX(1);
}

.card-title {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  line-height: 1.4;
  font-weight: 700;
  color: var(--color-primary);
}

.card-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text-sub);
}

/* ======================================
   PICK UP slider
====================================== */
.section-pickup {
  background: linear-gradient(to bottom, #f9fafb, #fff);
  padding-bottom: 6rem;
}

.pickup-slider {
  margin-top: 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 2rem;
  /* Hide scrollbar but allow scroll */
  scrollbar-width: none;
}

.pickup-slider::-webkit-scrollbar {
  display: none;
}

.pickup-track {
  display: flex;
  gap: 2rem;
  padding: 0 1.5rem;
  /* center hint */
  width: max-content;
}

.pickup-item {
  width: 80vw;
  max-width: 500px;
  border-radius: 24px;
  overflow: hidden;
  scroll-snap-align: center;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease;
  position: relative;
}

.pickup-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s ease;
}

.pickup-item:hover img {
  transform: scale(1.05);
}

/* ======================================
   Image Modal (Generic Expansion)
   ====================================== */
.image-modal-content {
  background: white; /* Card background */
  box-shadow: var(--shadow-xl);
  border-radius: 16px;
  overflow: hidden;
  max-width: 600px; /* Constrain max width for card feel */
  width: 90%; /* Responsive width */
}

/* Override default modal styles for image modal */
#image-modal {
  padding: 0;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

#image-modal .modal-close-btn {
  /* Position close button properly inside or outside */
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  width: 2rem;
  height: 2rem;
  font-size: 1.2rem;
  backdrop-filter: none;
}

.image-modal-body {
  width: 100%;
  padding: 0; /* No padding, image fills card */
  display: flex;
  justify-content: center;
  align-items: center;
  background: white;
}

#expanded-img {
  width: 100%;
  height: auto; /* Maintain aspect ratio naturally */
  max-height: 80vh; /* Don't overflow screen vertically */
  object-fit: contain;
  border-radius: 0; /* Flush with card */
  box-shadow: none;
}

.img-caption {
  display: none; /* User requested: "Just the image is fine" */
}

/* Hint Text for Expandable Images */
.click-hint {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 4px;
  text-align: center;
  pointer-events: none; /* Let clicks pass through to container */
  white-space: nowrap;
}

/* ======================================
   Mobile Menu / Hamburger
====================================== */
.menu-toggle {
  display: none;
  /* Mobile only, handled by media query in layout or here */
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 1001;
  /* Above modals */
}

.menu-toggle span {
  position: absolute;
  left: 25%;
  right: 25%;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle span:nth-child(1) {
  top: 35%;
}

.menu-toggle span:nth-child(2) {
  top: 50%;
}

.menu-toggle span:nth-child(3) {
  bottom: 35%;
}

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--color-primary);
  /* Dark primary background */
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-menu-inner {
  text-align: center;
}

.mobile-menu-list {
  list-style: none;
}

.mobile-menu-list li {
  margin: 1.5rem 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Stagger animation */
.mobile-menu.is-open .mobile-menu-list li:nth-child(1) {
  transition-delay: 0.1s;
}

.mobile-menu.is-open .mobile-menu-list li:nth-child(2) {
  transition-delay: 0.15s;
}

.mobile-menu.is-open .mobile-menu-list li:nth-child(3) {
  transition-delay: 0.2s;
}

.mobile-menu.is-open .mobile-menu-list li:nth-child(4) {
  transition-delay: 0.25s;
}

.mobile-menu.is-open .mobile-menu-list li:nth-child(5) {
  transition-delay: 0.3s;
}

.mobile-menu.is-open .mobile-menu-list li:nth-child(6) {
  transition-delay: 0.35s;
}

.mobile-menu.is-open .mobile-menu-list li:nth-child(7) {
  transition-delay: 0.4s;
}

.mobile-menu.is-open .mobile-menu-list li:nth-child(8) {
  transition-delay: 0.45s;
}

.mobile-menu-list li.is-visible,
.mobile-menu.is-open .mobile-menu-list li {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu-list a {
  font-family: 'Shippori Mincho B1', serif;
  font-size: 1.5rem;
  color: white;
  /* Contrast against dark green */
  text-decoration: none;
  position: relative;
}

.mobile-menu-list a::after {
  content: "";
  display: block;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.3s;
  margin: 4px auto 0;
}

.mobile-menu-list a:hover::after {
  width: 100%;
}

.mobile-menu-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  width: 3rem;
  height: 3rem;
  cursor: pointer;
  color: white;
}

.mobile-menu-close span {
  position: absolute;
  left: 20%;
  right: 20%;
  height: 2px;
  background: white;
  top: 50%;
}

.mobile-menu-close span:first-child {
  transform: rotate(45deg);
}

.mobile-menu-close span:last-child {
  transform: rotate(-45deg);
}


/* Hide close button since we might just use the toggle or a dedicated X */
/* But logic uses separate buttons. Let's styling them. */

/* Responsive Logic for Nav */
@media (max-width: 900px) {
  .site-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }
}

/* ==========================
   Modals (Stamp / Complete)
========================== */
.simple-modal,
.complete-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.simple-modal.is-open,
.complete-modal.is-open {
  display: flex;
}

.simple-backdrop,
.complete-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

.simple-card,
.complete-card {
  position: relative;
  background: white;
  padding: 2.5rem;
  border-radius: 24px;
  max-width: 90%;
  width: 600px;
  box-shadow: var(--shadow-lg);
  animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

.complete-card {
  text-align: center;
  border: 2px solid var(--color-accent);
}

.complete-badge {
  display: inline-block;
  background: var(--color-accent);
  color: white;
  padding: 0.25rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}


@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ======================================
   Notice Section (Attention)
   ====================================== */
.notice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.notice-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.notice-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.notice-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 78, 59, 0.05);
  border-radius: 12px;
  color: var(--color-primary);
}

.notice-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.notice-content {
  flex: 1;
}

.notice-content p {
  margin: 0;
  line-height: 1.6;
  font-size: 0.95rem;
  color: var(--color-text-main);
}

.notice-content .notice-sub {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-text-sub);
}

@media (max-width: 640px) {
  .notice-grid {
    grid-template-columns: 1fr;
  }
}

/* ======================================
   Programs Page (Refactored)
   ====================================== */

.section-programs-top {
  padding-bottom: 0;
}

/* Location Tabs */
.location-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.loc-tab {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  min-width: 110px; /* Increased width */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  color: var(--color-text-main);
}

.loc-tab:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.loc-tab.active {
  border-color: var(--color-primary);
  background: #f0fdf4; /* Light green tint */
  box-shadow: 0 0 0 2px var(--color-primary); /* clearer active state */
}

.loc-icon-wrap {
  width: 64px;  /* Increased from 40px */
  height: 64px; /* Increased from 40px */
  display: flex;
  align-items: center;
  justify-content: center;
}

.loc-icon-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.loc-name {
  font-size: 0.9rem; /* Increased font size */
  font-weight: 700;
  line-height: 1.2;
}


/* Area Content */
.area-content {
  display: none; /* Hidden by default */
  animation: fadeIn 0.3s ease;
}

.area-content.active {
  display: block;
}

/* Area Visual Header (Separate Location Image) */
.area-visual-header {
  margin-bottom: 2rem;
  background: white;
  border-radius: 16px;
  border: 1px solid var(--color-border); /* Solid border like map */
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.area-visual-header img {
  width: 100%; /* Fill the container */
  height: auto;
  display: block;
  /* Removed max-height constraint */
}


/* Specific Tweak: Artistic Building Map & Visual Size */
#area-geijutsu .floor-map-container,
#area-geijutsu .area-visual-header {
  max-width: 500px; /* Limit width for both */
  margin: 0 auto 2rem; /* Center it */
}

/* Specific Tweak: Mobile Kousya Image Size */
/* (Replaced by the grid layout below which naturally restricts size) */

/* ======================================
   Mobile Layout: Side-by-Side (Location | Map)
   ====================================== */
@media (max-width: 899px) {
  /* 1. Kousya Floors */
  .floor-content.active {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Strictly equal columns */
    gap: 1rem;
    align-items: center;
  }

  .floor-content.active .area-visual-header {
    grid-column: 1;
    margin-bottom: 0;
    width: 100%;
    display: block;
  }
  
  .floor-content.active .area-visual-header img {
      width: 100%; /* Force fill to look exactly half */
      height: auto;
      margin: 0;
      display: block;
      object-fit: contain;
  }

  .floor-content.active .floor-map-container {
    grid-column: 2;
    width: 100%; /* Force fill */
  }
  
  .floor-content.active .programs-grid-compact {
    grid-column: 1 / 3 !important; /* Explicit span 2 */
    width: 100%;
    margin-top: 1.5rem;
  }

  /* 2. Other Areas (Geijutsu, Gym - WITH MAPS) */
  #area-geijutsu.active,
  #area-gym.active {
     display: grid;
     grid-template-columns: repeat(2, 1fr);
     gap: 1rem;
     align-items: center;
  }
  
  /* 3. Areas WITHOUT Maps (Hall, Court, Kitchen) - Center Layout */
  #area-hall.active,
  #area-court.active,
  #area-kitchen.active {
      display: flex;
      flex-direction: column;
      align-items: center; /* Center the image */
  }

  /* Specific styles for centered layout */
  #area-hall.active .area-visual-header,
  #area-court.active .area-visual-header,
  #area-kitchen.active .area-visual-header {
      width: 100%;
      max-width: 500px; /* Constrain width so it doesn't look too huge */
      margin: 0 auto 2rem;
  }
  
  #area-hall.active .programs-grid-compact,
  #area-court.active .programs-grid-compact,
  #area-kitchen.active .programs-grid-compact {
      width: 100%; /* Grid takes full width */
      margin-top: 0;
  }

  
  .area-content.active .area-visual-header {
      grid-column: 1;
      margin-bottom: 0;
      width: 100%;
  }
  
  .area-content.active .floor-map-container {
      grid-column: 2;
      margin-top: 0;
      width: 100%;
  }

  .area-content.active .area-visual-header img {
      width: 100%; /* Force fill */
      height: auto;
  }
  
  .area-content.active .programs-grid-compact {
      grid-column: 1 / 3 !important; /* Explicit span 2 */
      width: 100%;
      margin-top: 1.5rem;
  }
  
  /* Reset max-width overrides for Geijutsu on mobile too */
  #area-geijutsu .floor-map-container,
  #area-geijutsu .area-visual-header {
      max-width: 100%;
      margin: 0;
  }
}

/* ======================================
   PC Layout: Side-by-Side (Location | Map)
   ====================================== */
@media (min-width: 900px) {
  
  /* 1. Kousya: Grid per floor content - STRICT FORCE */
  #area-kousya .floor-content.active {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* Strictly equal split */
    gap: 2rem;
    align-items: center;
  }

  #area-kousya .floor-content.active .area-visual-header {
    grid-column: 1 !important;
    margin-bottom: 0;
    width: 100% !important;
    max-width: none !important;
    display: block;
  }
  
  #area-kousya .floor-content.active .area-visual-header img {
      width: 100% !important; /* Force fill 50% width */
      max-width: none !important;
      height: auto !important;
      object-fit: contain;
      display: block;
  }

  #area-kousya .floor-content.active .floor-map-container {
    grid-column: 2 !important;
    width: 100% !important;
    max-width: none !important;
  }

  /* Ensure program list spans full width */
  #area-kousya .floor-content.active .programs-grid-compact {
    grid-column: 1 / -1 !important;
    margin-top: 2rem;
    width: 100% !important;
  }

  /* 2. Other Areas WITH MAPS (Geijutsu, Gym) */
  #area-geijutsu.active,
  #area-gym.active {
     display: grid;
     grid-template-columns: repeat(2, 1fr);
     gap: 2rem;
     align-items: center;
  }

  /* 3. Areas WITHOUT Maps (Hall, Court, Kitchen) - Center Layout */
  #area-hall.active,
  #area-court.active,
  #area-kitchen.active {
      display: flex;
      flex-direction: column;
      align-items: center;
  }

  #area-hall.active .area-visual-header,
  #area-court.active .area-visual-header,
  #area-kitchen.active .area-visual-header {
      width: 100%;
      max-width: 600px; /* Slightly larger on PC */
      margin: 0 auto 3rem;
  }

  /* Items inside other areas */
  .area-content.active .area-visual-header {
    grid-column: 1;
    margin-bottom: 0;
    width: 100%;
  }
  
  .area-content.active .area-visual-header img {
      width: 100%;
      height: auto;
  }

  .area-content.active .floor-map-container {
     grid-column: 2;
     margin-top: 0;
     width: 100%;
  }

  /* List spans full width */
  .area-content.active .programs-grid-compact {
    grid-column: 1 / -1;
    margin-top: 2rem;
    width: 100%;
  }

  /* Reset max-width overrides for Geijutsu so it fills the grid column */
  #area-geijutsu .floor-map-container,
  #area-geijutsu .area-visual-header {
    max-width: 100%;
    margin: 0;
  }
}

/* Floor Tabs (for Kousya) */
.floor-tabs-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 1rem;
  background: #f8fafc;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  justify-content: flex-start; /* items left on scroll */
  scrollbar-width: none;
}
@media (min-width: 640px) {
  .floor-tabs-scroll {
    justify-content: center;
  }
}

.floor-tab {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: white;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.floor-tab.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(6, 78, 59, 0.2);
}

/* Floor Content */
.floor-content {
  display: none;
  gap: 2rem;
}
.floor-content.active {
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .floor-content.active {
    grid-template-columns: 400px 1fr; /* Map left, List right */
    align-items: start;
  }
}


/* Floor Map Container */
.floor-map-container {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.floor-map-container img {
  width: 100%;
  height: auto;
  display: block;
}

/* New Horizontal Card Style for List */
.programs-grid-compact {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pg-card-h {
  display: flex;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  min-height: 100px;
}

.pg-card-h:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.pg-h-thumb {
  width: 100px;
  flex-shrink: 0;
  background: #f1f5f9;
}

.pg-h-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pg-h-body {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0; /* Important for text truncation/wrapping in flex items */
}

.pg-h-loc {
  font-size: 0.75rem;
  color: var(--color-text-sub);
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pg-h-loc::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
}

.pg-h-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.pg-h-text {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* ======================================
   Program Detail Modal
   ====================================== */
.program-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.program-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.program-modal {
  background: white;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  border-radius: 24px;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-xl);
}

.program-modal-overlay.active .program-modal {
  transform: translateY(0);
}

/* Modal Close Button */
.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  border: none;
  font-size: 1.5rem;
  transition: background 0.2s;
}

.modal-close-btn:hover {
  background: rgba(0,0,0,0.8);
}

/* Modal Content */
.modal-image-wrap {
  width: 100%;
  height: 300px;
  background: #e2e8f0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.modal-body {
  padding: 2rem;
}

.modal-location {
  display: inline-block;
  background: var(--color-bg-secondary);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
}

.modal-title {
  font-family: var(--font-mincho);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.4;
  color: var(--color-text-main);
}


/* ======================================
   Events Page Styles (Timetable)
   ====================================== */
.area-label {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    opacity: 0.7;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.area-title {
    font-family: var(--font-mincho);
    font-size: 1.75rem;
    margin-bottom: 0;
}

.day-toggle-wrap {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    justify-content: center;
}

.day-btn {
    padding: 0.5rem 2rem;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.day-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.timetable-container {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    overflow: hidden;
    margin-top: 1rem;
}

.tt-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    border-bottom: 1px solid #f1f5f9;
}

.tt-row:last-child {
    border-bottom: none;
}

.tt-row.header {
    background: #f8fafc;
    font-weight: 700;
    color: var(--color-text-sub);
    font-size: 0.8rem;
}

.tt-time {
    padding: 1rem;
    border-right: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.tt-content {
    padding: 1rem;
    display: flex;
    align-items: center;
}

/* ======================================
   Goods Page Styles
   ====================================== */
.goods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.goods-card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.goods-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.goods-thumb {
  width: 100%;
  aspect-ratio: 1/1; /* Square images for goods */
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--color-border);
}

.goods-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.goods-body {
  padding: 1.25rem;
}

.goods-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.goods-price {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.goods-text {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.6;
}

/* ======================================
   Kitchen Car Card (Foods Page)
   ====================================== */
.kitchen-car-card {
    margin-top: 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    overflow: hidden;
    max-width: 600px; /* Default max-width for mobile too, just in case */
    margin-left: auto;
    margin-right: auto;
}

.kitchen-car-visual {
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    height: 180px; /* Much smaller height */
}

.kitchen-car-visual img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.kitchen-car-info {
    padding: 1.25rem;
    text-align: center;
}

.kitchen-car-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.kitchen-car-text {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
}

/* PC: Side-by-side but compact */
@media screen and (min-width: 768px) {
    .kitchen-car-card {
        display: flex;
        align-items: center;
        max-width: 700px; /* Constrained width */
        text-align: left;
    }
    
    .kitchen-car-visual {
        width: 40%; /* visual takes less space */
        height: 200px;
        border-right: 1px solid #f1f5f9;
        flex-shrink: 0;
    }

    .kitchen-car-info {
        width: 60%;
        padding: 1.5rem;
        text-align: left;
    }

    .kitchen-car-title {
        font-size: 1.25rem;
    }
}

/* ======================================
   Timeline View (Events New Design)
   ====================================== */
.timeline-layout {
    position: relative;
    padding: 1rem 0;
    max-width: 900px;
    margin: 0 auto;
}

/* Time Separator (Background lines 9:00, 10:00...) */
.time-separator {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #94a3b8;
}

.ts-time {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    width: 60px;
    flex-shrink: 0;
    text-align: right;
    margin-right: 1rem;
}

.ts-line {
    flex-grow: 1;
    height: 1px;
    background: #cbd5e1;
}

/* Timeline Card */
.timeline-card {
    /* Updated to Green Gradient (Ryokufu/Green Breeze style) */
    background: linear-gradient(135deg, #059669 0%, #34d399 100%); 
    color: white;
    border-radius: 16px;
    padding: 0; /* Layout handled by flex children */
    display: flex;
    overflow: hidden;
    margin: 1rem 0 1rem 3rem; /* Indented from time markers */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    min-height: 120px;
}

/* Card: Time Column (Left) */
.tc-time-col {
    background: rgba(0, 0, 0, 0.1);
    width: 100px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.5rem;
    font-family: 'Outfit', sans-serif;
}

.tc-start, .tc-end {
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1;
}

.tc-bar {
    width: 2px;
    height: 30px;
    background: rgba(255, 255, 255, 0.5);
    margin: 0.5rem 0;
}

/* Card: Thumbnail */
.tc-thumb {
    width: 140px;
    flex-shrink: 0;
    position: relative;
    background: black;
}

.tc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

/* Card: Body */
.tc-body {
    padding: 1.25rem 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tc-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: white;
}

.tc-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

/* Mobile Adjustments */
@media screen and (max-width: 640px) {
    .timeline-card {
        margin-left: 0;
        flex-direction: column;
    }
    
    .timeline-card > div {
        width: 100%;
    }

    .tc-time-col {
        flex-direction: row;
        width: 100%;
        height: auto;
        padding: 0.5rem 1rem;
        justify-content: flex-start;
        gap: 0.5rem;
        background: rgba(0,0,0,0.15);
    }
    
    .tc-bar {
        width: 10px;
        height: 2px; /* horizontal bar on mobile */
        margin: 0;
    }

    .tc-thumb {
        /* User Request: Hide images on mobile for a cleaner look */
        display: none;
    }
}



/* ======================================
   Goods Section
   ====================================== */
.goods-grid {
  display: grid;
  gap: 1rem; /* Slightly tighter gap for mobile */
  /* Default (Mobile): 2 columns as requested */
  grid-template-columns: repeat(2, 1fr); 
}

.goods-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm); 
  border: 1px solid var(--color-border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.goods-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.goods-thumb {
  width: 100%;
  aspect-ratio: 1 / 1; /* Square images */
  border-bottom: 1px solid var(--color-border);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.goods-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.goods-body {
  padding: 0.75rem; /* Compact padding */
}

.goods-title {
  font-size: 0.9rem; 
  font-weight: 700;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.goods-price {
  color: var(--color-primary);
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.goods-text {
  font-size: 0.75rem;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limit text lines */
  line-clamp: 2; /* Standard compliance */
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

/* PC/Tablet: More columns */
@media (min-width: 600px) {
  .goods-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem;
  }

  .goods-body {
      padding: 1rem;
  }

  .goods-title {
      font-size: 1rem;
  }
}
