/* Normalize + 基礎排版 + 可及性 */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family:
    Inter,
    'Noto Sans TC',
    'Noto Sans SC',
    'Noto Sans JP',
    'Noto Sans KR',
    'Noto Sans Devanagari',
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(110, 231, 183, 0.25);
  color: inherit;
}

img,
svg,
video {
  max-width: 100%;
  display: block;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: none;
  border: none;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
}

h1,
h2,
h3 {
  margin: 0 0 12px;
  line-height: 1.25;
}
p {
  margin: 0 0 12px;
}
small {
  color: var(--color-text-dim);
}
code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
pre {
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
  border-radius: var(--radius-6);
  overflow: auto;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-10);
  box-shadow: var(--shadow-1);
  padding: 20px;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  background: var(--color-surface);
  border-radius: var(--radius-6);
}

/* Screen-reader only utility */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Language-specific font stacks for better glyph coverage */
:lang(zh-Hans) {
  font-family:
    Inter,
    'Noto Sans SC',
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
}
:lang(zh-Hant),
:lang(zh-Hant-TW),
:lang(zh-Hant-HK) {
  font-family:
    Inter,
    'Noto Sans TC',
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
}
:lang(ja) {
  font-family:
    Inter,
    'Noto Sans JP',
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
}
:lang(ko) {
  font-family:
    Inter,
    'Noto Sans KR',
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
}
:lang(hi) {
  font-family:
    Inter,
    'Noto Sans Devanagari',
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
}
:lang(ar) {
  font-family:
    Inter,
    'Noto Naskh Arabic',
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
}
:lang(he) {
  font-family:
    Inter,
    'Noto Sans Hebrew',
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
}
