:root {
  --ink: #172033;
  --muted: #667085;
  --line: rgba(203, 213, 225, 0.84);
  --green: #16a34a;
  --teal: #0f766e;
  --header: #0f2f3a;
  --header-2: #123f45;
  --paper: #ffffff;
  --soft: #f5faf7;
  --notice: #fff7ed;
  --notice-line: #fed7aa;
  --shadow: 0 24px 54px rgba(17, 24, 39, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", Arial, sans-serif;
  background: linear-gradient(180deg, #f7faf8 0%, #eef8f2 100%);
}

a,
button {
  font: inherit;
}

.legal-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 8px clamp(32px, 4vw, 76px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  color: var(--ink);
  text-decoration: none;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0;
}

.legal-brand img {
  width: 228px;
  height: auto;
  flex: 0 0 auto;
  border-radius: 0;
  object-fit: contain;
}

.legal-home {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.72);
}

.legal-main {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(24px, 4vw, 44px) 0;
}

.legal-card {
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid rgba(22, 163, 74, 0.2);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.legal-kicker {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 15px;
  font-weight: 950;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.16;
  font-weight: 950;
}

.legal-updated {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.draft-notice {
  margin: 22px 0;
  padding: 14px 16px;
  border: 1px solid var(--notice-line);
  border-radius: 8px;
  background: var(--notice);
  color: #9a3412;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 850;
}

.legal-toc {
  margin: 24px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.legal-toc h2,
.legal-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.3;
  font-weight: 950;
}

.legal-toc ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 18px;
  margin: 14px 0 0;
  padding-left: 20px;
}

.legal-toc a {
  color: var(--teal);
  font-weight: 900;
  text-decoration: none;
}

.legal-toc a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-section {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.legal-section p,
.legal-section li {
  color: #344054;
  font-size: 16px;
  line-height: 1.8;
  font-weight: 700;
}

.legal-section p {
  margin: 10px 0 0;
}

.legal-section ul {
  margin: 12px 0 0;
  padding-left: 22px;
}

.legal-footer {
  margin-top: 28px;
  padding: 22px clamp(18px, 4vw, 72px);
  background: #0f2f3a;
  color: rgba(255, 255, 255, 0.84);
}

.legal-footer-inner {
  width: min(980px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto;
}

.legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.legal-footer a {
  color: #fff;
  font-weight: 850;
  text-decoration: none;
}

.legal-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.top-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  min-height: 40px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-weight: 950;
  box-shadow: 0 14px 30px rgba(16, 139, 86, 0.24);
}

@media (max-width: 760px) {
  .legal-header {
    min-height: 70px;
    height: 70px;
    justify-content: center;
    padding: 8px 16px;
  }

  .legal-brand {
    gap: 0;
  }

  .legal-brand img {
    width: 150px;
    height: auto;
  }

  .legal-brand span,
  .legal-home {
    display: none;
  }
}

@media (max-width: 700px) {
  .legal-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .legal-main {
    width: min(100% - 24px, 980px);
    padding: 16px 0;
  }

  .legal-card {
    padding: 18px;
  }

  .legal-toc ol {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 30px;
  }

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