/* play.sciencepark.work — 공통 테마/컴포넌트 (모든 서비스 페이지가 공유) */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css");

:root {
  --bg: #0a0718;
  --bg2: #120c29;
  --panel: rgba(26, 20, 56, 0.75);
  --panel2: rgba(36, 28, 77, 0.65);
  --gold: #f5c862;
  --gold2: #ffe299;
  --ink: #f4f2ff;
  --muted: #a69fdb;
  --accent: #8270f8;
  --accent2: #6350e6;
  --good: #4ade80;
  --bad: #ff6b7b;
  --line: rgba(130, 112, 248, 0.22);
  --line-gold: rgba(245, 200, 98, 0.35);
  --glow-gold: 0 0 28px rgba(245, 200, 98, 0.28);
  --glow-accent: 0 0 24px rgba(130, 112, 248, 0.32);
}

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

body {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: 
    radial-gradient(1000px 500px at 50% -5%, rgba(130, 112, 248, 0.22) 0%, transparent 70%),
    radial-gradient(800px 600px at 85% 100%, rgba(99, 80, 230, 0.15) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
  background-attachment: fixed;
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }
.wrap { max-width: 580px; margin: 0 auto; padding: 12px 18px 72px; }

/* ---- 헤더 / 메뉴탭 ---- */
.appnav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 4px 12px;
  flex-wrap: wrap;
}
.appnav .brand {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.2px;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.appnav .brand b {
  background: linear-gradient(135deg, var(--gold2), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.appnav .tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  flex: 1;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding: 2px 0;
}
.appnav .tabs::-webkit-scrollbar { display: none; }
.appnav .tab {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.18s ease;
}
.appnav .tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}
.appnav .tab.active {
  color: var(--gold2);
  border-color: var(--line-gold);
  background: rgba(245, 200, 98, 0.12);
  box-shadow: 0 0 12px rgba(245, 200, 98, 0.15);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.appnav .vault-btn {
  font-size: 12.5px;
  color: var(--ink);
  background: rgba(36, 28, 77, 0.85);
  border: 1px solid var(--line);
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}
.appnav .vault-btn:hover {
  border-color: var(--accent);
  background: rgba(130, 112, 248, 0.2);
  transform: translateY(-1px);
}

.appnav .donate {
  font-size: 12.5px;
  color: #0b0718;
  background: linear-gradient(135deg, var(--gold2), var(--gold));
  padding: 7px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(245, 200, 98, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.appnav .donate:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(245, 200, 98, 0.45);
}

/* ---- 공통 히어로 ---- */
.hero { text-align: center; margin: 16px 0 26px; }
.hero h1 {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.32;
  letter-spacing: -0.6px;
}
.hero h1 .g {
  background: linear-gradient(135deg, var(--gold2) 20%, var(--gold) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  color: var(--muted);
  font-size: 14.5px;
  margin-top: 10px;
  line-height: 1.55;
  font-weight: 400;
}

/* ---- 포털 서비스 그리드 ---- */
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.svc-card {
  background: linear-gradient(175deg, rgba(35, 26, 74, 0.8), rgba(18, 12, 42, 0.9));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 18px;
  text-decoration: none;
  display: block;
  position: relative;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}
.svc-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), var(--glow-accent);
}
.svc-card .emoji { font-size: 32px; display: block; margin-bottom: 10px; }
.svc-card .t { font-size: 16px; font-weight: 800; color: var(--ink); letter-spacing: -0.3px; }
.svc-card .d { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.svc-card.soon { opacity: 0.5; pointer-events: none; }
.svc-card .badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 10.5px;
  font-weight: 800;
  border-radius: 999px;
  padding: 3px 9px;
}
.svc-card .badge.live { color: #071e11; background: var(--good); box-shadow: 0 0 10px rgba(74, 222, 128, 0.4); }
.svc-card .badge.soon { color: var(--muted); background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); }

/* ---- 카드(폼/결과 컨테이너) ---- */
.card {
  background: linear-gradient(175deg, rgba(30, 23, 64, 0.85), rgba(15, 10, 36, 0.95));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}
label { display: block; font-size: 13.5px; color: var(--muted); margin: 16px 0 7px; font-weight: 700; }
input, select, textarea {
  width: 100%;
  background: rgba(24, 18, 54, 0.85);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(130, 112, 248, 0.25);
}
textarea { resize: none; min-height: 72px; line-height: 1.5; }
.cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cat {
  background: rgba(24, 18, 54, 0.7);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  text-align: center;
  font-size: 14px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.18s ease;
  user-select: none;
}
.cat:hover { border-color: var(--accent); background: rgba(130, 112, 248, 0.12); }
.cat.on {
  border-color: var(--gold);
  background: rgba(245, 200, 98, 0.16);
  color: var(--gold2);
  box-shadow: 0 0 14px rgba(245, 200, 98, 0.2);
}
.btn {
  width: 100%;
  margin-top: 22px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 16px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 8px 28px rgba(130, 112, 248, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 32px rgba(130, 112, 248, 0.55);
}
.btn:active { transform: scale(0.99); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.hint { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 14px; }
.err {
  color: var(--bad);
  font-size: 13.5px;
  text-align: center;
  margin-top: 14px;
  display: none;
  background: rgba(255, 107, 123, 0.12);
  border: 1px solid rgba(255, 107, 123, 0.3);
  padding: 10px;
  border-radius: 12px;
}

/* ---- 로딩 오버레이 + 대기열 ---- */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(8, 5, 22, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.overlay.on { display: flex; }
.overlay .box { text-align: center; max-width: 360px; }
.orb {
  width: 80px;
  height: 80px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--gold), var(--accent2), var(--accent));
  animation: spin 1.4s linear infinite;
  mask: radial-gradient(circle 30px at center, transparent 98%, #000 100%);
  -webkit-mask: radial-gradient(circle 30px at center, transparent 98%, #000 100%);
  filter: drop-shadow(0 0 18px rgba(130, 112, 248, 0.6));
}
@keyframes spin { to { transform: rotate(360deg); } }
.q1 { color: var(--gold2); font-weight: 900; font-size: 18px; letter-spacing: -0.3px; }
.q2 { color: var(--muted); font-size: 14px; margin-top: 8px; min-height: 20px; }
.qbar { margin: 18px auto 0; width: 220px; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.qbar i {
  display: block;
  height: 100%;
  width: 35%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  animation: slide 1.3s ease-in-out infinite;
}
@keyframes slide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }

/* ---- 결과 카드 (운세 등 공통) ---- */
.result { display: none; }
.result.reveal-anim {
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.imgwrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line-gold);
  background: radial-gradient(circle at center, rgba(45, 33, 94, 0.8), rgba(16, 11, 38, 0.95));
  aspect-ratio: 2/3;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), var(--glow-gold);
}
.imgwrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.imgwrap .ph { color: var(--muted); font-size: 13.5px; padding: 0 16px; text-align: center; }

/* 이미지 생성이 스킵/실패했을 때 사유(result.image_note). 카드 위에 겹쳐 띄운다 —
   .imgwrap 이 flex 라 일반 흐름에 두면 이미지와 나란히 눌리므로 absolute 로 고정한다. */
.imgwrap .img-note {
  position: absolute;
  left: 10px; right: 10px; bottom: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(10, 7, 26, 0.86);
  border: 1px solid var(--line-gold);
  backdrop-filter: blur(6px);
  color: var(--gold2);
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
}

/* ---- 3D 카드 플립 인터랙션 (타로 등) ---- */
.flip-container {
  perspective: 1200px;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  cursor: pointer;
}
.flip-card {
  width: 100%;
  aspect-ratio: 2/3;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.85s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}
.flip-card.flipped { transform: rotateY(180deg); }
.flip-front, .flip-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid var(--line-gold);
}
.flip-front {
  background: radial-gradient(circle at 50% 35%, #2a1b54 0%, #12092a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  box-shadow: inset 0 0 40px rgba(245, 200, 98, 0.15);
}
.flip-front .rune-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px dashed var(--gold);
  display: grid;
  place-items: center;
  font-size: 42px;
  color: var(--gold2);
  margin-bottom: 18px;
  animation: pulseRotate 12s linear infinite;
  box-shadow: 0 0 24px rgba(245, 200, 98, 0.25);
}
@keyframes pulseRotate {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.04); }
  100% { transform: rotate(360deg) scale(1); }
}
.flip-front .front-hint {
  font-size: 14px;
  font-weight: 800;
  color: var(--gold2);
  letter-spacing: -0.2px;
}
.flip-front .front-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.flip-back {
  transform: rotateY(180deg);
  background: var(--panel2);
}
.flip-back img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 플립 뒷면(타로)에도 동일한 사유 배지 — .flip-back 은 inset:0 absolute 라 그대로 겹쳐 얹힌다. */
.flip-back .img-note {
  position: absolute;
  left: 10px; right: 10px; bottom: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(10, 7, 26, 0.86);
  border: 1px solid var(--line-gold);
  color: var(--gold2);
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
}

/* ---- 결과 상세 요소 ---- */
.rtitle {
  text-align: center;
  font-size: 25px;
  font-weight: 900;
  margin: 20px 0 6px;
  color: var(--gold2);
  letter-spacing: -0.5px;
}
.gauge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 16px 0 8px;
}
.ring {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(255, 255, 255, 0.08) 0);
  filter: drop-shadow(0 0 10px rgba(245, 200, 98, 0.3));
}
.ring i {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: #150e30;
  display: grid;
  place-items: center;
  font-size: 27px;
  font-weight: 900;
  font-style: normal;
  color: var(--gold2);
}
.gauge .lbl { font-size: 13.5px; color: var(--muted); }
.gauge .lbl b { display: block; color: var(--ink); font-size: 16px; font-weight: 800; }

.summary {
  background: rgba(30, 22, 66, 0.85);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  font-size: 15px;
  line-height: 1.6;
  margin: 16px 0;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
}
.rows { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.row {
  display: flex;
  gap: 12px;
  font-size: 14.5px;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.row .k { flex: 0 0 70px; color: var(--gold2); font-weight: 800; }
.row .v { color: var(--ink); flex: 1; }

.lucky { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; justify-content: center; }
.chip {
  background: rgba(35, 26, 75, 0.8);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--muted);
}
.chip b { color: var(--gold2); }

.kw { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 6px; justify-content: center; }
.kw span {
  background: rgba(130, 112, 248, 0.16);
  border: 1px solid rgba(130, 112, 248, 0.4);
  color: #d8d0ff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
}

.advice {
  text-align: center;
  font-size: 15.5px;
  color: var(--gold2);
  font-weight: 800;
  margin: 18px 0 6px;
  padding: 0 10px;
  line-height: 1.5;
}

/* ---- 공유 버튼 세트 ---- */
.share { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; margin-top: 20px; }
.share button {
  background: rgba(32, 24, 68, 0.9);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 14px;
  padding: 14px 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.share button:hover { border-color: var(--accent); background: rgba(130, 112, 248, 0.2); }
.share button:active { transform: scale(0.98); }
.share button.btn-save-card {
  background: linear-gradient(135deg, rgba(245, 200, 98, 0.2), rgba(130, 112, 248, 0.25));
  border-color: var(--line-gold);
  color: var(--gold2);
}

.donate-cta {
  margin-top: 20px;
  text-align: center;
  background: rgba(245, 200, 98, 0.08);
  border: 1px dashed var(--gold);
  border-radius: 16px;
  padding: 18px;
}
.donate-cta p { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.donate-cta button {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold2), var(--gold));
  color: #0b0718;
  font-weight: 800;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14.5px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 18px rgba(245, 200, 98, 0.3);
  transition: transform 0.15s ease;
}
.donate-cta button:hover { transform: translateY(-1px); }

.again {
  width: 100%;
  margin-top: 16px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 14px;
  padding: 14px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s ease;
}
.again:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.25); }

footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 32px;
  line-height: 1.7;
}

/* ---- 후원 모달 ---- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 4, 18, 0.85);
  z-index: 90;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal.on { display: flex; }
.modal-card {
  background: linear-gradient(175deg, rgba(34, 25, 75, 0.95), rgba(18, 12, 45, 0.98));
  border: 1px solid var(--line-gold);
  border-radius: 24px;
  padding: 28px 24px 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7), var(--glow-gold);
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  transition: color 0.15s ease;
}
.modal-close:hover { color: var(--ink); }
.modal-card h3 { font-size: 20px; color: var(--gold2); font-weight: 900; margin-bottom: 6px; }
.modal-sub { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; line-height: 1.5; }
.qr {
  width: 210px;
  height: 210px;
  background: #fff;
  border-radius: 16px;
  padding: 10px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.acct {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  text-align: left;
  background: rgba(24, 18, 54, 0.9);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 15px;
  margin: 18px 0 12px;
}
.acct-info { font-size: 14px; line-height: 1.45; }
.acct-info b { color: var(--gold2); }
.acct-info span { font-size: 12px; color: var(--muted); }
.acct button {
  background: linear-gradient(135deg, var(--gold2), var(--gold));
  color: #0b0718;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(245, 200, 98, 0.3);
}
.modal-card .note { color: var(--muted); font-size: 12px; }

/* ---- 후원자 응원 롤링 배너 (Donation Ticker) ---- */
.donation-ticker-wrap {
  margin: 18px 0 6px;
  background: rgba(245, 200, 98, 0.06);
  border: 1px solid rgba(245, 200, 98, 0.25);
  border-radius: 14px;
  padding: 10px 14px;
  overflow: hidden;
  position: relative;
}
.ticker-head {
  font-size: 11.5px;
  color: var(--gold2);
  font-weight: 800;
  margin-bottom: 6px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 5px;
}
.ticker-viewport {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}
.ticker-track {
  display: inline-block;
  animation: marquee 24s linear infinite;
  font-size: 12.5px;
  color: var(--ink);
}
.ticker-track span {
  display: inline-block;
  margin-right: 32px;
}
.ticker-track span b {
  color: var(--gold2);
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---- 🗂️ 내 카드 보관함 (Vault) 모달 & 그리드 ---- */
.vault-modal-card {
  background: linear-gradient(175deg, rgba(30, 22, 66, 0.96), rgba(16, 11, 40, 0.98));
  border: 1px solid var(--line-gold);
  border-radius: 24px;
  padding: 24px 20px 20px;
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7), var(--glow-gold);
}
.vault-header { text-align: left; margin-bottom: 14px; }
.vault-header h3 { font-size: 19px; color: var(--gold2); font-weight: 900; }
.vault-header p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.vault-body {
  overflow-y: auto;
  flex: 1;
  padding-right: 4px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.vault-body::-webkit-scrollbar { width: 4px; }
.vault-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }

.vault-item {
  background: rgba(24, 18, 54, 0.85);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  position: relative;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.18s ease;
}
.vault-item:hover {
  border-color: var(--gold);
  background: rgba(130, 112, 248, 0.15);
  transform: translateY(-2px);
}
.vault-thumb {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 10px;
  overflow: hidden;
  background: #110c28;
  margin-bottom: 8px;
  border: 1px solid rgba(255,255,255,0.06);
  display: grid;
  place-items: center;
}
.vault-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vault-meta .vt { font-size: 13.5px; font-weight: 800; color: var(--ink); line-height: 1.3; }
.vault-meta .vd { font-size: 11px; color: var(--muted); margin-top: 4px; }
.vault-del-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,0.6);
  color: var(--bad);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 12px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.15s ease;
}
.vault-del-btn:hover { transform: scale(1.15); background: rgba(255, 107, 123, 0.3); }

.vault-empty {
  grid-column: span 2;
  text-align: center;
  padding: 40px 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.vault-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.vault-actions button {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
}
.vault-actions button:hover { color: var(--ink); text-decoration: underline; }

/* ---- 토스트 알림 ---- */
.play-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(50px);
  opacity: 0;
  background: rgba(20, 15, 46, 0.94);
  border: 1px solid var(--line-gold);
  color: var(--gold2);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), var(--glow-gold);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.play-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   ✨ 3D 인터랙티브 틸트 & 홀로그램 프리즘 포일 카드
   ========================================================================== */
.card-3d-wrap {
  perspective: 1000px;
  display: block;
  width: 100%;
  margin: 0 auto;
}
.card-3d-box {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.4, 1), box-shadow 0.2s ease;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  touch-action: pan-y;
}
.card-3d-box:hover {
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6), var(--glow-gold);
}
/* 홀로그램 오로라 프리즘 포일 오버레이 */
.card-3d-foil {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: color-dodge;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.6) 0%,
    rgba(255, 226, 153, 0.35) 25%,
    rgba(130, 112, 248, 0.3) 50%,
    rgba(74, 222, 128, 0.2) 75%,
    transparent 100%
  );
  transition: opacity 0.25s ease;
  z-index: 2;
}
.card-3d-box:hover .card-3d-foil,
.card-3d-box.touching .card-3d-foil {
  opacity: 0.85;
}
.card-3d-glare {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0) 60%
  );
  mix-blend-mode: overlay;
  transition: opacity 0.2s ease;
  z-index: 3;
}
.card-3d-box:hover .card-3d-glare,
.card-3d-box.touching .card-3d-glare {
  opacity: 1;
}

/* ==========================================================================
   ⭐️ 실시간 별점 & 후기 위젯 (평점 4.5+ 극찬 유도)
   ========================================================================== */
.rating-section {
  margin-top: 24px;
  background: linear-gradient(180deg, rgba(35, 26, 74, 0.65) 0%, rgba(18, 13, 40, 0.85) 100%);
  border: 1px solid var(--line-gold);
  border-radius: 18px;
  padding: 22px 18px;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}
.rating-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.rating-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--gold2);
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}
.rating-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.star-row {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.star-btn {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.22);
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  line-height: 1;
  padding: 2px 4px;
}
.star-btn:hover,
.star-btn.on {
  color: var(--gold);
  text-shadow: 0 0 14px rgba(245, 200, 98, 0.7);
  transform: scale(1.22);
}
.star-feedback {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  min-height: 20px;
}

/* 별점 모달 (한줄평 작성) */
.review-modal-card {
  background: linear-gradient(180deg, #1f1642 0%, #110b27 100%);
  border: 1px solid var(--line-gold);
  border-radius: 20px;
  max-width: 420px;
  width: 90%;
  padding: 24px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), var(--glow-gold);
  position: relative;
  text-align: left;
}
.review-modal-card h4 {
  font-size: 18px;
  font-weight: 900;
  color: var(--gold2);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.review-modal-card p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.review-input-group {
  margin-bottom: 14px;
}
.review-input-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.review-input-group input,
.review-input-group textarea {
  width: 100%;
  background: rgba(10, 7, 24, 0.7);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  padding: 10px 14px;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease;
}
.review-input-group input:focus,
.review-input-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(245, 200, 98, 0.2);
}
.review-input-group textarea {
  resize: none;
  height: 72px;
}
.review-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--gold2), var(--gold));
  color: #0d091e;
  font-size: 15px;
  font-weight: 800;
  border: none;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(245, 200, 98, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.review-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 200, 98, 0.45);
}

/* ==========================================================================
   ☕ 후원 서버비 게이지 (Crowdfunding Bar)
   ========================================================================== */
.funding-gauge {
  background: rgba(10, 7, 24, 0.6);
  border: 1px solid var(--line-gold);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 16px 0;
  text-align: left;
}
.funding-gauge-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold2);
  margin-bottom: 8px;
}
.funding-gauge-pct {
  color: var(--good);
  font-weight: 900;
  font-size: 14px;
}
.funding-bar-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.funding-bar-fill {
  width: 84%; /* 실시간 서버비 달성률 */
  height: 100%;
  background: linear-gradient(90deg, #8270f8, #f5c862, #4ade80);
  border-radius: 999px;
  position: relative;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.funding-bar-fill::after {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 100%
  );
  animation: shimmer 2.2s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.funding-gauge-foot {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 6px;
}

/* ==========================================================================
   💎 소름 돋는 디테일 카드 (Golden Time, Person Watch, Insights)
   ========================================================================== */
.insight-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 12px 0;
  text-align: left;
}
.insight-card.gold-border {
  border-color: var(--line-gold);
  background: rgba(245, 200, 98, 0.05);
}
.insight-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--gold2);
  margin-bottom: 6px;
}
.insight-body {
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.55;
}

/* 상단 만족도 배지 */
.rating-badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 200, 98, 0.12);
  border: 1px solid var(--line-gold);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 800;
  color: var(--gold2);
  margin-bottom: 12px;
  box-shadow: 0 0 14px rgba(245, 200, 98, 0.15);
}
.rating-badge-chip b {
  color: #fff;
}

/* ==========================================================================
   🍱 모던 벤토 그리드 레이아웃 (Modern Bento Grid Layout)
   ========================================================================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  margin: 16px 0 20px;
  text-align: left;
}
.bento-card {
  background: linear-gradient(175deg, rgba(32, 25, 68, 0.8), rgba(16, 11, 38, 0.94));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  position: relative;
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.bento-card:hover {
  border-color: rgba(130, 112, 248, 0.35);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5), 0 0 20px rgba(130, 112, 248, 0.12);
}
.bento-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--gold2);
  margin-bottom: 12px;
  letter-spacing: -0.2px;
}
.bento-col-12 { grid-column: span 12; }
.bento-col-8  { grid-column: span 8; }
.bento-col-7  { grid-column: span 7; }
.bento-col-6  { grid-column: span 6; }
.bento-col-5  { grid-column: span 5; }
.bento-col-4  { grid-column: span 4; }

@media (max-width: 720px) {
  .bento-grid { gap: 12px; }
  .bento-col-8, .bento-col-7, .bento-col-6, .bento-col-5, .bento-col-4 {
    grid-column: span 12;
  }
}

/* 카드 비주얼 전용 벤토 스타일 */
.bento-card.card-feature-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 16px;
  background: radial-gradient(circle at 50% 20%, rgba(130, 112, 248, 0.15), transparent 75%),
              linear-gradient(175deg, rgba(32, 25, 68, 0.8), rgba(16, 11, 38, 0.95));
}
.bento-card.score-feature-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.card-caption {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 10px;
  text-align: center;
}

/* 인사이트 그리드 */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 600px) {
  .insights-grid {
    grid-template-columns: 1fr;
  }
}
.insights-grid .insight-card {
  margin: 0;
  height: 100%;
}

/* ---- 스마트 사주/별자리 칩 피드백 ---- */
.astro-tag-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 6px;
  animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.astro-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(130, 112, 248, 0.12);
  border: 1px solid rgba(130, 112, 248, 0.3);
  color: #d8d0ff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.astro-tag-chip.gold {
  background: rgba(245, 200, 98, 0.12);
  border-color: rgba(245, 200, 98, 0.35);
  color: var(--gold2);
}
.astro-tag-chip.good {
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.3);
  color: #86efac;
}

/* ---- 포털 서비스 카드별 테마 오로라 백라이트 ---- */
.svc-card.theme-fortune {
  --svc-accent: #8270f8;
  --svc-glow: rgba(130, 112, 248, 0.28);
  --svc-border: rgba(130, 112, 248, 0.4);
}
.svc-card.theme-tarot {
  --svc-accent: #c084fc;
  --svc-glow: rgba(192, 132, 252, 0.28);
  --svc-border: rgba(192, 132, 252, 0.4);
}
.svc-card.theme-dream {
  --svc-accent: #38bdf8;
  --svc-glow: rgba(56, 189, 248, 0.28);
  --svc-border: rgba(56, 189, 248, 0.4);
}
.svc-card.theme-stock {
  --svc-accent: #10b981;
  --svc-glow: rgba(16, 185, 129, 0.28);
  --svc-border: rgba(16, 185, 129, 0.4);
}
.svc-card.theme-mbti {
  --svc-accent: #f43f5e;
  --svc-glow: rgba(244, 63, 94, 0.28);
  --svc-border: rgba(244, 63, 94, 0.4);
}
.svc-card.theme-psycho {
  --svc-accent: #ec4899;
  --svc-glow: rgba(236, 72, 153, 0.28);
  --svc-border: rgba(236, 72, 153, 0.4);
}
.svc-card.theme-pastlife {
  --svc-accent: #f59e0b;
  --svc-glow: rgba(245, 158, 11, 0.28);
  --svc-border: rgba(245, 158, 11, 0.4);
}
.svc-card.theme-shooter {
  --svc-accent: #06b6d4;
  --svc-glow: rgba(6, 182, 212, 0.28);
  --svc-border: rgba(6, 182, 212, 0.4);
}
.svc-card.theme-fps {
  --svc-accent: #f97316;
  --svc-glow: rgba(249, 115, 22, 0.28);
  --svc-border: rgba(249, 115, 22, 0.4);
}

.svc-card[class*="theme-"]::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--svc-accent, var(--accent)), transparent);
  border-radius: 20px 20px 0 0;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}
.svc-card[class*="theme-"]:hover::before {
  opacity: 1;
}
.svc-card[class*="theme-"]:hover {
  border-color: var(--svc-border, var(--accent));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), 0 0 32px var(--svc-glow, var(--glow-accent));
}

