*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #f0fdfa;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --line: #99f6e4;
  --accent: #0d9488;
  --accent-dark: #0f766e;
  --focus: #2563eb;
  --prose-max: 40rem;
  --prose-line: 1.72;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: linear-gradient(180deg, #ccfbf1 0%, var(--bg) 28%, #f8fafc 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent-dark);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
}

a {
  color: var(--accent-dark);
}

a:hover {
  text-decoration: underline;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(15, 118, 110, 0.06);
}

.inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.25rem;
}

.brand {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--accent-dark);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.brand:hover {
  text-decoration: none;
  opacity: 0.9;
}

.nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

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

.nav a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.ad-slot {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
}

.ad-slot--top {
  max-width: 1100px;
}

.ad-slot--mid,
.ad-slot--bottom {
  max-width: 720px;
}

.ad-slot--in-content {
  max-width: 720px;
  margin: 1.5rem auto;
}

.ad-slot--sidebar {
  max-width: none;
  margin: 0;
  padding: 0;
}

.ad-slot__inner {
  min-height: 90px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.75rem;
}

.ad-slot--sidebar .ad-slot__inner {
  min-height: 250px;
}

@media (min-width: 961px) {
  .ad-slot--sidebar .ad-slot__inner {
    min-height: 600px;
  }
}

.ad-slot__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.page-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 300px);
  gap: 1.35rem 1.5rem;
  align-items: start;
}

.page-shell__main {
  min-width: 0;
}

.page-shell__rail {
  min-width: 0;
}

@media (max-width: 960px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .page-shell__rail {
    display: none;
  }
}

@media (min-width: 961px) {
  .ad-slot--rail-sticky {
    position: sticky;
    top: 5.5rem;
  }
}

.hero {
  padding: 2rem 0 1rem;
}

.hero .inner {
  text-align: center;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.65rem, 4.5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.hero-lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: var(--prose-line);
  max-width: min(38em, var(--prose-max));
  margin-inline: auto;
}

.hero-lead a {
  color: var(--accent-dark);
  font-weight: 600;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem 1.25rem 1.75rem;
  margin: 1.25rem auto;
  box-shadow: 0 8px 28px rgba(15, 118, 110, 0.07);
}

.panel h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 800;
}

.section-intro {
  margin: -0.35rem 0 1rem;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.65;
  max-width: var(--prose-max);
}

.tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.tab {
  font: inherit;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: var(--muted);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
}

.tab.is-active {
  background: var(--accent);
  border-color: var(--accent-dark);
  color: #fff;
}

.tab:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.mode-block.is-hidden {
  display: none;
}

.field {
  display: block;
  margin-bottom: 1rem;
}

.field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.field.inline {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  min-width: 0;
}

textarea,
input[type="text"],
input[type="number"],
select {
  width: 100%;
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
}

textarea {
  resize: vertical;
  min-height: 5rem;
}

textarea:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 0;
  border-color: transparent;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
}

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

.hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
  margin-top: 1rem;
}

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: var(--text);
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  text-decoration: none;
  text-align: center;
}

.btn:hover {
  background: #f1f5f9;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent-dark);
  color: #fff;
}

.btn.primary:hover {
  background: var(--accent-dark);
}

.status {
  min-height: 1.5rem;
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.status.is-error {
  color: #b91c1c;
  font-weight: 600;
}

.qr-out {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.qr-host {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-host canvas,
.qr-host img {
  max-width: 100%;
  height: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1rem 0 0;
}

@media (min-width: 560px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stats > div {
  background: #f0fdfa;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem;
}

.stats dt {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.stats dd {
  margin: 0.25rem 0 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-dark);
}

.article {
  padding: 0.5rem 1.25rem 2.5rem;
}

.article h2 {
  font-size: 1.22rem;
  margin: 2rem 0 0.85rem;
  line-height: 1.35;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.article h2:first-child {
  margin-top: 0;
}

.article h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.35rem 0 0.5rem;
  color: var(--text);
}

.article p {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: var(--prose-line);
  max-width: var(--prose-max);
}

.article ul {
  margin: 0 0 1.1rem;
  padding-left: 1.35rem;
  color: var(--muted);
  font-size: 0.97rem;
}

.article li {
  margin-bottom: 0.4rem;
}

.article a {
  font-weight: 600;
}

[id] {
  scroll-margin-top: 4.5rem;
}

.legal-main {
  padding: 2rem 1.25rem 3.5rem;
  max-width: 720px;
  margin: 0 auto;
}

.legal-main > h1 {
  font-size: 1.6rem;
  margin: 0 0 0.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.3;
  color: var(--text);
}

.legal-meta {
  color: var(--muted);
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
  line-height: 1.55;
}

.legal-main .article {
  padding: 0;
}

.legal-main .article h2 {
  font-size: 1.12rem;
  margin-top: 2rem;
}

.legal-main .article h2:first-of-type {
  margin-top: 0.25rem;
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.site-footer a {
  font-weight: 600;
}

.site-footer p {
  margin: 0 0 0.35rem;
}

.footer-note {
  font-size: 0.8rem;
  opacity: 0.9;
}

.site-header-inner {
  align-items: flex-start;
}

.site-header-inner.site-header-inner--stack {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.65rem;
  padding-bottom: 0.95rem;
}

.site-nav-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
}

.nav--site-tiers {
  max-width: none;
  width: 100%;
  justify-content: flex-start;
  font-size: 0.86rem;
  line-height: 1.45;
  gap: 0.5rem 0.85rem;
}

.nav a[aria-current="page"] {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: underline;
}

.footer-sitemap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1.35rem 1.75rem;
  margin-bottom: 1.15rem;
}

.footer-sitemap__heading {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.4rem;
}

.footer-sitemap__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-size: 0.88rem;
}

.footer-sitemap__list a {
  font-weight: 500;
  color: var(--accent-dark);
}

.site-footer-inner .site-footer-meta {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.site-footer-inner .footer-note {
  margin-top: 0.65rem;
}

.nav--multi {
  max-width: 42rem;
  justify-content: flex-end;
  line-height: 1.4;
}

.subpage-main {
  padding-bottom: 3rem;
}

.breadcrumbs {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.breadcrumbs a {
  font-weight: 500;
}

.subpage-hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0.5rem;
}

.subpage-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 3.8vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.28;
  color: var(--text);
}

.subpage-lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: var(--prose-line);
  max-width: var(--prose-max);
}

.subpage-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
}

.subpage-body h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 2rem 0 0.7rem;
  color: var(--text);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.subpage-body h2:first-of-type {
  margin-top: 0.25rem;
}

.subpage-body p {
  margin: 0 0 1.12rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: var(--prose-line);
  max-width: var(--prose-max);
}

.subpage-body ul {
  margin: 0 0 1.15rem;
  padding-left: 1.3rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.subpage-body li {
  margin-bottom: 0.35rem;
}

.subpage-body a {
  font-weight: 600;
}

.cta-strip {
  margin: 1.75rem 0 2rem;
  padding: 1.35rem 1.25rem;
  text-align: center;
  background: #f0fdfa;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.cta-strip p {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.topic-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin: 0 0 1.5rem;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.88rem;
}

.topic-links a {
  font-weight: 600;
  white-space: nowrap;
}

.toc {
  margin: 0 0 1.65rem;
  padding: 1rem 1.1rem 1.05rem;
  background: #ecfeff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.toc__label {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.toc__list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--muted);
}

.toc__list li {
  margin-bottom: 0.35rem;
}

.toc__list a {
  font-weight: 600;
}

.legal-main .article p,
.legal-main .article li {
  line-height: var(--prose-line);
  font-size: 1rem;
}

.legal-meta {
  line-height: var(--prose-line);
}

.subpage-faq {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.subpage-faq h2 {
  font-size: 1.15rem;
  margin: 0 0 1rem;
  color: var(--text);
}

.subpage-faq h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.25rem 0 0.4rem;
  color: var(--text);
  line-height: 1.35;
}

.subpage-faq p {
  margin: 0 0 0.9rem;
  font-size: 0.98rem;
  line-height: var(--prose-line);
  color: var(--muted);
  max-width: var(--prose-max);
}
