@font-face {
    font-family: 'Bricolage Grotesque';
    src: url('/fonts/BricolageGrotesque-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-display: swap;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('/fonts/PlusJakartaSans-Bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
}

.game-page [hidden] { display: none !important; }
.game-skip-link { position: absolute; left: 16px; top: -80px; z-index: 200; }
.game-skip-link:focus { top: 8px; padding: 12px; background: white; }
.game-page .game-shell { padding: 0; min-height: 100svh; }
.game-page .tp-header {
    position: relative;
    min-height: 64px;
    height: auto;
    padding: 10px max(16px, env(safe-area-inset-left));
    gap: 8px;
}
.game-page .tp-brand { flex-shrink: 0; gap: 6px; }
.game-page .tp-brand img { height: 40px; }
.game-page .tp-brand span { font-size: 19px; }
.game-page .tp-header-links { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.game-page .tp-header-links a { padding: 8px 10px; font-size: 11px; min-height: 44px; display: inline-flex; align-items: center; }
.game-page :is(a, button):focus-visible { outline: 3px solid var(--teal-dark); outline-offset: 5px; }

.game-layout { width: 100%; max-width: 840px; margin: 0 auto; padding: 14px 16px 24px; }
.game-panel { min-width: 0; max-width: 728px; margin: 0 auto; }
.game-session { display: flex; justify-content: space-between; gap: 12px; padding-top: 14px; font-size: 11px; color: var(--ink); }
[data-game-streak] { color: var(--teal-dark); font-weight: 800; }
.game-question-head {
    min-height: 140px;
    padding: 16px 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    scroll-margin-top: 16px;
}
.game-category { margin: 0 0 6px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.game-heading { font: 800 clamp(28px, 6vw, 40px)/1.1 var(--font-display); color: var(--teal-dark); margin: 0; letter-spacing: -.04em; }
.game-description { font-size: 13px; line-height: 1.5; color: var(--ink); max-width: 48ch; margin: 10px auto 0; overflow-wrap: anywhere; }
.game-shell--ad-free .game-question-head { min-height: 110px; }
.game-options { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.game-options form { min-width: 0; margin: 0; display: flex; }
.game-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    min-width: 0;
    width: 100%;
    min-height: 164px;
    margin: 0;
    padding: 16px 20px;
    border: 3px solid var(--plum);
    border-radius: 20px;
    box-shadow: 4px 5px 0 rgba(59,31,43,.16);
    text-align: left;
    font-family: var(--font-body);
    transform: none;
    animation: game-option-float 5.6s ease-in-out infinite;
    opacity: 1;
}
.game-option.choice-b { animation-delay: -2.8s; }
.game-option:is(:hover, :focus-visible, :active, :disabled) { animation-play-state: paused; }
@keyframes game-option-float {
    0%, 100% { translate: 0 0; rotate: -.18deg; }
    50% { translate: 0 -3px; rotate: .18deg; }
}
button.game-option { cursor: pointer; touch-action: manipulation; transition: transform 120ms ease, box-shadow 120ms ease; }
button.game-option:active { transform: translateY(3px); box-shadow: 1px 2px 0 rgba(59,31,43,.16); }
button.game-option:disabled { cursor: wait; }
button.game-option:disabled .game-option-hint { opacity: .5; }
.game-option-letter { font-size: 11px; font-weight: 800; opacity: .8; }
.game-option-text { font: 800 clamp(20px, 5vw, 26px)/1.2 var(--font-display); letter-spacing: -.02em; margin: 0; overflow-wrap: anywhere; flex: 1; }
.game-option-hint { font-size: 11px; font-weight: 800; display: flex; justify-content: space-between; align-items: center; }
.game-option-hint span { font-size: 21px; line-height: 1; }
.game-option--result { gap: 8px; }
.game-result-value { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.game-result-value strong { font: 800 30px/1 var(--font-display); }
.game-result-value strong > span { font-size: 18px; }
.game-your-choice { font-size: 10px; font-weight: 800; border: 1px solid currentColor; border-radius: 999px; padding: 4px 8px; white-space: nowrap; }
.game-result-track { height: 6px; background: rgba(255,255,255,.4); border-radius: 5px; }
.game-result-track span { display: block; height: 100%; background: currentColor; border-radius: inherit; transition: width 200ms ease; }
.game-followup { min-height: 110px; text-align: center; padding-top: 14px; }
.game-feedback { font-size: 11px; line-height: 1.5; color: var(--ink); margin: 0 0 12px; }
.game-next { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 20px; min-height: 54px; border: 3px solid var(--plum); border-radius: 14px; background: var(--yellow-bright); box-shadow: 0 4px 0 var(--plum); font-size: 15px; font-weight: 800; touch-action: manipulation; }
.game-next:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--plum); }
.game-skip { display: inline-flex; align-items: center; gap: 10px; padding: 12px; min-height: 44px; font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
[aria-busy="true"] .game-options { opacity: .7; }
[aria-busy="true"] [data-game-next] { cursor: wait; }
.game-links, .game-share-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: 14px; row-gap: 0; }
.game-links { border-top: 1px solid rgba(59,31,43,.15); margin-top: 14px; padding: 8px 0; }
.game-links a, .game-links button, .game-share-links a, .game-share-links button { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 0; background: none; border: 0; color: var(--ink); font: 700 11px var(--font-body); cursor: pointer; }
.game-error { background: #fff2df; border: 2px solid var(--orange-deep); padding: 14px; margin: 12px 0; border-radius: 12px; font-size: 13px; }
.game-error p { margin: 0 0 6px; }
.game-error button, .game-error a { display: inline-flex; align-items: center; min-height: 44px; margin-right: 12px; color: inherit; background: transparent; border: 0; font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }

/* The ad is a sibling of the changing game region. Never clip or remount it. */
.game-ad { margin: 0 auto; width: 100%; max-width: 728px; }
.game-ad-label { display: block; text-align: center; text-transform: uppercase; letter-spacing: .12em; font-size: 9px; color: var(--ink); margin-bottom: 6px; }
.game-ad-space { width: 100%; min-height: 100px; }
.game-ad-unit { display: block; width: 100%; height: 100px; }
.game-ad-preview { width: 100%; height: 100px; border: 1px dashed #d6cfd8; border-radius: 6px; background: rgba(255,255,255,.35); }
.game-page footer { padding-bottom: max(20px, env(safe-area-inset-bottom)); }

/* Occasional decorative visit; the game remains fully clickable underneath. */
.game-mascot {
    position: fixed;
    left: max(10px, env(safe-area-inset-left));
    bottom: max(10px, env(safe-area-inset-bottom));
    width: 96px;
    height: 96px;
    z-index: 20;
    pointer-events: none;
    user-select: none;
    visibility: hidden;
    opacity: 0;
    transform: translate(-120%, 120%);
}
.game-mascot img { display: block; width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 85%; }
.game-mascot.is-visiting { visibility: visible; animation: mascot-visit 6s ease-in-out both; }
.game-mascot.is-visiting img { animation: mascot-hello 1.6s ease-in-out 600ms 3; }
@keyframes mascot-visit {
    0%, 100% { opacity: 0; transform: translate(-120%, 120%) rotate(-12deg); }
    14%, 82% { opacity: 1; transform: translate(0, 0) rotate(0); }
}
@keyframes mascot-hello {
    0%, 100% { transform: rotate(-4deg); }
    50% { transform: translateY(-3px) rotate(4deg); }
}

@media (max-width: 599px) {
    .game-mascot { width: 64px; height: 64px; }
    .game-page .tp-header-links a:nth-child(n+3) { display: none; }
    .game-page .tp-header-links a { font-size: 10px; padding: 8px; }
    .game-page .tp-brand span { font-size: 17px; }
    .game-page .tp-brand img { height: 34px; }
}
@media (max-width: 359px) {
    .game-page .tp-header { padding-inline: 12px; }
    .game-page .tp-brand span { font-size: 15px; }
    .game-page .tp-brand img { height: 30px; }
    .game-page .tp-header-links { gap: 4px; }
    .game-page .tp-header-links a { padding-inline: 6px; font-size: 9px; }
    .game-layout { padding-inline: 12px; }
    .game-option { padding: 14px 16px; min-height: 150px; }
}
@media (min-width: 700px) {
    .game-options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
    .game-option { min-height: 240px; padding: 22px; }
    .game-option-text { font-size: 28px; }
    .game-followup { max-width: 420px; margin-inline: auto; }
}
@media (min-width: 800px) {
    .game-ad-space { min-height: 90px; }
    .game-ad-unit, .game-ad-preview { height: 90px; }
}
@media (min-width: 1180px) {
    .game-shell--sidebar .game-layout { max-width: 1140px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 150px; align-items: start; padding-top: 32px; }
    .game-shell--sidebar .game-ad { grid-column: 2; grid-row: 1; padding-top: 50px; }
    .game-shell--sidebar .game-panel { grid-column: 1; grid-row: 1; }
    .game-shell--sidebar .game-ad-space { min-height: 250px; }
    .game-shell--sidebar .game-ad-unit, .game-shell--sidebar .game-ad-preview { width: 300px; height: 250px; }
    .game-shell--sidebar .game-question-head { min-height: 100px; }
}
@media (prefers-reduced-motion: reduce) {
    .game-mascot { display: none; }
    .game-page *, .game-page *::before, .game-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
