/* Reset & base typography */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

:root {
  --font-family-base: "Pretendard", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  font-family: var(--font-family-base);
}

body {
  margin: 0;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: #1a1a1a;
  background-color: #fff;
}

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

input,
button,
textarea,
select,
optgroup,
option {
  font: inherit;
  font-family: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6,
nav,
header,
footer,
label {
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0 0 0.5rem;
}

h1:last-child,
h2:last-child,
h3:last-child,
h4:last-child,
p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Overflow safety (all viewports — does not change normal line composition)
   -------------------------------------------------------------------------- */
html {
  overflow-wrap: break-word;
}

/* --------------------------------------------------------------------------
   Responsive typography (KO / EN) — tablet/mobile only (≤1024px)
   Desktop (≥1025px) keeps original per-component wrapping and <br> layout.
   -------------------------------------------------------------------------- */
@media (max-width: 64rem) {
  html:lang(ko) {
    word-break: keep-all;
    text-wrap: pretty;
  }

  html:lang(ko) h1,
  html:lang(ko) h2,
  html:lang(ko) h3,
  html:lang(ko) h4,
  html:lang(ko) h5,
  html:lang(ko) h6 {
    text-wrap: balance;
  }

  html:lang(en) {
    word-break: normal;
    text-wrap: pretty;
  }

  html:lang(en) h1,
  html:lang(en) h2,
  html:lang(en) h3,
  html:lang(en) h4,
  html:lang(en) h5,
  html:lang(en) h6 {
    text-wrap: balance;
  }
}

/* Decorative desktop-only line breaks (also used via container rules in common.css) */
br.br-desktop {
  display: inline;
}

@media (max-width: 64rem) {
  br.br-desktop {
    display: none;
  }
}

/* Long unbreakable tokens (URLs, emails, file paths) */
.text-breakable {
  overflow-wrap: anywhere;
  word-break: break-word;
}
