/* PCFitLab — Beauty Tech Platform UI (stable, no overlay/transform) */
:root {
  --bg: #f3f0ea;
  --bg-soft: #faf8f5;
  --panel: #fffdfa;
  --card: #fffcf9;
  --line: rgba(44, 40, 36, 0.09);
  --line-strong: rgba(44, 40, 36, 0.14);
  --text: #1c1917;
  --muted: #57534e;
  --body: #44403c;
  --accent: #6d2e46;
  --accent-hover: #5c2740;
  --accent-soft: #f7ebf0;
  --gold: #927959;
  --wine: #6d2e46;
  --r: 24px;
  --r-sm: 16px;
  --container: min(920px, calc(100% - 40px));
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --display: "Noto Serif KR", Georgia, "Times New Roman", serif;
  --shadow-soft: 0 1px 2px rgba(28, 25, 23, 0.04), 0 16px 48px rgba(28, 25, 23, 0.07);
  --shadow-btn: 0 8px 28px rgba(109, 46, 70, 0.22);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body.site-content {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.72;
  color: var(--body);
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(247, 235, 240, 0.55), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 45%, #ebe6de 100%);
  opacity: 1;
  visibility: visible;
}

.skip-link {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 12px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  z-index: 200;
  color: var(--text);
  text-decoration: none;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 253, 250, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 14px 0;
}

.site-brand {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-brand:hover { color: var(--accent); }

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 12px 18px;
  flex-wrap: wrap;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.site-nav a {
  font-size: 0.8125rem;
  font-weight: 550;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: rgba(109, 46, 70, 0.35);
}

.lang-select {
  appearance: none;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 8px 32px 8px 14px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%2378716c' stroke-linecap='round' stroke-width='2' d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  min-width: 120px;
}

main {
  padding: clamp(1.5rem, 4vw, 2.5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
}

/* Typography */
.kicker {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 10px;
}

h1 {
  font-family: var(--display);
  font-size: clamp(1.85rem, 4.8vw, 2.5rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 0.85rem;
}

h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.65rem;
  line-height: 1.25;
}

h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.45rem;
}

p, li {
  font-size: 0.9375rem;
  line-height: 1.75;
  margin: 0.6rem 0;
}

a { color: var(--accent); }

.content-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: var(--shadow-soft);
}

/* === 1. Analysis Hero (top priority) === */
.analysis-hero {
  text-align: center;
  padding: clamp(2rem, 5vw, 2.75rem) clamp(1.25rem, 4vw, 2rem);
  background: linear-gradient(165deg, #fffef9 0%, rgba(247, 235, 240, 0.35) 48%, var(--panel) 100%);
  border-color: rgba(109, 46, 70, 0.1);
}

.analysis-hero-inner {
  max-width: 640px;
  margin: 0 auto;
}

.analysis-hero h1 {
  word-break: keep-all;
  line-break: strict;
  font-size: clamp(1.5rem, 4.2vw, 2.15rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}

html:lang(ko) .analysis-hero h1,
html:lang(ja) .analysis-hero h1,
html:lang(zh) .analysis-hero h1 {
  white-space: nowrap;
  font-size: clamp(1.22rem, 3.6vw, 2rem);
  letter-spacing: -0.025em;
}

@media (max-width: 380px) {
  html:lang(ko) .analysis-hero h1 {
    font-size: clamp(1.05rem, 4.8vw, 1.28rem);
    letter-spacing: -0.03em;
  }
}

.hero-lead {
  font-size: 1.02rem;
  color: var(--body);
  max-width: 100%;
  margin: 0 auto 1.5rem;
  padding: 0 6px;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-height: 1.78;
  text-wrap: pretty;
  white-space: pre-line;
}

html:lang(ko) .hero-lead,
html:lang(ja) .hero-lead,
html:lang(zh) .hero-lead {
  word-break: keep-all;
  line-break: strict;
}

.hero-swatch-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 1.75rem;
}

.hero-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 14px rgba(28, 25, 23, 0.12);
}

.hero-swatch--spring { background: #e8a87c; }
.hero-swatch--summer { background: #9bb5ce; }
.hero-swatch--autumn { background: #c4956a; }
.hero-swatch--winter { background: #5a6a7a; }

.analysis-panel {
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(109, 46, 70, 0.22);
  border-radius: var(--r-sm);
  padding: 1.5rem 1.25rem;
}

.btn-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 300px;
  margin: 0 auto 1rem;
  padding: 16px 28px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  text-decoration: none;
  box-sizing: border-box;
}

a.btn-start:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}

.btn-start--analyze {
  margin-top: 1rem;
}

.btn-start-icon {
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.92;
}
.btn-start:disabled { opacity: 0.55; cursor: not-allowed; }

.analysis-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.btn-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 130px;
  padding: 12px 18px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 2px 12px rgba(28, 25, 23, 0.05);
}

.btn-tool:hover {
  border-color: rgba(109, 46, 70, 0.28);
  color: var(--accent);
  text-decoration: none;
}

.btn-tool-icon {
  font-size: 1rem;
  line-height: 1;
  opacity: 0.85;
}

.analysis-preview {
  display: block;
  width: 100%;
  max-width: 200px;
  max-height: 200px;
  margin: 1.25rem auto 0;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 32px rgba(28, 25, 23, 0.12);
}

.analysis-status {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0.85rem 0 0;
  min-height: 1.2em;
}

.hidden { display: none !important; }

.sr-only-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* === 2. Trust section === */
.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
}

.trust-row li {
  margin: 0;
  padding: 8px 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.content-split h2 { margin-top: 1.75rem; }
.content-split h2:first-of-type { margin-top: 0; }

.subhead {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  margin: -0.25rem 0 0.75rem;
}

/* === 3. Expert guides === */
.season-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 1rem 0 1.25rem;
}

.season-item {
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fffcf9;
}

.season-item h3 { margin-top: 0; font-size: 0.9rem; }
.season-item p { margin: 0; font-size: 0.8125rem; }

.season-item--spring { border-left: 4px solid #e8a87c; }
.season-item--summer { border-left: 4px solid #9bb5ce; }
.season-item--autumn { border-left: 4px solid #c4956a; }
.season-item--winter { border-left: 4px solid #5a6a7a; }

.expert-duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 1.25rem;
}

.expert-mini {
  padding: 1.15rem 1.25rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #fffef9, rgba(247, 235, 240, 0.25));
}

.expert-mini h3 { margin-top: 0; }

/* === 4. Link grid === */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 1rem;
}

.link-card {
  display: block;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fffcf9;
  text-decoration: none;
  color: var(--text);
}

.link-card:hover {
  border-color: rgba(109, 46, 70, 0.28);
  text-decoration: none;
}

.link-card strong {
  display: block;
  font-size: 0.9375rem;
  color: var(--accent);
  margin-bottom: 4px;
}

.link-card span {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 250, 0.95);
  padding: 1.75rem 0 2rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 0.85rem;
}

.footer-nav a {
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: none;
}

.footer-nav a:hover { color: var(--accent); }

.footer-note {
  font-size: 0.8125rem;
  color: #78716c;
  margin: 0;
}

.internal-links {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.internal-links h2 { font-size: 1.1rem; margin-top: 0; }

@media (max-width: 640px) {
  .site-header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .site-nav { gap: 4px 12px; }
  .analysis-actions { flex-direction: column; align-items: stretch; }
  .btn-tool { width: 100%; }
}

html[dir="rtl"] .site-nav a { border-bottom: 2px solid transparent; }
html[dir="rtl"] .season-item { border-left: none; border-right: 4px solid; }
