html.legal-page,
html.legal-page--privacy,
html.legal-page--terms,
html.support-page,
html.marketing-share-page,
html.share-link-page {
    background: #0c1219;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html.legal-page body.legal-page {
    font-family: inherit;
    background: linear-gradient(160deg, #0c1219 0%, #131a24 50%, #1a2332 100%);
    color: #e2e8f0;
}

.legal-app-shell,
.legal-app-shell .legal-shell,
.legal-app-shell .legal-doc-root,
.legal-app-shell .legal-article,
.legal-app-shell .legal-lang-select,
.legal-app-shell .legal-nav-link,
.legal-app-shell .legal-back,
.legal-app-shell .legal-footer,
.legal-app-shell .legal-table {
    font-family: inherit;
}

.legal-app-shell {
    min-height: 100dvh;
    background: transparent;
}

.legal-viewport {
    width: 100%;
}

.legal-shell.card {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    overflow: visible;
}

.legal-site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px var(--app-edge-inset-x, 16px) 8px;
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(12, 18, 25, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.legal-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.legal-brand-logo {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
}

.legal-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.legal-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.legal-brand-text strong {
    font-size: 16px;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.2;
}

.legal-brand-text span {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.legal-header-actions {
    flex-shrink: 0;
}

.legal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 var(--app-edge-inset-x, 16px) 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.legal-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    text-decoration: none;
    border: 1px solid transparent;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.legal-nav-link:hover,
.legal-nav-link:focus-visible {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.04);
    outline: none;
}

.legal-nav-link--active {
    color: #f8fafc;
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(59, 130, 246, 0.35);
}

.legal-container {
    max-width: min(720px, 100%);
    margin: 0 auto;
    padding: 16px var(--app-edge-inset-x, 16px) calc(24px + env(safe-area-inset-bottom));
    width: 100%;
}

.legal-container--doc {
    max-width: min(860px, 100%);
}

.legal-page--privacy .legal-doc-root,
.legal-page--terms .legal-doc-root {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.legal-back {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.legal-back:hover,
.legal-back:focus-visible {
    text-decoration: underline;
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

.legal-lang-select {
    background: rgba(21, 28, 39, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
}

.legal-doc-root {
    background: rgba(21, 28, 39, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}

/* Layout estilo documentação — privacidade e termos */
.legal-article--doc,
.legal-article--policy {
    font-size: 15px;
    line-height: 1.75;
    color: #cbd5e1;
    font-family: inherit;
}

.legal-article-title {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 16px;
    letter-spacing: -0.02em;
    font-family: inherit;
}

.legal-article-meta {
    margin-bottom: 28px;
    padding-bottom: 0;
}

.legal-article-meta p {
    margin: 0 0 6px;
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.5;
}

.legal-article-meta a {
    color: #60a5fa;
    word-break: break-all;
}

.legal-canonical-label {
    color: #94a3b8;
}

html.legal-page--privacy,
html.legal-page--terms {
    scroll-behavior: smooth;
}

.legal-article-intro {
    margin-bottom: 14px;
    color: #cbd5e1;
}

.legal-article-intro a,
.legal-section a,
.legal-subsection a {
    color: #60a5fa;
    text-decoration: none;
}

.legal-article-intro a:hover,
.legal-section a:hover,
.legal-subsection a:hover {
    text-decoration: underline;
}

.legal-toc {
    margin: 28px 0 32px;
    padding: 0;
}

.legal-toc-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 0 0 14px;
}

.legal-toc-list {
    margin: 0;
    padding-left: 1.25rem;
    list-style: decimal;
}

.legal-toc-list li {
    margin-bottom: 8px;
    color: #cbd5e1;
    line-height: 1.5;
}

.legal-toc-list a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
}

.legal-toc-list a:hover,
.legal-toc-list a:focus-visible {
    text-decoration: underline;
}

.legal-section-rule {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 32px 0 28px;
}

.legal-section-title {
    font-size: clamp(1.15rem, 3.5vw, 1.35rem);
    font-weight: 700;
    color: #f1f5f9;
    margin: 0 0 16px;
    scroll-margin-top: 88px;
    font-family: inherit;
}

.legal-subsection {
    margin-top: 20px;
}

.legal-subsection-title {
    font-size: 1rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0 0 12px;
    scroll-margin-top: 88px;
    font-family: inherit;
}

.legal-section p,
.legal-subsection p {
    margin: 0 0 14px;
    color: #cbd5e1;
}

.legal-list {
    margin: 0 0 16px;
    padding-left: 1.25rem;
    list-style: disc;
}

.legal-list li {
    margin-bottom: 10px;
    color: #cbd5e1;
    line-height: 1.7;
}

.legal-item-term {
    color: #f1f5f9;
    font-weight: 600;
}

.legal-table-wrap {
    overflow-x: auto;
    margin: 16px 0 20px;
    -webkit-overflow-scrolling: touch;
}

.legal-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.legal-table th,
.legal-table td {
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.legal-table th {
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    font-weight: 600;
}

.legal-table td {
    color: #cbd5e1;
}

.legal-loading {
    color: #94a3b8;
    text-align: center;
    padding: 24px 0;
    font-family: inherit;
}

.legal-section p,
.legal-section li {
    font-family: inherit;
}

.legal-contact a {
    color: #60a5fa;
}

.legal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
    padding-bottom: 8px;
    font-size: 12px;
    color: #64748b;
}

.legal-footer-sep {
    color: #475569;
}

.legal-footer a {
    color: #60a5fa;
    text-decoration: none;
}

.legal-footer a:hover,
.legal-footer a:focus-visible {
    text-decoration: underline;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Modal re-aceite */
.legal-accept-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: env(safe-area-inset-top) 12px env(safe-area-inset-bottom);
}

.legal-accept-sheet {
    width: min(480px, 100%);
    background: #151c27;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px 16px 0 0;
    padding: 20px;
    max-height: 85vh;
    overflow-y: auto;
}

.legal-accept-sheet h2 {
    color: #f1f5f9;
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.legal-accept-sheet p {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.legal-accept-checks {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.legal-accept-checks label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #e2e8f0;
    font-size: 13px;
    line-height: 1.45;
    cursor: pointer;
}

.legal-accept-checks input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.legal-accept-checks a {
    color: #60a5fa;
}

.legal-accept-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: #3b82f6;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
}

.legal-accept-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.legal-consent-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.45;
}

.legal-consent-row input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
}

.legal-consent-row a {
    color: #60a5fa;
}

.legal-login-notice {
    margin-top: 16px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.5;
    text-align: center;
}

.legal-login-notice a {
    color: #60a5fa;
}

.app-footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    font-size: 11px;
    color: var(--text-sub, #64748b);
}

.app-footer-legal a {
    color: var(--accent, #60a5fa);
    text-decoration: none;
}

.profile-legal-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.panel-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border, rgba(255,255,255,0.12));
    background: var(--surface2, rgba(21,28,39,0.88));
    color: var(--text, #e2e8f0);
    font-size: 14px;
}

/* —— Suporte, compartilhamentos e links (/suporte, /compartilhamentos, /compartilhar) —— */
html.support-page,
html.marketing-share-page,
html.share-link-page {
    scroll-behavior: smooth;
}

.support-page .legal-doc-root,
.marketing-share-page .legal-doc-root,
.share-link-page .legal-doc-root {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.legal-action-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.18);
    border: 1px solid rgba(96, 165, 250, 0.35);
    color: #93c5fd;
    font-weight: 600;
    text-decoration: none;
    word-break: break-all;
    font-family: inherit;
}

.legal-action-link:hover,
.legal-action-link:focus-visible {
    background: rgba(37, 99, 235, 0.28);
    color: #bfdbfe;
    outline: none;
}

.legal-faq {
    margin: 0;
}

.legal-faq-item {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-faq-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.legal-faq-item dt {
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 6px;
    font-family: inherit;
}

.legal-faq-item dd {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.75;
    font-size: 15px;
    font-family: inherit;
}

.legal-inline-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legal-inline-links a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
    font-family: inherit;
}

.legal-inline-links a:hover,
.legal-inline-links a:focus-visible {
    text-decoration: underline;
}

.legal-badge {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.18);
    border: 1px solid rgba(96, 165, 250, 0.35);
    color: #93c5fd;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-family: inherit;
}

.legal-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.legal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.legal-btn--primary {
    background: #2563eb;
    color: #fff;
    border-color: #3b82f6;
}

.legal-btn--primary:hover,
.legal-btn--primary:focus-visible {
    background: #1d4ed8;
    outline: none;
}

.legal-btn--secondary {
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.12);
}

.legal-btn--secondary:hover,
.legal-btn--secondary:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.legal-feature-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.legal-feature-card {
    padding: 0;
    background: transparent;
    border: none;
}

.legal-feature-icon {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.legal-feature-card .legal-subsection-title {
    margin-bottom: 8px;
}

.legal-feature-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.75;
    font-size: 15px;
}

.legal-steps-list {
    margin: 0;
    padding-left: 1.25rem;
    color: #cbd5e1;
    line-height: 1.75;
    font-size: 15px;
}

.legal-steps-list li + li {
    margin-top: 10px;
}

.legal-tag-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.legal-tag-list li {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
}

.legal-section--cta p {
    margin: 0 0 4px;
    color: #94a3b8;
    line-height: 1.75;
}

.legal-share-pre {
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.75;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    overflow-x: auto;
}

.legal-error {
    color: #f87171;
    margin: 0 0 16px;
    line-height: 1.75;
    font-size: 15px;
}
