:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ink: #536071;
  --deep: #283349;
  --pink: #ff83c8;
  --blue: #93d7ff;
  --glass: rgba(255, 255, 255, 0.66);
  --glass-strong: rgba(255, 255, 255, 0.84);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: #f7eef9;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Hiragino Kaku Gothic ProN", "Noto Sans CJK SC", Arial, sans-serif;
  overflow-x: hidden;
}

button {
  font: inherit;
}

.site-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: max(18px, var(--safe-top)) 22px max(22px, var(--safe-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  overflow: hidden;
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image: linear-gradient(90deg, rgba(255,255,255,.24), rgba(255,255,255,.08)), url("./assets/bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.012);
}

.bg-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 44%, rgba(255,255,255,.34), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,.18), rgba(239,245,255,.28));
}

.hero-card {
  position: relative;
  width: min(1180px, 96vw);
  min-height: min(660px, calc(100vh - 44px));
  border-radius: clamp(26px, 4vw, 54px);
  padding: clamp(18px, 3vw, 38px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.portrait-stage {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.portrait {
  position: absolute;
  width: clamp(210px, 25vw, 380px);
  height: auto;
  filter: drop-shadow(0 14px 24px rgba(55, 67, 92, .22));
  will-change: transform;
}

.portrait-1 {
  left: clamp(10px, 3vw, 54px);
  top: 15%;
  animation: float-a 4.8s ease-in-out infinite;
}

.portrait-2 {
  left: 37%;
  top: -3%;
  width: clamp(220px, 27vw, 400px);
  animation: float-b 5.3s ease-in-out infinite;
}

.portrait-3 {
  right: clamp(10px, 3vw, 54px);
  top: 15%;
  animation: float-c 4.6s ease-in-out infinite;
}

.portrait-4 {
  left: clamp(18px, 7vw, 130px);
  bottom: -3%;
  animation: float-c 5.6s ease-in-out infinite;
}

.portrait-5 {
  right: clamp(18px, 7vw, 130px);
  bottom: -2%;
  animation: float-a 5.1s ease-in-out infinite;
}

@keyframes float-a {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-1.6deg); }
  50% { transform: translate3d(14px, -12px, 0) rotate(1.2deg); }
}

@keyframes float-b {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(1deg); }
  50% { transform: translate3d(-16px, 10px, 0) rotate(-1.4deg); }
}

@keyframes float-c {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(.8deg); }
  50% { transform: translate3d(-10px, -14px, 0) rotate(-1deg); }
}

.content-panel {
  position: relative;
  width: min(780px, 92vw);
  margin-top: 24px;
  padding: clamp(26px, 4vw, 48px);
  border: 1px solid rgba(255,255,255,.74);
  border-radius: clamp(28px, 4vw, 48px);
  background: linear-gradient(135deg, rgba(255,255,255,.56), rgba(255,255,255,.32));
  box-shadow: 0 22px 70px rgba(81, 104, 138, .22), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
  text-align: center;
}

.logo {
  display: block;
  width: min(610px, 82vw);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 10px 18px rgba(27, 82, 120, .24));
}

.tagline {
  min-height: 2.1em;
  margin: clamp(14px, 2.2vw, 24px) auto clamp(20px, 3vw, 34px);
  font-size: clamp(18px, 2.2vw, 28px);
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--deep);
  text-shadow: 0 1px 0 rgba(255,255,255,.75);
}

.cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(14px, 2.4vw, 28px);
}

.cta {
  position: relative;
  min-height: clamp(66px, 8vw, 86px);
  border: 0;
  border-radius: 999px;
  padding: 0 28px;
  color: #5e6380;
  font-size: clamp(19px, 2.2vw, 27px);
  font-weight: 900;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 5px 8px auto 8px;
  height: 42%;
  border-radius: 999px;
  background: rgba(255,255,255,.36);
  pointer-events: none;
}

.cta:hover,
.cta:focus-visible {
  transform: translateY(-3px);
  filter: brightness(1.03);
  outline: none;
}

.cta-primary {
  background: linear-gradient(180deg, #ffbde2, #ff83c8 54%, #ff78c2);
  box-shadow: 0 10px 22px rgba(247, 100, 186, .36), inset 0 0 0 3px rgba(255,255,255,.68);
}

.cta-secondary {
  background: linear-gradient(180deg, #e9f8ff, #aee3ff 58%, #94d5fb);
  box-shadow: 0 10px 22px rgba(75, 169, 226, .27), inset 0 0 0 3px rgba(255,255,255,.75);
}

.language-switch {
  position: fixed;
  right: max(18px, calc(18px + env(safe-area-inset-right, 0px)));
  top: max(18px, calc(18px + var(--safe-top)));
  z-index: 3;
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.5);
  border: 1px solid rgba(255,255,255,.66);
  box-shadow: 0 10px 28px rgba(70, 92, 130, .13);
  backdrop-filter: blur(10px);
}

.language-switch button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: transparent;
  color: #637088;
  font-weight: 800;
  cursor: pointer;
}

.language-switch button.active {
  color: #fff;
  background: linear-gradient(180deg, #ff9ed2, #ff7bc3);
  box-shadow: 0 6px 14px rgba(244, 92, 180, .26);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + var(--safe-bottom));
  transform: translate(-50%, 14px);
  min-width: min(460px, 80vw);
  max-width: 90vw;
  padding: 16px 24px;
  border-radius: 20px;
  background: rgba(36, 38, 48, .82);
  color: #fff;
  text-align: center;
  white-space: pre-line;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  backdrop-filter: blur(10px);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 760px) {
  .site-shell {
    align-items: stretch;
    padding: max(14px, var(--safe-top)) 12px max(16px, var(--safe-bottom));
  }

  .hero-card {
    width: 100%;
    min-height: calc(100svh - 28px);
    padding: 88px 10px 16px;
  }

  .language-switch {
    top: max(14px, var(--safe-top));
    right: max(12px, env(safe-area-inset-right, 0px));
    transform: none;
    gap: 6px;
  }

  .language-switch button {
    padding: 9px 12px;
    font-size: 13px;
  }

  .portrait {
    width: clamp(165px, 50vw, 260px);
  }

  .portrait-1 { left: -8%; top: 10%; }
  .portrait-2 { left: 28%; top: 3%; width: clamp(170px, 54vw, 280px); }
  .portrait-3 { right: -9%; top: 15%; }
  .portrait-4 { left: -8%; bottom: -8%; }
  .portrait-5 { right: -8%; bottom: -10%; }

  .content-panel {
    align-self: center;
    padding: 24px 16px;
  }

  .logo {
    width: min(500px, 86vw);
  }

  .cta-row {
    grid-template-columns: 1fr;
  }

  .cta {
    min-height: 68px;
  }
}
