/* ═══════════ Otaro Tarot — base ═══════════ */
:root {
  --bg: #0F0E17;
  --panel: #16151F;
  --panel-2: #191826;
  --ink: #F5F5F5;
  --ink-soft: #C4C4C4;
  --ink-dim: #6B6880;
  --gold: #D4AF37;
  --gold-bright: #E2C255;
  --gold-deep: #C9A32E;
  --violet: #A78BFA;
  --line: rgba(245, 245, 245, 0.1);
  --line-soft: rgba(245, 245, 245, 0.14);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); }
html { -webkit-text-size-adjust: 100%; }
button, .spread-card, .fan-card { -webkit-touch-callout: none; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: 'Outfit', 'Noto Sans KR', sans-serif;
  font-weight: 300;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}
header.site { flex: none; }
main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
main > section { width: 100%; }
button { font-family: inherit; }
button:focus, textarea:focus, input:focus { outline: none; }
textarea::placeholder, input::placeholder { color: var(--ink-dim); }
.serif { font-family: 'Marcellus', 'Noto Serif KR', serif; }

/* ambient glows */
.ambient {
  position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 50% -5%, rgba(167,139,250,0.09), transparent 65%),
    radial-gradient(ellipse 45% 35% at 85% 95%, rgba(212,175,55,0.05), transparent 65%);
}

/* ═══════════ keyframes ═══════════ */
@keyframes twinkle { 0%, 100% { opacity: .12; } 50% { opacity: .75; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes flipIn { 0% { opacity: 0; transform: perspective(1200px) rotateY(-94deg); } 55% { opacity: 1; } 100% { opacity: 1; transform: perspective(1200px) rotateY(0deg); } }
@keyframes fanRise { from { opacity: 0; transform: translateY(80px); } to { opacity: 1; transform: none; } }
@keyframes shuffleCard { 0% { transform: translateY(0) rotate(0deg); } 30% { transform: translateY(-52px) rotate(-8deg); } 65% { transform: translateY(10px) rotate(6deg); } 100% { transform: translateY(0) rotate(0deg); } }
@keyframes slotPop { from { opacity: 0; transform: scale(.55) translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { opacity: .45; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes ballFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: scale(.94) translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ballGlow {
  0%, 100% { box-shadow: 0 0 46px rgba(167,139,250,0.22), inset 0 0 34px rgba(167,139,250,0.14); }
  50% { box-shadow: 0 0 70px rgba(167,139,250,0.4), 0 0 30px rgba(212,175,55,0.12), inset 0 0 44px rgba(167,139,250,0.24); }
}

.fade-up { animation: fadeUp .7s ease both; }

/* ═══════════ header ═══════════ */
header.site {
  position: relative; z-index: 6;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(16px, 5vw, 56px);
  padding-top: max(20px, env(safe-area-inset-top));
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; background: none; border: none; padding: 0; }
.brand .star { color: var(--gold); font-size: 15px; }
.brand .word { font-family: 'Marcellus', serif; font-size: 18px; letter-spacing: .24em; color: var(--ink); }
.header-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.btn-ghost {
  background: none; border: 1px solid var(--line-soft); color: var(--ink-soft);
  font-size: 12.5px; font-weight: 400; letter-spacing: .03em;
  padding: 8px 16px; border-radius: 999px; cursor: pointer; transition: all .25s ease;
}
.btn-ghost:hover { border-color: rgba(212,175,55,0.5); color: var(--ink); }

.lang-toggle { display: flex; align-items: center; border: 1px solid var(--line-soft); border-radius: 999px; padding: 3px; gap: 2px; }
.lang-toggle button {
  background: transparent; color: var(--ink-dim); border: none;
  font-size: 12px; font-weight: 500; letter-spacing: .04em;
  padding: 6px 13px; border-radius: 999px; cursor: pointer; transition: all .25s ease;
}
.lang-toggle button.active { background: rgba(212,175,55,0.16); color: var(--gold-bright); }

.btn-text { background: none; border: none; color: var(--ink-soft); font-size: 13px; font-weight: 400; letter-spacing: .02em; padding: 8px 10px; cursor: pointer; transition: color .25s ease; }
.btn-text:hover { color: var(--ink); }

.btn-gold {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep)); color: #17130A; border: none;
  font-size: 12.5px; font-weight: 500; letter-spacing: .02em;
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
  box-shadow: 0 2px 16px rgba(212,175,55,0.2); transition: all .25s ease;
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 4px 24px rgba(212,175,55,0.35); }
.btn-gold:active { transform: scale(.99); }

.avatar-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(212,175,55,0.5);
  background: rgba(212,175,55,0.1); color: var(--gold-bright);
  font-size: 14px; font-weight: 500; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all .25s ease;
}
.avatar-btn:hover { background: rgba(212,175,55,0.2); box-shadow: 0 0 16px rgba(212,175,55,0.2); }

.user-wrap { position: relative; }
.user-menu {
  position: absolute; right: 0; top: 46px; width: 220px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.55); padding: 6px; z-index: 20;
  animation: fadeUp .25s ease both;
}
.user-menu .who { padding: 12px 14px 10px; border-bottom: 1px solid rgba(245,245,245,0.07); }
.user-menu .who .n { font-size: 13.5px; color: var(--ink); font-weight: 400; }
.user-menu .who .e { font-size: 12px; color: var(--ink-dim); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
.user-menu button.item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: none; border: none; color: var(--ink-soft);
  font-size: 13px; font-weight: 400; text-align: left; padding: 11px 14px;
  border-radius: 9px; cursor: pointer; transition: background .2s ease;
}
.user-menu button.item:hover { background: rgba(245,245,245,0.05); color: var(--ink); }
.user-menu .glyph-v { color: var(--violet); font-size: 12px; }
.user-menu .glyph-d { color: var(--ink-dim); font-size: 12px; }

/* ═══════════ auth modal ═══════════ */
.modal-scrim {
  position: fixed; inset: 0; z-index: 50; background: rgba(10,9,16,0.72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: modalFade .25s ease both;
}
.auth-card {
  width: min(100%, 400px); background: var(--panel); border: 1px solid var(--line);
  border-radius: 22px; padding: clamp(26px, 5vw, 36px); position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 60px rgba(167,139,250,0.06);
  animation: modalIn .35s cubic-bezier(.22,1,.36,1) both;
  max-height: calc(100vh - 40px); overflow-y: auto;
}
.auth-card .close {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 50%;
  background: none; border: none; color: var(--ink-dim); font-size: 17px; cursor: pointer; transition: color .2s ease;
}
.auth-card .close:hover { color: var(--ink); }
.auth-head { text-align: center; margin-bottom: 24px; }
.auth-head .star { color: var(--gold); font-size: 18px; }
.auth-head h3 { font-family: 'Marcellus', 'Noto Serif KR', serif; font-size: 22px; font-weight: 400; color: var(--ink); margin: 12px 0 8px; }
.auth-head p { font-size: 13px; line-height: 1.6; color: var(--ink-dim); margin: 0; text-wrap: pretty; }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form input {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink); font-family: 'Outfit', 'Noto Sans KR', sans-serif; font-weight: 300;
  font-size: 14.5px; padding: 14px 16px; transition: border-color .25s ease;
}
.auth-form input:focus { border-color: rgba(167,139,250,0.55); }
.auth-form input.error { border-color: rgba(232,160,160,0.55); }
.auth-error { font-size: 12.5px; color: #E8A0A0; padding: 0 2px; }
.auth-submit {
  width: 100%; background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep)); color: #17130A; border: none;
  font-size: 14.5px; font-weight: 500; letter-spacing: .03em; padding: 14px; border-radius: 12px;
  cursor: pointer; margin-top: 4px; box-shadow: 0 4px 24px rgba(212,175,55,0.2); transition: all .25s ease;
}
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 32px rgba(212,175,55,0.35); }
.auth-submit:active { transform: scale(.99); }
.auth-submit:disabled { opacity: .6; cursor: default; transform: none; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.auth-or .rule { flex: 1; height: 1px; background: rgba(245,245,245,0.08); }
.auth-or span { font-size: 11.5px; color: var(--ink-dim); }
.auth-google {
  width: 100%; background: none; border: 1px solid var(--line-soft); color: var(--ink);
  font-size: 14px; font-weight: 400; padding: 13px; border-radius: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px; transition: all .25s ease;
}
.auth-google:hover { border-color: rgba(245,245,245,0.3); background: rgba(245,245,245,0.03); }
.auth-google .g { font-family: 'Marcellus', serif; font-size: 15px; color: var(--violet); }
.auth-switch { width: 100%; background: none; border: none; color: var(--ink-dim); font-size: 13px; font-weight: 400; margin-top: 18px; cursor: pointer; transition: color .2s ease; }
.auth-switch:hover { color: var(--ink-soft); }

/* social login buttons */
.social-btns { display: flex; flex-direction: column; gap: 10px; }
.social-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 14.5px; font-weight: 500; padding: 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid transparent; transition: all .2s ease;
}
.social-btn:hover { transform: translateY(-1px); }
.social-btn .ic { font-weight: 700; }
.social-btn.kakao { background: #FEE500; color: #191600; }
.social-btn.google { background: #fff; color: #1f1f1f; }
.social-btn.google .ic.g { font-family: 'Marcellus', serif; color: #4285F4; }
.auth-error.center { text-align: center; margin-top: 14px; }
.auth-legal { font-size: 11.5px; line-height: 1.5; color: var(--ink-dim); text-align: center; margin: 18px 0 0; text-wrap: pretty; }

/* ═══════════ hero ═══════════ */
main { position: relative; z-index: 2; }
.hero {
  flex: 1 1 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 4px 16px 56px;
  position: relative;
}
.star-dot { position: absolute; border-radius: 50%; pointer-events: none; }

/* hero layout: side panels absolute at edges (desktop) → stacked below (mobile) */
.hero-center { order: 1; display: flex; flex-direction: column; align-items: center; width: 100%; }
.hero-aside {
  order: 2; width: 100%; max-width: 470px; margin-top: 4px; text-align: left; padding: 20px 22px;
  border: 1px solid rgba(212,175,55,0.16); border-radius: 18px;
  background: linear-gradient(180deg, rgba(212,175,55,0.04), rgba(167,139,250,0.03));
  animation: fadeUp .9s ease .25s both;
}
.aside-heading {
  font-family: 'Marcellus', 'Noto Serif KR', serif; color: var(--gold-bright);
  font-size: 19px; letter-spacing: .04em; line-height: 1.35; margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 1px solid rgba(212,175,55,0.25);
  text-wrap: balance;
}
.hero-aside .aside-orn { color: var(--gold); font-size: 14px; }
.hero-aside h3 { font-family: 'Marcellus', 'Noto Serif KR', serif; font-size: 17px; font-weight: 400; color: var(--gold-bright); margin: 10px 0 10px; letter-spacing: .02em; }
.hero-aside p { font-size: 13.5px; line-height: 1.75; color: var(--ink-soft); margin: 0; text-wrap: pretty; }
.hero-aside.right { border-color: rgba(167,139,250,0.18); }
.hero-aside.right h3 { color: var(--violet); }
@media (min-width: 1180px) {
  .hero-aside {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: clamp(210px, 19vw, 260px); max-width: none; margin: 0; z-index: 4;
  }
  .hero-aside.left { left: clamp(20px, 3vw, 52px); }
  .hero-aside.right { right: clamp(20px, 3vw, 52px); }
}
.hero-copy .eyebrow { font-size: 11.5px; letter-spacing: .3em; color: var(--violet); text-transform: uppercase; font-weight: 400; margin-bottom: 16px; }
.hero-copy h1 { font-family: 'Marcellus', 'Noto Serif KR', serif; font-size: clamp(28px, 4.6vw, 44px); font-weight: 400; line-height: 1.22; margin: 0 0 14px; text-wrap: balance; }
.hero-copy p { font-size: clamp(14px, 1.8vw, 16px); line-height: 1.7; color: var(--ink-soft); max-width: 470px; margin: 0 auto; text-wrap: pretty; }

.penta-wrap { position: relative; width: min(94vw, 620px); aspect-ratio: 1 / 1; margin-top: 0px; animation: fadeUp .9s ease .15s both; }
.penta-ring { position: absolute; inset: 13%; border: 1px dashed rgba(167,139,250,0.16); border-radius: 50%; animation: spinSlow 70s linear infinite; pointer-events: none; }

/* 그림자(하단)가 앵커 높이에 포함돼 구슬이 위로 치우치므로 +12px 보정 → 구슬이 배치 정중앙 */
.ball-anchor { position: absolute; left: 50%; top: calc(50% + 12px); transform: translate(-50%, -50%); pointer-events: none; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.ball-float { animation: ballFloat 5s ease-in-out infinite; }
.crystal-ball {
  width: clamp(96px, 22vw, 138px); height: clamp(96px, 22vw, 138px); border-radius: 50%;
  position: relative; overflow: hidden; border: 1px solid rgba(167,139,250,0.35);
  background: radial-gradient(circle at 32% 26%, rgba(245,245,245,0.32), rgba(167,139,250,0.16) 36%, rgba(30,27,46,0.95) 78%);
  animation: ballGlow 4.5s ease-in-out infinite;
}
.crystal-ball .swirl-a { position: absolute; inset: -45%; background: conic-gradient(from 0deg, transparent, rgba(212,175,55,0.16) 12%, transparent 30%, rgba(167,139,250,0.22) 48%, transparent 62%, rgba(212,175,55,0.1) 80%, transparent); animation: spinSlow 9s linear infinite; }
.crystal-ball .swirl-b { position: absolute; inset: -45%; background: conic-gradient(from 140deg, transparent, rgba(167,139,250,0.18) 20%, transparent 44%, rgba(245,245,245,0.08) 60%, transparent 75%); animation: spinSlow 15s linear infinite reverse; }
.crystal-ball .core {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  color: rgba(212,175,55,0.9); animation: breathe 3.2s ease-in-out infinite;
}
.crystal-ball .core-star { font-size: 20px; line-height: 1; }
.crystal-ball .core-word {
  font-family: 'Marcellus', 'Noto Serif KR', serif;
  font-size: clamp(13px, 2.6vw, 17px); letter-spacing: .3em; margin-right: -.3em;
  color: #EBDDB0; text-shadow: 0 0 14px rgba(212,175,55,0.5);
}
.ball-shadow { width: clamp(54px, 12vw, 74px); height: 12px; border-radius: 50%; background: radial-gradient(ellipse at 50% 50%, rgba(212,175,55,0.3), transparent 70%); margin-top: 6px; }

.hero-greeting {
  margin-top: 16px; font-family: 'Marcellus', 'Noto Serif KR', serif;
  font-size: clamp(13px, 1.7vw, 15.5px); color: var(--gold-bright);
  max-width: 460px; margin-left: auto; margin-right: auto; line-height: 1.6;
  text-wrap: pretty; opacity: .92;
}

.spread-node { position: absolute; transform: translate(-50%, -50%); width: clamp(84px, 21%, 128px); z-index: 3; }
.spread-node:hover, .spread-node:has(.is-flipped) { z-index: 8; }
.spread-node .inner { animation: fadeUp .6s ease both; display: flex; flex-direction: column; align-items: center; }

/* flip card — real tarot proportions (5:8 portrait) */
.spread-card {
  width: 100%; aspect-ratio: 5 / 8;
  background: none; border: none; padding: 0; cursor: pointer; color: inherit;
  perspective: 1000px;
  transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.spread-card:hover { transform: translateY(-6px); }
/* 뒤집히는 동안 은은한 골드 글로우 — 고급스러운 리프트 연출 */
.spread-card, .spread-card:hover, .spread-card.is-flipped { transition: transform .3s cubic-bezier(.22,1,.36,1), filter .5s ease; }
.spread-card:hover, .spread-card.is-flipped {
  filter: drop-shadow(0 16px 28px rgba(0,0,0,0.45)) drop-shadow(0 0 16px rgba(212,175,55,0.22));
}
.spread-card .flip {
  position: relative; display: block; width: 100%; height: 100%;
  transform-style: preserve-3d; will-change: transform;
  transition: transform .7s cubic-bezier(.35,.1,.22,1);
}
.spread-card:hover .flip, .spread-card.is-flipped .flip { transform: rotateY(180deg); }
/* 터치 기기: 탭해서 뒤집힌 카드는 확대해 안에 새긴 설명이 잘 보이게 */
@media (hover: none) {
  /* 확대는 1.55배로 낮추고 폰트를 카드에 맞춰 실효 글자 크기 ~11px로 (가독성) */
  .spread-card.is-flipped { transform: scale(1.55); z-index: 12; }
  .spread-card.is-flipped .tcard { gap: 5px; padding: 10px 7px; }
  .spread-card.is-flipped .tcard .tc-emblem { width: 20px; height: 20px; font-size: 12px; }
  .spread-card.is-flipped .tcard .tc-rule { width: 40%; }
  .spread-card.is-flipped .tcard .tc-desc { font-size: 7px; line-height: 1.45; letter-spacing: -0.01em; }
}
.spread-card .face {
  position: absolute; inset: 0; border-radius: 11px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 12px 9px; overflow: hidden;
  border: 1px solid rgba(245,245,245,0.09);
}
.spread-card:hover .face.front { box-shadow: 0 14px 40px rgba(0,0,0,0.5), 0 0 30px rgba(212,175,55,0.16); }

/* FRONT = pack-styled card back with emblem + spread name */
.spread-card .face.front .cb-corner { position: absolute; color: rgba(212,175,55,0.5); font-size: 10px; }
.spread-card .face.front .cb-corner.tl { top: 8px; left: 9px; }
.spread-card .face.front .cb-corner.br { bottom: 8px; right: 9px; }
.spread-card .face.front .cb-emblem { font-size: clamp(24px, 5.5vw, 34px); color: var(--gold); opacity: .92; margin-bottom: 12px; text-shadow: 0 0 18px rgba(212,175,55,0.3); }
.spread-card .face.front .name { font-family: 'Marcellus', 'Noto Serif KR', serif; font-size: clamp(12px, 1.6vw, 15px); color: var(--ink); line-height: 1.3; margin-bottom: 5px; }
.spread-card .face.front .count { font-size: 10.5px; color: var(--violet); letter-spacing: .08em; }

/* BACK = cream tarot card face with the description engraved inside */
.spread-card .face.back { transform: rotateY(180deg); padding: 7px; }
.spread-card .tcard {
  width: 100%; height: 100%; border-radius: 8px;
  background: linear-gradient(170deg, #F8F3E6, #EFE7D2);
  border: 1px solid rgba(212,175,55,0.55);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.45);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 7px; padding: 12px 9px;
}
.spread-card .tcard .tc-emblem {
  flex: none;
  width: clamp(30px, 7vw, 40px); height: clamp(30px, 7vw, 40px);
  border: 1px solid rgba(138,116,48,0.4); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(16px, 3.6vw, 21px); color: #2B2416;
}
.spread-card .tcard .tc-rule { flex: none; width: 46%; height: 1px; background: rgba(138,116,48,0.3); }
/* 카드 안에 새겨진 설명 (음각 느낌) */
.spread-card .tcard { justify-content: center; }
.spread-card .tcard .tc-desc {
  flex: 0 1 auto;
  font-family: 'Noto Serif KR', serif; font-size: clamp(9.5px, 2vw, 12px); line-height: 1.5;
  color: #5A4A28; text-align: center; text-wrap: pretty;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
}

/* ── card pack skins (front card back + draw fan back) ── */
.pack-midnight .face.front, .fan-zone.pack-midnight .back {
  background:
    radial-gradient(circle at 50% 30%, rgba(212,175,55,0.16), transparent 62%),
    linear-gradient(165deg, #262242, #1E1B2E 55%, #191627);
  border-color: rgba(212,175,55,0.42);
}
.pack-violet .face.front, .fan-zone.pack-violet .back {
  background:
    radial-gradient(circle at 50% 30%, rgba(167,139,250,0.3), transparent 64%),
    linear-gradient(165deg, #2A2350, #221C3E 55%, #191331);
  border-color: rgba(167,139,250,0.5);
}
.pack-violet .face.front .cb-emblem, .pack-violet .face.front .cb-corner { color: var(--violet); }
.pack-moon .face.front, .fan-zone.pack-moon .back {
  background:
    radial-gradient(circle at 50% 28%, rgba(214,222,245,0.24), transparent 60%),
    linear-gradient(165deg, #232838, #1B2030 55%, #161A28);
  border-color: rgba(200,214,245,0.4);
}
.pack-moon .face.front .cb-emblem, .pack-moon .face.front .cb-corner { color: #C8D6F5; }

/* 6시 카드 바로 아래에 붙는 안내 문구 */
.hero-hint {
  margin-top: 0px; font-size: 15px; color: var(--ink-soft);
  letter-spacing: .04em; animation: fadeUp 1s ease .3s both;
  font-family: 'Marcellus', 'Noto Serif KR', serif;
}

/* ═══════════ question ═══════════ */
.question {
  max-width: 620px; margin: 0 auto;
  padding: clamp(24px, 6vh, 70px) 24px 80px;
  animation: fadeUp .6s ease both;
}
.q-head { text-align: center; margin-bottom: 34px; }
.q-head .crumb { font-size: 12px; letter-spacing: .26em; color: var(--violet); text-transform: uppercase; margin-bottom: 14px; }
.q-head h2 { font-family: 'Marcellus', 'Noto Serif KR', serif; font-size: clamp(26px, 4vw, 34px); font-weight: 400; margin: 0 0 12px; }
.q-head p { color: var(--ink-soft); font-size: 14.5px; line-height: 1.65; margin: 0; text-wrap: pretty; }
.q-input {
  width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  color: var(--ink); font-family: 'Outfit', 'Noto Sans KR', sans-serif; font-weight: 300;
  font-size: 15.5px; line-height: 1.6; padding: 18px 20px; resize: none; transition: border-color .25s ease;
}
.q-input:focus { border-color: rgba(167,139,250,0.55); box-shadow: 0 0 0 3px rgba(167,139,250,0.1); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  background: rgba(167,139,250,0.06); border: 1px solid rgba(167,139,250,0.2); color: var(--ink-soft);
  font-size: 12.5px; font-weight: 400; padding: 7px 14px; border-radius: 999px; cursor: pointer; transition: all .25s ease;
}
.chip:hover { border-color: rgba(167,139,250,0.55); color: var(--ink); background: rgba(167,139,250,0.12); }
.q-ask { font-family: 'Marcellus', 'Noto Serif KR', serif; color: var(--gold-bright) !important; font-size: 15.5px !important; }
.q-hint {
  margin-top: 16px; font-size: 12.5px; line-height: 1.6; color: var(--ink-dim);
  text-wrap: pretty; padding: 12px 16px; border-radius: 12px;
  background: rgba(167,139,250,0.05); border: 1px solid rgba(167,139,250,0.14);
}
.q-actions { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 38px; }
.btn-primary {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep)); color: #17130A; border: none;
  font-size: 15px; font-weight: 500; letter-spacing: .04em; padding: 15px 40px; border-radius: 999px;
  cursor: pointer; box-shadow: 0 4px 30px rgba(212,175,55,0.22); transition: all .3s cubic-bezier(.22,1,.36,1);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 44px rgba(212,175,55,0.38); }
.btn-primary:active { transform: scale(.98); }
.btn-skip { background: none; border: none; color: var(--ink-dim); font-size: 13px; font-weight: 400; cursor: pointer; letter-spacing: .02em; transition: color .25s ease; }
.btn-skip:hover { color: var(--ink-soft); }

/* ═══════════ draw ═══════════ */
.draw {
  display: flex; flex-direction: column;
  flex: 1 1 auto; min-height: 0;
  overflow: hidden; padding: clamp(4px, 1.5vh, 20px) 16px 0;
  animation: fadeUp .5s ease both;
}
.draw-head { text-align: center; }
.draw-head h2 { font-family: 'Marcellus', 'Noto Serif KR', serif; font-size: clamp(22px, 3.5vw, 30px); font-weight: 400; margin: 0 0 8px; }
.draw-head p { color: var(--ink-soft); font-size: 14px; margin: 0; }

.slots { display: flex; gap: clamp(8px, 1.5vw, 16px); justify-content: center; flex-wrap: wrap; margin: clamp(8px, 2vh, 30px) 0 0; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 7px; width: clamp(52px, 8vw, 68px); }
.slot .face { width: 100%; aspect-ratio: 5 / 8; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.slot .face.empty { border: 1px dashed rgba(245,245,245,0.16); }
.slot .face.empty span { color: rgba(245,245,245,0.18); font-size: 11px; }
.slot .face.filled {
  background: linear-gradient(160deg, #232037, #1E1B2E 60%); border: 1px solid rgba(212,175,55,0.6);
  box-shadow: 0 0 22px rgba(212,175,55,0.18);
  animation: slotPop .5s cubic-bezier(.34,1.4,.64,1) both;
}
.slot .face.filled span { color: var(--gold); font-size: 13px; opacity: .85; }
.slot .lbl { font-size: 10.5px; letter-spacing: .03em; color: var(--ink-dim); text-align: center; line-height: 1.3; }

.draw-actions { display: flex; gap: 12px; justify-content: center; align-items: center; margin: clamp(6px, 1.6vh, 24px) 0 0; min-height: 48px; flex-wrap: wrap; }
.shuffle-hint {
  text-align: center; font-size: 12.5px; color: var(--violet); letter-spacing: .02em;
  margin-top: 10px; opacity: .85; transition: opacity .4s ease; font-style: italic;
}
.btn-outline {
  background: none; border: 1px solid rgba(245,245,245,0.16); color: var(--ink-soft);
  font-size: 13px; font-weight: 400; padding: 11px 22px; border-radius: 999px;
  cursor: pointer; letter-spacing: .03em; transition: all .25s ease;
}
.btn-outline:hover { border-color: rgba(167,139,250,0.55); color: var(--ink); }
.btn-outline.goldish:hover { border-color: rgba(212,175,55,0.5); }
.btn-reveal {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep)); color: #17130A; border: none;
  font-size: 15px; font-weight: 500; letter-spacing: .04em; padding: 14px 38px; border-radius: 999px;
  cursor: pointer; box-shadow: 0 4px 30px rgba(212,175,55,0.3);
  transition: all .3s cubic-bezier(.22,1,.36,1); animation: fadeUp .45s ease both;
}
.btn-reveal:hover { transform: translateY(-2px); box-shadow: 0 8px 44px rgba(212,175,55,0.45); }

.fan-zone {
  position: relative; flex: 1 1 auto; min-height: 130px; margin-top: auto; overflow: hidden;
  touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none;
}
.fan-zone.grabbing { cursor: grabbing; }

/* edge arrows — guide that the fan can be swiped */
.fan-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 6;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(212,175,55,0.35); background: rgba(15,14,23,0.6);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  color: var(--gold-bright); font-size: 22px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .25s ease; padding-bottom: 3px;
}
.fan-arrow:hover { background: rgba(212,175,55,0.16); border-color: rgba(212,175,55,0.7); }
.fan-arrow.left { left: 8px; animation: arrowNudgeL 2.4s ease-in-out infinite; }
.fan-arrow.right { right: 8px; animation: arrowNudgeR 2.4s ease-in-out infinite; }
@keyframes arrowNudgeL { 0%,100% { transform: translateY(-50%) translateX(0); } 50% { transform: translateY(-50%) translateX(-4px); } }
@keyframes arrowNudgeR { 0%,100% { transform: translateY(-50%) translateX(0); } 50% { transform: translateY(-50%) translateX(4px); } }
.drag-hint {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 6;
  font-size: 11.5px; color: var(--violet); letter-spacing: .03em; opacity: .7;
  pointer-events: none; white-space: nowrap;
}

.fan-origin { position: absolute; left: 50%; bottom: -52px; width: 0; height: 0; animation: fanRise .8s cubic-bezier(.22,1,.36,1) both; }
.fan-card {
  position: absolute; left: -47px; bottom: 0; width: 94px; height: 152px;
  transform-origin: 50% 560px;
  transition: transform .5s cubic-bezier(.22,1,.36,1), opacity .35s ease;
  will-change: transform;
}
.fan-origin.dragging .fan-card { transition: opacity .35s ease; }
.fan-card.lifting { transition: opacity .35s ease; z-index: 5; }
.fan-card.lifting .back {
  transform: none !important;
  border-color: rgba(212,175,55,0.9);
  box-shadow: -6px 8px 32px rgba(0,0,0,0.5), 0 0 28px rgba(212,175,55,0.3);
}
.fan-card.taken { opacity: 0; pointer-events: none; }
.fan-card .back {
  width: 100%; height: 100%; cursor: pointer; border-radius: 10px;
  background: linear-gradient(165deg, #262242, #1E1B2E 55%, #191627);
  border: 1px solid rgba(212,175,55,0.42); box-shadow: -6px 0 18px rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  transition: transform .28s cubic-bezier(.22,1,.36,1), box-shadow .28s ease, border-color .28s ease;
}
.fan-card .back:hover, .fan-card .back:focus-visible {
  transform: translateY(-30px); border-color: rgba(212,175,55,0.9);
  box-shadow: -6px 8px 32px rgba(0,0,0,0.5), 0 0 24px rgba(212,175,55,0.22);
}
.fan-card.shuffling .back { animation: shuffleCard .8s cubic-bezier(.34,1.2,.64,1) both; }
.fan-card .back .rim { width: 78%; height: 86%; border: 1px solid rgba(212,175,55,0.22); border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.fan-card .back .rim span { color: rgba(212,175,55,0.55); font-size: 17px; }

/* ═══════════ loading ═══════════ */
.loading {
  flex: 1 1 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 24px;
}
.loader-orb { position: relative; width: 96px; height: 96px; margin-bottom: 38px; }
.loader-orb .ring-a { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(212,175,55,0.25); border-top-color: rgba(212,175,55,0.85); animation: spinSlow 2.6s linear infinite; }
.loader-orb .ring-b { position: absolute; inset: 12px; border-radius: 50%; border: 1px dashed rgba(167,139,250,0.3); animation: spinSlow 9s linear infinite reverse; }
.loader-orb .star { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 26px; animation: breathe 2.8s ease-in-out infinite; }
.loading .msg { font-family: 'Marcellus', 'Noto Serif KR', serif; font-size: 20px; color: var(--ink); margin-bottom: 12px; min-height: 30px; }
.loading .sub { font-size: 13.5px; color: var(--ink-dim); }

/* ═══════════ results ═══════════ */
.results { max-width: 760px; margin: 0 auto; padding: clamp(16px, 4vh, 48px) 24px 90px; }
.r-head { text-align: center; margin-bottom: clamp(32px, 5vh, 48px); animation: fadeUp .6s ease both; }
.r-head .crumb { font-size: 12px; letter-spacing: .26em; color: var(--violet); text-transform: uppercase; margin-bottom: 14px; }
.r-head h2 { font-family: 'Marcellus', 'Noto Serif KR', serif; font-size: clamp(22px, 3.6vw, 30px); font-weight: 400; line-height: 1.4; margin: 0; text-wrap: balance; }
.verdict-pill {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 20px;
  border: 1px solid rgba(212,175,55,0.45); background: rgba(212,175,55,0.07);
  color: var(--gold-bright); font-size: 14px; letter-spacing: .08em; padding: 9px 22px; border-radius: 999px;
}

.r-cards { display: flex; flex-direction: column; gap: 18px; }
.r-card {
  background: var(--panel); border: 1px solid rgba(245,245,245,0.06); border-radius: 20px;
  padding: clamp(20px, 3vw, 28px); display: flex; gap: clamp(18px, 3vw, 28px);
  align-items: flex-start; flex-wrap: wrap; animation: fadeUp .7s ease both;
}
.r-card .face-col { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 10px; animation: flipIn .9s cubic-bezier(.22,1,.36,1) both; }
.tarot-face {
  width: 128px; height: 208px; border-radius: 12px;
  background: linear-gradient(170deg, #F8F3E6, #EFE7D2);
  border: 1px solid rgba(212,175,55,0.55);
  box-shadow: 0 10px 34px rgba(0,0,0,0.45), inset 0 0 0 5px rgba(255,255,255,0.4);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 14px 10px;
}
.tarot-face.reversed { transform: rotate(180deg); }
.tarot-face .num { font-family: 'Marcellus', serif; font-size: 14px; color: #8A7430; letter-spacing: .12em; }
.tarot-face .sigil { width: 68px; height: 68px; border: 1px solid rgba(138,116,48,0.4); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; color: #2B2416; }
.tarot-face .nm { font-family: 'Marcellus', serif; font-size: 12px; color: #2B2416; text-align: center; letter-spacing: .07em; text-transform: uppercase; line-height: 1.35; }
.rev-label { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--violet); }

.r-card .body { flex: 1 1 300px; min-width: 0; }
.r-card .pos { font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.r-card .title { font-family: 'Marcellus', 'Noto Serif KR', serif; font-size: 20px; color: var(--ink); margin-bottom: 4px; }
.r-card .local { font-size: 12.5px; color: var(--ink-dim); margin-bottom: 12px; letter-spacing: .04em; }
.r-card .text { font-size: 14.5px; line-height: 1.8; color: var(--ink-soft); text-wrap: pretty; white-space: pre-line; }

.synthesis {
  margin-top: 22px; border: 1px solid rgba(212,175,55,0.28);
  background: linear-gradient(180deg, rgba(212,175,55,0.05), rgba(212,175,55,0.015));
  border-radius: 20px; padding: clamp(24px, 3.5vw, 34px); animation: fadeUp .7s ease both;
}
.synthesis .head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.synthesis .head .star { color: var(--gold); font-size: 14px; }
.synthesis .head .lbl { font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.synthesis .text { font-size: 15px; line-height: 1.85; color: #E8E8E8; text-wrap: pretty; white-space: pre-line; }

.r-actions { display: flex; gap: 12px; justify-content: center; margin-top: 44px; flex-wrap: wrap; animation: fadeUp .7s ease both; }
.btn-save {
  background: none; border: 1px solid rgba(245,245,245,0.16); color: var(--ink-soft);
  font-size: 13.5px; font-weight: 400; padding: 12px 26px; border-radius: 999px;
  cursor: pointer; letter-spacing: .03em; transition: all .25s ease;
}
.btn-save:hover { border-color: rgba(212,175,55,0.5); color: var(--ink); }
.btn-new {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep)); color: #17130A; border: none;
  font-size: 13.5px; font-weight: 500; letter-spacing: .03em; padding: 12px 28px; border-radius: 999px;
  cursor: pointer; box-shadow: 0 4px 24px rgba(212,175,55,0.2); transition: all .3s cubic-bezier(.22,1,.36,1);
}
.btn-new:hover { transform: translateY(-2px); box-shadow: 0 8px 36px rgba(212,175,55,0.35); }
.footer-note { text-align: center; margin-top: 30px; font-size: 12px; color: var(--ink-dim); line-height: 1.6; }
.offline-note { text-align: center; margin-top: 14px; font-size: 12px; color: rgba(232,160,160,0.8); }

/* ═══════════ history ═══════════ */
.history { max-width: 680px; margin: 0 auto; padding: clamp(20px, 5vh, 56px) 24px 90px; animation: fadeUp .5s ease both; }
.history h2 { font-family: 'Marcellus', 'Noto Serif KR', serif; font-size: clamp(24px, 3.6vw, 32px); font-weight: 400; text-align: center; margin: 0 0 30px; }
.history .empty { text-align: center; color: var(--ink-dim); padding: 60px 0; }
.history .empty .big { font-size: 15px; color: var(--ink-soft); margin-bottom: 8px; }
.history .empty .small { font-size: 13px; line-height: 1.6; margin-bottom: 24px; }
.h-item { background: var(--panel); border: 1px solid rgba(245,245,245,0.07); border-radius: 16px; margin-bottom: 12px; overflow: hidden; }
.h-item .row { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: none; text-align: left; padding: 16px 18px; cursor: pointer; color: inherit; }
.h-item .row:hover { background: rgba(245,245,245,0.02); }
.h-item .meta { flex: 1; min-width: 0; }
.h-item .meta .sp { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--violet); margin-bottom: 4px; }
.h-item .meta .q { font-size: 14.5px; color: var(--ink); font-family: 'Marcellus', 'Noto Serif KR', serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-item .meta .dt { font-size: 11.5px; color: var(--ink-dim); margin-top: 3px; }
.h-item .arrow { color: var(--ink-dim); font-size: 12px; transition: transform .25s ease; }
.h-item.open .arrow { transform: rotate(90deg); }
.h-detail { padding: 0 18px 18px; border-top: 1px solid rgba(245,245,245,0.05); }
.h-detail .card-line { padding: 12px 0; border-bottom: 1px solid rgba(245,245,245,0.05); }
.h-detail .card-line .p { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.h-detail .card-line .n { font-size: 14px; color: var(--ink); margin-bottom: 4px; font-family: 'Marcellus', 'Noto Serif KR', serif; }
.h-detail .card-line .t { font-size: 13px; line-height: 1.7; color: var(--ink-soft); }
.h-detail .syn { padding: 14px 0 4px; font-size: 13.5px; line-height: 1.75; color: #E8E8E8; }
.h-detail .verdict { display: inline-block; margin-top: 12px; border: 1px solid rgba(212,175,55,0.45); background: rgba(212,175,55,0.07); color: var(--gold-bright); font-size: 12.5px; padding: 6px 16px; border-radius: 999px; }
.h-detail .h-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.h-del { background: none; border: none; color: rgba(232,160,160,0.75); font-size: 12.5px; cursor: pointer; padding: 6px 8px; }
.h-del:hover { color: #E8A0A0; }
.h-note { text-align: center; color: var(--ink-dim); font-size: 13px; padding: 40px 0; }

/* 1주일 이전 기록 잠금 (구독 유도) */
.h-locked {
  margin-top: 18px; padding: 26px 20px; text-align: center;
  border: 1px dashed rgba(212,175,55,0.35); border-radius: 16px;
  background: linear-gradient(180deg, rgba(212,175,55,0.05), rgba(167,139,250,0.04));
}
.h-locked-ico { font-size: 22px; margin-bottom: 8px; }
.h-locked-t { font-family: 'Marcellus', 'Noto Serif KR', serif; font-size: 16px; color: var(--gold-bright); margin-bottom: 6px; }
.h-locked-d { font-size: 13px; line-height: 1.65; color: var(--ink-soft); margin-bottom: 16px; text-wrap: pretty; }

/* ═══════════ split-flap counters (공항 표시판) ═══════════ */
.flap-counters { display: inline-flex; align-items: center; gap: 8px; }
.flap-counter {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px; border-radius: 8px;
  border: 1px solid rgba(245,245,245,0.1); background: rgba(0,0,0,0.25);
  cursor: default;
}
.flap-counter .flap-ico { font-size: 11px; color: var(--gold); opacity: .8; }
#flap-reading .flap-ico { color: var(--violet); }
.flap-digits { display: inline-flex; gap: 2px; }
.flap {
  position: relative; width: 13px; height: 19px; border-radius: 3px;
  background: linear-gradient(180deg, #24222E, #17161F);
  border: 1px solid rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; perspective: 120px;
}
.flap::after { /* center split line, like a departure board tile */
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: rgba(0,0,0,0.55); transform: translateY(-0.5px); z-index: 2;
}
.flap .d {
  font-family: 'Outfit', monospace; font-size: 12px; font-weight: 600;
  color: #EBE7D6; line-height: 1; display: block;
  transform-origin: 50% 50%;
}
.flap.flip .d { animation: flapDrop .34s cubic-bezier(.3,.9,.4,1) both; }
@keyframes flapDrop {
  0% { transform: rotateX(-88deg); opacity: .2; }
  55% { transform: rotateX(8deg); opacity: 1; }
  100% { transform: rotateX(0deg); }
}

/* ═══════════ admin ═══════════ */
.admin { max-width: 720px; margin: 0 auto; padding: clamp(20px, 5vh, 56px) 24px 90px; animation: fadeUp .5s ease both; }
.admin h2 { font-family: 'Marcellus', 'Noto Serif KR', serif; font-size: clamp(24px, 3.6vw, 32px); font-weight: 400; text-align: center; margin: 0 0 12px; }
.admin-note { text-align: center; color: var(--ink-dim); font-size: 13px; line-height: 1.6; margin: 0 0 30px; }
.admin-field { margin-bottom: 20px; }
.admin-field label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 8px; letter-spacing: .02em; }
.admin-field label .k { color: var(--ink-dim); font-size: 11px; letter-spacing: .06em; margin-left: 6px; }
.admin-field .pair { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-field .col { flex: 1 1 260px; position: relative; }
.admin-field .lang-tag {
  position: absolute; top: 10px; right: 12px; font-size: 10px; letter-spacing: .12em;
  color: var(--ink-dim); pointer-events: none;
}
.admin-field input, .admin-field textarea {
  width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink); font-family: 'Outfit', 'Noto Sans KR', sans-serif; font-weight: 300;
  font-size: 14px; line-height: 1.55; padding: 12px 44px 12px 14px; resize: vertical;
  transition: border-color .25s ease;
}
.admin-field input:focus, .admin-field textarea:focus { border-color: rgba(167,139,250,0.55); }
.admin-actions { display: flex; align-items: center; gap: 16px; justify-content: center; margin-top: 30px; }
.admin-status { font-size: 13px; color: var(--gold-bright); min-width: 80px; }
.admin-gear { font-size: 15px; padding: 6px 8px; color: var(--ink-dim); }
.admin-gear:hover { color: var(--gold-bright); }
.admin-pin { max-width: 300px; margin: 40px auto 0; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.admin-pin label { font-size: 13px; color: var(--ink-soft); letter-spacing: .04em; }
.admin-pin input {
  width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink); font-size: 16px; letter-spacing: .3em; text-align: center;
  padding: 13px 16px; transition: border-color .25s ease;
}
.admin-pin input:focus { border-color: rgba(167,139,250,0.55); }
.admin-locked { text-align: center; padding: 40px 0; }
.admin-locked p { color: var(--ink-soft); font-size: 14px; margin: 0 0 18px; }

/* admin members */
.admin-users { margin-bottom: 10px; }
.admin-users-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.admin-users-actions { display: inline-flex; gap: 8px; }
.users-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.users-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 520px; }
.users-table th { text-align: left; color: var(--ink-dim); font-weight: 400; padding: 10px 12px; border-bottom: 1px solid var(--line); letter-spacing: .04em; background: rgba(0,0,0,0.15); }
.users-table td { padding: 10px 12px; border-bottom: 1px solid rgba(245,245,245,0.05); color: var(--ink-soft); white-space: nowrap; }
.users-table tr:last-child td { border-bottom: none; }

.admin-section-h {
  font-family: 'Marcellus', 'Noto Serif KR', serif; font-size: 16px; color: var(--gold-bright);
  letter-spacing: .04em; margin: 34px 0 16px; padding-bottom: 8px;
  border-bottom: 1px solid rgba(212,175,55,0.2);
}
.admin-section-h:first-of-type { margin-top: 8px; }

/* pack picker */
.pack-picker { display: flex; gap: 12px; flex-wrap: wrap; }
.pack-opt {
  flex: 1 1 140px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 16px 12px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.pack-opt:hover { border-color: rgba(212,175,55,0.4); }
.pack-opt.sel { border-color: var(--gold-bright); background: rgba(212,175,55,0.06); }
.pack-opt input { position: absolute; opacity: 0; pointer-events: none; }
.pack-swatch {
  width: 60px; height: 92px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(212,175,55,0.42);
}
.pack-swatch i { font-size: 18px; opacity: .8; }
.pack-opt.pack-midnight .pack-swatch { background: radial-gradient(circle at 50% 32%, rgba(212,175,55,0.14), transparent 60%), linear-gradient(165deg, #262242, #1E1B2E 55%, #191627); color: var(--gold); }
.pack-opt.pack-violet .pack-swatch { background: radial-gradient(circle at 50% 32%, rgba(167,139,250,0.28), transparent 62%), linear-gradient(165deg, #2A2350, #221C3E 55%, #191331); border-color: rgba(167,139,250,0.5); color: var(--violet); }
.pack-opt.pack-moon .pack-swatch { background: radial-gradient(circle at 50% 30%, rgba(214,222,245,0.22), transparent 60%), linear-gradient(165deg, #232838, #1B2030 55%, #161A28); border-color: rgba(200,214,245,0.4); color: #C8D6F5; }
.pack-name { font-size: 12.5px; color: var(--ink-soft); }

/* spread editor card */
.admin-card { border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 16px; }
.admin-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-card-head .ttl { font-family: 'Marcellus', 'Noto Serif KR', serif; font-size: 16px; color: var(--ink); }
.admin-card-head .ttl .k { font-family: 'Outfit', sans-serif; color: var(--ink-dim); font-size: 11px; letter-spacing: .06em; margin-left: 6px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 40px; height: 22px; border-radius: 999px; background: rgba(245,245,245,0.12); position: relative; transition: background .2s ease; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #9a97ad; transition: transform .2s ease, background .2s ease; }
.switch input:checked + .track { background: rgba(212,175,55,0.4); }
.switch input:checked + .track::after { transform: translateX(18px); background: var(--gold-bright); }
.switch .stxt { font-size: 12px; color: var(--ink-dim); }

/* ═══════════ points pill ═══════════ */
.points-pill {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid rgba(212,175,55,0.4); background: rgba(212,175,55,0.08);
  color: var(--gold-bright); font-size: 12.5px; font-weight: 400; letter-spacing: .02em;
  padding: 7px 14px; border-radius: 999px; cursor: pointer; transition: all .25s ease;
}
.points-pill:hover { background: rgba(212,175,55,0.16); box-shadow: 0 0 14px rgba(212,175,55,0.18); }
.points-pill .pp-ico { font-size: 10px; }
.points-pill b { font-weight: 600; }

/* tier badge on hero cards */
.tier-badge {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%); z-index: 4;
  font-size: 9.5px; letter-spacing: .06em; padding: 3px 9px; border-radius: 999px;
  white-space: nowrap; pointer-events: none;
}
.tier-badge.free { background: rgba(167,139,250,0.9); color: #17130A; }
.tier-badge.paid { background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep)); color: #17130A; }

/* ═══════════ paywall modal ═══════════ */
.paywall-card {
  width: min(100%, 440px); background: var(--panel); border: 1px solid var(--line);
  border-radius: 22px; padding: clamp(24px, 5vw, 34px); position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 60px rgba(212,175,55,0.07);
  animation: modalIn .35s cubic-bezier(.22,1,.36,1) both;
  max-height: calc(100vh - 40px); overflow-y: auto;
}
.paywall-card .close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 50%; background: none; border: none; color: var(--ink-dim); font-size: 17px; cursor: pointer; }
.paywall-card .close:hover { color: var(--ink); }
.pw-head { text-align: center; margin-bottom: 18px; }
.pw-head .star { color: var(--gold); font-size: 17px; }
.pw-head h3 { font-family: 'Marcellus', 'Noto Serif KR', serif; font-size: 21px; font-weight: 400; color: var(--ink); margin: 10px 0 8px; }
.pw-head p { font-size: 13px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 10px; text-wrap: pretty; }
.pw-free-note { font-size: 12px; color: var(--violet); }
.pw-balance { text-align: center; font-size: 14px; color: var(--gold-bright); margin: 4px 0 18px; }
.pw-balance b { font-weight: 600; font-size: 17px; }
.pw-section { margin-bottom: 18px; }
.pw-packs { display: flex; gap: 10px; }
.pw-pack {
  flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 16px 8px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer;
  background: var(--bg); transition: all .2s ease;
}
.pw-pack:hover { border-color: rgba(212,175,55,0.5); transform: translateY(-2px); }
.pw-pack-badge { position: absolute; top: -8px; right: -6px; font-size: 9px; background: var(--violet); color: #17130A; padding: 2px 7px; border-radius: 999px; }
.pw-pack-pts { font-size: 16px; color: var(--gold-bright); font-weight: 500; }
.pw-pack-price { font-size: 12.5px; color: var(--ink-soft); }
.pw-sub {
  width: 100%; margin-top: 10px; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border: 1px solid rgba(167,139,250,0.35); border-radius: 14px; cursor: pointer;
  background: rgba(167,139,250,0.06); color: var(--ink); transition: all .2s ease;
}
.pw-sub:hover { border-color: rgba(167,139,250,0.6); background: rgba(167,139,250,0.1); }
.pw-sub-l { font-size: 14px; color: var(--violet); }
.pw-sub-r { font-size: 13.5px; color: var(--ink-soft); }
.pw-coupon-h { font-size: 12.5px; color: var(--ink-dim); margin-bottom: 8px; }
.pw-coupon-form { display: flex; gap: 8px; }
.pw-coupon-form input {
  flex: 1; background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); font-size: 14px; padding: 11px 14px; letter-spacing: .06em;
}
.pw-coupon-form input:focus { border-color: rgba(167,139,250,0.55); }
.pw-coupon-btn { background: none; border: 1px solid var(--line-soft); color: var(--ink-soft); font-size: 13px; padding: 0 16px; border-radius: 10px; cursor: pointer; }
.pw-coupon-btn:hover { border-color: rgba(212,175,55,0.5); color: var(--ink); }
.pw-status { text-align: center; font-size: 13px; color: var(--gold-bright); min-height: 18px; margin-top: 12px; }
.pw-login { text-align: center; }
.pw-login p { font-size: 14px; color: var(--ink-soft); margin: 0 0 16px; }

/* payment method chooser overlay */
.pw-method {
  position: absolute; inset: 0; border-radius: 22px; z-index: 3;
  background: var(--panel); animation: modalFade .2s ease both;
  display: flex; align-items: center; justify-content: center; padding: clamp(24px,5vw,34px);
}
.pw-method-inner { width: 100%; position: relative; }
.pw-method-back { position: absolute; top: -6px; left: -6px; background: none; border: none; color: var(--ink-dim); font-size: 24px; cursor: pointer; }
.pw-method-back:hover { color: var(--ink); }
.pw-method-h { text-align: center; font-family: 'Marcellus','Noto Serif KR',serif; font-size: 18px; color: var(--ink); margin: 0 0 22px; }
.pw-method-btns { display: flex; flex-direction: column; gap: 10px; }
.pw-method-btn {
  width: 100%; padding: 15px; border-radius: 12px; cursor: pointer; font-size: 14.5px; font-weight: 500;
  border: 1px solid var(--line-soft); background: var(--bg); color: var(--ink); transition: all .2s ease;
}
.pw-method-btn:hover { transform: translateY(-1px); }
.pw-method-btn.m-toss { background: #0064FF; color: #fff; border-color: #0064FF; }
.pw-method-btn.m-paypal { background: #FFC439; color: #003087; border-color: #FFC439; font-weight: 700; }
.pw-method-btn.m-lemon { background: #FFC233; color: #211d1d; border-color: #FFC233; }
.pw-method-btn.m-kakaopay { background: #FFEB00; color: #3C1E1E; border-color: #FFEB00; }
.pw-method-btn.m-naverpay { background: #03C75A; color: #fff; border-color: #03C75A; }
.pw-method-btn.soon { opacity: .55; position: relative; }
.pw-method-btn.soon:hover { transform: none; }
.soon-badge {
  margin-left: 8px; font-size: 10px; font-weight: 600; letter-spacing: .04em;
  background: rgba(0,0,0,0.35); color: #fff; padding: 2px 8px; border-radius: 999px;
  vertical-align: 2px;
}

/* admin stat row */
.stat-row { display: flex; gap: 8px; align-items: center; }
.stat-row input {
  width: 140px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); font-size: 14px; padding: 10px 12px;
}
.stat-row input:focus { border-color: rgba(167,139,250,0.55); }

/* 문구별 글씨 크기 컨트롤 (ⓐ + px 입력) */
.size-ctl {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 10px;
  vertical-align: middle;
}
.size-ctl .size-ico { color: var(--gold-bright); font-size: 14px; }
.size-ctl input {
  width: 58px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink); font-size: 12.5px; padding: 4px 8px; text-align: center;
}
.size-ctl input:focus { border-color: rgba(212,175,55,0.5); }
.size-ctl input::placeholder { color: var(--ink-dim); }

/* ═══════════ share row ═══════════ */
.share-row { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 40px; animation: fadeUp .7s ease both; }
.share-label { font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-dim); }
.share-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.share-btn {
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line-soft); background: var(--panel); color: var(--ink);
  font-size: 16px; display: flex; align-items: center; justify-content: center;
  transition: all .22s ease;
}
.share-btn:hover { transform: translateY(-3px); border-color: rgba(212,175,55,0.5); box-shadow: 0 6px 18px rgba(0,0,0,0.35); }
.share-btn.kakao { background: #FEE500; color: #191600; border-color: #FEE500; font-weight: 700; }
.share-btn.ig { background: linear-gradient(45deg, #F58529, #DD2A7B 50%, #8134AF); color: #fff; border: none; }
.share-btn.th { background: #101010; color: #fff; border-color: #333; }
.share-btn.x { background: #000; color: #fff; border-color: #333; }
.share-btn.link.done { background: rgba(212,175,55,0.25); border-color: var(--gold-bright); }

/* ═══════════ toast ═══════════ */
.toast {
  position: fixed; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  z-index: 80; background: #16151F; border: 1px solid rgba(212,175,55,0.4);
  color: var(--ink); font-size: 13.5px; padding: 12px 22px; border-radius: 999px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5); opacity: 0; pointer-events: none;
  transition: opacity .3s ease, transform .3s ease; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* shared reading badge */
.shared-banner {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
  font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--violet);
}

/* ═══════════ mobile ═══════════ */
@media (max-width: 560px) {
  header.site { padding-left: 14px; padding-right: 14px; }
  .btn-gold { padding: 8px 14px; }
  .fan-origin { bottom: -34px; }
  .fan-card { width: 78px; height: 128px; left: -39px; }
  .tarot-face { width: 108px; height: 178px; }
  .r-card { flex-direction: column; align-items: center; text-align: left; }
  .r-card .body { width: 100%; }

  /* 카드가 겹치지 않도록 축소 + 원 반경(JS 33%)에 맞춰 링 정렬 */
  .penta-wrap { width: min(96vw, 460px); }
  .spread-node { width: clamp(56px, 16.5vw, 74px); }
  .penta-ring { inset: 17%; }
  .tier-badge { font-size: 8.5px; padding: 2px 7px; top: -7px; }
  /* 중복 섹션 제목은 첫 패널에만 */
  .hero-hint { font-size: 14px; }
  .hero-aside.right .aside-heading { display: none; }
  .spread-card .face.back { padding: 5px; }
  .spread-card .tcard { gap: 5px; padding: 9px 6px; }
  .spread-card .tcard .tc-emblem { width: 26px; height: 26px; font-size: 15px; }
  .spread-card .tcard .tc-desc { font-size: 9px; line-height: 1.42; }
  .spread-card .face.front .cb-emblem { font-size: 22px; margin-bottom: 8px; }
  .spread-card .face.front .name { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
