/* 獨立法律文件頁（無全站頁首頁尾，不載入 site.css 以免深色主題覆蓋） */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body.legal-standalone-page {
  margin: 0;
  padding: 1.25rem 1rem 2rem;
  font-family: "Noto Sans TC", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: #1e293b;
  background: #fff;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.legal-standalone-toolbar {
  max-width: 42rem;
  margin: 0 auto 1rem;
  padding: 0 1rem;
  display: flex;
  justify-content: flex-end;
}

.lang-switcher {
  position: relative;
}

.lang-switcher-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.lang-switcher-btn:hover {
  border-color: #94a3b8;
  color: #0f172a;
}

.lang-switcher-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.45);
}

.legal-standalone-page .lang-switcher.is-open .lang-switcher-btn {
  border-color: #38bdf8;
  background: #f0f9ff;
  color: #0369a1;
}

.lang-switcher-icon {
  width: 1.35rem;
  height: 1.35rem;
}

.lang-switcher-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 1200;
  min-width: 10.5rem;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.lang-switcher-menu[hidden] {
  display: none !important;
}

.lang-switcher-item {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  white-space: nowrap;
}

.lang-switcher-item:hover {
  color: #0f172a;
  background: #f1f5f9;
  text-decoration: none;
}

.lang-switcher-item.is-active {
  color: #0f172a;
  background: #e2e8f0;
  font-weight: 600;
}

.legal-document {
  max-width: 42rem;
  margin: 0 auto;
}

.legal-document h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  line-height: 1.35;
  color: #0f172a;
}

.legal-document .legal-updated {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: #64748b;
}

.legal-document h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.6rem;
  color: #0f172a;
}

.legal-document p {
  margin: 0 0 1rem;
  color: #334155;
}

.legal-document .legal-note {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.88rem;
  color: #64748b;
}

@media (min-width: 640px) {
  body.legal-standalone-page {
    padding: 2rem 1.5rem 2.5rem;
  }
}
