/* 타로·별자리 사이트 — 타로 진행 화면 (설계안 v2 §4, §5-3~5-5) */
:root {
  --ivory: #FAF6F2;
  --ivory-2: #E8E1EC;
  --lavender: #D9CDDF;
  --peach: #F0D0BA;
  --sage: #DCD8C6;
  --sky: #CBCEDB;
  --gold: #C8A878;
  --ink: #3B3250;
  --ink-soft: #8A8299;
  --night: #2E2447;
  --cream: #F5EFE6;
  --gold-light: #D9BC85;
  --rose: #EFC9C9;
  --radius: 22px;
  --ease: cubic-bezier(.22, .8, .28, 1);
  --serif: 'MaruBuri', 'Noto Serif KR', 'Apple SD Gothic Neo', serif;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --en: 'Cormorant Garamond', 'MaruBuri', serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #ECE6EE;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; user-select: none; -webkit-user-drag: none; }

.app {
  position: relative;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--ivory);
  overflow: hidden;
  box-shadow: 0 0 60px rgba(59, 50, 80, .08);
}
.top {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 20px;
}
.logo { font-family: var(--serif); font-size: 20px; color: var(--ink); text-decoration: none; letter-spacing: .02em; }
.quit { background: none; border: 0; color: var(--ink-soft); font-size: 14px; padding: 8px 0 8px 12px; }
.stage { position: relative; min-height: calc(100dvh - 56px); }

/* 공통 부품 */
.screen { padding: 8px 20px 48px; animation: fadeUp .6s var(--ease) both; }
.screen.table { padding: 0; min-height: calc(100dvh - 56px); background: url("../images/ui/table-cloth.webp") center / cover no-repeat; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; }
h1 { font-size: 26px; line-height: 1.4; }
h2 { font-size: 20px; line-height: 1.4; }
.muted { color: var(--ink-soft); font-size: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 28px; border-radius: 999px; border: 0;
  background: var(--ink); color: var(--cream); font-size: 16px; font-weight: 500;
  transition: transform .6s var(--ease), opacity .6s var(--ease), background .3s;
}
.btn:hover { transform: translateY(-4px); }
.btn:disabled { opacity: .35; cursor: default; transform: none; }
.btn.ghost { background: var(--ivory); color: var(--ink); border: 1.5px solid var(--gold); }
.btn.block { display: flex; width: 100%; }
.card-img { width: 100%; height: auto; border-radius: 4.6% / 2.8%; box-shadow: 0 6px 18px rgba(59, 50, 80, .14); outline: 1.5px solid rgba(200, 168, 120, .55); outline-offset: -1.5px; }

/* 입구 */
.entry h1 { margin: 8px 0 4px; }
.entry .date { margin-bottom: 24px; }
.daily { margin: 8px auto 36px; text-align: center; }
.daily .card-wrap { width: 200px; margin: 0 auto 18px; animation: breathe 3s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.daily .one { font-family: var(--serif); font-size: 18px; margin: 10px 0 2px; }
.topics h2 { margin-bottom: 4px; }
.topic-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px 8px; margin-top: 14px; }
.topic { background: none; border: 0; padding: 0; text-align: center; transition: transform .6s var(--ease); }
.topic:hover { transform: translateY(-4px); }
.topic img { width: 100%; border-radius: 10px; box-shadow: 0 4px 12px rgba(59, 50, 80, .12); }
.topic span { display: block; font-size: 12.5px; margin-top: 6px; color: var(--ink); white-space: nowrap; }
.count-line { margin-top: 14px; font-size: 13px; color: var(--ink-soft); }

/* 질문 고르기 */
.qlist { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.qlist button {
  text-align: left; background: #fff; border: 1px solid var(--ivory-2); border-radius: 16px;
  padding: 16px 18px; font-size: 16px; transition: transform .6s var(--ease), border-color .3s;
}
.qlist button:hover { transform: translateY(-4px); border-color: var(--gold); }

/* 마음 모으기 */
.focus { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 60px 28px; }
.focus .q { font-family: var(--serif); font-size: 26px; line-height: 1.5; opacity: 0; transition: opacity 1.2s ease; max-width: 360px; }
.focus .q.show { opacity: 1; }
.focus .hint { margin-top: 18px; opacity: 0; transition: opacity 1.2s ease .6s; }
.focus .hint.show { opacity: 1; }
.focus .btn { margin-top: 48px; opacity: 0; transform: translateY(10px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.focus .btn.show { opacity: 1; transform: none; }

/* 섞기 */
.shuffle { display: flex; flex-direction: column; align-items: center; padding: 28px 20px 40px; min-height: calc(100dvh - 56px); }
.shuffle .guide { font-family: var(--serif); font-size: 18px; text-align: center; }
.gauge { position: absolute; right: 20px; top: 8px; width: 36px; height: 36px; border-radius: 50%; background: conic-gradient(var(--gold) var(--p, 0%), rgba(200,168,120,.25) 0); }
.gauge::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--ivory); opacity: .85; }
.deck { position: relative; width: 180px; height: 292px; margin: 56px auto 48px; touch-action: none; cursor: grab; }
.deck .layer { position: absolute; inset: 0; transition: transform .12s ease-out; will-change: transform; }
.deck.release .layer { transition: transform .6s var(--ease); }
.deck .layer img { width: 100%; height: auto; border-radius: 4.6% / 2.8%; box-shadow: 0 2px 6px rgba(59, 50, 80, .18); outline: 1px solid rgba(200,168,120,.5); outline-offset: -1px; }
.shuffle .btn { margin-top: auto; }

/* 자르기 */
.cut { display: flex; flex-direction: column; align-items: center; padding: 28px 20px 40px; min-height: calc(100dvh - 56px); }
.cut .guide { font-family: var(--serif); font-size: 18px; text-align: center; }
.piles { position: relative; width: 100%; height: 300px; margin-top: 56px; }
.pile { position: absolute; left: 50%; top: 0; width: 120px; margin-left: -60px; transition: transform .8s var(--ease); cursor: pointer; }
.pile img { width: 100%; border-radius: 4.6% / 2.8%; box-shadow: 0 4px 10px rgba(59,50,80,.18); outline: 1px solid rgba(200,168,120,.5); outline-offset: -1px; }
.pile.split-0 { transform: translateX(-140px); }
.pile.split-1 { transform: translateX(0); }
.pile.split-2 { transform: translateX(140px); }
.pile.chosen { transform: translateX(0) translateY(-20px) scale(1.04); z-index: 3; }
.pile.merge { transform: translateX(0); }

/* 펼치기 · 고르기 */
.spread { padding-top: 16px; min-height: calc(100dvh - 56px); display: flex; flex-direction: column; }
.spread .guide { font-family: var(--serif); font-size: 18px; text-align: center; padding: 0 64px; }
.spread .counter { position: absolute; right: 20px; top: 14px; font-family: var(--en); font-size: 18px; color: var(--ink-soft); }
.slots { display: flex; justify-content: center; gap: 18px; margin: 22px 0 10px; }
.slot { width: 96px; }
.slot .ph { width: 96px; height: 156px; border-radius: 8px; border: 1.5px dashed rgba(200, 168, 120, .7); background: rgba(250, 246, 242, .35); transition: background .6s; }
.slot .ph img { width: 100%; height: 100%; border-radius: 8px; }
.slot .label { text-align: center; font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
.fan-scroll { position: relative; flex: 1; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; cursor: grab; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.fan-scroll::-webkit-scrollbar { display: none; }
.fan-scroll.sink { opacity: 0; transform: translateY(40px); pointer-events: none; }
.fan { position: relative; height: 380px; }
.fan-card { position: absolute; width: 96px; height: 156px; transform-origin: 50% 100%; will-change: transform; transition: transform 1.4s var(--ease); }
.fan-card .cardimg { position: relative; width: 100%; height: 100%; transition: transform .6s var(--ease); }
.fan-card .cardimg img { width: 100%; height: 100%; border-radius: 8px; box-shadow: 0 2px 6px rgba(59,50,80,.16); outline: 1px solid rgba(200,168,120,.55); outline-offset: -1px; }
.fan-card .glow { position: absolute; inset: -30px; border-radius: 50%; background: radial-gradient(closest-side, rgba(217,188,133,.55), rgba(217,205,223,.35) 55%, transparent 72%); opacity: 0; transition: opacity .6s var(--ease); pointer-events: none; }
.fan-card.lifted .cardimg, .fan-card:hover .cardimg { transform: translateY(-10px); }
.fan-card.lifted .glow { opacity: 1; }
.fan-card.taken { visibility: hidden; }
.fly { position: fixed; z-index: 50; width: 96px; height: 156px; pointer-events: none; transition: transform .8s var(--ease); }
.fly img { width: 100%; height: 100%; border-radius: 8px; box-shadow: 0 8px 20px rgba(59,50,80,.22); outline: 1px solid rgba(200,168,120,.55); outline-offset: -1px; }

/* 뒤집기 */
.flipstage { display: flex; flex-direction: column; align-items: center; padding: 28px 20px 40px; min-height: calc(100dvh - 56px); }
.flipstage .guide { font-family: var(--serif); font-size: 18px; text-align: center; }
.flip-row { display: flex; justify-content: center; gap: 14px; margin-top: 48px; perspective: 1200px; }
.flip-card { width: 120px; cursor: pointer; }
.flip-card .inner { position: relative; width: 120px; height: 195px; transform-style: preserve-3d; transition: transform .8s var(--ease); }
.flip-card.flipped .inner { transform: rotateY(180deg); }
.flip-card .face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 10px; }
.flip-card .face img { width: 100%; height: 100%; border-radius: 10px; box-shadow: 0 6px 16px rgba(59,50,80,.18); outline: 1px solid rgba(200,168,120,.55); outline-offset: -1px; }
.flip-card .face.front { transform: rotateY(180deg); }
.flip-card .reveal { text-align: center; margin-top: 10px; opacity: 0; transform: translateY(8px); transition: opacity .4s var(--ease) .5s, transform .4s var(--ease) .5s; }
.flip-card.flipped .reveal { opacity: 1; transform: none; }
.flip-card .reveal .nm { font-family: var(--serif); font-size: 16px; }
.flip-card .reveal .kw { font-size: 11.5px; color: var(--gold); margin-top: 2px; line-height: 1.4; }
.flip-card .pos { text-align: center; font-size: 13px; color: var(--ink-soft); margin-bottom: 8px; }
.flipstage .btn { margin-top: 44px; opacity: 0; transform: translateY(10px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.flipstage .btn.show { opacity: 1; transform: none; }

/* 결과 */
.result .meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-soft); }
.result .oneliner { font-family: var(--serif); font-size: 26px; line-height: 1.45; text-align: center; margin: 28px 0 28px; }
.result .three { display: flex; justify-content: center; gap: 14px; }
.result .three figure { margin: 0; width: 120px; text-align: center; }
.result .three figcaption { font-size: 13px; color: var(--ink-soft); margin-top: 8px; }
/* 카드 한 장 = 상자 하나 (미르가 고른 A안) */
.result .boxcard { position: relative; background: #fff; border: 1px solid rgba(200,168,120,.45); border-radius: 22px; padding: 18px 18px 20px; margin-top: 26px; box-shadow: 0 6px 20px rgba(59,50,80,.06); }
.result .boxcard .pos { position: absolute; top: -11px; left: 18px; background: var(--ink); color: var(--cream); font-size: 12px; padding: 2px 12px; border-radius: 999px; letter-spacing: .04em; }
.result .boxcard .head { display: flex; gap: 16px; align-items: center; }
.result .boxcard .head img { width: 92px; }
.result .boxcard h3 { font-size: 21px; line-height: 1.25; }
.result .boxcard .en { font-family: var(--en); font-size: 14px; color: var(--ink-soft); }
.result .boxcard .kw { font-size: 13px; color: var(--gold); margin-top: 2px; }
.result .boxcard .line { height: 1px; background: linear-gradient(90deg, rgba(200,168,120,.6), rgba(200,168,120,0)); margin: 14px 0 12px; }
.result .boxcard p { margin: 0; font-size: 15.5px; }
.result .three { margin-bottom: 10px; }
.result .pending { color: var(--ink-soft); font-size: 14px; background: var(--ivory-2); border-radius: 12px; padding: 12px 14px; }
.result section.plain { margin-top: 36px; }
.result section.plain h2 { margin-bottom: 8px; }
.result .todo { display: flex; align-items: flex-start; gap: 12px; background: #fff; border: 1px solid var(--ivory-2); border-radius: 16px; padding: 16px; }
.result .todo input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ink); }
.result .share { display: flex; gap: 8px; margin-top: 36px; }
.result .share .btn { flex: 1; padding: 0; height: 48px; font-size: 14px; }
.result .note { margin-top: 20px; background: var(--ivory-2); border-radius: 16px; padding: 14px 16px; font-size: 14px; }
.result .actions { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.result .foot { margin-top: 28px; font-size: 12.5px; color: var(--ink-soft); text-align: center; }
.result .big { width: 220px; margin: 20px auto 8px; }
.result .core { text-align: center; }

/* ───────── 아래 고정 메뉴 ───────── */
.app.has-nav { padding-bottom: 72px; }
.nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; height: 64px; display: flex; background: rgba(250,246,242,.96); border-top: 1px solid var(--ivory-2); z-index: 20; backdrop-filter: blur(6px); }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--ink-soft); text-decoration: none; }
.nav a .ico { font-size: 18px; color: var(--gold); line-height: 1; }
.nav a.on { color: var(--ink); font-weight: 600; }
.nav a.on .ico { color: var(--ink); }
.nav a.soon { opacity: .5; }
.nav[hidden] { display: none; }

/* ───────── 별자리 운세 ───────── */
.zodiac { padding: 4px 0 40px; }
.sign-row { display: flex; gap: 6px; overflow-x: auto; padding: 6px 20px 10px; scrollbar-width: none; }
.sign-row::-webkit-scrollbar { display: none; }
.sign-btn { flex: 0 0 auto; width: 58px; background: none; border: 1.5px solid transparent; border-radius: 14px; padding: 6px 2px 4px; text-align: center; transition: border-color .3s, transform .6s var(--ease); }
.sign-btn img { width: 30px; height: 30px; margin: 0 auto; }
.sign-btn span { display: block; font-size: 11px; color: var(--ink-soft); margin-top: 3px; }
.sign-btn.on { border-color: var(--gold); background: #fff; }
.sign-btn.on span { color: var(--ink); }
.sign-row.small .sign-btn { width: 50px; }
.sign-row.small .sign-btn img { width: 24px; height: 24px; }
.tabs { display: flex; gap: 4px; padding: 0 20px; margin-bottom: 14px; }
.tab { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 0; font-size: 14px; color: var(--ink-soft); }
.tab.on { color: var(--ink); border-bottom-color: var(--gold); font-weight: 600; }
.tab.soon { opacity: .5; }
.tabs.sub { margin: 18px 0 8px; padding: 0; }
.tabs.sub .tab { background: var(--ivory-2); border-radius: 999px; border: 0; padding: 9px 0; }
.tabs.sub .tab.on { background: var(--ink); color: var(--cream); }
.zodiac .empty { padding: 40px 20px; text-align: center; }
.night-band { background: var(--night) url("../images/ui/night-wide.webp") center 22% / cover no-repeat; color: var(--cream); padding: 22px 20px 26px; }
.band-inner { display: flex; gap: 18px; align-items: center; }
.zcard { width: 150px; border-radius: 10px; box-shadow: 0 10px 26px rgba(0,0,0,.35); outline: 1px solid rgba(217,188,133,.6); outline-offset: -1px; }
.zcard.sm { width: 110px; }
.band-text .date { font-size: 13px; color: rgba(245,239,230,.75); }
.band-text h2 { font-size: 26px; margin: 4px 0 8px; color: var(--cream); }
.band-text .sky { font-size: 13.5px; color: var(--gold-light); line-height: 1.5; }
.total { text-align: center; padding: 26px 20px 8px; }
.total-stars { margin-bottom: 8px; }
.stars { color: var(--gold); letter-spacing: 2px; font-size: 15px; }
.stars .dim { color: rgba(200,168,120,.3); }
.headline { font-family: var(--serif); font-size: 24px; line-height: 1.45; margin-bottom: 8px; }
.center { text-align: center; }
.areas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 20px 0; }
.area { background: #fff; border: 1px solid var(--ivory-2); border-radius: 18px; padding: 14px 14px 12px; }
.area-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--serif); font-size: 16px; margin-bottom: 6px; }
.area p { margin: 0; font-size: 14px; line-height: 1.65; }
.week .area, .week .area p { font-size: 15px; }
.week .area { margin: 0 0 10px; }
.lucky { margin: 18px 20px 0; background: var(--ivory-2); border-radius: 16px; padding: 12px 16px; font-size: 14px; }
.lbl { color: var(--gold); font-weight: 600; margin-right: 6px; }
.zodiac .share { display: flex; gap: 8px; margin: 22px 20px 0; }
.zodiac .share .btn { flex: 1; padding: 0; height: 46px; font-size: 14px; }
.cta { margin: 26px 20px 0; text-align: center; }
.cta p { margin: 0 0 12px; }
.zodiac .foot { margin-top: 26px; font-size: 12.5px; color: var(--ink-soft); text-align: center; }
.week { padding: 6px 20px 0; }
.week h2 { margin: 2px 0 8px; }
.flow { width: 100%; height: auto; margin: 6px 0 14px; }
.flow polyline { fill: none; stroke: var(--lavender); stroke-width: 2; }
.flow circle { fill: var(--ivory); stroke: var(--gold); stroke-width: 2; }
.flow circle.best { fill: var(--gold); }
.flow circle.today { stroke: var(--ink); stroke-width: 2.5; }
.flow text { font-size: 13px; fill: var(--ink-soft); text-anchor: middle; font-family: var(--sans); }
.days { display: flex; gap: 10px; }
.days div { flex: 1; background: var(--ivory-2); border-radius: 14px; padding: 10px 14px; font-size: 14px; }
.compat { padding: 6px 20px 0; }
.pair { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 20px 0 6px; }
.score { text-align: center; min-width: 110px; }
.score .names { font-size: 13px; white-space: nowrap; }
.score .num { font-family: var(--en); font-size: 44px; line-height: 1; color: var(--ink); }
.score .num::after { content: "점"; font-family: var(--sans); font-size: 14px; margin-left: 2px; color: var(--ink-soft); }
.para { background: #fff; border: 1px solid var(--ivory-2); border-radius: 16px; padding: 14px 16px; margin: 0 0 10px; font-size: 15px; }

/* ───────── 홈 ───────── */
.hero { position: relative; margin-top: -56px; padding: 56px 20px 0; height: 260px; background: url("../images/ui/home-sky.webp") center / cover no-repeat; display: flex; flex-direction: column; justify-content: flex-end; }
.hero .date { margin-bottom: 2px; }
.hero h1 { padding-bottom: 22px; }
.home { padding: 20px 20px 0; }
.home .daily { margin: 4px auto 30px; }
.home h2 { margin-bottom: 10px; }
.home section + section { margin-top: 32px; }
.sign-today { display: flex; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--ivory-2); border-radius: 20px; padding: 14px; text-decoration: none; color: inherit; transition: transform .6s var(--ease); }
.sign-today:hover { transform: translateY(-4px); }
.sign-today img { width: 84px; border-radius: 6px; box-shadow: 0 4px 12px rgba(59,50,80,.14); }
.sign-today .hl { font-family: var(--serif); font-size: 17px; margin: 2px 0; }
.sign-row.home { padding: 0; margin: 0 -20px; padding: 0 20px; }
.muted.small { font-size: 12.5px; }
.topic.seen { opacity: .55; position: relative; }
.topic.off { opacity: .35; pointer-events: none; }
.topic em { display: block; font-style: normal; font-size: 10.5px; color: var(--gold); }
a.topic { text-decoration: none; display: block; }
.compat-entry { display: flex; gap: 16px; align-items: center; margin-top: 32px; background: var(--ivory-2); border-radius: 20px; padding: 16px; text-decoration: none; color: inherit; transition: transform .6s var(--ease); }
.compat-entry:hover { transform: translateY(-4px); }
.compat-entry h2 { font-size: 17px; margin: 0 0 2px; }
.pair-icons { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.pair-icons img { width: 40px; height: 40px; }
.pair-icons span { color: var(--gold); font-family: var(--en); font-size: 18px; }
.learn { display: flex; gap: 10px; margin-top: 32px; }
.learn-box { flex: 1; display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--ivory-2); border-radius: 18px; padding: 16px; text-decoration: none; color: inherit; font-size: 13px; transition: transform .6s var(--ease); }
.learn-box:hover { transform: translateY(-4px); }
.learn-box strong { font-size: 15px; font-weight: 600; }
.site-foot { margin: 40px -20px 0; padding: 22px 20px 28px; border-top: 1px solid var(--ivory-2); font-size: 12px; color: var(--ink-soft); line-height: 1.9; }
.site-foot a { color: inherit; }

/* ───────── 오늘은 여기까지 ───────── */
.screen.night { min-height: calc(100dvh - 56px); margin-top: -56px; padding: 90px 24px 60px; background: var(--night) url("../images/ui/premium-bg-tall.webp") center / cover no-repeat; color: var(--cream); text-align: center; }
.limit h1 { color: var(--cream); font-size: 26px; }
.limit .until { color: var(--gold-light); margin: 10px 0 26px; font-size: 15px; }
.today-cards { display: flex; justify-content: center; gap: 10px; }
.today-cards img { width: 72px; border-radius: 6px; box-shadow: 0 8px 20px rgba(0,0,0,.4); outline: 1px solid rgba(217,188,133,.6); outline-offset: -1px; }
.limit .muted.small { color: rgba(245,239,230,.65); margin: 8px 0 22px; }
.login-nudge { background: rgba(255,255,255,.08); border: 1px solid rgba(217,188,133,.35); border-radius: 18px; padding: 16px; margin: 0 0 22px; font-size: 14px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.limit .btn.ghost { background: rgba(255,255,255,.06); color: var(--cream); border-color: rgba(217,188,133,.6); }
.limit .instead { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.limit .btn.block:not(.ghost) { background: var(--gold-light); color: var(--night); }
.limit .foot { margin-top: 30px; font-size: 12px; color: rgba(245,239,230,.5); }
.limit .foot a { color: inherit; }
.result .actions a.btn { text-decoration: none; }

/* ───────── 알아보기 ───────── */
.learn-page h1 { margin: 8px 0 4px; }
.tabs.wrap { flex-wrap: wrap; padding: 0; margin: 14px 0 10px; }
.tabs.wrap .tab { flex: 0 0 auto; padding: 8px 12px; text-decoration: none; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 10px; margin-top: 14px; }
.gcard { text-decoration: none; color: inherit; text-align: center; transition: transform .6s var(--ease); }
.gcard:hover { transform: translateY(-4px); }
.gcard .nm { display: block; font-family: var(--serif); font-size: 15px; margin-top: 8px; }
.gcard .kw { display: block; font-size: 11px; color: var(--gold); line-height: 1.4; }
.zgrid .gcard .kw { color: var(--ink-soft); }
.learn-page .back { display: inline-block; text-decoration: none; margin-bottom: 8px; }
.detail .big { width: 240px; margin: 10px auto 12px; }
.detail .core { text-align: center; }
.detail .core h1 { font-size: 26px; }
.detail .core .en { font-family: var(--en); color: var(--ink-soft); font-size: 15px; }
.detail .core .kw { color: var(--gold); font-size: 13px; margin-top: 4px; }
.detail section.plain { margin-top: 30px; }
.detail section.plain h2 { margin-bottom: 8px; }
.detail section.plain p { margin: 0 0 10px; }
.detail .area { margin-bottom: 10px; }
.detail .oneliner.small { font-size: 20px; margin: 6px 0 8px; font-family: var(--serif); text-align: center; }
.detail .three { display: flex; justify-content: center; gap: 12px; }
.detail .three figure { margin: 0; width: 100px; text-align: center; }
.detail .three figcaption { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
.prevnext { display: flex; justify-content: space-between; margin-top: 30px; font-size: 14px; }
.prevnext a { color: var(--ink); text-decoration: none; }
.detail .actions { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.detail .actions a { text-decoration: none; }
.learn-page .foot { margin-top: 30px; font-size: 12.5px; color: var(--ink-soft); text-align: center; }
.learn-page .pending { margin-top: 20px; }
.learn-page .sign-row.small { padding: 0; }
.learn-page .sign-row.small a { text-decoration: none; }
/* 밤 화면에서는 맨 위 사이트 이름을 크림색으로 */
body.night-mode .top .logo { color: var(--cream); position: relative; z-index: 6; }

/* ───────── 내 기록 ───────── */
.records h1 { margin-top: 8px; }
.records .tabs.sub { margin: 16px 0 14px; }
.cal-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--serif); font-size: 18px; margin-bottom: 8px; }
.cal-head button { background: none; border: 0; font-size: 22px; color: var(--ink-soft); padding: 4px 12px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .wd { text-align: center; font-size: 11px; color: var(--ink-soft); padding: 4px 0; }
.cal .day { background: none; border: 1px solid transparent; border-radius: 12px; padding: 4px 2px 6px; min-height: 58px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.cal .day .n { font-size: 12.5px; color: var(--ink-soft); }
.cal .day.has .n { color: var(--ink); font-weight: 600; }
.cal .day.sel { border-color: var(--gold); background: #fff; }
.cal .mini { display: flex; justify-content: center; }
.cal .mini img { width: 18px; border-radius: 2px; margin-left: -6px; box-shadow: 0 1px 3px rgba(59,50,80,.25); }
.cal .mini img:first-child { margin-left: 0; }
.rlist { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.ritem { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--ivory-2); border-radius: 16px; padding: 12px; text-decoration: none; color: inherit; }
.ritem .pics { display: flex; flex: 0 0 auto; }
.ritem .pics img { width: 40px; border-radius: 3px; margin-left: -10px; box-shadow: 0 2px 6px rgba(59,50,80,.2); }
.ritem .pics img:first-child { margin-left: 0; }
.ritem .one { font-family: var(--serif); font-size: 15px; margin: 2px 0; }
.records section.plain { margin-top: 32px; }
.records section.plain h2 { margin-bottom: 10px; }
.stats { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.stats > div { background: #fff; border: 1px solid var(--ivory-2); border-radius: 16px; padding: 12px; font-size: 13px; }
.stats .lbl { display: block; font-size: 11.5px; margin-bottom: 6px; }
.stat-card { display: flex; align-items: center; gap: 8px; }
.stat-card img { width: 34px; border-radius: 3px; }
.big-num { font-family: var(--en); font-size: 30px; line-height: 1; color: var(--ink); }
.big-num small { font-family: var(--sans); font-size: 12px; color: var(--ink-soft); margin-left: 2px; }
.settings { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--ivory-2); border-radius: 16px; overflow: hidden; }
.settings .row { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: none; border: 0; border-bottom: 1px solid var(--ivory-2); text-decoration: none; color: inherit; font-size: 15px; text-align: left; }
.settings .row:last-child { border-bottom: 0; }
.settings .row:disabled { opacity: .5; }
.settings .sico { width: 18px; vertical-align: -4px; }
.records .foot { margin-top: 30px; font-size: 12.5px; color: var(--ink-soft); text-align: center; }

/* 알림 한 줄 */
.toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); background: var(--ink); color: var(--cream); font-size: 14px; padding: 10px 18px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .4s var(--ease), transform .4s var(--ease); z-index: 100; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
/* 공유 받은 화면 */
.shared { text-align: center; padding-top: 20px; }
.shared .three { display: flex; justify-content: center; gap: 12px; margin: 24px 0 10px; }
.shared .three figure { margin: 0; width: 100px; }
.shared .three figcaption { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
.shared .oneliner { font-family: var(--serif); font-size: 24px; line-height: 1.45; margin: 18px 0 0; }
.shared .actions { display: flex; flex-direction: column; gap: 10px; margin-top: 30px; }
.shared .actions a { text-decoration: none; }
.notfound { text-align: center; padding-top: 50px; }
.notfound img { width: 160px; margin: 0 auto 20px; }

/* 장식 (제미나이 요청11) — 밝은 바탕에서만 쓴다 */
.result .oneliner { position: relative; padding: 0 34px; }
.result .oneliner::before, .result .oneliner::after { content: ""; position: absolute; width: 22px; height: 22px; background: url("../images/ornaments/star4-small.png") center / contain no-repeat; opacity: .9; }
.result .oneliner::before { left: 4px; top: -6px; }
.result .oneliner::after { right: 4px; bottom: -4px; width: 16px; height: 16px; background-image: url("../images/ornaments/star4-medium.png"); }
.fan-card .glow { background: url("../images/ornaments/sparkles.png") center / 80% no-repeat, radial-gradient(closest-side, rgba(217,188,133,.55), rgba(217,205,223,.35) 55%, transparent 72%); }
.home .daily { position: relative; }
.home .daily::before { content: ""; position: absolute; left: 50%; top: -18px; transform: translateX(-150px); width: 46px; height: 46px; background: url("../images/ornaments/star8.png") center / contain no-repeat; opacity: .85; pointer-events: none; }
.home .daily::after { content: ""; position: absolute; left: 50%; top: 210px; transform: translateX(118px); width: 34px; height: 34px; background: url("../images/ornaments/star4-large.png") center / contain no-repeat; opacity: .8; pointer-events: none; }
.notfound img.orn { width: 70px; margin: 0 auto 10px; }
.zodiac .empty::before, .records .empty::before { content: ""; display: block; width: 64px; height: 64px; margin: 0 auto 12px; background: url("../images/ornaments/moon.png") center / contain no-repeat; }
.learn-page h1 { position: relative; }
.learn-page > h1::after { content: ""; display: inline-block; width: 24px; height: 24px; margin-left: 8px; vertical-align: 2px; background: url("../images/ornaments/star4-small.png") center / contain no-repeat; }

.sign-line { font-family: var(--serif); text-align: center; color: var(--gold); font-size: 16px; margin: 6px 0 0; }

/* 약관 · 방침 문서 */
.doc { padding: 10px 20px 60px; }
.doc h1 { margin: 8px 0 4px; }
.doc h2 { font-size: 17px; margin: 26px 0 8px; }
.doc p, .doc li { font-size: 14.5px; line-height: 1.75; }
.doc ul { padding-left: 20px; }
.doc a { color: var(--ink); }
.doc-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0 10px; }
.doc-table th, .doc-table td { border: 1px solid var(--ivory-2); padding: 8px; text-align: left; vertical-align: top; }
.doc-table th { background: var(--ivory-2); font-weight: 600; }

/* 소리 켜고 끄는 단추 */
.top { gap: 10px; }
.sound-toggle { margin-left: auto; background: none; border: 1px solid var(--ivory-2); border-radius: 999px; padding: 4px 10px; font-size: 12px; color: var(--ink-soft); }
.sound-toggle.off { opacity: .55; }
.top .quit { margin-left: 0; }
body.night-mode .sound-toggle { color: var(--cream); border-color: rgba(245,239,230,.35); position: relative; z-index: 6; }

/* 별자리 고르기: 열두 개를 한눈에 (6칸 × 2줄) */
.sign-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; overflow: visible; padding: 6px 20px 10px; }
.sign-btn { width: auto; min-width: 0; padding: 6px 0 4px; }
.sign-btn span { white-space: nowrap; }
.sign-row.small { padding: 4px 0 8px; }
.sign-row.small .sign-btn { width: auto; }
.sign-row.home { margin: 0; padding: 0; }

/* 결과: 오늘의 실천 사항 · 하면 좋은 것 · 피할 것 (2026-10-08) */
.result .todo span { display: flex; flex-direction: column; gap: 4px; }
.result .todo strong { font-weight: 600; font-size: 15.5px; line-height: 1.45; }
.result .todo small { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }
.result .why { margin-top: 8px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; }
.result .dodont .sub { margin: -4px 0 10px; }
.dd { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dd li { position: relative; background: #fff; border: 1px solid var(--ivory-2); border-radius: 16px; padding: 13px 16px 13px 46px; }
.dd li::before { content: "✓"; position: absolute; left: 14px; top: 13px; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; line-height: 22px; text-align: center; background: var(--ink); color: var(--cream); }
.dd.dont li::before { content: "✕"; background: var(--ivory-2); color: var(--ink); border: 1px solid var(--gold); line-height: 20px; }
.dd strong { display: block; font-weight: 600; font-size: 15px; line-height: 1.45; }
.dd span { display: block; font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; margin-top: 3px; }
.detail .dd { margin-bottom: 18px; }
.detail .dd + h2 { margin-top: 4px; }

/* 입구·홈: 제목 아래 설명 한 줄 */
.entry .sub { margin: 0 0 22px; }
.home h2 + .sub { margin: -6px 0 12px; }
.home .daily h2 + .sub { margin: -6px 0 16px; }

/* 홈: 이렇게 보면 좋아요 */
.steps ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.steps li a { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--ivory-2); border-radius: 16px; padding: 12px 14px; text-decoration: none; color: inherit; transition: transform .6s var(--ease); }
.steps li a:hover { transform: translateY(-4px); }
.steps b { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--cream); font-family: var(--en); font-weight: 600; font-size: 15px; line-height: 28px; text-align: center; }
.steps strong { display: block; font-weight: 600; font-size: 15px; line-height: 1.4; }
.steps small { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.steps .tip { margin: 14px 0 0; line-height: 1.65; }

/* 문단 나누기 (2026-10-08 미르): 한 상자 안에서도 문장 묶음마다 줄을 띄운다 */
.result section.plain p, .detail section.plain p { margin: 0; }
.result .boxcard p + p, .result section.plain p + p, .detail section.plain p + p { margin-top: 10px; }
.result .boxcard .lead { font-family: var(--serif); font-size: 16.5px; line-height: 1.5; }
.area p + p, .detail .area p + p, .para p + p { margin-top: 6px; }
.detail .area p { margin: 0; }
.para p { margin: 0; font-size: 15px; }
.note p, .why p { margin: 0; }
.note p + p, .why p + p { margin-top: 4px; }
.records .note { margin-top: 8px; background: var(--ivory-2); border-radius: 16px; padding: 14px 16px; font-size: 14px; }
.records .note .btn { margin-top: 12px; height: 42px; font-size: 14px; }

/* 낱말 중간에서 줄이 끊기지 않게 (예: "날이 / 에요") — 띄어쓰기 자리에서만 줄을 바꾼다 */
body { word-break: keep-all; overflow-wrap: break-word; }

/* v3 큰 틀 (2026-10-08 밤): 맨 위 오른쪽 내 기록 · 운세/타로 전환 · 띠 고르기 · 홈 여섯 입구 · 준비 중 화면 */
.rec { margin-left: auto; font-size: 12.5px; color: var(--ink-soft); text-decoration: none; border: 1px solid var(--ivory-2); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.rec::before { content: "○ "; color: var(--gold); }
.sound-toggle { margin-left: 6px; }
body.night-mode .rec { color: var(--cream); border-color: rgba(245,239,230,.35); position: relative; z-index: 6; }
.nav a { font-size: 10.5px; }
.kind { display: flex; justify-content: center; gap: 6px; padding: 8px 20px 6px; }
.kind a { text-decoration: none; font-size: 14px; color: var(--ink-soft); padding: 7px 18px; border-radius: 999px; border: 1px solid var(--ivory-2); background: #fff; white-space: nowrap; }
.kind a.on { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.kind a small { font-size: 11px; opacity: .7; }
.entry .kind { padding: 0 0 14px; }
.year-row { display: flex; flex-direction: column; gap: 4px; padding: 0 20px 10px; font-size: 13px; color: var(--ink); }
.year-row select { font: inherit; font-size: 14px; color: var(--ink); background: #fff; border: 1px solid var(--ivory-2); border-radius: 10px; padding: 6px 10px; margin-left: 6px; }
.compat .rel-name { text-align: center; color: var(--gold); font-family: var(--serif); font-size: 15px; margin: 0 0 6px; }
.compat .traits { margin-top: 6px; font-size: 13.5px; color: var(--ink-soft); }
.compat .traits p { margin: 0 0 6px; }
.compat .traits strong { color: var(--ink); font-weight: 600; margin-right: 4px; }
.six h2 { margin-bottom: 4px; }
.six-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.six-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--ivory-2); border-radius: 18px; padding: 14px 6px 12px; text-decoration: none; color: inherit; text-align: center; transition: transform .6s var(--ease); }
.six-grid a:hover { transform: translateY(-4px); }
.six-grid .pic { width: 56px; height: 72px; display: flex; align-items: center; justify-content: center; }
.six-grid .pic img { max-width: 100%; max-height: 100%; }
.six-grid .pic img.card { width: 44px; border-radius: 5px; box-shadow: 0 4px 10px rgba(59,50,80,.14); outline: 1px solid rgba(200,168,120,.55); outline-offset: -1px; }
.six-grid span { font-family: var(--serif); font-size: 15px; }
.six-grid small { font-size: 11px; color: var(--ink-soft); white-space: nowrap; }
.six-grid a.soon { opacity: .6; }
.pick-ddi { display: block; margin-top: 10px; background: var(--ivory-2); border-radius: 16px; padding: 14px 16px; font-size: 14px; color: var(--ink); text-decoration: none; }
.sign-today + .sign-today, .sign-row.home + .pick-ddi { margin-top: 10px; }
.learn { flex-wrap: wrap; }
.learn .learn-box { flex: 1 1 45%; }
.soon-page { text-align: center; padding: 60px 24px; }
.soon-page::before { content: ""; display: block; width: 64px; height: 64px; margin: 0 auto 12px; background: url("../images/ornaments/moon.png") center / contain no-repeat; }
.soon-page h1 { font-size: 22px; margin-bottom: 8px; }
.soon-page .btn { margin-top: 20px; }

/* 꿈해몽 (설계안 v3 §5) */
.dream { padding: 0 0 40px; }
.dream-hero { margin-top: -56px; padding: 96px 20px 34px; background: url("../images/ui/dream-sky.webp") center 30% / cover no-repeat; text-align: center; }
.dream-hero h1 { font-size: 28px; }
.dream-hero p { margin: 6px 0 0; font-family: var(--serif); font-size: 17px; }
.dream-body { padding: 14px 20px 0; }
.dream-body > section { margin-top: 30px; }
.dream-body h2 { margin-bottom: 10px; }
.dream-search { background: #fff; border: 1px solid var(--ivory-2); border-radius: 20px; padding: 14px; box-shadow: 0 6px 20px rgba(59,50,80,.06); }
.dream-search textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--ivory-2); border-radius: 14px; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--ink); background: var(--ivory); resize: none; }
.dream-search .btn { margin-top: 10px; }
.dream-search p { margin: 10px 0 0; line-height: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--ivory-2); border-radius: 999px; padding: 8px 14px; font-size: 14px; }
.drow { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--ivory-2); border-radius: 16px; padding: 13px 16px; margin-bottom: 8px; transition: transform .6s var(--ease); }
.drow:hover { transform: translateY(-3px); }
.drow .t { font-family: var(--serif); font-size: 16px; margin-right: 8px; }
.drow .s { display: block; font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; line-height: 1.55; }
.kind-badge { display: inline-block; font-size: 11.5px; padding: 2px 9px; border-radius: 999px; vertical-align: 2px; background: var(--ivory-2); color: var(--ink); }
.kind-badge.good { background: #F3E7D3; color: #8A6A35; }
.kind-badge.care { background: #E3E7F0; color: #4A5578; }
.cat-head { display: flex; gap: 14px; align-items: center; margin: 4px 0 16px; }
.cat-head img { width: 72px; border-radius: 8px; box-shadow: 0 4px 12px rgba(59,50,80,.12); }
.cat-head h1 { font-size: 22px; }
.dream-item { margin-top: 6px; }
.dream-item h1 { font-size: 26px; margin: 4px 0 8px; }
.dream-item h2 { font-size: 21px; margin: 26px 0 6px; }
.dream-item .lead { font-family: var(--serif); font-size: 18px; line-height: 1.55; margin: 12px 0 14px; }
.dream-item p { margin: 0; line-height: 1.75; }
.dream-item p + p { margin-top: 10px; }
.dream-item .case { background: #fff; border: 1px solid var(--ivory-2); border-radius: 16px; padding: 14px 16px; margin-top: 10px; }
.dream-item .case h3 { font-size: 16px; margin-bottom: 6px; }
.dream-item .case p { font-size: 14.5px; }
.tipbox { margin-top: 18px; background: var(--ivory-2); border-radius: 16px; padding: 14px 16px; }
.tipbox h2 { font-size: 17px !important; margin: 0 0 6px !important; }
.tipbox strong { display: block; font-weight: 600; margin-bottom: 4px; }
.tipbox p { font-size: 14px; color: var(--ink-soft); }
.cases-mini { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cases-mini span { font-size: 12.5px; background: var(--ivory-2); border-radius: 999px; padding: 4px 10px; }
.dream-item .more { display: inline-block; margin-top: 10px; color: var(--ink); font-size: 14px; }
.found { text-align: center; margin: 10px 0 6px; }
.found .words { font-family: var(--serif); font-size: 22px; margin-top: 4px; }
.dream .actions { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.dream .actions a { text-decoration: none; }
.dream .back { display: inline-block; text-decoration: none; margin-bottom: 6px; }
.dream .empty { text-align: center; padding: 20px 0 16px; }
.static.dream-item { padding: 10px 20px 60px; }
.static .actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.static .actions a { text-decoration: none; }

/* 심리테스트 (설계안 v3 §6) */
.tests { padding: 8px 20px 48px; }
.tests h1 { margin: 6px 0 4px; }
.test-list { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.test-card { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--ivory-2); border-radius: 20px; padding: 12px; text-decoration: none; color: inherit; transition: transform .6s var(--ease); }
.test-card:hover { transform: translateY(-4px); }
.test-card img { width: 76px; flex: 0 0 76px; }
.test-card strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 17px; }
.test-card span { display: block; margin-top: 3px; }
.test-card em { display: block; font-style: normal; font-size: 12px; color: var(--gold); margin-top: 4px; }
.tests .big { width: 200px; margin: 14px auto 18px; }
.tests.cover, .tests.result-t { text-align: left; }
.tests.cover h1, .tests.cover .lead { text-align: center; }
.tests .lead { font-family: var(--serif); font-size: 18px; line-height: 1.55; margin: 6px 0 12px; }
.tests.cover p { margin: 0 0 6px; }
.tests.cover .muted.small { text-align: center; margin: 14px 0 18px; }
.progress { height: 6px; background: var(--ivory-2); border-radius: 999px; overflow: hidden; margin: 10px 0 8px; }
.progress span { display: block; height: 100%; background: var(--gold); transition: width .6s var(--ease); }
.tests.ask h2 { margin: 10px 0 4px; line-height: 1.5; }
.back-q { display: block; margin: 20px auto 0; background: none; border: 0; font-size: 14px; }
.tests .oneliner { font-family: var(--serif); font-size: 24px; line-height: 1.45; text-align: center; margin: 18px 0 6px; }
.tests h1.center { text-align: center; font-size: 22px; }
.tests section.plain { margin-top: 28px; }
.tests section.plain h2 { margin-bottom: 8px; }
.tests section.plain p { margin: 0; }
.tests section.plain p + p { margin-top: 10px; }
.tests .match { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--ivory-2); border-radius: 16px; padding: 10px 14px; }
.tests .match img.mini { width: 48px; border-radius: 5px; }
.tests .todo { display: flex; background: #fff; border: 1px solid var(--ivory-2); border-radius: 16px; padding: 16px; }
.tests .todo span { display: flex; flex-direction: column; gap: 4px; }
.tests .todo strong { font-weight: 600; }
.tests .todo small { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }
.tests .share { display: flex; gap: 8px; margin-top: 30px; }
.tests .share .btn { flex: 1; padding: 0; height: 46px; font-size: 14px; }
.tests .actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.tests .actions a, .tests .back { text-decoration: none; }
img.noimg { object-fit: contain; background: var(--ivory-2); padding: 20%; box-sizing: border-box; aspect-ratio: 480 / 780; }

/* 화투점 (설계안 v3 §7) */
.months { margin-top: 34px; }
.months h2 { margin-bottom: 10px; }
.month-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.month-list div { background: #fff; border: 1px solid var(--ivory-2); border-radius: 14px; padding: 10px 12px; font-size: 14px; }
.month-list b { font-family: var(--serif); font-weight: 500; margin-right: 4px; }
.month-list span { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.three-hw .btn { text-decoration: none; }

/* 세 장이 휴대폰 좌우로 잘리지 않게 (2026-10-09 미르): 카드 너비를 화면 폭에 맞춰 줄인다 */
.flip-row { gap: 12px; }
.flip-card { width: min(120px, calc((100vw - 64px) / 3)); }
.flip-card .inner { width: 100%; height: auto; aspect-ratio: 480 / 780; }
.result .three { gap: 12px; }
.result .three figure { width: min(120px, calc((100vw - 64px) / 3)); }
.slots { gap: 14px; }
.slot { width: min(96px, calc((100vw - 68px) / 3)); }
.slot .ph { width: 100%; height: auto; aspect-ratio: 96 / 156; }
.fly { width: min(96px, calc((100vw - 68px) / 3)); }

/* 홈 "타로 한 장으로 보는 오늘" 제목과 별 장식이 겹치지 않게 (2026-10-09 미르): 별을 카드 옆으로 내린다 */
.home .daily::before { top: 86px; transform: translateX(-150px); }
.home .daily::after { top: 300px; }

/* 화투점 진행 (2026-10-09: 타로와 다르게 — 패 치기 → 패 돌리기 → 뒤집기) */
.screen.table.hwatu-table { position: relative; background: radial-gradient(ellipse at 50% 30%, #DDE4D0 0%, #CBD6BA 60%, #B9C6A7 100%); }
.screen.table.hwatu-table::before { content: ""; position: absolute; inset: 0; background: url("../images/ui/table-cloth.webp") center / cover; opacity: .22; mix-blend-mode: multiply; pointer-events: none; }
.screen.table.hwatu-table > * { position: relative; }
.htap { min-height: calc(100dvh - 56px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 20px; }
.htap .guide, .hdeal .guide { font-family: var(--serif); font-size: 18px; text-align: center; }
.hdeck { position: relative; width: 150px; height: 250px; cursor: pointer; touch-action: manipulation; }
.hdeck img { position: absolute; left: 0; top: 0; width: 150px; border-radius: 7px; box-shadow: 0 6px 16px rgba(40,50,30,.25); }
.hdeck.jolt { animation: jolt .28s var(--ease); }
@keyframes jolt { 0% { transform: translateY(0); } 35% { transform: translateY(-10px) rotate(-1.5deg); } 100% { transform: translateY(0); } }
.hcount { font-size: 16px; color: var(--ink); letter-spacing: 6px; }
.hdeal { padding: 20px 16px 40px; min-height: calc(100dvh - 56px); }
.hdeal .counter { text-align: center; font-family: var(--en); font-size: 18px; color: var(--ink-soft); margin: 4px 0 12px; }
.hgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 8px; max-width: 360px; margin: 0 auto; }
.hcell { position: relative; background: none; border: 0; padding: 0; transform: translate(0, -60vh) rotate(8deg); opacity: 0; transition: transform .7s var(--ease), opacity .4s; }
.hgrid.dealt .hcell { transform: none; opacity: 1; }
.hcell img { width: 100%; border-radius: 6px; box-shadow: 0 4px 12px rgba(40,50,30,.22); outline: 1.5px solid rgba(200,168,120,.6); outline-offset: -1.5px; transition: transform .5s var(--ease), box-shadow .5s, outline-color .3s; }
.hgrid.dealt .hcell.picked img { transform: translateY(-8px) scale(1.06); box-shadow: 0 10px 22px rgba(40,50,30,.3); outline: 3px solid var(--gold); }
.hcell .lbl { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); background: var(--ink); color: var(--cream); font-size: 11px; padding: 2px 9px; border-radius: 999px; white-space: nowrap; opacity: 0; transition: opacity .4s; }
.hcell.picked .lbl { opacity: 1; }
.hgrid.dealt .hcell.gone { opacity: .12; transform: scale(.9); transition: opacity .6s, transform .6s; }

/* 맨 위 줄이 좁은 휴대폰에서 두 줄로 밀리지 않게 (2026-10-09): 진행 중(그만두기가 보일 때)엔 내 기록을 숨긴다 */
.top .logo, .sound-toggle, .rec { white-space: nowrap; }
.top .quit:not([hidden]) ~ .rec { display: none; }
.top .quit { white-space: nowrap; }

/* 아래 메뉴: 일곱 칸을 좌우로 밀어서 보고, 휴대폰 아래 제스처 막대에 가려지지 않게 (2026-10-09 미르) */
.nav { height: auto; min-height: 64px; padding-bottom: env(safe-area-inset-bottom, 0px); justify-content: flex-start; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: 1 0 auto; min-width: 66px; height: 64px; padding: 0 6px; white-space: nowrap; }
.nav.more { mask-image: linear-gradient(90deg, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); }
.app.has-nav { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }

.entry .foot { margin-top: 30px; font-size: 12.5px; color: var(--ink-soft); text-align: center; }
.entry .foot a { color: var(--ink); }

/* 아래 메뉴 아이콘: 같은 굵기의 선 그림 (2026-10-09 미르) */
.nav a .ico { width: 24px; height: 24px; display: block; font-size: 0; line-height: 0; color: var(--gold); }
.nav a .ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.nav a.on .ico { color: var(--ink); }
.nav a.on .ico svg { stroke-width: 1.9; }
.nav a { gap: 4px; font-size: 11px; }

/* 2026-10-13 홈 — 파트마다 금색 가는 선 + 작은 별로 나누고 간격을 넉넉하게 (미르 요청) */
.home .sep { position: relative; height: 14px; margin: 44px 0; background: url("../images/ornaments/star4-small.png") center / 14px no-repeat; opacity: .9; }
.home .sep::before, .home .sep::after { content: ""; position: absolute; top: 50%; width: calc(50% - 24px); height: 1px; }
.home .sep::before { left: 0; background: linear-gradient(90deg, rgba(200,168,120,0), rgba(200,168,120,.6)); }
.home .sep::after { right: 0; background: linear-gradient(90deg, rgba(200,168,120,.6), rgba(200,168,120,0)); }
.home .sep + section, .home .sep + .compat-entry, .home .sep + .learn { margin-top: 0; }
.home .daily { margin: 0 auto; }


/* 2026-10-14 로고 그림 (미르 선택 1번) */
.logo { line-height: 0; }
.logo img { display: block; height: 48px; width: auto; }
/* 밤 화면(어두운 바탕)에서는 빛나는 원래 로고로 (10-14 미르: 밝은 바탕은 진한 금색 A) */
body.night-mode .logo img { content: url("../images/logo/logo-96.webp"); }
@media (min-resolution: 2.5dppx) { body.night-mode .logo img { content: url("../images/logo/logo-144.webp"); } }

/* 2026-10-14 홈 — '이렇게 보면 좋아요' 자리의 좌우로 넘기는 안내 다섯 장 (미르 승인 샘플) */
.home .guide h2 { margin-bottom: 4px; }
.home .guide .sub { margin: 0 0 14px; }
.g-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 0 20px 4px; scrollbar-width: none; scroll-padding: 0 20px; }
.g-track::-webkit-scrollbar { display: none; }
.g-slide { flex: 0 0 100%; scroll-snap-align: start; position: relative; display: flex; gap: 14px; align-items: center; min-height: 196px; border-radius: 22px; padding: 22px 18px 20px 20px; text-decoration: none; color: inherit; overflow: hidden; }
.g-slide.s1 { background: linear-gradient(135deg, #EDE6F2, #D9CDDF); }
.g-slide.s2 { background: linear-gradient(135deg, #F7E7DC, #F0D0BA); }
.g-slide.s3 { background: linear-gradient(135deg, #ECEBE2, #DCD8C6); }
.g-slide.s4 { background: linear-gradient(135deg, #E6E8F0, #CBCEDB); }
.g-slide.s5 { background: linear-gradient(135deg, #F7E6E6, #EFC9C9); }
.g-slide::after { content: ""; position: absolute; right: 14px; top: 12px; width: 18px; height: 18px; background: url("../images/ornaments/star4-small.png") center / contain no-repeat; opacity: .8; }
.g-text { flex: 1; min-width: 0; }
.g-when { display: inline-block; font-size: 11.5px; letter-spacing: .02em; color: #8A6A3E; background: rgba(255,255,255,.6); border-radius: 999px; padding: 3px 10px; margin-bottom: 10px; }
.g-title { font-family: var(--serif); font-size: 19px; line-height: 1.4; margin: 0 0 6px; word-break: keep-all; }
.g-desc { font-size: 13px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 14px; word-break: keep-all; }
.g-go { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink); background: #fff; border-radius: 999px; padding: 7px 14px; box-shadow: 0 2px 8px rgba(59,50,80,.08); }
.g-pic { flex: 0 0 86px; position: relative; height: 140px; }
.g-pic img { position: absolute; width: 74px; border-radius: 6px; box-shadow: 0 6px 14px rgba(59,50,80,.18); outline: 1px solid rgba(200,168,120,.55); outline-offset: -1px; }
.g-pic img:first-child { left: 0; top: 4px; transform: rotate(-6deg); }
.g-pic img + img { left: 16px; top: 14px; transform: rotate(5deg); }
.g-pic.one img { left: 6px; top: 8px; transform: rotate(-3deg); }
.g-dots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.g-dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 3px; background: #E2D6CB; transition: width .6s var(--ease), background .6s var(--ease); }
.g-dots button.on { width: 20px; background: #B8935F; }
.home .guide .tip { text-align: center; margin: 14px 0 0; font-size: 12.5px; }

/* 2026-10-14 맨 위 줄(로고 · 내 기록 · 소리)을 조금 아래로 — 위쪽 여백 12px, 줄 높이 56 → 72 (미르 요청)
   맨 위 줄 높이에 맞춰 두던 값들도 함께 옮긴다 */
:root { --top-h: 72px; }
.top { height: var(--top-h); padding: 12px 20px 0; }
.stage, .screen.table, .shuffle, .cut, .spread, .flipstage, .htap, .hdeal, .screen.night { min-height: calc(100dvh - var(--top-h)); }
.hero { margin-top: calc(-1 * var(--top-h)); padding-top: var(--top-h); height: 276px; }
.screen.night { margin-top: calc(-1 * var(--top-h)); padding-top: 106px; }
.dream-hero { margin-top: calc(-1 * var(--top-h)); padding-top: 112px; }
