/* 사주 결과 풍성화 섹션 */
.saju-rich { margin: 22px 0; display: flex; flex-direction: column; gap: 12px; }
.saju-rich .rich-block {
  background: linear-gradient(160deg, rgba(201,169,97,0.05), rgba(180,140,242,0.05));
  border: 1px solid rgba(201,169,97,0.18);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
}
.saju-rich .rich-block summary {
  list-style: none;
  padding: 14px 18px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: #c9a961;
  background: rgba(0,0,0,0.2);
  user-select: none;
}
.saju-rich .rich-block summary::-webkit-details-marker { display: none; }
.saju-rich .rich-block summary::after {
  content: '▾'; float: right; transition: transform 0.2s ease; opacity: 0.7;
}
.saju-rich .rich-block[open] summary::after { transform: rotate(180deg); }
.saju-rich .rich-block summary:hover { background: rgba(201,169,97,0.08); }
.saju-rich .rich-body { padding: 14px 18px; color: #c9c9d0; font-size: 13.5px; line-height: 1.7; }
.saju-rich .rich-body p { margin: 0 0 8px; }
.saju-rich .rich-body p:last-child { margin-bottom: 0; }
.saju-rich .rich-tag { font-size: 13px; color: #b48cf2; font-weight: 600; margin-bottom: 8px; }
.saju-rich .rich-body p.muted { font-size: 12px; color: #9ba0ab; opacity: 0.9; }
.saju-rich .rich-body p.dominant { color: #c9a961; font-weight: 600; }
.saju-rich .ten-gods-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.saju-rich .ten-gods-table td { padding: 6px 10px; font-size: 13px; border-bottom: 1px solid #3a3f4d; }
.saju-rich .ten-gods-table td:first-child { color: #9ba0ab; width: 60px; }
.saju-rich .ten-gods-table td:last-child { color: #e8e9ec; }
.saju-rich .sinsal-row { margin-bottom: 10px; padding: 8px 12px; background: rgba(0,0,0,0.25); border-radius: 8px; }
.saju-rich .sinsal-row strong { color: #c9a961; font-size: 13px; display: block; margin-bottom: 4px; }
.saju-rich .sinsal-row p { margin: 0; font-size: 12.5px; }
.saju-rich .life-cats { display: grid; gap: 12px; }
.saju-rich .life-cats > div { background: rgba(0,0,0,0.2); padding: 10px 12px; border-radius: 8px; border-left: 3px solid #c9a961; }
.saju-rich .life-cats strong { color: #e8e9ec; font-size: 13px; display: block; margin-bottom: 4px; }
.saju-rich .life-cats p { margin: 0; font-size: 12.5px; color: #9ba0ab; }
.saju-rich .rich-foot {
  margin-top: 8px; padding: 14px 16px;
  background: rgba(180,140,242,0.06);
  border: 1px dashed rgba(180,140,242,0.3);
  border-radius: 10px;
  font-size: 12px; color: #9ba0ab; line-height: 1.7;
}
.saju-rich .rich-foot strong { color: #c9a961; }

/* Tier 1 — 10 카테고리 × 15 패턴 × 10 변형 (1500블록 DB) */
.saju-rich .tier1-summary { border-color: rgba(180,140,242,0.35); }
.saju-rich .tier1-summary summary { color: #b48cf2; }
.saju-rich .tier1-summary .rich-body p { color: #c9c9d0; }
.saju-rich .tier1-summary .rich-body p.muted { color: #9ba0ab; font-size: 12.5px; }
.saju-rich .tier1-loading { padding: 16px 18px; color: #9ba0ab; font-size: 13px; text-align: center; background: rgba(0,0,0,0.18); border-radius: 10px; }
.saju-rich .tier1-cat { border-color: rgba(180,140,242,0.22); }
.saju-rich .tier1-cat summary { font-size: 13.5px; color: #c9a961; }
.saju-rich .tier1-cat .rich-body .tier1-body { color: #e0e1e6; font-size: 13.5px; line-height: 1.78; margin-bottom: 12px; }
.saju-rich .tier1-cat .rich-body .tier1-advice { background: rgba(180,140,242,0.07); border-left: 3px solid #b48cf2; padding: 10px 14px; border-radius: 8px; margin-bottom: 10px; }
.saju-rich .tier1-cat .rich-body .tier1-advice strong { color: #b48cf2; font-size: 12.5px; display: block; margin-bottom: 6px; }
.saju-rich .tier1-cat .rich-body .tier1-advice p { color: #c9c9d0; font-size: 13px; margin: 0; line-height: 1.7; }
.saju-rich .tier1-cat .rich-body .tier1-keywords { display: flex; flex-wrap: wrap; gap: 6px; }
.saju-rich .tier1-cat .rich-body .tier1-keywords .kw { font-size: 11.5px; padding: 3px 9px; border-radius: 10px; }
.saju-rich .tier1-cat .rich-body .tier1-keywords .kw-pos { background: rgba(201,169,97,0.12); color: #c9a961; border: 1px solid rgba(201,169,97,0.3); }
.saju-rich .tier1-cat .rich-body .tier1-keywords .kw-caut { background: rgba(255,140,140,0.08); color: #ffb4b4; border: 1px solid rgba(255,140,140,0.25); }
.saju-rich .tier1-cat summary .tier1-hint { font-size: 11.5px; color: #9ba0ab; font-weight: 400; opacity: 0.7; margin-left: 6px; }

:root {
  --bg: #1a1d24;
  --surface: #232730;
  --surface-2: #2c3140;
  --text: #e8e9ec;
  --text-dim: #9ba0ab;
  --accent: #c9a961;
  --accent-2: #1e3a5f;
  --tarot-accent: #b48cf2;
  --border: #3a3f4d;
  --danger: #e57373;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}

body {
  max-width: 480px;
  margin: 0 auto;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
  min-height: 100vh;
}

header {
  text-align: center;
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

header h1 { font-size: 20px; font-weight: 700; color: var(--accent); letter-spacing: 0.5px; }
header .subtitle { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

/* 헤더 좌상단 뒤로가기 버튼 — 모바일 친화 (최소 44x44 탭 영역) */
.back-nav-btn {
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.back-nav-btn:hover { background: var(--surface); border-color: var(--accent); }
.back-nav-btn:active { background: var(--surface-2); }
.back-nav-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 사주 결과 — 이름 입력 시 인사말 표시 */
.saju-greeting {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  margin: 4px 0 12px;
  letter-spacing: 0.3px;
}

/* 폼 필드 보조 안내 (이름 입력 privacy 등) */
.field-hint {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
  line-height: 1.5;
}

main { padding: 20px 0; }

.privacy-banner {
  background: rgba(46, 125, 50, 0.12);
  border: 1px solid rgba(46, 125, 50, 0.3);
  color: #81c784;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 18px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.section-title { font-size: 14px; font-weight: 600; margin: 16px 0 10px; color: var(--text); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; font-weight: 500; }

input, select, button {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}

input:focus, select:focus { outline: none; border-color: var(--accent); }

.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

button.primary {
  background: var(--accent);
  color: var(--bg);
  border: none;
  font-weight: 700;
  font-size: 16px;
  margin-top: 18px;
  cursor: pointer;
}
button.primary:active { opacity: 0.85; }
button.secondary {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  margin-top: 12px;
  cursor: pointer;
}

.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 20px 0; }

.pillar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 6px;
  text-align: center;
}

.pillar .label { font-size: 11px; color: var(--text-dim); margin-bottom: 8px; }
.pillar .stem  { font-size: 22px; font-weight: 700; color: var(--accent); }
.pillar .branch{ font-size: 22px; font-weight: 700; color: #b3d1ff; margin-top: 2px; }
.pillar .hanja { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

.elements {
  background: var(--surface);
  border-radius: 10px;
  padding: 14px;
  margin: 16px 0;
}

.element-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 13px; }
.element-row .name { width: 36px; color: var(--text-dim); }
.element-row .bar {
  flex: 1;
  height: 8px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
}
.element-row .fill { height: 100%; background: var(--accent); }
.element-row .count { width: 30px; text-align: right; color: var(--text); }

.privacy-footer {
  background: rgba(201, 169, 97, 0.08);
  border: 1px solid rgba(201, 169, 97, 0.25);
  color: #d9bb78;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 12px;
  margin-top: 20px;
  line-height: 1.5;
}

.error { color: var(--danger); font-size: 13px; margin-top: 6px; }

footer {
  text-align: center;
  padding: 24px 0;
  font-size: 11px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  margin-top: 30px;
}

/* =========== 홈 진입 메뉴 =========== */
.entry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0 12px;
}
.entry-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 14px;
  text-align: center;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.entry-card:active { transform: scale(0.97); }
.entry-card.entry-saju  { border-color: rgba(201, 169, 97, 0.5); }
.entry-card.entry-tarot { border-color: rgba(180, 140, 242, 0.5); }
.entry-card.entry-saju:hover  { border-color: var(--accent); }
.entry-card.entry-tarot:hover { border-color: var(--tarot-accent); }
.entry-emoji { font-size: 38px; line-height: 1; margin-bottom: 10px; }
.entry-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.entry-saju  .entry-title { color: var(--accent); }
.entry-tarot .entry-title { color: var(--tarot-accent); }
.entry-desc  { font-size: 12px; color: var(--text-dim); line-height: 1.5; }

/* =========== 타로 =========== */

.tarot-lead { font-size: 13px; color: var(--text-dim); margin: 6px 0 18px; line-height: 1.6; }

.tarot-card-preview { display: flex; justify-content: center; margin: 22px 0; }
.tarot-card-preview img {
  width: 150px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(180, 140, 242, 0.25);
}

.tarot-menu { display: flex; flex-direction: column; gap: 0; }
.tarot-menu button.primary { background: var(--tarot-accent); }
.tarot-menu button.primary:disabled { cursor: default; }

.tarot-stage { display: flex; justify-content: center; margin: 28px 0 18px; }

.tarot-card-flip {
  width: 200px;
  height: 320px;
  perspective: 1200px;
  cursor: pointer;
}
.tarot-card-flip .flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.65s cubic-bezier(0.25, 0.8, 0.3, 1);
  transform-style: preserve-3d;
}
.tarot-card-flip.flipped .flip-inner { transform: rotateY(180deg); }
.tarot-card-flip .flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.tarot-card-flip .flip-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tarot-card-flip .flip-back  { transform: rotateY(0deg); }
.tarot-card-flip .flip-front { transform: rotateY(180deg); }
.tarot-card-flip .flip-front img.reversed { transform: rotate(180deg); }

.tarot-three-stage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 20px 0;
}
.three-col { display: flex; flex-direction: column; align-items: center; }
.three-pos {
  font-size: 12px;
  color: var(--tarot-accent);
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: 1px;
}
.tarot-card-flip.three-card { width: 100%; height: 200px; }
.tarot-card-flip.three-card .flip-face { border-radius: 10px; }

.tarot-meaning {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
}
.tarot-meaning.three-meaning { margin-top: 10px; }
.three-position-label {
  font-size: 12px;
  color: var(--tarot-accent);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}
.three-position-label .dim { color: var(--text-dim); }

.tarot-meaning .card-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.tarot-meaning .card-title .ko { font-size: 18px; font-weight: 700; color: var(--tarot-accent); }
.tarot-meaning .card-title .en { font-size: 12px; color: var(--text-dim); }
.tarot-meaning .card-title .orient {
  margin-left: auto;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.tarot-meaning .orient-up  { color: #81c784; border-color: rgba(129, 199, 132, 0.4); }
.tarot-meaning .orient-rev { color: #ffb74d; border-color: rgba(255, 183, 77, 0.4); }

.tarot-meaning .card-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.tarot-meaning .kw {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(180, 140, 242, 0.12);
  color: var(--tarot-accent);
  border: 1px solid rgba(180, 140, 242, 0.25);
}
.tarot-meaning .card-meaning {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}

/* 광고 자리 (placeholder) */
.ad-slot {
  margin: 18px 0;
  padding: 28px 12px;
  text-align: center;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 1px;
}

/* =========== 풀스토리 카드 해석 (1장 / 3장 / 켈틱 공통) =========== */
.rich-meaning {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px 20px;
  margin-top: 14px;
}

.rich-position {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(180, 140, 242, 0.2);
}
.rich-pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--tarot-accent);
  color: var(--bg);
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}
.rich-pos-label {
  color: var(--tarot-accent);
  font-weight: 700;
  font-size: 14px;
}
.rich-pos-desc {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.4;
}

.rich-card-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.rich-card-title .ko {
  font-size: 22px;
  font-weight: 700;
  color: var(--tarot-accent);
  letter-spacing: 0.5px;
}
.rich-card-title .en {
  font-size: 13px;
  color: var(--text-dim);
  font-style: italic;
}

.rich-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.rich-keywords .kw {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(180, 140, 242, 0.12);
  color: var(--tarot-accent);
  border: 1px solid rgba(180, 140, 242, 0.25);
}

.rich-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.rich-block:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.rich-block-title {
  font-size: 12px;
  color: var(--tarot-accent);
  font-weight: 600;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}
.rich-block-body {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  word-break: keep-all;
}
.rich-block-advice {
  background: rgba(180, 140, 242, 0.06);
  border: 1px solid rgba(180, 140, 242, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 16px;
}
.rich-block-advice .rich-block-title {
  color: #d4b3ff;
  margin-bottom: 6px;
}

/* 흐름 종합 박스 (3장 / 켈틱) */
.rich-synthesis {
  background: linear-gradient(180deg, rgba(180, 140, 242, 0.10), rgba(180, 140, 242, 0.04));
  border: 1px solid rgba(180, 140, 242, 0.35);
  border-radius: 14px;
  padding: 20px 16px;
  margin-top: 22px;
}
.rich-synthesis-title {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--tarot-accent);
  letter-spacing: 3px;
  margin-bottom: 4px;
}
.rich-synthesis-subtitle {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 18px;
}
.rich-synthesis-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(180, 140, 242, 0.18);
}
.rich-synthesis-block:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.rich-synthesis-label {
  font-size: 12px;
  color: var(--tarot-accent);
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.rich-synthesis-block p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  word-break: keep-all;
}
.rich-synthesis-advice {
  background: rgba(180, 140, 242, 0.10);
  border-radius: 10px;
  padding: 14px;
  margin-top: 18px;
  border-top: none;
}
.rich-synthesis-advice .rich-synthesis-label {
  color: #d4b3ff;
}

.celtic-rich-synthesis {
  /* 켈틱 종합은 더 강조 */
  border-color: rgba(180, 140, 242, 0.5);
  box-shadow: 0 4px 20px rgba(180, 140, 242, 0.10);
}

/* =========== 켈틱 크로스 =========== */

/* 진행도 바 */
.celtic-progress {
  margin: 14px 0 18px;
  font-size: 12px;
  color: var(--text-dim);
}
.celtic-progress > span { display: block; margin-bottom: 6px; text-align: center; }
.celtic-progress-bar {
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
}
.celtic-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--tarot-accent), #d4b3ff);
  transition: width 0.5s ease;
}

.celtic-cross-wrap {
  margin: 18px 0;
}

/* 십자 그리드 — 6장 (1~6번 카드)
   레이아웃:
   .       [5]      .
   [4]   [1+2]    [6]
   .       [3]      .
   카드 2는 카드 1 위에 90도 회전해서 겹쳐짐
*/
.celtic-cross-grid {
  display: grid;
  grid-template-columns: 86px 86px 86px;
  grid-template-rows: 138px 138px 138px;
  gap: 10px;
  justify-content: center;
  margin: 0 auto 24px;
  position: relative;
  width: fit-content;
}

.celtic-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.celtic-slot-1 { grid-column: 2; grid-row: 2; z-index: 1; }
.celtic-slot-3 { grid-column: 2; grid-row: 3; }
.celtic-slot-4 { grid-column: 1; grid-row: 2; }
.celtic-slot-5 { grid-column: 2; grid-row: 1; }
.celtic-slot-6 { grid-column: 3; grid-row: 2; }

/* 카드 1번 슬롯 안의 anchor — 그 위에 카드 2번이 absolute로 회전해 겹쳐짐 */
.celtic-card-anchor {
  position: relative;
  width: 86px;
  height: 138px;
}
.celtic-slot-2 {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 86px;
  height: 138px;
  transform: translate(-50%, -50%) rotate(90deg);
  z-index: 2;
  margin: 0;
  /* 카드 1이 뒤집히기 전엔 카드 2가 클릭을 가로채지 않음 → 클릭이 아래 카드 1로 통과 */
  pointer-events: none;
}
.celtic-slot-2 .celtic-card-flip { margin: 0; }
/* 카드 1이 뒤집힌 뒤에 카드 2의 클릭 활성화 — !important로 어떤 base override보다 우선 */
.celtic-card-anchor > .tarot-card-flip.flipped ~ .celtic-slot-2 {
  pointer-events: auto !important;
}
/* fallback — JS가 .card1-flipped 클래스를 anchor에 추가하면 무조건 활성화 */
.celtic-card-anchor.card1-flipped .celtic-slot-2 {
  pointer-events: auto !important;
}

.celtic-card-flip {
  width: 86px;
  height: 138px;
  perspective: 800px;
  border-radius: 8px;
}
.celtic-card-flip .flip-face { border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); }

.celtic-pos-label {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 4px;
  text-align: center;
  letter-spacing: 0.3px;
  line-height: 1.3;
  white-space: nowrap;
}


/* 뒤집을 차례 카드 강조 (펄스 효과) */
.celtic-slot.next-up .celtic-card-flip {
  animation: celticPulse 1.6s ease-in-out infinite;
}
@keyframes celticPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(180, 140, 242, 0); }
  50%      { box-shadow: 0 0 0 6px rgba(180, 140, 242, 0.35); }
}

/* 막대 — 7~10번 카드, 세로 4장 (모바일) / 2x2 (좁은 화면 fallback) */
.celtic-staff {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}
.celtic-staff-title {
  font-size: 12px;
  color: var(--tarot-accent);
  text-align: center;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.celtic-staff-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  justify-items: center;
  max-width: 320px;
  margin: 0 auto;
}
.celtic-staff-slot .celtic-card-flip {
  width: 120px;
  height: 190px;
}

/* 켈틱 해석 박스 */
.tarot-meaning.celtic-meaning {
  margin-top: 10px;
}
.celtic-position-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}
.celtic-pos-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--tarot-accent);
  color: var(--bg);
  font-weight: 700;
  font-size: 12px;
}
.celtic-pos-name {
  color: var(--tarot-accent);
  font-weight: 600;
  font-size: 14px;
}
.celtic-position-label .dim { color: var(--text-dim); }

.celtic-summary {
  background: rgba(180, 140, 242, 0.08);
  border: 1px solid rgba(180, 140, 242, 0.25);
  border-radius: 12px;
  padding: 16px;
  margin-top: 18px;
  color: var(--text);
}
.celtic-summary-title {
  text-align: center;
  color: var(--tarot-accent);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.celtic-summary p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-dim);
}

/* 켈틱 상세 모달 (탭하면 풀사이즈 카드 + 해석) */
.celtic-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.celtic-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.celtic-modal-sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding: 28px 18px 24px;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.6);
  animation: celticSheetUp 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
}
@keyframes celticSheetUp {
  from { transform: translateY(100%); opacity: 0.4; }
  to   { transform: translateY(0);    opacity: 1; }
}
.celtic-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.celtic-modal-close:hover { color: var(--text); }
.celtic-modal-card {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.celtic-modal-card img {
  width: 200px;
  height: 320px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
/* 모달 내부에서는 rich-meaning이 그대로 렌더링됨 */
.celtic-modal-body.rich-meaning {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

/* 좁은 화면 (360px 이하) — 카드 약간 더 작게 */
@media (max-width: 359px) {
  .celtic-cross-grid {
    grid-template-columns: 74px 74px 74px;
    grid-template-rows: 118px 118px 118px;
    gap: 8px;
  }
  .celtic-card-flip { width: 74px; height: 118px; }
  .celtic-card-anchor { width: 74px; height: 118px; }
  .celtic-slot-2 { width: 74px; height: 118px; }
  .celtic-staff-slot .celtic-card-flip { width: 100px; height: 160px; }
}

/* 넓은 화면 (420px 이상) — 카드 좀 더 크게 */
@media (min-width: 420px) {
  .celtic-cross-grid {
    grid-template-columns: 96px 96px 96px;
    grid-template-rows: 154px 154px 154px;
    gap: 12px;
  }
  .celtic-card-flip { width: 96px; height: 154px; }
  .celtic-card-anchor { width: 96px; height: 154px; }
  .celtic-slot-2 { width: 96px; height: 154px; }
}

/* ===================================================================
   타로 주제 선택 (운명의 고양이) UI
   =================================================================== */

.fate-cat-scene {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 20px 0 24px;
  padding: 0 4px;
}

.fate-cat {
  flex: 0 0 110px;
  width: 110px;
  height: 110px;
  position: relative;
  animation: fateCatBob 3.2s ease-in-out infinite;
}

.fate-cat-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 6px 14px rgba(201, 169, 97, 0.25));
}

@keyframes fateCatBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

.fate-cat-bubble {
  flex: 1;
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--accent);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--text);
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.fate-cat-bubble::before {
  /* 말풍선 꼬리 — 왼쪽으로 튀어나오는 삼각형 (테두리용) */
  content: '';
  position: absolute;
  top: 28px;
  left: -10px;
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-right: 10px solid var(--accent);
}

.fate-cat-bubble::after {
  /* 말풍선 꼬리 — 내부 채움 삼각형 (배경 컬러) */
  content: '';
  position: absolute;
  top: 30px;
  left: -7px;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 8px solid var(--surface);
}

.fate-cat-bubble .bubble-line {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
  line-height: 1.4;
}

.fate-cat-bubble .bubble-sub {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* 주제 칩 그리드 — 2열 카드형 */
.topic-chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 18px 0 14px;
}

.topic-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  width: 100%;
}

.topic-chip:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  transform: translateY(-1px);
}

.topic-chip:active {
  transform: translateY(0);
  opacity: 0.85;
}

.topic-chip .chip-emoji {
  font-size: 26px;
  line-height: 1;
}

.topic-chip .chip-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* 주제 선택 화면 보조 버튼 행 */
.topic-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 18px;
}

.topic-actions button.secondary.small,
button.secondary.small {
  flex: 1 1 30%;
  min-width: 120px;
  margin-top: 0;
  padding: 10px 8px;
  font-size: 13px;
  border-radius: 8px;
}

.topic-footer {
  margin-top: 8px;
  display: flex;
  justify-content: center;
}

.topic-footer button.secondary {
  margin-top: 0;
  padding: 10px 14px;
  font-size: 13px;
}

/* ===================================================================
   카드 뽑기 페이지 상단의 "선택한 주제: 💕 사랑·연애" 헤더
   =================================================================== */

.topic-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201, 169, 97, 0.08);
  border: 1px solid rgba(201, 169, 97, 0.3);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  margin: 4px 0 14px;
}

.topic-header .topic-header-label {
  color: var(--text-dim);
  font-size: 11px;
}

.topic-header .topic-header-value {
  font-weight: 600;
  color: var(--accent);
  font-size: 13px;
}

/* ===================================================================
   카드 의미 블록 안의 주제별 해석 (rich-block-topic)
   =================================================================== */

.rich-block.rich-block-topic {
  border-left: 3px solid var(--tarot-accent);
  padding-left: 10px;
  margin-left: 0;
  background: rgba(180, 140, 242, 0.06);
  border-radius: 0 8px 8px 0;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-right: 10px;
}

.rich-block.rich-block-topic .rich-block-title {
  color: var(--tarot-accent);
  font-weight: 600;
}

.rich-block.rich-block-topic .rich-block-body {
  color: var(--text);
}

/* 종합 해석 안의 주제 블록 */
.rich-synthesis-block.rich-synthesis-topic {
  background: rgba(180, 140, 242, 0.08);
  border-left: 3px solid var(--tarot-accent);
  padding: 10px 12px;
  border-radius: 0 8px 8px 0;
}

.rich-synthesis-block.rich-synthesis-topic .rich-synthesis-label {
  color: var(--tarot-accent);
}

/* 좁은 화면에서 cat-bubble을 위·아래로 쌓기 */
@media (max-width: 359px) {
  .fate-cat-scene {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .fate-cat {
    flex: 0 0 100px;
    width: 100px;
    height: 100px;
  }
  .fate-cat-bubble {
    width: 100%;
  }
  .fate-cat-bubble::before,
  .fate-cat-bubble::after {
    /* 꼬리를 위쪽으로 */
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-top: 0;
    border-bottom: 10px solid var(--accent);
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
  }
  .fate-cat-bubble::after {
    top: -7px;
    border-bottom-color: var(--surface);
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
  }
}

/* ===================================================================
   광고 인터스티셜 모달 (결과 진입 직전)
   - 5초 카운트다운 동안 건너뛰기 잠금 → 5초 후 활성화
   - AdSense 미설정 시 placeholder UI
   =================================================================== */

.ad-interstitial {
  position: fixed; inset: 0;
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.ad-interstitial-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.ad-interstitial-sheet {
  position: relative;
  width: 100%; max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex; flex-direction: column;
  max-height: 90vh;
}
.ad-interstitial-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.ad-interstitial-label {
  font-size: 13px; color: var(--text-dim);
  letter-spacing: 0.3px;
}
.ad-interstitial-skip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 13px; font-weight: 600;
  cursor: not-allowed;
  transition: all 0.2s;
  width: auto;
  margin: 0;
}
.ad-interstitial-skip:disabled { opacity: 0.7; }
.ad-interstitial-skip.ready {
  background: var(--tarot-accent);
  color: #fff;
  border-color: var(--tarot-accent);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(180, 140, 242, 0.35);
}
.ad-interstitial-skip.ready:active { transform: translateY(1px); }
.ad-skip-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px;
  background: var(--bg);
  border-radius: 50%;
  font-size: 11px; font-weight: 700;
  color: var(--text-dim);
}
.ad-interstitial-skip.ready .ad-skip-count { display: none; }

.ad-interstitial-body {
  padding: 20px 16px;
  display: flex; align-items: center; justify-content: center;
  flex: 1; min-height: 280px;
  overflow: auto;
}
.ad-placeholder-card {
  width: 100%; max-width: 360px;
  padding: 36px 20px;
  background: linear-gradient(160deg, rgba(180, 140, 242, 0.08), rgba(201, 169, 97, 0.06));
  border: 1px dashed var(--border);
  border-radius: 12px;
  text-align: center;
  color: var(--text-dim);
}
.ad-placeholder-card .ad-ph-icon  { font-size: 36px; margin-bottom: 10px; }
.ad-placeholder-card .ad-ph-text  { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; letter-spacing: 1px; }
.ad-placeholder-card .ad-ph-sub   { font-size: 11px; opacity: 0.7; line-height: 1.5; }
.ad-placeholder-card .ad-ph-progress {
  margin-top: 16px;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}
.ad-placeholder-card .ad-ph-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--tarot-accent), var(--accent));
  border-radius: 2px;
}

.ad-interstitial-foot {
  padding: 12px 16px 16px;
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}

/* ===================================================================
   카드별 분포 박스
   =================================================================== */

.card-distribution {
  margin: 22px 0 12px;
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.cd-title {
  font-size: 13px;
  color: var(--tarot-accent);
  margin-bottom: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.cd-headline { margin-bottom: 12px; line-height: 1.6; }
.cd-head-main { font-size: 14px; color: var(--text); }
.cd-head-main strong { color: var(--tarot-accent); font-weight: 700; }
.cd-head-main .cd-head-name { color: var(--accent); }
.cd-head-sub  { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.cd-head-sub strong { color: var(--text); font-weight: 600; }
.cd-skeleton  { font-size: 13px; color: var(--text-dim); opacity: 0.7; }
.cd-empty     { font-size: 13px; color: var(--text-dim); }

.cd-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.cd-row {
  display: grid;
  grid-template-columns: 110px 1fr 48px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}
.cd-row-name { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-row-bar {
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
}
.cd-row-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--tarot-accent), var(--accent));
  border-radius: 4px;
}
.cd-row-pct { text-align: right; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.cd-row-this .cd-row-name { color: var(--tarot-accent); font-weight: 700; }
.cd-row-this .cd-row-pct  { color: var(--tarot-accent); font-weight: 700; }

.cd-foot {
  margin-top: 10px;
  font-size: 10px;
  color: var(--text-dim);
  opacity: 0.7;
}

/* 3장/켈틱 결과 안에서 여러 카드 분포 묶음 */
.rich-distributions {
  margin: 24px 0 4px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.rich-synthesis-title-sub {
  font-size: 13px;
  color: var(--tarot-accent);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.rich-distribution-item { margin-bottom: 16px; }
.rich-distribution-item:last-child { margin-bottom: 0; }
.rich-distribution-pos {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 6px;
  font-weight: 500;
}
.rich-distribution-item .card-distribution {
  margin: 0;
  background: var(--surface-2);
}

/* ===================================================================
   후기 carousel (사용자 한마디)
   =================================================================== */

.testimonials-section {
  margin: 22px 0 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.ts-title {
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
/* carousel — display toggle 방식 (absolute stack 시 본문 길이가 길어지면
   non-active 카드의 #태그가 active 카드 위로 비져나오는 버그 fix) */
.ts-track {
  position: relative;
}
.ts-card {
  display: none;
  padding: 4px 0;
  animation: tsFade 0.35s ease;
}
.ts-card.active {
  display: block;
}
@keyframes tsFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ts-card-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.ts-handle { font-size: 12px; color: var(--text-dim); }
.ts-stars  { color: #ffd54f; font-size: 13px; letter-spacing: 1px; }
.ts-stars-empty { color: rgba(255, 213, 79, 0.25); }
.ts-when   { font-size: 11px; color: var(--text-dim); opacity: 0.8; }
.ts-card-body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  padding-left: 10px;
  border-left: 3px solid var(--accent);
}
.ts-card-foot { margin-top: 8px; }
.ts-topic {
  font-size: 11px;
  color: var(--tarot-accent);
  background: rgba(180, 140, 242, 0.1);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(180, 140, 242, 0.2);
}
.ts-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}
.ts-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.ts-dot.on {
  background: var(--accent);
  transform: scale(1.2);
}
.ts-foot {
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.7;
  line-height: 1.5;
}

/* 매우 좁은 화면 (mobile) — 분포 박스 폭 조정 */
@media (max-width: 359px) {
  .cd-row {
    grid-template-columns: 90px 1fr 42px;
    gap: 6px;
    font-size: 11px;
  }
}

/* ===================================================================
   3카드 모드 순서 안내 — 다음 차례 카드 강조 / 잠긴 카드 dim
   =================================================================== */

/* 모든 타로 카드 모드 공통 — 다음 차례 카드 강조 / 잠긴 카드 dim */
.tarot-card-flip.locked {
  cursor: not-allowed;
  opacity: 0.45;
  filter: saturate(0.6) brightness(0.85);
  transition: opacity 0.25s ease, filter 0.25s ease;
}
.tarot-card-flip.locked .flip-face {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.tarot-card-flip.next-up:not(.flipped) {
  animation: cardNextPulse 1.6s ease-in-out infinite;
  border-radius: 10px;
}
@keyframes cardNextPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(180, 140, 242, 0);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(180, 140, 242, 0.4);
    transform: translateY(-2px);
  }
}

/* 라벨 강조 — three-pos(3카드)와 celtic-pos-label(켈틱)에 동시 적용 */
.three-col .three-pos.next-up-label,
.celtic-pos-label.next-up-label,
.celtic-pos-label.celtic-position-label.next-up-label {
  color: var(--accent);
  font-weight: 700;
}
.three-col .three-pos.next-up-label::before,
.celtic-pos-label.next-up-label::before {
  content: '👉 ';
  font-size: 13px;
}

/* 3카드 모드 위쪽 안내 메시지 — currentStep 강조 */
.three-instruction {
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  margin: 6px 0 14px;
  padding: 8px 14px;
  background: rgba(180, 140, 242, 0.06);
  border: 1px dashed rgba(180, 140, 242, 0.25);
  border-radius: 8px;
  line-height: 1.5;
}
.three-instruction strong {
  color: var(--accent);
}
.three-instruction.done {
  color: var(--good, #81c784);
  border-color: rgba(129, 199, 132, 0.3);
  background: rgba(129, 199, 132, 0.06);
}
.three-instruction.done strong { color: var(--good, #81c784); }

/* ===================================================================
   범용 토스트 (화면 상단 잠시 표시되는 메시지)
   =================================================================== */
.uy-toast-host {
  position: fixed;
  top: env(safe-area-inset-top, 0);
  left: 0; right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 16px;
  pointer-events: none;
  z-index: 9990;
}
.uy-toast {
  pointer-events: auto;
  max-width: calc(100% - 32px);
  padding: 11px 18px;
  background: rgba(35, 39, 48, 0.95);
  border: 1px solid var(--tarot-accent);
  border-radius: 999px;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.4;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: uyToastIn 0.22s ease-out;
}
.uy-toast.hiding {
  animation: uyToastOut 0.28s ease-in forwards;
}
.uy-toast strong { color: var(--accent); font-weight: 700; }
@keyframes uyToastIn {
  from { transform: translateY(-12px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
@keyframes uyToastOut {
  to { transform: translateY(-12px); opacity: 0; }
}
ent: '👉 ';
  font-size: 13px;
}

/* 3카드 모드 위쪽 안내 메시지 — currentStep 강조 */
.three-instruction {
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  margin: 6px 0 14px;
  padding: 8px 14px;
  background: rgba(180, 140, 242, 0.06);
  border: 1px dashed rgba(180, 140, 242, 0.25);
  border-radius: 8px;
  line-height: 1.5;
}
.three-instruction strong {
  color: var(--accent);
}
.three-instruction.done {
  color: var(--good, #81c784);
  border-color: rgba(129, 199, 132, 0.3);
  background: rgba(129, 199, 132, 0.06);
}
.three-instruction.done strong { color: var(--good, #81c784); }

/* ===== Auth + 집사레벨 배지 ===== */

/* ===== 집사레벨 배지 (결과 화면 상단) ===== */
.user-level-badge {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(201,169,97,0.08), rgba(180,140,242,0.08));
  border: 1px solid rgba(201,169,97,0.25);
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 13px;
}
.ulb-title {
  color: #b48cf2; font-weight: 700; font-size: 12px;
  padding: 2px 8px; background: rgba(180,140,242,0.12);
  border: 1px solid rgba(180,140,242,0.3); border-radius: 999px;
}
.ulb-name { color: #c9a961; font-weight: 700; font-size: 14px; }
.ulb-level {
  color: #81c784; font-size: 12px; font-weight: 700;
  padding: 2px 8px; background: rgba(129,199,132,0.1);
  border: 1px solid rgba(129,199,132,0.3); border-radius: 999px;
}
.ulb-xp { color: #9ba0ab; font-size: 11px; margin-left: auto; }
.uy-toast-success { background: rgba(129,199,132,0.92); color: #1a2b1a; border-color: #81c784; }
