/* Emoji fallback is explicit on Windows, Android and iOS. */
body,input,textarea,button{font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji"}
.quiz-md{min-width:0;max-width:100%;overflow-wrap:anywhere;color:inherit;font:inherit}
.quiz-md p{margin:0 0 .55em}.quiz-md p:last-child{margin-bottom:0}
.quiz-md ul,.quiz-md ol{margin:.45em 0 .65em;padding-left:1.45em;text-align:left}
.quiz-md li{margin:.2em 0}.quiz-md li:last-child{margin-bottom:0}
.quiz-md strong{font-weight:750}.quiz-md em{font-style:italic}
.quiz-md a{color:var(--primary,#1769aa);text-decoration:underline;text-underline-offset:.12em}
.quiz-md a:focus-visible{outline:2px solid var(--primary,#1769aa);outline-offset:2px;border-radius:2px}
.quiz-md code{font-family:Consolas,"Courier New",monospace;font-size:.9em;background:rgba(17,80,130,.1);border-radius:4px;padding:.08em .24em}
.quiz-md .quiz-md-code{box-sizing:border-box;max-width:100%;overflow-x:auto;margin:.6em 0;padding:.75em .9em;text-align:left;white-space:pre;background:#1e1e1e;color:#e6edf3;border:1px solid #4d6478;border-radius:8px;font-size:.82em;line-height:1.5}
.quiz-md .quiz-md-code:last-child{margin-bottom:0}.quiz-md .quiz-md-code code{display:block;width:max-content;min-width:100%;padding:0;background:none;color:inherit;font-size:1em}
.answer-body.quiz-md{white-space:normal}
.quiz-md-option{display:inline;min-width:0;overflow-wrap:anywhere;line-height:1.4}
.sp-answer-content,.sp-answer-text,.sp-matching-card .quiz-md,.sp-matching-left .quiz-md,.qd-match-cell .quiz-md{min-width:0;overflow-wrap:anywhere}
.sp-missing-text.quiz-md{text-align:left}.sp-missing-text.quiz-md .quiz-md-code .sp-missing-input-inline{color:#fff;background:#2b3e50;border-color:#75bfff}
@media(max-width:480px){.quiz-md-question .quiz-md-code{font-size:.75em}.quiz-md-option{font-size:inherit}}
.code-editor{position:relative;width:100%;min-width:0}.code-editor-highlight{display:none}
.code-editor.is-code{background:#1e1e1e;border-radius:8px;overflow:hidden;color:#d4d4d4}
.code-editor.is-code textarea.q-missing-text,.code-editor-highlight{font:15px/1.6 Consolas,"Courier New",monospace;letter-spacing:normal;tab-size:4;padding:14px;border:1px solid transparent;box-sizing:border-box;margin:0;width:100%;white-space:pre;text-align:left;min-height:210px}
.code-editor.is-code textarea.q-missing-text{position:relative;display:block;background:transparent;color:transparent;caret-color:#fff;-webkit-text-fill-color:transparent;resize:vertical;overflow:auto;outline-offset:-2px}
.code-editor.is-code textarea::selection{background:#264f78;color:transparent}
.code-editor.is-code .code-editor-highlight{display:block;position:absolute;inset:0;overflow:hidden;pointer-events:none;background:transparent}
.code-editor-highlight code{display:block;font:inherit;white-space:pre;width:max-content;min-width:100%;transform-origin:top left}
.code-editor-help{display:block;color:var(--text-muted);margin:.4rem 0}
.syntax-keyword{color:#569cd6}.syntax-string{color:#ce9178}.syntax-comment{color:#6a9955}.syntax-number{color:#b5cea8}.syntax-call{color:#dcdcaa}.syntax-blank{color:#ffd866;background:#493c13;border-radius:3px}
.sp-question-code[data-code],.qd-question-code[data-code]{background:#1e1e1e;color:#d4d4d4;tab-size:4;white-space:pre-wrap;overflow-wrap:anywhere;font-family:Consolas,"Courier New",monospace}
[data-code] .sp-missing-input-inline{color:#fff;background:#2b3e50;border-color:#75bfff;min-width:70px}
.sp-matching-card{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;min-height:44px}
.sp-matching-card img{pointer-events:none;-webkit-user-drag:none}.sp-matching-slot{touch-action:manipulation;min-height:44px!important}
.matching-drag-ghost{position:fixed;pointer-events:none!important;z-index:20000;opacity:.9;box-shadow:0 8px 25px #1235;background:#eef8ff;transform:translate(-50%,-50%);max-width:180px}
.poll-chart{padding:1.2rem;margin:1rem 0}.poll-chart h2,.poll-chart h3{font-size:1.15rem;overflow-wrap:anywhere}.poll-chart p{color:var(--text-secondary);margin:.5rem 0 1rem}.poll-option{margin:.9rem 0}.poll-label{display:flex;align-items:center;gap:.6rem;margin-bottom:.35rem}.poll-label span{flex:1;min-width:0;overflow-wrap:anywhere}.poll-label strong{white-space:nowrap}.poll-label img{width:48px;height:48px;object-fit:contain}.poll-track{height:14px;border-radius:20px;background:#d5e8f8;overflow:hidden}.poll-fill{height:100%;background:linear-gradient(90deg,#2789db,#36c9c7);border-radius:20px;transition:width .3s}
.podium-celebration[hidden]{display:none}.podium-celebration{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:1rem;background:linear-gradient(150deg,#0b2240,#164b76);color:white;overflow:auto}
.podium-content{position:relative;text-align:center;max-width:850px;width:100%;z-index:1}.podium-content h2{font-size:clamp(1.5rem,5vw,2.4rem);margin:.5rem 0 1.5rem}.podium-eyebrow{color:#86dcff}.podium-content>p:last-child{font-size:.85rem;margin-top:.75rem;color:#b6d7ee}
.podium-places{display:flex;align-items:end;justify-content:center;gap:12px;margin:1rem 0 2rem}.podium-place{flex:1;min-width:0;max-width:250px;animation:podium-rise .7s ease-out both}.podium-place-1{animation-delay:.12s}.podium-place-3{animation-delay:.24s}.podium-students{display:grid;gap:.65rem;padding:.5rem;max-height:45vh;overflow:auto}.podium-student{display:grid;gap:.2rem;overflow-wrap:anywhere;font-weight:600;font-size:.95rem}.podium-student small{color:#c3e1f6}.podium-person{font-size:clamp(2rem,8vw,3.5rem)}
.podium-step{height:110px;background:#b8cadd;color:#15314f;border-radius:12px 12px 0 0;display:grid;place-content:center;gap:.25rem;box-shadow:inset 0 4px 0 #fff5}.podium-place-1 .podium-step{height:155px;background:#ffd166}.podium-place-3 .podium-step{height:80px;background:#d59a6c}.podium-step span{font-size:2rem}.podium-step strong{font-size:2rem}
.confetti{position:fixed;inset:0;pointer-events:none;overflow:hidden}.confetti i{position:absolute;top:-20px;width:9px;height:16px;animation:confetti-fall var(--duration) var(--delay) linear both}
@keyframes confetti-fall{to{transform:translateY(110vh) rotate(700deg)}}@keyframes podium-rise{from{opacity:0;transform:translateY(35px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:480px){.podium-places{gap:6px}.podium-student{font-size:.8rem}.podium-students{padding:.2rem}.podium-step{height:90px}.podium-place-1 .podium-step{height:125px}.podium-place-3 .podium-step{height:65px}}
@media(prefers-reduced-motion:reduce){.podium-celebration,.confetti{display:none}.poll-fill{transition:none}}
.export-menu{position:relative;display:inline-block;text-align:left}.export-trigger{list-style:none;cursor:pointer;gap:.55rem;min-height:46px;padding:.7rem 1.1rem;border:1px solid var(--quiz-control-border);background:var(--quiz-surface);color:var(--quiz-primary);border-radius:12px;font-weight:700}.export-trigger::-webkit-details-marker{display:none}.export-chevron{margin-left:.25rem;transition:transform .15s}.export-menu[open] .export-chevron{transform:rotate(180deg)}.export-options{position:absolute;top:calc(100% + .5rem);left:0;z-index:100;min-width:240px;max-width:calc(100vw - 2rem);padding:.4rem;background:var(--quiz-surface);border:1px solid var(--quiz-border);border-radius:14px;box-shadow:0 12px 30px #1233;display:grid}.export-options a{display:grid;gap:.15rem;padding:.75rem;border-radius:9px;color:var(--quiz-text);text-decoration:none}.export-options a:hover,.export-options a:focus-visible{background:var(--quiz-selected);outline:2px solid var(--quiz-focus)}.export-options small{font-size:.78rem;color:var(--quiz-muted)}.hs-table .export-options{position:static;min-width:180px;margin-top:.5rem;box-shadow:none}.history-detail-link{display:grid;gap:.25rem;color:var(--text-primary);font-weight:600;text-decoration:none}.history-detail-link small{color:var(--primary);font-size:.8rem}.history-detail-link:hover{text-decoration:underline}.history-date{text-align:center;margin-bottom:1rem;color:var(--text-secondary)}.legacy-notice{padding:1rem;line-height:1.5}.sr-actions{display:flex;gap:.7rem;flex-wrap:wrap;justify-content:center}
.result-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem;margin:1rem 0}.result-stats span{border:1px solid #b9d9ed;background:#edf7ff;padding:.7rem;border-radius:10px}.result-stats strong{float:right}
.answer-review{border:1px solid #bad8ed;background:#f8fcff;border-radius:14px;padding:1rem;margin:1rem 0;color:#19324a;min-width:0}.answer-review-header{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;margin-bottom:.85rem}.answer-review-header .answer-question{font-size:1rem;line-height:1.5;flex:1;min-width:120px;overflow-wrap:anywhere;font-weight:600}.answer-number{background:#dfedff;border-radius:8px;padding:.3rem .6rem;font-weight:700}.answer-status{font-size:.8rem;border-radius:20px;padding:.3rem .6rem;background:#e3edf4}.answer-status-correct .answer-status{background:#d9f5e7;color:#126943}.answer-status-incorrect .answer-status{background:#ffdfde;color:#a32a27}.answer-status-partial .answer-status,.answer-status-pending .answer-status{background:#fff0cc;color:#865300}.answer-points{font-size:.9rem;white-space:nowrap}.answer-comparison{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}.answer-comparison>section{min-width:0;background:#edf5fb;border-radius:10px;padding:.8rem}.answer-comparison h4{font-size:.78rem;color:#577086;margin:0 0 .5rem}.answer-value,.answer-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;font:inherit;margin:.3rem 0}.answer-value[data-code]{background:#1e1e1e;color:#d4d4d4;padding:.6rem;border-radius:8px;font-family:Consolas,monospace}.answer-review-image{display:block;max-width:100%;max-height:180px;object-fit:contain;margin:.5rem 0;border-radius:8px}.answer-muted{color:#64778a}.student-answer-card{border-top:1px solid #c5ddea;padding:1rem 0}.student-answer-name{display:block;font-size:1.05rem;overflow-wrap:anywhere;color:var(--text-primary)}.student-answer-card .answer-review{margin-top:.5rem}.answer-review-tools{display:flex;flex-wrap:wrap;gap:.75rem;margin:1rem 0}.answer-review-tools label{flex:1;min-width:170px;font-size:.85rem}.answer-review-tools input,.answer-review-tools select{margin-top:.4rem}.grade-actions{display:flex;gap:.6rem;flex-wrap:wrap}.student-answer-card[hidden],.tr-text-answer-group[hidden]{display:none}
@media(max-width:600px){.answer-comparison{grid-template-columns:1fr}.answer-review{padding:.75rem}.answer-review-header .answer-question{flex-basis:75%}.export-options{min-width:210px}.tr-td-user{white-space:normal!important;overflow-wrap:anywhere;min-width:130px}}

/* Shared matching layout for individual and classroom play. */
.sp-matching-board {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 1rem;
    width: 100%;
    margin: 0 auto 1.5rem;
}
.sp-matching-column, .sp-matching-bank {
    display: grid;
    gap: .7rem;
    align-content: start;
    min-width: 0;
}
.sp-matching-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem;
    align-items: stretch;
    min-width: 0;
}
.sp-matching-left, .sp-matching-slot, .sp-matching-card {
    min-width: 0;
    border-radius: 10px;
    border: 1px solid #b8d9ed;
    padding: .75rem;
    color: var(--text-primary);
    background: #f7fbff;
    font: inherit;
    line-height: 1.45;
    text-align: left;
    overflow-wrap: anywhere;
}
.sp-matching-left, .sp-matching-card {
    display: grid;
    gap: .45rem;
    align-content: center;
}
.sp-matching-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
    border-radius: 8px;
    justify-self: center;
}
.sp-matching-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-style: dashed;
    color: var(--text-muted);
}
.sp-matching-slot:has(.sp-matching-card) { padding: 0; border: 0; }
.sp-matching-slot .sp-matching-card { width: 100%; min-height: 100%; }
.sp-matching-slot.is-over, .sp-matching-slot:focus-visible,
.sp-matching-card.is-selected, .sp-matching-card:focus-visible {
    outline: 3px solid #7ec3ef;
    outline-offset: 2px;
    background: #e2f2ff;
}
.sp-matching-card { cursor: grab; font-weight: 700; }
.sp-matching-card:active { cursor: grabbing; }
.sp-matching-board .quiz-md code {
    display: inline-block;
    max-width: 100%;
    white-space: pre;
    overflow-x: auto;
    vertical-align: middle;
}
@media (max-width: 600px) {
    .sp-matching-board { grid-template-columns: minmax(0, 1fr); gap: .85rem; }
    .sp-matching-bank { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sp-matching-left, .sp-matching-slot, .sp-matching-card { padding: .6rem; font-size: .9rem; }
}
@media (max-width: 400px) {
    .sp-matching-row { grid-template-columns: minmax(0, 1fr); gap: .4rem; }
    .sp-matching-column { gap: 1rem; }
}
.player-chip { max-width: 100%; }
.player-chip > span { min-width: 0; overflow-wrap: anywhere; }
.player-remove-control { flex-shrink: 0; }
