:root {
  --primary: #6A0572;
  --primary-dark: #4A013F;
  --accent: #AB83A1;
  --accent-light: #F3E8F1;
  --ink: #2A1A28;
  --ink-soft: #5A4756;
  --bg: #FBF6FA;
  --card-bg: #FFFFFF;
  --border: #E4D4E2;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Gowun Dodum", "Noto Sans KR", sans-serif;
  font-display: swap;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

.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;
}

a { color: var(--primary); }
a:hover, a:focus { color: var(--primary-dark); }

h1, h2, h3 {
  color: var(--primary-dark);
  line-height: 1.35;
  font-weight: 700;
}
h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); margin: 0 0 0.6em; }
h2 { font-size: clamp(1.25rem, 3vw, 1.6rem); margin: 0 0 0.6em; }

p { margin: 0 0 1em; }

/* header */
.site-header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(74,1,63,0.25);
}
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}
.nav-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.6);
  color: #fff;
  border-radius: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
}
.site-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.4rem 0.2rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.site-nav a:hover, .site-nav a:focus { color: var(--accent-light); text-decoration: underline; }

@media (max-width: 1024px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: var(--primary);
    padding: 0.4rem 1.2rem 1rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { border-bottom: 1px solid rgba(255,255,255,0.15); width: 100%; }
}
@media (min-width: 1025px) {
  .nav-toggle { display: none; }
}

/* main layout */
.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 1.4rem 1.1rem 3rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  margin-bottom: 1.4rem;
  box-shadow: 0 1px 3px rgba(74,1,63,0.06);
}

.hero-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hero-card picture, .hero-card img {
  width: 100%;
  height: auto;
  display: block;
}
.hero-text {
  padding: 1.6rem;
  background: linear-gradient(180deg, var(--accent-light), #fff);
}
.eyebrow {
  display: inline-block;
  color: var(--primary);
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
}
.lead { font-size: 1.05rem; color: var(--ink-soft); margin: 0; }

@media (min-width: 768px) {
  .hero-card { flex-direction: row; align-items: stretch; }
  .hero-card picture { flex: 0 0 42%; }
  .hero-card img { height: 100%; object-fit: cover; }
  .hero-text { flex: 1; display: flex; flex-direction: column; justify-content: center; }
}

/* checklist sections: 3 visually distinct phases */
.checklist-section {
  border-left: 6px solid var(--accent);
  padding-left: calc(1.6rem - 6px + 0.9rem);
}
.phase-before { background: #FBF6FA; border-left-color: var(--accent); }
.phase-during { background: #F6ECF3; border-left-color: var(--primary); }
.phase-after  { background: #F3E8F1; border-left-color: var(--primary-dark); }

.phase-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.3rem;
}
.phase-badge {
  flex: 0 0 auto;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}
.phase-head h2 { margin: 0; }
.phase-desc { color: var(--ink-soft); margin-bottom: 1.1rem; }

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.check-list li {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.2rem 0.9rem;
}
.check-list label {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.7rem 0;
  cursor: pointer;
  min-height: 44px;
}
.check-list input[type="checkbox"] {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  accent-color: var(--primary);
  cursor: pointer;
}
.check-list .item-title {
  display: block;
  font-weight: 700;
  color: var(--ink);
}
.check-list .item-desc {
  display: block;
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-top: 0.2rem;
}
.check-list input:checked ~ * .item-title,
.check-list label:has(input:checked) .item-title {
  text-decoration: line-through;
  text-decoration-color: var(--accent);
}
.check-list label:has(input:checked) {
  opacity: 0.7;
}

/* gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 1rem;
}
.gallery-grid figure {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.gallery-grid img { width: 100%; height: auto; display: block; }

/* CTA */
.cta-card {
  background: var(--primary);
  color: #fff;
  text-align: center;
}
.cta-card h2 { color: #fff; }
.cta-card p { color: #F3E8F1; }
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  color: var(--primary-dark);
  font-weight: 700;
  border-radius: 999px;
  padding: 0.85rem 1.7rem;
  text-decoration: none;
  min-height: 44px;
}
.cta-btn:hover, .cta-btn:focus { background: var(--accent-light); }

/* footer */
footer {
  background: var(--primary-dark);
  color: #F3E8F1;
  padding: 2rem 1.1rem;
}
footer nav {
  max-width: 880px;
  margin: 0 auto 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}
footer nav a {
  color: #F3E8F1;
  text-decoration: none;
  font-size: 0.92rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
footer nav a:hover, footer nav a:focus { color: #fff; text-decoration: underline; }
footer address {
  max-width: 880px;
  margin: 0 auto;
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1.8;
  color: #E4D4E2;
}
footer address a { color: #fff; }
footer p { max-width: 880px; margin: 1rem auto 0; font-size: 0.82rem; color: #C9AFC6; }

/* breakpoints */
@media (min-width: 480px) {
  .page { padding-left: 1.4rem; padding-right: 1.4rem; }
}
@media (min-width: 768px) {
  .card { padding: 2rem; }
  .checklist-section { padding-left: calc(2rem - 6px + 0.9rem); }
}
@media (min-width: 1024px) {
  .page { padding-top: 2rem; }
}
@media (min-width: 1280px) {
  .page { max-width: 960px; }
}

.related-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.related-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line, #ddd);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--paper, #fff);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.related-card:hover,
.related-card:focus-visible {
  border-color: currentColor;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.related-card-arrow { opacity: 0.6; flex-shrink: 0; }
@media (max-width: 480px) {
  .related-cards { grid-template-columns: 1fr; }
}
