:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #667085;
  --line: #e5e7eb;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --soft: #eff6ff;
  --danger-bg: #fff1f2;
  --danger-border: #fb7185;
  --danger-text: #9f1239;
  --success-bg: #ecfdf3;
  --success-text: #166534;
  --radius: 18px;
  --shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Noto Sans KR", "Noto Sans JP", "Noto Sans SC", Arial, sans-serif;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
body:lang(ko) { word-break: keep-all; }
body:lang(ja), body:lang(zh-Hans) { line-break: strict; }
a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--brand-dark); }
a:focus-visible,
button:focus-visible,
summary:focus-visible,
.table-wrap:focus-visible {
  outline: 3px solid #55b8f4;
  outline-offset: 3px;
}
.skip-link { position: absolute; left: -9999px; top: auto; }
.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
}
.header-inner {
  display: grid;
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px 20px;
  gap: 10px;
}
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  display: inline-flex;
  width: 150px;
  height: 56px;
  flex: 0 0 auto;
  align-items: center;
  text-decoration: none;
}
.brand img { display: block; width: 100%; height: 100%; object-fit: contain; }
.nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 14px; }
.nav a {
  border-bottom: 2px solid transparent;
  color: #475467;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.nav a[aria-current="page"] {
  border-bottom-color: currentColor;
  color: var(--brand);
  font-weight: 800;
}
.language-switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 8px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.language-switcher a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 3px 9px;
  color: #475467;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
  text-decoration: none;
}
.language-switcher a[aria-current="true"] {
  border-color: var(--brand);
  background: var(--soft);
  color: var(--brand-dark);
  font-weight: 800;
}
.mobile-menu { display: none; }
main { max-width: 900px; margin: 36px auto 64px; padding: 0 20px; }
.hero {
  margin-bottom: 24px;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  padding: 34px;
  background: linear-gradient(135deg, #ffffff 0%, #eef5ff 100%);
  box-shadow: var(--shadow);
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
h1 { margin: 0 0 12px; font-size: clamp(30px, 5vw, 46px); line-height: 1.2; }
h2 {
  margin: 38px 0 12px;
  padding-top: 4px;
  color: #111827;
  font-size: 24px;
  line-height: 1.35;
}
h3 { margin: 24px 0 8px; color: #111827; font-size: 18px; }
p { margin: 10px 0; }
.lead { color: #475467; font-size: 17px; }
.meta { margin-top: 16px; color: var(--muted); font-size: 14px; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--surface);
  box-shadow: 0 7px 20px rgba(15, 23, 42, 0.04);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.page-card {
  display: block;
  min-height: 132px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 20px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.page-card:hover,
.page-card:focus-visible {
  border-color: var(--brand);
  color: var(--text);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}
.page-card strong { display: block; margin-bottom: 4px; color: var(--brand-dark); font-size: 18px; }
.page-card span { color: var(--muted); font-size: 14px; }
.info,
.danger,
.success {
  margin: 18px 0;
  border-left: 5px solid var(--brand);
  border-radius: 12px;
  padding: 15px 17px;
  background: var(--soft);
}
.danger {
  border-left-color: var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger-text);
}
.success { background: var(--success-bg); color: var(--success-text); }
ul, ol { padding-left: 24px; }
li + li { margin-top: 6px; }
.table-wrap {
  max-width: 100%;
  margin: 14px 0 22px;
  overflow-x: auto;
  border-radius: 10px;
}
table {
  width: 100%;
  min-width: 680px;
  border: 1px solid var(--line);
  border-collapse: collapse;
  background: #fff;
}
th, td {
  border: 1px solid var(--line);
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
}
th { background: #f8fafc; color: #344054; font-size: 14px; }
.small { color: var(--muted); font-size: 14px; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand);
  border-radius: 12px;
  padding: 11px 18px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--brand-dark); color: #fff; }
.button.secondary { background: #fff; color: var(--brand); }
.button.secondary:hover { background: var(--soft); color: var(--brand-dark); }
.copy-status { min-height: 1.6em; color: var(--success-text); font-size: 14px; }
code {
  border-radius: 5px;
  padding: 2px 6px;
  background: #f1f5f9;
  font-family: Consolas, "Courier New", monospace;
  word-break: break-all;
}
details.faq {
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  background: #fff;
}
details.faq summary { cursor: pointer; color: #111827; font-weight: 750; }
footer { border-top: 1px solid var(--line); background: #fff; color: var(--muted); }
.footer-inner { max-width: 900px; margin: 0 auto; padding: 26px 20px 38px; font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 10px; }
.footer-links a { color: #475467; }

@media (max-width: 760px) {
  .header-inner { padding: 10px 14px; }
  .header-main { align-items: center; }
  .brand { width: 132px; height: 48px; }
  .desktop-nav { display: none; }
  .mobile-menu { position: relative; display: block; }
  .mobile-menu > summary {
    min-width: 92px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 12px;
    background: #fff;
    color: #344054;
    font-weight: 750;
    text-align: center;
    cursor: pointer;
    list-style: none;
  }
  .mobile-menu > summary::-webkit-details-marker { display: none; }
  .mobile-menu[open] .mobile-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: grid;
    width: min(19rem, calc(100vw - 28px));
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }
  .mobile-nav a { min-height: 44px; align-content: center; padding: 7px 10px; }
  .language-switcher { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .language-switcher a { flex: 0 0 auto; min-height: 36px; align-content: center; }
  main { margin-top: 22px; padding: 0 14px; }
  .hero, .card { border-radius: 16px; padding: 22px; }
  h2 { font-size: 21px; }
  .card-grid { grid-template-columns: 1fr; }
  .page-card { min-height: 110px; }
  .table-wrap::after {
    display: block;
    padding-top: 6px;
    color: var(--muted);
    content: attr(data-scroll-hint);
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  .header-inner { padding-inline: 10px; }
  .brand { width: 118px; height: 44px; }
  main { padding-inline: 10px; }
  .hero, .card { padding: 18px; }
  h1 { font-size: 29px; }
  .button { width: 100%; }
}

@media print {
  .site-header, .button-row { display: none !important; }
  body { background: #fff; }
  main { max-width: none; margin: 0; }
  .hero, .card { border-color: #ccc; box-shadow: none; }
}
