body {
  padding: 1.5rem 1rem;
  color: var(--text);
  line-height: 1.8;
}

.legal-wrap {
  max-width: 640px;
  margin: 0 auto;
}

.legal-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.9rem 0.55rem;
  background: var(--bg-card);
  border-radius: 0.75rem 0.75rem 0 0;
  border-top: 5px solid #17B890;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  color: #17B890;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.back-link:hover {
  background: var(--brand-light-bg);
  text-decoration: none;
}

.legal-card {
  background: var(--bg-card);
  border-radius: 1.25rem;
  border-top-left-radius: 0;
  box-shadow: 0 4px 20px var(--shadow-sm);
  padding: 2.5rem 2rem;
  margin-bottom: 1.5rem;
}

.legal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.4rem;
}

.legal-date {
  font-size: 0.8rem;
  color: var(--text-footer);
  margin-bottom: 1.25rem;
}

.legal-intro {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
  padding: 1rem 1.1rem;
  background: var(--brand-light-bg);
  border-left: 3px solid #17B890;
  border-radius: 0 0.5rem 0.5rem 0;
  margin-bottom: 2rem;
}

section {
  margin-bottom: 1.75rem;
}

section:last-child {
  margin-bottom: 0;
}

h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--brand-light-bg);
}

h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 1rem;
  margin-bottom: 0.4rem;
}

p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

ul {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding-left: 1.5rem;
}

ul li {
  margin-bottom: 0.4rem;
}

a {
  color: #17B890;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.legal-footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-footer);
  padding-bottom: 1rem;
}

.legal-footer-links {
  margin-top: 0.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.legal-footer-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
}

.legal-footer-link {
  color: var(--text-footer);
  text-decoration: none;
}

.legal-footer-link:hover {
  color: #17B890;
  text-decoration: underline;
}

.legal-footer-link--accent { color: #17B890; }

.legal-footer-link--current {
  color: var(--text-footer);
  text-decoration: underline;
  cursor: default;
}

.legal-footer-sep {
  color: var(--border-mid);
}

/* ================================
   Theme Toggle
================================ */
.theme-toggle {
  background: none;
  border: none;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-sub);
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.theme-toggle:hover {
  background: var(--brand-light-bg);
  color: #17B890;
}

.theme-icon-sun { display: none; }
[data-theme="dark"] .theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun { display: block; color: #fbbf24; }

/* ================================
   Language Toggle
================================ */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.lang-toggle-btn {
  color: var(--text-sub);
  text-decoration: none;
  padding: 0.15rem 0.3rem;
  border-radius: 4px;
  transition: color 0.15s;
}

.lang-toggle-btn:hover { color: #17B890; }
.lang-toggle-btn--active { color: #17B890; }
.lang-toggle-sep { color: var(--border-mid); }

/* ================================
   Footer Home Link
================================ */
.footer-home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.icon-inline {
  transform: translateY(-1px);
}
