:root {
  --color-canvas: #FFFFFF;
  --color-panel: #F5F8F9;
  --color-panel-strong: #ECF1F3;
  --color-line: #E1E8EA;
  --color-brand: #0C5D72;
  --color-brand-bright: #2E98AE;
  --color-brand-deep: #08414F;
  --color-ink: #0F262E;
  --color-muted: #5C7078;
  --color-pulse: #F0512C;
  --color-success: #1D8A5F;
  --color-warning: #C98A1B;
  --color-error: #C43A2B;
  --color-stage-start: #EAF6F8;
  --color-stage-end: #D9EEF2;
  --color-flag-red: #CF3630;
  --color-flag-blue: #2A4B9B;
  --color-flag-gold: #F2C744;
  --color-flag-black: #23272E;
  --color-white: #FFFFFF;
  --color-shadow-soft: rgba(15, 38, 46, 0.06);
  --color-shadow-brand: rgba(12, 93, 114, 0.12);
  --color-shadow-float: rgba(12, 93, 114, 0.16);
  --color-shadow-pulse: rgba(240, 81, 44, 0.28);
  --color-overlay: rgba(8, 65, 79, 0.42);
  --gradient-title: linear-gradient(92deg, var(--color-brand) 8%, var(--color-brand-bright) 88%);
  --gradient-stage: linear-gradient(160deg, var(--color-stage-start) 0%, var(--color-stage-end) 100%);
  --gradient-promo: linear-gradient(135deg, var(--color-brand-deep), var(--color-brand));
  --font-display: 'Inter', 'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', -apple-system, 'PingFang SC', 'Hiragino Kaku Gothic ProN', 'Malgun Gothic', sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', -apple-system, 'PingFang SC', 'Hiragino Kaku Gothic ProN', 'Malgun Gothic', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Consolas, monospace;
  --radius-small: 12px;
  --radius-medium: 18px;
  --radius-large: 32px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px var(--color-shadow-soft), 0 10px 26px var(--color-shadow-brand);
  --shadow-float: 0 2px 4px var(--color-shadow-soft), 0 18px 38px var(--color-shadow-float);
  --shadow-button: 0 8px 20px var(--color-shadow-pulse);
  --page-width: 1216px;
  --reading-width: 56rem;
  --gutter: 32px;
  --header-height: 64px;
  --toc-offset: 76px;
  --motion-fast: 180ms;
  --motion-normal: 360ms;
  --motion-slow: 700ms;
  --ease-standard: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  background: var(--color-canvas);
}

html.nav-open {
  overflow: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background: var(--color-canvas);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

main,
section,
article,
aside,
header,
footer,
nav {
  display: block;
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
summary {
  cursor: pointer;
}

button {
  border: 0;
}

a {
  color: var(--color-brand);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--color-brand-deep);
}

p,
ul,
ol,
blockquote,
pre,
table {
  margin-top: 0;
  margin-bottom: 1.25rem;
}

ul,
ol {
  padding-left: 1.4rem;
}

li + li {
  margin-top: 0.4rem;
}

code,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

:not(pre) > code {
  max-width: 100%;
  padding: 0.16em 0.42em;
  overflow-wrap: anywhere;
  border-radius: var(--radius-small);
  background: var(--color-panel-strong);
  color: var(--color-brand-deep);
}

pre {
  max-width: 100%;
  padding: 1.25rem;
  overflow-x: auto;
  border-radius: var(--radius-medium);
  background: var(--color-brand-deep);
  color: var(--color-white);
  -webkit-overflow-scrolling: touch;
}

pre code {
  overflow-wrap: normal;
  white-space: pre;
}

table {
  border-collapse: collapse;
}

hr {
  height: 1px;
  margin: 2rem 0;
  border: 0;
  background: var(--color-line);
}

::selection {
  background: var(--color-stage-end);
  color: var(--color-brand-deep);
}

:focus-visible {
  outline: 3px solid var(--color-pulse);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.reading-wrap {
  width: 100%;
  max-width: var(--reading-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-top: 88px;
  padding-bottom: 88px;
  overflow-x: clip;
}

.section-compact {
  padding-top: 56px;
  padding-bottom: 56px;
  overflow-x: clip;
}

h1,
h2,
h3,
h4 {
  margin-top: 0;
  color: var(--color-brand-deep);
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  text-wrap: balance;
}

h1,
.hero-title {
  max-width: 100%;
  margin-bottom: 1.25rem;
  font-size: clamp(52px, 5.4vw, 72px);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.01em;
}

h3 {
  margin-bottom: 0.75rem;
  font-size: clamp(22px, 2.3vw, 30px);
}

h4 {
  margin-bottom: 0.6rem;
  font-size: 18px;
}

.display-gradient {
  background: var(--gradient-title);
  background-clip: text;
  color: transparent;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nowrap-term {
  white-space: nowrap;
}

.eyebrow {
  margin-bottom: 0.75rem;
  color: var(--color-brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lead {
  max-width: 46rem;
  color: var(--color-muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.75;
}

.muted {
  color: var(--color-muted);
}

.mono {
  font-family: var(--font-mono);
}

.badge,
.tag,
.fact-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  min-height: 30px;
  padding: 0.25rem 0.9rem;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  color: var(--color-brand-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.badge-dot,
.status-dot,
.icon-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  background: var(--color-pulse);
}

.btn {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.65rem 2rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: transform var(--motion-fast) var(--ease-standard), background-color var(--motion-fast) ease, color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-pulse);
  box-shadow: var(--shadow-button);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-error);
  color: var(--color-white);
}

.btn-secondary {
  border-color: var(--color-brand);
  background: var(--color-canvas);
  color: var(--color-brand);
}

.btn-secondary:hover {
  background: var(--color-panel);
  color: var(--color-brand-deep);
}

.btn-brand {
  background: var(--color-brand);
  color: var(--color-white);
}

.btn-brand:hover {
  background: var(--color-brand-deep);
  color: var(--color-white);
}

.btn-small {
  min-height: 40px;
  padding-inline: 1.25rem;
  font-size: 0.86rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.panel,
.card {
  border-radius: var(--radius-large);
  background: var(--color-panel);
}

.card {
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow-card);
}

.card-white {
  background: var(--color-canvas);
}

.site-header {
  position: relative;
  z-index: 100;
  border-bottom: 1px solid var(--color-line);
  background: var(--color-canvas);
}

.header-inner {
  display: flex;
  height: var(--header-height);
  align-items: center;
  gap: 1.5rem;
}

.site-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.65rem;
  color: var(--color-brand-deep);
  text-decoration: none;
}

.site-brand img {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.brand-english {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-local {
  color: var(--color-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.desktop-nav {
  display: flex;
  flex: 1 1 auto;
  align-self: stretch;
  align-items: center;
  gap: 0.15rem;
}

.desktop-nav a {
  position: relative;
  display: inline-flex;
  height: 100%;
  align-items: center;
  padding-inline: 0.72rem;
  color: var(--color-muted);
  font-size: 0.86rem;
  font-weight: 550;
  text-decoration: none;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
  color: var(--color-brand-deep);
}

.desktop-nav a.is-active {
  font-weight: 750;
}

.desktop-nav a.is-active::after {
  position: absolute;
  right: 0.72rem;
  bottom: 0;
  left: 0.72rem;
  height: 3px;
  border-radius: var(--radius-small) var(--radius-small) 0 0;
  background: var(--color-brand);
  content: "";
}

.header-tools {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.7rem;
}

.language-switch {
  position: relative;
}

.language-button {
  min-height: 40px;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--color-canvas);
  color: var(--color-muted);
  font-size: 0.8rem;
}

.language-button:hover {
  background: var(--color-panel);
  color: var(--color-brand-deep);
}

.language-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 168px;
  padding: 0.45rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-medium);
  background: var(--color-canvas);
  box-shadow: var(--shadow-float);
}

.language-menu[hidden] {
  display: none;
}

.language-menu a {
  display: flex;
  min-height: 42px;
  align-items: center;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-small);
  color: var(--color-muted);
  font-size: 0.84rem;
  text-decoration: none;
}

.language-menu a:hover,
.language-menu a[aria-current="true"] {
  background: var(--color-panel);
  color: var(--color-brand-deep);
}

.header-login {
  min-height: 36px;
  padding-inline: 1.2rem;
  border-radius: var(--radius-pill);
  background: var(--color-brand);
  color: var(--color-white);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.header-login:hover {
  background: var(--color-brand-deep);
  color: var(--color-white);
}

.menu-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  color: var(--color-brand-deep);
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
}

.mobile-drawer {
  display: none;
}

.menu-veil {
  display: none;
}

.site-footer {
  margin-top: 88px;
  padding-top: 64px;
  background: var(--color-brand-deep);
  color: var(--color-white);
  overflow-x: clip;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.15fr) repeat(3, minmax(150px, 1fr));
  gap: 3rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--color-white);
  text-decoration: none;
}

.footer-brand img {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.footer-brand-copy {
  display: grid;
  gap: 0.05rem;
}

.footer-description {
  max-width: 24rem;
  margin-top: 1rem;
  color: var(--color-stage-end);
  font-size: 0.9rem;
}

.footer-title {
  margin-bottom: 1rem;
  color: var(--color-white);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.footer-links {
  display: grid;
  gap: 0.6rem;
}

.footer-links a {
  color: var(--color-stage-end);
  font-size: 0.88rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-bottom {
  display: flex;
  margin-top: 3rem;
  padding-block: 1.3rem;
  border-top: 1px solid var(--color-brand);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--color-stage-end);
  font-size: 0.8rem;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-legal a {
  color: var(--color-stage-end);
  text-decoration: none;
}

.reveal {
  transition: opacity var(--motion-slow) var(--ease-standard), transform var(--motion-slow) var(--ease-standard);
}

.reveal.pending {
  opacity: 0;
  transform: translateY(16px);
}

.reveal.shown {
  opacity: 1;
  transform: none;
}

.tilt,
.tilt-card {
  transform: rotate(-0.35deg);
}

body:has(.toc-tabs) section[id] {
  scroll-margin-top: calc(var(--toc-offset) + 72px);
}

@media (max-width: 1120px) {
  .desktop-nav a {
    padding-inline: 0.48rem;
    font-size: 0.8rem;
  }

  .desktop-nav a.is-active::after {
    right: 0.48rem;
    left: 0.48rem;
  }

  .brand-local {
    display: none;
  }
}

@media (max-width: 900px) {
  .desktop-nav,
  .desktop-language {
    display: none;
  }

  .header-tools {
    margin-left: auto;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .mobile-drawer {
    position: absolute;
    z-index: 103;
    top: var(--header-height);
    right: 0;
    left: 0;
    display: none;
    max-height: calc(100dvh - var(--header-height));
    padding: 0.75rem var(--gutter) 1.25rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-top: 1px solid var(--color-line);
    background: var(--color-canvas);
    box-shadow: var(--shadow-float);
  }

  .mobile-drawer.is-open {
    display: block;
  }

  .mobile-drawer a {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    padding: 0.7rem 0.8rem;
    border-radius: var(--radius-small);
    color: var(--color-muted);
    text-decoration: none;
  }

  .mobile-drawer a:hover,
  .mobile-drawer a.is-active,
  .mobile-drawer a[aria-current="true"] {
    background: var(--color-panel);
    color: var(--color-brand-deep);
  }

  .drawer-languages {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--color-line);
  }

  .menu-veil {
    position: fixed;
    z-index: 90;
    inset: var(--header-height) 0 0;
    background: var(--color-overlay);
  }

  .menu-veil.is-open {
    display: block;
  }

  .site-header {
    z-index: 100;
  }

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

@media (max-width: 768px) {
  h1,
  .hero-title {
    font-size: clamp(28px, 9vw, 40px);
    letter-spacing: -0.01em;
  }

  h2 {
    font-size: clamp(28px, 8vw, 38px);
  }

  .section {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .section-compact {
    padding-top: 42px;
    padding-bottom: 42px;
  }

  .decorative-copy,
  .hero-coordinate,
  .section-watermark {
    display: none;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }

  body {
    font-size: 15px;
  }

  .wrap,
  .reading-wrap {
    padding-inline: var(--gutter);
  }

  .header-inner {
    gap: 0.55rem;
  }

  .site-brand {
    gap: 0.45rem;
  }

  .site-brand img {
    width: 32px;
    height: 32px;
  }

  .brand-english {
    font-size: 0.98rem;
  }

  .header-tools {
    gap: 0.35rem;
  }

  .header-login {
    min-height: 36px;
    padding-inline: 0.9rem;
  }

  .button-row {
    align-items: stretch;
  }

  .button-row .btn {
    flex: 1 1 150px;
  }

  .tilt,
  .tilt-card,
  [class*="tilt"] {
    transform: none;
  }

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

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 380px) {
  .brand-english {
    font-size: 0.9rem;
  }

  .header-login {
    padding-inline: 0.72rem;
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal,
  .reveal.pending,
  .reveal.shown {
    opacity: 1;
    transform: none;
  }

  .btn:hover {
    transform: none;
  }
}