:root {
  color-scheme: dark;
  --legal-bg: #050711;
  --legal-text: #eaf7ff;
  --legal-muted: #a8b8cb;
  --legal-cyan: #26f4ff;
  --legal-red: #ff3d4f;
  --legal-orange: #ff9b42;
  --legal-line: rgba(38, 244, 255, .22);
  --legal-panel: rgba(9, 15, 34, .78);
  --legal-ease: cubic-bezier(.22, 1, .36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.legal-page {
  margin: 0;
  color: var(--legal-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "Noto Sans JP", "Noto Sans KR", "Microsoft JhengHei", sans-serif;
  line-height: 1.72;
  background:
    radial-gradient(circle at 18% 8%, rgba(38, 244, 255, .18), transparent 30rem),
    radial-gradient(circle at 85% 10%, rgba(255, 61, 79, .18), transparent 34rem),
    radial-gradient(circle at 50% 85%, rgba(255, 155, 66, .10), transparent 32rem),
    linear-gradient(180deg, #050711 0%, #080b18 48%, #03040a 100%);
  overflow-x: hidden;
}

body.legal-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .02) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .7), transparent 80%);
}

.legal-container {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
}

.legal-topbar,
.legal-gamebar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(5, 7, 17, .78);
  backdrop-filter: blur(18px);
}

.legal-gamebar {
  top: 74px;
  z-index: 19;
  background: rgba(5, 7, 17, .62);
}

.legal-topbar__inner,
.legal-gamebar__inner,
.legal-footer__inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.legal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.legal-brand__mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #06121a;
  font-weight: 950;
  border: 1px solid var(--legal-line);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(38, 244, 255, .88), rgba(255, 61, 79, .72));
  box-shadow: 0 0 22px rgba(38, 244, 255, .18);
}

.legal-brand__mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.legal-brand__title {
  display: block;
  font-weight: 950;
  letter-spacing: .08em;
}

.legal-brand__sub {
  display: block;
  margin-top: -2px;
  color: var(--legal-muted);
  font-size: 12px;
  letter-spacing: .08em;
}

.legal-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.legal-links a,
.legal-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  color: var(--legal-text);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  transition: transform .24s var(--legal-ease), border-color .24s var(--legal-ease), box-shadow .24s var(--legal-ease);
}

.legal-links a:hover,
.legal-links a:focus-visible,
.legal-btn:hover,
.legal-btn:focus-visible {
  border-color: var(--legal-cyan);
  box-shadow: 0 0 18px rgba(38, 244, 255, .16);
  transform: translateY(-1px);
  outline: none;
}

.legal-hero {
  padding: 76px 0 48px;
}

.legal-doc {
  max-width: 940px;
}

.legal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--legal-cyan);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  border: 1px solid var(--legal-line);
  border-radius: 999px;
  background: rgba(38, 244, 255, .06);
}

.legal-doc h1 {
  margin: 18px 0 18px;
  font-size: clamp(46px, 8vw, 86px);
  line-height: .98;
  letter-spacing: .02em;
  text-shadow: 0 0 28px rgba(38, 244, 255, .18), 0 0 34px rgba(255, 61, 79, .14);
}

.legal-title-en {
  display: block;
  margin-top: 12px;
  color: #ffc0c8;
  font-size: clamp(18px, 2.4vw, 30px);
  letter-spacing: .18em;
  text-transform: uppercase;
}

.legal-lead {
  max-width: 830px;
  margin: 0 0 24px;
  color: var(--legal-muted);
  font-size: 19px;
}

.legal-notice {
  margin: 22px 0 0;
  padding: 16px 18px;
  color: var(--legal-muted);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  background: rgba(255, 255, 255, .035);
}

.legal-langbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.legal-langbar a {
  color: var(--legal-muted);
  font-size: 13px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, .025);
}

.legal-langbar a.current {
  color: var(--legal-text);
  border-color: var(--legal-cyan);
}

.legal-section {
  padding: 0 0 60px;
}

.legal-content {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(16, 24, 50, .78), rgba(7, 10, 22, .74));
  box-shadow: inset 0 0 24px rgba(255, 255, 255, .015);
}

.legal-content section + section {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.legal-content h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.14;
}

.legal-content h3 {
  margin: 22px 0 8px;
  color: var(--legal-cyan);
  font-size: 20px;
}

.legal-content p,
.legal-content li {
  color: var(--legal-muted);
}

.legal-content p {
  margin: 8px 0;
}

.legal-content ul {
  margin: 10px 0;
  padding-left: 1.2rem;
}

.legal-content li {
  margin: 6px 0;
}

.legal-content strong {
  color: var(--legal-text);
}

.legal-content a,
.legal-footer a {
  color: var(--legal-cyan);
  overflow-wrap: anywhere;
}

.legal-footer {
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: rgba(3, 4, 10, .76);
  padding: 26px 0;
  color: var(--legal-muted);
}

.legal-footer strong {
  color: var(--legal-text);
}

.legal-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legal-footer a {
  text-decoration: none;
}

@media (max-width: 900px) {
  .legal-topbar__inner,
  .legal-gamebar__inner,
  .legal-footer__inner {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .legal-gamebar {
    top: 0;
  }

  .legal-links {
    justify-content: flex-start;
  }

  .legal-hero {
    padding-top: 44px;
  }
}

@media (max-width: 560px) {
  .legal-container {
    width: min(100% - 24px, 1160px);
  }

  .legal-links a,
  .legal-btn {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .legal-content {
    border-radius: 22px;
  }
}
