/* ============================================================
   FireLab 심리테스트 — 공용 디자인 시스템
   모든 게이트/테스트 페이지가 이 파일 하나를 공유합니다.
   새 테스트를 추가할 때 이 파일을 수정할 일은 거의 없습니다.
   자세한 규칙은 ../GUIDE.md 참고.
   ============================================================ */

/* ---------- 1. 디자인 토큰 ---------- */
:root {
  /* 브랜드 */
  --brand:      #6C5CE7;
  --brand-soft: #EFECFF;
  --brand2:     #FF7A9A;

  /* 표면 (라이트) */
  --bg:      #FBF8F3;
  --bg2:     #F3EEE6;
  --surface: #FFFFFF;
  --ink:     #1B1A2A;
  --ink-2:   #3E3B52;
  --muted:   #6E6A82;
  --line:    #E8E1D6;
  --line-2:  #D8CFC0;
  --shadow:  0 2px 0 rgba(27,26,42,.06), 0 14px 34px -18px rgba(27,26,42,.34);
  --shadow-lift: 0 4px 0 rgba(27,26,42,.07), 0 26px 50px -20px rgba(27,26,42,.42);

  /* 테스트별 테마색 (각 페이지에서 인라인으로 덮어씀) */
  --c1: #6C5CE7;
  --c2: #FF7A9A;
  --on-c: #FFFFFF;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;

  --maxw: 1120px;
  --maxw-test: 520px;

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
          "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --font-hand: "Gaegu", var(--font);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand:      #8F80FF;
    --brand-soft: #262238;
    --brand2:     #FF8FAB;
    --bg:      #100F17;
    --bg2:     #15141F;
    --surface: #1B1A26;
    --ink:     #F1EEE9;
    --ink-2:   #D6D2E0;
    --muted:   #9A96AC;
    --line:    #2B2939;
    --line-2:  #3A3750;
    --shadow:  0 2px 0 rgba(0,0,0,.32), 0 16px 34px -18px rgba(0,0,0,.8);
    --shadow-lift: 0 4px 0 rgba(0,0,0,.36), 0 28px 52px -20px rgba(0,0,0,.9);
  }
}
/* 수동 토글(헤더의 달/해 버튼)이 OS 설정을 이깁니다 */
:root[data-theme="light"] {
  --brand:#6C5CE7; --brand-soft:#EFECFF; --brand2:#FF7A9A;
  --bg:#FBF8F3; --bg2:#F3EEE6; --surface:#FFFFFF;
  --ink:#1B1A2A; --ink-2:#3E3B52; --muted:#6E6A82;
  --line:#E8E1D6; --line-2:#D8CFC0;
  --shadow:0 2px 0 rgba(27,26,42,.06), 0 14px 34px -18px rgba(27,26,42,.34);
  --shadow-lift:0 4px 0 rgba(27,26,42,.07), 0 26px 50px -20px rgba(27,26,42,.42);
}
:root[data-theme="dark"] {
  --brand:#8F80FF; --brand-soft:#262238; --brand2:#FF8FAB;
  --bg:#100F17; --bg2:#15141F; --surface:#1B1A26;
  --ink:#F1EEE9; --ink-2:#D6D2E0; --muted:#9A96AC;
  --line:#2B2939; --line-2:#3A3750;
  --shadow:0 2px 0 rgba(0,0,0,.32), 0 16px 34px -18px rgba(0,0,0,.8);
  --shadow-lift:0 4px 0 rgba(0,0,0,.36), 0 28px 52px -20px rgba(0,0,0,.9);
}

/* ---------- 2. 리셋 & 바탕 ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.62;
  letter-spacing: -0.011em;
  overflow-x: hidden;
  touch-action: manipulation;
}
/* 아주 옅은 종이 질감 — 단색 배경의 심심함을 덜어줍니다 */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { body::before { mix-blend-mode: screen; opacity: .35; } }
:root[data-theme="dark"] body::before { mix-blend-mode: screen; opacity: .35; }

img, svg { max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }

/* 상단 뒤에 깔리는 브랜드 오로라 */
.aurora {
  position: fixed; inset: -20% -10% auto -10%; height: 70vh; z-index: 0;
  pointer-events: none; filter: blur(70px); opacity: .5;
}
.aurora i { position: absolute; display: block; border-radius: 50%; }
.aurora i:nth-child(1) { width: 46vw; height: 46vw; left: -6vw;  top: 4vh;  background: var(--c1); opacity: .55; }
.aurora i:nth-child(2) { width: 40vw; height: 40vw; right: -4vw; top: 0;    background: var(--c2); opacity: .5; }
.aurora i:nth-child(3) { width: 34vw; height: 34vw; left: 38vw;  top: 18vh; background: var(--brand); opacity: .32; }
@media (prefers-reduced-motion: no-preference) {
  .aurora i { animation: drift 22s ease-in-out infinite alternate; }
  .aurora i:nth-child(2) { animation-duration: 28s; animation-delay: -6s; }
  .aurora i:nth-child(3) { animation-duration: 34s; animation-delay: -12s; }
}
@keyframes drift {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(4vw,5vh,0) scale(1.12); }
}

/* ---------- 3. 레이아웃 ---------- */
.wrap { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: var(--maxw-test); }
.stack > * + * { margin-top: 14px; }

.topbar {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: var(--maxw); margin: 0 auto; padding: 16px 20px;
}
.topbar.narrow { max-width: var(--maxw-test); }
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 1rem; text-decoration: none; letter-spacing: -0.02em;
}
.brand .mark {
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff; font-size: .82rem; font-weight: 900;
  box-shadow: 0 6px 14px -6px var(--brand);
}
.brand b { color: var(--brand); }
.topnav { display: flex; align-items: center; gap: 6px; }
.topnav a {
  color: var(--muted); text-decoration: none; font-size: .88rem; font-weight: 600;
  padding: 7px 10px; border-radius: 10px;
}
.topnav a:hover { color: var(--ink); background: var(--bg2); }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); border-radius: 11px;
  cursor: pointer; font-size: 1rem; line-height: 1;
}
.icon-btn:hover { border-color: var(--line-2); }

/* ---------- 4. 공통 컴포넌트 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.pad { padding: 22px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; line-height: 1.4;
  background: var(--bg2); color: var(--muted); border: 1px solid var(--line);
  white-space: nowrap;
}
.chip.solid { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.chip.onc { background: rgba(255,255,255,.22); color: var(--on-c); border-color: rgba(255,255,255,.3); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 15px; border: 1px solid transparent;
  font-weight: 800; font-size: .97rem; text-decoration: none; cursor: pointer;
  background: var(--ink); color: var(--bg);
  transition: transform .12s ease, box-shadow .18s ease, opacity .15s ease;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn-primary {
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: var(--on-c);
  box-shadow: 0 10px 26px -12px var(--c1);
}
.btn-primary:hover { box-shadow: 0 16px 34px -12px var(--c1); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--bg2); }
.btn-block { width: 100%; }
.btn-lg { padding: 17px 26px; font-size: 1.05rem; border-radius: 17px; }
.btn-sm { padding: 10px 15px; font-size: .86rem; border-radius: 12px; }

h1, h2, h3 { letter-spacing: -0.035em; line-height: 1.28; margin: 0; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- 5. 게이트(목록) 페이지 ---------- */
.hero { position: relative; z-index: 1; padding: 26px 0 30px; text-align: center; }
.hero h1 { font-size: clamp(1.9rem, 6.2vw, 3.1rem); font-weight: 900; }
.hero h1 .grad {
  background: linear-gradient(120deg, var(--brand), var(--brand2) 65%, #FFB86B);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--muted); font-size: clamp(.95rem, 2.6vw, 1.06rem); margin: 12px auto 0; max-width: 34em; }
.hero .kicker {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 14px;
  padding: 7px 14px; border-radius: 999px; font-size: .8rem; font-weight: 700;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  box-shadow: var(--shadow);
}
.hero .kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: #21C08B; }

.filters { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 14px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters button {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  padding: 9px 16px; border-radius: 999px; font-size: .89rem; font-weight: 700; cursor: pointer;
  white-space: nowrap; transition: all .15s ease;
}
.filters button:hover { color: var(--ink); }
.filters button[aria-pressed="true"] {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
}

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 940px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.tcard {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); text-decoration: none; color: inherit;
  transition: transform .18s ease, box-shadow .22s ease, border-color .18s ease;
}
.tcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--line-2); }
.tcard .thumb {
  position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--tc1), var(--tc2));
  overflow: hidden;
}
.tcard .thumb::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 80% at 18% 12%, rgba(255,255,255,.42), transparent 60%),
    radial-gradient(50% 70% at 88% 92%, rgba(0,0,0,.16), transparent 62%);
}
.tcard .thumb .em {
  position: relative; z-index: 1; font-size: clamp(2.6rem, 7vw, 3.4rem);
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.22));
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.tcard:hover .thumb .em { transform: scale(1.12) rotate(-5deg); }
.tcard .thumb .deco { position: absolute; inset: 0; opacity: .28; }
.tcard .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tcard h2 { font-size: 1.12rem; font-weight: 800; }
.tcard .desc { color: var(--muted); font-size: .9rem; margin: 0; flex: 1; }
.tcard .meta { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); font-weight: 600; }
.tcard .meta .sep { opacity: .4; }
.tcard .badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  padding: 5px 11px; border-radius: 999px; font-size: .72rem; font-weight: 800;
  background: rgba(255,255,255,.92); color: #1B1A2A; backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px -4px rgba(0,0,0,.4);
}
.tcard .done {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.92); color: #21A179; font-size: .8rem; font-weight: 900;
  box-shadow: 0 4px 12px -4px rgba(0,0,0,.4);
}

.section-title {
  display: flex; align-items: baseline; gap: 10px; margin: 34px 0 14px;
}
.section-title h2 { font-size: 1.22rem; font-weight: 800; }
.section-title span { font-size: .85rem; color: var(--muted); }

.foot {
  position: relative; z-index: 1;
  margin-top: 48px; padding: 26px 0 44px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .82rem; text-align: center;
}
.foot a { color: var(--muted); }
.foot .links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }

/* ---------- 6. 테스트 진행 화면 ---------- */
.screen { position: relative; z-index: 1; }
.screen[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .fade-in { animation: fadeUp .34s cubic-bezier(.22,.85,.3,1) both; }
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* 인트로 */
.intro-hero {
  position: relative; border-radius: var(--r-xl); overflow: hidden;
  background: linear-gradient(145deg, var(--c1), var(--c2));
  color: var(--on-c); padding: 34px 24px 30px; text-align: center;
  box-shadow: 0 24px 50px -26px var(--c1);
}
.intro-hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(55% 70% at 15% 8%, rgba(255,255,255,.4), transparent 62%),
    radial-gradient(45% 60% at 90% 96%, rgba(0,0,0,.2), transparent 60%);
  pointer-events: none;
}
/* 밝은 테마색을 쓰는 결과에서도 흰 글자가 읽히도록 아주 옅은 그림자를 깝니다 */
.intro-hero > *, .rhero > * { position: relative; z-index: 1; text-shadow: 0 1px 10px rgba(0,0,0,.22); }
.intro-hero .chips > *, .rhero .hash > * { text-shadow: none; }
.intro-hero .big { font-size: 4rem; line-height: 1; filter: drop-shadow(0 10px 18px rgba(0,0,0,.25)); }
@media (prefers-reduced-motion: no-preference) {
  .intro-hero .big { animation: bob 3.4s ease-in-out infinite; }
}
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-9px) rotate(3deg); } }
.intro-hero h1 { font-size: clamp(1.6rem, 6vw, 2.1rem); font-weight: 900; margin: 14px 0 8px; }
.intro-hero .sub { opacity: .93; font-size: .98rem; }
.intro-hero .chips { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

.bullets { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.bullets li { display: flex; gap: 11px; align-items: flex-start; font-size: .94rem; color: var(--ink-2); }
.bullets li .n {
  flex: none; width: 23px; height: 23px; border-radius: 8px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-size: .76rem; font-weight: 900; margin-top: 2px;
}

/* 문항 */
.qhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.qcount { font-size: .84rem; font-weight: 800; color: var(--muted); }
.qcount b { color: var(--c1); font-size: 1.05rem; }
.progress { height: 8px; border-radius: 999px; background: var(--bg2); overflow: hidden; border: 1px solid var(--line); }
.progress i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--c1), var(--c2));
  transition: width .38s cubic-bezier(.22,.85,.3,1);
}
.qbox { margin-top: 26px; }
.qtext {
  font-size: clamp(1.18rem, 4.6vw, 1.42rem); font-weight: 800; line-height: 1.45;
  margin: 0 0 20px; word-break: keep-all;
}
.qtext .qem { display: block; font-size: 2.2rem; margin-bottom: 10px; }
.choices { display: grid; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 16px 17px; border-radius: var(--r-md); cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line);
  font-size: .98rem; font-weight: 600; line-height: 1.5; color: var(--ink);
  word-break: keep-all;
  transition: transform .14s ease, border-color .14s ease, background .14s ease, box-shadow .18s ease;
}
.choice .k {
  flex: none; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center;
  background: var(--bg2); color: var(--muted); font-size: .78rem; font-weight: 900;
  transition: all .14s ease;
}
.choice:hover { border-color: var(--c1); transform: translateX(3px); }
.choice:hover .k { background: var(--c1); color: var(--on-c); }
.choice.picked {
  border-color: var(--c1); background: linear-gradient(135deg, var(--c1), var(--c2));
  color: var(--on-c); box-shadow: 0 12px 26px -14px var(--c1);
}
.choice.picked .k { background: rgba(255,255,255,.26); color: var(--on-c); }
.qfoot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.link-btn {
  background: none; border: none; color: var(--muted); font-size: .88rem; font-weight: 700;
  cursor: pointer; padding: 8px 4px;
}
.link-btn:hover { color: var(--ink); }
.link-btn[disabled] { opacity: .35; cursor: default; }

/* 분석 중 */
.loading { text-align: center; padding: 60px 0 40px; }
.ring { width: 96px; height: 96px; margin: 0 auto 22px; position: relative; }
.ring svg { transform: rotate(-90deg); }
.ring .tr { stroke: var(--line); }
.ring .bar2 { stroke: url(#lg); stroke-linecap: round; transition: stroke-dashoffset .3s linear; }
.ring .pct {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 1.1rem; font-weight: 900; color: var(--c1);
}
.loading .msg { font-size: 1.02rem; font-weight: 700; min-height: 1.6em; }
.loading .sub { color: var(--muted); font-size: .88rem; margin-top: 6px; }

/* ---------- 7. 결과 화면 ---------- */
.rhero {
  position: relative; border-radius: var(--r-xl); overflow: hidden; text-align: center;
  background: linear-gradient(145deg, var(--c1), var(--c2));
  color: var(--on-c); padding: 30px 22px 28px;
  box-shadow: 0 26px 54px -26px var(--c1);
}
.rhero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 75% at 12% 6%, rgba(255,255,255,.42), transparent 60%),
    radial-gradient(50% 60% at 92% 98%, rgba(0,0,0,.22), transparent 60%);
}
.rhero .cap { font-size: .82rem; font-weight: 800; opacity: .88; letter-spacing: .02em; }
.rhero .big { font-size: 5rem; line-height: 1.05; margin: 6px 0 2px; filter: drop-shadow(0 12px 20px rgba(0,0,0,.26)); }
.rhero h1 { font-size: clamp(1.55rem, 6.4vw, 2.15rem); font-weight: 900; margin: 8px 0 6px; word-break: keep-all; }
.rhero .tag { font-size: 1rem; opacity: .95; font-weight: 600; word-break: keep-all; }
.rhero .hash { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 15px; }

.sec { margin-top: 16px; }
.sec h3 {
  display: flex; align-items: center; gap: 8px;
  font-size: 1.02rem; font-weight: 800; margin: 0 0 13px;
}
.sec h3::before {
  content: ""; width: 4px; height: 15px; border-radius: 3px;
  background: linear-gradient(180deg, var(--c1), var(--c2));
}
.sec p { margin: 0 0 11px; font-size: .96rem; color: var(--ink-2); word-break: keep-all; }
.sec p:last-child { margin-bottom: 0; }

.bars { display: grid; gap: 13px; }
.bar .lab { display: flex; justify-content: space-between; font-size: .87rem; font-weight: 700; margin-bottom: 5px; }
.bar .lab span:last-child { color: var(--c1); }
.bar .track { height: 9px; border-radius: 999px; background: var(--bg2); overflow: hidden; }
.bar .track i {
  display: block; height: 100%; border-radius: 999px; width: 0;
  background: linear-gradient(90deg, var(--c1), var(--c2));
  transition: width .9s cubic-bezier(.22,.85,.3,1);
}

.gauge { text-align: center; }
.gauge .num { font-size: 3.2rem; font-weight: 900; line-height: 1; color: var(--c1); }
.gauge .num small { font-size: 1.1rem; font-weight: 800; }
.gauge .track { height: 12px; border-radius: 999px; background: var(--bg2); overflow: hidden; margin: 16px 0 8px; }
.gauge .track i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #4ECDA4, #F7C948 55%, #FF6B6B); transition: width 1s cubic-bezier(.22,.85,.3,1); }
.gauge .scale { display: flex; justify-content: space-between; font-size: .74rem; color: var(--muted); font-weight: 700; }

.pills { display: grid; gap: 8px; }
.pill {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 14px; background: var(--bg2);
  font-size: .92rem; color: var(--ink-2); word-break: keep-all;
}
.pill .ic { flex: none; }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .duo { grid-template-columns: 1fr; } }
.mate {
  padding: 15px 14px; border-radius: var(--r-md); border: 1.5px solid var(--line); text-align: center;
}
.mate.good { border-color: #7ED9B6; background: rgba(126,217,182,.1); }
.mate.bad  { border-color: #FFAFAF; background: rgba(255,175,175,.1); }
.mate .role { font-size: .76rem; font-weight: 800; color: var(--muted); }
.mate .em { font-size: 2rem; line-height: 1.2; margin: 4px 0 2px; }
.mate .nm { font-weight: 800; font-size: .98rem; }
.mate .why { font-size: .83rem; color: var(--muted); margin-top: 5px; word-break: keep-all; }

.quote {
  padding: 18px; border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--c1), var(--c2)); color: var(--on-c);
  font-family: var(--font-hand); font-size: 1.32rem; font-weight: 700; text-align: center;
  line-height: 1.5; word-break: keep-all;
  box-shadow: 0 16px 34px -20px var(--c1);
}

.share-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.share-btn {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 13px 6px; border-radius: 15px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line);
  font-size: .74rem; font-weight: 700; color: var(--ink-2);
}
.share-btn:hover { border-color: var(--c1); color: var(--c1); }
.share-btn .ic { font-size: 1.24rem; line-height: 1; }

.alltypes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 420px) { .alltypes { grid-template-columns: repeat(3, 1fr); } }
.alltypes .t {
  padding: 11px 6px; border-radius: 13px; background: var(--bg2); text-align: center;
  font-size: .76rem; font-weight: 700; color: var(--muted); line-height: 1.35;
}
.alltypes .t .e { display: block; font-size: 1.4rem; margin-bottom: 3px; filter: grayscale(1); opacity: .55; }
.alltypes .t.me { background: linear-gradient(135deg, var(--c1), var(--c2)); color: var(--on-c); }
.alltypes .t.me .e { filter: none; opacity: 1; }

.reco { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .reco { grid-template-columns: 1fr; } }
.reco a {
  display: flex; gap: 11px; align-items: center; text-decoration: none;
  padding: 12px; border-radius: var(--r-md); background: var(--surface);
  border: 1px solid var(--line); color: inherit;
  transition: transform .16s ease, border-color .16s ease;
}
.reco a:hover { transform: translateY(-2px); border-color: var(--line-2); }
.reco .th {
  flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  font-size: 1.4rem; background: linear-gradient(140deg, var(--tc1), var(--tc2));
}
.reco .tx { min-width: 0; }
.reco .tx b { display: block; font-size: .92rem; font-weight: 800; }
.reco .tx span { font-size: .78rem; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.disclaimer {
  font-size: .8rem; color: var(--muted); line-height: 1.6;
  padding: 15px 16px; border-radius: var(--r-md); background: var(--bg2); word-break: keep-all;
}
.disclaimer b { color: var(--ink-2); }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  z-index: 50; padding: 12px 20px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-size: .88rem; font-weight: 700;
  opacity: 0; pointer-events: none; transition: all .26s cubic-bezier(.22,.85,.3,1);
  box-shadow: 0 14px 30px -12px rgba(0,0,0,.6);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.confetti { position: fixed; inset: 0; z-index: 40; pointer-events: none; }

/* 결과 페이지 하단 여백 */
.bottom-pad { height: 40px; }
