:root {
  --paper: #FFF8F3; --surface: #FFFFFF; --ink: #2E2A3A; --muted: #6B6577; --line: #F1E6DF; --chip: #F7EDE6;
  --wood: #B8E0D2; --wood-deep: #2E7A63;
  --fire: #FFC9CC; --fire-deep: #B8434F;
  --earth: #FFE3A3; --earth-deep: #8A6414;
  --metal: #E9E3F7; --metal-deep: #6B5C9A;
  --water: #BFD7EA; --water-deep: #34587F;
  --cta: #C24F62; --cta-press: #A84155;
  --serif: 'DM Serif Display', 'Gowun Batang', serif;
  --hanja: 'Noto Serif KR', serif;
  --sans: 'IBM Plex Sans KR', system-ui, -apple-system, sans-serif;
  --shadow: 0 1px 2px rgba(46,42,58,.04), 0 10px 30px rgba(46,42,58,.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.45; }
button, input, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--cta); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }

/* header */
.top { display: flex; justify-content: space-between; align-items: center; height: 64px; padding: 0 16px 0 20px; }
.logo { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--serif); font-size: 22px; }
.ohang { display: flex; flex-direction: column; width: 7px; height: 24px; border-radius: 4px; overflow: hidden; }
.ohang i { flex: 1; }
.lang { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--chip); }
.lang button { height: 38px; min-width: 44px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; font-weight: 700; font-size: 13px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* buttons */
.btn { display: flex; justify-content: center; align-items: center; gap: 8px; height: 58px; border: 0; border-radius: 999px; background: var(--cta); color: #fff; font-weight: 700; font-size: 17px; cursor: pointer; text-decoration: none; width: 100%; }
.btn:active { background: var(--cta-press); }
.btn.sm { height: 54px; font-size: 15px; }
.btn.ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.text { background: transparent; color: var(--muted); height: 44px; font-size: 14px; font-weight: 500; }
.btn.text.ink { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* intro */
.intro { padding: 8px 20px 0; display: flex; flex-direction: column; gap: 18px; }
.dots { display: flex; justify-content: center; gap: 6px; }
.dots span { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .2s; }
.dots span.on { background: var(--cta); }
.dots span.cur { width: 22px; }
.hero-boki { position: relative; height: 250px; display: flex; justify-content: center; }
.hero-boki::before { content: ''; position: absolute; left: 50%; top: 18px; width: 230px; height: 230px; margin-left: -115px; border-radius: 50%; background: var(--fire); }
.hero-boki img { position: relative; width: 200px; height: 232px; object-fit: contain; margin-top: 14px; animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.bubbles { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.bubble { max-width: 300px; padding: 12px 16px; border-radius: 6px 20px 20px 20px; background: var(--surface); box-shadow: 0 4px 16px rgba(46,42,58,.07); font-size: 16px; animation: pop .35s ease-out both; }
.bubble:nth-child(2) { animation-delay: .25s; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.form { display: flex; flex-direction: column; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 13px; font-weight: 700; color: var(--muted); }
.input, .select { height: 58px; border-radius: 18px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 18px; padding: 0 16px; width: 100%; }
.select { font-weight: 700; padding: 0 10px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 26px, calc(100% - 13px) 26px; background-size: 5px 5px; background-repeat: no-repeat; }
.select.small { height: 48px; font-size: 15px; font-weight: 500; border-radius: 14px; }
.input:focus, .select:focus { box-shadow: inset 0 0 0 2px var(--cta); outline: none; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.err { color: var(--fire-deep); font-size: 14px; font-weight: 500; min-height: 0; }
.note { font-size: 13px; color: var(--muted); text-align: center; }

.card { background: var(--surface); border-radius: 28px; box-shadow: var(--shadow); }
.below { display: flex; flex-direction: column; }
.sample { margin: 56px 20px 0; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.pill { padding: 4px 10px; border-radius: 999px; background: var(--chip); font-size: 11px; font-weight: 700; color: var(--muted); }
.serif { font-family: var(--serif); font-weight: 400; }
.sample .serif { font-size: 24px; line-height: 1.25; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.lucky { padding: 12px; border-radius: 16px; display: flex; flex-direction: column; gap: 2px; }
.lucky span { font-size: 11px; font-weight: 700; }
.lucky b { font-size: 15px; }
.sec { padding: 48px 20px 0; display: flex; flex-direction: column; gap: 14px; }
.sec h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.15; }
.feat { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 0 16px; border-radius: 22px; }
.feat .ic { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; background: rgba(255,255,255,.7); display: flex; align-items: center; justify-content: center; }
.feat b { display: block; font-size: 16px; }
.feat span { font-size: 13px; }
.five { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; text-align: center; }
.five div { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.five .arch { width: 100%; max-width: 64px; aspect-ratio: 62 / 72; border-radius: 999px 999px 16px 16px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.five .arch img { width: 92%; height: 92%; object-fit: contain; object-position: bottom; }
footer { padding: 56px 20px 32px; font-size: 13px; color: var(--muted); }

/* loading */
.loading { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 40px 20px 120px; text-align: center; }
.loading img { width: 190px; height: 194px; object-fit: contain; animation: wiggle 1.2s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes wiggle { 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
.loading p { margin: 0; font-size: 18px; font-weight: 500; min-height: 27px; }
.bar { width: 180px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--cta); animation: fill 2.4s ease-in-out forwards; }
@keyframes fill { to { width: 100%; } }

/* result */
.daily { margin: 4px 20px 12px; padding: 14px 16px; border-radius: 22px; background: var(--surface); box-shadow: 0 4px 16px rgba(46,42,58,.06); display: flex; gap: 12px; align-items: center; }
.daily img { width: 56px; height: 58px; object-fit: contain; flex: 0 0 56px; }
.daily .txt { display: flex; flex-direction: column; gap: 3px; }
.daily .eyebrow { font-size: 11px; }
.daily b { font-size: 15px; line-height: 1.4; }
.daily small { font-size: 12px; color: var(--muted); }
.sky { margin: 0 20px; padding: 22px 20px 24px; border-radius: 32px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.sky .say { padding: 10px 16px; border-radius: 18px; background: var(--surface); font-size: 15px; font-weight: 500; }
.sky img { width: 190px; height: 204px; object-fit: contain; animation: reveal .7s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes reveal { from { opacity: 0; transform: scale(.6) translateY(20px); } }
.sky .eyebrow { letter-spacing: .08em; }
.sky h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 42px; line-height: 1; }
.sky p { margin: 0; font-size: 16px; line-height: 1.55; max-width: 300px; }
.actions { padding: 14px 20px 0; display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; }
.stamp-card { margin: 28px 20px 0; padding: 20px; border-radius: 24px; background: var(--surface); display: flex; align-items: center; gap: 18px; }
.stamp { width: 96px; height: 96px; flex: 0 0 96px; border: 4px solid var(--cta); border-radius: 18px; display: flex; align-items: center; justify-content: center; transform: rotate(-4deg); color: var(--cta); font-family: 'Gowun Batang', serif; font-weight: 700; font-size: 34px; letter-spacing: .02em; line-height: 1; text-align: center; }
.stamp.long { font-size: 24px; }
.stamp-card .txt { display: flex; flex-direction: column; gap: 4px; }
.stamp-card b { font-size: 17px; }
.stamp-card .desc { font-size: 13px; color: var(--muted); }
.sec h2.sm { font-size: 28px; }
.trait { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 22px; background: var(--surface); }
.trait .n { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.trait b { display: block; font-size: 16px; margin-bottom: 4px; }
.trait span { font-size: 14px; line-height: 1.55; color: var(--muted); }
.trait.love .n img { width: 20px; height: 20px; object-fit: contain; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.panel { padding: 18px; border-radius: 24px; background: var(--surface); display: flex; flex-direction: column; gap: 14px; }
.mixbar { display: flex; gap: 4px; height: 16px; }
.mixbar i { border-radius: 8px; }
.mixnums { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; text-align: center; font-size: 13px; }
.mixnums div { display: flex; flex-direction: column; gap: 2px; }
.mixnums b { font-size: 20px; }
.mixnums .zero { color: var(--muted); }
.panel .divide { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.6; }
.chip-btn { height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--chip); font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }
.chart { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; text-align: center; }
.chart .col { font-size: 12px; font-weight: 700; color: var(--muted); }
.chart button { height: 60px; border: 0; border-radius: 16px; font-family: var(--hanja); font-weight: 700; font-size: 26px; cursor: pointer; }
.chart button[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--cta); }
.chart .blank { height: 60px; border-radius: 16px; background: var(--chip); color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.picked { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--paper); }
.picked .h { font-family: var(--hanja); font-weight: 700; font-size: 26px; }
.picked b { display: block; font-size: 14px; }
.picked span { font-size: 13px; color: var(--muted); }
.year { margin: 44px 20px 0; padding: 20px; border-radius: 24px; background: var(--fire); display: flex; flex-direction: column; gap: 10px; }
.year h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 24px; }
.year p { margin: 0; font-size: 15px; line-height: 1.6; }
.notify { display: flex; gap: 6px; }
.notify .input { height: 52px; font-size: 16px; border-radius: 16px; flex: 1; min-width: 0; }
.notify .btn { width: auto; height: 52px; padding: 0 18px; font-size: 15px; border-radius: 16px; flex: 0 0 auto; }
.ok { padding: 14px 16px; border-radius: 16px; background: var(--surface); font-size: 14px; font-weight: 700; }
.list { border-radius: 24px; background: var(--surface); overflow: hidden; }
.list .item { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.list .item:last-child { border-bottom: 0; }
.list .thumb { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 16px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.list .thumb img { width: 42px; height: 42px; object-fit: contain; }
.list .main { flex: 1; }
.list b { display: block; font-size: 15px; }
.list span { font-size: 13px; color: var(--muted); }
.list .tag { font-size: 12px; font-weight: 700; color: var(--muted); }
.small-note { font-size: 12px; line-height: 1.6; color: var(--muted); }

/* toast & sheet */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; z-index: 50; animation: pop .25s ease-out; }
.sheet { position: fixed; inset: 0; background: rgba(46,42,58,.55); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 20px; z-index: 40; }
.sheet img.cardimg { max-height: calc(100dvh - 170px); width: auto; max-width: 100%; border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.sheet .acts { display: flex; gap: 8px; width: 100%; max-width: 360px; }
.sheet .close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); font-size: 22px; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 12지 친구 */
.friends { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 8px; text-align: center; }
.friends div { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; }
.friends .pad { width: 100%; aspect-ratio: 1; border-radius: 22px; display: flex; align-items: center; justify-content: center; }
.friends .pad img { width: 84%; height: 84%; object-fit: contain; }
.five-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.el-chip { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px 0 6px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.el-chip img { width: 24px; height: 24px; object-fit: contain; }

/* 계산 중 → 공개 연출 */
.stage { position: relative; width: 220px; height: 220px; display: flex; align-items: center; justify-content: center; }
.loading .stage #loadimg { width: 200px; height: 208px; object-fit: contain; animation: none; }
.loading .stage #loadimg[src*="brush"] { animation: wiggle 1.2s ease-in-out infinite; }
.loading .stage #loadimg.jump { animation: hop .45s ease-out 2; }
@keyframes hop { 50% { transform: translateY(-18px); } }
.spark { position: absolute; width: 40px; height: 40px; object-fit: contain; opacity: 0; transform: scale(.3); }
.spark.s1 { top: 6px; left: 0; } .spark.s2 { top: 0; right: 4px; width: 34px; } .spark.s3 { bottom: 30px; right: -6px; width: 30px; }
.stage.burst .spark { animation: sparkpop .6s cubic-bezier(.2,1.6,.4,1) forwards; }
.stage.burst .s2 { animation-delay: .08s; } .stage.burst .s3 { animation-delay: .16s; }
@keyframes sparkpop { to { opacity: 1; transform: scale(1) rotate(12deg); } }

/* 결과 히어로 */
.say-row { display: flex; align-items: flex-end; gap: 6px; }
.mini-boki { width: 54px; height: 54px; object-fit: contain; }
.friend-wrap { position: relative; }
.sky img.friend { width: 200px; height: 200px; object-fit: contain; animation: reveal .7s cubic-bezier(.2,1.4,.4,1) both; }
.badge { position: absolute; right: -6px; top: 10px; width: 58px; height: 58px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(46,42,58,.12); animation: pop .4s .5s ease-out both; }
.badge img { width: 38px; height: 38px; object-fit: contain; }
.daily .meta { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.daily .meta img { width: 18px; height: 18px; object-fit: contain; margin-left: 4px; }
.daily .meta img:first-child { margin-left: 0; }
.mixnums img { width: 30px; height: 30px; object-fit: contain; margin: 0 auto 2px; }

/* 우선순위 정리 (.loading img / .sky img 공통 규칙 덮어쓰기) */
.loading .spark { width: 40px; height: 40px; animation: none; }
.loading .spark.s2 { width: 34px; height: 34px; } .loading .spark.s3 { width: 30px; height: 30px; }
.loading .stage.burst .spark { animation: sparkpop .6s cubic-bezier(.2,1.6,.4,1) forwards; }
.loading .stage.burst .s2 { animation-delay: .08s; } .loading .stage.burst .s3 { animation-delay: .16s; }
.sky img.mini-boki { width: 54px; height: 54px; animation: none; }
.sky .badge img { width: 38px; height: 38px; animation: none; }
.daily .meta { gap: 2px 4px; }
.sky .badge { right: -14px; top: 0; border: 3px solid var(--badge, #2E2A3A); }

/* 타입 설명 */
.type-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.type-chips span { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 4px; border-radius: 999px; background: rgba(255,255,255,.75); font-size: 13px; font-weight: 700; }
.sky .type-chips img { width: 26px; height: 26px; object-fit: contain; animation: none; }
.sky .trad { font-size: 12px; color: var(--muted); }
.how { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.explain { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 22px; background: var(--surface); }
.explain .pic { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 20px; background: rgba(255,255,255,.7); display: flex; align-items: center; justify-content: center; }
.explain .pic img { width: 52px; height: 52px; object-fit: contain; }
.explain b { display: block; font-size: 16px; line-height: 1.45; margin-top: 2px; }
.explain .d { display: block; font-size: 14px; line-height: 1.55; color: var(--muted); margin-top: 2px; }
.hero-boki img { animation: none; }

/* 로고 */
.logo { gap: 8px; }
.logo-stamp { width: 36px; height: 36px; }
.wordmark { font-family: 'Fredoka', 'IBM Plex Sans KR', sans-serif; font-weight: 600; font-size: 26px; letter-spacing: -.01em; color: var(--ink); line-height: 1; }

/* 첫 화면 */
.home .hero { padding: 6px 20px 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.kicker { padding: 6px 12px; border-radius: 999px; background: var(--chip); font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.home h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1.08; letter-spacing: -.01em; max-width: 330px; }
.home .sub { margin: 0; font-size: 16px; line-height: 1.5; color: var(--muted); max-width: 340px; }
.hero-art { position: relative; width: 300px; height: 230px; margin: 4px 0 2px; }
.hero-art .blob { position: absolute; left: 50%; top: 50%; width: 210px; height: 210px; margin: -105px 0 0 -105px; border-radius: 50%; background: var(--fire); }
.hero-boki-img { position: absolute; left: 50%; bottom: 6px; width: 172px; height: 178px; margin-left: -86px; object-fit: contain; }
.orb { position: absolute; width: 74px; height: 74px; object-fit: contain; animation: floaty 4s ease-in-out infinite; }
.orb.o1 { left: 0; top: 10px; } .orb.o2 { right: 0; top: 0; animation-delay: -1s; }
.orb.o3 { left: 8px; bottom: 0; animation-delay: -2s; } .orb.o4 { right: 6px; bottom: 6px; animation-delay: -3s; }
@keyframes floaty { 50% { transform: translateY(-7px) rotate(-3deg); } }
.home .hero .btn { max-width: 360px; }
.get-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 22px; }
.get-card img { width: 64px; height: 64px; object-fit: contain; flex: 0 0 64px; }
.get-card b { display: block; font-size: 16px; }
.get-card span span { font-size: 14px; line-height: 1.5; }
.mini-stamp { width: 60px; height: 60px; flex: 0 0 60px; border: 3px solid var(--cta); border-radius: 14px; display: flex; align-items: center; justify-content: center; transform: rotate(-5deg); color: var(--cta); font-family: 'Gowun Batang', serif; font-weight: 700; font-size: 20px; background: rgba(255,255,255,.6); }
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; text-align: center; }
.pillars div { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.pillars .pv { width: 100%; height: 64px; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-family: var(--hanja); font-weight: 700; font-size: 28px; }
.pillars small { font-size: 12px; font-weight: 700; color: var(--muted); }
.how.small { font-size: 13px; }
.end-cta { align-items: center; text-align: center; }
.end-cta img { width: 96px; height: 96px; object-fit: contain; }
@media (prefers-reduced-motion: reduce) { .orb { animation: none; } }

/* 첫 화면 그림: 보키와 친구들 단체 사진 */
.lineup { position: relative; width: 340px; max-width: 100%; height: 236px; margin: 2px 0 0; }
.lineup .arch { position: absolute; left: 50%; bottom: 18px; width: 236px; height: 200px; margin-left: -118px; border-radius: 118px 118px 28px 28px; background: var(--fire); }
.lineup .ground { position: absolute; left: 6%; right: 6%; bottom: 8px; height: 18px; border-radius: 50%; background: rgba(46,42,58,.07); z-index: 0; }
.lineup img { position: absolute; object-fit: contain; z-index: 1; }
.lineup .lead { left: 50%; bottom: 12px; width: 150px; height: 156px; margin-left: -75px; z-index: 3; }
.lineup .pal { width: 70px; height: 70px; bottom: 14px; animation: hopsmall 2.8s ease-in-out infinite; }
.lineup .p1 { left: 4px; } .lineup .p2 { left: 62px; bottom: 12px; animation-delay: -.7s; z-index: 2; }
.lineup .p3 { right: 62px; bottom: 12px; animation-delay: -1.4s; z-index: 2; } .lineup .p4 { right: 4px; animation-delay: -2.1s; }
.lineup .spk { width: 26px; height: 26px; animation: twinkle 2.4s ease-in-out infinite; }
.lineup .k1 { left: 64px; top: 22px; } .lineup .k2 { right: 70px; top: 10px; width: 22px; height: 22px; animation-delay: -1.2s; }
@keyframes hopsmall { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(-8px); } 90% { transform: translateY(0); } }
@keyframes twinkle { 50% { opacity: .35; transform: scale(.8) rotate(15deg); } }
@media (prefers-reduced-motion: reduce) { .lineup .pal, .lineup .spk { animation: none; } }

/* 결과 페이지 정리 (좌우 20px 기준선 통일) */
.result .sec h2 { font-size: 28px; }
.result .daily { margin: 4px 20px 16px; }
.result .daily.inline { margin: 0; }
.lucky-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.lk { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px 0 6px; border-radius: 999px; background: var(--chip); font-size: 12px; font-weight: 700; color: var(--ink); }
.lk img { width: 18px; height: 18px; object-fit: contain; }
.daily .txt { min-width: 0; }
.result .stamp-card { margin: 0; }
.result .year { margin: 0; }
.chart-sub { font-size: 14px; color: var(--muted); }
.howlist { margin: 0; padding: 12px 14px 12px 30px; border-radius: 16px; background: var(--paper); font-size: 13px; line-height: 1.55; color: var(--ink); display: flex; flex-direction: column; gap: 4px; }
.chart { grid-template-columns: 38px repeat(4, minmax(0, 1fr)); align-items: center; }
.chart .rowlab { font-size: 11px; font-weight: 700; color: var(--muted); writing-mode: vertical-rl; text-orientation: upright; letter-spacing: .1em; justify-self: center; }
.tap-hint { font-size: 12px; color: var(--muted); text-align: center; }
.picked { align-items: flex-start; }
.picked .h { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.picked .pt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.picked .pt small { font-size: 12px; color: var(--muted); line-height: 1.45; }
.trait .n { color: var(--ink); }
.list .item { min-height: 72px; }
.soon-pill { flex: 0 0 auto; padding: 4px 10px; border-radius: 999px; background: var(--chip); font-size: 12px; font-weight: 700; color: var(--muted); }
.list .thumb img { width: 34px; height: 34px; }
.result .sec .note { margin-top: -4px; }
.daily .lucky-row { flex-direction: row; flex-wrap: wrap; }
.chart { grid-template-columns: 46px repeat(4, minmax(0, 1fr)); }
.chart .rowlab { writing-mode: horizontal-tb; text-orientation: mixed; letter-spacing: 0; font-size: 11px; text-align: left; justify-self: start; }
.daily .lk img { width: 18px; height: 18px; flex: 0 0 18px; }

/* 한글 도장: 글자 수에 따라 칸 배치 (2×2, 3×2 등) */
.stamp, .mini-stamp { display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr); align-content: center; justify-items: center; gap: 0; padding: 6px; line-height: 1; }
.stamp i, .mini-stamp i { font-style: normal; }
.stamp.s-l { font-size: 34px; } .stamp.s-m { font-size: 26px; } .stamp.s-s { font-size: 20px; }
.mini-stamp.s-l { font-size: 20px; } .mini-stamp.s-m { font-size: 16px; } .mini-stamp.s-s { font-size: 12px; }
.stamp, .mini-stamp { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; }
.stamp i, .mini-stamp i { flex: 0 0 calc((100% - 2px) / var(--cols, 2)); text-align: center; }

/* 첫 카드: 보키의 풀이 */
.sky p.one { font-size: 16px; font-weight: 500; }
.reading-card { width: 100%; text-align: left; background: rgba(255,255,255,.82); border-radius: 22px; padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 6px; }
.reading-card .eyebrow { font-size: 11px; color: var(--muted); }
.reading-card p { margin: 0 0 6px; max-width: none; font-size: 15px; line-height: 1.6; }
.reading-card ul { margin: 0; padding-left: 18px; font-size: 15px; line-height: 1.6; }
.sky .trad { font-size: 12px; line-height: 1.5; color: var(--muted); max-width: 300px; }

/* 다섯 기운: 칸마다 막대 (위아래 줄 맞춤) */
.mixnums div { align-items: center; gap: 3px; }
.mixnums .track { display: block; width: 70%; height: 6px; border-radius: 3px; background: var(--chip); overflow: hidden; margin-top: 4px; }
.mixnums .track i { display: block; height: 100%; border-radius: 3px; opacity: .55; }

/* 공유 시트 */
.sheet { justify-content: flex-end; padding: 16px 16px 20px; overflow-y: auto; }
.sheet img.cardimg { max-height: calc(100dvh - 330px); }
.share-panel { width: 100%; max-width: 380px; background: var(--surface); border-radius: 24px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.share-panel .btn .ic, .share-opt .ic { width: 20px; height: 20px; display: inline-flex; }
.share-panel .btn .ic svg, .share-opt .ic svg { width: 100%; height: 100%; }
.share-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.share-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 2px; min-height: 64px; border: 0; border-radius: 16px; background: var(--chip); font-size: 11px; font-weight: 700; color: var(--ink); cursor: pointer; line-height: 1.2; text-align: center; }
.share-opt .ic { width: 22px; height: 22px; }
.share-tip { font-size: 13px; line-height: 1.5; color: var(--ink); background: var(--paper); border-radius: 14px; padding: 10px 12px; }
.ref-banner { margin: 4px 20px 6px; padding: 12px 14px; border-radius: 22px; display: flex; align-items: center; gap: 12px; }
.ref-banner img { width: 56px; height: 56px; object-fit: contain; flex: 0 0 56px; }
.ref-banner b { display: block; font-size: 16px; }
.ref-banner span span { font-size: 13px; color: var(--ink); }
.again { margin-top: 16px; padding: 20px; border-radius: 24px; background: var(--metal); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.again img { width: 80px; height: 80px; object-fit: contain; }
.again b { font-size: 18px; }
.again span { font-size: 14px; line-height: 1.5; color: var(--ink); margin-bottom: 6px; }
.result .btn.text[data-action="restart"] { height: 52px; font-size: 15px; font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.viewing { margin: 4px 20px 12px; padding: 10px 12px 10px 16px; border-radius: 18px; background: var(--metal); display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 500; }

/* 오늘의 한마디: 재방문 장치 */
.result .daily { flex-direction: column; align-items: stretch; gap: 10px; }
.daily-top { display: flex; gap: 12px; align-items: center; }
.streak { color: var(--cta); }
.tomorrow { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--paper); font-size: 13px; line-height: 1.45; }
.daily .tomorrow img { width: 22px; height: 22px; flex: 0 0 22px; }
.daily-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.daily-foot .chip-btn { flex: 0 0 auto; background: var(--cta); color: #fff; }
.lk.streak { background: #FDE7EA; color: var(--cta); }

/* 궁합 */
.match-hero .pair { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; }
.match-hero figure { margin: 0; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.match-hero figure img { width: 120px; height: 120px; object-fit: contain; animation: reveal .7s cubic-bezier(.2,1.4,.4,1) both; }
.match-hero figure:last-child img { animation-delay: .15s; }
.match-hero figcaption { display: flex; flex-direction: column; align-items: center; }
.match-hero figcaption b { font-size: 16px; }
.match-hero figcaption span { font-size: 12px; color: var(--muted); font-weight: 700; }
.match-hero .heart img { width: 40px; height: 40px; object-fit: contain; animation: pop .4s .4s both; }
.match-hero .score { display: flex; align-items: baseline; gap: 6px; background: #fff; border-radius: 999px; padding: 6px 18px; }
.match-hero .score b { font-size: 34px; color: var(--cta); }
.match-hero .score span { font-size: 13px; font-weight: 700; color: var(--muted); }
.sky .rarity { font-size: 12px; font-weight: 700; color: var(--ink); background: rgba(255,255,255,.7); border-radius: 999px; padding: 5px 12px; }

/* 첫 카드 정돈: 위계 = 이름 → 한 줄 → 희소성 → 풀이 */
.sky { gap: 10px; }
.sky .say { max-width: 260px; overflow-wrap: anywhere; }
.sky h1 { margin-top: -2px; }
.sky p.one { margin: -4px 0 0; color: var(--ink); }
.sky .rarity { background: transparent; padding: 0; font-weight: 500; color: var(--muted); }
.reading-card { margin-top: 6px; gap: 8px; }
.reading-card p { margin: 0; }
.reading-card .probably { border-top: 1px dashed var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.trad-note { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); }

/* 하단 법적 링크, 스팸 방지용 숨김 칸 */
footer .legal { display: flex; justify-content: center; gap: 16px; margin-top: 8px; }
footer .legal a { color: var(--muted); font-size: 12px; text-decoration: underline; text-underline-offset: 2px; }
.notify .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* 도장 v3: 원형, 위쪽 호를 따라 한글 이름 + 가운데 동물 얼굴 (assets/stamps) */
.seal, .seal.stamp, .seal.mini-stamp { display: block; overflow: visible; transform: rotate(-6deg); border: 0; border-radius: 0; padding: 0; background: none; }
.seal.stamp { width: 116px; height: 116px; flex: 0 0 116px; }
.seal.mini-stamp, .get-card .seal.mini-stamp { width: 68px; height: 68px; flex: 0 0 68px; border: 0; padding: 0; background: none; }
.seal .seal-name { fill: #C8434F; font-family: 'Song Myung', 'Noto Serif KR', serif; font-weight: 400; }
