/* Game: Brand Quiz */
.arcade-quiz { --qz-ink: #1C1433; --qz-ok: #0E9467; --qz-bad: #E0225F; --qz-soft: color-mix(in srgb, var(--a-fg) 13%, transparent); --qz-line: color-mix(in srgb, var(--a-fg) 26%, transparent); }
.arcade-quiz [hidden] { display: none !important; }
.arcade-quiz .qz { width: 100%; max-width: 680px; margin: 0 auto; }
.arcade-quiz .qz-screen { display: flex; flex-direction: column; align-items: center; text-align: center; animation: qz-in .32s ease-out both; }
.arcade-quiz .qz-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.arcade-quiz .qz-c1 { --c: var(--a-c1); --ci: var(--qz-c1-ink, var(--a-c1-ink)); }
.arcade-quiz .qz-c2 { --c: var(--a-c2); --ci: var(--qz-c2-ink, var(--a-c2-ink)); }
.arcade-quiz .qz-c3 { --c: var(--a-c3); --ci: var(--qz-c3-ink, var(--a-c3-ink)); }
.arcade-quiz .qz-c4 { --c: var(--a-c4); --ci: var(--qz-c4-ink, var(--a-c4-ink)); }
.arcade-quiz svg { display: block; }

/* ---------- Start ---------- */
.arcade-quiz .qz-hero { position: relative; width: 168px; height: 132px; margin: 0 auto 10px; }
.arcade-quiz .qz-hero-q { position: absolute; left: 50%; top: 4px; z-index: 2; width: 96px; height: 96px; margin-left: -48px; display: grid; place-items: center; border: 3px solid var(--qz-ink); border-radius: 30px; background: var(--a-accent); color: var(--a-accent-ink); box-shadow: 0 6px 0 var(--qz-ink); font: 800 4rem/1 var(--a-font-display); padding-top: 6px; transform: rotate(-6deg); animation: qz-bob 2.6s ease-in-out infinite; }
.arcade-quiz .qz-hero-tile { position: absolute; z-index: 1; width: 40px; height: 40px; display: grid; place-items: center; border: 2px solid var(--qz-ink); border-radius: 12px; background: var(--c); color: var(--ci); box-shadow: 0 3px 0 var(--qz-ink), inset 0 0 0 2px rgba(255,255,255,.16); font: 800 1.15rem/1 var(--a-font-display); padding-top: 2px; }
.arcade-quiz .qz-hero-tile.qz-c1 { left: 0; top: 18px; transform: rotate(-14deg); }
.arcade-quiz .qz-hero-tile.qz-c2 { right: 0; top: 10px; transform: rotate(12deg); }
.arcade-quiz .qz-hero-tile.qz-c3 { left: 14px; bottom: 0; transform: rotate(8deg); }
.arcade-quiz .qz-hero-tile.qz-c4 { right: 12px; bottom: 4px; transform: rotate(-10deg); }
.arcade-quiz .qz-title { margin: 0 0 14px; color: var(--a-fg); font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.05; overflow-wrap: anywhere; }
.arcade-quiz .qz-chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 14px; padding: 0; }
.arcade-quiz .qz-chip { padding: 6px 14px; border: 2px solid var(--qz-line); border-radius: 999px; background: var(--qz-soft); font-size: .93rem; font-weight: 600; line-height: 1.3; }
.arcade-quiz .qz-chip b { font-weight: 800; color: var(--a-fg); }
.arcade-quiz .qz-lead { max-width: 42ch; margin: 0 0 20px; opacity: .92; font-size: 1rem; line-height: 1.55; }
.arcade-quiz .qz-go { min-width: 220px; min-height: 60px; padding: 0 32px; background: var(--a-accent); color: var(--a-accent-ink); border-color: var(--qz-ink); box-shadow: 0 5px 0 var(--qz-ink); font: 800 1.3rem/1.15 var(--a-font-display); padding-block: 8px; }
.arcade-quiz .qz-go:hover { color: var(--a-accent-ink); box-shadow: 0 6px 0 var(--qz-ink); }
.arcade-quiz .qz-go:active { box-shadow: 0 1px 0 var(--qz-ink); transform: translateY(4px); }
.arcade-quiz .qz-go:focus-visible, .arcade-quiz .qz-ghost:focus-visible { outline: 3px solid var(--a-fg); outline-offset: 4px; }
.arcade-quiz .qz-keys { margin: 16px 0 0; font-size: .84rem; opacity: .75; }
@media (hover: none) { .arcade-quiz .qz-keys { display: none; } }

/* ---------- Question ---------- */
.arcade-quiz .qz-play { align-items: stretch; text-align: left; }
.arcade-quiz .qz-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.arcade-quiz .qz-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 13px; border: 2px solid var(--qz-line); border-radius: 999px; background: var(--qz-soft); font-weight: 700; font-size: .9rem; line-height: 1.25; padding-block: 4px; }
.arcade-quiz .qz-pill svg { width: 16px; height: 16px; }
.arcade-quiz .qz-pill.is-bump { animation: qz-bump .45s ease-out; }
.arcade-quiz .qz-progress { list-style: none; display: flex; gap: 6px; margin: 0 0 42px; padding: 0; }
.arcade-quiz .qz-seg { flex: 1 1 0; height: 10px; border-radius: 999px; background: var(--qz-line); transition: background .25s, transform .25s; }
.arcade-quiz .qz-seg.is-now { background: var(--a-fg); }
.arcade-quiz .qz-seg.is-ok { background: var(--qz-ok); box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.18); }
.arcade-quiz .qz-seg.is-bad { background: var(--qz-bad); box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.18); }

.arcade-quiz .qz-card { position: relative; margin: 0 0 18px; padding: 42px 22px 26px; border: 2px solid var(--qz-ink); border-radius: 24px; background: #fff; color: var(--qz-ink); box-shadow: 0 6px 0 var(--qz-ink); text-align: center; outline: none; }
.arcade-quiz .qz-q { margin: 0; min-height: 2.5em; display: grid; place-items: center; font: 800 clamp(1.28rem, 3.4vw, 1.7rem)/1.25 var(--a-font-display); text-wrap: balance; overflow-wrap: anywhere; }
.arcade-quiz .qz-timer { position: absolute; top: -32px; left: 50%; width: 62px; height: 62px; margin-left: -31px; display: grid; place-items: center; border: 2px solid var(--qz-ink); border-radius: 50%; background: #fff; box-shadow: 0 4px 0 var(--qz-ink); }
.arcade-quiz .qz-timer svg { position: absolute; inset: 1px; width: calc(100% - 2px); height: calc(100% - 2px); transform: rotate(-90deg); }
.arcade-quiz .qz-timer circle { fill: none; stroke-width: 6; }
.arcade-quiz .qz-ring-track { stroke: #EEE9FA; }
.arcade-quiz .qz-ring-bar { stroke: var(--qz-ink); stroke-linecap: round; transition: stroke-dashoffset .1s linear, stroke .2s; }
.arcade-quiz .qz-timer b { position: relative; font: 800 1.35rem/1 var(--a-font-display); padding-top: 3px; font-variant-numeric: tabular-nums; }
.arcade-quiz .qz-timer.is-low .qz-ring-bar { stroke: var(--qz-bad); }
.arcade-quiz .qz-timer.is-low b { color: var(--qz-bad); }
.arcade-quiz .qz-timer.is-low { animation: qz-pulse 1s ease-in-out infinite; }
.arcade-quiz .qz-timer.is-out { animation: qz-shake .45s ease-in-out; }
.arcade-quiz .qz-timer.is-out b { color: var(--qz-bad); }
.arcade-quiz .qz-timer-free { background: var(--a-accent); color: var(--a-accent-ink); font: 800 1.7rem/1 var(--a-font-display); padding-top: 4px; }

.arcade-quiz .qz-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.arcade-quiz .qz-ans { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 64px; margin: 0; padding: 10px 12px 10px 10px; border: 2px solid var(--qz-ink); border-radius: 18px; background: var(--c); color: var(--ci); box-shadow: 0 5px 0 var(--qz-ink), inset 0 0 0 2px rgba(255,255,255,.18); font: 700 1.02rem/1.3 var(--a-font-body); text-align: left; cursor: pointer; transition: transform .12s, box-shadow .12s, opacity .25s, background-color .2s, color .2s; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) {
	.arcade-quiz .qz-ans:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--qz-ink), inset 0 0 0 2px rgba(255,255,255,.18); }
}
.arcade-quiz .qz-ans:not(:disabled):active { transform: translateY(4px); box-shadow: 0 1px 0 var(--qz-ink), inset 0 0 0 2px rgba(255,255,255,.18); }
.arcade-quiz .qz-ans:focus-visible { outline: 3px solid var(--a-fg); outline-offset: 3px; }
.arcade-quiz .qz-ans:disabled { cursor: default; }
.arcade-quiz .qz-key { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: 2px solid var(--qz-ink); border-radius: 12px; background: #fff; color: var(--qz-ink); font: 800 1.15rem/1 var(--a-font-display); padding-top: 2px; }
.arcade-quiz .qz-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.arcade-quiz .qz-mark { flex: none; width: 30px; height: 30px; display: none; place-items: center; border: 2px solid var(--qz-ink); border-radius: 50%; background: #fff; }
.arcade-quiz .qz-mark svg { width: 18px; height: 18px; }
.arcade-quiz .qz-ans.is-correct { --c: var(--qz-ok); --ci: #fff; animation: qz-pop .42s cubic-bezier(.2,1.5,.4,1); }
.arcade-quiz .qz-ans.is-correct .qz-mark { display: grid; color: var(--qz-ok); }
.arcade-quiz .qz-ans.is-correct .qz-key { color: var(--qz-ok); }
.arcade-quiz .qz-ans.is-wrong { --c: var(--qz-bad); --ci: #fff; animation: qz-shake .45s ease-in-out; }
.arcade-quiz .qz-ans.is-wrong .qz-mark { display: grid; color: var(--qz-bad); }
.arcade-quiz .qz-ans.is-wrong .qz-key { color: var(--qz-bad); }
.arcade-quiz .qz-ans.is-dim { opacity: .4; transform: scale(.98); }

.arcade-quiz .qz-feedback { min-height: 42px; margin: 18px 0 0; text-align: center; }
.arcade-quiz .qz-fb { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 7px 16px 7px 8px; border: 2px solid var(--qz-ink); border-radius: 999px; background: #fff; color: var(--qz-ink); box-shadow: 0 3px 0 var(--qz-ink); font-weight: 700; font-size: .96rem; line-height: 1.3; text-align: left; animation: qz-in .25s ease-out both; }
.arcade-quiz .qz-fb svg { flex: none; width: 24px; height: 24px; padding: 4px; border-radius: 50%; color: #fff; }
.arcade-quiz .qz-fb.is-ok svg { background: var(--qz-ok); }
.arcade-quiz .qz-fb.is-bad svg { background: var(--qz-bad); }

/* ---------- Result ---------- */
.arcade-quiz .qz-kicker { margin: 0 0 10px; font-weight: 700; font-size: .9rem; opacity: .85; }
.arcade-quiz .qz-result { position: relative; width: 168px; height: 168px; border: 2px solid var(--qz-ink); border-radius: 50%; background: #fff; color: var(--qz-ink); box-shadow: 0 6px 0 var(--qz-ink); }
.arcade-quiz .qz-result svg { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); transform: rotate(-90deg); }
.arcade-quiz .qz-result circle { fill: none; stroke-width: 12; }
.arcade-quiz .qz-res-track { stroke: #EEE9FA; }
.arcade-quiz .qz-res-bar { stroke: var(--qz-ok); stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.3,.7,.3,1); }
.arcade-quiz .is-lose .qz-res-bar { stroke: var(--qz-bad); }
.arcade-quiz .qz-res-mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.arcade-quiz .qz-res-num { font: 800 3.1rem/1 var(--a-font-display); padding-top: 6px; }
.arcade-quiz .qz-res-num small { font-size: 1.5rem; color: #6E6688; }
.arcade-quiz .qz-res-mid span { font-size: .82rem; font-weight: 700; color: #6E6688; }
.arcade-quiz .qz-stars { display: flex; gap: 6px; margin: 16px 0 6px; }
.arcade-quiz .qz-star { width: 38px; height: 38px; }
.arcade-quiz .qz-star:nth-child(2) { transform: translateY(-8px); width: 46px; height: 46px; }
.arcade-quiz .qz-star svg { width: 100%; height: 100%; fill: var(--qz-line); }
.arcade-quiz .qz-star.on svg { fill: #FFC22E; animation: qz-star .5s cubic-bezier(.2,1.6,.4,1) both; animation-delay: var(--d, .3s); }
.arcade-quiz .qz-end-title { margin: 4px 0 6px; color: var(--a-fg); font-size: clamp(1.7rem, 4.6vw, 2.3rem); }
.arcade-quiz .qz-end-sub { max-width: 40ch; margin: 0 0 16px; font-weight: 600; opacity: .92; overflow-wrap: anywhere; }
.arcade-quiz .qz-recap { width: min(100%, 300px); margin: 0 0 22px; }
.arcade-quiz .qz-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.arcade-quiz .qz-go-sm { min-width: 170px; min-height: 54px; font-size: 1.15rem; }
.arcade-quiz .qz-ghost { min-height: 54px; border-color: var(--qz-ink); background: #fff; color: var(--qz-ink); box-shadow: 0 5px 0 var(--qz-ink); }
.arcade-quiz .qz-ghost:hover { box-shadow: 0 6px 0 var(--qz-ink); }

/* Dark theme: ink borders vanish into the background, add a light edge */
.arcade[data-theme="noir"] .arcade-quiz .qz-card,
.arcade[data-theme="noir"] .arcade-quiz .qz-result,
.arcade[data-theme="noir"] .arcade-quiz .qz-hero-q { box-shadow: 0 6px 0 #000, 0 0 0 2px rgba(246,235,208,.28); }
.arcade[data-theme="noir"] .arcade-quiz .qz-ans { box-shadow: 0 5px 0 #000, 0 0 0 1.5px rgba(246,235,208,.3), inset 0 0 0 2px rgba(255,255,255,.12); }
.arcade[data-theme="noir"] .arcade-quiz .qz-card { background: #FFFBF0; }

/* ---------- Phones ---------- */
@media (max-width: 560px) {
	.arcade-quiz .qz-answers, .arcade-quiz .qz-answers.is-two { grid-template-columns: 1fr; gap: 11px; }
	.arcade-quiz .qz-ans { min-height: 54px; font-size: .98rem; border-radius: 16px; }
	.arcade-quiz .qz-key { width: 34px; height: 34px; font-size: 1.05rem; border-radius: 10px; }
	.arcade-quiz .qz-card { padding: 38px 16px 20px; margin-bottom: 16px; }
	.arcade-quiz .qz-progress { margin-bottom: 40px; }
	.arcade-quiz .qz-feedback { min-height: 40px; margin-top: 14px; }
	.arcade-quiz .qz-fb { font-size: .92rem; }
	.arcade-quiz .qz-top { margin-bottom: 8px; }
	.arcade-quiz .qz-go { min-width: 200px; }
}

/* ---------- Animations ---------- */
@keyframes qz-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes qz-bob { 0%, 100% { transform: rotate(-6deg) translateY(0); } 50% { transform: rotate(-2deg) translateY(-6px); } }
@keyframes qz-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-9px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
@keyframes qz-pop { 0% { transform: scale(1); } 45% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes qz-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes qz-bump { 0% { transform: scale(1); } 40% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes qz-star { from { transform: scale(0) rotate(-40deg); } to { transform: none; } }
.arcade-quiz .qz.is-reduced *, .arcade-quiz .qz.is-reduced { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
	.arcade-quiz .qz *, .arcade-quiz .qz { animation: none !important; transition: none !important; }
}

/* ---------- Sample sets on the start screen ---------- */
.arcade-quiz .qz-sets { width: 100%; margin: 22px 0 0; padding-top: 16px; border-top: 2px dashed var(--qz-line); }
.arcade-quiz .qz-sets-h { margin: 0 0 10px; font-weight: 700; font-size: .92rem; opacity: .9; }
.arcade-quiz .qz-sets-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 8px; }
.arcade-quiz .qz-set { display: grid; gap: 2px; min-height: 48px; padding: 10px 12px; border: 2px solid var(--qz-line); border-radius: 14px; background: var(--qz-soft); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background .15s, border-color .15s; }
.arcade-quiz .qz-set:hover { border-color: var(--a-fg); }
.arcade-quiz .qz-set:focus-visible { outline: 3px solid var(--a-fg); outline-offset: 2px; }
.arcade-quiz .qz-set b { font-weight: 800; font-size: .95rem; line-height: 1.3; overflow-wrap: anywhere; }
.arcade-quiz .qz-set span { font-size: .82rem; line-height: 1.4; opacity: .85; overflow-wrap: anywhere; }
.arcade-quiz .qz-set:disabled { opacity: .5; cursor: not-allowed; }
.arcade-quiz .qz-top { flex-wrap: wrap; }
.arcade-quiz .qz-go, .arcade-quiz .qz-ghost { max-width: 100%; }
