/* =====================================================================
 * 옷 색깔 꿀조합 — 전역 스타일
 * 라이트 / 다크 모드 모두 지원 (prefers-color-scheme + data-theme)
 * =================================================================== */

/* ---------------------------- 1. 토큰 ------------------------------ */
:root {
  --bg: #f7f5f2;
  --bg-grad-1: #ffe6f0;
  --bg-grad-2: #e4ecff;
  --bg-grad-3: #fff6e0;

  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --surface-2: #f2efeb;

  --text: #1b1b1f;
  --text-soft: #55555f;
  --text-dim: #8a8a95;

  --line: rgba(20, 20, 30, 0.09);
  --line-strong: rgba(20, 20, 30, 0.18);

  --accent: #ff5b7f;
  --accent-2: #6c5ce7;
  --accent-ink: #ffffff;

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 26px;

  --shadow-s: 0 2px 8px rgba(24, 20, 40, 0.06);
  --shadow-m: 0 10px 30px rgba(24, 20, 40, 0.09);
  --shadow-l: 0 24px 60px rgba(24, 20, 40, 0.14);

  --maxw: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* 고정 헤더 높이 — 앵커로 이동할 때 제목이 헤더에 가려지지 않도록 씁니다 */
  --header-h: 88px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111013;
    --bg-grad-1: #2a1522;
    --bg-grad-2: #141b2e;
    --bg-grad-3: #201a12;

    --surface: rgba(32, 31, 36, 0.72);
    --surface-solid: #1c1b20;
    --surface-2: #24232a;

    --text: #f4f2f6;
    --text-soft: #bcb9c4;
    --text-dim: #8b8895;

    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.22);

    --accent: #ff7392;
    --accent-2: #a29bfe;
    --accent-ink: #1a1119;

    --shadow-s: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-m: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-l: 0 24px 60px rgba(0, 0, 0, 0.55);
  }
}

/* 수동 토글 (헤더 버튼) — 미디어쿼리보다 우선 */
:root[data-theme='light'] {
  --bg: #f7f5f2;
  --bg-grad-1: #ffe6f0;
  --bg-grad-2: #e4ecff;
  --bg-grad-3: #fff6e0;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --surface-2: #f2efeb;
  --text: #1b1b1f;
  --text-soft: #55555f;
  --text-dim: #8a8a95;
  --line: rgba(20, 20, 30, 0.09);
  --line-strong: rgba(20, 20, 30, 0.18);
  --accent: #ff5b7f;
  --accent-2: #6c5ce7;
  --accent-ink: #ffffff;
  --shadow-s: 0 2px 8px rgba(24, 20, 40, 0.06);
  --shadow-m: 0 10px 30px rgba(24, 20, 40, 0.09);
  --shadow-l: 0 24px 60px rgba(24, 20, 40, 0.14);
}

:root[data-theme='dark'] {
  --bg: #111013;
  --bg-grad-1: #2a1522;
  --bg-grad-2: #141b2e;
  --bg-grad-3: #201a12;
  --surface: rgba(32, 31, 36, 0.72);
  --surface-solid: #1c1b20;
  --surface-2: #24232a;
  --text: #f4f2f6;
  --text-soft: #bcb9c4;
  --text-dim: #8b8895;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.22);
  --accent: #ff7392;
  --accent-2: #a29bfe;
  --accent-ink: #1a1119;
  --shadow-s: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-m: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-l: 0 24px 60px rgba(0, 0, 0, 0.55);
}

/* --------------------------- 2. 기본 ------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
    'Apple SD Gothic Neo', 'Malgun Gothic', 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 배경 그라데이션 블롭 */
body::before {
  content: '';
  position: fixed;
  inset: -30vh -10vw auto -10vw;
  height: 120vh;
  z-index: -1;
  background:
    radial-gradient(38vw 38vw at 12% 12%, var(--bg-grad-1), transparent 65%),
    radial-gradient(42vw 42vw at 88% 6%, var(--bg-grad-2), transparent 62%),
    radial-gradient(36vw 36vw at 60% 52%, var(--bg-grad-3), transparent 60%);
  filter: blur(6px);
  opacity: 0.9;
  pointer-events: none;
}

img {
  max-width: 100%;
  display: block;
}

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  line-height: 1.35;
  letter-spacing: -0.03em;
  margin: 0 0 0.5em;
  font-weight: 800;
}

p {
  margin: 0 0 1em;
}

:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-s) 0;
}
.skip-link:focus {
  left: 0;
}

/* --------------------------- 3. 헤더 ------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: -0.04em;
  white-space: nowrap;
  flex: 0 0 auto;
}

.logo-dots {
  display: inline-grid;
  grid-template-columns: repeat(2, 9px);
  gap: 2px;
}
.logo-dots i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  display: block;
}
.logo-dots i:nth-child(1) {
  background: #ff5b7f;
}
.logo-dots i:nth-child(2) {
  background: #36454f;
}
.logo-dots i:nth-child(3) {
  background: #f5f5dc;
}
.logo-dots i:nth-child(4) {
  background: #556b2f;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.9rem;
  font-weight: 600;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text-soft);
  white-space: nowrap;
  flex: 0 0 auto;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  background: var(--surface-2);
  color: var(--text);
}

/* ---- 대주제(페이지 이동) + 소주제(문단 이동) 2단 메뉴 ---- */
.nav-item {
  position: relative;
  flex: 0 0 auto;
}

.nav-top {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.nav-item.has-menu > .nav-top::after {
  content: '';
  width: 5px;
  height: 5px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.5;
  transition: transform 0.2s var(--ease);
}
.nav-item.has-menu:hover > .nav-top::after,
.nav-item.has-menu[data-open='true'] > .nav-top::after {
  transform: rotate(225deg) translateY(-2px);
}

.nav-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 236px;
  padding: 8px;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  background: var(--surface-solid);
  box-shadow: var(--shadow-l);
  display: flex;
  flex-direction: column;
  gap: 1px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease),
    visibility 0.18s linear;
  z-index: 60;
}

.nav-item:hover > .nav-menu,
.nav-item:focus-within > .nav-menu,
.nav-item[data-open='true'] > .nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu a {
  padding: 9px 12px;
  border-radius: var(--radius-s);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-soft);
  white-space: normal;
  line-height: 1.45;
}
.nav-menu a:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* 메뉴가 잘리지 않도록 헤더는 자르지 않고, 좁은 화면에서는 줄바꿈 */
.site-header {
  overflow: visible;
}

@media (max-width: 760px) {
  /* 메뉴가 두 줄로 접히면 헤더가 높아지므로 앵커 여유도 함께 키웁니다 */
  :root {
    --header-h: 132px;
  }
  .header-inner {
    flex-wrap: wrap;
    padding-bottom: 10px;
  }
  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
    font-size: 0.86rem;
  }
  .site-nav a {
    padding: 7px 10px;
  }
  .nav-menu {
    min-width: 210px;
  }
  .nav-item:last-of-type .nav-menu {
    left: auto;
    right: 0;
  }
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  display: grid;
  place-items: center;
  font-size: 1rem;
  flex: 0 0 auto;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.theme-toggle:hover {
  transform: rotate(-15deg) scale(1.06);
  background: var(--surface-2);
}

/* --------------------------- 4. 히어로 ----------------------------- */
.hero {
  padding: 64px 0 28px;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-s);
  color: var(--text-soft);
  margin-bottom: 20px;
}
.badge b {
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(1.9rem, 6vw, 3.2rem);
  font-weight: 900;
  margin-bottom: 14px;
}

.hero h1 .grad {
  background: linear-gradient(92deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  max-width: 620px;
  margin: 0 auto;
  color: var(--text-soft);
  font-size: clamp(0.95rem, 2.6vw, 1.08rem);
}

/* --------------------------- 5. 섹션 ------------------------------- */
/* 앵커로 이동할 때 대상이 고정 헤더 아래에 오도록 여유를 둡니다.
   (h2·h3·div 등 id가 붙은 모든 요소에 적용) */
[id] {
  scroll-margin-top: var(--header-h);
}
main[id='top'] {
  scroll-margin-top: 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  margin: 0;
}

.section-head .hint {
  font-size: 0.86rem;
  color: var(--text-dim);
}

/* --------------------------- 6. 피커 ------------------------------- */
.picker {
  padding: 12px 0 8px;
}

.picker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 760px) {
  .picker-grid {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 22px;
  box-shadow: var(--shadow-m);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.panel-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.step {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  background: var(--text);
  color: var(--bg);
  flex: 0 0 auto;
}

.panel-desc {
  font-size: 0.84rem;
  color: var(--text-dim);
  margin: 0 0 16px;
  min-height: 1.5em;
}

.panel.is-locked {
  opacity: 0.98;
}

/* 색상 박스 그리드 */
.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 12px;
}

.swatch {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: none;
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}

.swatch .chip {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-s);
  position: relative;
  overflow: hidden;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease),
    outline-color 0.15s linear;
  outline: 3px solid transparent;
  outline-offset: 3px;
}

.swatch .chip::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 900;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.2s var(--ease), transform 0.25s var(--ease);
}

.swatch.on-light .chip::after {
  color: #17171b;
}
.swatch.on-dark .chip::after {
  color: #ffffff;
}

.swatch .label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-soft);
  text-align: center;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.swatch:hover .chip {
  transform: translateY(-4px) scale(1.04);
  box-shadow: var(--shadow-m);
}

.swatch[aria-pressed='true'] .chip {
  transform: translateY(-4px) scale(1.09);
  outline-color: var(--accent);
  box-shadow: var(--shadow-l);
}
.swatch[aria-pressed='true'] .chip::after {
  opacity: 1;
  transform: scale(1);
}
.swatch[aria-pressed='true'] .label {
  color: var(--text);
  font-weight: 800;
}

.swatch.is-disabled {
  opacity: 0.24;
  filter: grayscale(0.85);
}
.swatch.is-disabled:hover .chip {
  transform: none;
  box-shadow: var(--shadow-s);
}
.swatch.is-disabled .label::after {
  content: '';
}

/* 컨트롤 바 */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 22px 0 8px;
}

.btn {
  border: 1px solid var(--line-strong);
  background: var(--surface-solid);
  border-radius: 999px;
  padding: 11px 20px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-s);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    background 0.18s var(--ease);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-m);
}
.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary {
  background: linear-gradient(92deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: transparent;
}

.btn-ghost {
  background: transparent;
  box-shadow: none;
}

/* --------------------------- 7. 결과 카드 -------------------------- */
.result-area {
  padding: 26px 0 10px;
}

.result-empty {
  text-align: center;
  padding: 42px 22px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-l);
  color: var(--text-dim);
  font-size: 0.95rem;
}
.result-empty .big {
  font-size: 1.9rem;
  display: block;
  margin-bottom: 8px;
}

.result-card {
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-l);
  overflow: hidden;
  animation: pop 0.45s var(--ease) both;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .result-card {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

.result-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 150px;
}

.result-visual div {
  position: relative;
  display: grid;
  place-items: end start;
  padding: 14px 16px;
}
/* 흰색 계열끼리 붙어도 경계가 보이도록 */
.result-visual div + div,
.mini-visual span + span {
  border-left: 1px solid var(--line);
}

.result-visual span {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #17171b;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.result-body {
  padding: 26px 26px 28px;
}

.result-genre {
  font-size: clamp(1.35rem, 5vw, 1.9rem);
  font-weight: 900;
  margin: 0 0 4px;
  background: linear-gradient(92deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.result-combo-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-dim);
  margin: 0 0 14px;
}

.result-desc {
  font-size: clamp(0.98rem, 2.8vw, 1.08rem);
  color: var(--text-soft);
  margin: 0 0 18px;
  line-height: 1.85;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tag {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-soft);
}

/* 결과 카드 안의 퍼스널 컬러 판정 블록 */
.pc-box {
  --pc: var(--accent-2);
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  border-left: 4px solid var(--pc);
  background: var(--surface-2);
  padding: 16px 18px;
  margin: 0 0 20px;
}
.pc-spring {
  --pc: #e8a33d;
}
.pc-summer {
  --pc: #7fa8d6;
}
.pc-autumn {
  --pc: #a4632b;
}
.pc-winter {
  --pc: #4a6fa5;
}
.pc-neutral {
  --pc: #9a9aa2;
}

.pc-head {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.pc-badge {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--pc);
  color: #fff;
  flex: 0 0 auto;
}

.pc-season {
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.pc-season em {
  font-style: normal;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--text-dim);
}

.pc-hint {
  font-size: 0.86rem;
  color: var(--text-soft);
  margin: 0 0 12px;
}

.axis-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.axis {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  color: var(--text);
}
.axis b {
  font-weight: 700;
  color: var(--text-dim);
  font-size: 0.72rem;
}

.pc-reason {
  font-size: 0.87rem;
  color: var(--text-soft);
  margin: 0 0 8px;
  line-height: 1.75;
}

.pc-note {
  font-size: 0.76rem;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.7;
}
.pc-note a {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pc-note strong {
  color: var(--text-soft);
}

.hex-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.hex-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-soft);
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.hex-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}
.hex-btn i {
  width: 13px;
  height: 13px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  display: block;
}

/* 같은 상의의 다른 하의 추천 */
.also {
  margin-top: 22px;
  padding: 18px;
  border-radius: var(--radius-m);
  background: var(--surface-2);
}
.also h4 {
  margin: 0 0 10px;
  font-size: 0.9rem;
}
.also-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.also-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px 7px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-solid);
  font-size: 0.8rem;
  font-weight: 700;
  transition: transform 0.18s var(--ease);
}
.also-item:hover {
  transform: translateY(-2px);
}
.also-item i {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1px solid var(--line-strong);
  display: block;
}

/* --------------------------- 8. 전체 보기 -------------------------- */
.browse {
  padding: 46px 0 10px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.pill {
  border: 1px solid var(--line-strong);
  background: transparent;
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text-soft);
  transition: all 0.18s var(--ease);
}
.pill:hover {
  background: var(--surface-2);
}
.pill[aria-pressed='true'] {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.pill small {
  opacity: 0.5;
  font-weight: 700;
  margin-left: 2px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.mini-card {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--surface-solid);
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-s);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
  padding: 0;
  display: flex;
  flex-direction: column;
}
.mini-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-m);
}

.mini-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 74px;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--line);
}

.mini-body {
  display: block;
  padding: 14px 16px 16px;
}

.mini-genre {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  margin: 0 0 3px;
}

.mini-names {
  display: block;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin: 0 0 8px;
  font-weight: 600;
}

.mini-desc {
  font-size: 0.84rem;
  color: var(--text-soft);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
}

.load-more-row {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

/* --------------------------- 9. 본문 콘텐츠 ------------------------ */
.prose {
  padding: 48px 0;
}

.prose-card {
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: clamp(24px, 5vw, 44px);
  box-shadow: var(--shadow-m);
}

.prose-card h2 {
  font-size: clamp(1.25rem, 4vw, 1.6rem);
}

.prose-card h3 {
  font-size: 1.06rem;
  margin-top: 1.8em;
}

.prose-card p,
.prose-card li {
  color: var(--text-soft);
  font-size: 0.97rem;
}

.prose-card ul,
.prose-card ol {
  padding-left: 1.2em;
  margin: 0 0 1.2em;
}
.prose-card li {
  margin-bottom: 0.45em;
}

.prose-card strong {
  color: var(--text);
}

.prose-card a {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 0 0 1.2em;
}
.prose-card th,
.prose-card td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  color: var(--text-soft);
}
.prose-card th {
  color: var(--text);
  font-weight: 800;
  white-space: nowrap;
}
.table-scroll {
  overflow-x: auto;
}

/* FAQ */
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface-solid);
  padding: 0 18px;
  margin-bottom: 10px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 16px 0;
  list-style: none;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::before {
  content: 'Q';
  color: var(--accent);
  font-weight: 900;
  flex: 0 0 auto;
}
.faq details[open] summary {
  border-bottom: 1px solid var(--line);
}
.faq .answer {
  padding: 14px 0 4px;
  color: var(--text-soft);
  font-size: 0.94rem;
}

/* ------------------- 9-2. 읽을거리(아티클) 레이아웃 ---------------- */
/* 긴 글 전용. 읽기 폭을 44rem으로 묶고 본문 크기·행간을 키웁니다. */
.article {
  padding: 40px 0 10px;
}

.article-inner {
  max-width: 44rem;
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.article h1 {
  font-size: clamp(1.75rem, 5.4vw, 2.5rem);
  text-wrap: balance;
  margin-bottom: 14px;
}

.article .lead {
  font-size: clamp(1rem, 2.8vw, 1.1rem);
  color: var(--text-soft);
  line-height: 1.85;
  margin-bottom: 8px;
}

.article-meta {
  font-size: 0.82rem;
  color: var(--text-dim);
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}

.article-body {
  font-size: 1.01rem;
  line-height: 1.95;
}

.article-body h2 {
  margin-top: 2.4em;
  padding-top: 1em;
  border-top: 1px solid var(--line);
  font-size: clamp(1.2rem, 3.6vw, 1.42rem);
  text-wrap: balance;
}

.article-body h3 {
  margin-top: 2em;
  margin-bottom: 0.4em;
  font-size: 1.03rem;
}

.article-body p {
  margin: 0 0 1.2em;
  color: var(--text-soft);
}

.article-body strong {
  color: var(--text);
  font-weight: 700;
}

.article-body ul,
.article-body ol {
  padding-left: 1.15em;
  margin: 0 0 1.4em;
  color: var(--text-soft);
}
.article-body li {
  margin-bottom: 0.55em;
}

.article-body a:not(.combo-link):not(.related-card):not(.combo-card) {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* 목차 */
.toc {
  background: var(--surface-2);
  border-radius: var(--radius-m);
  padding: 20px 24px;
  margin-bottom: 34px;
}
.toc h2 {
  margin: 0 0 10px;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  border: 0;
  padding: 0;
}
.toc ol {
  margin: 0;
  padding-left: 1.1em;
  font-size: 0.94rem;
  color: var(--text-soft);
}
.toc li {
  margin-bottom: 0.3em;
}
.toc a {
  color: var(--text-soft);
}
.toc a:hover {
  color: var(--text);
}

/* 요약 · 주의 박스 */
.callout {
  border-radius: var(--radius-m);
  padding: 20px 22px;
  margin: 0 0 32px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  font-size: 0.96rem;
}
.callout h3 {
  margin: 0 0 8px;
  font-size: 0.92rem;
}
.callout p:last-child,
.callout ul:last-child {
  margin-bottom: 0;
}
.callout.note {
  border-left-color: var(--accent-2);
}
.callout.caution {
  border-left-color: #d9822b;
}

/* 팔레트 칩 (본문 인라인) */
.palette-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 1.5em;
}
.palette-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-solid);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-soft);
}
.palette-chip i {
  width: 17px;
  height: 17px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  display: block;
  flex: 0 0 auto;
}

/* 조합 바로가기 카드 */
.combo-links {
  display: grid;
  /* 읽기 폭(44rem)에서 2열로 떨어지도록 — 4개면 2×2가 됩니다. */
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
  margin: 0 0 1.8em;
}

.combo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  background: var(--surface-solid);
  box-shadow: var(--shadow-s);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.combo-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-m);
}
.combo-link .duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 46px;
  height: 34px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  flex: 0 0 auto;
}
.combo-link .duo span {
  display: block;
}
.combo-link .txt {
  min-width: 0;
}
.combo-link b {
  display: block;
  font-size: 0.87rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.4;
}
.combo-link small {
  display: block;
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.4;
}

/* 계절·타입 선택기 — 사이트의 '색상 박스' 문법을 그대로 씁니다.
   (선택 시 강조 방식도 상단 색상 박스와 동일: 테두리 강조 + 살짝 떠오름) */
.pick-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.pick-head h2 {
  margin: 0;
  border: 0;
  padding: 0;
  font-size: clamp(1.1rem, 3.4vw, 1.3rem);
}
.pick-head span {
  font-size: 0.83rem;
  color: var(--text-dim);
}

.pick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 30px;
}

/* 본문의 색상 칩(.palette-chip)과 같은 알약 형태 — 색 동그라미 + 이름 + 설명 */
.pick {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-solid);
  box-shadow: var(--shadow-s);
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
    outline-color 0.15s linear, border-color 0.2s var(--ease);
}
.pick:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-m);
}
.pick[aria-pressed='true'] {
  transform: translateY(-2px);
  outline-color: var(--accent);
  border-color: transparent;
  box-shadow: var(--shadow-m);
}

.pick-swatch {
  display: inline-flex;
  flex: 0 0 auto;
}
.pick-swatch i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--surface-solid);
  box-shadow: 0 0 0 1px var(--line-strong);
  display: block;
  margin-left: -7px;
}
.pick-swatch i:first-child {
  margin-left: 0;
}

.pick b {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.pick small {
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
}
.pick[aria-pressed='true'] small {
  color: var(--text-soft);
}

@media (max-width: 560px) {
  .pick small {
    display: none;
  }
}

/* 추천 조합을 크게 보여주는 카드 */
.combo-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 14px;
  margin: 0 0 1.6em;
}

.combo-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--surface-solid);
  box-shadow: var(--shadow-s);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.combo-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-m);
}
.combo-card .duo-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 88px;
}
.combo-card .duo-bar span {
  display: block;
}
.combo-card .body {
  padding: 13px 15px 15px;
}
.combo-card b {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.4;
}
.combo-card small {
  display: block;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 2px;
  line-height: 1.5;
}

/* 선택 영역과 배경 지식 영역을 나누는 얇은 구분선 */
.soft-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0 34px;
}

.season-note {
  font-size: 0.88rem;
  color: var(--text-soft);
  background: var(--surface-2);
  border-radius: var(--radius-s);
  padding: 12px 15px;
  margin: 0 0 1.5em;
}
.season-note strong {
  color: var(--text);
}

/* 관련 글 */
.related {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.related-card {
  display: block;
  padding: 20px;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  background: var(--surface-solid);
  box-shadow: var(--shadow-s);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-m);
}
.related-card b {
  display: block;
  font-size: 0.98rem;
  margin-bottom: 5px;
}
.related-card span {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* --------------------------- 10. 광고 슬롯 ------------------------- */
.ad-slot {
  margin: 34px auto;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-m);
  overflow: hidden;
}
.ad-slot ins {
  display: block;
  width: 100%;
}

/* --------------------------- 11. 푸터 ----------------------------- */
.site-footer {
  margin-top: 54px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 34px 0 44px;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
  margin-left: auto;
}
.footer-links a {
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}
.footer-links a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.copyright {
  width: 100%;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* --------------------------- 12. 토스트 --------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 140%);
  background: var(--text);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: var(--shadow-l);
  z-index: 90;
  transition: transform 0.35s var(--ease);
  max-width: calc(100vw - 40px);
  text-align: center;
}
.toast.show {
  transform: translate(-50%, 0);
}

/* --------------------------- 13. 폼 ------------------------------- */
.form-grid {
  display: grid;
  gap: 14px;
  max-width: 520px;
}
.field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  padding: 12px 14px;
}
.field textarea {
  min-height: 140px;
  resize: vertical;
}

/* --------------------------- 14. 문의 안내 ------------------------ */
.contact-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 0 0 2em;
  padding: 22px 24px;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: var(--surface-solid);
  box-shadow: var(--shadow-s);
}

.contact-label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.contact-mail {
  font-size: clamp(1.05rem, 3.4vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 4px;
  word-break: break-all;
}
.contact-mail:hover {
  color: var(--accent);
}

.contact-hint {
  margin: 6px 0 0;
  font-size: 0.84rem;
  color: var(--text-dim);
}

/* 폼 전송 결과 안내 */
.form-status {
  max-width: 520px;
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius-m);
  font-size: 0.9rem;
  line-height: 1.7;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-soft);
}
.form-status.ok {
  border-left: 4px solid #2f9e5f;
}
.form-status.warn {
  border-left: 4px solid #d9822b;
}
.form-status a {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}
.form-status strong {
  color: var(--text);
}
