:root {
  /* Crisp translucent soap-bubble SVG art with subtle rim & specular highlights */
  --bubble-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cdefs%3E%3CradialGradient id='g' cx='50%25' cy='50%25' r='50%25'%3E%3Cstop offset='0%25' stop-color='%23ffffff' stop-opacity='0'/%3E%3Cstop offset='76%25' stop-color='%23f5f7fa' stop-opacity='0.06'/%3E%3Cstop offset='92%25' stop-color='%23e5e9f0' stop-opacity='0.28'/%3E%3Cstop offset='98%25' stop-color='%23d4dae3' stop-opacity='0.44'/%3E%3Cstop offset='100%25' stop-color='%23c5ccd6' stop-opacity='0.14'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='100' cy='100' r='97' fill='url(%23g)' stroke='%23dce1e8' stroke-opacity='0.58' stroke-width='1.3'/%3E%3Cpath d='M 44 62 A 74 74 0 0 1 118 28' fill='none' stroke='%23ffffff' stroke-width='5.5' stroke-linecap='round' opacity='0.9'/%3E%3Cpath d='M 32 82 A 76 76 0 0 1 38 69' fill='none' stroke='%23ffffff' stroke-width='4' stroke-linecap='round' opacity='0.75'/%3E%3Cpath d='M 156 142 A 72 72 0 0 1 124 166' fill='none' stroke='%23ffffff' stroke-width='3.5' stroke-linecap='round' opacity='0.8'/%3E%3C/svg%3E");
  --font-ui: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #ffffff;
  font-family: var(--font-ui);
}

.welcome-page {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px 36px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.welcome-stage {
  position: relative;
  width: min(720px, 94vw);
  height: min(60vh, 580px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Center Mascot / Logo */
.mascot {
  position: relative;
  z-index: 2;
  width: auto;
  height: min(38vh, 345px);
  max-width: min(380px, 64vw);
  max-height: 38vh;
  object-fit: contain;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transition: opacity 0.55s ease, transform 0.65s ease;
}

.welcome-page.expanded .mascot {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Bubble Layers */
.bubble-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.bubble-layer--mobile {
  display: none;
}

/* Bubble Slot: bursts outward from (50%, 50%) */
.bubble-slot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--size);
  height: var(--size);
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  transition:
    left 4s cubic-bezier(0.22, 1, 0.36, 1) var(--delay),
    top 4s cubic-bezier(0.22, 1, 0.36, 1) var(--delay),
    opacity 2s ease var(--delay);
}

.welcome-page.expanded .bubble-slot {
  left: calc(50% + var(--ox));
  top: calc(50% + var(--oy));
  opacity: 1;
}

/* Float Wrapper: handles entrance scale + continuous vertical bobbing */
.bubble-float {
  width: 100%;
  height: 100%;
  transform: scale(0.2);
  transition: transform 4s cubic-bezier(0.22, 1, 0.36, 1) var(--delay);
  pointer-events: none;
}

.welcome-page.expanded .bubble-float {
  transform: scale(1);
  animation: bubble-float var(--float-duration) ease-in-out calc(var(--delay) + 4s) infinite;
}

.bubble-slot:hover .bubble-float {
  animation-play-state: paused;
}

@keyframes bubble-float {
  0% {
    transform: scale(1) translateY(0);
  }
  25% {
    transform: scale(1) translateY(calc(var(--float-amp) * -1));
  }
  75% {
    transform: scale(1) translateY(var(--float-amp));
  }
  100% {
    transform: scale(1) translateY(0);
  }
}

/* Actual Bubble Sphere */
.bubble {
  position: relative;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 50%;
  padding: 0;
  background-color: transparent;
  background-image: var(--bubble-art);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111111;
  font-family: var(--font-ui);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-align: center;
  outline: none;
  pointer-events: auto;
  cursor: default;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.bubble-label {
  display: inline-block;
  padding: 0 6%;
  font-size: clamp(
    calc(11px * var(--font-scale, 1)),
    calc(var(--size) * 0.28 * var(--font-scale, 1)),
    calc(34px * var(--font-scale, 1))
  );
  white-space: nowrap;
  pointer-events: none;
}

.bubble.empty {
  pointer-events: none;
}

.bubble.actionable {
  cursor: pointer;
}

.welcome-page.settled .bubble.actionable:hover {
  transform: scale(1.08);
  filter: brightness(1.04) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.06));
}

.welcome-page.settled .bubble.actionable:active {
  transform: scale(1.02);
}

.bubble.actionable:focus-visible {
  box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.25);
}

/* Decorative Satellite Mini-Bubbles */
.bubble-satellite {
  position: absolute;
  border-radius: 50%;
  background-image: var(--bubble-art);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Brand Wordmark */
.wordmark {
  position: relative;
  z-index: 3;
  margin-top: 6px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.55s ease 0.2s, transform 0.65s ease 0.2s;
}

.welcome-page.expanded .wordmark {
  opacity: 1;
  transform: translateY(0);
}

.wordmark-title {
  margin: 0;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.15;
  color: #111111;
}

.wordmark-subtitle {
  margin: 6px 0 0;
  font-size: clamp(14px, 1.8vw, 18px);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #222222;
}

/* Enter Button */
.enter-btn {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  margin-top: 26px;
  height: 58px;
  min-width: 83px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1.5px solid #111111;
  background: #ffffff;
  color: #111111;
  font-family: var(--font-ui);
  font-size: 26px;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.5s ease 0.45s,
    transform 0.55s ease 0.45s,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.welcome-page.expanded .enter-btn {
  opacity: 1;
  transform: translateY(0);
}

.enter-btn:hover {
  background: #f7f7f7;
}

.enter-btn:active {
  transform: translateY(1px) scale(0.99);
}

.enter-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.88);
  color: #ffffff;
  font-size: 14px;
  letter-spacing: 0.02em;
  pointer-events: none;
  opacity: 0;
  z-index: 20;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Mobile Layout (<= 900px) */
@media (max-width: 900px) {
  .welcome-page {
    padding: 16px 12px 32px;
  }

  .welcome-stage {
    width: min(520px, 96vw);
    height: min(48vh, 430px);
  }

  .mascot {
    height: min(22vh, 185px);
    max-width: min(210px, 50vw);
    max-height: 22vh;
  }

  .bubble-layer--pc {
    display: none;
  }

  .bubble-layer--mobile {
    display: block;
  }

  .wordmark {
    margin-top: 4px;
  }

  .enter-btn {
    margin-top: 22px;
    height: 54px;
    min-width: 76px;
    font-size: 24px;
  }

  .enter-icon {
    width: 30px;
    height: 30px;
  }
}

