body.legal-shell { background: var(--ui-surface) !important; }
.legal-shell main {
  width: min(760px, calc(100% - 40px)) !important;
  min-height: 100vh;
  margin: 0 auto !important;
  padding: 40px 0 80px !important;
  background: var(--ui-surface) !important;
  line-height: 1.8;
}
.legal-shell .actions { position: sticky; z-index: 20; top: 0; margin: -12px 0 28px; padding: 12px 0 !important; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--ui-separator-soft); backdrop-filter: blur(16px); }
.legal-shell .actions button, .legal-shell .actions a { margin-top: 0 !important; }
.legal-shell nav { display: grid !important; gap: 2px !important; margin: 0 0 32px; padding: 16px !important; background: var(--ui-surface-subtle) !important; border: 1px solid var(--ui-separator-soft) !important; border-left: 1px solid var(--ui-separator-soft) !important; border-radius: var(--ui-radius-panel); }
.legal-shell nav::before { content: "目录"; margin-bottom: 6px; color: var(--ui-text-secondary); font-size: 12px; font-weight: 650; }
.legal-shell nav a { padding: 5px 0; text-decoration: none; }
.legal-shell h1 { margin-top: 12px; font-size: 32px; }
.legal-shell h2 { margin: 38px 0 14px; padding-top: 18px; border-top: 1px solid var(--ui-separator-soft); }
.legal-shell .meta { margin: 2px 0; color: var(--ui-text-secondary); font-size: 13px; }
.legal-shell .bullet { padding-left: 18px; text-indent: -18px; }
@media (max-width: 640px) {
  .legal-shell main { width: auto !important; padding: 20px 18px 56px !important; }
  .legal-shell h1 { font-size: 26px; }
  .legal-shell .actions { gap: 6px !important; margin-top: -8px; }
  .legal-shell .actions button, .legal-shell .actions a { flex: 1 1 auto; min-height: 44px; text-align: center; }
  .legal-shell nav { max-height: 210px; overflow: auto; }
}
@media print {
  .legal-shell .actions { display: none !important; }
  .legal-shell main { width: 100% !important; max-width: none !important; padding: 0 !important; }
  .legal-shell nav { break-inside: avoid; }
}
