:root {
  --bg: #0a1222;
  --surface: #121d33;
  --surface-2: #1a2947;
  --text: #f4f7ff;
  --muted: #b9c4dd;
  --accent: #57a7ff;
  --accent-soft: #80bfff;
  --container: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  background: linear-gradient(180deg, #08101d 0%, #0d1730 100%);
  color: var(--text);
  line-height: 1.7;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(8, 16, 29, 0.84);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 0;
}

.brand {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 1rem;
}

.nav-list a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--text);
}

.hero-section {
  padding: 4.5rem 0 3rem;
}

.hero-kicker {
  margin-bottom: 0.5rem;
  color: var(--accent-soft);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.84rem;
}

.hero-content h2 {
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  line-height: 1.24;
  margin: 0 0 1rem;
}

.hero-content p {
  max-width: 920px;
  color: var(--muted);
}

.featured-section {
  padding-bottom: 2rem;
}

.naver-carousel-section {
  padding-top: 0.3rem;
}

.naver-carousel-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.8rem;
}

.naver-topic-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 0.9rem;
  padding: 0.7rem;
}

.naver-topic-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,.1);
}

.naver-topic-card span {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: #eaf2ff;
}

.naver-topic-card:hover,
.naver-topic-card:focus-visible {
  border-color: rgba(128,191,255,.7);
  transform: translateY(-2px);
  transition: transform .2s ease, border-color .2s ease;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.featured-grid .blog-card {
  min-width: 0;
  margin-right: 0;
  height: 100%;
}

.section-head {
  margin-bottom: 1.3rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.55rem;
}

.section-head p {
  margin-top: 0.4rem;
  color: var(--muted);
}

.carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
}

.carousel-track-wrapper {
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
  will-change: transform;
}

.blog-card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  min-width: calc((100% - 2rem) / 3);
  margin-right: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.blog-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.card-body {
  padding: 1rem 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.category {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--accent-soft);
}

.blog-card h3 {
  margin: 0;
  font-size: 1.07rem;
  line-height: 1.45;
}

.blog-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.card-link {
  color: #e9f3ff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.2rem;
}

.card-link:hover,
.card-link:focus-visible {
  color: var(--accent-soft);
}

.carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.carousel-indicators {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 0.55rem;
}

.indicator-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.indicator-dot.active {
  background: var(--accent);
}

.topic-map {
  padding: 2rem 0 1.4rem;
}

.topic-map h2 {
  margin: 0 0 0.8rem;
  font-size: 1.4rem;
}

.topic-map ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.topic-map li {
  margin-bottom: 0.55rem;
}

.longform-section {
  padding: 1rem 0 4rem;
}

.longform-section h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
}

.seo-article {
  background: rgba(15, 25, 45, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.35rem 1.2rem;
  margin-bottom: 1rem;
}

.seo-article h3 {
  margin: 0 0 0.8rem;
  font-size: 1.24rem;
  line-height: 1.45;
}

.seo-article p {
  margin: 0 0 0.9rem;
  color: #d5def2;
}

.article-summary {
  color: #e8f1ff !important;
  background: rgba(87, 167, 255, 0.1);
  border-left: 3px solid var(--accent);
  padding: 0.75rem 0.8rem;
  border-radius: 0.4rem;
}

.article-hero-image {
  margin: 0 0 1rem;
  border-radius: 0.9rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 16, 29, 0.75);
}

.article-hero-image img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
}

.article-hero-image figcaption {
  margin: 0;
  padding: 0.6rem 0.8rem 0.72rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.quick-card {
  background: rgba(18, 29, 51, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0.9rem;
  padding: 0.95rem;
  color: var(--text);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.quick-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.cta-section {
  padding: 0.7rem 0 3.6rem;
}

.cta-wrap {
  background: rgba(87, 167, 255, 0.1);
  border: 1px solid rgba(87, 167, 255, 0.35);
  border-radius: 1rem;
  padding: 1.2rem;
}

.cta-wrap h2 {
  margin: 0 0 0.45rem;
}

.cta-wrap p {
  margin: 0;
  color: var(--muted);
}

.cta-actions {
  margin-top: 0.95rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.58rem 1rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
}

.cta-btn.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
}

.article-page {
  padding: 2.2rem 0 7.2rem;
}

.seo-article.single {
  max-width: 900px;
  margin-inline: auto;
}

.seo-article.single h1 {
  margin: 0 0 0.8rem;
  font-size: 1.9rem;
  line-height: 1.3;
}

.article-tag {
  display: inline-block;
  font-size: 0.83rem;
  color: var(--accent-soft);
  margin-bottom: 0.4rem;
}

.story-flow {
  margin-top: 1.1rem;
  background: rgba(87, 167, 255, 0.08);
  border: 1px solid rgba(87, 167, 255, 0.25);
  border-radius: 0.8rem;
  padding: 0.95rem 1rem;
}

.story-flow h2 {
  margin: 0 0 0.6rem;
  font-size: 1.06rem;
}

.story-flow ol {
  margin: 0;
  padding-left: 1rem;
  color: #dbe6ff;
}

.story-flow li {
  margin-bottom: 0.45rem;
}

.story-flow li:last-child {
  margin-bottom: 0;
}

.faq-block {
  margin-top: 1.2rem;
  padding-top: 0.9rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
}

.faq-block h2 {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
}

.faq-block dl {
  margin: 0;
}

.faq-block dt {
  font-weight: 700;
  margin-top: 0.7rem;
}

.faq-block dd {
  margin: 0.25rem 0 0;
  color: #d5def2;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.checklist-grid > div {
  background: rgba(9, 16, 30, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.7rem;
  padding: 0.85rem;
}

.checklist-grid h2 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}

.checklist-grid ul {
  margin: 0;
  padding-left: 1rem;
  color: var(--muted);
}

.floating-cta {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.floating-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 122px;
  padding: 0.58rem 0.9rem;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.floating-cta-btn.kakao {
  background: #fae100;
  color: #1c1c1c;
}

.floating-cta-btn.phone {
  background: #1768ff;
}

.floating-cta-btn.form {
  background: #1f9a57;
}

.floating-cta-btn:hover,
.floating-cta-btn:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.4rem 0 6.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 1024px) {
  .blog-card {
    min-width: calc((100% - 1rem) / 2);
  }

  .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .hero-section {
    padding-top: 3rem;
  }

  .carousel {
    grid-template-columns: 1fr;
  }

  .carousel-btn {
    display: none;
  }

  .blog-card {
    min-width: 100%;
    margin-right: 0;
  }

  .seo-article {
    padding: 1.1rem 1rem;
  }

  .seo-article h3 {
    font-size: 1.13rem;
  }

  .featured-grid,
  .quick-grid,
  .checklist-grid {
    grid-template-columns: 1fr;
  }

  .seo-article.single h1 {
    font-size: 1.45rem;
    line-height: 1.35;
  }

  .article-hero-image img {
    height: 230px;
  }

  .article-page {
    padding-bottom: 9.2rem;
  }

  .site-footer {
    padding-bottom: 7.2rem;
  }

  .floating-cta {
    left: 0.6rem;
    right: 0.6rem;
    bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
    transform: none;
    flex-direction: row;
    width: auto;
    justify-content: center;
    gap: 0.4rem;
  }

  .floating-cta-btn {
    min-width: 0;
    flex: 1 1 0;
    max-width: 136px;
    padding: 0.52rem 0.5rem;
    font-size: 0.78rem;
  }
}

/* ===== 캐러셀 대응 패치 (2026-10) ===== */
a.brand { color: var(--text); text-decoration: none; font-weight: 700; }
.hero-content h1 { margin: 0.3rem 0 0.8rem; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.3; color: var(--text); }
.hero-content h1 .hero-sub { display: block; margin-top: 0.5rem; font-size: clamp(1.02rem, 2vw, 1.3rem); font-weight: 500; color: var(--accent-soft); }
.card-cover { display: block; aspect-ratio: 1 / 1; overflow: hidden; }
.blog-card .card-cover img { width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; transition: transform 0.35s ease; }
.blog-card:hover .card-cover img { transform: scale(1.03); }
.blog-card h3 a { color: var(--text); text-decoration: none; }
.blog-card h3 a:hover { color: var(--accent-soft); }
.guide-section, .faq-section { padding: 2.5rem 0; }
.guide-section h2, .faq-section h2 { margin: 0 0 1.2rem; font-size: 1.55rem; color: var(--text); }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.guide-step { background: var(--surface); border: 1px solid rgba(255,255,255,0.08); border-radius: 1rem; padding: 1.2rem 1.3rem; }
.guide-step h3 { margin: 0 0 0.5rem; font-size: 1.08rem; color: var(--text); }
.guide-step p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.guide-step a, .faq-item a { color: var(--accent-soft); }
.faq-list { display: grid; gap: 0.7rem; }
.faq-item { background: var(--surface); border: 1px solid rgba(255,255,255,0.08); border-radius: 0.9rem; padding: 0.95rem 1.2rem; }
.faq-item summary { cursor: pointer; font-weight: 600; color: var(--text); }
.faq-item p { margin: 0.6rem 0 0; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 768px) { .guide-grid { grid-template-columns: 1fr; } }


/* ===== 2026-10 확장: 캐러셀 대응 + 본문 구조 ===== */
a.brand { color: var(--text); text-decoration: none; font-weight: 700; }
.nav-list { flex-wrap: wrap; row-gap: 0.35rem; }
.hero-content h1 { margin: 0.3rem 0 0.8rem; font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.32; color: var(--text); }
.hero-content h1 .hero-sub { display: block; margin-top: 0.55rem; font-size: clamp(1rem, 1.9vw, 1.24rem); font-weight: 500; color: var(--accent-soft); line-height: 1.5; }
.card-cover { display: block; aspect-ratio: 1 / 1; overflow: hidden; }
.blog-card .card-cover img { width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; transition: transform .35s ease; }
.blog-card:hover .card-cover img { transform: scale(1.03); }
.blog-card h3 a { color: var(--text); text-decoration: none; }
.blog-card h3 a:hover { color: var(--accent-soft); }

.breadcrumb { padding: 1.1rem 0 0.2rem; font-size: 0.86rem; color: var(--muted); }
.breadcrumb a { color: var(--accent-soft); text-decoration: none; }
.breadcrumb span { margin: 0 0.35rem; }
.article-meta { color: var(--muted); font-size: 0.86rem; margin: 0.35rem 0 1.1rem; }
.article-lead { font-size: 1.05rem; color: #dbe4f7; }

.article-summary { background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%); border: 1px solid rgba(255,255,255,.09); border-left: 4px solid var(--accent); border-radius: 0.9rem; padding: 1.05rem 1.2rem; margin: 1.4rem 0; }
.article-summary strong { display: block; color: var(--accent-soft); font-size: 0.95rem; margin-bottom: 0.5rem; letter-spacing: .02em; }
.article-summary ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.article-summary li { margin: 0.3rem 0; font-size: 0.95rem; }

.article-toc { background: var(--surface); border: 1px solid rgba(255,255,255,.08); border-radius: 0.9rem; padding: 1rem 1.2rem; margin: 1.6rem 0; }
.article-toc strong { display: block; color: var(--text); font-size: 0.95rem; margin-bottom: 0.5rem; }
.article-toc ol { margin: 0; padding-left: 1.2rem; color: var(--muted); }
.article-toc li { margin: 0.28rem 0; font-size: 0.93rem; }
.article-toc a { color: var(--accent-soft); text-decoration: none; }

.article-section { padding: 1.3rem 0; }
.article-section h2 { margin: 0 0 0.9rem; font-size: 1.42rem; color: var(--text); line-height: 1.4; }
.article-section h3 { margin: 1.5rem 0 0.55rem; font-size: 1.1rem; color: var(--text); }
.article-section p { margin: 0 0 0.95rem; }
.article-section ul { margin: 0 0 1rem; padding-left: 1.15rem; }
.article-section li { margin: 0.4rem 0; }
.article-section a { color: var(--accent-soft); }

.article-figure { margin: 1.4rem 0; }
.article-figure img { width: 100%; height: auto; border-radius: 0.85rem; border: 1px solid rgba(255,255,255,.08); display: block; }
.article-figure figcaption { margin-top: 0.6rem; color: var(--muted); font-size: 0.88rem; line-height: 1.6; }

.table-wrap { overflow-x: auto; margin: 1.2rem 0; border-radius: 0.85rem; border: 1px solid rgba(255,255,255,.08); }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 480px; }
thead th { background: rgba(87,167,255,.16); color: var(--text); text-align: left; padding: 0.75rem 0.9rem; font-weight: 600; }
tbody td { padding: 0.75rem 0.9rem; border-top: 1px solid rgba(255,255,255,.07); color: var(--muted); vertical-align: top; }
tbody tr:nth-child(even) td { background: rgba(255,255,255,.02); }

.faq-list { display: grid; gap: 0.7rem; }
.faq-item { background: var(--surface); border: 1px solid rgba(255,255,255,.08); border-radius: 0.9rem; padding: 0.95rem 1.2rem; }
.faq-item summary { cursor: pointer; font-weight: 600; color: var(--text); font-size: 1rem; }
.faq-item summary::marker { color: var(--accent); }
.faq-answer { margin-top: 0.6rem; }
.faq-answer p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.cluster-links {
  background: linear-gradient(180deg, rgba(87, 167, 255, 0.08) 0%, rgba(87, 167, 255, 0.02) 100%);
  border: 1px solid rgba(87, 167, 255, 0.28);
  border-radius: 0.95rem;
  padding: 1rem;
  margin-top: 1.1rem;
}

.related-intro {
  color: var(--muted);
  font-size: 0.94rem;
  margin-bottom: 0.8rem;
}

.related-list { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
.related-list li { background: var(--surface); border: 1px solid rgba(255,255,255,.08); border-radius: 0.8rem; padding: 0.85rem 1.1rem; }
.related-list a { color: var(--accent-soft); text-decoration: none; font-weight: 600; }
.related-list a:hover, .related-list a:focus-visible { color: #ffffff; }

.article-notice { border-top: 1px solid rgba(255,255,255,.08); margin-top: 2rem; padding-top: 1.1rem; color: var(--muted); font-size: 0.88rem; line-height: 1.7; }
.footer-brand { color: var(--text); font-weight: 600; margin-bottom: 0.35rem; }
.footer-content p { margin: 0.3rem 0; }
.footer-links a { color: var(--accent-soft); text-decoration: none; }
.footer-links { font-size: 0.86rem; }
.footer-copy { font-size: 0.82rem; }
@media (max-width: 1024px) {
  .featured-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .guide-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .naver-carousel-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 768px) {
  .featured-grid, .guide-grid, .related-grid { grid-template-columns: 1fr; }
  .naver-carousel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
  .hero-content h1 { font-size: 1.6rem; }
  .article-section h2 { font-size: 1.26rem; }
  table { min-width: 360px; font-size: 0.88rem; }
  thead th, tbody td { padding: 0.62rem 0.68rem; }
}

/* ===== 2026-10-17 이미지 공통 최적화 패치 ===== */
img {
  max-width: 100%;
}

.card-cover {
  aspect-ratio: 1 / 1;
  background: rgba(8, 16, 29, 0.72);
}

.blog-card .card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.article-hero-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: min(46vh, 420px);
  object-fit: contain;
  object-position: center;
  transform: translateZ(0);
  backface-visibility: hidden;
  background: rgba(8, 16, 29, 0.72);
}

.article-figure {
  overflow: hidden;
  background: rgba(8, 16, 29, 0.72);
}

.article-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  object-position: center;
}

#s1-map .container,
#s2-flow .container {
  width: min(100% - 2.4rem, 980px);
  margin-inline: auto;
}

@media (max-width: 768px) {
  .article-hero-image img {
    aspect-ratio: 16 / 9;
    max-height: 34vh;
  }

  #s1-map .container,
  #s2-flow .container {
    width: min(100% - 1.4rem, 980px);
  }
}
