@font-face {
    font-family: "Futura";
    src: url("../assets/fonts/Futura-Medium.ttf") format("truetype");
    font-weight: 300 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Futura";
    src: url("../assets/fonts/Futura-MediumItalic.ttf") format("truetype");
    font-weight: 300 600;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Futura";
    src: url("../assets/fonts/Futura-Bold.ttf") format("truetype");
    font-weight: 700 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --alarm-red: #9d3331;
    --alarm-red-bright: #bd4541;
    --dark-teal: #1d3944;
    --deep-blue: #0f2027;
    --ink: #081116;
    --paper: #ffffff;
    --mist: #c5c6c7;
    --line: rgba(197, 198, 199, 0.2);
    --panel: rgba(10, 22, 28, 0.9);
    --panel-solid: #10242c;
    --success: #69a58f;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.46);
    --content: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--ink);
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--paper);
    background:
        linear-gradient(90deg, rgba(8, 17, 22, 0.96) 0%, rgba(8, 17, 22, 0.74) 48%, rgba(8, 17, 22, 0.9) 100%),
        url("../assets/images/frame_03922.png") center 34% / cover fixed;
    font-family: "Futura", sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    letter-spacing: 0.02em;
}

button,
input {
    font: inherit;
}

button,
a,
input {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 100;
    padding: 0.65rem 0.9rem;
    color: #fff;
    background: var(--alarm-red);
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

#app {
    min-height: 100vh;
}

.loading-shell {
    min-height: 100vh;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 1.5rem;
    color: var(--mist);
}

.loading-shell img {
    width: min(52vw, 360px);
    filter: brightness(0) saturate(100%) invert(25%) sepia(95%) saturate(1520%) hue-rotate(338deg) brightness(85%) contrast(94%);
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem clamp(1rem, 3vw, 2.4rem);
    border-bottom: 1px solid rgba(157, 51, 49, 0.75);
    background: rgba(15, 32, 39, 0.95);
    backdrop-filter: blur(12px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.brand img {
    width: clamp(130px, 18vw, 210px);
    max-height: 44px;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(25%) sepia(95%) saturate(1520%) hue-rotate(338deg) brightness(85%) contrast(94%);
}

.brand-label,
.eyebrow,
.meta-label {
    color: var(--mist);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.locale-switch {
    display: inline-flex;
    padding: 0.2rem;
    border: 1px solid rgba(157, 51, 49, 0.55);
    border-radius: 999px;
    background: rgba(8, 17, 22, 0.55);
}

.locale-switch button {
    min-width: 2.7rem;
    min-height: 2.25rem;
    border: 0;
    border-radius: 999px;
    color: var(--mist);
    background: transparent;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.locale-switch button[aria-pressed="true"] {
    color: #fff;
    background: var(--alarm-red);
}

.page-content {
    width: min(100% - 2rem, var(--content));
    margin: auto;
    padding: clamp(2rem, 6vw, 5.5rem) 0;
}

.welcome-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}

.welcome-copy h1,
.stage-title,
.join-title {
    max-width: 850px;
    margin: 0.45rem 0 1rem;
    color: #fff;
    font-size: clamp(2.3rem, 5vw, 4.4rem);
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.1;
}

.welcome-copy h1 span,
.stage-title span {
    color: var(--alarm-red-bright);
}

.lead {
    max-width: 680px;
    margin: 0;
    color: var(--mist);
    font-size: clamp(1.08rem, 1.4vw, 1.32rem);
    line-height: 1.65;
}

.promise-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem 1.2rem;
    margin-top: 1.8rem;
    color: #fff;
}

.promise {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.promise::before {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--alarm-red-bright);
    box-shadow: 0 0 0 5px rgba(157, 51, 49, 0.14);
}

.panel {
    border: 1px solid rgba(157, 51, 49, 0.58);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.start-panel,
.join-panel {
    padding: clamp(1.35rem, 3vw, 2.2rem);
}

.tab-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    margin-bottom: 1.6rem;
    padding: 0.3rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.035);
}

.display-code-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 0.85rem;
}

.display-code-grid label {
    display: grid;
    gap: 0.45rem;
}

.display-pair-input {
    letter-spacing: 0.14em;
}

.tab-button {
    min-height: 2.9rem;
    border: 0;
    color: var(--mist);
    background: transparent;
    cursor: pointer;
    font-weight: 600;
}

.tab-button[aria-selected="true"] {
    color: #fff;
    background: var(--alarm-red);
}

.field-label {
    display: block;
    margin-bottom: 0.55rem;
    color: #fff;
    font-weight: 600;
}

.code-input {
    width: 100%;
    min-height: 4rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(197, 198, 199, 0.38);
    border-radius: 0;
    outline: 0;
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-align: center;
    text-transform: uppercase;
}

.code-input:focus {
    border-color: var(--alarm-red-bright);
    box-shadow: 0 0 0 3px rgba(157, 51, 49, 0.22);
}

.mode-list {
    display: grid;
    gap: 0.85rem;
}

.mode-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem;
    align-items: start;
    padding: 1.05rem;
    border: 1px solid var(--line);
    color: var(--mist);
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
}

.mode-card:hover,
.mode-card:has(input:focus-visible),
.mode-card:has(input:checked) {
    border-color: var(--alarm-red-bright);
    background: rgba(157, 51, 49, 0.12);
}

.mode-card input {
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.22rem;
    accent-color: var(--alarm-red-bright);
}

.mode-card strong {
    display: block;
    margin-bottom: 0.2rem;
    color: #fff;
    font-size: 1.05rem;
}

.recommendation {
    display: inline-block;
    margin-left: 0.45rem;
    padding: 0.18rem 0.42rem;
    color: #fff;
    background: var(--alarm-red);
    font-size: 0.68rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    vertical-align: middle;
}

.curriculum-note {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border-left: 3px solid var(--alarm-red-bright);
    background: rgba(255, 255, 255, 0.035);
}

.curriculum-note .eyebrow {
    margin: 0 0 0.8rem;
}

.curriculum-grid {
    display: grid;
    gap: 0.8rem;
    margin: 0;
}

.curriculum-grid div {
    display: grid;
    gap: 0.25rem;
}

.curriculum-grid dt {
    color: #fff;
    font-weight: 600;
}

.curriculum-grid dd {
    margin: 0;
    color: var(--mist);
    font-size: 0.9rem;
    line-height: 1.6;
}

.privacy-note,
.helper,
.error-message {
    margin: 0.85rem 0 0;
    color: var(--mist);
    font-size: 0.9rem;
}

.error-message {
    color: #ffaaa7;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.3rem;
}

.button {
    min-height: 3.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.72rem 1.15rem;
    border: 1px solid var(--alarm-red);
    color: #fff;
    background: var(--alarm-red);
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: transform 0.16s, background 0.16s, color 0.16s;
}

.button:hover:not(:disabled),
.button:focus-visible:not(:disabled) {
    color: var(--deep-blue);
    background: #fff;
    outline: 0;
    transform: translateY(-1px);
}

.button.secondary {
    border-color: rgba(197, 198, 199, 0.45);
    color: #fff;
    background: rgba(255, 255, 255, 0.055);
}

.button.ghost {
    border-color: transparent;
    color: var(--mist);
    background: transparent;
}

.button:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.lesson-page {
    background: rgba(5, 12, 16, 0.18);
}

.controller-page {
    background:
        linear-gradient(rgba(8, 17, 22, 0.91), rgba(8, 17, 22, 0.98)),
        url("../assets/images/frame_16381.png") 65% center / cover fixed;
}

.controller-layout {
    width: min(100% - 1.5rem, 980px);
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 1rem;
    align-items: start;
    margin: 1rem auto;
}

.controller-card {
    padding: clamp(1.1rem, 3vw, 1.8rem);
}

.controller-title {
    max-width: 640px;
    margin: 0.35rem 0 0;
    color: #fff;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 500;
    line-height: 1.12;
}

.controller-instruction {
    margin: 0 0 1rem;
    padding: 1rem 1.1rem;
    border-left: 3px solid var(--alarm-red-bright);
    background: rgba(157, 51, 49, 0.12);
}

.controller-instruction p {
    margin: 0;
}

.controller-instruction p:last-child {
    color: #fff;
    font-size: 1.08rem;
    line-height: 1.55;
}

.screen-preview {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.9rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.screen-preview p,
.screen-preview span {
    margin: 0;
}

.screen-preview strong {
    color: #fff;
}

.screen-preview span {
    color: var(--mist);
    line-height: 1.5;
}

.teacher-say {
    margin-top: 0.9rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(157, 51, 49, 0.45);
    background: rgba(157, 51, 49, 0.08);
}

.teacher-say p,
.teacher-say blockquote {
    margin: 0;
}

.teacher-say blockquote {
    color: #fff;
    font-size: 1.08rem;
    line-height: 1.5;
}

.pairing-card {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid rgba(189, 69, 65, 0.8);
    background: rgba(8, 17, 22, 0.66);
}

.pairing-card p {
    margin: 0;
}

.pairing-codes {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 0.75rem;
}

.pairing-codes > div {
    display: grid;
    gap: 0.1rem;
    padding: 0.75rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.035);
}

.pairing-codes strong {
    color: var(--alarm-red-bright);
    font-size: clamp(1.3rem, 5vw, 1.85rem);
    letter-spacing: 0.13em;
}

.display-state {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--mist);
    font-size: 0.9rem;
}

.display-state.ready span {
    color: var(--success);
}

.controller-alert,
.results-hidden {
    margin: 0.9rem 0 0;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(105, 165, 143, 0.45);
    color: #fff;
    background: rgba(105, 165, 143, 0.08);
}

.fallback-note {
    margin-top: 0.8rem;
    color: var(--mist);
    font-size: 0.9rem;
}

.fallback-note summary {
    cursor: pointer;
}

.fallback-note p {
    margin: 0.45rem 0 0;
}

.sessionbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 1.2rem;
    align-items: center;
    padding: 0.9rem clamp(1rem, 2.5vw, 2rem);
    border-bottom: 1px solid var(--line);
    background: rgba(8, 17, 22, 0.9);
}

.session-meta {
    min-width: 0;
}

.session-meta strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.room-code {
    display: inline-flex;
    align-items: baseline;
    gap: 0.7rem;
    color: #fff;
}

.room-code strong {
    color: var(--alarm-red-bright);
    font-size: clamp(1.35rem, 2.3vw, 2rem);
    letter-spacing: 0.18em;
}

.clock {
    min-width: 7.2rem;
    text-align: right;
}

.clock strong {
    display: block;
    font-variant-numeric: tabular-nums;
    font-size: 1.25rem;
}

.lesson-layout {
    width: min(100% - 2rem, 1380px);
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 1.2rem;
    margin: 1.2rem auto;
}

.stage {
    min-height: min(720px, calc(100vh - 150px));
    display: flex;
    flex-direction: column;
    padding: clamp(1.25rem, 3vw, 2.4rem);
}

.stage-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stage-number {
    flex: 0 0 auto;
    color: var(--alarm-red-bright);
    font-size: clamp(2.2rem, 5vw, 4.3rem);
    font-weight: 500;
    line-height: 1;
}

.stage-title {
    font-size: clamp(2rem, 4vw, 3.6rem);
}

.stage-copy {
    max-width: 780px;
    margin: 0 0 1.25rem;
    color: var(--mist);
    font-size: clamp(1.02rem, 1.3vw, 1.25rem);
}

.stage-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.film-wrap {
    width: min(100%, 1040px);
    margin: 0 auto;
}

.film-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 2px solid var(--alarm-red);
    background:
        linear-gradient(rgba(8, 17, 22, 0.35), rgba(8, 17, 22, 0.75)),
        var(--film-still, url("../assets/images/frame_08350.png")) center / cover;
    box-shadow: var(--shadow);
}

.film-frame video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.film-launch {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 0.85rem;
    padding: 2rem;
    text-align: center;
    background: rgba(8, 17, 22, 0.3);
}

.film-launch.hidden {
    display: none;
}

.play-button {
    width: 5rem;
    height: 5rem;
    border: 1px solid var(--alarm-red-bright);
    border-radius: 50%;
    color: #fff;
    background: rgba(157, 51, 49, 0.9);
    cursor: pointer;
    font-size: 1.8rem;
}

.film-caption {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.75rem;
    color: var(--mist);
}

.film-caption span {
    display: block;
}

.film-caption span + span {
    margin-top: 0.25rem;
}

.question-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1.2rem;
}

.answer-option {
    min-height: 5.5rem;
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    gap: 0.8rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid rgba(197, 198, 199, 0.3);
    color: #fff;
    background: rgba(255, 255, 255, 0.035);
    cursor: pointer;
    text-align: left;
}

.answer-option:hover,
.answer-option:focus-visible,
.answer-option.selected {
    border-color: var(--alarm-red-bright);
    background: rgba(157, 51, 49, 0.16);
    outline: 0;
}

.display-page .answer-option {
    cursor: default;
}

.display-page .answer-option:hover {
    border-color: rgba(197, 198, 199, 0.3);
    background: rgba(255, 255, 255, 0.035);
}

.answer-letter {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border: 1px solid var(--alarm-red);
    color: #fff;
    font-weight: 700;
}

.response-state {
    margin-top: 1.2rem;
    color: var(--mist);
}

.response-state strong {
    color: #fff;
}

.result-list {
    display: grid;
    gap: 0.9rem;
    margin-top: 1.2rem;
}

.result-row {
    display: grid;
    grid-template-columns: minmax(150px, 0.8fr) minmax(160px, 1.5fr) 4.5rem;
    gap: 1rem;
    align-items: center;
}

.result-label {
    color: #fff;
}

.result-track {
    width: 100%;
    height: 1.3rem;
    overflow: hidden;
    border: 0;
    appearance: none;
    background: rgba(255, 255, 255, 0.08);
}

.result-track::-webkit-progress-bar {
    background: rgba(255, 255, 255, 0.08);
}

.result-track::-webkit-progress-value {
    background: linear-gradient(90deg, var(--alarm-red), var(--alarm-red-bright));
}

.result-track::-moz-progress-bar {
    background: linear-gradient(90deg, var(--alarm-red), var(--alarm-red-bright));
}

.result-fill {
    display: block;
    min-width: 2px;
    height: 100%;
    background: linear-gradient(90deg, var(--alarm-red), var(--alarm-red-bright));
    transition: width 0.45s ease;
}

/* Eén les, drie strikt gescheiden schermen */
.compact-content {
    width: min(100% - 2rem, 760px);
}

.join-title span {
    color: var(--alarm-red-bright);
}

.join-form {
    display: grid;
    gap: 0.85rem;
    margin-top: 1.7rem;
}

.full-button,
.full-span {
    width: 100%;
    grid-column: 1 / -1;
}

.secure-badge {
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(105, 165, 143, 0.55);
    color: #bfe2d4;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.setup-list {
    display: grid;
    gap: 0.75rem;
    margin: 1.6rem 0;
}

.setup-list div {
    display: grid;
    grid-template-columns: 2.4rem 1fr;
    gap: 0.8rem;
    align-items: center;
}

.setup-list strong {
    width: 2.4rem;
    height: 2.4rem;
    display: grid;
    place-items: center;
    border: 1px solid var(--alarm-red-bright);
    color: #fff;
}

.controller-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem 1.6rem;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--line);
    color: var(--mist);
    background: rgba(8, 17, 22, 0.88);
    font-size: 0.85rem;
}

.controller-status strong {
    color: #fff;
}

.progress-line {
    width: 100%;
    height: 0.3rem;
    display: block;
    margin: -0.2rem 0 1.4rem;
    overflow: hidden;
    border: 0;
    appearance: none;
    background: rgba(255, 255, 255, 0.08);
}

.progress-line::-webkit-progress-bar {
    background: rgba(255, 255, 255, 0.08);
}

.progress-line::-webkit-progress-value {
    background: var(--alarm-red-bright);
}

.progress-line::-moz-progress-bar {
    background: var(--alarm-red-bright);
}

.session-step {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
}

.teacher-question {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.35rem 1rem;
    align-items: center;
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(105, 165, 143, 0.38);
    background: rgba(105, 165, 143, 0.06);
}

.teacher-question .meta-label {
    grid-column: 1 / -1;
}

.teacher-question p,
.teacher-question span {
    margin: 0;
}

.teacher-question span {
    color: var(--mist);
    white-space: nowrap;
}

.teacher-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
}

.teacher-footer .button:last-child {
    justify-self: end;
}

.teacher-footer > span {
    color: var(--mist);
    font-size: 0.85rem;
}

.pairing-card.paired {
    border-color: rgba(105, 165, 143, 0.55);
}

.legal-note {
    padding: 1rem;
    border-left: 3px solid var(--alarm-red-bright);
    color: var(--mist);
    background: rgba(255, 255, 255, 0.035);
    font-size: 0.9rem;
    line-height: 1.55;
}

.legal-note p {
    margin: 0;
}

.legal-note .meta-label {
    margin-bottom: 0.45rem;
}

.student-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--mist);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.question-block {
    margin-top: 1.3rem;
}

.question-block h2 {
    max-width: 920px;
    margin: 0;
    color: #fff;
    font-size: clamp(1.35rem, 2.5vw, 2.25rem);
    font-weight: 500;
    line-height: 1.25;
}

.question-prompt {
    margin: 0.55rem 0 0;
    color: var(--mist);
}

.role-card {
    padding: 1.1rem;
    border: 1px solid rgba(189, 69, 65, 0.55);
    border-left: 3px solid var(--alarm-red-bright);
    color: var(--mist);
    background: rgba(157, 51, 49, 0.08);
}

.role-card h2,
.role-card p {
    margin: 0;
}

.role-card h2 {
    margin: 0.25rem 0 0.5rem;
    color: #fff;
    font-size: 1.25rem;
    line-height: 1.25;
}

.role-card.compact {
    margin: 1.1rem 0;
    padding: 0.85rem 1rem;
}

.phone-cue {
    margin: 1.2rem 0 0;
    color: #fff;
}

.look-up {
    display: grid;
    justify-items: center;
    gap: 0.25rem;
    margin: 1.6rem 0 0.4rem;
    padding: 1.6rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.035);
    text-align: center;
}

.look-up > span {
    color: var(--alarm-red-bright);
    font-size: 3.8rem;
    line-height: 0.9;
}

.look-up strong {
    color: #fff;
    font-size: 1.4rem;
}

.look-up p {
    margin: 0;
    color: var(--mist);
}

.connection-status span {
    color: var(--success);
}

.display-stage {
    width: min(100% - 2rem, 1380px);
    min-height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
    margin: 1.2rem auto;
    padding: clamp(1.25rem, 3vw, 2.4rem);
}

.display-stage .stage-body {
    justify-content: flex-start;
}

.display-question {
    max-width: 1120px;
    margin-inline: auto;
}

.lobby-codes {
    max-width: 920px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.2rem 2rem;
    align-items: end;
    margin: 1rem auto 2rem;
    padding: clamp(1.2rem, 3vw, 2rem);
    border: 1px solid rgba(189, 69, 65, 0.65);
    background: rgba(157, 51, 49, 0.08);
}

.lobby-codes > strong {
    color: #fff;
    font-size: clamp(1.2rem, 2.6vw, 2.1rem);
    overflow-wrap: anywhere;
}

.lobby-codes > span {
    color: var(--mist);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.lobby-codes > b {
    grid-column: 2;
    grid-row: 1 / span 2;
    color: var(--alarm-red-bright);
    font-size: clamp(2.4rem, 7vw, 5.4rem);
    font-weight: 500;
    letter-spacing: 0.16em;
    line-height: 1;
}

.lesson-promise {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem 1rem;
    color: #fff;
    font-size: clamp(1rem, 2vw, 1.4rem);
}

.lesson-promise i {
    color: var(--alarm-red-bright);
    font-style: normal;
}

.case-card {
    max-width: 920px;
    margin: 0 auto 1rem;
    padding: 1rem 1.2rem;
    border-left: 4px solid var(--alarm-red-bright);
    background: rgba(157, 51, 49, 0.12);
}

.case-card p {
    margin: 0;
}

.case-card p:last-child {
    color: #fff;
    font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.legal-clarifier {
    margin: 1rem 0 0;
    padding: 0.8rem 1rem;
    color: var(--mist);
    background: rgba(255, 255, 255, 0.035);
}

.legal-clarifier strong {
    color: #fff;
}

.rule-card.prominent {
    border-color: rgba(189, 69, 65, 0.7);
    border-left: 4px solid var(--alarm-red-bright);
}

.rule-card.prominent > span {
    width: auto;
    height: auto;
    display: block;
    margin-top: 0.75rem;
    border: 0;
    color: var(--mist);
    font-size: 0.8rem;
    text-transform: none;
}

.hearing-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.hearing-grid section {
    position: relative;
    display: grid;
    gap: 0.6rem;
    min-height: 10rem;
    padding: 1.1rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.035);
}

.hearing-grid strong {
    color: #fff;
    font-size: 1.1rem;
}

.hearing-grid span {
    color: var(--mist);
}

.hearing-grid time {
    align-self: end;
    color: var(--alarm-red-bright);
    font-weight: 700;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.takeaway-card {
    margin-top: 1rem;
    padding: clamp(1.1rem, 3vw, 1.7rem);
    border: 1px solid rgba(105, 165, 143, 0.55);
    color: #fff;
    background: rgba(105, 165, 143, 0.08);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.takeaway-card p {
    margin: 0;
}

.result-value {
    color: var(--mist);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.compare-card {
    padding: 1.1rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.025);
}

.discussion-card,
.exit-card {
    max-width: 880px;
    padding: clamp(1.3rem, 3vw, 2.2rem);
    border-left: 3px solid var(--alarm-red-bright);
    background: rgba(255, 255, 255, 0.04);
}

.discussion-card blockquote {
    margin: 0.9rem 0 0;
    color: #fff;
    font-size: clamp(1.25rem, 2.2vw, 1.8rem);
    line-height: 1.4;
}

.composite-step {
    display: grid;
    gap: 1.15rem;
}

.composite-step .discussion-card {
    max-width: none;
    padding: 1rem 1.2rem;
}

.rule-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.rule-explanation > .meta-label {
    display: block;
    margin: 0 0 0.7rem;
}

.rule-card {
    display: grid;
    grid-template-columns: 2.15rem 1fr;
    gap: 0.8rem;
    align-items: start;
    padding: 1rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.035);
}

.rule-card > span {
    display: grid;
    width: 2.15rem;
    height: 2.15rem;
    place-items: center;
    border: 1px solid var(--alarm-red-bright);
    color: #fff;
    font-weight: 700;
}

.rule-card p {
    margin: 0.25rem 0 0;
    color: #fff;
    line-height: 1.45;
}

.sentence-starter {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid rgba(157, 51, 49, 0.5);
    color: #fff;
    background: rgba(157, 51, 49, 0.09);
    font-size: clamp(1.05rem, 1.8vw, 1.35rem);
}

.stage-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.teacher-controls {
    display: flex;
    gap: 0.65rem;
}

.participants {
    color: var(--mist);
}

.participants strong {
    color: #fff;
}

.timeline {
    align-self: stretch;
    padding: 1.25rem;
}

.timeline h2 {
    margin: 0 0 1rem;
    color: #fff;
    font-size: 1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.timeline-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 1.4rem 1fr;
    gap: 0.7rem;
    min-height: 3.25rem;
    color: rgba(197, 198, 199, 0.55);
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 0.42rem;
    top: 1.1rem;
    bottom: -0.25rem;
    width: 1px;
    background: var(--line);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-dot {
    position: relative;
    z-index: 1;
    width: 0.85rem;
    height: 0.85rem;
    margin-top: 0.2rem;
    border: 2px solid rgba(197, 198, 199, 0.35);
    border-radius: 50%;
    background: var(--panel-solid);
}

.timeline-item.done,
.timeline-item.current {
    color: #fff;
}

.timeline-item.done .timeline-dot {
    border-color: var(--success);
    background: var(--success);
}

.timeline-item.current .timeline-dot {
    border-color: var(--alarm-red-bright);
    background: var(--alarm-red-bright);
    box-shadow: 0 0 0 5px rgba(157, 51, 49, 0.16);
}

.timeline-time {
    display: block;
    color: inherit;
    font-size: 0.78rem;
}

.student-page {
    background:
        linear-gradient(rgba(8, 17, 22, 0.86), rgba(8, 17, 22, 0.96)),
        url("../assets/images/frame_16381.png") 65% center / cover fixed;
}

.student-shell {
    width: min(100% - 1.5rem, 620px);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
    padding: 1.5rem 0 2.5rem;
}

.student-card {
    padding: clamp(1.25rem, 5vw, 2rem);
}

.student-card h1 {
    margin: 0.4rem 0 0.8rem;
    font-size: clamp(1.85rem, 8vw, 3rem);
    line-height: 1.08;
}

.student-card .question-grid {
    grid-template-columns: 1fr;
}

.waiting-pulse {
    width: 0.9rem;
    height: 0.9rem;
    margin: 1.5rem 0;
    border-radius: 50%;
    background: var(--alarm-red-bright);
    box-shadow: 0 0 0 0 rgba(189, 69, 65, 0.5);
    animation: pulse 1.8s infinite;
}

.vote-confirmation {
    display: grid;
    grid-template-columns: 2.8rem 1fr;
    gap: 0.9rem;
    align-items: center;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid rgba(105, 165, 143, 0.6);
    background: rgba(105, 165, 143, 0.09);
}

.vote-confirmation-icon {
    width: 2.8rem;
    height: 2.8rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--ink);
    background: var(--success);
    font-weight: 700;
}

.connection-status {
    min-height: 1.4rem;
    margin-top: 0.8rem;
    color: var(--mist);
    font-size: 0.85rem;
    text-align: center;
}

@keyframes pulse {
    70% { box-shadow: 0 0 0 14px rgba(189, 69, 65, 0); }
    100% { box-shadow: 0 0 0 0 rgba(189, 69, 65, 0); }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 980px) {
    body {
        background-attachment: scroll;
    }

    .welcome-grid,
    .lesson-layout,
    .controller-layout {
        grid-template-columns: 1fr;
    }

    .timeline {
        order: -1;
    }

    .timeline-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .timeline-item {
        min-height: auto;
        display: block;
        padding: 0.65rem;
        border-left: 2px solid var(--line);
        font-size: 0.82rem;
    }

    .timeline-item::before,
    .timeline-dot {
        display: none;
    }

    .timeline-item.current {
        border-left-color: var(--alarm-red-bright);
        background: rgba(157, 51, 49, 0.12);
    }
}

@media (max-width: 720px) {
    .brand-label,
    .session-meta {
        display: none;
    }

    .topbar,
    .sessionbar {
        min-height: 64px;
    }

    .sessionbar {
        grid-template-columns: 1fr auto;
    }

    .room-code .meta-label,
    .clock .meta-label {
        display: none;
    }

    .lesson-layout {
        width: min(100% - 1rem, 1380px);
        margin: 0.5rem auto;
    }

    .timeline {
        display: none;
    }

    .stage {
        min-height: calc(100vh - 76px);
        padding: 1.1rem;
    }

    .stage-head {
        margin-bottom: 0.85rem;
    }

    .stage-number {
        font-size: 2.1rem;
    }

    .question-grid,
    .compare-grid,
    .rule-grid,
    .display-code-grid {
        grid-template-columns: 1fr;
    }

    .result-row {
        grid-template-columns: 1fr 3.5rem;
        gap: 0.5rem;
    }

    .result-track {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .stage-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .controller-layout {
        width: min(100% - 0.9rem, 980px);
        margin: 0.45rem auto;
    }

    .controller-card {
        padding: 1rem;
    }

    .pairing-codes {
        grid-template-columns: 1fr;
    }

    .teacher-controls .button {
        flex: 1;
    }

    .film-caption {
        display: block;
    }
}

@media (max-width: 480px) {
    .topbar {
        padding-inline: 0.75rem;
    }

    .brand img {
        width: 116px;
    }

    .page-content {
        width: min(100% - 1.2rem, var(--content));
        padding: 1.25rem 0 2rem;
    }

    .welcome-grid {
        gap: 1.3rem;
    }

    .tab-list {
        grid-template-columns: 1fr;
    }

    .welcome-copy h1 {
        font-size: 2.45rem;
    }

    .promise-row {
        display: grid;
        gap: 0.55rem;
    }

    .start-panel,
    .join-panel,
    .student-card {
        padding: 1.05rem;
    }

    .answer-option {
        min-height: 4.7rem;
    }
}

@media (max-width: 1100px) {
    .role-grid,
    .hearing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .secure-badge {
        font-size: 0.66rem;
    }

    .controller-status {
        justify-content: space-between;
        gap: 0.4rem 0.8rem;
    }

    .teacher-footer {
        grid-template-columns: 1fr 1fr;
    }

    .teacher-footer > span {
        grid-column: 1 / -1;
        grid-row: 1;
        text-align: center;
    }

    .teacher-footer .button:last-child {
        justify-self: stretch;
    }

    .teacher-question {
        grid-template-columns: 1fr;
    }

    .role-grid,
    .hearing-grid,
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .display-stage {
        width: min(100% - 1rem, 1380px);
        min-height: calc(100vh - 130px);
        margin: 0.5rem auto;
        padding: 1rem;
    }

    .lobby-codes {
        grid-template-columns: 1fr;
    }

    .lobby-codes > b {
        grid-column: 1;
        grid-row: auto;
        margin-top: 0.6rem;
    }
}

@media (max-width: 480px) {
    .controller-status span:nth-child(2) {
        display: none;
    }

    .teacher-footer .button {
        min-width: 0;
        padding-inline: 0.65rem;
    }

    .student-card .lead {
        font-size: 1rem;
    }

    .question-block h2 {
        font-size: 1.35rem;
    }
}

/* Responsieve rechtbankles v2 */
html,
body,
#app,
.page {
    min-height: 100%;
    min-height: 100svh;
}

body {
    overflow-x: hidden;
}

.page,
.page > *,
.panel,
.controller-card,
.display-stage,
.stage-head > *,
.stage-body,
.role-question-card,
.hearing-grid section,
.answer-option > span:last-child {
    min-width: 0;
}

img,
svg,
video {
    max-width: 100%;
}

.topbar {
    flex: 0 0 auto;
}

.controller-layout.single-controller {
    width: min(calc(100% - 2rem), 760px);
    grid-template-columns: minmax(0, 1fr);
    margin-block: clamp(0.75rem, 2vw, 1.4rem);
}

.controller-status {
    justify-content: space-between;
    padding-inline: max(1rem, calc((100% - 760px) / 2));
    font-variant-numeric: tabular-nums;
}

.connection-panel strong {
    color: #fff;
}

.simple-steps {
    display: grid;
    gap: 0.7rem;
    margin: 1.5rem 0;
}

.simple-steps p {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr);
    gap: 0.8rem;
    align-items: center;
    margin: 0;
    color: var(--mist);
}

.simple-steps strong {
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
    border: 1px solid var(--alarm-red-bright);
}

.media-controller {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid rgba(105, 165, 143, 0.5);
    background: rgba(105, 165, 143, 0.08);
}

.media-controller p,
.media-controller strong {
    margin: 0;
}

.media-controller strong {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
}

.status-dot {
    width: 0.65rem;
    height: 0.65rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--mist);
}

.status-dot.play,
.status-dot.restart,
.status-dot.ended {
    background: var(--success);
}

.status-dot.pause {
    background: #e0b05b;
}

.media-buttons {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.8fr);
    gap: 0.55rem;
}

.media-buttons .button {
    min-width: 0;
    padding-inline: 0.7rem;
}

.response-progress {
    display: grid;
    gap: 0.25rem;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid rgba(189, 69, 65, 0.55);
    background: rgba(157, 51, 49, 0.08);
}

.response-progress.complete {
    border-color: rgba(105, 165, 143, 0.65);
    background: rgba(105, 165, 143, 0.09);
}

.response-progress strong {
    color: #fff;
    font-size: 1.1rem;
}

.response-progress > span {
    color: var(--mist);
}

.role-progress-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0.65rem;
}

.role-progress-grid span {
    display: flex;
    justify-content: space-between;
    gap: 0.55rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--line);
    color: var(--mist);
    white-space: normal;
}

.role-progress-grid span.done {
    border-color: rgba(105, 165, 143, 0.55);
    color: #d7eee5;
}

.role-progress-grid b {
    color: #fff;
    font-weight: 500;
}

.role-question-list {
    margin-top: 1rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.025);
}

.role-question-list summary {
    padding: 0.8rem 1rem;
    color: #fff;
    cursor: pointer;
}

.role-question-list > div {
    display: grid;
    gap: 0;
    padding: 0 1rem 0.75rem;
}

.role-question-list p {
    display: grid;
    gap: 0.15rem;
    margin: 0;
    padding: 0.65rem 0;
    border-top: 1px solid var(--line);
}

.role-question-list span {
    color: var(--mist);
    line-height: 1.45;
}

.finish-warning {
    margin: 0.75rem 0 0;
    color: #ffd4d2;
    font-size: 0.9rem;
    text-align: center;
}

.display-setup {
    width: min(calc(100% - 2rem), 1180px);
    flex: 1;
    display: grid;
    place-items: center;
    margin: auto;
    padding-block: clamp(1rem, 4vw, 3rem);
}

.media-host {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0.001;
    pointer-events: none;
}

.media-host video {
    width: 1px;
    height: 1px;
}

.sound-panel {
    width: min(100%, 780px);
    margin-inline: auto;
    padding: clamp(1.5rem, 4.5vw, 3.4rem);
    text-align: center;
}

.sound-panel .lead {
    max-width: 620px;
    margin-inline: auto;
}

.sound-enable {
    min-height: 3.6rem;
    margin-top: 1.4rem;
}

.sound-note {
    max-width: 650px;
    margin: 1rem auto 0;
    color: var(--mist);
    font-size: 0.92rem;
}

.qr-panel {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: clamp(1.5rem, 5vw, 4rem);
    align-items: center;
    padding: clamp(1.4rem, 4vw, 3rem);
}

.qr-code {
    width: 100%;
    max-width: 390px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    justify-self: center;
    padding: clamp(0.55rem, 1.5vw, 0.9rem);
    color: #081116;
    background: #fff;
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.42);
}

.qr-code svg {
    width: 100%;
    height: auto;
    display: block;
}

.qr-loading {
    color: #17242a;
    text-align: center;
}

.sessionbar {
    grid-template-columns: minmax(0, 1fr) auto;
}

.participant-indicator {
    color: var(--mist);
    white-space: nowrap;
}

.participant-indicator strong {
    color: #fff;
    font-size: 1.15rem;
}

.display-stage {
    width: min(calc(100% - 2rem), 1380px);
    min-height: min(780px, calc(100svh - 175px));
    max-height: none;
    margin-block: clamp(0.6rem, 1.4vw, 1.2rem);
}

.display-stage .stage-head {
    margin-bottom: clamp(0.75rem, 1.5vw, 1.25rem);
}

.display-stage .stage-title {
    margin-bottom: 0.55rem;
    font-size: clamp(2rem, 4vw, 3.45rem);
}

.display-stage .stage-copy {
    max-width: 1100px;
    margin-bottom: 0;
}

.lobby-layout {
    width: min(100%, 1040px);
    display: grid;
    grid-template-columns: minmax(250px, 360px) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: center;
    margin: auto;
}

.student-qr {
    max-width: 340px;
}

.join-copy h2 {
    margin: 0.2rem 0 0.8rem;
    color: #fff;
    font-size: clamp(1.65rem, 3vw, 2.5rem);
    line-height: 1.15;
}

.join-copy ol {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding-left: 1.4rem;
    color: var(--mist);
}

.student-total {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    margin: 1rem 0 0;
}

.student-total strong {
    color: var(--alarm-red-bright);
    font-size: clamp(2.4rem, 6vw, 4.4rem);
    font-weight: 500;
    line-height: 1;
}

.student-total span {
    color: #fff;
}

.role-question-board {
    display: grid;
    gap: 1rem;
}

.role-question-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.65rem, 1.4vw, 1rem);
}

.role-question-card {
    position: relative;
    display: grid;
    gap: 0.55rem;
    align-content: start;
    padding: clamp(0.85rem, 1.5vw, 1.2rem);
    border: 1px solid rgba(189, 69, 65, 0.45);
    border-left: 3px solid var(--alarm-red-bright);
    background: rgba(157, 51, 49, 0.07);
}

.role-question-card.complete {
    border-color: rgba(105, 165, 143, 0.55);
    border-left-color: var(--success);
    background: rgba(105, 165, 143, 0.07);
}

.role-question-card p,
.role-question-card h2 {
    margin: 0;
}

.role-question-card h2 {
    color: #fff;
    font-size: clamp(1rem, 1.65vw, 1.35rem);
    font-weight: 500;
    line-height: 1.32;
}

.role-count {
    align-self: end;
    color: var(--mist);
}

.role-count strong {
    color: #fff;
}

.all-ready {
    margin: 0;
    color: var(--mist);
    text-align: center;
}

.all-ready.complete {
    color: #d7eee5;
}

.case-card {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: clamp(0.9rem, 1.5vw, 1.25rem);
}

.case-card span {
    display: block;
    margin-top: 0.35rem;
    color: var(--mist);
}

.class-progress {
    width: min(100%, 520px);
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-top: 1.4rem;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(189, 69, 65, 0.55);
    background: rgba(157, 51, 49, 0.08);
}

.class-progress.complete {
    border-color: rgba(105, 165, 143, 0.65);
    background: rgba(105, 165, 143, 0.09);
}

.class-progress strong {
    color: #fff;
    font-size: clamp(1.65rem, 4vw, 2.8rem);
}

.class-progress span {
    color: var(--mist);
}

.film-frame video {
    pointer-events: none;
}

.film-slot,
.film-slot video {
    width: 100%;
    height: 100%;
    display: block;
}

.autoplay-notice {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 0.25rem;
    padding: 2rem;
    color: #fff;
    background: rgba(8, 17, 22, 0.86);
    text-align: center;
    cursor: pointer;
}

.autoplay-notice[hidden] {
    display: none;
}

.autoplay-notice strong {
    font-size: clamp(1.25rem, 2.4vw, 2rem);
}

.autoplay-notice span {
    color: var(--mist);
}

.rule-grid .rule-card,
.student-card .rule-card {
    display: block;
}

.rule-grid .rule-card .meta-label,
.student-card .rule-card .meta-label {
    margin-bottom: 0.5rem;
}

.hearing-intro {
    display: grid;
    gap: 0.25rem;
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
    border-left: 4px solid var(--alarm-red-bright);
    background: rgba(157, 51, 49, 0.1);
}

.hearing-intro strong {
    color: var(--alarm-red-bright);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hearing-intro span {
    color: #fff;
    font-size: clamp(1.05rem, 1.7vw, 1.35rem);
}

.hearing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hearing-grid section {
    min-height: 0;
}

.hearing-grid section > strong {
    overflow-wrap: anywhere;
}

.hearing-grid section > span {
    padding-top: 0.55rem;
    border-top: 1px solid var(--line);
    color: #fff;
}

.final-role-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.final-role-grid section {
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.final-role-grid p {
    margin: 0;
}

.final-role-grid p:last-child {
    margin-top: 0.35rem;
    color: #fff;
    line-height: 1.45;
}

.scan-panel {
    text-align: center;
}

.scan-panel .lead,
.scan-panel .privacy-note {
    margin-inline: auto;
}

.scan-icon {
    position: relative;
    width: 7.5rem;
    height: 7.5rem;
    margin: 1.6rem auto;
    background:
        linear-gradient(90deg, var(--alarm-red-bright) 12%, transparent 12% 44%, var(--alarm-red-bright) 44% 56%, transparent 56% 88%, var(--alarm-red-bright) 88%),
        linear-gradient(var(--alarm-red-bright) 12%, transparent 12% 44%, var(--alarm-red-bright) 44% 56%, transparent 56% 88%, var(--alarm-red-bright) 88%);
    opacity: 0.85;
}

.sentence-card {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid rgba(105, 165, 143, 0.55);
    background: rgba(105, 165, 143, 0.08);
}

.sentence-card p {
    margin: 0;
}

.sentence-card p:last-child {
    margin-top: 0.4rem;
    color: #fff;
    font-size: 1.1rem;
}

@media (max-width: 900px) {
    .qr-panel,
    .lobby-layout {
        grid-template-columns: minmax(220px, 310px) minmax(0, 1fr);
        gap: 1.5rem;
    }

    .display-stage {
        min-height: calc(100svh - 150px);
    }
}

@media (max-width: 700px) {
    body,
    .student-page,
    .controller-page {
        background-attachment: scroll;
    }

    .topbar {
        min-height: 58px;
        padding: 0.65rem 0.85rem;
    }

    .brand img {
        width: 118px;
        max-height: 36px;
    }

    .brand-label {
        display: inline;
        font-size: 0.68rem;
        letter-spacing: 0.08em;
    }

    .controller-status {
        justify-content: space-between;
        padding: 0.55rem 0.75rem;
        font-size: 0.78rem;
    }

    .controller-layout.single-controller {
        width: min(calc(100% - 0.75rem), 760px);
        margin-block: 0.4rem 0.75rem;
    }

    .controller-card {
        padding: 0.9rem;
    }

    .controller-title {
        font-size: clamp(1.65rem, 8vw, 2.25rem);
    }

    .controller-instruction p:last-child,
    .teacher-say blockquote {
        font-size: 1rem;
    }

    .media-buttons {
        grid-template-columns: 1fr 1fr;
    }

    .media-buttons .button:first-child {
        grid-column: 1 / -1;
    }

    .role-progress-grid {
        grid-template-columns: 1fr;
    }

    .teacher-footer {
        position: sticky;
        bottom: 0;
        z-index: 5;
        margin-inline: -0.9rem;
        margin-bottom: -0.9rem;
        padding: 0.85rem 0.9rem max(0.85rem, env(safe-area-inset-bottom));
        border-top-color: rgba(157, 51, 49, 0.65);
        background: rgba(8, 17, 22, 0.97);
        backdrop-filter: blur(12px);
    }

    .display-setup {
        width: min(calc(100% - 1rem), 720px);
    }

    .qr-panel,
    .lobby-layout {
        grid-template-columns: 1fr;
    }

    .qr-panel {
        gap: 1.2rem;
    }

    .qr-code {
        max-width: min(72vw, 330px);
    }

    .display-stage {
        width: min(calc(100% - 0.75rem), 1380px);
        min-height: calc(100svh - 125px);
        margin-block: 0.4rem;
        padding: 0.9rem;
    }

    .display-stage .stage-title {
        font-size: clamp(1.7rem, 8vw, 2.4rem);
    }

    .role-question-grid,
    .hearing-grid,
    .summary-grid,
    .final-role-grid {
        grid-template-columns: 1fr;
    }

    .role-question-card h2 {
        font-size: 1rem;
    }

    .class-progress {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.15rem;
    }

    .result-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .result-track {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .student-shell {
        width: min(calc(100% - 0.75rem), 620px);
        padding-block: 0.5rem max(1rem, env(safe-area-inset-bottom));
    }

    .student-card {
        padding: 1rem;
    }

    .student-card h1 {
        font-size: clamp(1.65rem, 9vw, 2.35rem);
    }

    .student-meta {
        gap: 0.5rem;
        font-size: 0.7rem;
    }

    .answer-option {
        min-height: 4.4rem;
        padding: 0.8rem;
        line-height: 1.4;
    }

    .role-card h2 {
        font-size: 1.15rem;
    }

    .compact-content {
        width: min(calc(100% - 0.75rem), 760px);
    }
}

@media (max-width: 360px) {
    .brand-label {
        display: none;
    }

    .controller-status {
        gap: 0.25rem;
    }

    .controller-status span:nth-child(2) {
        display: inline;
    }

    .media-buttons {
        grid-template-columns: 1fr;
    }

    .media-buttons .button:first-child {
        grid-column: auto;
    }

    .teacher-footer {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .teacher-footer .button {
        font-size: 0.9rem;
    }

    .question-block h2 {
        font-size: 1.25rem;
    }

    .answer-option {
        grid-template-columns: 2.15rem minmax(0, 1fr);
        gap: 0.65rem;
    }

    .answer-letter {
        width: 2.15rem;
        height: 2.15rem;
    }
}

/* Projectoren en laptops met weinig verticale ruimte. */
@media (min-width: 701px) and (max-height: 820px) {
    .display-page .topbar {
        min-height: 58px;
        padding: 0.55rem clamp(1rem, 2.5vw, 2rem);
    }

    .display-page .brand img {
        width: 150px;
        max-height: 40px;
    }

    .display-page .sessionbar {
        min-height: 48px;
        padding: 0.45rem clamp(1rem, 2.5vw, 2rem);
    }

    .display-stage {
        height: calc(100svh - 126px);
        min-height: 0;
        margin-block: 0.55rem;
        padding: clamp(0.85rem, 1.7vw, 1.3rem);
        overflow: hidden;
    }

    .display-stage .stage-head {
        margin-bottom: 0.65rem;
    }

    .display-stage .stage-title {
        margin-bottom: 0.3rem;
        font-size: clamp(1.9rem, 3vw, 2.6rem);
    }

    .display-stage .stage-copy {
        font-size: 0.98rem;
        line-height: 1.42;
    }

    .stage-summary .summary-grid {
        gap: 0.65rem;
    }

    .stage-summary .compare-card {
        padding: 0.7rem 0.85rem;
    }

    .stage-summary .result-list {
        gap: 0.45rem;
        margin-top: 0.55rem;
    }

    .stage-summary .result-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.25rem 0.75rem;
        align-items: start;
    }

    .stage-summary .result-label {
        font-size: 0.88rem;
        line-height: 1.28;
    }

    .stage-summary .result-value {
        padding-top: 0.05rem;
        font-size: 0.8rem;
    }

    .stage-summary .result-track {
        grid-column: 1 / -1;
        grid-row: auto;
        height: 0.45rem;
    }

    .stage-summary .final-role-grid {
        gap: 0.55rem;
        margin-top: 0.55rem;
    }

    .stage-summary .final-role-grid section {
        padding: 0.55rem 0.7rem;
    }

    .stage-summary .final-role-grid p:last-child {
        font-size: 0.83rem;
        line-height: 1.25;
    }

    .stage-summary .meta-label {
        font-size: 0.66rem;
    }

    .stage-summary .takeaway-card {
        margin-top: 0.55rem;
        padding: 0.65rem 0.8rem;
        font-size: 0.85rem;
        line-height: 1.35;
    }
}
