:root {
  color-scheme: dark;
  --legal-page: #020304;
  --legal-ink: #f4f6f8;
  --legal-muted: rgba(220, 228, 238, 0.64);
  --legal-dim: rgba(220, 228, 238, 0.44);
  --legal-line: rgba(220, 231, 244, 0.13);
  --legal-panel: rgba(13, 19, 28, 0.76);
  --legal-accent: #7aa7ff;
  --legal-accent-alt: #9ed957;
  --legal-shell-glass-line: rgba(220, 231, 244, 0.13);
  --legal-shell-glass-surface:
    linear-gradient(118deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.014) 44%, rgba(10, 18, 28, 0.12)),
    rgba(5, 7, 10, 0.7);
  --legal-shell-glass-filter: blur(22px) saturate(118%);
}

html {
  min-height: 100%;
  background: var(--legal-page);
  scroll-behavior: smooth;
}

body.legal-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(840px 540px at 12% -14%, rgba(82, 119, 176, 0.25), transparent 68%),
    radial-gradient(720px 480px at 94% 10%, rgba(103, 151, 118, 0.15), transparent 70%),
    linear-gradient(148deg, #090d12 0%, #050709 50%, #020304 100%);
  color: var(--legal-ink);
  font-family: Inter, "Pretendard", "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

body.legal-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 46% 42%, rgba(122, 167, 255, 0.2), transparent 35%),
    radial-gradient(circle at 68% 54%, rgba(158, 217, 87, 0.1), transparent 32%),
    rgba(2, 3, 4, 0.86);
  transition: opacity 260ms ease;
}

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

.legal-page a {
  color: inherit;
}

.legal-page a:focus-visible {
  outline: 2px solid var(--legal-accent);
  outline-offset: 3px;
}

.legal-page h1,
.legal-page h2,
.legal-page h3,
.legal-page p,
.legal-page dl,
.legal-page dd {
  margin: 0;
}

.legal-page h1,
.legal-page h2,
.legal-page h3,
.legal-page p,
.legal-page dt,
.legal-page dd,
.legal-page th,
.legal-page td {
  word-break: keep-all;
}

.legal-skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--legal-accent);
  color: #020304;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}

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

.legal-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--legal-shell-glass-line);
  background: var(--legal-shell-glass-surface);
  -webkit-backdrop-filter: var(--legal-shell-glass-filter);
  backdrop-filter: var(--legal-shell-glass-filter);
}

.legal-header__inner {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto minmax(140px, 1fr);
  align-items: center;
  gap: 24px;
  width: min(1280px, calc(100% - 48px));
  min-height: 68px;
  margin: 0 auto;
}

.legal-header__brand {
  color: var(--legal-ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-decoration: none;
}

.legal-header__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.legal-header__nav a,
.legal-header__login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  color: var(--legal-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.legal-header__nav a,
.legal-header__login {
  padding: 0 13px;
  border-radius: 8px;
  transition: color 180ms ease, background-color 180ms ease;
}

.legal-header__nav a:hover,
.legal-header__nav a:focus-visible,
.legal-header__nav a[aria-current="page"],
.legal-header__login:hover,
.legal-header__login:focus-visible {
  color: var(--legal-ink);
  background: rgba(255, 255, 255, 0.07);
}

.legal-header__login {
  justify-self: end;
}

.legal-main {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 88px 0 112px;
}

.legal-intro {
  display: grid;
  gap: 14px;
  padding-bottom: 48px;
}

.legal-eyebrow,
.legal-document__eyebrow {
  color: rgba(173, 201, 246, 0.78);
  font-size: 11px;
  font-weight: 560;
  letter-spacing: 0.11em;
}

.legal-intro h1 {
  color: var(--legal-ink);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.045em;
}

.legal-intro > p:not(.legal-eyebrow) {
  color: var(--legal-muted);
  font-size: 16px;
}

.legal-tabs {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  min-height: 40px;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--legal-line);
  border-radius: 9px;
  background: rgba(13, 19, 28, 0.82);
  -webkit-backdrop-filter: blur(16px) saturate(112%);
  backdrop-filter: blur(16px) saturate(112%);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.legal-tabs::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.legal-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--legal-dim);
  font-size: 12px;
  font-weight: 560;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 220ms ease, background-color 220ms ease, color 220ms ease;
}

.legal-tabs a[aria-selected="true"] {
  border-color: rgba(91, 140, 255, 0.34);
  background: rgba(91, 140, 255, 0.16);
  color: var(--legal-ink);
}

.legal-tabs a:hover,
.legal-tabs a:focus-visible {
  border-color: rgba(91, 140, 255, 0.34);
  background: rgba(91, 140, 255, 0.16);
  color: var(--legal-ink);
}

.legal-documents {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-top: 32px;
}

.legal-documents::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(104deg, transparent 28%, rgba(122, 167, 255, 0.18) 48%, rgba(158, 217, 87, 0.09) 58%, transparent 76%);
  transform: translateX(-116%);
}

.legal-document {
  scroll-margin-top: 144px;
  overflow: hidden;
  border: 1px solid var(--legal-line);
  background:
    linear-gradient(136deg, rgba(255, 255, 255, 0.054), rgba(255, 255, 255, 0.014) 44%, rgba(122, 167, 255, 0.024)),
    var(--legal-panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.legal-document[hidden] {
  display: none;
}

.legal-document__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 42px 46px 30px;
  border-bottom: 1px solid var(--legal-line);
}

.legal-document__header > div {
  display: grid;
  gap: 10px;
}

.legal-document h2 {
  color: var(--legal-ink);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.legal-document__meta {
  flex: 0 0 auto;
  color: var(--legal-dim);
  font-size: 12px;
}

.legal-document__notice {
  display: grid;
  gap: 7px;
  margin: 30px 46px 0;
  padding: 16px 18px;
  border-left: 3px solid var(--legal-accent);
  background: rgba(95, 129, 183, 0.1);
  color: rgba(222, 232, 244, 0.74);
  font-size: 13px;
  line-height: 1.65;
}

.legal-document__notice strong {
  color: #b9d3ff;
  font-size: 12px;
}

.legal-section {
  display: grid;
  gap: 16px;
  padding: 32px 46px;
  border-bottom: 1px solid rgba(220, 231, 244, 0.09);
}

.legal-section:last-child {
  border-bottom: 0;
}

.legal-section h3 {
  color: rgba(244, 246, 248, 0.94);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
}

.legal-section p,
.legal-section li {
  color: var(--legal-muted);
  font-size: 14px;
  line-height: 1.82;
}

.legal-section a {
  color: #b7d0ff;
  font-weight: 560;
  text-underline-offset: 2px;
}

.legal-law-link {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-law-link:hover,
.legal-law-link:focus-visible {
  color: #e0ebff;
}

.legal-reference-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-reference-list li {
  font-size: 13px;
}

.legal-definition-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 30px;
  padding: 18px 20px;
  border: 1px solid rgba(220, 231, 244, 0.1);
  background: rgba(255, 255, 255, 0.034);
}

.legal-definition-list > div {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
}

.legal-definition-list dt {
  color: var(--legal-dim);
  font-size: 12px;
  font-weight: 560;
}

.legal-definition-list dd {
  color: rgba(235, 241, 248, 0.84);
  font-size: 13px;
  line-height: 1.6;
}

.legal-table-scroll {
  overflow-x: auto;
  border: 1px solid rgba(220, 231, 244, 0.11);
}

.legal-table-scroll:focus-visible {
  outline: 2px solid var(--legal-accent);
  outline-offset: 2px;
}

.legal-table-scroll table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  text-align: left;
}

.legal-table-scroll th,
.legal-table-scroll td {
  padding: 13px 15px;
  border-right: 1px solid rgba(220, 231, 244, 0.09);
  border-bottom: 1px solid rgba(220, 231, 244, 0.09);
  vertical-align: top;
  font-size: 12px;
  line-height: 1.65;
}

.legal-table-scroll th:last-child,
.legal-table-scroll td:last-child {
  border-right: 0;
}

.legal-table-scroll tr:last-child td {
  border-bottom: 0;
}

.legal-table-scroll th {
  background: rgba(122, 167, 255, 0.09);
  color: rgba(237, 243, 250, 0.82);
  font-weight: 560;
}

.legal-table-scroll td {
  color: var(--legal-muted);
}

.legal-header,
.legal-main,
.legal-page .site-footer {
  transition: opacity 260ms ease, transform 260ms cubic-bezier(0.22, 0.8, 0.32, 1);
}

.legal-page.is-page-leaving::after {
  opacity: 1;
}

.legal-page.is-page-leaving .legal-header,
.legal-page.is-page-leaving .legal-main,
.legal-page.is-page-leaving .site-footer {
  opacity: 0;
  transform: translateY(-10px);
}

.legal-page .site-footer {
  margin-top: 0;
  padding: 0 max(24px, calc((100vw - 1280px) / 2));
  border-top: 1px solid var(--legal-shell-glass-line);
  background: var(--legal-shell-glass-surface);
  -webkit-backdrop-filter: var(--legal-shell-glass-filter);
  backdrop-filter: var(--legal-shell-glass-filter);
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.22);
  color: rgba(244, 246, 248, 0.62);
}

.legal-page .site-footer__inner {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(0, 1.9fr);
  gap: clamp(38px, 7vw, 116px);
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 52px 0 42px;
}

.legal-page .site-footer__company,
.legal-page .site-footer__group {
  display: grid;
  align-content: start;
  gap: 10px;
}

.legal-page .site-footer__brand {
  width: fit-content;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-decoration: none;
}

.legal-page .site-footer__summary {
  max-width: 330px;
  color: rgba(244, 246, 248, 0.68);
  font-size: 14px;
  line-height: 1.6;
}

.legal-page .site-footer__business {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  color: rgba(244, 246, 248, 0.34);
  font-size: 11px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.65;
}

.legal-page .site-footer__copyright {
  margin: 12px 0 0;
  color: rgba(244, 246, 248, 0.34);
  font-size: 12px;
  font-weight: 400;
}

.legal-page .site-footer .site-footer__navigation {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 24px;
}

.legal-page .site-footer__group > p {
  margin: 0 0 4px;
  color: rgba(244, 246, 248, 0.38);
  font-size: 11px;
  font-weight: 560;
  letter-spacing: 0.08em;
}

.legal-page .site-footer .site-footer__group a {
  width: fit-content;
  color: rgba(244, 246, 248, 0.72);
  font-size: 13px;
  line-height: 1.45;
  text-decoration: none;
}

.legal-page .site-footer .site-footer__group a:hover,
.legal-page .site-footer .site-footer__group a:focus-visible {
  color: #fff;
}

@keyframes legal-header-enter {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes legal-intro-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes legal-tabs-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes legal-documents-enter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes legal-panel-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes legal-light-sweep {
  0% {
    opacity: 0;
    transform: translateX(-116%);
  }

  28% {
    opacity: 0.72;
  }

  100% {
    opacity: 0;
    transform: translateX(116%);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .legal-page.is-ready .legal-header {
    animation: legal-header-enter 420ms cubic-bezier(0.22, 0.8, 0.32, 1) both;
  }

  .legal-page.is-ready .legal-intro {
    animation: legal-intro-enter 560ms 70ms cubic-bezier(0.22, 0.8, 0.32, 1) both;
  }

  .legal-page.is-ready .legal-tabs-shell {
    animation: legal-tabs-enter 620ms 120ms cubic-bezier(0.22, 0.8, 0.32, 1) both;
  }

  .legal-page.is-ready .legal-documents {
    animation: legal-documents-enter 700ms 170ms cubic-bezier(0.22, 0.8, 0.32, 1) both;
  }

  .legal-page.is-ready .site-footer {
    animation: legal-documents-enter 620ms 230ms cubic-bezier(0.22, 0.8, 0.32, 1) both;
  }

  .legal-document.is-entering {
    animation: legal-panel-enter 420ms cubic-bezier(0.22, 0.8, 0.32, 1) both;
  }

  .legal-documents.is-transitioning::after {
    animation: legal-light-sweep 420ms cubic-bezier(0.22, 0.8, 0.32, 1) both;
  }
}

@media (max-width: 980px) {
  .legal-header__inner {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px;
  }

  .legal-header__nav {
    display: flex;
    gap: 2px;
  }

  .legal-header__nav a,
  .legal-header__login {
    padding: 0 8px;
  }
}

@media (max-width: 720px) {
  .legal-header__inner {
    grid-template-areas:
      "brand login"
      "nav nav";
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 2px;
    width: min(1280px, calc(100% - 36px));
    min-height: 94px;
  }

  .legal-header__brand {
    grid-area: brand;
    font-size: 13px;
  }

  .legal-header__nav {
    grid-area: nav;
    justify-content: flex-start;
    width: 100%;
  }

  .legal-header__nav a,
  .legal-header__login {
    min-height: 28px;
    padding: 0 7px;
    font-size: 11px;
  }

  .legal-header__login {
    grid-area: login;
  }

  .legal-main {
    width: min(100% - 36px, 1120px);
    padding: 56px 0 72px;
  }

  .legal-intro {
    gap: 12px;
    padding-bottom: 32px;
  }

  .legal-intro > p:not(.legal-eyebrow) {
    font-size: 15px;
  }

  .legal-documents {
    padding-top: 22px;
  }

  .legal-document__header {
    align-items: start;
    flex-direction: column;
    gap: 10px;
    padding: 30px 22px 24px;
  }

  .legal-document__notice {
    margin: 22px 22px 0;
    padding: 14px 15px;
  }

  .legal-section {
    gap: 13px;
    padding: 26px 22px;
  }

  .legal-section p,
  .legal-section li {
    font-size: 13px;
  }

  .legal-definition-list {
    grid-template-columns: 1fr;
    gap: 11px;
    padding: 16px;
  }

  .legal-definition-list > div {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .legal-page .site-footer {
    padding: 0 18px;
  }

  .legal-page .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 38px 0 32px;
  }

  .legal-page .site-footer__company {
    order: 2;
  }

  .legal-page .site-footer .site-footer__navigation {
    order: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
  }

  .legal-page .site-footer__group:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 390px) {
  .legal-main,
  .legal-header__inner {
    width: min(100% - 28px, 1120px);
  }

  .legal-document__header,
  .legal-section {
    padding-right: 18px;
    padding-left: 18px;
  }

  .legal-document__notice {
    margin-right: 18px;
    margin-left: 18px;
  }

  .legal-definition-list > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .legal-page .site-footer .site-footer__navigation {
    grid-template-columns: 1fr;
  }

  .legal-page .site-footer__group:last-child {
    grid-column: auto;
  }
}

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

  .legal-page::after,
  .legal-header,
  .legal-main,
  .legal-page .site-footer,
  .legal-document,
  .legal-documents::after,
  .legal-tabs a {
    animation: none;
    transition: none;
  }
}
