/* reset  ------------------------------ */

:root {
  --sky-blue: #a0e9f5;
  --text-color: #555;
  --accent-color: #ff9a9e;
}

body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
  overflow: hidden; 
  background-color: #f2e9e1;
}

/* AdSence */

.ad-spacer {
    margin: 40px auto;
    text-align: center;
    max-width: 900px;
    min-height: 100px;
    background: transparent;
    overflow: hidden;
}

.ad-spacer::before {
    content: "スポンサーリンク";
    display: block;
    font-size: 10px;
    color: #bbb;
    margin-bottom: 5px;
}

/* opening animation  ------------------------------ */

#loader-wrapper {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: var(--sky-blue);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 1s ease-in-out;
}

.opening-logo {
  max-width: 200px;
  height: auto;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.opening-logo.is-visible { opacity: 1; transform: translateY(0); }
.opening-logo.fade-out { opacity: 0; transform: translateY(-10px); }

/* main content  ------------------------------ */

#main-content {
  opacity: 0;
  min-height: 100vh;
  width: 1200px;
  position: relative;
  top: 0;
  left: 50%;
  margin-left: -600px;
  background-image: url('../img/sample/sp-bg.webp'); 
  background-repeat: no-repeat;
  background-position: center top; 
  background-size: 1200px auto; 
  display: block;
  background-color: #f2e9e1;
  transition: transform 0.1s ease-out, opacity 1.5s ease-out;
  transform-origin: center center;
  will-change: transform;
  image-rendering: -webkit-optimize-contrast; 
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

#main-content.visible { 
  opacity: 1; 
}

#main-content.zoomed {
  filter: brightness(0.9);
  cursor: grab;
}

#main-content.zoomed:active {
  cursor: grabbing;
}

.hidden { 
  display: none; 
}

/* sun showers ------------------------------ */

.sun-showers {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 3s ease-in-out;
  overflow: hidden;
}

#main-content.visible .sun-showers {
  opacity: 1;
}

.sun-showers::before {
  content: '';
  position: absolute;
  top: -10%; left: -10%;
  width: 120%; height: 120%;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.4) 0%, transparent 10%),
    radial-gradient(circle at 70% 20%, rgba(255, 255, 220, 0.3) 0%, transparent 15%),
    radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.3) 0%, transparent 10%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 200, 0.4) 0%, transparent 15%);
  mix-blend-mode: screen;
  animation: sun-glitter 10s ease-in-out infinite alternate;
}

.sun-showers::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background-image: repeating-linear-gradient(
    110deg,
    transparent 0%,
    transparent 8%,
    rgba(255, 255, 255, 0.25) 10%, 
    rgba(255, 255, 240, 0.4) 12%,
    rgba(255, 255, 255, 0.25) 14%,
    transparent 16%,
    transparent 25%
  );
  filter: blur(10px); 
  mix-blend-mode: screen;
  animation: sun-rays 15s linear infinite;
}

@keyframes sun-glitter {
  0% { transform: translate(0, 0) scale(1); opacity: 0.4; }
  100% { transform: translate(30px, 20px) scale(1.1); opacity: 0.8; }
}

@keyframes sun-rays {
  0% { transform: rotate(0deg); opacity: 0.6; }
  50% { transform: rotate(2deg); opacity: 0.9; }
  100% { transform: rotate(0deg); opacity: 0.6; }
}

/* leaves ------------------------------ */

.leaves {
  position: absolute;
  top: 0; left: 50%;
  width: 1200px;
  transform: translateX(-50%) translateY(-20px);
  z-index: 2;
  opacity: 0;
  transition: opacity 1.2s ease, transform 1.2s ease;
  pointer-events: none;
  transform-origin: center top;
}

.leaves img {
  width: 100%;
  height: auto;
}

.leaves.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  animation: sway 5s ease-in-out infinite alternate;
}

@keyframes sway {
  0% { transform: translateX(-50%) rotate(-1deg); }
  100% { transform: translateX(-50%) rotate(1deg); }
}

/* header  ------------------------------ */

.header-section { 
  text-align: center; 
  padding-top: 50px; 
  position: relative; 
  z-index: 10; 
  width: 1200px; 
}

#logo-destination {
  min-height: 120px; 
  display: flex;
  flex-direction: column;
  justify-content: center; 
  align-items: center; 
}

.top-logo {
  max-width: 240px;
  height: auto;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1s ease, transform 1s ease;
}

.top-logo.is-visible { 
  opacity: 1; 
  transform: translateY(0); 
}

.flying-bird {
  position: absolute;
  width: 30px;
  height: auto;
  top: 290px;
  right: -100px; 
  z-index: 1;
  opacity: 0;
  animation: fly-ultra-soft 25s ease-in-out infinite; 
  pointer-events: none;
}

@keyframes fly-ultra-soft {
  0% {
    right: -10px;
    transform: translateY(0) scaleX(1);
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  25% {
    transform: translateY(-25px) scaleX(1);
  }
  40% {
    transform: translateY(-15px) rotate(-5deg) scaleX(1);
  }
  55% {
    transform: translateY(-30px) rotate(5deg) scaleX(1);
  }
  75% {
    transform: translateY(-10px) rotate(-3deg) scaleX(1);
  }
  95% {
    opacity: 1;
  }
  100% {
    right: 1200px;
    transform: translateY(-20px) scaleX(1);
    opacity: 0;
  }
}

.floating-message {
  margin-top: 15px;
  font-size: 18px;
  color: #ffffff;
  font-family: 'Kiwi Maru', serif;
  height: 20px;
  opacity: 0;
  transition: opacity 1.5s ease;
  text-align: center;
  letter-spacing: 0.1em;
}

.floating-message.is-visible {
  opacity: 1;
}

/* shop section  ------------------------------ */

.shop-section {
  position: absolute;
  top: 0;
  left: 0;
  width: 1200px;
  height: 100%;
  pointer-events: none;
}

.profile-sticky-btn {
  position: absolute;
  left: 220px;
  top: 350px;
  z-index: 50;
  cursor: pointer;
  pointer-events: auto;
  animation: float-soft 3s ease-in-out infinite;
}

@keyframes float-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.profile-icon-wrapper {
  width: 65px;
  height: 65px;
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.profile-icon-wrapper:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.profile-btn-text {
  font-size: 11px;
  font-weight: bold;
  color: #777;
  font-family: 'Kiwi Maru', serif; 
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* car  ------------------------------ */

.shop-item {
  position: absolute;
  left: 600px;
  bottom: 165px;
  opacity: 0;
  pointer-events: auto;
  cursor: pointer;
  z-index: 10;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.shop-item img { 
  width: 100%; 
  height: auto; 
}

.shop-item.show { 
  opacity: 1; 
}

.shop-item.car {
  position: relative;
}

.car {
  width: 550px;
  top: 320px;
  transform: translate(-50%, 20px); 
  transition-delay: 0.3s;
}

.car.show { 
  transform: translate(-50%, 0); 
}

.inner-goods-display {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.shelf-featured {
  position: absolute;
  top: 72px;
  left: 195px;
  transform: translateX(-50%);
  pointer-events: none;
  width: auto;
}

.shelf-featured .goods-on-shelf {
  width: 80px;
  pointer-events: auto;
  cursor: pointer;
}

.shelf-featured .goods-on-shelf img {
  width: 100%;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.goods-on-shelf {
  pointer-events: auto;
  cursor: pointer;
  width: 24px;
}

.shelf-row {
  position: absolute;
  display: flex;
  flex-direction: row;
  gap: 8px;
  width: 40%;
  left: 285px;
  pointer-events: none;
}

.shelf-1st { 
  top: 66px; 
}

.shelf-2nd { 
  top: 94px; 
}

.shelf-3rd { 
  top: 122px; 
}

/* wagon  ------------------------------ */

.wagon {
  width: 180px;
  left: 910px; 
  top: 430px;
  transform: translateY(20px);
  transition-delay: 0.9s;
  position: absolute;
  z-index: 10;
  pointer-events: auto;
}

.wagon > img {
  position: relative;
  z-index: 1;
}

.wagon.show { 
  transform: translateY(0); 
}

.wagon-display {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

.wagon-display .goods-on-shelf {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  top: 54px;
  left: 95px;
  position: absolute;
  z-index: 20;
}

.wagon-display .goods-on-shelf img {
  width: 30px;
  height: auto;
  filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2));
}

/* chair  ------------------------------ */

.chair {
  position: absolute;
  width: 100px;
  left: 190px; 
  top: 500px;
  transform: translateY(20px);
  transition-delay: 1.5s;
}

.chair.show { 
  transform: translateY(0); 
}

.radio-object {
  position: absolute;
  width: 45px;
  top: 10px;
  left: 54px;
  cursor: pointer;
  pointer-events: auto;
  z-index: 9999;
  transition: transform 0.3s ease;
}

.radio-object:hover {
  transform: scale(1.1);
}

.radio-img {
  width: 100%;
  height: auto;
  filter: grayscale(0.8) opacity(0.7);
  transition: 0.5s;
}

.radio-object:not(.muted) .radio-img {
  filter: grayscale(0) opacity(1);
}

.radio-object:not(.muted) .music-notes {
  display: block;
}

/* profile modal ------------------------------ */

#profile-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw; 
  height: 100vh;
  transform: translate(0, 0); 
  background: rgba(255, 255, 255, 0.6); 
  backdrop-filter: blur(10px) brightness(1.2);
  -webkit-backdrop-filter: blur(10px) brightness(1.2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

#profile-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.4s ease, visibility 0s linear 0s;
}

#profile-modal.active .profile-card {
  transform: scale(1);
  opacity: 1;
}

.profile-card {
  background: rgba(255, 255, 255, 0.98);
  width: 300px;
  padding: 40px 20px;
  border-radius: 30px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  text-align: center;
  position: relative;
  margin: auto;
  transform: scale(0.9);
  transition: transform 0.4s ease;
  opacity: 0;
  transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.avatar-frame {
  width: 90px !important;
  height: 90px !important;
  margin: 0 auto 15px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #f9f9f9;
  background-color: #fff !important;
  position: relative;
  z-index: 5;
}

.avatar {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: contain !important; 
  object-position: center !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: relative;
  z-index: 10;
  background-color: transparent !important;
}

.profile-divider {
  border: none;
  height: 1px;
  background: linear-gradient(
    to right, transparent, #eee, transparent
  );
  margin: 20px 0;
}

/* modal js ------------------------------ */

.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal-overlay.active { 
  opacity: 1; pointer-events: auto; 
}

.modal-content {
  position: relative;
  background: white;
  padding: 30px;
  border-radius: 15px;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.modal-content img { 
  width: 100%; 
  max-height: 250px;
  object-fit: contain;
  border-radius: 10px; 
  margin-bottom: 15px; 
}

.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ddd;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 20px;
  color: #333;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: all 0.2s;
  user-select: none;
  z-index: 1000001;
}

.nav-arrow.prev { left: -60px; }
.nav-arrow.next { right: -60px; }

@media (max-width: 768px) {
  .nav-arrow.prev { 
    left: 5px; 
    background: rgba(255, 255, 255, 0.8); 
  }

  .nav-arrow.next { 
    right: 5px; 
    background: rgba(255, 255, 255, 0.8); 
  }
}

#zoom-close.close-button {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  z-index: 15000;
  cursor: pointer;
  transition: opacity 0.3s, transform 0.3s;
}

#zoom-close.close-button.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}