:root {
  --ink: #080808;
  --milk: #fffdf7;
  --white: #fff;
  --lilac: #c9bcff;
  --line: rgba(8, 8, 8, .12);
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body {
  margin: 0;
  background: var(--milk);
  color: var(--ink);
  font-family: "Pretendard", "Apple SD Gothic Neo", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
img { display: block; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.section-inner { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }
.section-light { background: var(--milk); }

/* Splash */
.splash {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: #000;
  color: var(--white);
  isolation: isolate;
}
.splash::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 56% 0 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .86));
}
.splash-media { position: absolute; z-index: 0; inset: 0; display: grid; place-items: center; pointer-events: none; }
.splash-copy {
  position: absolute;
  z-index: 4;
  left: max(28px, calc((100vw - var(--max)) / 2));
  bottom: max(58px, calc(42px + env(safe-area-inset-bottom)));
  width: min(650px, calc(100% - 56px));
  opacity: 0;
  animation: splash-copy-in .62s 1.02s ease-out forwards;
}
.splash-copy h1 {
  margin: 0;
  font-size: clamp(32px, 4.15vw, 68px);
  font-weight: 800;
  line-height: 1.13;
  letter-spacing: -.045em;
}
.desktop-gap { display: none; }

/* Service */
.intro { padding: 160px 0 180px; }
.intro-lead { text-align: center; }
.intro-lead h2,
.relationship-copy h2,
.section-heading-row h2,
.page-hero h1 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -.04em;
}
.intro-lead h2 { max-width: 960px; margin-inline: auto; font-size: clamp(38px, 4vw, 56px); line-height: 1.15; }
.intro-lead h2 span:nth-child(1),
.intro-lead h2 span:nth-child(2) { display: inline; }
.intro-lead h2 span:nth-child(1)::after { content: " "; }
.intro-lead h2 span:nth-child(3) { display: block; }
.intro-support { max-width: 720px; margin: 24px auto 0; color: #6b7684; font-size: 18px; font-weight: 600; line-height: 1.6; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 90px;
}
.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: auto;
  min-height: 0;
  padding: 18px 24px 27px;
  overflow: hidden;
  border: 0;
  border-radius: 32px;
  box-shadow: 0 18px 46px rgba(74,48,112,.08);
  isolation: isolate;
  opacity: .82;
  transform: scale(.965);
  transform-origin: center;
  transition: transform 680ms cubic-bezier(.22,1,.36,1), opacity 520ms ease, box-shadow 400ms ease;
  will-change: transform, opacity;
}
.feature-card.is-left,
.feature-card.is-right,
.feature-card.is-resting { z-index: 1; transform: scale(.965); }
.feature-card.is-center { z-index: 3; opacity: 1; transform: scale(1.025); }
.feature-card.is-teleporting { opacity: .82 !important; transition: transform 680ms cubic-bezier(.22,1,.36,1), opacity 520ms ease !important; }
.feature-card.is-center:hover { box-shadow: 0 26px 64px rgba(74,48,112,.14); transform: scale(1.04); }
.feature-card.card-pink { background: #fff0f7; }
.feature-card.card-blue { background: #eef3ff; }
.feature-card.card-yellow { background: #f4efff; }
.feature-visual {
  position: relative;
  display: grid;
  place-items: center;
  height: 265px;
  overflow: hidden;
}
.feature-visual img { display: block; width: min(282px, 96%); height: 282px; object-fit: contain; object-position: center; filter: contrast(1.14) saturate(1.08); mix-blend-mode: multiply; transform: translateY(-1%); }
.feature-copy { margin-top: 3px; padding: 0 8px 3px; }
.feature-card h3 {
  margin: 0;
  font-size: clamp(29px, 2.5vw, 40px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.04em;
}
.feature-card p { margin: 14px 0 0; color: #6b7684; font-weight: 500; line-height: 1.6; }
.feature-pagination { display: none; }

.relationship { padding: 170px 0; overflow: hidden; background: #f2f4f6; color: var(--ink); }
.relationship-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 90px; align-items: center; }
.relationship-copy h2 { font-size: clamp(38px, 4vw, 56px); line-height: 1.1; }
.relationship-copy > p { max-width: 500px; margin: 36px 0 0; color: #6b7684; font-size: 18px; }
.phone-stage { position: relative; min-height: 650px; display: grid; place-items: center; }
.characters { padding: 160px 0 180px; overflow: hidden; background: #f7f8fa; }
.section-heading-row { display: block; text-align: center; }
.section-heading-row h2 { font-size: clamp(38px, 4vw, 56px); line-height: 1.1; }
.section-note { max-width: none; margin: 24px auto 0; color: #6b7684; font-size: 18px; font-weight: 600; white-space: nowrap; }
.character-carousel {
  --slide-width: min(390px, calc(100vw - 104px));
  position: relative;
  margin-top: 95px;
}
.character-track {
  display: flex;
  gap: 24px;
  align-items: stretch;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 12px calc((100% - var(--slide-width)) / 2) 24px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.character-track::-webkit-scrollbar { display: none; }
.character-card {
  position: relative;
  flex: 0 0 var(--slide-width);
  padding: 21px;
  background: var(--white);
  border: 0;
  border-radius: 34px;
  box-shadow: 0 16px 44px rgba(31, 56, 88, .09);
  scroll-snap-align: center;
  scroll-snap-stop: always;
  transition: transform 260ms ease, box-shadow 260ms ease;
}
.character-card:hover { transform: translateY(-8px) rotate(0); box-shadow: 0 24px 54px rgba(31,56,88,.14); }
.card-topline { display: flex; justify-content: flex-start; margin: 0 4px 16px; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.holo-window {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 400px;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
}
.holo-window::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -30%;
  background: repeating-linear-gradient(115deg,transparent 0 16px,rgba(255,255,255,.26) 17px 22px);
  animation: foil-shine 5s ease-in-out infinite;
}
.foil-star { position: absolute; z-index: 3; color: var(--white); font-size: 40px; text-shadow: 0 0 16px white; }
.foil-star-a { top: 13%; right: 10%; }
.foil-star-b { left: 9%; bottom: 12%; }
.character-meta { position: relative; z-index: 6; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 20px 4px 5px; }
.character-meta strong { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.character-card.is-dim { overflow: hidden; }
.dim-label { position: absolute; z-index: 7; top: 50%; left: 50%; width: 100%; color: var(--white); font-size: 28px; font-weight: 800; letter-spacing: -.02em; text-align: center; transform: translate(-50%,-50%); text-shadow: 0 3px 16px rgba(28,18,48,.28); }
.mystery-character { position: relative; z-index: auto; display: block; width: min(290px, 76%); aspect-ratio: 1; }
.mystery-character img { display: block; width: 100%; height: 100%; object-fit: contain; filter: grayscale(1) contrast(1000%); }
.mystery-mark { position: absolute; z-index: 7; top: calc(50% - 44px); left: 50%; display: grid; place-items: center; width: 44px; aspect-ratio: 1; color: #fff; transform: translate(-50%,-50%); }
.mystery-mark svg { width: 100%; height: 100%; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 2px 1px rgba(0,0,0,.2)); }
.mystery-mark circle { fill: currentColor; stroke: none; }
.card-wrap { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.card-wrap-sealed {
  z-index: 5;
  overflow: hidden;
  background:
    linear-gradient(112deg, transparent 8%, rgba(255,255,255,.72) 16%, transparent 25% 52%, rgba(255,255,255,.45) 60%, transparent 69%),
    repeating-linear-gradient(155deg, rgba(255,255,255,.09) 0 2px, transparent 3px 17px),
    linear-gradient(135deg,#221b30 0%,#67558b 19%,#b9ace6 39%,#7bcfd1 54%,#b77da9 70%,#30233e 100%);
  background-size: 190% 190%, auto, 170% 170%;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45), inset 0 0 42px rgba(255,255,255,.12);
  animation: wrapper-shimmer 7s ease-in-out infinite;
}
.card-wrap-sealed-alt { animation-delay: -3.4s; filter: hue-rotate(18deg); }
.card-wrap-sealed::before { content: ""; position: absolute; z-index: 2; inset: 0; background: repeating-linear-gradient(90deg,rgba(255,255,255,.6) 0 2px,rgba(28,19,42,.22) 3px 5px,transparent 6px 10px) top / 100% 22px no-repeat, repeating-linear-gradient(90deg,rgba(255,255,255,.52) 0 2px,rgba(28,19,42,.2) 3px 5px,transparent 6px 10px) bottom / 100% 22px no-repeat; opacity: .72; }
.card-wrap-sealed::after { content: ""; position: absolute; z-index: 1; inset: 28px 18px; border: 1px solid rgba(255,255,255,.44); border-radius: 25px; box-shadow: inset 0 0 34px rgba(255,255,255,.1); }
.sealed-sigil { position: absolute; z-index: 2; top: 27%; left: 50%; color: rgba(255,255,255,.24); font-size: 108px; line-height: 1; text-shadow: 0 0 24px rgba(255,255,255,.15); transform: translate(-50%,-50%) rotate(8deg); }
.carousel-arrow {
  position: absolute;
  z-index: 8;
  top: calc(50% - 31px);
  display: grid;
  place-items: center;
  width: 56px;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255,255,255,.94);
  box-shadow: 0 12px 34px rgba(31,56,88,.16);
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: transform 180ms ease, opacity 180ms ease;
}
.carousel-arrow:hover { transform: scale(1.06); }
.carousel-arrow:disabled { opacity: .28; cursor: default; transform: none; }
.carousel-arrow span { font-size: 22px; font-weight: 700; line-height: 1; transform: translateY(-1px); }
.carousel-prev { left: 14px; }
.carousel-next { right: 14px; }

/* Subpages */
.subpage-main { padding-top: 76px; background: var(--milk); }
.page-hero { display: flex; align-items: center; min-height: 420px; padding: 48px 24px; }
.page-hero-inner { width: min(100%, var(--max)); margin-inline: auto; }
.page-hero h1 { max-width: 980px; font-size: clamp(54px, 7vw, 98px); line-height: 1.04; }
.page-hero p { max-width: 560px; margin: 28px 0 0; font-size: 20px; font-weight: 700; }
.policy-hero { background: #e8f3ff; }

.policy-nav {
  position: sticky;
  z-index: 20;
  top: 75px;
  display: flex;
  justify-content: center;
  gap: 44px;
  padding: 18px 24px 17px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 24px rgba(8,8,8,.04);
}
.policy-nav button { position: relative; padding: 6px 0; border: 0; background: transparent; font-weight: 800; cursor: pointer; }
.policy-nav button::after { content: ""; position: absolute; right: 0; bottom: -3px; left: 0; height: 3px; border-radius: 2px; background: #3182f6; transform: scaleX(0); transition: transform 180ms ease; }
.policy-nav button.is-active::after { transform: scaleX(1); }
.legal-shell { width: min(calc(100% - 48px), 900px); margin-inline: auto; padding: 92px 0 150px; }
.legal-title { margin-bottom: 80px; }
.legal-title h2 { margin: 0; font-size: clamp(34px, 5vw, 58px); line-height: 1.15; letter-spacing: -.04em; }
.legal-title p { margin: 25px 0 0; color: #555; line-height: 1.9; }
.legal-document section { margin: 0 0 44px; }
.legal-document h3 { margin: 90px 0 32px; padding-top: 28px; border-top: 2px solid var(--ink); font-size: 27px; letter-spacing: -.03em; }
.legal-document h4 { margin: 0 0 16px; font-size: 20px; letter-spacing: -.025em; }
.legal-document p,
.legal-document li { color: #333; font-size: 15px; line-height: 1.95; }
.legal-document ol { margin: 0; padding-left: 24px; }
.legal-document ol ol { margin-top: 9px; }
.legal-document li + li { margin-top: 8px; }
.legal-document a { text-decoration: underline; text-underline-offset: 3px; }
.table-wrap { width: 100%; margin: 22px 0; overflow-x: auto; }
.legal-document table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 13px; line-height: 1.65; }
.legal-document th,
.legal-document td { padding: 14px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal-document th { background: #f0eee8; font-weight: 800; }

[data-reveal] { opacity: 0; transform: translateY(30px); transition: opacity 650ms ease, transform 650ms cubic-bezier(.2,.8,.2,1); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

@keyframes float-star { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-13px) rotate(9deg); } }
@keyframes foil-shine { 0%,30% { transform: translateX(-25%) rotate(0.001deg); } 70%,100% { transform: translateX(25%) rotate(0.001deg); } }
@keyframes chat-message-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes chat-typing { 0% { opacity: 0; transform: translateY(8px) scale(.96); } 14%,78% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes typing-dot { 0%,60%,100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes memory-pill-in { 0% { opacity: 0; transform: translateY(8px) scale(.92); } 70% { opacity: 1; transform: translateY(0) scale(1.04); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes memory-heart-pop { 0% { opacity: 0; transform: scale(.35) rotate(-12deg); } 65% { opacity: 1; transform: scale(1.25) rotate(5deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes memory-spark-float { 0% { opacity: 0; transform: translateY(3px) scale(.4) rotate(-8deg); } 24% { opacity: 1; transform: translateY(0) scale(1.05) rotate(3deg); } 100% { opacity: 0; transform: translateY(-12px) scale(.72) rotate(18deg); } }
@keyframes splash-copy-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes input-caret { 0%,48% { opacity: 1; } 49%,100% { opacity: 0; } }
@keyframes wrapper-shimmer { 0%,100% { background-position: 100% 0,0 0,0 0; } 50% { background-position: 0 100%,0 0,100% 100%; } }

@media (min-width: 981px) {
  .splash-copy { top: 152px; bottom: auto; left: 50%; width: min(1120px, calc(100% - 80px)); text-align: center; transform: translateX(-50%); }
  .splash-copy h1 { font-size: clamp(36px, 3.6vw, 52px); white-space: nowrap; }
  .splash-copy br { display: none; }
  .desktop-gap { display: inline; }
}

@media (max-width: 980px) {
  .splash-copy { left: 18px; bottom: max(72px, calc(56px + env(safe-area-inset-bottom))); width: calc(100% - 36px); text-align: center; }
  .splash-copy h1 { font-size: clamp(29px, 8.3vw, 48px); line-height: 1.2; }
  .intro { padding: 105px 0 120px; }
  .intro-lead h2 { font-size: clamp(36px, 9.6vw, 48px); }
  .intro-lead h2 span { display: block !important; }
  .intro-lead h2 span:nth-child(1)::after { content: ""; }
  .intro-support { max-width: 520px; margin-top: 20px; font-size: 16px; }
  .feature-grid { --feature-card-width: min(360px, calc(100% - 120px)); --feature-shift: 320px; position: relative; display: block; height: 505px; margin-top: 70px; overflow: hidden; }
  .feature-card { position: absolute; top: 18px; left: 50%; width: var(--feature-card-width); min-height: 0; opacity: .58; transform: translateX(-50%) scale(.9); transition: transform 820ms cubic-bezier(.22,1,.36,1), opacity 620ms ease, box-shadow 400ms ease; }
  .feature-card.is-left { z-index: 1; pointer-events: none; transform: translateX(calc(-50% - var(--feature-shift))) scale(.9); }
  .feature-card.is-center { z-index: 3; opacity: 1; transform: translateX(-50%) scale(1.07); }
  .feature-card.is-right { z-index: 2; pointer-events: none; transform: translateX(calc(-50% + var(--feature-shift))) scale(.9); }
  .feature-card.is-teleporting { opacity: 0 !important; transition: none !important; }
  .feature-card.is-center:hover { transform: translateX(-50%) scale(1.085); }
  .feature-pagination { position: absolute; z-index: 8; bottom: 4px; left: 50%; display: flex; gap: 7px; align-items: center; justify-content: center; transform: translateX(-50%); }
  .feature-pagination span { display: block; width: 7px; height: 7px; border-radius: 999px; background: #d9dce3; transition: width 480ms cubic-bezier(.22,1,.36,1), background-color 320ms ease; }
  .feature-pagination span.is-active { width: 24px; background: var(--ink); }
  .relationship { padding: 110px 0; }
  .relationship-grid { grid-template-columns: 1fr; gap: 70px; }
  .relationship-copy h2 { font-size: clamp(36px, 9.6vw, 48px); line-height: 1.1; }
  .phone-stage { min-height: 600px; }
  .characters { padding: 110px 0 130px; }
  .section-heading-row h2 { font-size: clamp(36px, 9.6vw, 48px); }
  .section-note { margin-top: 20px; font-size: 17px; white-space: normal; }
  .character-carousel { margin-top: 65px; }
  .holo-window { min-height: 420px; }
  .subpage-main { padding-top: 68px; }
  .page-hero { min-height: 350px; padding: 44px 24px; }
  .page-hero h1 { font-size: clamp(52px, 14vw, 84px); }
  .policy-nav { top: 67px; justify-content: flex-start; gap: 30px; overflow-x: auto; }
  .legal-shell { width: min(calc(100% - 40px), 900px); padding-top: 70px; }
  .legal-document p, .legal-document li { font-size: 14px; }
}

@media (max-width: 560px) {
  .section-inner { width: min(calc(100% - 36px), var(--max)); }
  .feature-grid { --feature-card-width: calc(100% - 48px); --feature-shift: 260px; height: 462px; }
  .feature-card { top: 10px; min-height: 0; padding: 16px 20px 25px; border-radius: 28px; }
  .feature-card.is-center { transform: translateX(-50%) scale(1.035); }
  .feature-card.is-center:hover { transform: translateX(-50%) scale(1.045); }
  .feature-visual { height: 244px; }
  .feature-visual img { width: min(258px, 96%); height: 258px; }
  .feature-copy { margin-top: 1px; padding: 0 8px 4px; }
  .character-carousel { --slide-width: calc(100vw - 72px); }
  .character-track { gap: 16px; padding-bottom: 22px; }
  .carousel-arrow { top: calc(50% - 29px); width: 48px; }
  .carousel-prev { left: 2px; }
  .carousel-next { right: 2px; }
  .character-card { padding: 16px; border-radius: 28px; }
  .holo-window { min-height: 360px; }
  .character-meta strong { font-size: 22px; }
  .page-hero { min-height: 330px; }
  .page-hero p { font-size: 17px; }
  .policy-hero h1 { font-size: clamp(46px, 12.7vw, 70px); }
  .policy-nav { padding-inline: 20px; }
  .legal-title { margin-bottom: 60px; }
  .legal-document h3 { margin-top: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
