/* ============================================================
   User Center – Global Styles
   Design reference: Apple.com (minimal) + Cursor auth (multi-provider)
   ============================================================ */

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

:root {
  --bg:        #f5f5f7;
  --surface:   #ffffff;
  --border:    #d2d2d7;
  --text-pri:  #1d1d1f;
  --text-sec:  #6e6e73;
  --text-ter:  #a1a1a6;
  --accent:    #0066cc;
  --accent-hv: #0077ed;
  --danger:    #ff3b30;
  --success:   #30d158;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.05);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --transition: 0.18s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-pri);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Nav ─────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 52px;
  background: rgba(245,245,247,.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(210,210,215,.6);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
}
.nav-logo {
  font-size: 17px; font-weight: 600; color: var(--text-pri);
  text-decoration: none; letter-spacing: -0.3px;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link {
  font-size: 14px; color: var(--text-sec); text-decoration: none;
  padding: 6px 12px; border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--text-pri); background: rgba(0,0,0,.04); }
.nav-link.active { color: var(--accent); }
.nav-btn {
  font-size: 14px; font-weight: 500; color: var(--surface);
  background: var(--text-pri); border: none; cursor: pointer;
  padding: 7px 16px; border-radius: 980px;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}
.nav-btn:hover { background: #3d3d3f; transform: scale(1.02); }

/* ── Page wrapper ────────────────────────────────────────── */
.page { padding-top: 52px; min-height: 100vh; }

/* ── Card ────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ── Auth page logo header ───────────────────────────────── */
.auth-header {
  position: fixed; top: 0; left: 0;
  padding: 20px 28px;
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; z-index: 10;
}
.auth-header-icon {
  width: 32px; height: 32px; background: var(--text-pri);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.auth-header-name {
  font-size: 16px; font-weight: 700; color: var(--text-pri);
  letter-spacing: -0.3px;
}
.auth-header-name span { color: var(--accent); }

/* ── Language switcher ───────────────────────────────────── */
.lang-switcher-wrap {
  position: fixed; top: 0; right: 0;
  padding: 22px 24px;
  display: flex; align-items: center;
  z-index: 20;
}
.lang-switcher {
  display: flex; align-items: center;
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 980px;
  padding: 3px;
  gap: 1px;
}
.lang-option {
  font-size: 11px; font-weight: 600;
  color: var(--text-sec);
  background: none; border: none; cursor: pointer;
  padding: 4px 9px; border-radius: 980px;
  transition: background var(--transition), color var(--transition);
  font-family: var(--font);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.lang-option:hover { color: var(--text-pri); }
.lang-option.active {
  background: var(--text-pri);
  color: #fff;
}

/* Dashboard sidebar lang switcher */
.dash-lang-wrap {
  padding: 12px 12px 0;
}
.dash-lang-wrap .lang-switcher {
  width: 100%;
  justify-content: center;
  background: var(--bg);
}

/* ── Auth layout (login / register) ─────────────────────── */
.auth-wrap {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  padding: 60px 20px;
}
.auth-card {
  width: 100%; max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px 56px 24px;
  display: flex; flex-direction: column;
}
.auth-logo {
  width: 32px; height: 32px; margin: 0 auto 8px;
  background: var(--text-pri); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.auth-logo svg { color: white; }
.auth-title {
  font-size: 20px; font-weight: 700; text-align: center;
  letter-spacing: -0.5px; margin-bottom: 3px;
}
.auth-subtitle {
  font-size: 13px; color: var(--text-sec); text-align: center; margin-bottom: 12px;
}

/* ── Provider buttons ────────────────────────────────────── */
.providers { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.provider-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 16px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer;
  font-family: var(--font); font-size: 14px; font-weight: 500; color: var(--text-pri);
  transition: border-color var(--transition), background var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}
.provider-btn:hover {
  border-color: #b0b0b5; background: var(--bg);
  transform: translateY(-1px); box-shadow: var(--shadow-sm);
}
.provider-btn:active { transform: translateY(0); }
.provider-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.divider-text { font-size: 12px; color: var(--text-ter); white-space: nowrap; }

/* ── Form ────────────────────────────────────────────────── */
.form-group { margin-bottom: 8px; position: relative; }
.form-label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--text-sec); margin-bottom: 6px;
}
.form-input {
  width: 100%; padding: 9px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 15px; color: var(--text-pri);
  background: var(--surface); outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input::placeholder { color: var(--text-ter); }
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,102,204,.12);
}
.form-input.error { border-color: var(--danger); }
.form-input.error:focus { box-shadow: 0 0 0 3px rgba(255,59,48,.12); }
.form-error { font-size: 12px; color: var(--danger); margin-top: 5px; display: none; }
.form-error.show { display: block; }

.input-with-action { position: relative; }
.input-with-action .form-input { padding-right: 80px; }
.input-action-btn {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 13px; color: var(--accent); cursor: pointer; font-weight: 500;
  background: none; border: none; font-family: var(--font);
  transition: color var(--transition);
}
.input-action-btn:hover { color: var(--accent-hv); }

/* ── Submit button ───────────────────────────────────────── */
.btn-primary {
  width: 100%; padding: 13px;
  background: var(--text-pri); color: var(--surface);
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--font); font-size: 15px; font-weight: 600;
  letter-spacing: -0.1px;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  margin-top: 4px;
}
.btn-primary:hover {
  background: #3d3d3f;
  transform: translateY(-1px); box-shadow: var(--shadow-sm);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { background: var(--text-ter); cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
  padding: 10px 20px; background: none;
  color: var(--text-pri); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--font); font-size: 14px; font-weight: 500;
  transition: border-color var(--transition), background var(--transition);
}
.btn-secondary:hover { border-color: #b0b0b5; background: var(--bg); }

.btn-danger {
  padding: 10px 20px; background: none;
  color: var(--danger); border: 1.5px solid #ffb3b0;
  border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--font); font-size: 14px; font-weight: 500;
  transition: border-color var(--transition), background var(--transition);
}
.btn-danger:hover { border-color: var(--danger); background: rgba(255,59,48,.04); }

/* ── Auth footer links ───────────────────────────────────── */
.auth-footer { text-align: center; margin-top: 10px; }
.auth-footer p { font-size: 14px; color: var(--text-sec); }
.auth-footer a { color: var(--accent); text-decoration: none; font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }
.auth-terms { font-size: 12px; color: var(--text-ter); text-align: center; margin-top: 10px; line-height: 1.6; }
.auth-terms a { color: var(--text-ter); text-decoration: underline; }

/* ── Dashboard layout ────────────────────────────────────── */
.dash-wrap {
  max-width: 1000px; margin: 0 auto;
  padding: 28px 28px 80px;
}
.dash-header { margin-bottom: 20px; }
.dash-header h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.8px; }
.dash-header p  { font-size: 16px; color: var(--text-sec); margin-top: 6px; }

.dash-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 700px) { .dash-grid { grid-template-columns: 1fr; } }

/* Profile sidebar */
.profile-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: 28px 20px; text-align: center;
}
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 700; color: white;
  position: relative; cursor: pointer;
}
.avatar-edit {
  position: absolute; bottom: 0; right: 0;
  width: 26px; height: 26px; background: var(--surface);
  border: 2px solid var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: border-color var(--transition);
}
.profile-avatar:hover .avatar-edit { border-color: var(--accent); }
.profile-name { font-size: 17px; font-weight: 600; }
.profile-email { font-size: 13px; color: var(--text-sec); margin-top: 3px; }
.profile-plan {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; flex-wrap: wrap; justify-content: center;
}
.profile-plan-name { font-size: 13px; font-weight: 600; color: var(--text-pri); }
.profile-plan-price { font-size: 12px; color: var(--text-sec); }
.profile-plan-renew { font-size: 11px; color: var(--text-ter); margin-top: 5px; }
.profile-credits-block {
  display: flex; flex-direction: column; align-items: center;
  margin-top: 14px; padding: 12px 16px;
  background: rgba(0,102,204,.06); border-radius: var(--radius-sm);
  border: 1px solid rgba(0,102,204,.15); text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
}
.profile-credits-block:hover { background: rgba(0,102,204,.1); border-color: rgba(0,102,204,.3); }
.profile-credits-label { font-size: 11px; color: var(--accent); font-weight: 500; }
.profile-credits-val   { font-size: 28px; font-weight: 800; letter-spacing: -1px; color: var(--accent); line-height: 1.2; margin-top: 2px; }
.profile-credits-hint  { font-size: 11px; color: var(--accent); opacity: .65; margin-top: 4px; }

.profile-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 500; color: var(--success);
  background: rgba(48,209,88,.1); padding: 3px 10px;
  border-radius: 980px; margin-top: 12px;
}
.profile-nav { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.profile-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text-sec);
  cursor: pointer; text-decoration: none;
  transition: background var(--transition), color var(--transition);
  margin-bottom: 4px;
}
.profile-nav-item:hover { background: var(--bg); color: var(--text-pri); }
.profile-nav-item.active { background: rgba(0,102,204,.07); color: var(--accent); }
.profile-nav-item svg { opacity: .7; }
.profile-nav-item.active svg { opacity: 1; }

/* Sections */
.section-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.section-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.section-header h2 { font-size: 17px; font-weight: 600; }
.section-header p  { font-size: 13px; color: var(--text-sec); margin-top: 2px; }
.section-body { padding: 24px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 500px) { .form-row { grid-template-columns: 1fr; } }

.section-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 24px; border-top: 1px solid var(--border);
  background: rgba(245,245,247,.5);
}

/* Connected accounts */
.connected-list { display: flex; flex-direction: column; gap: 12px; }
.connected-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
}
.connected-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.connected-info { flex: 1; min-width: 0; }
.connected-name { font-size: 14px; font-weight: 500; }
.connected-detail { font-size: 12px; color: var(--text-sec); margin-top: 1px; }
.connected-status {
  font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 980px;
}
.status-connected { color: var(--success); background: rgba(48,209,88,.1); }
.status-disconnected { color: var(--text-ter); background: rgba(0,0,0,.04); }
.connected-action {
  font-size: 13px; font-weight: 500; cursor: pointer;
  background: none; border: none; font-family: var(--font);
  transition: color var(--transition);
}
.connected-action.disconnect { color: var(--danger); }
.connected-action.connect { color: var(--accent); }

/* Sessions list */
.session-list { display: flex; flex-direction: column; gap: 10px; }
.session-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
}
.session-icon {
  width: 36px; height: 36px; background: var(--bg); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  color: var(--text-sec);
}
.session-info { flex: 1; }
.session-device { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.session-current {
  font-size: 11px; background: rgba(0,102,204,.1); color: var(--accent);
  padding: 2px 7px; border-radius: 980px; font-weight: 500;
}
.session-meta { font-size: 12px; color: var(--text-sec); margin-top: 2px; }
.session-revoke {
  font-size: 13px; color: var(--danger); font-weight: 500;
  background: none; border: none; cursor: pointer; font-family: var(--font);
  transition: opacity var(--transition);
}
.session-revoke:hover { opacity: .7; }
.session-revoke:disabled { color: var(--text-ter); cursor: default; opacity: 1; }

/* Danger zone */
.danger-zone {
  border: 1.5px solid #ffb3b0; border-radius: var(--radius-md);
  padding: 20px 22px; display: flex; align-items: center; gap: 16px;
  margin-top: 4px;
}
.danger-zone-info h3 { font-size: 15px; font-weight: 600; color: var(--danger); }
.danger-zone-info p  { font-size: 13px; color: var(--text-sec); margin-top: 2px; }

/* ── Toast ───────────────────────────────────────────────── */
.toast-wrap {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 999; display: flex; flex-direction: column; gap: 8px;
  align-items: center;
}
.toast {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 980px;
  font-size: 14px; font-weight: 500;
  background: var(--text-pri); color: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: toast-in .22s ease forwards;
  white-space: nowrap;
}
.toast.success { background: #1a1a1a; }
.toast.error   { background: #1a1a1a; }
@keyframes toast-in { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
@keyframes toast-out { from { opacity:1; } to { opacity:0; transform:translateY(6px); } }
.toast.hiding { animation: toast-out .18s ease forwards; }

/* ── Landing hero ────────────────────────────────────────── */
.hero {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 28px 100px;
  min-height: calc(100vh - 52px);
}
.hero-eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(40px, 6vw, 72px); font-weight: 800;
  letter-spacing: -2.5px; line-height: 1.05;
  color: var(--text-pri); max-width: 760px;
}
.hero-title span { color: var(--accent); }
.hero-sub {
  font-size: clamp(16px, 2vw, 20px); color: var(--text-sec); max-width: 520px;
  margin: 20px auto 40px; line-height: 1.6;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.btn-hero-pri {
  padding: 14px 28px; background: var(--text-pri); color: var(--surface);
  border: none; border-radius: 980px; cursor: pointer;
  font-family: var(--font); font-size: 16px; font-weight: 600;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-hero-pri:hover { background: #3d3d3f; transform: scale(1.03); }
.btn-hero-sec {
  padding: 14px 28px; background: none; color: var(--accent);
  border: 1.5px solid var(--accent); border-radius: 980px; cursor: pointer;
  font-family: var(--font); font-size: 16px; font-weight: 600;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}
.btn-hero-sec:hover { background: rgba(0,102,204,.06); transform: scale(1.03); }

/* Features strip */
.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; max-width: 960px; margin: 80px auto 0; padding: 0 28px;
}
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 24px;
  box-shadow: var(--shadow-sm);
}
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
  color: var(--accent);
}
.feature-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.feature-card p  { font-size: 14px; color: var(--text-sec); line-height: 1.6; }

/* ── Misc helpers ────────────────────────────────────────── */
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.gap-sections { display: flex; flex-direction: column; gap: 20px; }

/* Password strength */
.pw-strength { margin-top: 4px; }
.pw-strength-bar {
  height: 3px; border-radius: 2px; background: var(--border);
  overflow: hidden;
}
.pw-strength-fill {
  height: 100%; border-radius: 2px; width: 0;
  transition: width .3s ease, background .3s ease;
}
.pw-strength-label { font-size: 11px; color: var(--text-ter); margin-top: 4px; }

/* Checkbox */
.checkbox-group { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-group input[type=checkbox] { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.checkbox-group label { font-size: 13px; color: var(--text-sec); line-height: 1.5; }
.checkbox-group label a { color: var(--accent); text-decoration: none; }

/* ── Legal Sheet ─────────────────────────────────────────── */
.legal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0 0 0;
  opacity: 0; pointer-events: none;
  transition: opacity .28s cubic-bezier(.4,0,.2,1);
}
.legal-overlay.open {
  opacity: 1; pointer-events: auto;
}
.legal-sheet {
  width: 100%; max-width: 680px;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
  max-height: 82vh;
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.32,0,.67,0);
}
.legal-overlay.open .legal-sheet {
  transform: translateY(0);
  transition: transform .36s cubic-bezier(.22,1,.36,1);
}
.legal-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: var(--border); margin: 12px auto 0; flex-shrink: 0;
}
.legal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 12px; flex-shrink: 0;
}
.legal-header-title { font-size: 16px; font-weight: 700; letter-spacing: -.3px; }
.legal-close {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-sec); transition: background var(--transition);
  flex-shrink: 0;
}
.legal-close:hover { background: var(--border); }
.legal-tabs {
  display: flex; gap: 4px; margin: 0 20px 12px;
  background: var(--bg); border-radius: 9px; padding: 3px;
  flex-shrink: 0;
}
.legal-tab {
  flex: 1; padding: 7px 0; border: none; border-radius: 7px;
  font-family: var(--font); font-size: 13px; font-weight: 500;
  color: var(--text-sec); background: none; cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.legal-tab.active {
  background: var(--surface); color: var(--text-pri);
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}
.legal-body {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.legal-content {
  padding: 4px 28px 24px;
}
.legal-content .legal-header { margin-bottom: 24px; }
.legal-content .legal-header h1 { font-size: 24px; }
.legal-loading {
  padding: 40px; text-align: center;
  font-size: 14px; color: var(--text-ter);
}
.legal-footer {
  padding: 12px 20px 20px; flex-shrink: 0;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end;
}
.legal-done {
  padding: 9px 28px; border-radius: var(--radius-sm);
  background: var(--text-pri); color: #fff; border: none;
  font-family: var(--font); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background var(--transition);
}
.legal-done:hover { background: #3d3d3f; }
@media (min-width: 600px) {
  .legal-overlay { align-items: center; padding: 20px; }
  .legal-sheet {
    border-radius: 20px; max-height: 78vh;
    transform: scale(.94) translateY(12px);
  }
  .legal-overlay.open .legal-sheet { transform: scale(1) translateY(0); }
  .legal-handle { display: none; }
}
.checkbox-group label a:hover { text-decoration: underline; }
