/* ==========================================================================
   COMBATE AO FOGO — tema claro · www.horadaseguranca.com
   ========================================================================== */

:root {
    --bg-0: #f2f8fc;
    --bg-1: #ffffff;
    --bg-soft: #f6fafd;
    --line: #d9e6f2;
    --line-2: #c3d7e8;

    --agua:      #0284c7;
    --agua-dark: #075985;
    --agua-glow: rgba(2, 132, 199, 0.25);
    --agua-soft: #e0f2fe;

    --fogo:      #f97316;
    --fogo-dark: #c2410c;
    --fogo-soft: #fff2e6;

    --ok:        #16a34a;
    --ok-soft:   #eafbf0;
    --alerta:    #dc2626;
    --alerta-soft:#fdf0f0;
    --amarelo:   #f59e0b;

    --texto:      #12212e;
    --texto-soft: #46617a;
    --texto-mut:  #7893a8;

    --sh-sm: 0 2px 8px rgba(18, 45, 70, 0.07);
    --sh-md: 0 8px 22px rgba(18, 45, 70, 0.1);
    --sh-lg: 0 18px 44px rgba(18, 45, 70, 0.14);

    --r: 16px;
    --r-lg: 22px;

    --fh: 'Outfit', -apple-system, sans-serif;
    --fb: 'Plus Jakarta Sans', -apple-system, sans-serif;
    --bounce: 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: clamp(14px, 0.5vw + 12.6px, 17px); }

body {
    font-family: var(--fb);
    color: var(--texto);
    min-height: 100dvh;
    display: flex; flex-direction: column;
    overflow-x: hidden;
    padding-bottom: env(safe-area-inset-bottom);
    background:
        radial-gradient(ellipse 70% 45% at 50% 0%, rgba(2, 132, 199, 0.09) 0%, transparent 62%),
        linear-gradient(180deg, #ffffff 0%, var(--bg-0) 100%);
    background-attachment: fixed;
}

a { color: var(--agua-dark); text-decoration: none; }
.hidden { display: none !important; }

.screen { display: none; animation: fadeUp 0.35s ease both; }
.screen.active { display: block; }
.modo { animation: fadeUp 0.3s ease both; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ============================ CABEÇALHO ============================ */

.app-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1rem;
    position: sticky; top: 0; z-index: 100;
    box-shadow: var(--sh-sm);
}
.header-container {
    max-width: 1120px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center; gap: 0.7rem;
}
.brand-box { display: flex; align-items: center; gap: 0.6rem; min-width: 0; color: inherit; }
.brand-box:hover .brand-title { color: var(--fogo); }
.header-logo { width: 38px; height: 38px; object-fit: contain; border-radius: 9px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-title {
    font-family: var(--fh); font-size: 1rem; font-weight: 900;
    letter-spacing: 0.03em; color: var(--agua-dark); line-height: 1.1; transition: color 0.18s;
}
.brand-tagline {
    font-size: 0.67rem; color: var(--texto-mut); font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-link-btn {
    display: inline-flex; align-items: center; gap: 0.35rem;
    background: var(--agua-soft); border: 1px solid #a5d8f5;
    color: var(--agua-dark); font-weight: 700; font-size: 0.75rem;
    padding: 0.42rem 0.85rem; border-radius: 999px;
    white-space: nowrap; transition: all 0.18s;
}
.site-link-btn:hover { background: var(--agua); color: #fff; transform: translateY(-1px); }


/* ============================ LAYOUT ============================ */

.main-content { flex: 1; width: 100%; max-width: 1000px; margin: 0 auto; padding: 1.1rem 1rem 2.5rem; }


/* ============================ BOTÕES ============================ */

.btn {
    font-family: var(--fh); font-weight: 800; font-size: 0.92rem;
    padding: 0.75rem 1.3rem; border: none; border-radius: 12px;
    cursor: pointer; transition: var(--bounce);
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    line-height: 1.2; text-align: center;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: translateY(0) scale(0.985); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-lg { font-size: 1rem; padding: 0.9rem 1.6rem; }
.btn-block { width: 100%; }

.btn-primary {
    background: linear-gradient(135deg, var(--agua) 0%, var(--agua-dark) 100%);
    color: #fff; box-shadow: 0 6px 18px var(--agua-glow);
}
.btn-primary:hover { box-shadow: 0 10px 26px var(--agua-glow); }
.btn-ghost { background: rgba(255,255,255,0.22); border: 1px solid rgba(255,255,255,0.5); color: #fff; }
.btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,0.34); }
.btn-ad { background: #fff; color: #14212e; font-weight: 900; width: 100%; box-shadow: 0 6px 18px rgba(0,0,0,0.22); }

.btn-icon {
    background: var(--bg-soft); border: 1px solid var(--line);
    border-radius: 10px; width: 34px; height: 34px;
    font-size: 0.95rem; cursor: pointer; color: var(--texto); transition: 0.18s;
}
.btn-icon:hover { background: var(--agua-soft); border-color: var(--agua); }
.btn-icon.muted { opacity: 0.45; }


/* ============================ TELA INICIAL ============================ */

.hero-card {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-lg);
    padding: clamp(1.3rem, 3.5vw, 2.3rem);
    text-align: center;
}
.hero-logo-link { display: inline-block; margin-bottom: 0.8rem; transition: var(--bounce); }
.hero-logo-link:hover { transform: scale(1.06) rotate(-2deg); }
.hero-logo-img { width: clamp(74px, 11vw, 100px); border-radius: 18px; box-shadow: var(--sh-md); }

.hero-eyebrow {
    display: inline-block; background: var(--agua-soft);
    border: 1px solid #a5d8f5; color: var(--agua-dark);
    font-size: 0.7rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase;
    padding: 0.3rem 0.8rem; border-radius: 999px; margin-bottom: 0.7rem;
}
.hero-title {
    font-family: var(--fh); font-size: clamp(1.8rem, 6vw, 3.1rem);
    font-weight: 900; line-height: 1.05; margin-bottom: 0.6rem; letter-spacing: -0.01em;
}
.hero-title mark { background: linear-gradient(180deg, transparent 58%, #ffd9b8 58%); color: var(--fogo-dark); padding: 0 0.12em; }
.hero-subtitle {
    font-size: clamp(0.88rem, 2vw, 1rem); color: var(--texto-soft);
    line-height: 1.6; max-width: 640px; margin: 0 auto 1.4rem;
}

.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.6rem; margin-bottom: 1.1rem; text-align: left; }
.how-card {
    background: var(--bg-soft); border: 1px solid var(--line);
    border-top: 3px solid var(--agua); border-radius: 13px; padding: 0.8rem; transition: var(--bounce);
}
.how-card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); background: #fff; }
.how-card:nth-child(2) { border-top-color: var(--fogo); }
.how-card:nth-child(3) { border-top-color: var(--alerta); }
.how-card:nth-child(4) { border-top-color: var(--ok); }
.how-ico { font-size: 1.5rem; display: block; margin-bottom: 0.25rem; }
.how-card strong { display: block; font-family: var(--fh); font-size: 0.9rem; margin-bottom: 0.15rem; }
.how-card p { font-size: 0.74rem; color: var(--texto-mut); line-height: 1.45; }

.controls-hint { display: flex; flex-wrap: wrap; gap: 0.45rem; justify-content: center; margin-bottom: 1.2rem; }
.ch-item {
    display: flex; align-items: center; gap: 0.4rem;
    background: var(--bg-soft); border: 1px solid var(--line);
    border-radius: 10px; padding: 0.4rem 0.7rem; font-size: 0.75rem; color: var(--texto-soft);
}
.key {
    display: inline-grid; place-items: center; min-width: 26px; height: 25px; padding: 0 0.4rem;
    background: #fff; border: 1px solid var(--line-2); border-bottom-width: 3px;
    border-radius: 6px; font-family: var(--fh); font-weight: 800; font-size: 0.75rem;
}

.setup-box {
    background: var(--bg-soft); border: 1px solid var(--line);
    border-radius: var(--r); padding: clamp(1rem, 2.6vw, 1.4rem);
    text-align: left; display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: 1.1rem;
}
.setup-box h3 { font-family: var(--fh); font-size: 1rem; }
.input-group { display: flex; flex-direction: column; gap: 0.28rem; }
.input-group label { font-size: 0.77rem; font-weight: 700; color: var(--texto-soft); }
.input-group input {
    background: #fff; border: 1.5px solid var(--line-2); border-radius: 10px;
    padding: 0.66rem 0.8rem; font-family: var(--fb); font-size: 0.92rem; color: var(--texto); transition: 0.18s;
}
.input-group input::placeholder { color: #9db4c6; }
.input-group input:focus { outline: none; border-color: var(--agua); box-shadow: 0 0 0 3px var(--agua-glow); }
.input-group input.invalid { border-color: var(--alerta); box-shadow: 0 0 0 3px rgba(220,38,38,0.16); animation: shake 0.35s ease; }

@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }

.setup-error {
    background: var(--alerta-soft); border: 1px solid #f5b5b5; border-radius: 10px;
    padding: 0.55rem 0.8rem; font-size: 0.83rem; font-weight: 600; color: #a11a1a;
    text-align: center; line-height: 1.45;
}
.privacy-note { font-size: 0.68rem; color: var(--texto-mut); text-align: center; line-height: 1.45; }

.marketing-banner {
    display: flex; flex-direction: column; gap: 0.15rem;
    background: var(--fogo-soft); border: 1px solid #ffd0aa;
    border-radius: 12px; padding: 0.8rem 1rem; text-align: center; transition: var(--bounce);
}
.marketing-banner:hover { background: #ffe8d5; transform: translateY(-2px); }
.marketing-banner span { font-size: 0.82rem; color: #8a4416; }
.marketing-banner strong { font-size: 0.88rem; color: var(--fogo-dark); }


/* ============================ BRIEFING ============================ */

.briefing-card {
    background: var(--bg-1); border: 1px solid var(--line);
    border-radius: var(--r-lg); box-shadow: var(--sh-lg);
    padding: clamp(1.4rem, 4vw, 2.4rem); text-align: center; max-width: 560px; margin: 0 auto;
}
.brief-badge {
    display: inline-block; background: var(--agua-soft); border: 1px solid #a5d8f5;
    color: var(--agua-dark); font-family: var(--fh); font-size: 0.68rem; font-weight: 900;
    letter-spacing: 0.14em; padding: 0.3rem 0.9rem; border-radius: 999px; margin-bottom: 0.9rem;
}
.brief-ico { font-size: clamp(3rem, 10vw, 4.4rem); line-height: 1; margin-bottom: 0.3rem; }
.lose-card { border-color: #fecaca; box-shadow: 0 18px 40px rgba(220,38,38,0.15); }
.lose-card .brief-title { color: #b91c1c; }
.lose-stats { grid-template-columns: repeat(3, 1fr) !important; }
.lose-card .btn-ghost {
    background: transparent; border: 1px solid var(--line); color: var(--texto-mut); margin-top: 0.55rem;
}
.lose-card .btn-ghost:hover:not(:disabled) { background: var(--bg-soft); color: var(--texto); }
.brief-title { font-family: var(--fh); font-size: clamp(1.4rem, 4.5vw, 2rem); font-weight: 900; }
.brief-sub { font-size: 0.88rem; color: var(--fogo-dark); margin-bottom: 0.8rem; font-weight: 600; }
.brief-text { font-size: 0.88rem; color: var(--texto-soft); line-height: 1.6; margin-bottom: 0.8rem; }
.brief-tip {
    background: var(--fogo-soft); border: 1px solid #ffd0aa; border-radius: 12px;
    padding: 0.6rem 0.85rem; font-size: 0.82rem; color: #8a4416; line-height: 1.5; margin-bottom: 0.7rem;
}
.brief-regra {
    background: #fef2f2; border: 1px solid #fecaca; border-radius: 12px;
    padding: 0.6rem 0.85rem; font-size: 0.79rem; color: #991b1b; line-height: 1.55; margin-bottom: 1.2rem;
    text-align: left;
}
.brief-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-bottom: 1.3rem; }
.brief-stats > div { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 11px; padding: 0.6rem 0.3rem; }
.brief-stats span { display: block; font-family: var(--fh); font-size: 1.15rem; font-weight: 900; color: var(--agua-dark); }
.brief-stats small { font-size: 0.63rem; color: var(--texto-mut); }


/* ============================ JOGO ============================ */

.game-hud {
    display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; flex-wrap: wrap;
    background: var(--bg-1); border: 1px solid var(--line);
    border-radius: 13px; padding: 0.5rem 0.85rem; margin-bottom: 0.6rem; box-shadow: var(--sh-sm);
}
.hud-left { display: flex; flex-direction: column; min-width: 0; }
.hud-phase { font-family: var(--fh); font-weight: 900; font-size: 0.86rem; color: var(--agua-dark); }
.hud-scene { font-size: 0.7rem; color: var(--texto-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hud-center { display: flex; flex-direction: column; gap: 0.3rem; flex: 1 1 220px; min-width: 170px; }
.hud-bar-wrap { display: flex; align-items: center; gap: 0.4rem; }
.hud-bar-label { font-size: 0.68rem; color: var(--texto-mut); white-space: nowrap; min-width: 52px; }
.hud-bar { flex: 1; height: 9px; background: #e3edf5; border-radius: 999px; overflow: hidden; }
.hud-bar-fill { height: 100%; width: 100%; border-radius: 999px; transition: width 0.16s linear; }
.hud-bar-fill.agua { background: linear-gradient(90deg, #7dd3fc, var(--agua)); }
.hud-bar-fill.agua.baixa { background: linear-gradient(90deg, #fca5a5, var(--alerta)); }
.hud-bar-fill.focos { width: 0%; background: linear-gradient(90deg, #fdba74, var(--ok)); }
.hud-bar-fill.controle { background: linear-gradient(90deg, #86efac, var(--ok)); }
.hud-bar-fill.controle.atencao { background: linear-gradient(90deg, #fcd34d, #f59e0b); }
.hud-bar-fill.controle.critico { background: linear-gradient(90deg, #fca5a5, var(--alerta)); }
.hud-rescaldo {
    display: inline-block; margin-left: 0.4rem; padding: 0.12rem 0.5rem; border-radius: 999px;
    background: #fef3c7; border: 1px solid #fcd34d; color: #92400e;
    font-family: var(--fh); font-weight: 900; font-size: 0.6rem; letter-spacing: 0.06em;
}
.hud-rescaldo.hidden { display: none; }
.hud-bar-num { font-size: 0.72rem; color: var(--texto-soft); white-space: nowrap; }
.hud-bar-num strong { font-family: var(--fh); color: var(--texto); }

.hud-right { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.hud-time, .hud-fail, .hud-score { font-size: 0.74rem; color: var(--texto-mut); white-space: nowrap; }
.hud-time strong { font-family: var(--fh); font-size: 0.98rem; color: var(--texto); }
.hud-score strong { font-family: var(--fh); font-size: 0.98rem; color: var(--fogo-dark); }
.hud-fail {
    background: var(--bg-soft); border: 1px solid var(--line);
    padding: 0.2rem 0.5rem; border-radius: 999px; font-weight: 700;
}
.hud-fail.alerta { background: var(--alerta-soft); border-color: #f5b5b5; color: #a11a1a; animation: pulseAl 0.9s ease-in-out infinite; }
@keyframes pulseAl { 0%,100%{transform:scale(1)} 50%{transform:scale(1.07)} }

.stage-wrap { position: relative; width: 100%; }

#game-canvas {
    display: block; width: 100%; height: auto;
    border-radius: 14px; border: 2px solid var(--line-2);
    box-shadow: var(--sh-lg); touch-action: none; cursor: crosshair;
    background: #eef6fb;
}

.stage-help { font-size: 0.73rem; color: var(--texto-mut); text-align: center; margin-top: 0.55rem; }

.toast {
    position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
    background: rgba(255,255,255,0.96); border: 1px solid var(--ok); color: #14532d;
    font-size: 0.8rem; font-weight: 800; padding: 0.38rem 0.9rem; border-radius: 999px;
    white-space: nowrap; pointer-events: none; box-shadow: var(--sh-md);
    animation: fadeUp 0.2s ease both; max-width: 90%; overflow: hidden; text-overflow: ellipsis;
}
.toast.ruim { border-color: var(--alerta); color: #a11a1a; }

.countdown {
    position: absolute; inset: 0; display: grid; place-items: center;
    background: rgba(255,255,255,0.6); border-radius: 14px;
    font-family: var(--fh); font-size: clamp(3rem, 12vw, 6rem); font-weight: 900;
    color: var(--agua-dark); text-shadow: 0 6px 26px rgba(2,132,199,0.3); pointer-events: none;
}
.countdown.pulse { animation: cdPop 0.6s ease both; }
@keyframes cdPop {
    0% { transform: scale(0.5); opacity: 0; }
    40% { transform: scale(1.12); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}


/* ============================ PUBLICIDADE ============================ */

.ad-card {
    max-width: 500px; margin: 0 auto; border-radius: var(--r-lg);
    padding: clamp(1.3rem, 4vw, 2rem); box-shadow: var(--sh-lg);
    text-align: center; color: #fff; border: 1px solid rgba(255,255,255,0.2);
}
.ad-tag {
    display: inline-block; background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.38);
    font-size: 0.62rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
    padding: 0.26rem 0.8rem; border-radius: 999px; margin-bottom: 1rem;
}
.ad-brand { display: flex; align-items: center; gap: 0.75rem; justify-content: center; margin-bottom: 0.9rem; }
.ad-logo {
    width: 72px; height: 72px; border-radius: 16px; background: #fff; padding: 6px;
    display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0,0,0,0.25); flex-shrink: 0;
}
.ad-logo svg { display: block; width: 100%; height: 100%; }
.ad-brand-text { text-align: left; }
.ad-brand-text strong { display: block; font-family: var(--fh); font-size: 1.15rem; font-weight: 900; line-height: 1.2; }
.ad-brand-text span { font-size: 0.72rem; opacity: 0.92; }
.ad-tagline { font-family: var(--fh); font-size: 1rem; font-weight: 800; margin-bottom: 0.4rem; }
.ad-claim { font-size: 0.84rem; line-height: 1.55; opacity: 0.96; margin-bottom: 0.9rem; }
.ad-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: center; margin-bottom: 1.1rem; }
.ad-chip { background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.3); font-size: 0.7rem; font-weight: 700; padding: 0.25rem 0.7rem; border-radius: 999px; }
.ad-demo-note { font-size: 0.72rem; line-height: 1.55; background: rgba(0,0,0,0.24); border-radius: 10px; padding: 0.55rem 0.75rem; margin-top: 0.8rem; }
.ad-demo-note a { color: #fff; font-weight: 800; text-decoration: underline; }
.ad-footer { margin: 0.9rem 0 1rem; font-size: 0.68rem; opacity: 0.9; border-top: 1px solid rgba(255,255,255,0.25); padding-top: 0.7rem; }
.ad-footer a { color: #fff; text-decoration: underline; font-weight: 700; }


/* ============================ DESAFIOS ============================ */

.quiz-card {
    background: var(--bg-1); border: 1px solid var(--line);
    border-radius: var(--r-lg); box-shadow: var(--sh-lg); padding: clamp(1.1rem, 3vw, 1.9rem);
}
.quiz-badge {
    display: inline-block; background: var(--agua-soft); border: 1px solid #a5d8f5;
    color: var(--agua-dark); font-size: 0.64rem; font-weight: 800;
    letter-spacing: 0.12em; text-transform: uppercase;
    padding: 0.26rem 0.8rem; border-radius: 999px; margin-bottom: 0.6rem;
}
.quiz-title { font-family: var(--fh); font-size: clamp(1.15rem, 3.5vw, 1.6rem); font-weight: 900; margin-bottom: 0.25rem; }
.quiz-text { font-size: 0.85rem; color: var(--texto-soft); line-height: 1.55; margin-bottom: 1rem; }
.quiz-feedback {
    background: var(--ok-soft); border: 1px solid #a7e5c0; border-radius: 12px;
    padding: 0.7rem 0.9rem; font-size: 0.85rem; color: #14532d; text-align: center; margin: 1rem 0 0.8rem;
}
.quiz-help { font-size: 0.7rem; color: var(--texto-mut); text-align: center; margin-top: 0.7rem; }

/* --- arrastar --- */
.quiz-pool {
    display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center;
    background: var(--bg-soft); border: 1px dashed var(--line-2);
    border-radius: 14px; padding: 0.8rem; margin-bottom: 1rem; min-height: 76px;
}
.q-item {
    display: flex; align-items: center; gap: 0.45rem;
    background: #fff; border: 1.5px solid var(--line-2); border-radius: 11px;
    padding: 0.5rem 0.75rem; cursor: grab; user-select: none;
    transition: var(--bounce); font-size: 0.8rem; font-weight: 700; box-shadow: var(--sh-sm);
}
.q-item:hover { transform: translateY(-3px); border-color: var(--agua); box-shadow: var(--sh-md); }
.q-item.dragging { opacity: 0.45; }
.q-item.selected { border-color: var(--fogo); background: var(--fogo-soft); box-shadow: 0 0 0 3px rgba(249,115,22,0.2); transform: translateY(-3px) scale(1.03); }
.q-item.ok { border-color: var(--ok); background: var(--ok-soft); cursor: default; }
.q-item.ok:hover { transform: none; }
.q-item.shake { animation: shake 0.4s ease; }
.qi-ico { font-size: 1.15rem; }

.quiz-targets { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.6rem; }
.q-target {
    background: var(--bg-soft); border: 2px dashed var(--line-2);
    border-radius: 14px; padding: 0.7rem; min-height: 130px; cursor: pointer; transition: var(--bounce);
}
.q-target:hover, .q-target.over { border-color: var(--fogo); background: var(--fogo-soft); }
.q-target.flash-ok { border-color: var(--ok); background: var(--ok-soft); }
.q-target.flash-bad { border-color: var(--alerta); background: var(--alerta-soft); animation: shake 0.4s ease; }
.qt-head { text-align: center; margin-bottom: 0.5rem; }
.qt-head strong { display: block; font-family: var(--fh); font-size: 0.92rem; font-weight: 900; }
.qt-head span { font-size: 0.68rem; color: var(--texto-mut); }
.qt-drop { display: flex; flex-direction: column; gap: 0.35rem; }
.qt-drop .q-item { font-size: 0.74rem; padding: 0.4rem 0.55rem; }

/* --- ligar pontos --- */
.ligar-wrap {
    position: relative; display: grid; grid-template-columns: 1fr 1fr;
    gap: clamp(1.6rem, 8vw, 4.5rem);
    background: var(--bg-soft); border: 1px solid var(--line);
    border-radius: 14px; padding: 1rem;
}
.ligar-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.ligar-col { display: flex; flex-direction: column; gap: 0.5rem; position: relative; z-index: 2; }
.lig-item {
    background: #fff; border: 1.5px solid var(--line-2); border-radius: 11px;
    padding: 0.6rem 0.75rem; font-family: var(--fb); font-size: 0.78rem; font-weight: 700;
    color: var(--texto); cursor: pointer; text-align: left; transition: var(--bounce);
    box-shadow: var(--sh-sm); line-height: 1.35;
}
.lig-item:hover:not(.ok) { transform: translateY(-2px); border-color: var(--agua); }
.lig-item.sel { border-color: var(--fogo); background: var(--fogo-soft); box-shadow: 0 0 0 3px rgba(249,115,22,0.2); }
.lig-item.ok { border-color: var(--ok); background: var(--ok-soft); cursor: default; }
.lig-item.errado { border-color: var(--alerta); background: var(--alerta-soft); animation: shake 0.4s ease; }
.lig-esq { text-align: left; }
.lig-dir { text-align: left; }

/* --- verdadeiro ou falso --- */
.vf-lista { display: flex; flex-direction: column; gap: 0.6rem; }
.vf-item {
    display: flex; gap: 0.7rem;
    background: var(--bg-soft); border: 1px solid var(--line);
    border-radius: 13px; padding: 0.8rem;
}
.vf-num {
    flex-shrink: 0; width: 28px; height: 28px; display: grid; place-items: center;
    background: var(--agua-soft); border: 1px solid #a5d8f5; border-radius: 8px;
    font-family: var(--fh); font-weight: 900; font-size: 0.82rem; color: var(--agua-dark);
}
.vf-corpo { flex: 1; min-width: 0; }
.vf-texto { font-size: 0.85rem; line-height: 1.5; margin-bottom: 0.55rem; }
.vf-botoes { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.vf-btn {
    flex: 1 1 130px; background: #fff; border: 1.5px solid var(--line-2);
    border-radius: 10px; padding: 0.5rem 0.7rem;
    font-family: var(--fh); font-weight: 800; font-size: 0.82rem; color: var(--texto);
    cursor: pointer; transition: var(--bounce);
}
.vf-btn:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--agua); }
.vf-btn:disabled { cursor: default; opacity: 0.75; }
.vf-btn.correta { border-color: var(--ok); background: var(--ok-soft); color: #14532d; opacity: 1; }
.vf-btn.errada  { border-color: var(--alerta); background: var(--alerta-soft); color: #a11a1a; opacity: 1; }
.vf-exp { margin-top: 0.55rem; font-size: 0.78rem; line-height: 1.5; padding: 0.5rem 0.7rem; border-radius: 9px; }
.vf-exp.exp-ok  { background: var(--ok-soft); color: #14532d; border: 1px solid #a7e5c0; }
.vf-exp.exp-bad { background: var(--alerta-soft); color: #a11a1a; border: 1px solid #f5b5b5; }

/* --- memória --- */
.mem-head { display: flex; justify-content: center; margin-bottom: 0.7rem; }
.mem-badge {
    background: var(--agua-soft); border: 1px solid #a5d8f5; color: var(--agua-dark);
    font-size: 0.78rem; font-weight: 700; padding: 0.26rem 0.8rem; border-radius: 999px;
}
.mem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; max-width: 560px; margin: 0 auto; }
.mem-carta {
    aspect-ratio: 3/4; border-radius: 13px; cursor: pointer;
    background: linear-gradient(145deg, var(--agua) 0%, var(--agua-dark) 100%);
    border: 2px solid var(--agua-dark);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem;
    transition: var(--bounce); padding: 0.3rem; color: #fff;
}
.mem-carta:hover:not(.achada) { transform: translateY(-4px) scale(1.03); }
.mem-face { font-size: clamp(1.4rem, 5vw, 2.1rem); line-height: 1; }
.mem-nome { font-size: 0.6rem; font-weight: 800; line-height: 1.15; text-align: center; }
.mem-carta.virada { background: #fff; border-color: var(--agua); color: var(--texto); }
.mem-carta.achada {
    background: var(--ok-soft); border-color: var(--ok); color: #14532d;
    cursor: default; animation: pop 0.4s var(--bounce);
}
@keyframes pop { 0%{transform:scale(1)} 45%{transform:scale(1.09)} 100%{transform:scale(1)} }


/* ============================ FIM ============================ */

.end-card {
    background: var(--bg-1); border: 1px solid var(--line);
    border-radius: var(--r-lg); box-shadow: var(--sh-lg);
    padding: clamp(1.4rem, 4vw, 2.4rem); text-align: center;
}
.end-ico { font-size: clamp(3rem, 10vw, 4.6rem); line-height: 1; margin-bottom: 0.2rem; }
.end-title { font-family: var(--fh); font-size: clamp(1.4rem, 4.5vw, 2.2rem); font-weight: 900; color: var(--agua-dark); }
.end-sub { font-size: 0.9rem; color: var(--texto-soft); line-height: 1.55; margin-bottom: 1.3rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.end-score { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem; margin-bottom: 1rem; }
.es-label { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; color: var(--texto-mut); }
.es-value { font-family: var(--fh); font-size: clamp(2.6rem, 11vw, 4.2rem); font-weight: 900; line-height: 1; color: var(--agua-dark); }
.es-rank {
    display: inline-block; margin-top: 0.5rem; background: var(--fogo-soft);
    border: 1px solid #ffd0aa; color: var(--fogo-dark); font-weight: 800; font-size: 0.85rem;
    padding: 0.32rem 1rem; border-radius: 999px;
}
.end-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.45rem; margin-bottom: 1.3rem; }
.end-metrics > div { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 0.3rem; }
.end-metrics span { display: block; font-family: var(--fh); font-size: 1.25rem; font-weight: 900; }
.end-metrics small { font-size: 0.62rem; color: var(--texto-mut); line-height: 1.3; }
.end-actions { margin-bottom: 1.3rem; }
.end-cta {
    display: flex; align-items: center; gap: 0.9rem;
    background: var(--fogo-soft); border: 1px solid #ffd0aa;
    border-radius: var(--r); padding: 1rem; text-align: left; transition: var(--bounce);
}
.end-cta:hover { background: #ffe8d5; transform: translateY(-2px); }
.end-cta-logo { width: 56px; height: 56px; object-fit: contain; border-radius: 13px; flex-shrink: 0; }
.end-cta span { display: block; font-size: 0.78rem; color: #8a4416; line-height: 1.45; }
.end-cta strong { display: block; font-family: var(--fh); font-size: 0.92rem; color: var(--fogo-dark); margin-bottom: 0.15rem; }


/* ============================ RESPONSIVO ============================ */

@media (max-width: 640px) {
    .main-content { padding: 0.8rem 0.7rem 2rem; }
    .brand-tagline { display: none; }
    .brand-title { font-size: 0.85rem; }
    .site-link-btn { font-size: 0.64rem; padding: 0.34rem 0.6rem; }
    .header-logo { width: 32px; height: 32px; }

    .how-grid { grid-template-columns: 1fr 1fr; }
    .controls-hint { flex-direction: column; }
    .ch-item { justify-content: center; }

    .game-hud { gap: 0.45rem; padding: 0.45rem 0.6rem; }
    .hud-center { order: 3; flex-basis: 100%; }
    .hud-scene { max-width: 40vw; }

    .quiz-targets { grid-template-columns: 1fr; }
    .ligar-wrap { gap: 1rem; padding: 0.7rem; }
    .lig-item { font-size: 0.72rem; padding: 0.5rem 0.6rem; }
    .mem-grid { grid-template-columns: repeat(3, 1fr); max-width: 360px; }
    .end-metrics { grid-template-columns: 1fr 1fr; }
    .end-cta { flex-direction: column; text-align: center; }
    .input-group input { font-size: 16px; }
}

@media (max-width: 380px) {
    .how-grid { grid-template-columns: 1fr; }
    .brief-stats { grid-template-columns: repeat(2, 1fr); }
    .vf-botoes { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
