/* Taiwan legal/help pages: warm white, sakura pink, berry red and magazine-like whitespace.
   This file deliberately does not redefine --legal-red because the protected APK button uses it. */
:root {
  --tw-legal-warm-white: #fffaf7;
  --tw-legal-paper: #fffefd;
  --tw-legal-sakura: #f9e5e8;
  --tw-legal-sakura-deep: #e9b9c1;
  --tw-legal-berry: #a72e4b;
  --tw-legal-berry-deep: #7c1936;
  --tw-legal-ink: #33242b;
  --tw-legal-muted: #78666d;
  --tw-legal-line: #ecd9dc;
}

body.legal-page {
  background:
    radial-gradient(circle at 4% 4%, rgba(247, 217, 222, .76) 0, rgba(247, 217, 222, 0) 26%),
    radial-gradient(circle at 96% 19%, rgba(255, 236, 227, .86) 0, rgba(255, 236, 227, 0) 22%),
    linear-gradient(155deg, #fffdfa 0%, var(--tw-legal-warm-white) 52%, #fff8f6 100%);
}

.legal-topbar {
  border-bottom: 1px solid rgba(214, 159, 170, .46);
  background: rgba(255, 253, 250, .9);
  box-shadow: 0 8px 24px rgba(101, 47, 63, .045);
}

.legal-back:not(.legal-primary-button):not([href*="/xai/download.php"]) {
  position: relative;
  color: var(--tw-legal-berry-deep);
  letter-spacing: .02em;
  text-decoration: none;
}

.legal-back:not(.legal-primary-button):not([href*="/xai/download.php"])::after {
  position: absolute;
  right: 0;
  bottom: -3px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: .55;
  transform: scaleX(.38);
  transform-origin: left;
  transition: transform .18s ease;
}

.legal-back:not(.legal-primary-button):not([href*="/xai/download.php"]):hover::after,
.legal-back:not(.legal-primary-button):not([href*="/xai/download.php"]):focus-visible::after {
  transform: scaleX(1);
}

.legal-breadcrumb {
  color: #9c747f;
  letter-spacing: .035em;
}

.legal-breadcrumb a:not(.legal-primary-button):not([href*="/xai/download.php"]) {
  color: var(--tw-legal-berry-deep);
  text-decoration-color: rgba(124, 25, 54, .35);
  text-underline-offset: 3px;
}

.legal-hero {
  position: relative;
  padding-top: 14px;
}

.legal-hero::before {
  display: block;
  width: 44px;
  height: 2px;
  margin: 0 0 17px;
  background: linear-gradient(90deg, var(--tw-legal-berry), var(--tw-legal-sakura-deep));
  content: "";
}

.legal-eyebrow {
  color: var(--tw-legal-berry);
  letter-spacing: .18em;
}

.legal-hero h1 {
  max-width: 780px;
  color: var(--tw-legal-ink);
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", Georgia, serif;
  letter-spacing: -.045em;
}

.legal-hero p {
  max-width: 690px;
  color: var(--tw-legal-muted);
}

.legal-updated {
  border: 1px solid rgba(211, 156, 169, .42);
  background: rgba(255, 249, 248, .82);
  color: #815a66;
  box-shadow: 0 5px 14px rgba(122, 48, 68, .045);
}

.legal-card {
  position: relative;
  overflow: hidden;
  border-color: var(--tw-legal-line);
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(252, 225, 230, .74) 0, rgba(252, 225, 230, .74) 4px, transparent 4px) top left / 100% 100% no-repeat,
    var(--tw-legal-paper);
  box-shadow: 0 16px 35px rgba(91, 42, 57, .06);
}

.legal-card::after {
  position: absolute;
  top: 0;
  right: 28px;
  width: 58px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--tw-legal-sakura-deep), var(--tw-legal-berry));
  content: "";
}

.legal-card h2 {
  position: relative;
  z-index: 1;
  color: var(--tw-legal-ink);
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", Georgia, serif;
  letter-spacing: -.018em;
}

.legal-card h3,
.legal-steps strong {
  color: #562b39;
}

.legal-card p,
.legal-card li,
.legal-facts dd {
  color: #67545b;
}

.legal-card a:not(.legal-primary-button):not([href*="/xai/download.php"]) {
  color: var(--tw-legal-berry-deep);
  text-decoration-line: underline;
  text-decoration-color: rgba(167, 46, 75, .38);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-card a:not(.legal-primary-button):not([href*="/xai/download.php"]):hover,
.legal-card a:not(.legal-primary-button):not([href*="/xai/download.php"]):focus-visible {
  color: var(--tw-legal-berry);
  text-decoration-color: currentColor;
}

.legal-callout {
  border-left-color: var(--tw-legal-berry);
  border-radius: 10px;
  background: linear-gradient(100deg, #fff0f2 0%, #fff9f7 100%);
  box-shadow: inset 0 0 0 1px rgba(232, 180, 191, .3);
  color: #71414f;
}

.legal-facts {
  border-color: var(--tw-legal-line);
  border-radius: 14px;
}

.legal-facts dt,
.legal-facts dd {
  border-bottom-color: var(--tw-legal-line);
}

.legal-facts dt {
  background: #fff6f5;
  color: #774b59;
}

.legal-steps li::before {
  border: 1px solid rgba(205, 128, 146, .35);
  background: #fbe7e9;
  color: var(--tw-legal-berry-deep);
  box-shadow: 0 5px 12px rgba(128, 45, 65, .07);
}

.legal-action-note {
  color: #8b6973;
}

.legal-footer {
  border-top-color: rgba(174, 91, 114, .28);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .055), transparent 42%),
    #4a1f31;
  color: rgba(255, 248, 248, .78);
}

.legal-footer a:not(.legal-primary-button):not([href*="/xai/download.php"]) {
  color: #fff9f8;
  text-decoration-color: rgba(255, 218, 225, .6);
  text-underline-offset: 3px;
}

.legal-footer a:not(.legal-primary-button):not([href*="/xai/download.php"]):hover,
.legal-footer a:not(.legal-primary-button):not([href*="/xai/download.php"]):focus-visible {
  color: #ffdce4;
}

@media (max-width: 620px) {
  .legal-hero { padding-top: 8px; }
  .legal-hero::before { margin-bottom: 14px; }
  .legal-card { border-radius: 16px; }
  .legal-card::after { right: 20px; }
}
