:root {
  --bg: #131313;
  --card: #1c1b1b;
  --gold: #ffd165;
  --text: #e5e2e1;
  --muted: #a39e96;
  --outline: rgba(79, 70, 51, 0.45);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.legal-page {
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(12px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom));
}

.legal-top {
  max-width: 820px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.legal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.legal-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.legal-brand span {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.legal-home {
  font-size: 14px;
  white-space: nowrap;
}

.legal-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 22px 36px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--outline);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.legal-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--gold);
  margin-bottom: 10px;
}

.legal-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--outline);
}

.legal-body {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.legal-body.loading,
.legal-body.error {
  color: var(--muted);
  text-align: center;
  padding: 40px 0;
}

.legal-foot {
  max-width: 820px;
  margin: 24px auto 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}

.legal-foot a {
  color: var(--muted);
}
