/* Connection quiz: reuses the solver-practice shell and board. */
.quiz-entry .solver-entry-art{font-weight:800;color:#7a5cc4}
.quiz-shell.is-list{grid-template-rows:auto minmax(0,1fr)}
.quiz-reset{align-self:flex-start;font-size:.8rem}
.quiz-side{gap:10px}
.quiz-hint{margin:0;font-size:.8rem;line-height:1.45;color:var(--muted-foreground)}
.quiz-palette{grid-template-columns:repeat(5,minmax(0,1fr))}
.quiz-status.is-correct{border-color:#2e9d62;background:color-mix(in srgb,#2e9d62 12%,var(--surface))}
.quiz-status.is-wrong{border-color:#d0566a;background:color-mix(in srgb,#d0566a 10%,var(--surface))}
.quiz-result-actions{display:flex;flex-wrap:wrap;gap:7px}.quiz-result-actions .btn{min-height:42px}
#quiz .sp-board .sp-cell:not([aria-disabled=true]){cursor:crosshair}
@media(max-width:720px){
 .quiz-side{gap:6px}.quiz-hint{font-size:.72rem}
 .quiz-palette{grid-column:1/-1}.quiz-result-actions{grid-column:1/-1}.quiz-result-actions .btn{min-height:36px;font-size:.82rem;padding:5px 9px}
}

/* Solver practice hides its palette on small screens (it has a color dialog); the quiz has only this one. */
#quiz .sp-sidebar>.quiz-palette{display:grid}
@media(max-width:720px){#quiz .sp-sidebar>.quiz-palette{grid-template-columns:repeat(8,minmax(0,1fr));gap:4px}#quiz .quiz-palette .sp-color{min-height:34px;padding:2px}}
@media(max-height:520px){#quiz .sp-sidebar>.quiz-palette{display:grid;grid-column:1/-1;grid-template-columns:repeat(8,minmax(0,1fr))}}

/* Bridges: same wooden deck as the game board (effects.css), scoped to the quiz. */
#quiz .sp-cell.quiz-bridge-cell{overflow:visible}
#quiz .bridge-junction{position:absolute;inset:0;width:100%;height:100%;z-index:3;pointer-events:none;filter:drop-shadow(0 2px 2px #0008)}
#quiz .bridge-junction-outline,#quiz .bridge-junction-deck,#quiz .bridge-junction-planks{fill:none;stroke-linecap:round;stroke-linejoin:round}
#quiz .bridge-junction-outline{stroke:#63330f;stroke-width:25}
#quiz .bridge-junction-deck{stroke:#d6a15c;stroke-width:19}
#quiz .bridge-junction-planks{stroke:#95602c;stroke-width:2;stroke-linecap:butt}
#quiz .bridge-junction-hub{fill:#e3b46f;stroke:#955d28;stroke-width:1.5}
#quiz .bridge-colors{position:absolute;z-index:6;top:10%;left:50%;transform:translateX(-50%);padding:0 2px;border-radius:2px;background:#ffffffdd;color:#142132;font-size:clamp(6px,calc(var(--sp-cell,30px) * .24),11px);line-height:1.1;white-space:nowrap;pointer-events:none}

/* Daily puzzles and puzzles locked for guests */
.quiz-hint.is-error{color:var(--error,#c0392b)}
.quiz-lock{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;margin:0 0 8px;padding:10px 14px;border:1px dashed var(--panel-edge);border-radius:12px;font-size:.85rem}
.quiz-lock p{flex:1 1 220px;margin:0;line-height:1.45}.quiz-lock-actions{display:flex;gap:7px}.quiz-lock .btn{min-height:38px;font-size:.82rem}
@media(max-width:720px){#quiz .quiz-side>.quiz-hint{grid-column:1/-1}}

/* Stars for a solved puzzle */
.quiz-stars{display:grid;justify-items:center;gap:4px;grid-column:1/-1;text-align:center}
.quiz-star-line{display:flex;gap:6px;font-size:2.3rem;line-height:1.05}
.quiz-star{color:color-mix(in srgb,var(--muted-foreground) 30%,transparent)}
.quiz-star.is-on{color:light-dark(#f0a500,#ffcf4d);text-shadow:0 0 10px #ffc84088}
.quiz-star-line.is-new .quiz-star.is-on{animation:quiz-star-in .55s cubic-bezier(.3,1.7,.5,1) calc(var(--star-wait) + var(--i)*320ms) both}
@keyframes quiz-star-in{0%{color:color-mix(in srgb,var(--muted-foreground) 30%,transparent);text-shadow:none;transform:scale(.3) rotate(-70deg)}60%{transform:scale(1.35) rotate(8deg)}}
@media(max-width:720px){.quiz-star-line{font-size:1.8rem}}
@media(prefers-reduced-motion:reduce){.quiz-star-line.is-new .quiz-star.is-on{animation:none}}

/* PC: the puzzle and lab screens use the whole window. */
@media(min-width:900px){
 .sp-shell{max-width:none}
 .sp-body{grid-template-columns:minmax(0,1fr) clamp(285px,23vw,440px)}
 html:root[data-design] .pp{max-width:none}
}

/* Daily puzzle: the day, with an arrow to each side. */
.quiz-days{display:flex;align-items:center;gap:6px;margin-left:auto;min-width:0}
.quiz-day{display:grid;justify-items:center;min-width:104px;line-height:1.25}
.quiz-day strong{font-size:.95rem}.quiz-day span{font-size:.72rem;color:var(--muted-foreground);white-space:nowrap}
.quiz-day-arrow{font-size:1.5rem;line-height:1;font-weight:700}
.quiz-day-arrow:disabled{opacity:.3}
.quiz-daily-wait{display:grid;place-content:center;justify-items:center;gap:12px;min-height:0}
@media(max-width:720px){.quiz-days{gap:3px}.quiz-day{min-width:88px}.quiz-day strong{font-size:.82rem}.quiz-day span{font-size:.64rem}.quiz-days .sp-icon{min-width:34px;padding:2px}}
.quiz-day-next{font-variant-numeric:tabular-nums}
