/* Terms and Privacy as an in-app screen (account.js openLegal). */
.legal-open { overflow: hidden; }
.legal-screen {
  --ls-paper: var(--ios-paper, var(--paper, #fff));
  --ls-ink: var(--ios-ink, var(--ink, #15122b));
  --ls-muted: var(--ios-muted, var(--muted, #5d5878));
  --ls-line: var(--ios-line, var(--line, #e4dff5));
  --ls-accent: #4b22c9;
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  background: var(--ls-paper);
  color: var(--ls-ink);
}
.legal-screen-bar {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--ls-line);
}
.legal-screen-title {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
}
.legal-screen-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ls-ink);
  cursor: pointer;
}
.legal-screen-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.legal-screen-close:focus-visible { outline: 3px solid #9d63ff; outline-offset: 2px; }
.legal-screen-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 24px max(22px, env(safe-area-inset-right)) max(40px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  outline: none;
}
.legal-screen-body article { max-width: 680px; margin: 0 auto; font-size: 16px; line-height: 1.65; }
.legal-screen-body h1 { font-size: 30px; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 6px; color: var(--ls-ink); }
.legal-screen-body .version { color: var(--ls-muted); font-size: 14px; margin: 0 0 24px; }
.legal-screen-body h2 { font-size: 19px; line-height: 1.3; margin: 32px 0 10px; color: var(--ls-ink); }
.legal-screen-body p, .legal-screen-body li { color: var(--ls-ink); }
.legal-screen-body ul { padding-left: 1.2em; }
.legal-screen-body li + li { margin-top: 6px; }
.legal-screen-body a { color: var(--ls-accent); }
.legal-screen-status { color: var(--ls-muted); text-align: center; margin-top: 30vh; }
.peppy-ios.dark .legal-screen { --ls-accent: #b9a5ff; }
