/* apps/color/style.css — 퍼스널 컬러 테스트: 창가 자연광 같은 도자기빛 흰 바탕에 따뜻한 빛·시원한 빛이 양쪽에서 스며드는 톤.
 * 그림 = 색 칩 꽃잎 8장이 둘러싼 컬러 부채. 결과 페이지는 그 결과 색(--c-*)으로 카드·이름·소제목이 물든다.
 * 모바일 한 줄(--app-width 480px). 글꼴은 언어 파일 fonts → :root 변수(--font-display 등, 생성기가 이 파일 뒤에 둔다).
 * 공통 타이틀 바(G.topBar)·끝 화면(data-mg-end)은 --mg-* 변수로만 색을 맞춘다.
 */
:root {
  --cream: #fbf5f7;
  --cream-2: #f6f4fb;
  --gold: #f7b98f;
  --gold-deep: #9a4f63;
  --mint: #c97b9a;
  --mint-deep: #6b3a55;
  --ink: #2a2027;
  --ink-dim: rgba(43, 29, 34, 0.74);
  --ink-faint: rgba(43, 29, 34, 0.5);
  --card: rgba(255, 255, 255, 0.72);
  --line: rgba(43, 29, 34, 0.12);
  /* 유형 색 (결과 페이지 body 의 style 이 덮어쓴다) */
  --c-main: #c97b9a;
  --c-deep: #6b3a55;
  --c-ink: #fbf5f7;

  --font-display: 'Playfair Display', var(--font-sans);
  --display-weight: 700;
  --wb: normal;
  --hyphens: manual;

  /* 공통 타이틀 바 · 언어 선택 */
  --mg-top-fg: var(--ink);
  --mg-top-badge-bg: linear-gradient(90deg, var(--mint-deep), var(--mint));
  --mg-top-badge-fg: #ffffff;
  --lang-bg: rgba(255, 255, 255, 0.8);
  --lang-fg: var(--ink);
  --lang-border: rgba(43, 29, 34, 0.18);
  /* 공통 끝 화면 */
  --mg-star-on: #e2a03f;
  --mg-star-off: rgba(43, 29, 34, 0.16);
  --mg-heart-bg: rgba(201, 123, 154, 0.12);
  --mg-heart-border: rgba(107, 58, 85, 0.4);
  --mg-heart-fg: #6b3a55;
  --mg-heart-on: #6b3a55;
  --mg-share-bg: rgba(255, 255, 255, 0.8);
  --mg-share-border: rgba(43, 29, 34, 0.14);
  --mg-x: var(--ink);
  --mg-tiktok: var(--ink);
  --mg-faq-bg: rgba(255, 255, 255, 0.75);
  --mg-faq-border: rgba(43, 29, 34, 0.12);
  --mg-end-retry-bg: linear-gradient(90deg, var(--mint-deep), var(--mint));
  --mg-end-retry-fg: #ffffff;
  --toast-bg: rgba(43, 29, 34, 0.92);
}

html { background: var(--cream); }
body.pc-body {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%) fixed;
  color: var(--ink);
  line-height: 1.6;
  word-break: var(--wb);
  hyphens: var(--hyphens);
  -webkit-hyphens: var(--hyphens);
}
body.pc-result-page {
  background:
    radial-gradient(ellipse 120% 40% at 50% -6%, color-mix(in srgb, var(--c-main) 20%, transparent), transparent 70%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%) fixed;
}
[hidden] { display: none !important; }
a { color: inherit; }

/* 제목·버튼 글꼴: base.css 의 :lang(zh|th|vi) 규칙보다 뒤에서 다시 지정 */
.pc-h1, .pc-kicker, .pc-h1-main, .pc-h1-main em, .pc-badge, .pc-btn, .pc-q-text, .pc-q-num, .pc-result-name, .pc-eyebrow, .pc-vibe, .pc-sub,
.pc-loading-text, .pc-cta strong, .pc-doc h1, .pc-progress-num, .pc-meta span, .pc-lean-label, .pc-lean-end, .pc-keys li {
  font-family: var(--font-display);
}

/* ---------------- 배경: 두 빛 덩어리 + 반짝이 (고정, 가로 넘침 없음) ---------------- */
.pc-sky { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.pc-blob { position: absolute; width: 340px; height: 340px; border-radius: 50%; filter: blur(52px); opacity: 0.42; animation: pc-breathe 14s ease-in-out infinite alternate; }
.pc-blob-w { top: -90px; left: calc(50% - 330px); background: #f7c59f; }
.pc-blob-c { bottom: -110px; right: calc(50% - 330px); background: #a8c4ef; animation-delay: -7s; }
.pc-dot { position: absolute; width: 12px; height: 12px; border-radius: 50%; opacity: 0.7; animation: pc-twinkle 5s ease-in-out infinite; }
.pc-dot-1 { top: 22%; left: 7%; background: #f4a6a6; }
.pc-dot-2 { top: 58%; right: 8%; background: #9fd8d0; animation-delay: -1.6s; }
.pc-dot-3 { top: 86%; left: 18%; background: #c3b1ea; animation-delay: -3s; }
@keyframes pc-breathe { from { transform: scale(0.92) translate(0, 0); } to { transform: scale(1.08) translate(18px, 14px); } }
@keyframes pc-twinkle { 0%, 100% { transform: scale(0.6); opacity: 0.3; } 50% { transform: scale(1.1); opacity: 0.85; } }

.mg-top, .pc-shell { position: relative; z-index: 1; }

/* ---------------- 공통 레이아웃 ---------------- */
.pc-shell { max-width: var(--app-width); margin: 0 auto; padding: 8px 16px 0; }
.pc-screen { padding-top: 12px; }

.pc-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 58px;
  padding: 12px 20px;
  border: 0; border-radius: 999px;
  font-size: 21px; font-weight: var(--display-weight);
  line-height: 1.25;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pc-btn-primary {
  background: linear-gradient(90deg, var(--mint-deep), var(--mint));
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(60, 20, 40, 0.3);
  box-shadow: 0 5px 0 #4a2338, 0 12px 26px rgba(201, 123, 154, 0.35);
}
.pc-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #4a2338; }
.pc-btn:focus-visible, .pc-choice:focus-visible, .pc-back:focus-visible { outline: 3px dashed var(--gold-deep); outline-offset: 4px; }

/* ---------------- 그림: 에너지 구슬 + 이모지 ---------------- */
.pc-hero { position: relative; display: grid; place-items: center; width: 184px; height: 184px; margin: 8px auto 0; }
.pc-fan {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  filter: drop-shadow(0 10px 18px color-mix(in srgb, var(--h-main) 30%, transparent));
  animation: pc-spin 48s linear infinite;
}
.pc-emo {
  position: relative; font-size: 48px; line-height: 1;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  animation: pc-bob 2.6s ease-in-out infinite;
}
.pc-q {
  position: absolute; right: 4px; top: 4px; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: #ffffff; color: var(--mint-deep); border: 3px solid var(--mint);
  font: 700 28px/1 'Playfair Display', Georgia, serif;
  box-shadow: 0 4px 10px rgba(107, 58, 85, 0.25);
  animation: pc-bob 2.2s ease-in-out infinite reverse;
}
@keyframes pc-spin { to { transform: rotate(360deg); } }
@keyframes pc-bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-5px) rotate(4deg); } }
.pc-hero-loading { width: 168px; height: 168px; margin-bottom: 14px; }
.pc-hero-loading .pc-emo { font-size: 46px; animation-duration: 0.8s; }
.pc-hero-loading .pc-fan { animation-duration: 3s; }
.pc-hero-result { width: 172px; height: 172px; margin: 0 auto; }
.pc-hero-result .pc-emo { font-size: 46px; }

/* ---------------- 시작 화면 (티징만) ---------------- */
.pc-start { text-align: center; padding-top: 16px; }
.pc-badge {
  display: inline-block; margin: 0 0 4px;
  padding: 5px 14px; border-radius: 999px;
  background: #ffffff; border: 1.5px solid rgba(201, 123, 154, 0.6);
  color: var(--mint-deep); font-size: 15px; font-weight: var(--display-weight); line-height: 1.3;
  box-shadow: 0 3px 10px rgba(201, 123, 154, 0.18);
}
.pc-h1 { margin: 10px 0 10px; line-height: 1.15; font-weight: var(--display-weight); }
.pc-kicker { display: block; margin-bottom: 8px; font-size: 17px; color: var(--gold-deep); }
.pc-h1-main { display: block; font-size: 36px; line-height: 1.2; color: var(--ink); }
.pc-h1-main em {
  font-style: normal;
  background: linear-gradient(90deg, var(--gold-deep), var(--mint-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pc-hook { margin: 0 auto 14px; max-width: 380px; font-size: 16px; color: var(--ink-dim); }
.pc-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; font-size: 15px; color: var(--ink-dim); }
.pc-meta span { padding: 4px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }

/* ---------------- 질문 ---------------- */
.pc-progress-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pc-back {
  flex: 0 0 auto; width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1.5px solid var(--line); border-radius: 50%;
  background: var(--card); color: var(--ink); cursor: pointer;
}
.pc-progress { flex: 1; height: 12px; border-radius: 999px; background: rgba(43, 29, 34, 0.08); overflow: hidden; }
.pc-progress-fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--mint-deep), var(--mint)); transition: width 0.3s ease; }
.pc-progress-num { flex: 0 0 auto; font-size: 16px; color: var(--ink-dim); min-width: 3.4em; text-align: right; }

.pc-q-card {
  position: relative;
  padding: 20px 16px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(107, 58, 85, 0.12);
  animation: pc-in 0.28s ease;
}
@keyframes pc-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pc-q-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.pc-q-emoji { font-size: 28px; line-height: 1; }
.pc-q-num { font-size: 17px; color: var(--gold-deep); font-weight: var(--display-weight); }
.pc-q-text { margin: 0 0 16px; font-size: 21px; line-height: 1.4; font-weight: var(--display-weight); color: var(--ink); }
.pc-choices { display: flex; flex-direction: column; gap: 10px; }
.pc-choice {
  width: 100%; min-height: 54px;
  padding: 12px 16px;
  text-align: left;
  border: 1.5px solid rgba(43, 29, 34, 0.14);
  border-radius: 16px;
  background: #ffffff;
  color: var(--ink);
  font-size: 16px; line-height: 1.4; font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
@media (hover: hover) { .pc-choice:hover { border-color: var(--mint); background: #fbf5f7; } }
.pc-choice:active { transform: scale(0.985); }
.pc-choice.is-picked { border-color: var(--mint-deep); background: linear-gradient(90deg, rgba(247, 185, 143, 0.18), rgba(168, 196, 239, 0.22)); box-shadow: 0 0 0 2px rgba(201, 123, 154, 0.45); }
.pc-quiz .mg-ad { margin-top: 20px; }

/* ---------------- 계산 중 ---------------- */
.pc-loading { text-align: center; padding: 40px 0; }
.pc-loading-text { margin: 0 0 4px; font-size: 23px; font-weight: var(--display-weight); }
.pc-loading-sub { margin: 0; font-size: 14px; color: var(--mint-deep); }

/* ---------------- 결과 ---------------- */
.pc-cta {
  display: flex; align-items: center; gap: 12px;
  margin: 8px 0 14px; padding: 12px 16px;
  border-radius: 18px; border: 1.5px solid rgba(201, 123, 154, 0.5);
  background: rgba(255, 255, 255, 0.85); color: var(--ink); text-decoration: none;
}
.pc-cta-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.35; }
.pc-cta-text strong { font-size: 17px; font-weight: var(--display-weight); color: var(--gold-deep); }
.pc-cta-text span { font-size: 14px; color: var(--ink-dim); }
.pc-cta-arrow { font-size: 22px; color: var(--gold-deep); }

.pc-card {
  position: relative;
  margin-top: 14px; padding: 18px 18px 20px;
  text-align: center;
  background: linear-gradient(180deg, #ffffff, var(--c-ink));
  border: 1.5px solid color-mix(in srgb, var(--c-main) 40%, transparent);
  border-radius: 24px;
  box-shadow: 0 18px 40px color-mix(in srgb, var(--c-main) 18%, transparent);
}
.pc-eyebrow { margin: 6px 0 0; font-size: 16px; font-weight: var(--display-weight); color: var(--ink-dim); }
.pc-result-title { margin: 6px 0 0; line-height: 1.2; }
.pc-result-name { display: block; font-size: 33px; font-weight: var(--display-weight); line-height: 1.2; color: var(--c-deep); overflow-wrap: break-word; }
.pc-vibe { margin: 10px 0 0; font-size: 18px; line-height: 1.45; font-weight: var(--display-weight); color: var(--ink); }

/* 내 답이 기운 쪽 (방금 푼 사람만, 점 위치는 result.js 가 채움) */
.pc-lean { margin: 16px 0 0; padding: 12px 14px; border-radius: 18px; background: #ffffff; border: 1px solid var(--line); text-align: left; }
.pc-lean-label { display: block; font-size: 14px; font-weight: var(--display-weight); color: var(--ink-dim); margin-bottom: 6px; }
.pc-lean-row { display: grid; grid-template-columns: minmax(56px, 26%) 1fr minmax(56px, 26%); align-items: center; gap: 10px; margin: 8px 0 0; font-size: 13.5px; line-height: 1.25; }
.pc-lean-end { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.pc-lean-end-r { text-align: right; }
.pc-lean-track { position: relative; display: block; height: 10px; border-radius: 999px; background: linear-gradient(90deg, #f7c59f, #ece6ef 50%, #a8c4ef); }
.pc-lean-row:nth-of-type(2) .pc-lean-track { background: linear-gradient(90deg, #fbf3e9, #b9a4b0 50%, #3b2a36); }
.pc-lean-row:nth-of-type(3) .pc-lean-track { background: linear-gradient(90deg, #ff5d8f, #d9b3c2 50%, #b8adb3); }
.pc-lean-dot { position: absolute; top: 50%; left: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: #ffffff; border: 4px solid var(--c-deep); box-shadow: 0 2px 6px rgba(42, 32, 39, 0.3); transition: left 0.8s ease; }

.pc-same {
  display: inline-block; margin: 12px 0 0; padding: 4px 14px; border-radius: 999px;
  background: #ffffff; border: 1.5px dashed color-mix(in srgb, var(--c-main) 60%, transparent);
  color: var(--c-deep); font-size: 13.5px; font-weight: 700;
}
.pc-desc { margin: 14px 0 4px; font-size: 15.5px; line-height: 1.75; color: var(--ink-dim); text-align: left; }
.pc-sub { margin: 16px 0 8px; font-size: 18px; font-weight: var(--display-weight); color: var(--c-deep); text-align: left; line-height: 1.3; }
.pc-keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.pc-keys li {
  padding: 4px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--c-main) 14%, #ffffff); border: 1px solid color-mix(in srgb, var(--c-main) 45%, transparent);
  color: var(--c-deep); font-size: 14px; font-weight: var(--display-weight); line-height: 1.35;
}
/* 색 칩 (베스트 8 · 피할 색 4) */
.pc-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 8px; margin: 0; padding: 0; list-style: none; }
.pc-sw { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.pc-chip { display: block; width: 100%; aspect-ratio: 1 / 1; max-width: 72px; border-radius: 16px; border: 2px solid #ffffff; box-shadow: 0 0 0 1px var(--line), 0 4px 10px rgba(42, 32, 39, 0.12); }
.pc-hex { font: 600 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-faint); letter-spacing: 0.02em; }
.pc-sw-avoid .pc-chip { position: relative; opacity: 0.85; }
.pc-sw-avoid .pc-chip::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(to top right, transparent calc(50% - 1.5px), rgba(255, 255, 255, 0.95) calc(50% - 1.5px), rgba(255, 255, 255, 0.95) calc(50% + 1.5px), transparent calc(50% + 1.5px));
}
.pc-avoid-note { margin: 8px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-dim); text-align: left; }
.pc-notes { display: grid; gap: 10px; margin-top: 16px; text-align: left; }
.pc-note { padding: 2px 14px 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.85); border: 1px dashed color-mix(in srgb, var(--c-main) 45%, transparent); }
.pc-note .pc-sub { margin: 10px 0 4px; font-size: 16px; }
.pc-note p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-dim); }

/* 재미용 안내 (전문 진단 아님) */
.pc-disclaimer { margin: 14px 0 0; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.7); border: 1px dashed rgba(43, 29, 34, 0.2); font-size: 13px; line-height: 1.5; color: var(--ink-dim); text-align: center; }

/* ---------------- 개인정보 ---------------- */
.pc-doc { padding: 16px 0; font-size: 15px; line-height: 1.75; color: var(--ink-dim); }
.pc-doc h1 { font-size: 28px; color: var(--ink); margin: 8px 0 12px; line-height: 1.3; }
.pc-doc h2 { font-size: 17px; color: var(--gold-deep); margin: 22px 0 6px; }
.pc-doc a { text-decoration: underline; }

.site-footer { position: relative; z-index: 1; color: var(--ink-faint); }

/* 언어별 조정 */
html:lang(th) .pc-body { line-height: 1.75; }
html:lang(th) :is(.pc-h1-main, .pc-result-name, .pc-q-text, .pc-vibe) { line-height: 1.5; letter-spacing: 0; }
html:lang(th) :is(.pc-kicker, .pc-badge, .pc-lean-label) { letter-spacing: 0; }
html:lang(vi) :is(.pc-h1-main, .pc-result-name, .pc-q-text) { line-height: 1.4; }
html:lang(ru) .pc-doc h1 { line-height: 1.25; }
html:lang(ja) :is(.pc-h1-main, .pc-result-name, .pc-q-text, .pc-vibe) { word-break: auto-phrase; }
html:lang(ko) :is(.pc-h1-main, .pc-result-name, .pc-q-text, .pc-vibe, .pc-hook, .pc-desc, .pc-note p) { word-break: keep-all; }

@media (max-width: 374px) {
  .pc-h1-main { font-size: 31px; }
  .pc-result-name { font-size: 29px; }
  .pc-q-text { font-size: 19px; }
  .pc-hero-result { width: 156px; height: 156px; }
  .pc-hero-result .pc-emo { font-size: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .pc-blob, .pc-dot, .pc-fan, .pc-emo, .pc-q, .pc-q-card { animation: none !important; }
  .pc-progress-fill, .pc-btn, .pc-choice, .pc-lean-dot { transition: none; }
}
