/* SOS legal — Julián (aditivo, no altera layout base) */
.ark-legal-sos {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}
body.trip-active .ark-legal-sos,
body.tracking-live .ark-legal-sos,
body.trip-active-drive .ark-legal-sos,
body.trip-active #legalSosHost .ark-legal-sos {
    display: inline-flex;
}
#legalSosHost .ark-legal-sos { display: none; }
.ark-legal-sos-btn {
    font: inherit;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
    cursor: pointer;
}
.ark-legal-sos-btn:hover { border-color: rgba(239, 68, 68, 0.75); color: #fff; }
.ark-legal-sos-btn:focus-visible { outline: 2px solid #ef4444; outline-offset: 2px; }

.ark-legal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 12000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 12px;
}
.ark-legal-backdrop.open { display: flex; }
.ark-legal-panel {
    width: min(100%, 480px);
    max-height: min(88vh, 640px);
    background: #111827;
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 16px 16px 12px 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}
.ark-legal-head {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.ark-legal-head h2 { margin: 0; font-size: 0.95rem; color: #fecaca; }
.ark-legal-head p { margin: 4px 0 0; font-size: 0.68rem; color: #94a3b8; line-height: 1.45; }
.ark-legal-close {
    font: inherit;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
}
.ark-legal-body {
    padding: 12px 16px;
    overflow-y: auto;
    flex: 1;
    font-size: 0.82rem;
    line-height: 1.55;
    color: #e2e8f0;
}
.ark-legal-disclaimer {
    font-size: 0.65rem;
    color: #f0a500;
    margin-bottom: 10px;
    line-height: 1.45;
}
.ark-legal-draft {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    white-space: pre-wrap;
}
.ark-legal-foot {
    padding: 12px 16px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ark-legal-foot textarea {
    width: 100%;
    min-height: 72px;
    resize: vertical;
    border-radius: 10px;
    border: 1px solid #334155;
    background: #0f1520;
    color: #e2e8f0;
    padding: 10px 12px;
    font: inherit;
    font-size: 0.82rem;
}
.ark-legal-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ark-legal-actions button {
    font: inherit;
    font-size: 0.72rem;
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid #334155;
    background: #1a2434;
    color: #cbd5e0;
}
.ark-legal-actions button.primary {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
}
.ark-legal-actions button:disabled { opacity: 0.5; cursor: not-allowed; }