/* Brainy McFlood opens every quiz (2026-09-29): he pops up beside a speech
   bubble with one plain line. The art is written into /img/brainy/ by
   scripts/gen_brainy.py (MARKETING_POSES); never hand-copy it. He faces
   screen left, so he is mirrored to face his bubble on the right. */
.quiz-brainy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin: 0.4rem auto 1.1rem;
    max-width: 30rem;
}
.quiz-brainy picture { line-height: 0; flex: 0 0 auto; }
.quiz-brainy img {
    height: clamp(96px, 22vw, 136px);
    width: auto;
    transform: scaleX(-1);
}
.quiz-brainy picture {
    animation: quiz-brainy-pop 760ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.quiz-brainy-bubble {
    position: relative;
    margin: 0;
    padding: 0.7rem 0.95rem;
    border-radius: 16px;
    background: var(--accent, #f0a32f);
    color: var(--btn-accent-text, #1a1513);
    font-weight: 600;
    font-size: 1.02rem;
    line-height: 1.35;
    text-align: left;
    transform-origin: 0% 60%;
    animation: quiz-brainy-bubble 520ms cubic-bezier(0.34, 1.56, 0.64, 1) 380ms both;
}
.quiz-brainy-bubble::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 55%;
    border: 9px solid transparent;
    border-left: 0;
    border-right-color: var(--accent, #f0a32f);
    transform: translateY(-50%);
}
@keyframes quiz-brainy-pop {
    0% { transform: translateY(40px) scale(0.55) rotate(-10deg); opacity: 0; }
    55% { transform: translateY(-9px) scale(1.06) rotate(4deg); opacity: 1; }
    78% { transform: translateY(3px) scale(0.98) rotate(-2deg); }
    100% { transform: none; opacity: 1; }
}
@keyframes quiz-brainy-bubble {
    0% { transform: scale(0.2); opacity: 0; }
    60% { transform: scale(1.06) rotate(-1.5deg); opacity: 1; }
    100% { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .quiz-brainy picture,
    .quiz-brainy-bubble { animation: none; }
}

/* Stagecraft on the quiz pages (marketing/js/stagecraft.js): the kit styles
   its own effects; these only make room for its pieces on our layout. */
.quiz-tools { display: inline-flex; align-items: center; gap: 10px; }
.sfx-toggle[hidden] { display: none; }
.stage-on .progress-bar { display: none; }
.q-bulbs:empty, .quiz-host:empty { display: none; }
.quiz-host { margin-top: 4px; }
.calc-reel {
    min-height: 1.3em;
    margin: 10px 0 0;
    font-family: 'Anton', 'Rubik', sans-serif;
    font-size: clamp(1.5rem, 6vw, 2.2rem);
    letter-spacing: 0.02em;
    color: var(--accent, #f0a32f);
}
.calc-reel:empty { display: none; }

/* "Go deeper" right under the result card (renderQuickNext) */
.bq-quick-next { text-align: center; margin: 18px auto 6px; max-width: 520px; padding: 0 16px; box-sizing: border-box; }
.bq-quick-next-btn { box-sizing: border-box; width: 100%; max-width: 420px; min-height: 52px; font-size: 1.05rem; }
.bq-quick-next-note { margin: 8px 0 0; font-size: 0.85rem; color: var(--text-secondary, #b7a488); }

/* Letter tiles on the BS result open a detail card (openLetter) */
button.bq-letter { font: inherit; color: inherit; cursor: pointer; position: relative; transition: transform .15s ease, border-color .15s ease; }
button.bq-letter:hover, button.bq-letter:focus-visible { border-color: var(--accent, #f0a32f); transform: translateY(-2px); }
button.bq-letter:focus-visible { outline: 2px solid var(--accent, #f0a32f); outline-offset: 2px; }
.bq-letter-more { display: block; margin-top: 0.35rem; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent, #f0a32f); }
@media (prefers-reduced-motion: reduce) { button.bq-letter, button.bq-stat { transition: none; } }
/* Stats and locked slots on the BS result open the detail card too */
button.bq-stat { font: inherit; color: inherit; background: none; border: 0; padding: 6px 8px; margin: -6px -8px; width: calc(100% + 16px); text-align: left; cursor: pointer; border-radius: 10px; transition: background .15s ease; }
button.bq-stat:hover, button.bq-stat:focus-visible { background: rgba(var(--accent-rgb, 240, 163, 47), 0.08); }
button.bq-stat:focus-visible { outline: 2px solid var(--accent, #f0a32f); outline-offset: 2px; }
.bq-stat-more { margin-left: 6px; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent, #f0a32f); }
button.sig-locked-chip { font: inherit; cursor: pointer; background: none; }
button.sig-locked-chip:hover, button.sig-locked-chip:focus-visible { border-color: var(--accent, #f0a32f); }
/* Party Personality: the axis letters open the letter card */
button.axis-label { font: inherit; color: inherit; background: none; border: 0; padding: 4px 6px; margin: -4px -6px; border-radius: 8px; cursor: pointer; text-decoration: underline dotted rgba(var(--accent-rgb, 240, 163, 47), 0.6); text-underline-offset: 4px; }
button.axis-label:hover, button.axis-label:focus-visible { background: rgba(var(--accent-rgb, 240, 163, 47), 0.1); }
button.axis-label:focus-visible { outline: 2px solid var(--accent, #f0a32f); outline-offset: 2px; }
