:root {
  --bg: #151316;
  --panel: #1E1B20;
  --panel-high: #29242C;
  --border: #463D49;
  --accent: #DC58ED;
  --accent-dark: #A42AB5;
  --text: #F8F2F8;
  --muted: #BDB1C1;
  --success: #ACC6B5;
  --warn: #D9C195;
  --error: #DF9EA8;
  --quiet: #8E8294;
  --clear: transparent;
  --line: rgba(189, 177, 193, .15);
  --etch: rgba(248, 242, 248, .06);
  --shine: rgba(248, 242, 248, .24);
  --glass: rgba(248, 242, 248, .045);
  --glass-light: rgba(248, 242, 248, .13);
  --tint: rgba(220, 88, 237, .09);
  --tint-line: rgba(220, 88, 237, .3);
  --shadow: rgba(8, 6, 10, .5);
  --deep-shadow: rgba(8, 6, 10, .75);
  --button-glow: rgba(220, 88, 237, .2);
  --flag-white: #FFFFFF;
  --flag-red: #DE2938;
  --flag-hk: #DE2910;
  --flag-jp: #BC002D;
  --flag-us: #B22234;
  --flag-navy: #3C3B6E;
  --flag-blue: #21468B;
  --flag-green: #009246;

  --display: 'Inter', 'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', system-ui, sans-serif;
  --body: 'Inter', 'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', monospace;
  --h1: 64px;
  --h1-small: 40px;
  --h2: 36px;
  --h2-small: 28px;
  --h3: 24px;
  --large: 20px;
  --body-size: 16px;
  --small: 14px;
  --micro: 12px;
  --tiny: 10px;
  --regular: 400;
  --medium: 500;
  --semibold: 600;
  --bold: 700;
  --heavy: 850;
  --leading: 1.7;
  --leading-wide: 1.95;
  --leading-title: 1.15;
  --tracking-label: 1.5px;
  --tracking-brand: .2px;

  --radius: 28px;
  --inner-radius: 20px;
  --small-radius: 6px;
  --flag-radius: 3px;
  --pill: 999px;
  --gutter: 56px;
  --content-max: 1280px;
  --reading-max: 800px;
  --section-space: 80px;
  --card-space: 28px;
  --gap: 24px;
  --header-height: 100px;
  --anchor-offset: 16px;
  --toc-offset: 16px;
  --toc-clearance: 84px;
  --focus-width: 2px;
  --focus-offset: 4px;
  --fast: 160ms;
  --settle: 480ms;
  --ease: cubic-bezier(.2, .7, .25, 1);
  --panel-shadow: 0 32px 70px -34px var(--deep-shadow), inset 0 1px 0 var(--etch);
  --button-shadow: 0 0 0 1px var(--tint-line), 0 5px 24px -7px var(--button-glow), inset 0 1px 0 var(--shine);
  --groove-shadow: 0 1px 0 var(--etch);
}

*,
*::before,
*::after { box-sizing: border-box; }
html {
  background: var(--bg);
  color: var(--text);
  color-scheme: dark;
  scroll-padding-top: var(--anchor-offset);
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--body);
  font-size: var(--body-size);
  line-height: var(--leading);
  -webkit-font-smoothing: antialiased;
}
html.nav-open { overflow: hidden; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
svg { flex-shrink: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button, input, select, textarea { border-radius: var(--small-radius); }
button { background: var(--clear); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--text); }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: var(--focus-width) solid var(--accent);
  outline-offset: var(--focus-offset);
}
::selection { color: var(--text); background: var(--accent-dark); }
h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--text);
  font-weight: var(--heavy);
  margin: 0;
  overflow-wrap: break-word;
}
h1 {
  font-size: var(--h1);
  line-height: var(--leading-title);
  letter-spacing: 0;
}
h2 { font-size: var(--h2); line-height: 1.3; text-wrap: balance; }
h3 { font-size: var(--h3); line-height: 1.4; }
h4 { font-size: var(--large); line-height: 1.5; }
p { margin: 0 0 1.25em; }
strong { font-weight: var(--semibold); }
ul, ol { padding-inline-start: 1.5em; }
li + li { margin-top: .35em; }
code {
  font-family: var(--mono);
  font-size: .9em;
  overflow-wrap: anywhere;
  color: var(--text);
}
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: var(--gap);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--inner-radius);
  -webkit-overflow-scrolling: touch;
}
pre code { white-space: pre; overflow-wrap: normal; }
figure { margin: 0; }
.no-break { white-space: nowrap; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.small { font-size: var(--small); }
.shell, .wrap {
  width: 100%;
  max-width: calc(var(--content-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-width: 0;
}
.section {
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
}
.section-heading { margin-bottom: 32px; max-width: 850px; }
.section-heading p { margin-top: 16px; color: var(--muted); }
.flow > * + * { margin-top: var(--gap); }
.grid { display: grid; gap: var(--gap); }
.grid > *, .hero > *, .ribbon > *, .footer-grid > * { min-width: 0; }
.panel {
  padding: var(--card-space);
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--panel-shadow);
}
.panel-high { background: var(--panel-high); }
.prose { max-width: var(--reading-max); min-width: 0; }
.prose h2 { margin-top: 2em; margin-bottom: .8em; }
.prose h3 { margin-top: 1.7em; margin-bottom: .7em; }
.prose p, .prose li { color: var(--muted); overflow-wrap: anywhere; }
.prose a { color: var(--text); text-decoration: underline; text-underline-offset: .2em; }
.prose img { border-radius: var(--inner-radius); }
.prose > :first-child { margin-top: 0; }
.decor-field { position: relative; isolation: isolate; overflow-x: clip; }
.etch-layer {
  position: absolute;
  inset: 8% 2%;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--clear) 0 27px, var(--etch) 28px, var(--clear) 29px);
}
.tilt { transform: rotate(-.45deg); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  inset-inline-start: var(--gutter);
  top: 8px;
  transform: translateY(-150%);
  z-index: 100;
  padding: 10px 18px;
  border-radius: var(--pill);
  color: var(--bg);
  background: var(--text);
}
.skip-link:focus { transform: translateY(0); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 58px;
  max-width: 100%;
  padding: 10px 29px;
  border: 1px solid var(--clear);
  border-radius: var(--pill);
  font-size: var(--body-size);
  font-weight: var(--bold);
  line-height: 1.4;
  text-align: center;
  transition: background var(--fast), color var(--fast), border-color var(--fast), transform var(--fast);
}
.button svg { width: 20px; height: 20px; }
.primary, .btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  box-shadow: var(--button-shadow);
}
.primary:hover, .btn-primary:hover, .button.demo-hover {
  color: var(--bg);
  background: var(--text);
  border-color: var(--text);
}
.secondary { border-color: var(--border); background: var(--clear); }
.secondary:hover { background: var(--panel-high); }
.button:active, .button.demo-pressed { transform: translateY(1px); }
.button:disabled, .button[aria-disabled="true"] {
  color: var(--muted);
  background: var(--panel-high);
  border-color: var(--border);
  box-shadow: none;
  cursor: not-allowed;
}
.button.demo-focus { outline: var(--focus-width) solid var(--accent); outline-offset: var(--focus-offset); }
.button-compact { min-height: 44px; padding: 10px 20px; font-size: var(--small); }
.text-link { display: inline-flex; align-items: center; min-height: 28px; gap: 8px; text-decoration: underline; text-underline-offset: 5px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

#site-header { position: relative; z-index: 50; }
.mast {
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 36px;
  position: relative;
}
.mast::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline: var(--gutter);
  height: 1px;
  background: var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  white-space: nowrap;
  font-family: var(--display);
  font-size: var(--h3);
  font-weight: var(--heavy);
  letter-spacing: var(--tracking-brand);
  min-height: 44px;
}
.brand img { width: 36px; height: 36px; flex-shrink: 0; }
.brand-local { color: var(--muted); font-weight: var(--medium); font-size: var(--small); }
.navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  flex: 1;
  white-space: nowrap;
  font-size: var(--small);
  font-weight: var(--medium);
  color: var(--muted);
}
.navigation a { display: inline-flex; align-items: center; min-height: 32px; }
.navigation .current, .navigation [aria-current="page"] { color: var(--text); font-weight: var(--bold); }
.account { display: flex; align-items: center; gap: 22px; white-space: nowrap; font-size: var(--small); }
.language { position: relative; color: var(--muted); font-size: var(--micro); }
.language-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--small-radius);
  font-size: inherit;
  color: inherit;
  gap: 5px;
}
.lang-short { display: none; }
.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  padding: 8px;
  background: var(--panel-high);
  border: 1px solid var(--border);
  border-radius: var(--inner-radius);
  box-shadow: var(--panel-shadow);
  z-index: 60;
}
.language-menu a {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  min-height: 44px;
  border-radius: var(--small-radius);
}
.language-menu a:hover, .language-menu a[aria-current="true"] { background: var(--panel); color: var(--text); }
.login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 24px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  background: var(--panel-high);
  font-weight: var(--semibold);
}
.login:hover { background: var(--border); }
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--pill);
}
.menu-toggle svg { width: 20px; height: 20px; }
.mobile-drawer { display: none; }
.nav-veil {
  position: fixed;
  inset: var(--header-height) 0 0;
  background: var(--shadow);
  z-index: 40;
  border: 0;
  border-radius: 0;
}
.drawer-label { margin: 20px 14px 8px; color: var(--muted); font-size: var(--micro); }

.site-footer {
  background: var(--panel);
  border-top: 1px solid var(--line);
  padding-top: 58px;
  padding-bottom: 26px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr .8fr; gap: 40px; }
.footer-brand p { max-width: 320px; margin: 18px 0; color: var(--muted); font-size: var(--small); }
.footer-heading { margin: 0 0 15px; font-size: var(--small); font-weight: var(--semibold); color: var(--text); }
.footer-links { display: grid; align-content: start; gap: 4px; }
.footer-links a { min-height: 28px; width: fit-content; max-width: 100%; color: var(--muted); font-size: var(--small); overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--line);
  box-shadow: var(--groove-shadow);
  margin-top: 38px;
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  font-size: var(--micro);
  color: var(--muted);
}
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-legal a { display: inline-flex; align-items: center; min-height: 28px; }

.reveal { transition: opacity var(--settle) var(--ease), transform var(--settle) var(--ease); }
.reveal.pending { opacity: 0; transform: translateY(16px); }
.reveal.shown { opacity: 1; transform: none; }

@media (min-width: 1500px) {
  :root { --section-space: 96px; }
}
@media (max-width: 1250px) {
  :root { --gutter: 32px; }
  .mast { gap: 24px; }
  .navigation { gap: 15px; font-size: var(--micro); }
  .account { gap: 14px; }
}
@media (max-width: 1050px) {
  .mast { height: auto; min-height: var(--header-height); flex-wrap: wrap; justify-content: space-between; padding-top: 20px; padding-bottom: 20px; gap: 18px; }
  .navigation { order: 3; flex-basis: 100%; justify-content: space-between; }
  .footer-grid { grid-template-columns: 1.4fr 1fr; }
}
@media (max-width: 768px) {
  :root { --gutter: 20px; --section-space: 48px; --card-space: 22px; --gap: 20px; --header-height: 80px; }
  h1 { font-size: var(--h1-small); line-height: 1.2; }
  h2 { font-size: var(--h2-small); }
  .mast { min-height: var(--header-height); height: var(--header-height); padding-top: 0; padding-bottom: 0; flex-wrap: nowrap; gap: 10px; }
  .brand { font-size: var(--large); gap: 8px; }
  .brand img { width: 32px; height: 32px; }
  .navigation { display: none; }
  .account { margin-left: auto; gap: 8px; }
  .language { font-size: var(--tiny); }
  .login { min-height: 38px; padding-inline: 18px; }
  .menu-toggle { display: inline-flex; }
  .mobile-drawer {
    display: block;
    position: absolute;
    top: 100%;
    inset-inline: var(--gutter);
    z-index: 55;
    max-height: calc(100dvh - var(--header-height) - 16px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--inner-radius);
    background: var(--panel);
    box-shadow: var(--panel-shadow);
  }
  .mobile-drawer a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border-radius: var(--small-radius);
    color: var(--muted);
  }
  .mobile-drawer a:hover, .mobile-drawer a[aria-current] { color: var(--text); background: var(--panel-high); }
  .button { min-height: 52px; padding-inline: 23px; gap: 20px; }
  .actions { margin-top: 25px; gap: 12px; }
  .section-heading { margin-bottom: 24px; }
  .footer-grid { gap: 30px; }
  .preview-mast { height: auto; padding-top: 20px; padding-bottom: 20px; flex-wrap: wrap; }
  .preview-mast .navigation { display: flex; overflow-x: auto; justify-content: flex-start; gap: 24px; padding-bottom: 3px; }
  .preview-mast .navigation a { flex-shrink: 0; }
}
@media (max-width: 640px) {
  .tilt { transform: none; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 20px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 380px) {
  :root { --gutter: 16px; }
  .account { gap: 6px; }
  .lang-long { display: none; }
  .lang-short { display: inline; }
  .brand { font-size: var(--body-size); }
  .brand img { width: 28px; height: 28px; }
  .login { padding-inline: 12px; }
  .button { padding-inline: 18px; gap: 12px; font-size: var(--small); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
  .reveal, .reveal.pending, .reveal.shown { opacity: 1; transform: none; }
}