/* ---------- Auth overlay & friends UI (social features) ---------- */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: #0b0d12;
    background-image:
        radial-gradient(circle at 15% 0%, rgba(245, 158, 11, 0.18), transparent 55%),
        radial-gradient(circle at 85% 100%, rgba(245, 158, 11, 0.08), transparent 55%);
    color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 1000;
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
}
.auth-overlay[hidden] { display: none; }

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #141820;
    border: 1px solid #1f2631;
    border-radius: 20px;
    padding: 36px 28px 28px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.auth-brand {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px 6px 10px;
    background: #f5b841;
    color: #17202b;
    border-radius: 999px;
    font-size: 14px; font-weight: 800;
    margin-bottom: 22px;
    letter-spacing: 0.01em;
}
.auth-brand i { font-size: 14px; }
.auth-heading {
    font-size: 26px;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 10px;
    color: #f8fafc;
    letter-spacing: -0.01em;
}
.auth-sub {
    font-size: 14px; color: #9aa3b2; margin-bottom: 24px; line-height: 1.45;
}
.auth-google-button-host {
    display: flex; justify-content: center; margin-bottom: 14px;
    min-height: 44px;
}
.auth-note {
    font-size: 13px; color: #fbbf24;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
}
.auth-error {
    font-size: 13px; color: #fca5a5;
    min-height: 18px;
    margin-bottom: 10px;
}
.auth-email[hidden] { display: none; }
.auth-divider {
    position: relative;
    text-align: center;
    margin: 18px 0 14px;
    color: #6b7280;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 22px);
    height: 1px;
    background: #1f2631;
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.auth-divider span {
    background: #141820;
    padding: 0 8px;
    position: relative;
    z-index: 1;
}
.auth-email-form {
    display: flex; flex-direction: column; gap: 8px;
    margin-top: 4px;
}
.auth-email-form[hidden] { display: none; }
.auth-email-form label {
    font-size: 12px;
    color: #9aa3b2;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.auth-email-form input {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #2a3340;
    background: #0b0f16;
    color: #f8fafc;
    /* 16px minimum so iOS Safari doesn't auto-zoom on focus. */
    font-size: 16px;
    width: 100%;
}
.auth-email-form input:focus {
    outline: none;
    border-color: #f5b841;
    box-shadow: 0 0 0 3px rgba(245, 184, 65, 0.18);
}
.auth-email-form input[type="text"] {
    letter-spacing: 0.4em;
    text-align: center;
    font-family: 'Manrope', system-ui, monospace;
    font-weight: 600;
}
.auth-email-form button[type="submit"] {
    padding: 12px 18px;
    border-radius: 10px;
    border: 0;
    background: #f5b841;
    color: #17202b;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 4px;
}
.auth-email-form button[type="submit"]:hover:not(:disabled) { background: #f5c15a; }
.auth-email-form button[type="submit"]:disabled {
    background: #2a3340;
    color: #6b7280;
    cursor: not-allowed;
}
.auth-email-sent {
    font-size: 13px;
    color: #cbd5e1;
    margin: 0 0 4px;
    line-height: 1.4;
}
.auth-email-sent span {
    color: #f5b841;
    font-weight: 600;
    word-break: break-all;
}
.auth-email-link {
    background: transparent;
    border: 0;
    color: #9aa3b2;
    font-size: 13px;
    cursor: pointer;
    padding: 6px;
    text-decoration: underline;
    align-self: center;
}
.auth-email-link:hover { color: #f5b841; }

.auth-dev {
    margin-top: 14px;
    background: #0f141c;
    border: 1px solid #1f2631;
    border-radius: 14px;
    padding: 12px 16px;
}
.auth-dev[hidden] { display: none; }
.auth-dev summary {
    cursor: pointer; font-weight: 600;
    color: #cbd5e1;
    font-size: 13px;
    list-style: none;
}
.auth-dev summary::-webkit-details-marker { display: none; }
.auth-dev summary::before {
    content: '▸';
    display: inline-block;
    margin-right: 8px;
    color: #9aa3b2;
    transition: transform 0.2s;
}
.auth-dev[open] summary::before { transform: rotate(90deg); }
.auth-dev-hint { font-size: 12px; color: #6b7280; margin: 8px 0; }
.auth-dev-form {
    display: flex; gap: 8px; align-items: stretch; margin-top: 10px;
}
.auth-dev-form label {
    position: absolute; width: 1px; height: 1px; clip: rect(0 0 0 0); overflow: hidden;
}
.auth-dev-form input {
    flex: 1; padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #2a3340;
    background: #0b0f16;
    color: #f8fafc;
    /* 16px minimum so iOS Safari doesn't auto-zoom on focus (issue #26). */
    font-size: 16px;
}
.auth-dev-form input:focus {
    outline: none;
    border-color: #f5b841;
    box-shadow: 0 0 0 3px rgba(245, 184, 65, 0.18);
}
.auth-dev-form button {
    padding: 10px 18px;
    border-radius: 10px;
    border: 0;
    background: #f5b841;
    color: #17202b;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
}
.auth-dev-form button:hover:not(:disabled) { background: #f5c15a; }
.auth-dev-form button:disabled {
    background: #2a3340;
    color: #6b7280;
    cursor: not-allowed;
}

/* Onboarding: pick username */
.onboarding-form { flex-direction: column; align-items: stretch; gap: 10px; }
.onboarding-input-wrap {
    position: relative;
    display: flex; align-items: center;
}
.onboarding-at {
    position: absolute;
    left: 14px;
    color: #6b7280;
    font-weight: 600;
    pointer-events: none;
}
.onboarding-input-wrap input {
    padding-left: 30px;
    width: 100%;
}
.onboarding-status {
    font-size: 13px;
    min-height: 20px;
    color: #9aa3b2;
}
.onboarding-status.ok { color: #4ade80; }
.onboarding-status.err { color: #fca5a5; }
.onboarding-form button {
    padding: 12px 18px;
    font-size: 15px;
}

.app[hidden] { display: none !important; }

