:root {
  --deep: #080A1F;
  --booth: #1A1140;
  --violet: #6B4DFF;
  --pearl: #F4F0FF;
  --silver: #BFC7D8;
  --ice: #8FE7FF;
  --magenta: #FF5DBE;
  --mint: #B7FFDA;
  --white: #FFFFFF;
  --title-font: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
  --jp-font: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --ui-font: "Space Grotesk", Inter, ui-sans-serif, system-ui, sans-serif;
  --design-font-check: "Space Grotesk** for UI prompts";
  --soft-shadow: 0 28px 90px rgba(8, 10, 31, .62);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--deep);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--pearl);
  font-family: var(--ui-font);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 93, 190, .34), transparent 28vw),
    radial-gradient(circle at 86% 26%, rgba(143, 231, 255, .28), transparent 30vw),
    linear-gradient(135deg, #080A1F 0%, #1A1140 42%, #6B4DFF 72%, #8FE7FF 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .2;
  background-image:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px),
    radial-gradient(circle, rgba(244, 240, 255, .5) 0 1px, transparent 1.5px);
  background-size: 44px 44px, 44px 44px, 13px 13px;
  mix-blend-mode: screen;
}

button, a { font: inherit; }

.ambient-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-orbs span {
  position: absolute;
  width: 28vmax;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(38px);
  opacity: .32;
  animation: floatOrb 16s ease-in-out infinite alternate;
}

.ambient-orbs span:nth-child(1) { left: -8%; top: 10%; background: #FF5DBE; }
.ambient-orbs span:nth-child(2) { right: -8%; top: 22%; background: #8FE7FF; animation-delay: -4s; }
.ambient-orbs span:nth-child(3) { left: 24%; bottom: -14%; background: #6B4DFF; animation-delay: -8s; }
.ambient-orbs span:nth-child(4) { right: 18%; bottom: 18%; background: #B7FFDA; animation-delay: -11s; opacity: .18; }

.rhinestone-nav {
  position: fixed;
  right: clamp(14px, 2.4vw, 34px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: grid;
  gap: 15px;
}

.stone {
  position: relative;
  display: block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.86);
  background: radial-gradient(circle at 35% 25%, #FFFFFF 0 14%, #8FE7FF 15% 40%, #FF5DBE 54%, #6B4DFF 100%);
  box-shadow: 0 0 12px rgba(143, 231, 255, .65), inset 0 0 5px #FFFFFF;
  transition: transform .35s ease, box-shadow .35s ease;
}

.stone.active {
  transform: scale(1.55) rotate(45deg);
  box-shadow: 0 0 22px #FF5DBE, 0 0 42px rgba(143, 231, 255, .7), inset 0 0 7px #FFFFFF;
}

.stone span {
  position: absolute;
  right: 23px;
  top: 50%;
  translate: 0 -50%;
  width: max-content;
  color: var(--pearl);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}

.stone:hover span, .stone.active span { opacity: .84; }

.clamshell-story { position: relative; z-index: 2; }

.phone-scene {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 72px);
  isolation: isolate;
  perspective: 1100px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.phone-scene::before {
  content: "";
  position: absolute;
  inset: 4.5vw 5vw;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: clamp(28px, 5vw, 66px);
  background:
    linear-gradient(135deg, rgba(255,255,255,.1), transparent 26%, rgba(255,93,190,.12) 51%, transparent),
    repeating-linear-gradient(110deg, rgba(255,255,255,.04) 0 1px, transparent 1px 8px);
  box-shadow: inset 0 0 36px rgba(255,255,255,.12), var(--soft-shadow);
  transform: rotateX(var(--tilt, 0deg));
  transition: transform .7s cubic-bezier(.22, .84, .28, 1), opacity .7s ease;
  z-index: -2;
}

.phone-scene::after {
  content: "";
  position: absolute;
  inset: auto -8vw -16vh -8vw;
  height: 42vh;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.22), rgba(191,199,216,.12) 34%, rgba(8,10,31,.86) 72%);
  filter: blur(4px);
  z-index: -3;
}

.hinge-line {
  position: absolute;
  left: -8vw;
  top: 50%;
  width: 116vw;
  height: 8px;
  transform: rotate(-8deg);
  background: linear-gradient(90deg, transparent, #FFFFFF 8%, #BFC7D8 23%, #FF5DBE 49%, #8FE7FF 72%, transparent);
  box-shadow: 0 0 26px rgba(143,231,255,.54), 0 0 4px #FFFFFF;
  opacity: .52;
  z-index: -1;
}

.scene-label {
  position: absolute;
  top: clamp(22px, 4vw, 54px);
  left: clamp(20px, 5vw, 74px);
  display: grid;
  gap: 5px;
  color: var(--silver);
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: 11px;
}

.scene-label b {
  color: var(--mint);
  font-family: var(--jp-font);
  font-weight: 700;
  letter-spacing: .08em;
}

.frost-panel {
  border: 1px solid rgba(255,255,255,.45);
  background: linear-gradient(135deg, rgba(244,240,255,.20), rgba(143,231,255,.09) 45%, rgba(255,93,190,.10));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.46), 0 24px 80px rgba(8,10,31,.44);
  backdrop-filter: blur(16px);
}

.chrome-rim {
  border: 1px solid transparent;
  background-image:
    linear-gradient(135deg, rgba(244,240,255,.20), rgba(191,199,216,.08), rgba(255,93,190,.12)),
    linear-gradient(135deg, #FFFFFF, #BFC7D8 30%, #FF5DBE 58%, #8FE7FF 82%, #FFFFFF);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.62), 0 24px 90px rgba(8,10,31,.56);
}

.closed-phone {
  position: relative;
  width: min(560px, 78vw);
  height: min(365px, 58vw);
  border-radius: 48px 48px 64px 64px;
  transform: rotate(-8deg) translateY(-4vh);
  transform-style: preserve-3d;
  animation: phoneWake 2.4s ease-out both;
}

.phone-lid {
  position: absolute;
  inset: 14px;
  border-radius: 38px 38px 56px 56px;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.86), transparent 12%),
    linear-gradient(145deg, #F4F0FF 0%, #BFC7D8 34%, #FFFFFF 42%, #8FE7FF 61%, #6B4DFF 100%);
  box-shadow: inset -22px -30px 46px rgba(8,10,31,.28), inset 18px 18px 24px rgba(255,255,255,.55);
}

.phone-lid::before, .phone-lid::after {
  content: "";
  position: absolute;
  border-radius: 999px;
}
.phone-lid::before {
  left: 50%; bottom: 24px; width: 74%; height: 12px; translate: -50% 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.78), #FF5DBE, transparent);
}
.phone-lid::after {
  inset: 18px;
  border: 1px solid rgba(8,10,31,.16);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.38);
}

.outer-display {
  position: absolute;
  left: 50%; top: 50%; translate: -50% -50%;
  width: 54%;
  min-height: 112px;
  padding: 20px;
  border-radius: 30px;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    repeating-linear-gradient(0deg, rgba(143,231,255,.08) 0 2px, transparent 2px 5px),
    linear-gradient(145deg, rgba(8,10,31,.92), rgba(26,17,64,.92));
  color: var(--ice);
  box-shadow: inset 0 0 24px rgba(143,231,255,.32), 0 0 20px rgba(255,93,190,.28);
}
.outer-display strong { font-family: var(--title-font); font-size: clamp(36px, 6vw, 68px); color: var(--white); font-weight: 600; text-shadow: 0 0 16px #8FE7FF, 0 0 28px #FF5DBE; }
.outer-display small, .outer-display em { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; font-style: normal; }
.unread-badge { position: absolute; right: 20%; top: 26%; color: var(--magenta); font-size: 34px; text-shadow: 0 0 18px #FF5DBE; animation: pulseBadge 1.2s ease-in-out infinite; }
.antenna-gem { position: absolute; right: 12%; top: -22px; width: 38px; aspect-ratio: 1; rotate: 45deg; border-radius: 42% 58% 52% 48%; background: radial-gradient(circle at 35% 25%, #FFFFFF, #B7FFDA 35%, #FF5DBE 70%, #6B4DFF); box-shadow: 0 0 22px #8FE7FF; }
.sticker-strip { position: absolute; left: 7%; bottom: 20%; padding: 8px 14px; rotate: -12deg; border-radius: 12px; background: rgba(255,255,255,.42); color: #080A1F; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.phone-shadow { position: absolute; inset: auto 2% -14% 8%; height: 42%; border-radius: 50%; background: rgba(8,10,31,.72); filter: blur(30px); transform: translateZ(-80px); }

.opening-copy {
  position: absolute;
  right: clamp(28px, 8vw, 130px);
  bottom: clamp(34px, 8vh, 98px);
  max-width: 430px;
  padding: clamp(22px, 3vw, 36px);
  border-radius: 34px;
}
h1, h2 { margin: 0; font-family: var(--title-font); font-weight: 600; line-height: .88; letter-spacing: -.04em; }
h1 { font-size: clamp(64px, 11vw, 154px); color: var(--white); text-shadow: 0 0 24px rgba(255,93,190,.42); }
h2 { font-size: clamp(48px, 8vw, 116px); }
p { line-height: 1.6; }
.jp { font-family: var(--jp-font); color: var(--mint); letter-spacing: .08em; }

.screen-half {
  position: absolute;
  top: 9vh;
  left: 10vw;
  width: min(720px, 72vw);
  padding: clamp(24px, 4vw, 52px);
  border-radius: 42px;
  transform: rotate(-5deg);
}
.sms-timestamp { color: var(--ice); letter-spacing: .16em; text-transform: uppercase; }
.bubble-field { position: relative; width: min(940px, 88vw); height: 68vh; }
.sms-bubble {
  position: absolute;
  max-width: min(360px, 78vw);
  padding: 18px 22px;
  border-radius: 30px 30px 30px 6px;
  border: 1px solid rgba(255,255,255,.44);
  background: linear-gradient(145deg, rgba(244,240,255,.26), rgba(143,231,255,.16), rgba(255,93,190,.12));
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 42px rgba(8,10,31,.42), inset 0 1px 0 rgba(255,255,255,.58);
  animation: bubbleBreathe 4.6s ease-in-out infinite;
}
.sms-bubble span { display: block; margin-bottom: 8px; color: var(--mint); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.bubble-one { left: 2%; top: 26%; }
.bubble-two { right: 6%; top: 16%; border-radius: 30px 30px 6px 30px; animation-delay: -.9s; font-family: var(--jp-font); }
.bubble-three { left: 24%; bottom: 16%; animation-delay: -1.8s; }
.bubble-four { right: 18%; bottom: 5%; animation-delay: -2.7s; }
.keypad-surface { position: absolute; bottom: 7vh; left: 50%; translate: -50% 0; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.soft-key, .poetic-actions button {
  border: 1px solid rgba(255,255,255,.55);
  color: var(--pearl);
  background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,93,190,.12));
  border-radius: 999px;
  padding: 12px 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 12px 30px rgba(8,10,31,.36);
  cursor: pointer;
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}
.soft-key:hover, .soft-key.active, .poetic-actions button:hover { transform: translateY(-3px); background: linear-gradient(135deg, rgba(255,255,255,.24), rgba(255,93,190,.30)); box-shadow: 0 0 24px rgba(255,93,190,.36); }

.counter-rail {
  position: absolute;
  top: 10vh;
  left: 8vw;
  width: min(520px, 72vw);
  padding: 26px 34px;
  border-radius: 36px;
  transform: rotate(-4deg);
}
.counter-rail p { margin-bottom: 0; color: var(--silver); }
.charm-chain {
  width: min(1050px, 88vw);
  min-height: 58vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 4vw, 60px);
  padding-top: 12vh;
}
.renai-charm {
  --sway: 0deg;
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  transform-origin: 50% -58px;
  transform: rotate(var(--sway));
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
  animation: charmSwing 4.8s ease-in-out infinite;
}
.renai-charm::before { content: ""; width: 1px; height: 82px; background: linear-gradient(#FFFFFF, #BFC7D8, transparent); box-shadow: 0 0 8px #8FE7FF; }
.renai-charm i {
  display: block;
  width: clamp(54px, 8vw, 92px);
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.7);
  background: radial-gradient(circle at 32% 24%, #FFFFFF, #8FE7FF 25%, #FF5DBE 56%, #6B4DFF 100%);
  box-shadow: inset 0 0 18px rgba(255,255,255,.5), 0 0 26px rgba(143,231,255,.46);
}
.renai-charm span { font-size: 11px; text-transform: uppercase; letter-spacing: .16em; color: var(--mint); }
.pearl i { border-radius: 50%; background: radial-gradient(circle at 30% 20%, #FFFFFF, #F4F0FF 45%, #BFC7D8 72%, #8FE7FF); }
.bubble i { border-radius: 38% 38% 38% 12%; }
.chrome-star i { clip-path: polygon(50% 0, 62% 34%, 98% 35%, 69% 57%, 79% 92%, 50% 72%, 21% 92%, 31% 57%, 2% 35%, 38% 34%); }
.capsule i { border-radius: 999px; width: clamp(48px, 7vw, 72px); height: clamp(86px, 11vw, 126px); background: linear-gradient(180deg, #FFFFFF, #FF5DBE 48%, #B7FFDA 50%, #6B4DFF); }
.mint-drop i { border-radius: 60% 60% 60% 8%; rotate: 45deg; background: radial-gradient(circle at 30% 20%, #FFFFFF, #B7FFDA 38%, #8FE7FF 66%, #1A1140); }
.charm-star { position: absolute; left: clamp(20px, 10vw, 140px); top: 5vh; z-index: 4; }
.receipt-ribbon { position: absolute; bottom: 9vh; right: 8vw; width: min(430px, 78vw); padding: 20px 24px; border-radius: 8px 28px 8px 28px; transform: rotate(5deg); }
.receipt-ribbon span { color: var(--magenta); text-transform: uppercase; letter-spacing: .18em; font-size: 11px; }

.crescent-booth {
  width: min(780px, 82vw);
  aspect-ratio: 1.45;
  border-radius: 50% 50% 18% 18%;
  display: grid;
  place-items: center;
  background-color: rgba(26,17,64,.38);
  transform: rotate(-5deg);
}
.lyric-disc {
  position: relative;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.28);
  background: conic-gradient(from 120deg, rgba(255,93,190,.34), rgba(143,231,255,.3), rgba(183,255,218,.16), rgba(107,77,255,.42), rgba(255,93,190,.34));
  box-shadow: inset 0 0 48px rgba(8,10,31,.45), 0 0 42px rgba(143,231,255,.22);
  animation: slowRotate 18s linear infinite;
}
.karaoke-lyric {
  position: absolute;
  left: 50%; top: 50%;
  width: 120%;
  margin: 0;
  text-align: center;
  font-family: var(--jp-font);
  color: var(--white);
  text-shadow: 0 0 16px #FF5DBE;
  letter-spacing: .08em;
  animation: lyricCrawl 7s linear infinite;
}
.lyric-a { transform: translate(-50%, -50%) rotate(-18deg) translateY(-96px); }
.lyric-b { transform: translate(-50%, -50%) rotate(14deg); animation-delay: -2.2s; color: var(--ice); }
.lyric-c { transform: translate(-50%, -50%) rotate(30deg) translateY(90px); animation-delay: -4s; color: var(--mint); }
.timing-bars { position: absolute; left: 8vw; bottom: 12vh; width: min(420px, 72vw); display: grid; gap: 12px; }
.timing-bars span { height: 10px; border-radius: 999px; background: rgba(255,255,255,.16); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.timing-bars span::before { content: ""; display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, #B7FFDA, #8FE7FF, #FF5DBE); animation: singBar 3.8s ease-in-out infinite alternate; }
.coaster-stamp { position: absolute; right: 11vw; bottom: 14vh; width: 168px; aspect-ratio: 1; border-radius: 50%; border: 1px dashed rgba(255,255,255,.62); display: grid; place-items: center; color: var(--magenta); font-family: "Yeseva One", Georgia, serif; font-size: 24px; text-align: center; rotate: 10deg; background: rgba(244,240,255,.08); box-shadow: inset 0 0 24px rgba(255,255,255,.12); }

.reflective-counter {
  position: absolute;
  inset: 12vh 8vw auto;
  height: 42vh;
  border-radius: 48px;
  display: grid;
  place-items: center;
  background-color: rgba(8,10,31,.55);
  overflow: hidden;
}
.reflective-counter::before { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 0 28%, rgba(255,255,255,.3) 38%, transparent 48% 100%); animation: chromeSweep 5s ease-in-out infinite; }
.condensation-script {
  font-family: var(--title-font);
  font-size: clamp(58px, 13vw, 190px);
  color: rgba(255,255,255,.82);
  text-shadow: 0 0 14px #8FE7FF, 0 0 36px rgba(255,93,190,.36);
  filter: blur(.25px);
  transition: opacity .5s ease, letter-spacing .5s ease;
}
.condensation-script.changed { opacity: .72; letter-spacing: .05em; }
.condensation-marks span { position: absolute; width: 1px; height: 90px; background: linear-gradient(#FFFFFF, transparent); opacity: .42; filter: blur(.5px); animation: drip 6s linear infinite; }
.condensation-marks span:nth-child(1) { left: 18%; top: 12%; }
.condensation-marks span:nth-child(2) { left: 43%; top: 18%; animation-delay: -1.5s; }
.condensation-marks span:nth-child(3) { right: 22%; top: 10%; animation-delay: -3s; }
.condensation-marks span:nth-child(4) { right: 12%; top: 28%; animation-delay: -4s; }
.final-panel { position: absolute; right: 9vw; bottom: 8vh; width: min(560px, 82vw); padding: clamp(24px, 4vw, 46px); border-radius: 38px; }
.poetic-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

@keyframes floatOrb { to { transform: translate3d(6vw, -5vh, 0) scale(1.1); } }
@keyframes phoneWake { from { opacity: 0; transform: rotate(-8deg) translateY(8vh) rotateX(48deg); } to { opacity: 1; transform: rotate(-8deg) translateY(-4vh) rotateX(0deg); } }
@keyframes pulseBadge { 0%,100% { opacity: .35; transform: scale(.78); } 50% { opacity: 1; transform: scale(1.18); } }
@keyframes bubbleBreathe { 0%,100% { transform: translateY(0) scale(.98); } 50% { transform: translateY(-12px) scale(1.03); } }
@keyframes charmSwing { 0%,100% { rotate: -3deg; } 50% { rotate: 4deg; } }
@keyframes slowRotate { to { rotate: 360deg; } }
@keyframes lyricCrawl { 0% { opacity: .45; letter-spacing: .02em; } 45% { opacity: 1; letter-spacing: .12em; } 100% { opacity: .45; letter-spacing: .02em; } }
@keyframes singBar { from { transform: translateX(-34%); } to { transform: translateX(20%); } }
@keyframes chromeSweep { 0%, 35% { transform: translateX(-70%); opacity: 0; } 55% { opacity: 1; } 100% { transform: translateX(90%); opacity: 0; } }
@keyframes drip { 0% { transform: translateY(-40px); opacity: 0; } 20% { opacity: .55; } 100% { transform: translateY(210px); opacity: 0; } }

@media (max-width: 760px) {
  .rhinestone-nav { right: 12px; }
  .phone-scene { padding: 22px; }
  .phone-scene::before { inset: 66px 16px 28px; }
  .opening-copy, .final-panel { position: relative; right: auto; bottom: auto; margin-top: 44vh; }
  .closed-phone { position: absolute; top: 16vh; width: 82vw; height: 56vw; }
  .screen-half { left: 20px; top: 12vh; width: calc(100vw - 60px); }
  .bubble-field { height: 76vh; margin-top: 18vh; }
  .bubble-one { left: 0; top: 21%; }
  .bubble-two { right: 0; top: 39%; }
  .bubble-three { left: 2%; bottom: 16%; }
  .bubble-four { display: none; }
  .charm-chain { flex-wrap: wrap; gap: 12px 26px; padding-top: 20vh; }
  .renai-charm::before { height: 48px; }
  .receipt-ribbon { right: auto; left: 20px; bottom: 6vh; }
  .crescent-booth { width: 88vw; }
  .timing-bars { left: 24px; bottom: 8vh; }
  .coaster-stamp { right: 24px; bottom: 19vh; width: 118px; font-size: 18px; }
  .reflective-counter { inset: 14vh 18px auto; }
  .final-panel { margin-top: 42vh; }
}
