/* =========================================================
   하루테스트 — 감성 심리테스트 포털
   mobile first (390×844 기준)
   ========================================================= */

@font-face {
  font-family: "Pretendard";
  src: url("../assets/fonts/Pretendard-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("../assets/fonts/Pretendard-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("../assets/fonts/Pretendard-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fffcf8;
  --surface: #ffffff;
  --ink: #25232c;
  --ink-2: #4b4855;
  --muted: #8b8794;
  --muted-2: #aaa5af;
  --line: #f1ece4;
  --line-2: #e6dfd4;
  --beige: #faf6f0;
  --brand: #ff7f96;
  --brand-2: #b79bf0;
  --accent: #ff7f96;
  --soft: #fff0f3;
  --radius: 24px;
  --shadow-card: 0 18px 38px -26px rgba(63, 46, 33, 0.55);
  --shadow-soft: 0 8px 22px -16px rgba(63, 46, 33, 0.5);
  --head-h: 58px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(120% 60% at 50% 0%, #ffeef0 0%, rgba(255, 238, 240, 0) 55%),
    #f4efe7;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}

img { max-width: 100%; }

button { font: inherit; color: inherit; }

a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.app {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--bg);
  overflow-x: hidden;
}

@media (min-width: 520px) {
  body { padding: 0 0 40px; }
  .app {
    margin-top: 18px;
    border-radius: 28px;
    box-shadow: 0 30px 80px -40px rgba(70, 48, 30, 0.55);
    min-height: calc(100dvh - 36px);
  }
}

.screen { padding-bottom: 28px; }
.screen[hidden] { display: none; }

/* ---------- 공통 텍스트 ---------- */
.kicker {
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent, var(--brand));
  text-transform: uppercase;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: var(--soft);
  color: var(--accent);
  white-space: nowrap;
}
.chip--glass {
  background: rgba(255, 255, 255, 0.82);
  color: #4b4855;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(40, 30, 25, 0.08);
}

/* ---------- 홈 헤더 ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: var(--head-h);
  padding: 0 18px;
  background: rgba(255, 252, 248, 0.9);
  backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid rgba(240, 234, 225, 0.7);
}

.logo { display: inline-flex; align-items: center; gap: 9px; }
.logo__mark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(140deg, #ff9aae 0%, #ff7f96 45%, #b79bf0 100%);
  box-shadow: 0 6px 14px -8px rgba(255, 111, 137, 0.9);
}
.logo__mark svg { width: 17px; height: 17px; }
.logo__text {
  display: flex;
  flex-direction: column;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.logo__text em {
  font-style: normal;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #b3adb8;
  margin-top: 2px;
}
.head__badge {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #8f7f6e;
  background: #f6efe4;
  border: 1px solid #ece2d4;
  padding: 4px 9px;
  border-radius: 999px;
}

/* ---------- 홈 히어로 ---------- */
.home-hero {
  padding: 26px 20px 22px;
  background:
    radial-gradient(80% 120% at 8% 0%, rgba(255, 203, 210, 0.34) 0%, rgba(255, 203, 210, 0) 58%),
    radial-gradient(90% 120% at 96% 12%, rgba(206, 189, 246, 0.28) 0%, rgba(206, 189, 246, 0) 56%),
    linear-gradient(180deg, #fffdfa 0%, #fffcf8 100%);
}
.home-hero__title {
  margin: 10px 0 0;
  font-size: 31px;
  line-height: 1.24;
  letter-spacing: -0.045em;
  font-weight: 700;
}
.home-hero__title span {
  color: #4b3ac9;
  -webkit-text-fill-color: #4b3ac9;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}
.home-hero__desc {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.65;
  color: #6c6774;
}
.home-hero__stats {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}
.home-hero__stats span {
  flex: 1;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  padding: 9px 4px;
  text-align: center;
  font-size: 11.5px;
  color: #7d7785;
  box-shadow: 0 6px 16px -14px rgba(80, 50, 40, 0.6);
}
.home-hero__stats b {
  display: block;
  font-size: 17px;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.head-right { display: flex; align-items: center; gap: 10px; }
.head-link {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #6f6a76;
  padding: 5px 2px;
}
.head-link:hover { color: #3f3b48; }

/* ---------- 카테고리 탭 ---------- */
.tabs {
  position: sticky;
  top: var(--head-h);
  z-index: 35;
  display: flex;
  gap: 8px;
  padding: 10px 16px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  background: linear-gradient(180deg, rgba(255, 252, 248, 0.97) 72%, rgba(255, 252, 248, 0.86) 100%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(240, 234, 225, 0.6);
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: 0 0 auto;
  border: 1px solid var(--line-2);
  background: #fff;
  color: #7b7683;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 8px 15px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.18s;
}
.tab:hover { border-color: #d9d0c3; }
.tab:active { transform: scale(0.97); }
.tab[aria-selected="true"] {
  background: #2c2a33;
  border-color: #2c2a33;
  color: #fff;
  box-shadow: 0 8px 16px -12px rgba(30, 25, 25, 0.9);
}

/* ---------- 피드 ---------- */
.feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 16px 8px;
}

.test-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.test-card:hover { transform: translateY(-2px); box-shadow: 0 24px 44px -28px rgba(63, 46, 33, 0.6); }
.test-card:active { transform: scale(0.992); }
.test-card[hidden] { display: none; }

.test-card__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--soft, #f6f1ea);
}
.test-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.test-card:hover .test-card__media img { transform: scale(1.035); }
.test-card__media .chip { position: absolute; top: 12px; left: 12px; }

.test-card__body { display: block; padding: 16px 18px 18px; }
.test-card__title {
  display: block;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.32;
}
.test-card__sub {
  display: block;
  margin: 6px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}
.test-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted-2);
}
.test-card__meta span { display: inline-flex; align-items: center; gap: 6px; }
.test-card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: #d8d2c9; }
.test-card__go {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--accent);
  font-size: 15px;
  flex: 0 0 auto;
}

/* ---------- 광고 슬롯 (AdSense 승인 후에만 DOM 생성) ---------- */
.ad-wrap { margin: 18px 0 4px; }
/* 승인 전에는 buildAd()가 null을 돌려줘 컨테이너가 빈 채로 남는다 → 자리도 차지하지 않게 */
.ad-wrap:empty { display: none; margin: 0; }

.ad { background: transparent; }
.ad__label {
  display: block;
  text-align: center;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #b9ad9c;
  margin-bottom: 5px;
}
.ad .adsbygoogle {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 90px;
  background: transparent;
}

/* ---------- 함께 읽을 심리 칼럼 ---------- */
.columns { display: flex; flex-direction: column; gap: 10px; }
.column-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px 17px 15px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
}
.column-card:hover { transform: translateY(-1px); border-color: #e8e0d3; box-shadow: 0 16px 28px -22px rgba(63, 46, 33, 0.6); }
.column-card__tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #a8826e;
  background: #f8f1e8;
  border-radius: 999px;
  padding: 3px 9px;
}
.column-card h3 {
  margin: 9px 0 5px;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.03em;
  color: #2f2c38;
}
.column-card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
}
.column-card__meta {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 600;
  color: #b8ada0;
}
.columns__more {
  margin: 14px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  color: #8d7c66;
}

/* 화면 안에 넣는 컴팩트 칼럼 카드 */
.column-card--compact { padding: 13px 15px; }
.column-card--compact h3 { font-size: 14px; margin: 6px 0 3px; }
.column-card--compact p { font-size: 12px; }
/* 화면 안 카드가 바로 위 요소(facts·pairs)에 붙지 않게 */
.preview .column-card, .result .column-card { margin-top: 16px; }

/* ---------- 섹션 / 아코디언 ---------- */
.section { padding: 34px 18px 6px; }
.section__head { margin-bottom: 14px; }
.section__head h2 {
  margin: 7px 0 0;
  font-size: 21px;
  letter-spacing: -0.04em;
  font-weight: 700;
}
.section__desc {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.68;
  color: var(--muted);
}

.accordion { border-top: 1px solid var(--line); }

.acc { border-bottom: 1px solid var(--line); }
.acc summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 2px;
  cursor: pointer;
  list-style: none;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: "+";
  margin-left: auto;
  font-size: 17px;
  font-weight: 400;
  color: #c0b8ac;
  transition: transform 0.2s;
}
.acc[open] summary::after { transform: rotate(45deg); color: var(--accent, var(--brand)); }
.acc__code {
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
  background: linear-gradient(135deg, #ff9aae, #b79bf0);
  border-radius: 8px;
  padding: 4px 7px;
  min-width: 47px;
  text-align: center;
}
.acc summary .acc__nick {
  font-weight: 400;
  color: var(--muted);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acc__body {
  padding: 2px 2px 18px;
  font-size: 13.5px;
  line-height: 1.78;
  color: #5d5966;
}
.acc__body p { margin: 0 0 10px; }
.acc__body p:last-child { margin-bottom: 0; }
.acc__love {
  background: var(--beige);
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 13px;
  color: #6c6357;
}
.acc__love b { color: #a1795e; font-weight: 700; margin-right: 5px; }
.acc__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.acc__tags span {
  font-size: 11.5px;
  color: #8d8496;
  background: #f7f3f9;
  border-radius: 999px;
  padding: 3px 9px;
}

.accordion--faq .acc summary { font-size: 14px; line-height: 1.5; }
.accordion--faq .acc summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.6px solid #c0b8ac;
  border-bottom: 1.6px solid #c0b8ac;
  transform: rotate(45deg);
  margin-right: 4px;
  flex: 0 0 auto;
}
.accordion--faq .acc[open] summary::after { transform: rotate(-135deg); border-color: var(--brand); }
.accordion--faq .acc__body { font-size: 13px; }

/* ---------- 푸터 ---------- */
.site-foot {
  margin-top: 36px;
  padding: 24px 20px 30px;
  background: #faf6f0;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  line-height: 1.7;
  color: #a49d93;
}
.site-foot__brand {
  font-size: 14px;
  font-weight: 700;
  color: #6d675f;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.site-foot p { margin: 0 0 4px; }
.site-foot__meta { margin-top: 12px; color: #b8b1a7; }

/* ---------- 상단 바 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 54px;
  padding: 0 12px;
  background: rgba(255, 252, 248, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(240, 234, 225, 0.7);
}
.topbar--result { background: rgba(255, 252, 248, 0.96); }
.topbar--result .topbar__title { flex: 1; }
.topbar__title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #5b5662;
}
.topbar__spacer { width: 40px; }

.icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #4b4855;
  transition: background 0.16s;
  flex: 0 0 auto;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: rgba(0, 0, 0, 0.045); }

/* ---------- 시작 전 화면 ---------- */
.preview { padding: 12px 18px 34px; }

.preview__thumb {
  position: relative;
  margin: 4px 0 20px;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--soft);
  box-shadow: var(--shadow-card);
}
.preview__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview__thumb .chip { position: absolute; left: 14px; top: 14px; }

.preview__title {
  margin: 8px 0 0;
  font-size: 26px;
  line-height: 1.32;
  letter-spacing: -0.045em;
  font-weight: 700;
}
.preview__sub {
  margin: 8px 0 0;
  font-size: 15px;
  color: #6a6572;
  line-height: 1.6;
}
.preview__intro {
  margin: 16px 0 0;
  font-size: 13.5px;
  line-height: 1.82;
  color: #7c7784;
}

.facts {
  display: flex;
  gap: 8px;
  margin: 20px 0 2px;
  padding: 0;
  list-style: none;
}
.facts li {
  flex: 1;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 4px;
  font-size: 11.5px;
  color: var(--muted);
}
.facts b {
  display: block;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.02em;
}

/* ---------- 버튼 ---------- */
.btn {
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 15px 20px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.16s, box-shadow 0.16s, background 0.16s, opacity 0.16s;
}
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn--wide { width: 100%; }
.btn--primary {
  background: linear-gradient(135deg, var(--accent, #ff7f96) 0%, color-mix(in srgb, var(--accent, #ff7f96) 74%, #6d5bd0) 100%);
  color: #fff;
  box-shadow: 0 16px 26px -16px color-mix(in srgb, var(--accent, #ff7f96) 80%, transparent);
}
.btn--primary:hover { filter: brightness(1.03); }
.btn--ghost {
  background: #fff;
  border-color: var(--line-2);
  color: #5f5b67;
  font-weight: 600;
}
.btn--ghost:hover { background: #fbf8f2; }
.btn__icon { width: 19px; height: 19px; }

.preview .btn--primary { margin-top: 20px; }
.preview__hint {
  margin: 10px 0 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted-2);
}

/* ---------- 질문 화면 ---------- */
.screen--quiz {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}
.screen--quiz[hidden] { display: none; }

.quiz-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 10px;
  background: rgba(255, 252, 248, 0.94);
  backdrop-filter: blur(10px);
}
.progress {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 4px;
}
.progress__track {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: #f0e9df;
  overflow: hidden;
}
.progress__fill {
  display: block;
  height: 100%;
  width: 8.33%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent, #ff7f96), color-mix(in srgb, var(--accent, #ff7f96) 60%, #b79bf0));
  transition: width 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress__count {
  font-size: 12px;
  font-weight: 700;
  color: #8b8592;
  font-variant-numeric: tabular-nums;
  min-width: 42px;
  text-align: right;
}

.quiz-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px 20px 10px;
}
.quiz-step {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent, #ff7f96);
}
.quiz-q {
  margin: 12px 0 0;
  font-size: 23px;
  line-height: 1.42;
  letter-spacing: -0.045em;
  font-weight: 700;
  min-height: 96px;
}
.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}
.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--line-2);
  border-radius: 18px;
  padding: 17px 16px;
  font-size: 14.5px;
  line-height: 1.55;
  letter-spacing: -0.02em;
  color: #3f3c48;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s, transform 0.16s;
  box-shadow: 0 6px 18px -18px rgba(60, 45, 35, 0.7);
}
.choice:hover { border-color: color-mix(in srgb, var(--accent, #ff7f96) 45%, #ddd4c8); }
.choice:active { transform: scale(0.985); }
.choice__mark {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid #e2d9cc;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #b6ada0;
}
.choice.is-picked {
  background: var(--soft);
  border-color: var(--accent);
}
.choice.is-picked .choice__mark {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.quiz-note {
  margin: 4px 0 0;
  text-align: center;
  font-size: 11px;
  color: #bcb5a9;
}

@keyframes q-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.quiz-body.is-in .quiz-q,
.quiz-body.is-in .choices { animation: q-in 0.26s ease both; }

/* ---------- 결과 화면 ---------- */
.result { padding: 0 0 20px; }

.result__hero {
  position: relative;
  height: 372px;
  overflow: hidden;
  background: var(--soft);
}
.result__hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.result__hero-grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 16, 28, 0.2) 0%, rgba(20, 16, 28, 0) 28%, rgba(20, 16, 28, 0) 62%, rgba(255, 252, 248, 0.28) 100%);
}
.result__hero-top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.result__hero-top .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.result__hero-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 22px 14px;
  background: #fffcf8;
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -14px 30px -22px rgba(45, 32, 40, 0.55);
}
.result__label {
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #7d7583;
}
.result__code {
  margin: 3px 0 2px;
  font-size: 40px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent, #ff7f96);
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.7);
}
.result__title {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.045em;
  font-weight: 700;
  color: #2b2833;
}

.result__body { padding: 18px 20px 0; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.tags li {
  font-size: 12px;
  font-weight: 600;
  color: color-mix(in srgb, var(--accent, #ff7f96) 78%, #2b2833);
  background: var(--soft);
  border-radius: 999px;
  padding: 5px 11px;
}

.result__lines {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 4px 18px;
  box-shadow: var(--shadow-soft);
}
.result__line {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px dashed #efe9e0;
  font-size: 14px;
  line-height: 1.78;
  color: #514d5a;
  letter-spacing: -0.01em;
}
.result__line:last-child { border-bottom: 0; }
.result__line-num {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  border-radius: 7px;
  background: var(--soft);
  color: var(--accent, #ff7f96);
  font-size: 10.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.pairs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.pair {
  border-radius: 18px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pair--best { background: #edf7f0; border: 1px solid #d9eee0; }
.pair--caution { background: #fdf3ee; border: 1px solid #f4e2d8; }
.pair__head { font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; color: #8b9c8f; }
.pair--caution .pair__head { color: #b09183; }
.pair__code { font-size: 19px; font-weight: 700; letter-spacing: 0.02em; color: #2f4a38; }
.pair--caution .pair__code { color: #8a4a35; }
.pair__nick { font-size: 11px; line-height: 1.45; color: #7f8e83; }
.pair--caution .pair__nick { color: #a88476; }

.result__actions { margin-top: 18px; }
.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 9px;
}
.btn-row .btn { padding: 13px 10px; font-size: 14px; }

.result__disclaimer {
  margin: 12px 2px 0;
  font-size: 11px;
  line-height: 1.65;
  color: #b0a99e;
  text-align: center;
}

.more { margin-top: 34px; }
.more h2 {
  margin: 0 0 12px;
  font-size: 17px;
  letter-spacing: -0.035em;
  font-weight: 700;
}
.more__list { display: flex; flex-direction: column; gap: 9px; }
.more__item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 9px 12px 9px 9px;
  transition: background 0.16s, transform 0.16s;
}
.more__item:hover { background: #fdfaf5; transform: translateY(-1px); }
.more__item img {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
  flex: 0 0 auto;
  background: var(--soft);
}
.more__text { min-width: 0; flex: 1; }
.more__text strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.025em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.more__text span { font-size: 11.5px; color: var(--muted); }
.more__arrow { color: #c5bdb1; font-size: 15px; flex: 0 0 auto; }

/* ---------- 토스트 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  z-index: 60;
  max-width: min(86vw, 420px);
  background: rgba(36, 32, 40, 0.94);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 12px 18px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
  text-align: center;
  box-shadow: 0 18px 34px -20px rgba(0, 0, 0, 0.8);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 접근성 ---------- */
:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent, #ff7f96) 70%, #5b4bd6);
  outline-offset: 2px;
  border-radius: 8px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* =========================================================
   정적 페이지 (소개 · 정책 · 칼럼) — index.html과 같은 톤
   ========================================================= */
.app--page { max-width: 640px; }
@media (min-width: 700px) { .app--page { max-width: 680px; } }

.page { padding: 4px 20px 10px; }

.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 16px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted-2);
}
.crumb a { color: #8f8896; }
.crumb a:hover { color: #5f5b67; }
.crumb span[aria-current] { color: #b3adb8; }

.page-hero { padding: 20px 0 6px; }
.page-hero h1 {
  margin: 9px 0 0;
  font-size: 27px;
  line-height: 1.34;
  letter-spacing: -0.045em;
  font-weight: 700;
}
.page-hero__desc {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.8;
  color: #6c6774;
}
.page-hero__meta {
  margin: 12px 0 0;
  font-size: 11.5px;
  color: var(--muted-2);
}

.policy {
  margin-top: 20px;
  padding: 4px 2px 8px;
  font-size: 14px;
  line-height: 1.88;
  color: #4f4b58;
}
.policy > p:first-child { margin-top: 0; }
.policy h2 {
  margin: 32px 0 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.45;
  color: var(--ink);
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
.policy h2:first-of-type { border-top: 0; padding-top: 0; }
.policy h3 {
  margin: 20px 0 7px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #3f3b48;
}
.policy p { margin: 0 0 12px; }
.policy ul, .policy ol { margin: 0 0 14px; padding-left: 20px; }
.policy li { margin: 5px 0; }
.policy li::marker { color: #c9bfae; }
.policy a { color: #c25f78; border-bottom: 1px solid #f4dde2; }
.policy strong { color: #2f2b36; font-weight: 700; }
.policy__box {
  margin: 16px 0 0;
  background: #faf6f0;
  border: 1px solid #efe7db;
  border-radius: 16px;
  padding: 14px 15px;
  font-size: 13px;
  line-height: 1.8;
  color: #6b6357;
}
.policy__box p:last-child { margin-bottom: 0; }
.policy__updated {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted-2);
}

/* ---------- 칼럼 본문 ---------- */
.article { padding-bottom: 10px; }
.article h1 {
  margin: 9px 0 0;
  font-size: 26px;
  line-height: 1.38;
  letter-spacing: -0.045em;
  font-weight: 700;
}
.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 12px 0 0;
  font-size: 11.5px;
  color: var(--muted-2);
}
.article__lead {
  margin: 18px 0 0;
  font-size: 15.5px;
  line-height: 1.85;
  letter-spacing: -0.01em;
  color: #45414f;
}
.article__rule { margin: 22px 0 0; border: 0; border-top: 1px solid var(--line); }
.article h2 {
  margin: 34px 0 10px;
  font-size: 19.5px;
  line-height: 1.44;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: #28252f;
}
.article h3 {
  margin: 24px 0 8px;
  font-size: 15.5px;
  line-height: 1.5;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: #3a3643;
}
.article p {
  margin: 0 0 14px;
  font-size: 14.5px;
  line-height: 1.92;
  letter-spacing: -0.005em;
  color: #4c4856;
}
.article ul, .article ol { margin: 0 0 16px; padding-left: 20px; }
.article li { margin: 6px 0; font-size: 14.5px; line-height: 1.85; color: #4c4856; }
.article li::marker { color: #cbbfad; }
.article a { color: #c25f78; border-bottom: 1px solid #f4dde2; }
.article strong { color: #2c2933; font-weight: 700; }
.article blockquote {
  margin: 18px 0;
  padding: 14px 16px;
  background: #faf6f0;
  border-left: 3px solid #e8cdd3;
  border-radius: 0 14px 14px 0;
  font-size: 14px;
  line-height: 1.85;
  color: #6a6259;
}
.article blockquote p:last-child { margin-bottom: 0; }
.article__toc {
  margin: 20px 0 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: var(--shadow-soft);
}
.article__toc p {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #b3a795;
}
.article__toc ol { margin: 0; padding-left: 18px; }
.article__toc li { margin: 4px 0; font-size: 13px; }
.article__toc a { color: #5f5b67; border-bottom: 0; }
.article__toc a:hover { color: #c25f78; }

.article__cta {
  margin: 30px 0 0;
  background: linear-gradient(140deg, #fff2f4 0%, #f7f1fb 100%);
  border: 1px solid #f2e4e8;
  border-radius: 20px;
  padding: 18px 17px;
}
.article__cta p {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #6b6470;
}
.article__cta .btn { padding: 13px 18px; font-size: 14px; }
.article__cta .btn + .btn { margin-top: 8px; }

.article__related { margin: 34px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.article__related h2 { margin: 0 0 12px; font-size: 16px; letter-spacing: -0.03em; }

.article__notice {
  margin: 26px 0 0;
  font-size: 11.5px;
  line-height: 1.7;
  color: #b0a99e;
}

/* ---------- 안내 페이지 카드 ---------- */
.info-grid { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 0; }
.info-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 15px 16px;
  box-shadow: var(--shadow-soft);
}
.info-card h2 {
  margin: 0 0 6px;
  padding-top: 0;
  border-top: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #2f2c38;
}
.info-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.78;
  color: #6f6a76;
}
.info-card a { color: #c25f78; }

/* ---------- 사이트 푸터 내비게이션 ---------- */
.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 14px 0 12px;
  padding: 12px 0 0;
  border-top: 1px solid #efe7db;
  font-size: 12px;
  font-weight: 600;
}
.foot-nav a { color: #8b857c; }
.foot-nav a:hover { color: #5f5a52; }

.mini-nav {
  margin: 22px 0 0;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.7;
  color: #c0b8ac;
}
.mini-nav a { color: #a49c90; padding: 0 2px; }
.mini-nav a:hover { color: #7a736a; }

.page-back {
  margin: 30px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.7;
}
.page-back a { color: #8d7c66; }
.page-back a:hover { color: #5f5a52; }
