/*
 * Baseline rules shared by every HTML entry, including error, payment and
 * authentication pages that do not use the marketing shell stylesheet.
 */
:root {
  color-scheme: dark;
  font-synthesis: none;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(139, 116, 255, .24);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  min-width: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img,
svg {
  height: auto;
}

button,
input,
select,
textarea {
  max-width: 100%;
  font: inherit;
}

button,
a,
input,
select,
summary,
textarea,
[role="button"] {
  touch-action: manipulation;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 16px;
  border: 1px solid #8b74ff;
  border-radius: 10px;
  background: #18181f;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .16s ease;
}

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

main[tabindex="-1"]:focus {
  outline: none;
}

:where(a, button, input, select, summary, textarea, [tabindex]):focus-visible {
  outline: 3px solid #b9adff;
  outline-offset: 3px;
}

::selection {
  background: #7962ff;
  color: #fff;
}

.network-status,
.javascript-required {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  left: max(16px, env(safe-area-inset-left));
  z-index: 1200;
  width: min(680px, calc(100% - 32px));
  min-height: 48px;
  margin-inline: auto;
  padding: 13px 48px 13px 16px;
  border: 1px solid #7e6af0;
  border-radius: 14px;
  background: #181720;
  box-shadow: 0 18px 60px #0009;
  color: #f7f5ff;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
}

.network-status[data-state="offline"] {
  border-color: #db8c5b;
  background: #241b18;
}

.network-status[data-state="online"] {
  border-color: #5abf92;
  background: #14221d;
}

.javascript-required {
  position: relative;
  inset: auto;
  display: block;
  width: auto;
  margin: 12px;
  padding: 12px 16px;
  text-align: center;
}

:where(nav, footer) a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

[data-network="offline"] :where(button, a)[aria-busy="true"] {
  cursor: wait;
}

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

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

@media (prefers-contrast: more) {
  :root {
    --shell-muted: #c9c9d2;
    --shell-line: #5b5b68;
    --shell-line-soft: #474752;
  }

  :where(a, button, input, select, summary, textarea) {
    text-decoration-thickness: max(1px, .08em);
  }
}

@media (forced-colors: active) {
  :where(a, button, input, select, summary, textarea):focus-visible {
    outline: 3px solid Highlight;
  }

  .brand-mark {
    border: 1px solid CanvasText;
  }
}

@media print {
  :root {
    color-scheme: light;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    box-shadow: none !important;
    filter: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  body {
    background: #fff !important;
    color: #111 !important;
  }

  body::before,
  .site-shell-menu-toggle,
  .site-shell-backdrop {
    display: none !important;
  }

  .network-status,
  .javascript-required {
    display: none !important;
  }

  a[href] {
    color: inherit;
    text-decoration: underline;
  }
}
