:root {
  --layout-max: 1280px;
  --content-max: 740px;
  --color-bg: #fff;
  --color-text: #111;
  --color-muted: #6b6b66;
  --color-accent: #8a4b34;
  --color-mist: #f2f3f1;
  --color-rule: #d9dad6;
  --font-body: Arial, "Helvetica Neue", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-ko: "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --font-ja: "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  --font-condensed: "Arial Narrow", "Avenir Next Condensed", Arial, sans-serif;
  --header-height: 78px;
}

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

html {
  background: var(--color-bg);
  color: var(--color-text);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

html[lang="ko"] body,
html[lang="ko"] button {
  font-family: var(--font-ko);
}

html[lang="ja"] body,
html[lang="ja"] button {
  font-family: var(--font-ja);
}

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

img {
  height: auto;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

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

h1,
h2,
h3,
p,
figure,
dl,
dd {
  margin-block-start: 0;
}

h1,
h2,
h3 {
  line-height: 1.1;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

[hidden] {
  display: none !important;
}

.layout {
  width: min(calc(100% - 48px), var(--layout-max));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--color-text);
  color: var(--color-bg);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  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;
}

@media (max-width: 720px) {
  :root {
    --header-height: 68px;
  }

  .layout {
    width: min(calc(100% - 32px), var(--layout-max));
  }

  button,
  a {
    min-height: 44px;
  }
}

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

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