:root {
  color-scheme: light;
  --color-bg: #fffaf6;
  --color-bg-soft: #f8eee8;
  --color-panel: #ffffff;
  --color-panel-raised: #fff5ef;
  --color-panel-strong: #f3dfd4;
  --color-border: #dfc7bb;
  --color-border-strong: #caa99a;
  --color-accent: #2f7fae;
  --color-accent-strong: #1f638d;
  --color-accent-ink: #123e58;
  --color-text: #2a130e;
  --color-text-soft: #634941;
  --color-text-muted: #886b61;
  --color-success: #2f8a5a;
  --color-warning: #c76832;
  --color-error: #bd493e;
  --color-white: #ffffff;
  --color-ink: #170c09;
  --color-flag-red: #d9503f;
  --color-flag-blue: #3e5b99;
  --color-flag-white: #fffaf6;
  --line-soft: rgba(84, 50, 42, 0.1);
  --line-medium: rgba(84, 50, 42, 0.18);
  --line-strong: rgba(84, 50, 42, 0.32);
  --accent-soft: rgba(47, 127, 174, 0.1);
  --accent-medium: rgba(47, 127, 174, 0.18);
  --accent-line: rgba(47, 127, 174, 0.42);
  --success-soft: rgba(47, 138, 90, 0.12);
  --warning-soft: rgba(199, 104, 50, 0.12);
  --error-soft: rgba(189, 73, 62, 0.1);
  --twilight-soft: rgba(240, 168, 116, 0.2);
  --twilight-glow: rgba(240, 168, 116, 0.32);
  --cloud-top: rgba(240, 168, 116, 0.66);
  --cloud-bottom: rgba(202, 169, 154, 0.32);
  --shadow-low: 0 2px 8px rgba(42, 19, 14, 0.08);
  --shadow-mid: 0 22px 54px -24px rgba(42, 19, 14, 0.25);
  --shadow-high: 0 62px 120px -48px rgba(199, 104, 50, 0.34);
  --shadow-button: 0 12px 30px -16px rgba(47, 127, 174, 0.64);
  --shadow-inner: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  --font-display: 'Inter', 'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-height: 72px;
  --section-space: clamp(72px, 10vw, 136px);
  --toc-height: 58px;
  --focus-ring: 0 0 0 4px var(--accent-medium);
  --duration-fast: 160ms;
  --duration-normal: 360ms;
  --ease-standard: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
  -webkit-text-size-adjust: 100%;
}

html.nav-open {
  overflow: hidden;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(circle at 87% 4%, var(--twilight-soft), transparent 28rem),
    var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: 100;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

main,
section,
article,
aside,
header,
footer,
nav,
div {
  min-width: 0;
}

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

img {
  height: auto;
}

svg {
  flex-shrink: 0;
}

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

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

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

button {
  cursor: pointer;
}

button,
a,
summary,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="tab"]:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  box-shadow: var(--focus-ring);
}

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

p:last-child,
ul:last-child,
ol:last-child,
blockquote:last-child {
  margin-bottom: 0;
}

ul,
ol {
  padding-left: 1.35em;
}

li::marker {
  color: var(--color-accent);
}

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

:not(pre) > code {
  padding: 0.14em 0.38em;
  overflow-wrap: anywhere;
  border: 1px solid var(--line-medium);
  border-radius: var(--radius-xs);
  background: var(--color-bg-soft);
  color: var(--color-accent-ink);
}

pre {
  max-width: 100%;
  padding: 20px;
  overflow-x: auto;
  border: 1px solid var(--line-medium);
  border-radius: var(--radius-sm);
  background: var(--color-text);
  color: var(--color-bg);
  -webkit-overflow-scrolling: touch;
}

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

hr {
  height: 1px;
  margin: 48px 0;
  border: 0;
  background: var(--line-medium);
}

h1,
h2,
h3,
h4 {
  margin-top: 0;
  color: var(--color-text);
  font-family: var(--font-display);
  text-wrap: balance;
}

h1,
.hero-title {
  margin-bottom: 24px;
  font-size: clamp(52px, 5.3vw, 68px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2,
.section-title {
  margin-bottom: 20px;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.018em;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(22px, 2.4vw, 29px);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

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

.no-break {
  white-space: nowrap;
}

.text-accent,
.hero-title .highlight {
  color: var(--color-accent-strong);
}

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

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

.narrow {
  width: 100%;
  max-width: 820px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
}

.section-compact {
  padding-top: clamp(48px, 7vw, 88px);
  padding-bottom: clamp(48px, 7vw, 88px);
}

.section-head {
  max-width: 780px;
  margin-bottom: clamp(32px, 5vw, 60px);
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.kicker,
.eyebrow {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  padding: 4px 11px;
  border: 1px solid var(--line-medium);
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  box-shadow: var(--shadow-inner);
}

.kicker-dot,
.eyebrow-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.lead {
  max-width: 700px;
  color: var(--color-text-soft);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.75;
}

.lead strong {
  color: var(--color-text);
  font-weight: 700;
}

.panel,
.card {
  border: 1px solid var(--line-medium);
  border-radius: var(--radius-md);
  background: var(--color-panel);
  box-shadow: var(--shadow-low);
}

.panel-raised {
  border: 1px solid var(--line-medium);
  border-radius: var(--radius-md);
  background: var(--color-panel-raised);
  box-shadow: var(--shadow-mid);
}

.card {
  padding: clamp(20px, 3vw, 30px);
}

.grid-two,
.grid-three,
.grid-four {
  display: grid;
  gap: 20px;
}

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

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

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

.btn {
  display: inline-flex;
  min-width: 24px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    transform var(--duration-fast) var(--ease-standard),
    color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard),
    background-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

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

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

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

.btn-secondary,
.btn-ghost {
  border-color: var(--line-medium);
  background: var(--color-panel);
  color: var(--color-text);
  box-shadow: var(--shadow-inner);
}

.btn-secondary:hover,
.btn-ghost:hover {
  border-color: var(--color-border-strong);
  background: var(--color-panel-raised);
  color: var(--color-text);
}

.btn-danger {
  border-color: var(--color-error);
  background: var(--error-soft);
  color: var(--color-error);
}

.btn-small {
  min-height: 38px;
  padding: 8px 16px;
  font-size: 14px;
}

.btn[aria-disabled="true"],
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.badge,
.tag,
.fact-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 4px 10px;
  overflow: hidden;
  border: 1px solid var(--line-medium);
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  color: var(--color-text-soft);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-accent {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--color-accent-ink);
}

.badge-success {
  border-color: var(--color-success);
  background: var(--success-soft);
  color: var(--color-success);
}

.icon-box {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--color-accent-strong);
}

.icon-box svg {
  width: 20px;
  height: 20px;
}

.site-header {
  position: sticky;
  z-index: 80;
  top: 0;
  min-height: var(--header-height);
  border-bottom: 1px solid var(--line-soft);
  background: var(--color-bg);
}

.header-inner {
  display: grid;
  min-height: var(--header-height);
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.site-brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  text-decoration: none;
}

.site-brand:hover {
  color: var(--color-text);
}

.brand-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.brand-word {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-local {
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 500;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.desktop-nav a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.desktop-nav a:hover {
  background: var(--color-panel-raised);
  color: var(--color-text);
}

.desktop-nav a[aria-current="page"] {
  background: var(--color-panel-strong);
  color: var(--color-text);
  box-shadow: var(--shadow-inner);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-switcher {
  position: relative;
}

.language-button {
  display: inline-flex;
  min-width: 44px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 11px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text-muted);
}

.language-button:hover {
  background: var(--color-panel-raised);
  color: var(--color-text);
}

.language-menu {
  position: absolute;
  z-index: 90;
  top: calc(100% + 10px);
  right: 0;
  width: 172px;
  padding: 7px;
  border: 1px solid var(--line-medium);
  border-radius: var(--radius-md);
  background: var(--color-panel);
  box-shadow: var(--shadow-mid);
}

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

.language-menu a {
  display: flex;
  min-height: 42px;
  align-items: center;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  color: var(--color-text-soft);
  text-decoration: none;
}

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

.header-login {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 17px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--color-accent-ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.header-login:hover {
  border-color: var(--color-accent);
  background: var(--accent-medium);
  color: var(--color-accent-ink);
}

.menu-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
}

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

.mobile-nav {
  display: none;
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  padding: 11px var(--gutter);
  border-bottom: 1px solid var(--line-soft);
  color: var(--color-text);
  font-weight: 650;
  text-decoration: none;
}

.mobile-nav a[aria-current="page"] {
  background: var(--color-panel-strong);
  color: var(--color-accent-ink);
}

.mobile-language-label {
  padding: 16px var(--gutter) 6px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.nav-veil {
  position: fixed;
  z-index: 70;
  inset: var(--header-height) 0 0;
  border: 0;
  background: var(--line-strong);
}

.nav-veil[hidden] {
  display: none;
}

.site-footer {
  margin-top: var(--section-space);
  border-top: 1px solid var(--line-medium);
  background: var(--color-bg-soft);
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(230px, 1.2fr) repeat(3, minmax(150px, 1fr));
  gap: clamp(28px, 5vw, 64px);
  padding-top: 64px;
  padding-bottom: 52px;
}

.footer-brand {
  max-width: 360px;
}

.footer-brand .site-brand {
  margin-bottom: 16px;
}

.footer-brand p {
  color: var(--color-text-soft);
}

.footer-title {
  margin-bottom: 16px;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 800;
}

.footer-links {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  color: var(--color-text-soft);
  font-size: 14px;
  text-decoration: none;
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 22px;
  padding-bottom: 28px;
  border-top: 1px solid var(--line-medium);
  color: var(--color-text-muted);
  font-size: 13px;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-legal a {
  color: var(--color-text-muted);
}

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

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

.reveal.shown {
  opacity: 1;
  transform: translateY(0);
}

.prose {
  color: var(--color-text-soft);
}

.prose > * {
  max-width: 100%;
}

.prose h2 {
  margin-top: 2.2em;
}

.prose h3 {
  margin-top: 1.8em;
}

.prose a {
  overflow-wrap: anywhere;
}

.prose img {
  border-radius: var(--radius-md);
}

.prose blockquote {
  margin-inline: 0;
}

.prose table {
  border-collapse: collapse;
}

.prose > .data-table {
  max-width: 100%;
}

.stat-number,
[data-counter] {
  display: inline-block;
  min-width: 3.4ch;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.split-heading {
  visibility: visible;
}

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

  .header-inner {
    gap: 14px;
  }

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

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

  .header-inner {
    grid-template-columns: auto 1fr auto;
  }

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

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

  .mobile-nav {
    position: fixed;
    z-index: 85;
    top: var(--header-height);
    right: 0;
    left: 0;
    display: block;
    max-height: calc(100dvh - var(--header-height));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-bottom: 1px solid var(--line-medium);
    background: var(--color-panel);
    box-shadow: var(--shadow-mid);
  }

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

  h1,
  .hero-title {
    font-size: clamp(34px, 7vw, 40px);
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 64px;
    --gutter: max(16px, env(safe-area-inset-left));
  }

  h1,
  .hero-title {
    font-size: clamp(30px, 9.4vw, 38px);
    line-height: 1.12;
  }

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

  .grid-two,
  .grid-three,
  .grid-four {
    grid-template-columns: 1fr;
  }

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

  .button-row .btn {
    width: 100%;
  }

  .brand-logo {
    width: 27px;
    height: 27px;
  }

  .brand-word {
    font-size: 17px;
  }

  .brand-local {
    display: none;
  }

  .header-login {
    min-height: 38px;
    padding-inline: 13px;
  }

  .footer-main {
    grid-template-columns: 1fr;
    padding-top: 48px;
  }

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

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

  .decor,
  [class*="decor"] {
    max-width: 100%;
  }
}

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

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

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