/* 운세록 홈페이지 — 낮의 언덕에서 밤하늘까지 */

@property --c1 { syntax: '<color>'; inherits: true; initial-value: #ffe3dd; }
@property --c2 { syntax: '<color>'; inherits: true; initial-value: #ffb1a4; }

:root {
  --ink: #1c2452;
  --ink-soft: #4b547f;
  --brand-a: #3f8cff;
  --brand-b: #4f55ff;
  --brand-c: #8a42ff;
  --grass-top: #9bdb7c;
  --grass: #6cbb5c;
  --cream: #fffaf0;
  --display: 'Jua', 'Wanted Sans Variable', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --body: 'Wanted Sans Variable', 'Wanted Sans', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --nav-h: 68px;
  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p, figure { margin: 0; }
:focus-visible { outline: 3px solid #ffd54a; outline-offset: 3px; border-radius: 8px; }
[id] { scroll-margin-top: calc(var(--nav-h) + 8px); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 100; background: #fff; color: var(--ink); padding: 10px 16px; border-radius: 12px; font-weight: 700; transition: top .2s; }
.skip:focus { top: 12px; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }

/* ───────── 버튼 ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 58px; padding: 0 30px;
  font-family: var(--display); font-size: 20px; line-height: 1; letter-spacing: .01em;
  border-radius: 999px; white-space: nowrap; user-select: none;
  transition: transform .14s var(--ease-out), box-shadow .14s var(--ease-out), filter .2s;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b) 55%, var(--brand-c));
  box-shadow: 0 6px 0 #2b2f9b, 0 16px 28px rgba(49, 52, 170, .34), inset 0 2px 0 rgba(255, 255, 255, .35);
}
.btn-ghost {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 6px 0 #c5d4ee, 0 16px 28px rgba(40, 70, 130, .16);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn:active { transform: translateY(4px); }
.btn-primary:active { box-shadow: 0 2px 0 #2b2f9b, 0 6px 12px rgba(49, 52, 170, .3), inset 0 2px 0 rgba(255, 255, 255, .35); }
.btn-ghost:active { box-shadow: 0 2px 0 #c5d4ee, 0 6px 12px rgba(40, 70, 130, .14); }
.btn-sm { min-height: 46px; padding: 0 22px; font-size: 17px; box-shadow: 0 4px 0 #2b2f9b, 0 10px 18px rgba(49, 52, 170, .28), inset 0 2px 0 rgba(255, 255, 255, .35); }
.btn-lg { min-height: 68px; padding: 0 40px; font-size: 23px; }

/* ───────── 위 메뉴 ───────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 20px;
  padding: 0 max(20px, env(safe-area-inset-left)) 0 max(20px, env(safe-area-inset-right));
  transition: background .3s, box-shadow .3s, backdrop-filter .3s;
}
.nav.is-stuck {
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 1px 0 rgba(28, 36, 82, .08), 0 10px 30px rgba(28, 36, 82, .08);
}
.nav-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 24px; color: #fff; text-shadow: 0 2px 0 rgba(28, 36, 82, .25); transition: color .3s, text-shadow .3s; }
.nav-brand img { border-radius: 10px; box-shadow: 0 4px 10px rgba(28, 36, 82, .25); }
.nav.is-stuck .nav-brand { color: var(--ink); text-shadow: none; }
.nav-links { display: flex; gap: 6px; margin-left: auto; }
.nav-links a {
  font-family: var(--display); font-size: 18px; color: #fff; padding: 8px 16px; border-radius: 999px;
  text-shadow: 0 2px 0 rgba(28, 36, 82, .22); transition: background .2s, color .3s;
}
.nav-links a:hover { background: rgba(255, 255, 255, .24); }
.nav.is-stuck .nav-links a { color: var(--ink); text-shadow: none; }
.nav.is-stuck .nav-links a:hover { background: rgba(63, 140, 255, .12); }
.nav-cta {
  font-family: var(--display); font-size: 17px; color: var(--ink); background: #fff;
  padding: 10px 20px; border-radius: 999px; box-shadow: 0 4px 0 rgba(28, 36, 82, .16);
  transition: transform .14s, background .3s, color .3s, box-shadow .3s;
}
.nav-cta:hover { transform: translateY(-1px); }
.nav.is-stuck .nav-cta { color: #fff; background: linear-gradient(135deg, var(--brand-a), var(--brand-b) 55%, var(--brand-c)); box-shadow: 0 4px 0 #2b2f9b; }

/* ───────── 첫 화면 ───────── */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #4d9fee 0%, #6fbcf6 34%, #a9dcfb 62%, #d9f1f4 82%, #e8f6dc 100%);
}
.sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.sun {
  position: absolute; top: 13%; right: 11%;
  width: clamp(84px, 9vw, 150px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #fffbe0, #ffe78f 62%, #ffd866);
  box-shadow: 0 0 0 clamp(16px, 2vw, 30px) rgba(255, 244, 190, .26), 0 0 0 clamp(36px, 4.6vw, 70px) rgba(255, 244, 190, .14), 0 0 120px 40px rgba(255, 240, 170, .5);
  animation: sunPulse 7s ease-in-out infinite;
}
@keyframes sunPulse { 50% { transform: scale(1.05); } }

.cloud { position: absolute; fill: #fff; filter: drop-shadow(0 12px 0 rgba(120, 180, 235, .22)); will-change: transform; }
.cloud-1 { width: clamp(150px, 19vw, 300px); aspect-ratio: 2.4; top: 17%; left: -22%; opacity: .96; animation: drift 80s linear infinite; animation-delay: -30s; }
.cloud-2 { width: clamp(110px, 13vw, 210px); aspect-ratio: 2.4; top: 8%; left: -22%; opacity: .78; animation: drift 115s linear infinite; animation-delay: -84s; }
.cloud-3 { width: clamp(190px, 24vw, 380px); aspect-ratio: 2.4; top: 39%; left: -30%; opacity: .9; animation: drift 135s linear infinite; animation-delay: -12s; }
.cloud-4 { width: clamp(100px, 11vw, 180px); aspect-ratio: 2.4; top: 49%; left: -22%; opacity: .7; animation: drift 98s linear infinite; animation-delay: -62s; }
@keyframes drift { to { transform: translateX(150vw); } }

.twinkle { position: absolute; width: clamp(14px, 1.9vw, 28px); aspect-ratio: 1; fill: #fff; opacity: 0; animation: twinkle 3.6s ease-in-out infinite; }
.t1 { top: 22%; left: 13%; }
.t2 { top: 12%; left: 34%; animation-delay: .9s; width: clamp(10px, 1.2vw, 18px); }
.t3 { top: 30%; left: 80%; animation-delay: 1.6s; }
.t4 { top: 43%; left: 22%; animation-delay: 2.3s; width: clamp(10px, 1.2vw, 18px); }
.t5 { top: 9%; left: 64%; animation-delay: 2.9s; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: .95; transform: scale(1) rotate(20deg); } }

.hero-copy {
  flex: 1 1 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 12px) 20px 10px;
  will-change: transform, opacity;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); font-size: clamp(14px, 1.2vw, 17px); color: #1d4f93;
  background: rgba(255, 255, 255, .82); padding: 8px 18px; border-radius: 999px;
  box-shadow: 0 4px 0 rgba(40, 100, 180, .18);
}
.hero-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: #35c26a; box-shadow: 0 0 0 4px rgba(53, 194, 106, .25); }

.wordmark {
  display: flex; justify-content: center; gap: .02em;
  margin-top: clamp(8px, 1.6vh, 18px);
  font-family: var(--display); font-weight: 400;
  font-size: clamp(88px, min(15vw, 23svh), 230px);
  line-height: 1.04; letter-spacing: -.01em;
  filter: drop-shadow(0 .075em 0 #162055) drop-shadow(0 .16em .16em rgba(22, 32, 85, .28));
}
.wordmark span { position: relative; display: inline-block; color: #fff; }
/* 뒤에 깔리는 굵은 테두리 */
.wordmark span::before {
  content: attr(data-c); position: absolute; inset: 0; z-index: -1;
  color: #25317a; -webkit-text-stroke: .11em #25317a;
}
/* 위에 얹는 은은한 빛깔 */
.wordmark span::after {
  content: attr(data-c); position: absolute; inset: 0;
  background: linear-gradient(180deg, #ffffff 34%, #e6f2ff 74%, #c9e2ff);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.hero-tag {
  margin-top: clamp(4px, 1vh, 12px);
  font-family: var(--display); font-size: clamp(21px, 2.7vw, 38px); line-height: 1.3; color: #fff;
  text-shadow: 0 2px 0 #2a4f9c, 0 6px 18px rgba(23, 60, 130, .35);
}
.hero-sub { margin-top: 8px; font-size: clamp(15px, 1.35vw, 19px); font-weight: 600; color: #16407e; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: clamp(18px, 3vh, 30px); }

/* 언덕과 친구들 */
.meadow { position: relative; container-type: inline-size; flex: 0 0 auto; }
.hill { position: absolute; bottom: 0; border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.hill-far-l { left: -28cqw; width: 86cqw; height: 22cqw; background: linear-gradient(180deg, #b9e6b3, #a3dba0); opacity: .9; }
.hill-far-r { right: -34cqw; width: 96cqw; height: 19cqw; background: linear-gradient(180deg, #c6ecc0, #addfa8); opacity: .85; }
.hill-near {
  left: -15cqw; right: -15cqw; height: 17cqw;
  background:
    radial-gradient(circle at 12% 46%, #fff 0 .22cqw, transparent .26cqw),
    radial-gradient(circle at 23% 72%, #ffe46b 0 .2cqw, transparent .24cqw),
    radial-gradient(circle at 37% 58%, #fff 0 .18cqw, transparent .22cqw),
    radial-gradient(circle at 52% 82%, #fff 0 .22cqw, transparent .26cqw),
    radial-gradient(circle at 64% 60%, #ffe46b 0 .2cqw, transparent .24cqw),
    radial-gradient(circle at 76% 76%, #fff 0 .2cqw, transparent .24cqw),
    radial-gradient(circle at 88% 50%, #fff 0 .18cqw, transparent .22cqw),
    linear-gradient(180deg, var(--grass-top), #7cc968 45%, var(--grass));
}
.lineup { position: relative; z-index: 2; height: 21.5cqw; margin-bottom: 4cqw; }
.hc {
  position: absolute;
  left: calc(var(--x) * 1cqw); bottom: calc(var(--y) * 1cqw); width: calc(var(--w) * 1cqw);
  z-index: var(--z);
  transform: translateX(-50%);
  border-radius: 40%;
}
.hc img {
  width: 100%;
  transform-origin: 50% 92%;
  filter: drop-shadow(0 .9cqw .5cqw rgba(30, 80, 30, .2));
  animation: bob calc(3.4s + var(--i) * .13s) ease-in-out infinite;
  animation-delay: calc(var(--i) * -.47s);
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  30% { transform: translateY(-3.2%) rotate(-1.6deg); }
  65% { transform: translateY(-1%) rotate(1.4deg); }
}
.hc::after {
  content: attr(data-name);
  position: absolute; left: 50%; top: -2%;
  transform: translate(-50%, 8px) scale(.8); opacity: 0;
  font-family: var(--display); font-size: clamp(13px, 1.25cqw, 18px); color: var(--ink); white-space: nowrap;
  background: #fff; padding: 5px 13px; border-radius: 999px; box-shadow: 0 4px 0 rgba(28, 36, 82, .16);
  pointer-events: none; transition: transform .25s var(--ease-pop), opacity .2s;
}
@media (hover: hover) {
  .hc:hover { z-index: 9; }
  .hc:hover img { animation: hop .62s var(--ease-out); }
  .hc:hover::after { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
.hc:focus-visible { z-index: 9; }
.hc:focus-visible::after { opacity: 1; transform: translate(-50%, 0) scale(1); }
.hc.is-hop img { animation: hop .62s var(--ease-out); }
@keyframes hop {
  0% { transform: translateY(0) scale(1, 1); }
  18% { transform: translateY(0) scale(1.08, .9); }
  48% { transform: translateY(-17%) scale(.95, 1.07); }
  78% { transform: translateY(0) scale(1.05, .94); }
  100% { transform: translateY(0) scale(1, 1); }
}

/* 들어오는 움직임 (스크립트가 켜졌을 때만) */
.js .hc { animation: dropIn .8s var(--ease-pop) both; animation-delay: calc(.25s + var(--i) * .06s); }
@keyframes dropIn { from { opacity: 0; transform: translateX(-50%) translateY(-34%) scale(.7); } to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); } }
.js .wordmark span { animation: letterIn .7s var(--ease-pop) both; }
.js .wordmark span:nth-child(2) { animation-delay: .09s; }
.js .wordmark span:nth-child(3) { animation-delay: .18s; }
@keyframes letterIn { from { opacity: 0; transform: translateY(42%) scale(.6) rotate(-8deg); } to { opacity: 1; transform: none; } }
.js .hero-badge, .js .hero-tag, .js .hero-sub, .js .hero-cta { animation: riseIn .7s var(--ease-out) both; }
.js .hero-tag { animation-delay: .28s; }
.js .hero-sub { animation-delay: .36s; }
.js .hero-cta { animation-delay: .46s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ───────── 공통 머리글 ───────── */
.sec-head { text-align: center; }
.eyebrow {
  display: inline-block; font-family: var(--display); font-size: 17px; color: #2f6fe0;
  background: rgba(63, 140, 255, .13); padding: 6px 18px; border-radius: 999px;
}
.sec-head h2 { margin-top: 16px; text-wrap: balance; font-family: var(--display); font-weight: 400; font-size: clamp(34px, 5vw, 62px); line-height: 1.2; letter-spacing: -.01em; }
.lede { margin-top: 16px; text-wrap: balance; font-size: clamp(16px, 1.45vw, 19.5px); color: var(--ink-soft); font-weight: 500; }
.sec-head.on-dark h2 { color: #fff; }
.sec-head.on-dark .eyebrow { color: #fff; background: rgba(255, 255, 255, .18); }

.js [data-reveal] { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ───────── 친구들 ───────── */
.friends {
  position: relative;
  padding: clamp(96px, 12vw, 170px) 0 clamp(50px, 6vw, 90px);
  background: linear-gradient(180deg, #fffaf0 0%, #fdf7ee 40%, #f1f6ff 100%);
}
.edge { position: absolute; left: 0; top: -1px; width: 100%; height: clamp(34px, 5vw, 70px); }
.edge-grass path { fill: var(--grass); }

.stage {
  --c1: #ffe3dd; --c2: #ffb1a4; --acc: #df4a45; --acc-ink: #7c1d1a;
  position: relative; isolation: isolate; overflow: hidden;
  margin-top: clamp(30px, 4vw, 54px);
  display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); align-items: center;
  min-height: clamp(440px, 44vw, 580px);
  border-radius: clamp(28px, 4vw, 52px);
  background: radial-gradient(120% 110% at 72% 18%, var(--c1) 0%, var(--c2) 100%);
  box-shadow: 0 30px 60px -20px rgba(60, 70, 140, .32), inset 0 0 0 3px rgba(255, 255, 255, .55);
  transition: --c1 .55s ease, --c2 .55s ease;
  container-type: inline-size;
}
.stage[data-color="blue"]  { --c1: #dff0ff; --c2: #9ccdf8; --acc: #2a7fd4; --acc-ink: #134a85; }
.stage[data-color="red"]   { --c1: #ffe3dd; --c2: #ffb1a4; --acc: #df4a45; --acc-ink: #7c1d1a; }
.stage[data-color="gold"]  { --c1: #fff5d2; --c2: #ffda7c; --acc: #d48a00; --acc-ink: #6f4700; }
.stage[data-color="white"] { --c1: #f3f4fd; --c2: #c6cdea; --acc: #6f7bb0; --acc-ink: #353e6b; }
.stage[data-color="black"] { --c1: #e9e5f5; --c2: #aaa2d0; --acc: #453b78; --acc-ink: #261f4b; }

.stage-word {
  position: absolute; z-index: -1; left: 50%; top: 50%; transform: translate(-50%, -52%);
  font-family: var(--display); font-size: 44cqw; line-height: 1; white-space: nowrap;
  color: rgba(255, 255, 255, .16); -webkit-text-stroke: .3cqw rgba(255, 255, 255, .55);
  user-select: none; pointer-events: none;
}
.stage-word[data-len="2"] { font-size: 26cqw; }
.stage-word[data-len="3"] { font-size: 17.5cqw; }
.stage-spark { position: absolute; fill: #fff; opacity: .85; animation: twinkle 4s ease-in-out infinite; pointer-events: none; }
.sp1 { width: 34px; height: 34px; top: 12%; right: 9%; }
.sp2 { width: 20px; height: 20px; top: 30%; left: 44%; animation-delay: 1.3s; }
.sp3 { width: 26px; height: 26px; bottom: 16%; right: 40%; animation-delay: 2.2s; }

.stage-info { padding: clamp(28px, 5cqw, 64px); padding-right: 0; }
.stage-ganji {
  display: inline-block; font-family: var(--display); font-size: clamp(15px, 1.5vw, 19px); color: #fff;
  background: var(--acc); padding: 6px 16px; border-radius: 999px; transition: background .4s;
}
.stage-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stage-mine {
  display: inline-block; font-family: var(--display); font-size: clamp(15px, 1.5vw, 19px);
  color: var(--acc-ink); background: #fff; padding: 6px 16px; border-radius: 999px; box-shadow: 0 3px 0 rgba(28, 36, 82, .12);
  animation: charSwap .5s var(--ease-pop) both;
}
.stage-mine[hidden] { display: none; }
.stage-name { margin-top: 14px; font-family: var(--display); font-weight: 400; font-size: clamp(46px, 7.4cqw, 92px); line-height: 1.1; color: var(--acc-ink); transition: color .4s; }
.stage-years { margin-top: 10px; font-size: clamp(16px, 1.5vw, 20px); font-weight: 700; color: var(--acc-ink); opacity: .82; transition: color .4s; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(20px, 3vw, 34px); }
.sw {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); font-size: 17px; color: var(--ink);
  background: rgba(255, 255, 255, .7); padding: 7px 15px 7px 8px; border-radius: 999px;
  box-shadow: 0 3px 0 rgba(28, 36, 82, .1); transition: transform .18s var(--ease-pop), background .2s, box-shadow .2s;
}
.sw i { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .14), inset 0 2px 0 rgba(255, 255, 255, .5), 0 0 0 2px #fff; }
.sw[data-color="blue"] i { background: #5fb0f2; }
.sw[data-color="red"] i { background: #f0625b; }
.sw[data-color="gold"] i { background: #f7c545; }
.sw[data-color="white"] i { background: #f7f2e8; }
.sw[data-color="black"] i { background: #36323f; }
.sw:hover { transform: translateY(-2px); }
.sw[aria-pressed="true"] { background: #fff; box-shadow: 0 3px 0 rgba(28, 36, 82, .1), 0 0 0 3px var(--acc); transform: translateY(-2px); }

.stage-figure { position: relative; align-self: stretch; display: flex; align-items: center; justify-content: center; padding: 14px 0; }
.stage-char { position: relative; width: min(84%, 470px); touch-action: pan-y; }
.stage-char::before {
  content: ''; position: absolute; left: 12%; right: 12%; bottom: 3.5%; height: 9%;
  border-radius: 50%; background: radial-gradient(closest-side, rgba(40, 30, 80, .34), rgba(40, 30, 80, 0));
}
.stage-char img { position: relative; width: 100%; transform-origin: 50% 92%; -webkit-user-drag: none; user-select: none; }
.stage-char img.is-swap { animation: charSwap .55s var(--ease-pop) both; }
@keyframes charSwap { from { opacity: 0; transform: translateY(8%) scale(.78); } to { opacity: 1; transform: none; } }
.stage-arrow {
  position: absolute; top: 50%; z-index: 3; width: 52px; height: 52px; margin-top: -26px;
  display: grid; place-items: center; border-radius: 50%;
  color: var(--ink); background: #fff; box-shadow: 0 5px 0 rgba(28, 36, 82, .14);
  transition: transform .15s var(--ease-out);
}
.stage-arrow.prev { left: 0; }
.stage-arrow.prev svg { transform: scaleX(-1); }
.stage-arrow.next { right: clamp(12px, 2.4cqw, 28px); }
.stage-arrow:hover { transform: scale(1.1); }
.stage-arrow:active { transform: scale(.94); }

/* 띠 고르기 줄 */
.roster {
  display: flex; justify-content: center; gap: clamp(6px, 1vw, 14px);
  margin-top: clamp(20px, 2.6vw, 34px); padding: 10px 4px 6px;
}
.ro { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 0 0 auto; }
.ro-face {
  width: clamp(52px, 6.3vw, 82px); aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background: #fff; box-shadow: 0 5px 0 rgba(28, 36, 82, .1), inset 0 0 0 3px #fff;
  transition: transform .22s var(--ease-pop), box-shadow .2s;
}
.ro-face img { width: 100%; height: 100%; object-fit: cover; transform: translateY(5%); }
.ro span { font-family: var(--display); font-size: clamp(13px, 1.2vw, 16px); color: var(--ink-soft); transition: color .2s; }
.ro:hover .ro-face { transform: translateY(-4px); }
.ro[aria-pressed="true"] .ro-face { transform: translateY(-6px) scale(1.1); box-shadow: 0 6px 0 rgba(28, 36, 82, .12), 0 0 0 4px var(--ring, #df4a45); }
.ro[aria-pressed="true"] span { color: var(--ink); }

/* 내 띠 친구 찾기 */
.finder {
  margin: clamp(30px, 4vw, 50px) auto 0; max-width: 860px;
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px 28px;
  background: #fff; border-radius: 30px; padding: clamp(22px, 3vw, 32px) clamp(22px, 3.4vw, 40px);
  box-shadow: 0 20px 44px -18px rgba(60, 70, 140, .28), inset 0 0 0 2px rgba(63, 140, 255, .1);
}
.finder-head h3 { font-family: var(--display); font-weight: 400; font-size: clamp(22px, 2.3vw, 28px); line-height: 1.25; }
.finder-head p { margin-top: 4px; font-size: 15px; color: var(--ink-soft); font-weight: 500; }
.finder-form { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.finder-form select {
  appearance: none; -webkit-appearance: none;
  font: 700 17px/1 var(--body); color: var(--ink);
  height: 46px; padding: 0 38px 0 16px; border-radius: 14px; border: 2px solid #dbe4f5;
  background: #f6f9ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231c2452' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  cursor: pointer;
}
.finder-form select:focus-visible { outline: 3px solid #ffd54a; outline-offset: 2px; }
.finder-out { grid-column: 1 / -1; min-height: 1.6em; font-family: var(--display); font-size: clamp(18px, 1.9vw, 22px); color: #2f6fe0; }
.finder-out:empty { display: none; }
.finder-note { grid-column: 1 / -1; font-size: 13.5px; color: #7a83a8; line-height: 1.55; }

/* ───────── 풀이 ───────── */
.readings {
  padding: clamp(60px, 7vw, 110px) 0 clamp(80px, 10vw, 150px);
  background: linear-gradient(180deg, #f1f6ff 0%, #fff3e4 34%, #ffd9c9 72%, #f5bfd6 100%);
}
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); margin-top: clamp(34px, 4.4vw, 60px); }
.card {
  position: relative; overflow: hidden;
  padding: clamp(22px, 2.6vw, 34px); padding-top: clamp(150px, 15vw, 196px);
  border-radius: 34px; background: var(--tint, #fff);
  box-shadow: 0 22px 44px -22px rgba(120, 70, 90, .38), inset 0 0 0 3px rgba(255, 255, 255, .7);
  transition: transform .35s var(--ease-out), box-shadow .35s;
}
.card img {
  position: absolute; top: clamp(14px, 1.8vw, 24px); right: clamp(12px, 1.6vw, 22px);
  width: clamp(124px, 12.5vw, 164px);
  filter: drop-shadow(0 14px 14px rgba(40, 40, 90, .18));
  transition: transform .5s var(--ease-pop);
}
.card h3 { font-family: var(--display); font-weight: 400; font-size: clamp(25px, 2.5vw, 32px); line-height: 1.2; }
.card p { margin-top: 8px; font-size: 16px; font-weight: 500; color: #3e4670; line-height: 1.6; }
.card .chip {
  position: absolute; left: clamp(22px, 2.6vw, 34px); top: clamp(22px, 2.6vw, 34px);
  font-family: var(--display); font-size: 16px; color: #fff; background: #2fb765; padding: 5px 15px; border-radius: 999px;
  box-shadow: 0 3px 0 #1f8e4b;
}
@media (hover: hover) {
  .card:hover { transform: translateY(-8px); box-shadow: 0 34px 54px -24px rgba(120, 70, 90, .46), inset 0 0 0 3px rgba(255, 255, 255, .8); }
  .card:hover img { transform: scale(1.1) rotate(-5deg); }
}
.card-today  { --tint: linear-gradient(150deg, #e9f1ff, #cfe0ff); }
.card-saju   { --tint: linear-gradient(150deg, #fff4dc, #ffe2ad); }
.card-face   { --tint: linear-gradient(150deg, #e2f8fb, #c2ebf4); }
.card-compat { --tint: linear-gradient(150deg, #ffeaf1, #ffd0df); }
.card-map    { --tint: linear-gradient(150deg, #eeeafc, #d7cdf6); }
.card-name   { --tint: linear-gradient(150deg, #e3f9ef, #c2efdb); }
.card:nth-child(2) { --d: .07s; } .card:nth-child(3) { --d: .14s; }
.card:nth-child(5) { --d: .07s; } .card:nth-child(6) { --d: .14s; }
.fineprint { margin-top: clamp(26px, 3vw, 40px); text-align: center; font-size: 15.5px; font-weight: 600; color: #6a4a64; }

/* ───────── 앱 화면 ───────── */
.screens {
  padding: clamp(70px, 9vw, 130px) 0 clamp(60px, 8vw, 110px);
  background: linear-gradient(180deg, #f5bfd6 0%, #c9a2e0 22%, #7f6fd0 52%, #3d3396 80%, #1e1b56 100%);
}
.reel-wrap { position: relative; margin-top: clamp(26px, 3.6vw, 48px); }
.reel {
  display: flex; gap: clamp(14px, 2vw, 26px);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding: 26px max(20px, calc((100vw - 1180px) / 2)) 44px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; cursor: grab;
}
.reel::-webkit-scrollbar { display: none; }
.reel.is-drag { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.reel figure {
  flex: 0 0 auto; width: clamp(214px, 22vw, 300px); scroll-snap-align: center;
  border-radius: clamp(22px, 2.4vw, 32px); overflow: hidden; background: #fff;
  box-shadow: 0 26px 50px -18px rgba(18, 12, 70, .62), 0 0 0 4px rgba(255, 255, 255, .92);
  transition: transform .4s var(--ease-out);
}
.reel figure:nth-child(odd) { transform: rotate(-1.6deg); }
.reel figure:nth-child(even) { transform: rotate(1.6deg) translateY(12px); }
@media (hover: hover) { .reel figure:hover { transform: rotate(0) translateY(-10px) scale(1.03); } }
.reel img { width: 100%; pointer-events: none; user-select: none; }
.reel-arrow {
  position: absolute; top: 50%; z-index: 3; width: 56px; height: 56px; margin-top: -36px;
  display: grid; place-items: center; border-radius: 50%;
  color: var(--ink); background: #fff; box-shadow: 0 6px 0 rgba(18, 12, 70, .3);
  transition: transform .15s var(--ease-out), opacity .2s;
}
.reel-arrow.prev { left: max(14px, calc((100vw - 1320px) / 2)); }
.reel-arrow.prev svg { transform: scaleX(-1); }
.reel-arrow.next { right: max(14px, calc((100vw - 1320px) / 2)); }
.reel-arrow:hover { transform: scale(1.1); }
.reel-arrow:active { transform: scale(.94); }
.reel-arrow[disabled] { opacity: 0; pointer-events: none; }

/* ───────── 밤하늘 ───────── */
.night {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: max(100vh, 700px); min-height: max(100svh, 700px);
  display: flex; flex-direction: column; align-items: center;
  padding: clamp(40px, 8vh, 100px) 20px 40px;
  color: #fff; text-align: center; background: #1b1950;
}
.night-bg { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
@media (min-aspect-ratio: 16/9) { .night-bg { object-position: 50% 44%; } }
@media (min-aspect-ratio: 2/1) { .night-bg { object-position: 50% 50%; } }
.night-veil { position: absolute; inset: 0; z-index: -2; background: linear-gradient(180deg, #1e1b56 0%, rgba(30, 27, 86, .72) 16%, rgba(30, 27, 86, 0) 44%); }
.night-stars {
  position: absolute; inset: 0 0 45% 0; z-index: -1; opacity: .9;
  background-image:
    radial-gradient(circle at 8% 18%, #fff 0 1.4px, transparent 2px),
    radial-gradient(circle at 19% 62%, #fff 0 1px, transparent 1.6px),
    radial-gradient(circle at 31% 30%, #fff 0 1.6px, transparent 2.2px),
    radial-gradient(circle at 44% 74%, #fff 0 1px, transparent 1.6px),
    radial-gradient(circle at 57% 14%, #fff 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 68% 52%, #fff 0 1.6px, transparent 2.2px),
    radial-gradient(circle at 79% 26%, #fff 0 1px, transparent 1.6px),
    radial-gradient(circle at 91% 66%, #fff 0 1.4px, transparent 2px),
    radial-gradient(circle at 96% 12%, #fff 0 1px, transparent 1.6px),
    radial-gradient(circle at 3% 84%, #fff 0 1.2px, transparent 1.8px);
  animation: starBreath 5s ease-in-out infinite;
}
@keyframes starBreath { 50% { opacity: .45; } }
.night-copy { display: flex; flex-direction: column; align-items: center; }
.constellation { width: clamp(76px, min(10vw, 12vh), 124px); height: auto; overflow: visible; filter: drop-shadow(0 0 14px rgba(190, 200, 255, .75)); }
.c-line { stroke: #fff; stroke-width: 26; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1500; stroke-dashoffset: 0; opacity: .9; }
.c-stars { fill: #fff; }
.js .night-copy .c-line { stroke-dashoffset: 1500; transition: stroke-dashoffset 1.8s ease .35s; }
.js .night-copy.is-in .c-line { stroke-dashoffset: 0; }
.night h2 { margin-top: 18px; font-family: var(--display); font-weight: 400; font-size: clamp(36px, min(4.8vw, 7.4vh), 62px); line-height: 1.22; text-shadow: 0 4px 24px rgba(20, 16, 70, .7); }
.night-copy > p { margin-top: 14px; font-size: clamp(16px, 1.5vw, 20px); font-weight: 600; color: #dcdcff; text-shadow: 0 2px 12px rgba(20, 16, 70, .8); }
.night .btn { margin-top: 24px; }
.night-copy > .night-req { margin-top: 16px; font-size: 14.5px; font-weight: 500; color: #b9b8ea; }

/* ───────── 아래 ───────── */
.foot { background: #100e36; color: #c9c8ee; padding: 48px 0 calc(52px + env(safe-area-inset-bottom)); }
.foot-in { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 18px 30px; }
.foot-brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 26px; color: #fff; }
.foot-brand img { border-radius: 11px; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 24px; font-size: 15.5px; font-weight: 600; }
.foot-links a { padding: 6px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.foot-links a:hover { color: #fff; border-color: rgba(255, 255, 255, .5); }
.foot-note, .foot-copy { font-size: 14px; color: #8f8dc0; }
.foot-note { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); }
.foot-copy { grid-column: 1 / -1; margin-top: -8px; }

/* 좁은 화면 아래 받기 줄 */
.dock {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
  display: none; align-items: center; gap: 12px;
  padding: 10px 12px 10px 12px; border-radius: 22px;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 16px 40px rgba(20, 16, 70, .3), inset 0 0 0 1px rgba(28, 36, 82, .08);
  transform: translateY(140%); transition: transform .45s var(--ease-out);
}
.dock img { border-radius: 11px; }
.dock-txt { display: flex; flex-direction: column; line-height: 1.25; margin-right: auto; }
.dock-txt strong { font-family: var(--display); font-weight: 400; font-size: 19px; }
.dock-txt span { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.dock.is-on { transform: none; }

/* ───────── 좁은 화면 ───────── */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card:nth-child(n) { --d: 0s; }
  .finder { grid-template-columns: 1fr; text-align: center; }
  .finder-form { justify-content: center; }
}

@media (max-width: 700px) {
  :root { --nav-h: 60px; }
  body { font-size: 16px; }
  .nav { gap: 10px; }
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .dock { display: flex; }

  .sun { top: 10%; right: 8%; }
  .hero-copy { justify-content: center; padding-bottom: 4px; }
  .wordmark { font-size: clamp(84px, min(27vw, 17svh), 150px); }
  .hero-cta { flex-direction: column; align-items: center; gap: 16px; width: 100%; }
  .hero-cta .btn { width: min(300px, 100%); }

  .stage { grid-template-columns: 1fr; min-height: 0; text-align: center; }
  .stage-figure { order: -1; padding: 22px 0 0; }
  .stage-char { width: min(68%, 300px); }
  .stage-arrow { width: 46px; height: 46px; margin-top: -23px; }
  .stage-arrow.prev { left: 14px; }
  .stage-arrow.next { right: 14px; }
  .stage-info { padding: 6px 20px 30px; }
  .stage-tags { justify-content: center; }
  .stage-word { font-size: 78cqw; -webkit-text-stroke-width: .6cqw; }
  .stage-word[data-len="2"] { font-size: 46cqw; }
  .stage-word[data-len="3"] { font-size: 31cqw; }
  .swatches { justify-content: center; gap: 4px; flex-wrap: nowrap; }
  .sw { flex-direction: column; gap: 6px; font-size: 15px; padding: 6px 9px; background: none; box-shadow: none; }
  .sw i { width: 36px; height: 36px; }
  .sw[aria-pressed="true"] { background: none; box-shadow: none; transform: translateY(-3px); }
  .sw[aria-pressed="true"] i { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .14), inset 0 2px 0 rgba(255, 255, 255, .5), 0 0 0 3px #fff, 0 0 0 6px var(--acc); }

  .roster { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; margin-inline: -20px; padding: 14px 20px 8px; gap: 10px; }
  .roster::-webkit-scrollbar { display: none; }
  .ro { scroll-snap-align: center; }
  .ro-face { width: 62px; }

  .finder-form select { flex: 1 1 28%; min-width: 0; padding-left: 12px; padding-right: 30px; background-position: right 10px center; }
  .finder-form .btn { flex: 1 1 100%; }

  .card { padding-top: 132px; border-radius: 28px; }
  .card img { width: 112px; }
  .card h3 { font-size: 23px; }
  .card p { font-size: 15px; }

  .reel figure { width: min(66vw, 270px); }
  .reel-arrow { display: none; }

  .night { min-height: max(100vh, 830px); min-height: max(100svh, 830px); }
  .night .btn-lg { min-height: 62px; font-size: 21px; padding: 0 32px; }
  .foot { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .foot-in { grid-template-columns: 1fr; }
  .foot-links { justify-content: flex-start; }
}

/* 세로로 긴 화면: 친구들이 5·4·3 세 줄로 모인다 (--k 는 크기 배율) */
@media (max-width: 700px), (max-width: 1100px) and (orientation: portrait) {
  .meadow { --k: 1; }
  .hill-far-l { left: -40cqw; width: 110cqw; height: calc(61cqw * var(--k)); }
  .hill-far-r { right: -50cqw; width: 120cqw; height: calc(57cqw * var(--k)); }
  .hill-near { left: -32cqw; right: -32cqw; height: calc(54cqw * var(--k)); }
  .lineup { height: calc(62cqw * var(--k)); margin-bottom: calc(7cqw * var(--k)); }
  .hc {
    left: calc(50cqw + (var(--mx) - 50) * var(--k) * 1cqw);
    bottom: calc(var(--my) * var(--k) * 1cqw);
    width: calc(var(--mw) * var(--k) * 1cqw);
    z-index: var(--mz);
  }
  .hc::after { display: none; }
}
@media (min-width: 701px) and (max-width: 1100px) and (orientation: portrait) {
  .meadow { --k: .74; }
}

@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
  .card { padding-top: 26px; padding-right: 138px; min-height: 150px; }
  .card img { width: 104px; top: 50%; margin-top: -52px; }
  .card .chip { position: static; display: inline-block; margin-bottom: 10px; }
}

/* 움직임을 줄이는 설정 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .cloud { animation: none; transform: translateX(60vw); }
  .twinkle, .stage-spark { opacity: .8; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
