:root {
    --as-teal: #1aa6b7;
    --as-teal-dark: #148fa0;
    --as-teal-light: #d4f0f4;
    --as-navy: #1b2b4b;
    --as-yellow: #f7d547;
    --as-yellow-dark: #e8c62e;
    --as-coral: #e8847a;
    --as-card: #d8ecf3;
    --as-card-alt: #ebf5f9;
    --as-surface: #ffffff;
    --as-bg: #f4fafc;
    --as-text: #1b2b4b;
    --as-text-muted: #6b8fa3;
    --as-border: #c5dde8;
    --as-radius: 16px;
    --as-radius-sm: 12px;
    --as-radius-pill: 999px;
    --as-shadow: 0 8px 28px rgba(27, 43, 75, 0.1);
    --as-font: 'DM Sans', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--as-font);
    background: var(--as-bg);
    color: var(--as-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.section {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 16px 16px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 12px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--as-radius-pill);
    background: var(--as-yellow);
    color: var(--as-navy);
    font-family: var(--as-font);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.btn-primary:hover:not(:disabled) {
    background: var(--as-yellow-dark);
}

.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.welcome-hero {
    position: relative;
    background: var(--as-surface);
    border-radius: var(--as-radius);
    padding: 40px 28px 0;
    text-align: center;
    max-width: 520px;
    margin: 24px auto;
    overflow: hidden;
    box-shadow: var(--as-shadow);
}

.welcome-hero-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

.welcome-hero h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--as-navy);
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.welcome-hero .tagline {
    color: var(--as-text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.welcome-hero .desc {
    color: var(--as-text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
    font-size: 15px;
}

.welcome-wave {
    background: var(--as-teal);
    margin: 0 -28px;
    padding: 32px 28px 36px;
    border-radius: 50% 50% 0 0 / 24px 24px 0 0;
}

.welcome-wave .btn-primary {
    margin-top: 0;
}

.welcome-link {
    display: block;
    margin-top: 14px;
    font-size: 13px;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(27, 43, 75, 0.25);
}

.welcome-link:hover {
    color: var(--as-yellow);
    text-decoration: underline;
}

/* —— Ajuda (popup contextual) —— */
.pane-icon-btn {
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 4px;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--as-text-muted);
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
    box-sizing: border-box;
}

.pane-icon-btn:hover { background: var(--as-teal-light); color: var(--as-teal-dark); }
.pane-icon-btn svg { width: 16px; height: 16px; display: block; }

.btn-help { color: var(--as-teal-dark); }
.btn-help:hover { background: var(--as-teal-light); color: var(--as-navy); }

.help-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 45, 82, 0.5);
    backdrop-filter: blur(3px);
    box-sizing: border-box;
}

.help-overlay.hidden { display: none; }

.help-modal {
    width: 100%;
    max-width: min(520px, calc(100vw - 32px));
    max-height: min(88vh, calc(100dvh - 32px));
    background: var(--as-surface);
    border-radius: var(--as-radius);
    box-shadow: 0 16px 48px rgba(15, 45, 82, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.help-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 12px;
    background: var(--as-navy);
    color: var(--as-surface);
    flex-shrink: 0;
}

.help-modal-titles { flex: 1; min-width: 0; }

.help-modal-header h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--as-surface);
    letter-spacing: 0.02em;
}

.help-modal-subtitle {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.82);
}

.help-modal-subtitle.hidden { display: none; }

.help-modal-header .pane-icon-btn {
    color: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}

.help-modal-header .pane-icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.help-modal-body {
    padding: 14px 16px 18px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(180deg, var(--as-card-alt) 0%, var(--as-surface) 100%);
}

.help-content-store { display: none !important; }

.help-empty {
    margin: 0;
    font-size: 14px;
    color: var(--as-text-muted);
}

body.help-open { overflow: hidden; }

.help-group {
    background: var(--as-card);
    border-radius: var(--as-radius-sm);
    padding: 12px 14px;
    margin-bottom: 10px;
}

.help-group:last-child {
    margin-bottom: 0;
}

.help-group-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--as-teal-dark);
    margin: 0 0 10px;
}

.help-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.help-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.help-item-text {
    flex: 1;
    min-width: 0;
}

.help-item-text strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--as-navy);
    line-height: 1.4;
    margin-bottom: 2px;
}

.help-item-text p {
    font-size: 13px;
    line-height: 1.55;
    color: var(--as-text-muted);
    margin: 0;
}

.help-screen {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--as-teal-dark);
    margin-top: 4px;
    letter-spacing: 0.02em;
}

.help-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--as-teal);
    background: var(--as-surface);
    border: 1px solid var(--as-border);
}

.help-icon svg {
    display: block;
    flex-shrink: 0;
}

.help-icon-sm {
    width: 22px;
    height: 22px;
}

.help-icon-sm svg {
    width: 13px;
    height: 13px;
}

.help-icon-msg {
    width: 26px;
    height: 26px;
    color: rgba(255, 255, 255, 0.9);
    background: var(--as-teal);
    border: none;
}

.help-icon-msg svg {
    width: 14px;
    height: 14px;
}

.help-icon-lg {
    width: 44px;
    height: 44px;
    background: var(--as-yellow);
    color: var(--as-navy);
    border: none;
}

.help-icon-lg svg {
    width: 18px;
    height: 18px;
}

.help-icon-teal {
    background: var(--as-teal-light);
    color: var(--as-teal-dark);
}

.help-icon-navy {
    background: var(--as-card);
    color: var(--as-navy);
}

@media (max-width: 560px) {
    .welcome-hero-actions {
        top: 10px;
        right: 10px;
    }

    .help-group-title { font-size: 10px; }
    .help-item-text strong { font-size: 14px; }
    .help-item-text p { font-size: 13px; }
    .help-screen { font-size: 11px; }

    .help-icon-sm { width: 22px; height: 22px; }
    .help-icon-sm svg { width: 13px; height: 13px; }
    .help-icon-msg { width: 26px; height: 26px; }
    .help-icon-msg svg { width: 14px; height: 14px; }
    .help-icon-lg { width: 44px; height: 44px; }
    .help-icon-lg svg { width: 18px; height: 18px; }
}

/* Cookie consent (Google Analytics) — bloqueio obrigatório */
body.appspeak-consent-locked main.section {
    pointer-events: none;
    user-select: none;
}

.cookie-consent-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    background: rgba(15, 45, 82, 0.55);
    backdrop-filter: blur(4px);
}

.cookie-consent-overlay.hidden { display: none; }

.cookie-consent-dialog {
    width: 100%;
    max-width: 440px;
    background: var(--as-surface);
    color: var(--as-text);
    border-radius: var(--as-radius);
    padding: 24px 22px;
    box-shadow: 0 16px 48px rgba(15, 45, 82, 0.25);
}

.cookie-consent-heading {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--as-navy);
}

.cookie-consent-text {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.55;
}

.cookie-consent-text a {
    color: var(--as-teal-dark);
    text-decoration: underline;
}

.cookie-consent-required {
    margin: 0 0 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--as-navy);
}

.cookie-consent-declined.hidden { display: none; }

.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.cookie-consent-btn {
    border: none;
    border-radius: var(--as-radius-pill);
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--as-font);
}

.cookie-consent-decline {
    background: transparent;
    color: var(--as-text-muted);
    border: 1px solid var(--as-border);
}

.cookie-consent-accept {
    background: var(--as-teal);
    color: #fff;
}

.cookie-consent-accept:hover { background: var(--as-teal-dark); }

.welcome-privacy {
    max-width: 520px;
    margin: 24px auto 40px;
    padding: 0 16px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--as-text-muted);
}

.welcome-privacy h2 {
    font-size: 16px;
    color: var(--as-navy);
    margin: 0 0 8px;
}

.welcome-privacy p { margin: 0; }
