﻿:root {
  --design-width: 930;
  --design-height: 11866;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #d9f3ff; }
body {
  min-height: 100%;
  margin: 0;
  background: radial-gradient(circle at 18% 0%, rgba(255,255,255,.9) 0 140px, transparent 280px), linear-gradient(180deg, #bfefff 0%, #f2fbff 48%, #dff6ff 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}
button, input, textarea, select { font: inherit; }
.page-shell { width: 100%; display: flex; justify-content: center; padding: 0 max(0px, env(safe-area-inset-left)) 0 max(0px, env(safe-area-inset-right)); }
.phone-stage { position: relative; width: min(100vw, 465px); min-width: 320px; margin: 0 auto; background: #fff; box-shadow: 0 0 0 1px rgba(0,97,160,.08), 0 24px 72px rgba(42,110,154,.24); overflow: hidden; line-height: 0; }
.design-art { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; image-rendering: auto; }
.snow-layer {
  position: fixed;
  left: 50%;
  top: 0;
  width: min(100vw, 465px);
  height: 100vh;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(-50%);
  mix-blend-mode: screen;
}
.snow-layer span {
  position: absolute;
  top: -32px;
  left: var(--left);
  width: calc(var(--size) * 1.55);
  height: calc(var(--size) * 1.55);
  border-radius: 50%;
  background: rgba(255,255,255,.82);
  box-shadow: 0 0 13px rgba(255,255,255,.8);
  opacity: var(--opacity);
  filter: blur(var(--blur));
  animation: snow-fall var(--duration) cubic-bezier(.42, 0, .58, 1) infinite;
  animation-delay: var(--delay);
}
.snow-layer span:nth-child(1) { --left: 7%; --size: 5px; --opacity: .48; --duration: 14s; --delay: -2s; --drift: 32px; --blur: .2px; }
.snow-layer span:nth-child(2) { --left: 17%; --size: 3px; --opacity: .34; --duration: 19s; --delay: -7s; --drift: -26px; --blur: .5px; }
.snow-layer span:nth-child(3) { --left: 29%; --size: 4px; --opacity: .42; --duration: 16s; --delay: -4s; --drift: 28px; --blur: .4px; }
.snow-layer span:nth-child(4) { --left: 40%; --size: 3px; --opacity: .36; --duration: 22s; --delay: -11s; --drift: -34px; --blur: .6px; }
.snow-layer span:nth-child(5) { --left: 51%; --size: 6px; --opacity: .5; --duration: 18s; --delay: -6s; --drift: 36px; --blur: .25px; }
.snow-layer span:nth-child(6) { --left: 61%; --size: 3px; --opacity: .38; --duration: 15s; --delay: -9s; --drift: -18px; --blur: .5px; }
.snow-layer span:nth-child(7) { --left: 72%; --size: 5px; --opacity: .46; --duration: 21s; --delay: -3s; --drift: 30px; --blur: .3px; }
.snow-layer span:nth-child(8) { --left: 82%; --size: 2px; --opacity: .32; --duration: 17s; --delay: -10s; --drift: -24px; --blur: .8px; }
.snow-layer span:nth-child(9) { --left: 91%; --size: 4px; --opacity: .4; --duration: 24s; --delay: -5s; --drift: 22px; --blur: .45px; }
.snow-layer span:nth-child(10) { --left: 3%; --size: 3px; --opacity: .34; --duration: 20s; --delay: -13s; --drift: -20px; --blur: .7px; }
@keyframes snow-fall {
  0% { transform: translate3d(0, -36px, 0) scale(.86); opacity: 0; }
  12% { opacity: var(--opacity); }
  34% { transform: translate3d(calc(var(--drift) * .38), 34vh, 0) scale(1); }
  68% { transform: translate3d(calc(var(--drift) * -.22), 68vh, 0) scale(.92); opacity: var(--opacity); }
  100% { transform: translate3d(var(--drift), calc(100vh + 48px), 0) scale(1.06); opacity: 0; }
}
.section-nav {
  position: fixed;
  left: 50%;
  top: max(24px, calc(env(safe-area-inset-top) + 18px));
  z-index: 25;
  width: min(calc(100vw - 24px), 402px);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  transform: translateX(-50%);
}
.section-nav button {
  min-width: 0;
  height: 26px;
  border: 1px solid rgba(94, 173, 219, .78);
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  color: #2f7da5;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 8px rgba(62, 139, 178, .08);
}
.section-nav button:active,
.section-nav button.is-active {
  border-color: #73c82a;
  background: #73c82a;
  color: #fff;
  box-shadow: inset 0 -2px 0 rgba(52, 128, 9, .18);
}
.scroll-progress {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 26;
  width: 100vw;
  height: 3px;
  overflow: hidden;
  border-radius: 0;
  background: rgba(255, 255, 255, .5);
  box-shadow: none;
}
.scroll-progress span {
  display: block;
  width: calc(var(--progress, 0) * 100%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7bd62c 0%, #27c7ff 52%, #ff9f2d 100%);
  box-shadow: 0 0 10px rgba(39, 199, 255, .35);
  transition: width 120ms ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .snow-layer span { animation: none; }
}
.hotspot { position: absolute; left: calc(var(--x) / var(--design-width) * 100%); top: calc(var(--y) / var(--design-height) * 100%); width: calc(var(--w) / var(--design-width) * 100%); height: calc(var(--h) / var(--design-height) * 100%); appearance: none; border: 0; padding: 0; margin: 0; border-radius: 12px; background: transparent; color: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.hotspot:focus-visible { outline: 2px solid rgba(1,149,254,.95); outline-offset: 2px; background: rgba(255,255,255,.14); }
.hotspot:active { background: rgba(255,255,255,.18); transform: scale(.98); }
.action-button {
  --button-lift: -2px;
  --button-press: 3px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(180deg, #12a9ff 0%, #0195fe 100%);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  box-shadow: 0 5px 0 #047bd1, 0 9px 16px rgba(0, 116, 211, .22);
  transform-origin: center;
  transform: translateY(var(--button-lift));
  transition: transform 90ms ease, filter 90ms ease, box-shadow 90ms ease;
}
.action-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: transparent;
  pointer-events: none;
  transition: background 90ms ease, box-shadow 90ms ease;
}
.action-button:active {
  background: linear-gradient(180deg, #039df3 0%, #0087e7 100%);
  filter: saturate(1.05);
  transform: translateY(calc(var(--button-lift) + var(--button-press))) scale(.985);
  box-shadow: 0 1px 0 #047bd1, 0 5px 10px rgba(0, 116, 211, .18);
}
.action-button:active::after {
  background: rgba(5, 73, 128, .09);
  box-shadow: inset 0 3px 9px rgba(0, 64, 122, .2);
}
.action-button-main {
  font-size: clamp(16px, 3.87vw, 18px);
  border-radius: 8px;
}
.task-button {
  border-radius: 8px;
  font-size: clamp(16px, 3.87vw, 18px);
}
.action-button-small {
  font-size: clamp(16px, 3.87vw, 18px);
  font-weight: 400;
  border-radius: 999px;
  box-shadow: 0 4px 0 #047bd1, 0 8px 14px rgba(0, 116, 211, .2);
}
.action-button span {
  display: inline-block;
  width: 22px;
  height: 22px;
  overflow: hidden;
  color: transparent;
  font-size: 0;
  transform: none;
}
.action-button span::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin: 4px 0 0 7px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid #fff;
}
.toast { position: fixed; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); z-index: 20; max-width: min(86vw, 340px); padding: 10px 16px; border-radius: 999px; background: rgba(15,55,78,.9); color: #fff; font-size: 14px; line-height: 1.45; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity 180ms ease, transform 180ms ease; box-shadow: 0 12px 30px rgba(9,54,88,.24); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.dialog-backdrop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 14px; background: rgba(15,46,63,.46); backdrop-filter: blur(8px); }
.dialog-backdrop[hidden] { display: none; }
.dialog { position: relative; width: min(94vw, 430px); max-height: min(90vh, 780px); overflow: auto; border-radius: 20px; padding: 24px 18px 18px; background: #fffaf0; color: #43535f; box-shadow: 0 28px 70px rgba(18,72,111,.34); border: 2px solid rgba(195,173,149,.55); }
.dialog h2 { margin: 0 42px 10px 10px; color: #0195fe; font-size: 25px; line-height: 1.15; letter-spacing: 0; }
.dialog-body { font-size: 15px; line-height: 1.75; white-space: normal; }
.dialog-close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #e7f6ff; color: #0195fe; font-size: 26px; line-height: 1; cursor: pointer; }
.dialog-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 16px; }
.dialog-actions.has-secondary { grid-template-columns: 1fr 1fr; }
.dialog-primary, .dialog-secondary { width: 100%; height: 44px; border: 0; border-radius: 12px; color: #fff; font-size: 17px; cursor: pointer; box-shadow: inset 0 -4px 0 rgba(0,0,0,.16); }
.dialog-primary { background: #7ebe2a; }
.dialog-secondary { background: #0195fe; }
.card-intro { margin: 0 10px 14px; color: #52616b; line-height: 1.6; }
.personality-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 2px 4px; }
.pick-card { min-width: 0; padding: 0; border: 0; border-radius: 17px; background: transparent; cursor: pointer; touch-action: manipulation; transform-origin: center; transition: transform 180ms ease, filter 180ms ease; }
.pick-card:focus-visible { outline: 3px solid rgba(1,149,254,.92); outline-offset: 3px; }
.pick-card:active { transform: translateY(2px) scale(.98); }
.pick-card.is-dimming { filter: saturate(.65) opacity(.42); }
.pick-card.is-selected { animation: chosen-card 520ms ease both; }
@keyframes chosen-card { 0% { transform: scale(1) rotate(0); } 45% { transform: scale(1.08) rotate(-2deg); } 100% { transform: scale(1) rotate(0); } }
.personality-card-img { display: block; width: 100%; height: auto; aspect-ratio: 448 / 635; object-fit: contain; border-radius: 18px; filter: drop-shadow(0 9px 18px rgba(63,95,119,.18)); user-select: none; -webkit-user-drag: none; }
.personality-result { display: grid; gap: 14px; justify-items: center; padding: 2px 0 0; }
.result-card-wrap { width: min(73vw, 292px); }
.result-copy { margin: 0 12px; color: #52616b; line-height: 1.65; text-align: left; }
@media (min-width: 720px) {
  .page-shell { padding: 28px 0; }
  .phone-stage { border-radius: 24px; }
  .section-nav {
    left: calc(50% + 252px);
    top: 110px;
    width: 74px;
    grid-template-columns: 1fr;
    gap: 8px;
    transform: none;
  }
  .section-nav button { height: 30px; }
  .snow-layer {
    left: 50%;
    width: min(100vw, 720px);
  }
}
@media (max-width: 360px) { .dialog { padding-left: 14px; padding-right: 14px; } .personality-grid { gap: 9px; } }

.hot-spring-carousel {
  position: absolute;
  left: 0;
  top: calc(6000 / var(--design-height) * 100%);
  width: 100%;
  height: calc(1240 / var(--design-height) * 100%);
  z-index: 4;
  pointer-events: none;
}

.carousel-viewport {
  position: absolute;
  left: calc(92 / var(--design-width) * 100%);
  top: calc(400 / 1240 * 100%);
  width: calc(712 / var(--design-width) * 100%);
  height: calc(738 / 1240 * 100%);
  overflow: hidden;
  pointer-events: auto;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  -webkit-mask: url("assets/carousel-photo-mask.png") center / 100% 100% no-repeat;
  mask: url("assets/carousel-photo-mask.png") center / 100% 100% no-repeat;
}

.carousel-frame-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transform: translate3d(0, 0, 0);
  transition: transform 360ms ease;
  will-change: transform;
  animation: carousel-auto 13s infinite;
}

.hot-spring-carousel.is-js-carousel .carousel-track {
  animation: none;
}

.carousel-slide {
  flex: 0 0 100%;
  min-width: 100%;
  height: 100%;
}

.carousel-slide picture,
.carousel-slide img {
  display: block;
  width: 100%;
  height: 100%;
}

.carousel-slide img {
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.carousel-dots {
  position: absolute;
  left: calc(356 / var(--design-width) * 100%);
  top: calc(1164 / 1240 * 100%);
  width: calc(220 / var(--design-width) * 100%);
  height: calc(64 / 1240 * 100%);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  pointer-events: auto;
}

.carousel-dots::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #eaf8fb;
}

.carousel-dot {
  position: relative;
  z-index: 1;
  width: 6.5px;
  height: 6.5px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: #d5d2cc;
  cursor: pointer;
}

.carousel-dot.is-active {
  background: #ff3c4d;
}

@keyframes carousel-auto {
  0%, 16% { transform: translate3d(0, 0, 0); }
  20%, 36% { transform: translate3d(-100%, 0, 0); }
  40%, 56% { transform: translate3d(-200%, 0, 0); }
  60%, 76% { transform: translate3d(-300%, 0, 0); }
  80%, 96% { transform: translate3d(-400%, 0, 0); }
  100% { transform: translate3d(0, 0, 0); }
}
