@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--font-sans); letter-spacing: -0.01em; }
a { color: inherit; }
button { font: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.wrap.narrow { max-width: 720px; }
.main { padding: 32px 0 96px; min-height: 70vh; }
.stack > * + * { margin-top: 16px; }
.stack-s > * + * { margin-top: 8px; }
.stack-l > * + * { margin-top: 24px; }
.stack-xl > * + * { margin-top: 56px; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap-row { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.push { margin-left: auto; }
.center { text-align: center; }
.center > .row, .center .draw-stage { justify-content: center; }
.right { text-align: right; display: block; }
.muted { color: var(--ink-muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; margin: 0; }
.label { font-size: 13px; font-weight: 700; color: var(--ink-muted); display: block; }
.h1 { font-family: var(--font-display); font-size: 28px; line-height: 1.3; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.h2 { font-family: var(--font-display); font-size: 24px; line-height: 1.3; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.h3 { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.body-l { font-size: 16px; line-height: 27px; margin: 0; }
p { margin: 0; line-height: 1.6; }
.gold-ink { color: var(--gold-ink); font-weight: 700; }
.on-night-muted { color: var(--on-night-muted); }
.text-link { background: none; border: 0; padding: 8px 4px; color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.chip-link { font-size: 13px; padding: 8px 12px; border-radius: 999px; background: var(--surface-sunken); text-decoration: none; font-weight: 600; }
.chip-link:hover { background: var(--robe-soft); }
a.ny-btn { text-decoration: none; }
.more { font-weight: 700; font-size: 15px; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; white-space: nowrap; }
.topnav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.topnav a { padding: 10px 14px; border-radius: 12px; text-decoration: none; font-weight: 500; font-size: 15px; color: var(--ink-muted); }
.topnav a:hover { color: var(--ink); background: var(--surface-sunken); }
.topnav a.on { color: var(--ink); font-weight: 700; background: var(--surface-sunken); }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--ink); flex: none; background: none; border: 0; }
.icon-btn:hover { background: var(--surface-sunken); }
.footer { border-top: 1px solid var(--line); padding: 24px 0; font-size: 13px; color: var(--ink-muted); }
.tabbar { display: none; }
.mobile-only { display: none; }

/* page head */
.page-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-head .icon-btn { margin-left: -12px; }
.page-head-text { flex: 1; min-width: 200px; }
.page-head h1 { font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -0.03em; margin: 0; line-height: 1.25; }
.page-head p { color: var(--ink-muted); font-size: 14px; margin-top: 4px; }

/* panels */
.panel { background: var(--surface-raised); border: 1px solid var(--line); border-radius: 28px; padding: 28px; }
.panel.soft { background: var(--surface-soft); border-color: transparent; }
.panel.warn { background: var(--bad-soft); border-color: transparent; }
.panel.night { background: var(--night); color: var(--on-night); border-color: transparent; }
.mini-panel { background: var(--surface-sunken); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.mini-panel b { font-size: 14px; line-height: 20px; }
.mini-panel .num { font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.mini-panel .num.good { color: var(--good); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-3.tight { gap: 8px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head p { margin-top: 6px; }
.empty { text-align: center; padding: 64px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty h2 { font-size: 20px; font-weight: 800; margin: 8px 0 0; }
.empty p { color: var(--ink-muted); }
.resume { display: block; padding: 14px 16px; border-radius: 16px; background: var(--robe-soft); color: var(--robe); font-weight: 700; text-decoration: none; }
.field { width: 100%; font: inherit; font-size: 16px; line-height: 1.5; padding: 14px 16px; border-radius: 16px; border: 2px solid transparent; background: var(--surface-sunken); color: var(--ink); resize: vertical; }
.field:focus { outline: none; border-color: var(--robe); }
.meter { height: 8px; border-radius: 999px; background: var(--surface-sunken); overflow: hidden; }
.meter > div { height: 100%; background: var(--ink); border-radius: 999px; transition: width .4s; }
.table { border-radius: 20px; background: var(--surface-sunken); overflow: hidden; }
.table-row { display: flex; gap: 16px; padding: 14px 18px; font-size: 15px; }
.table-row + .table-row { border-top: 1px solid var(--line); }
.table-row b { width: 64px; flex: none; }
.table-row span { color: var(--ink-muted); }

/* home */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; padding-top: 16px; }
.eyebrow { font-size: 14px; font-weight: 700; color: var(--gold-ink); }
.hero h1 { font-family: var(--font-display); font-size: 48px; line-height: 1.2; font-weight: 800; letter-spacing: -0.03em; margin: 16px 0; }
.lead { font-size: 17px; line-height: 28px; color: var(--ink-muted); max-width: 520px; margin-bottom: 28px; }
.hero-art { display: flex; justify-content: center; align-items: center; background: var(--surface-soft); border-radius: 28px; padding: 40px 24px; text-decoration: none; }
.fan { position: relative; width: 380px; height: 300px; }
.fan > span { position: absolute; top: 40px; }
.fan .f1 { left: 30px; top: 70px; transform: rotate(-18deg); }
.fan .f2 { left: 76px; transform: rotate(-9deg); }
.fan .f4 { left: 192px; transform: rotate(9deg); }
.fan .f5 { left: 238px; top: 70px; transform: rotate(18deg); }
.fan .f3 { left: 106px; top: 0; z-index: 2; }
.fan .ny-card { pointer-events: none; }
.topic-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.topic-bar p { margin-top: 4px; }
.post-link { display: block; text-decoration: none; color: inherit; border-radius: 20px; }
.post-link .ny-post { max-width: none; height: 100%; transition: transform .15s, box-shadow .15s; }
.post-link:hover .ny-post { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.gold-btn { align-self: flex-start; display: inline-flex; align-items: center; height: 52px; padding: 0 22px; border-radius: 20px; background: var(--gold); color: var(--on-gold); font-weight: 700; text-decoration: none; }
.panel.night .ny-customer { max-width: none; }
.library-teaser { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* today / detail */
.split { display: grid; grid-template-columns: 340px 1fr; gap: 48px; align-items: start; }
.card-stage { background: var(--surface-soft); border-radius: 28px; padding: 40px 0; display: flex; justify-content: center; }
.draw-stage { display: flex; justify-content: center; padding: 24px 0; perspective: 800px; }
.draw-stage.flipping .ny-card { transform: rotateY(90deg) scale(1.04); transition: transform .45s; }
.reader-line { display: flex; gap: 10px; align-items: flex-start; }
.bubble { background: var(--surface-soft); border-radius: 20px; border-top-left-radius: 6px; padding: 14px 16px; font-size: 15px; line-height: 24px; }

/* reading */
.slots { display: flex; justify-content: center; gap: 24px; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.deck { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 24px; background: var(--surface-soft); border-radius: 28px; }
.deck .ny-card-sm, .slot .ny-card-sm { --w: 72px; }
.sticky-action { position: sticky; bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 20px; border-radius: 24px; background: var(--surface-raised); box-shadow: 0 8px 30px rgba(28,27,31,0.14); }
.result { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.spread-panel { padding: 8px; }
.spread-panel .ny-spread { padding: 24px 8px; gap: 16px; }
.chat { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.chat-body { display: flex; flex-direction: column; gap: 12px; max-height: 560px; overflow-y: auto; padding-right: 4px; }
.chat-body .ny-msg { max-width: 92%; }

/* library */
.library { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 24px 12px; padding: 24px; background: var(--surface-soft); border-radius: 28px; justify-items: center; }
.lib-item { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }

/* community */
.answer { padding: 18px; border-radius: 22px; background: var(--surface-raised); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.answer.adopted { border: 2px solid var(--gold); background: var(--surface-soft); }
.answer-body { display: flex; gap: 14px; align-items: flex-start; }
.answer-body p { font-size: 15px; line-height: 24px; }

/* diary */
.diary-row { display: flex; flex-direction: column; gap: 8px; }
.diary-row .ny-diary { max-width: none; }
.record { padding-left: 4px; flex-wrap: wrap; }
.pill { height: 36px; padding: 0 14px; border-radius: 999px; border: 0; font-weight: 700; font-size: 13px; cursor: pointer; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }

/* game */
.game-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-radius: 28px; background: var(--night); color: var(--on-night); }
.game-head .h2 { margin-top: 4px; }
.moons { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--gold); color: var(--on-gold); font-weight: 800; }
.moons svg { width: 16px; height: 16px; }
.game .ny-customer, .narrow .ny-customer { max-width: none; }
.game-card { align-items: center; gap: 16px; }
.options { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.option { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 18px; background: var(--surface-sunken); border: 2px solid transparent; font-size: 15px; line-height: 22px; cursor: pointer; }
.option input { accent-color: var(--ink); width: 18px; height: 18px; margin: 0; flex: none; }
.option.on { border-color: var(--ink); background: var(--surface-soft); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--surface); padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; transition: all .2s; z-index: 50; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .wrap { padding: 0 16px; }
  .main { padding: 16px 0 112px; }
  .topbar-in { height: 56px; gap: 8px; justify-content: space-between; }
  .brand { font-size: 18px; }
  .topnav, .desktop-only { display: none; }
  .mobile-only { display: inline-flex; }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface-raised); border-top: 1px solid var(--line); padding: 6px 4px calc(10px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 11.5px; text-decoration: none; color: var(--ink-muted); }
  .tabbar a.on { color: var(--ink); font-weight: 700; }
  .stack-xl > * + * { margin-top: 32px; }
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 0; }
  .hero h1 { font-size: 30px; margin: 10px 0; }
  .lead { font-size: 15px; line-height: 24px; margin-bottom: 20px; }
  .hero-art { order: -1; padding: 20px 8px; border-radius: 24px; }
  .fan { transform: scale(0.6); transform-origin: center center; }
  .hero .row .ny-btn { flex: 1; padding: 0 12px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-3.tight { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .panel { padding: 20px; border-radius: 24px; }
  .page-head h1 { font-size: 24px; }
  .split, .result { grid-template-columns: 1fr; gap: 20px; }
  .card-stage { padding: 24px 0; }
  .deck { gap: 8px; padding: 16px 8px; }
  .deck .ny-card-sm { --w: 56px; }
  .slots { gap: 16px; }
  .sticky-action { bottom: 84px; }
  .chat-body { max-height: none; }
  .library { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 16px 8px; gap: 18px 6px; }
  .library .ny-card { --w: 96px; }
  .h1 { font-size: 24px; }
  .toast { bottom: 96px; }
}

/* overflow guards */
.hero > *, .split > *, .grid-2 > *, .grid-3 > * { min-width: 0; }
.hero-art { overflow: hidden; }
.ny-minicards { flex-wrap: wrap; }
.ny-minicard { white-space: nowrap; }
@media (max-width: 860px) {
  .fan { width: 380px; flex: none; }
  .hero-art { height: 210px; padding: 0; }
  .spread-panel .ny-spread { gap: 10px; padding: 20px 4px; }
  .spread-panel .ny-card-md { --w: 92px; }
  .chat { padding: 16px; }
}

/* --- 2026-11-17 동작 다듬기 --- */
/* 한국어는 낱말 중간에서 줄을 바꾸지 않음 */
body { word-break: keep-all; overflow-wrap: anywhere; }
/* 그림이 아직 없는 카드: 빈 회색 칸 대신 밤색 바탕 + 금색 문양 */
.ny-card-face .ny-card-art:not(:has(img)) { background: var(--night); }
.ny-card-face .ny-card-art:not(:has(img)) .ny-card-emblem { --gold: #e7d3a1; opacity: 1; }
/* 덱 24장을 빈자리 없이 줄 맞춤: 12 x 2 */
.deck { display: grid; grid-template-columns: repeat(12, max-content); justify-content: center; }
@media (max-width: 1100px) { .deck { grid-template-columns: repeat(8, max-content); } }
@media (max-width: 860px) {
  .deck { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px 6px; padding: 14px 10px; }
  .deck .ny-card-sm { --w: 100%; width: 100%; }
}

/* --- 2026-11-17 움직임 --- */
:root { --ease-out: cubic-bezier(.22,1,.36,1); --ease-spring: cubic-bezier(.34,1.4,.64,1); }

/* 화면 전환: 살짝 올라오며 나타남 */
.page { animation: ny-page-in .38s var(--ease-out) backwards; }
@keyframes ny-page-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 버튼 · 칩 · 링크 카드: 누를 때 눌리는 느낌 */
.ny-btn, .ny-chip, .ny-seg button, .icon-btn, .gold-btn, .option, .post-link .ny-post, .ny-chatinput button {
  transition: transform .18s var(--ease-out), background-color .18s, color .18s, box-shadow .2s, border-color .18s, opacity .18s;
}
.ny-btn:active:not(:disabled), .ny-chip:active, .icon-btn:active, .gold-btn:active, .option:active, .ny-chatinput button:active:not(:disabled) { transform: scale(.96); }
.post-link:active .ny-post { transform: scale(.985); }

/* 카드: 떠오르고 내려앉는 움직임을 부드럽게 */
.ny-card { transition: transform .32s var(--ease-spring), box-shadow .32s var(--ease-out), opacity .25s; will-change: transform; }
.ny-card:active { transform: translateY(-2px) scale(.97); }

/* 오늘의 카드 뒤집기: 뒷면이 반쯤 돌고, 앞면이 이어서 돌아 나옴 */
.draw-stage, .reveal { perspective: 1200px; }
.draw-stage .ny-card { animation: ny-breathe 2.8s ease-in-out infinite; }
.draw-stage.flipping .ny-card { animation: ny-flip-out .42s cubic-bezier(.55,0,.75,.2) forwards; }
@keyframes ny-flip-out { from { transform: translateY(-6px) scale(1); } to { transform: rotateY(90deg) scale(1.06); } }
@keyframes ny-breathe { 0%,100% { transform: translateY(0); box-shadow: var(--shadow-card); } 50% { transform: translateY(-6px); box-shadow: var(--shadow-glow); } }
.reveal .ny-card-face { animation: ny-flip-in .62s var(--ease-out) backwards; transform-origin: center; }
.reveal .ny-spread-slot:nth-child(2) .ny-card-face { animation-delay: .22s; }
.reveal .ny-spread-slot:nth-child(3) .ny-card-face { animation-delay: .44s; }
@keyframes ny-flip-in { from { opacity: .4; transform: rotateY(-90deg) scale(1.06); } 60% { opacity: 1; } to { opacity: 1; transform: rotateY(0) scale(1); } }

/* 3장 리딩: 덱이 차례로 깔리고, 고른 카드는 자리로 내려앉음 */
.deck .ny-card { animation: ny-deal .42s var(--ease-out) backwards; }
.slot .ny-card { animation: ny-drop .45s var(--ease-spring) backwards; }
@keyframes ny-deal { from { opacity: 0; transform: translateY(14px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes ny-drop { from { opacity: 0; transform: translateY(-28px) scale(.85) rotate(-4deg); } to { opacity: 1; transform: none; } }
.deck .ny-card[aria-pressed="true"] { opacity: .55; }
.sticky-action .ny-btn:not(:disabled) { animation: ny-pop .4s var(--ease-spring); }
@keyframes ny-pop { 0% { transform: scale(.92); } 100% { transform: scale(1); } }

/* 대화: 말풍선이 차례로 올라오고, 리더가 입력 중일 때 점 세 개 */
.chat-body .ny-msg { animation: ny-msg-in .38s var(--ease-out) both; }
.chat-body > .ny-msg:nth-child(2) { animation-delay: .35s; }
.chat-body > .ny-msg:nth-child(3) { animation-delay: .7s; }
@keyframes ny-msg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.typing { display: inline-flex; gap: 4px; align-items: center; height: 24px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-muted); animation: ny-dot 1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ny-dot { 0%,80%,100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* 품앗이 해석 · 가게 결과 · 진행 막대 */
.answer { animation: ny-msg-in .4s var(--ease-out) both; }
.rise { animation: ny-msg-in .42s var(--ease-out) both; }
.meter > div { transition: width .7s var(--ease-out); }
.toast { transition: opacity .25s var(--ease-out), transform .3s var(--ease-spring); }

/* 움직임 줄이기를 켠 사람에게는 동작을 끔 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.deck .ny-card:nth-child(1) { animation-delay: 0ms; }
.deck .ny-card:nth-child(2) { animation-delay: 22ms; }
.deck .ny-card:nth-child(3) { animation-delay: 44ms; }
.deck .ny-card:nth-child(4) { animation-delay: 66ms; }
.deck .ny-card:nth-child(5) { animation-delay: 88ms; }
.deck .ny-card:nth-child(6) { animation-delay: 110ms; }
.deck .ny-card:nth-child(7) { animation-delay: 132ms; }
.deck .ny-card:nth-child(8) { animation-delay: 154ms; }
.deck .ny-card:nth-child(9) { animation-delay: 176ms; }
.deck .ny-card:nth-child(10) { animation-delay: 198ms; }
.deck .ny-card:nth-child(11) { animation-delay: 220ms; }
.deck .ny-card:nth-child(12) { animation-delay: 242ms; }
.deck .ny-card:nth-child(13) { animation-delay: 264ms; }
.deck .ny-card:nth-child(14) { animation-delay: 286ms; }
.deck .ny-card:nth-child(15) { animation-delay: 308ms; }
.deck .ny-card:nth-child(16) { animation-delay: 330ms; }
.deck .ny-card:nth-child(17) { animation-delay: 352ms; }
.deck .ny-card:nth-child(18) { animation-delay: 374ms; }
.deck .ny-card:nth-child(19) { animation-delay: 396ms; }
.deck .ny-card:nth-child(20) { animation-delay: 418ms; }
.deck .ny-card:nth-child(21) { animation-delay: 440ms; }
.deck .ny-card:nth-child(22) { animation-delay: 462ms; }
.deck .ny-card:nth-child(23) { animation-delay: 484ms; }
.deck .ny-card:nth-child(24) { animation-delay: 506ms; }

/* --- 2026-11-17 고급스럽게: 리더 고양이 무대 · 반짝임 · 의식 --- */
.hero { grid-template-columns: 1.05fr 1fr; gap: 56px; min-height: 500px; padding-top: 8px; }
.hero h1 { font-size: 56px; line-height: 1.16; letter-spacing: -0.035em; margin: 18px 0 20px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; letter-spacing: .02em; }
.tw.eyebrow-star { width: 14px; height: 14px; color: var(--gold-ink); }

.hero-stage { position: relative; height: 500px; display: grid; place-items: center; isolation: isolate; }
.stage-disc { position: absolute; width: 440px; aspect-ratio: 1; border-radius: 50%; background: var(--surface-soft); z-index: -1; }
.stage-disc::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px solid var(--gold); opacity: .55; }
.reader-figure { width: 400px; max-width: 100%; height: auto; mix-blend-mode: multiply; animation: ny-float 6s ease-in-out infinite; user-select: none; -webkit-user-drag: none; }
@keyframes ny-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hero-bubble { position: absolute; top: 34px; left: -8px; max-width: 220px; margin: 0; padding: 14px 18px; border-radius: 20px; border-bottom-left-radius: 6px; background: var(--surface-raised); box-shadow: var(--shadow-card); font-size: 15px; line-height: 23px; font-weight: 600; animation: ny-bubble-in .6s var(--ease-spring) .5s backwards; }
@keyframes ny-bubble-in { from { opacity: 0; transform: translateY(10px) scale(.92); } to { opacity: 1; transform: none; } }
.hero-card { position: absolute; right: 18px; bottom: 44px; transform: rotate(9deg); animation: ny-card-bob 5s ease-in-out 1s infinite; }
.hero-card .ny-card { --w: 92px; }
@keyframes ny-card-bob { 0%,100% { transform: rotate(9deg) translateY(0); } 50% { transform: rotate(6deg) translateY(-8px); } }

/* 금색 반짝임 */
.twinkles { position: absolute; inset: 0; pointer-events: none; }
.tw { display: block; }
.twinkles .tw { position: absolute; color: var(--gold); animation: ny-twinkle 3.2s ease-in-out infinite; }
.twinkles .t1 { width: 22px; top: 9%; right: 16%; }
.twinkles .t2 { width: 12px; top: 26%; right: 6%; animation-delay: .8s; }
.twinkles .t3 { width: 16px; bottom: 16%; left: 10%; animation-delay: 1.6s; }
.twinkles .t4 { width: 10px; top: 46%; left: 4%; animation-delay: 2.2s; }
.twinkles .t5 { width: 14px; bottom: 6%; right: 34%; animation-delay: 1.1s; }
@keyframes ny-twinkle { 0%,100% { opacity: .25; transform: scale(.7) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(20deg); } }

/* 상단 바 · 리더 아바타 금테 */
.topbar { background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.brand .ny-avatar, .reader-line .ny-avatar, .ny-msg-reader .ny-avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--gold); }

/* 오늘의 카드: 무대와 말풍선 */
.draw-stage { position: relative; padding: 48px 0 32px; }
.draw-stage .twinkles .t1 { right: 30%; } .draw-stage .twinkles .t3 { left: 30%; } .draw-stage .twinkles .t4 { left: 26%; } .draw-stage .twinkles .t2 { right: 26%; } .draw-stage .twinkles .t5 { right: 44%; }
.center-line { justify-content: center; }
.center-line .bubble { animation: ny-bubble-in .5s var(--ease-spring) .2s backwards; }

/* 앞면이 나오면 금색 별이 퍼짐 */
.card-stage { position: relative; }
.burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; z-index: 3; }
.burst > span { position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; color: var(--gold); transform: rotate(var(--a)) translateY(0) scale(.3); opacity: 0; animation: ny-burst 1s var(--ease-out) .5s forwards; }
.burst > span:nth-child(even) { width: 10px; height: 10px; left: -5px; top: -5px; animation-delay: .58s; }
@keyframes ny-burst { 0% { opacity: 0; transform: rotate(var(--a)) translateY(0) scale(.3); } 25% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-150px) scale(1); } }

/* 카드를 읽는 순서 */
.ritual { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: ny-fade .3s ease both; }
@keyframes ny-fade { from { opacity: 0; } to { opacity: 1; } }
.ritual-in { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; animation: ny-bubble-in .5s var(--ease-spring) .05s backwards; }
.ritual-cat { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--gold), var(--shadow-card); margin-bottom: 18px; animation: ny-float 2.4s ease-in-out infinite; }
.ritual-orbit { position: absolute; top: 56px; left: 50%; width: 0; height: 0; animation: ny-spin 3.2s linear infinite; }
.ritual-orbit .tw { position: absolute; color: var(--gold); width: 16px; margin: -8px; }
.ritual-orbit .o1 { transform: translate(0, -92px); }
.ritual-orbit .o2 { transform: translate(80px, 46px); width: 11px; }
.ritual-orbit .o3 { transform: translate(-80px, 46px); width: 13px; }
@keyframes ny-spin { to { transform: rotate(360deg); } }
.ritual-text { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.ritual-sub { margin: 0; font-size: 13px; letter-spacing: .3em; color: var(--gold-ink); font-weight: 700; }

/* 마우스를 따라 카드가 살짝 기울어짐 */
.tilt .ny-card-face.tilting { transform: perspective(900px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)) translateY(-6px) scale(1.02); transition: transform .12s linear, box-shadow .3s; box-shadow: var(--shadow-glow); }

@media (max-width: 860px) {
  .hero { min-height: 0; gap: 8px; }
  .hero h1 { font-size: 32px; }
  .hero-stage { order: -1; height: 330px; }
  .stage-disc { width: 290px; }
  .reader-figure { width: 270px; }
  .hero-bubble { top: 6px; left: 0; max-width: 190px; font-size: 14px; line-height: 21px; padding: 11px 14px; }
  .hero-card { right: 4px; bottom: 18px; }
  .hero-card .ny-card { --w: 70px; }
  .twinkles .t1 { right: 8%; }
}
@media (min-width: 861px) {
  .hero { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; }
  .hero h1 { font-size: 50px; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 4px; padding-top: 0; }
  .hero-stage { width: 100%; overflow: hidden; }
  .hero-bubble { left: 4px; }
}
