:root {
  color-scheme: light;
  --legal-nav-height: 60px;
  --ocean-950: #062c3d;
  --ocean-800: #07546e;
  --ocean-700: #006994;
  --ocean-500: #0583cc;
  --teal-600: #0ca678;
  --aqua-400: #48cae4;
  --ink: #173244;
  --muted: #607580;
  --canvas: #eef7f8;
  --surface: #ffffff;
  --line: #d9e7eb;
  --soft-blue: #eaf7fb;
  --soft-green: #eaf9f3;
  --soft-gold: #fff7dc;
  --soft-red: #fff0ef;
  --danger: #b84337;
  --shadow: 0 18px 50px rgba(6, 44, 61, 0.11);
  --radius-large: 28px;
  --radius-medium: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  padding-top: var(--legal-nav-height);
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 5%, rgba(72, 202, 228, 0.18), transparent 28rem),
    linear-gradient(180deg, #e9f6f7 0, var(--canvas) 28rem, #f6fafb 100%);
  font-family: "Noto Sans TC", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 105, 148, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 105, 148, 0.025) 1px, transparent 1px);
  background-size: 34px 34px;
}

a {
  color: var(--ocean-700);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--teal-600);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 9999;
  padding: 10px 16px;
  color: #ffffff;
  background: var(--ocean-950);
  border-radius: 10px;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

#navbar {
  position: relative;
  z-index: 2000;
}

.legal-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 85% 20%, rgba(72, 202, 228, 0.35), transparent 22rem),
    linear-gradient(135deg, var(--ocean-950), var(--ocean-700) 58%, #078aa4);
}

.legal-hero::after {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -150px;
  width: 360px;
  height: 360px;
  border: 60px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.legal-hero-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 74px 0 64px;
}

.legal-eyebrow,
.section-label {
  margin: 0 0 8px;
  color: var(--teal-600);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.legal-hero .legal-eyebrow {
  color: #94efff;
}

.legal-hero h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(2.35rem, 7vw, 4.7rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.legal-lead {
  max-width: 720px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.legal-meta span {
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: 0.82rem;
  backdrop-filter: blur(8px);
}

.site-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.site-scope a {
  min-height: 44px;
  padding: 9px 16px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.site-scope a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.legal-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  width: min(1180px, calc(100% - 40px));
  margin: -28px auto 70px;
  position: relative;
  z-index: 2;
}

.terms-toc {
  position: sticky;
  top: 82px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(217, 231, 235, 0.95);
  border-radius: var(--radius-medium);
  box-shadow: 0 12px 36px rgba(6, 44, 61, 0.08);
  backdrop-filter: blur(12px);
}

.toc-details summary {
  min-height: 44px;
  color: var(--ocean-950);
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
}

.toc-details[open] summary {
  margin-bottom: 10px;
}

.toc-nav {
  display: grid;
  gap: 2px;
}

.toc-link {
  position: relative;
  display: block;
  padding: 7px 9px 7px 15px;
  color: var(--muted);
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
}

.toc-link::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 4px;
  height: 4px;
  background: #b4c5cc;
  border-radius: 50%;
  transform: translateY(-50%);
}

.toc-link:hover {
  color: var(--ocean-700);
  background: var(--soft-blue);
}

.toc-link.is-active {
  color: var(--ocean-700);
  background: var(--soft-blue);
  font-weight: 800;
}

.toc-link.is-active::before {
  width: 5px;
  height: 20px;
  background: var(--teal-600);
  border-radius: 999px;
}

.print-button {
  width: 100%;
  min-height: 44px;
  margin-top: 16px;
  color: #ffffff;
  background: var(--ocean-700);
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.print-button:hover {
  background: var(--ocean-800);
  transform: translateY(-1px);
}

.legal-article {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(217, 231, 235, 0.95);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
}

.legal-section {
  padding: 42px clamp(24px, 5vw, 58px);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 88px;
}

.legal-section:last-child {
  border-bottom: 0;
}

.legal-section h2 {
  margin: 0 0 20px;
  color: var(--ocean-950);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.legal-section h3 {
  margin: 0 0 8px;
  color: var(--ocean-800);
  font-size: 1.05rem;
}

.legal-section p {
  max-width: 75ch;
  margin: 0 0 1.15em;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section ul,
.legal-section ol {
  max-width: 75ch;
  margin: 0 0 1.25em;
  padding-left: 1.5rem;
}

.legal-section li {
  margin-bottom: 0.55em;
}

.legal-section li::marker {
  color: var(--teal-600);
  font-weight: 900;
}

.legal-summary {
  background: linear-gradient(145deg, #ffffff, #f6fbfc);
}

.summary-grid,
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.summary-item,
.service-card {
  padding: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.summary-item {
  border-top: 4px solid var(--teal-600);
}

.summary-item strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ocean-950);
}

.summary-item p,
.service-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.7;
}

.service-card {
  background: var(--soft-blue);
  border-color: #cce9f1;
}

.domain-list {
  display: grid;
  gap: 10px;
  padding: 0 !important;
  list-style: none;
}

.domain-list li {
  display: grid;
  gap: 3px;
  padding: 15px 18px;
  background: var(--soft-blue);
  border: 1px solid #cfe7ed;
  border-radius: 13px;
}

.domain-list a {
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

.operator-list {
  display: grid;
  gap: 0;
  max-width: 75ch;
  margin: 24px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.operator-list div {
  display: grid;
  grid-template-columns: minmax(130px, 0.34fr) 1fr;
  border-bottom: 1px solid var(--line);
}

.operator-list div:last-child {
  border-bottom: 0;
}

.operator-list dt,
.operator-list dd {
  margin: 0;
  padding: 13px 16px;
}

.operator-list dt {
  color: var(--ocean-800);
  background: #f3f8fa;
  font-weight: 800;
}

.operator-list dd {
  overflow-wrap: anywhere;
}

.fill-in {
  color: #8b5900;
  background: var(--soft-gold);
  border-bottom: 1px dashed #b98420;
  font-weight: 700;
}

.legal-note {
  max-width: 75ch;
  margin: 24px 0 0;
  padding: 18px 20px;
  color: #245543;
  background: var(--soft-green);
  border-left: 5px solid var(--teal-600);
  border-radius: 12px;
}

.legal-note--warning {
  color: #70510a;
  background: var(--soft-gold);
  border-left-color: #d89b1b;
}

.legal-note--danger {
  color: #81372f;
  background: var(--soft-red);
  border-left-color: var(--danger);
}

.legal-footer {
  padding: 34px 20px 44px;
  color: rgba(255, 255, 255, 0.82);
  background: var(--ocean-950);
  text-align: center;
}

.legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin-bottom: 14px;
}

.legal-footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.legal-footer a:hover {
  color: #94efff;
}

.legal-footer p {
  margin: 5px 0;
  font-size: 0.83rem;
}

#visitor-count {
  color: rgba(255, 255, 255, 0.68);
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #ffffff;
  background: var(--ocean-700);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 10px 25px rgba(6, 44, 61, 0.22);
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
  transform: translateY(12px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .legal-shell {
    grid-template-columns: 1fr;
    width: min(760px, calc(100% - 28px));
    margin-top: -22px;
  }

  .terms-toc {
    position: static;
  }

  .toc-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-grid,
  .service-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  body {
    line-height: 1.72;
  }

  .legal-hero-inner {
    width: calc(100% - 30px);
    padding: 54px 0 46px;
  }

  .legal-meta,
  .site-scope {
    display: grid;
  }

  .site-scope a {
    display: flex;
    align-items: center;
  }

  .legal-shell {
    width: calc(100% - 20px);
    gap: 16px;
    margin-bottom: 38px;
  }

  .terms-toc {
    padding: 16px;
    border-radius: 16px;
  }

  .toc-nav {
    grid-template-columns: 1fr;
  }

  .legal-article {
    border-radius: 18px;
  }

  .legal-section {
    padding: 30px 20px;
  }

  .operator-list div {
    grid-template-columns: 1fr;
  }

  .operator-list dt {
    padding-bottom: 5px;
  }

  .operator-list dd {
    padding-top: 5px;
  }

  .legal-footer nav {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  @page {
    margin: 16mm;
  }

  body {
    padding: 0;
    color: #000000;
    background: #ffffff;
    font-size: 11pt;
  }

  body::before,
  #navbar,
  .skip-link,
  .terms-toc,
  .back-to-top,
  .site-scope,
  .legal-footer {
    display: none !important;
  }

  .legal-hero {
    color: #000000;
    background: #ffffff;
  }

  .legal-hero::after {
    display: none;
  }

  .legal-hero-inner {
    width: 100%;
    padding: 0 0 20px;
  }

  .legal-hero .legal-eyebrow,
  .legal-lead,
  .legal-meta span {
    color: #000000;
  }

  .legal-meta span {
    padding: 0;
    background: none;
    border: 0;
  }

  .legal-shell {
    display: block;
    width: 100%;
    margin: 0;
  }

  .legal-article {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .legal-section {
    padding: 18px 0;
    border-color: #cccccc;
  }

  .summary-grid,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .summary-item,
  .service-card,
  .legal-note,
  .domain-list li,
  .operator-list {
    color: #000000;
    background: #ffffff;
    box-shadow: none;
  }

  h1,
  h2,
  h3 {
    break-after: avoid;
  }

  p,
  li {
    orphans: 3;
    widows: 3;
  }
}
.contact-actions {
  margin: 24px 0;
}

.contact-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  color: #ffffff;
  background: var(--ocean-700);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 105, 148, 0.18);
  font-weight: 800;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.contact-button:hover {
  color: #ffffff;
  background: var(--ocean-800);
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .contact-button {
    width: 100%;
  }
}
.simple-text-link {
  color: var(--ocean-500);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(5, 131, 204, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.simple-text-link:hover {
  color: var(--teal-600);
  text-decoration-color: currentColor;
}