.qb-quiz-preview-nav {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow: auto;
}

.qb-quiz-preview-nav__list .list-group-item.bg-light {
    border-top-width: 1px;
}

.qb-quiz-preview-phone-wrap {
    position: sticky;
    top: 1rem;
}

.qb-quiz-preview-phone-label {
    letter-spacing: 0.02em;
}

.qb-live-player--static .qb-live-player__container {
    margin-inline: auto;
}

.qb-live-player--static {
    max-height: 36rem;
    padding: 0.5rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 1.25rem;
    background: var(--qb-bg, #f8fafc);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.qb-quiz-preview-master__cover {
    width: 4.5rem;
    height: 4.5rem;
    object-fit: cover;
    flex-shrink: 0;
}

.qb-quiz-preview-master__cover--empty {
    background: rgba(0, 0, 0, 0.06);
}

.qb-player-buzz-mock__phone {
    max-width: 20rem;
    margin-inline: auto;
    padding: 1rem;
    border: 2px solid rgba(0, 0, 0, 0.12);
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.qb-player-buzz-mock__statusbar {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
}

.qb-player-buzz-mock__header {
    margin-bottom: 0.75rem;
}

.qb-player-buzz-mock__buzz-wrap {
    display: flex;
    justify-content: center;
    padding: 0.5rem 0 0.25rem;
}

.qb-live-player__container {
    max-width: 24rem;
}

/* —— Live spelare (mobil-first) —— */

.qb-live-player {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 24rem;
    margin-inline: auto;
    padding: 0.5rem 0.75rem;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
}

.qb-player-mini {
    flex-shrink: 0;
    margin-bottom: 0.5rem;
    padding: 0.55rem 0.65rem;
    border-radius: 0.75rem;
    background: var(--qb-surface, #fff);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.qb-player-context-card__quiz {
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    margin: -0.55rem -0.65rem 0.625rem;
    padding: 0.55rem 0.65rem;
    line-height: 1.3;
    background-color: var(--tblr-primary, #f47e4a);
    color: #fff;
    border-radius: calc(0.75rem - 1px) calc(0.75rem - 1px) 0 0;
}

.qb-player-context-card__badges {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 0.5rem;
}

.qb-player-context-card__badge {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    text-align: center;
}

.qb-player-context-card__badge-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tblr-secondary, #6c757d);
    margin-bottom: 0.15rem;
}

.qb-player-context-card__badge-value {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
}

.qb-player-context-card__badge-timer {
    font-weight: 600;
}

.qb-player-mini__status {
    padding: 0.65rem 0.75rem;
    margin: 0;
    width: 100%;
}

.qb-player-mini__status-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.qb-live-player__stage {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.qb-live-player__meta {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.45rem 0.55rem;
    border-radius: 0.625rem;
    background: rgba(0, 0, 0, 0.03);
    font-size: 0.8125rem;
}

.qb-live-player__meta-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

/* Runda-raden med tidslinje: grönt = tid kvar, grått = förbrukad tid. */
.qb-player-round-row {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.qb-player-round-row > * {
    position: relative;
    z-index: 1;
}

.qb-player-round-row--timing {
    padding: 0.3rem 0.5rem;
    background: rgba(0, 0, 0, 0.08);
}

.qb-player-round-row__fill {
    display: none;
    position: absolute;
    z-index: 0;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    background: rgba(47, 179, 68, 0.35);
    transition: width 0.25s linear;
    pointer-events: none;
}

.qb-player-round-row--timing .qb-player-round-row__fill {
    display: block;
}

.qb-player-red-thread__text {
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--tblr-info, #4299e1);
}

.qb-player-red-thread__text--clamped {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.qb-player-red-thread__toggle {
    display: block;
    margin-bottom: 0.25rem;
    padding: 0;
    border: 0;
    background: none;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--qb-accent);
    text-decoration: underline;
}

.qb-live-player__buzz {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.25rem 0;
}

.qb-live-player__buzz.d-none {
    display: none !important;
}

.qb-live-player__mcq {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.qb-live-player__mcq.d-none {
    display: none !important;
}

.qb-live-player__mcq-question {
    flex-shrink: 0;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.qb-live-player__mcq-options {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.15rem;
}

.qb-live-player__mcq-options label.btn {
    min-height: 2.75rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    white-space: normal;
    text-align: left;
}

.qb-live-player__mcq-options label.btn.qb-mcq-option--selected {
    background-color: var(--tblr-primary, #fd7e14);
    border-color: var(--tblr-primary, #fd7e14);
    color: #fff;
}

.qb-live-player__mcq-options label.btn.qb-mcq-option--selected.qb-mcq-option--locked {
    opacity: 1;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.qb-live-player__mcq-options .btn-check:disabled + label.btn.qb-mcq-option--selected {
    opacity: 1;
}

.qb-live-player__mcq-lock {
    flex-shrink: 0;
    min-height: 2.75rem;
    font-weight: 600;
}

.qb-live-player__pa-sparet {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.qb-live-player__pa-sparet.d-none {
    display: none !important;
}

.qb-live-player__pa-sparet-head {
    flex-shrink: 0;
}

.qb-live-player__pa-sparet-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.15rem;
}

.qb-live-player__pa-sparet-foot {
    flex-shrink: 0;
    padding-top: 0.15rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: var(--qb-surface, #fff);
}

.qb-live-player__pa-sparet-foot:has([data-qb-player-pa-sparet-form].d-none) {
    display: none;
    border-top: 0;
    padding-top: 0;
}

.qb-live-player__timeline {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.qb-live-player__timeline.d-none {
    display: none !important;
}

.qb-live-player__timeline-head {
    flex-shrink: 0;
}

.qb-live-player__timeline-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.15rem;
}

.qb-live-player__timeline-foot {
    flex-shrink: 0;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: var(--qb-surface, #fff);
}

.qb-timeline-slider__year {
    text-align: center;
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    color: var(--tblr-primary, #206bc4);
}

/* Stor touchyta för att dra på tidslinjen i mobilen. */
.qb-timeline-slider__range {
    height: 2.75rem;
}

.qb-timeline-slider__range::-webkit-slider-thumb {
    width: 2rem;
    height: 2rem;
    margin-top: -0.875rem;
}

.qb-timeline-slider__range::-moz-range-thumb {
    width: 2rem;
    height: 2rem;
}

.qb-timeline-slider--locked .qb-timeline-slider__year {
    color: var(--tblr-secondary, #626976);
}

.qb-timeline-result__year {
    font-size: 2rem;
    line-height: 1.1;
}

.qb-live-player__feedback {
    flex-shrink: 0;
    margin: 0;
    padding: 0.55rem 0.75rem;
    font-size: 0.875rem;
}

.qb-player-board {
    flex-shrink: 0;
    margin-top: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.75rem;
    background: var(--qb-surface, #fff);
    overflow: hidden;
}

.qb-player-board__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.qb-player-board__summary::-webkit-details-marker {
    display: none;
}

.qb-player-board__summary::after {
    content: "▾";
    font-size: 0.75rem;
    color: var(--tblr-secondary, #6c757d);
    transition: transform 0.15s ease;
}

.qb-player-board[open] .qb-player-board__summary::after {
    transform: rotate(180deg);
}

.qb-player-board__hint {
    font-weight: 500;
    color: var(--tblr-secondary, #6c757d);
}

.qb-player-board__list .list-group-item {
    padding: 0.45rem 0.75rem;
    font-size: 0.8125rem;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.qb-player-result {
    width: 100%;
    max-width: 28rem;
    margin-inline: auto;
    padding: 1rem 0.875rem 1.5rem;
}

.qb-player-result__hero {
    text-align: center;
    margin-bottom: 1rem;
}

.qb-player-result__score {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--qb-accent);
}

.qb-player-info {
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.qb-player-info__brand {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tblr-secondary, #6c757d);
    margin-bottom: 0.15rem;
}

.qb-player-info__team {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.qb-player-info__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    background: rgba(0, 0, 0, 0.03);
}

.qb-player-info__stats--duo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.qb-player-info__stat {
    text-align: center;
    min-width: 0;
}

.qb-player-info__stat-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tblr-secondary, #6c757d);
    margin-bottom: 0.15rem;
}

.qb-player-info__stat-value {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.2;
}

.qb-player-info__context {
    display: none;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.qb-player-info__context--visible {
    display: flex;
}

.qb-player-info__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.qb-player-info__row-label {
    flex-shrink: 0;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tblr-secondary, #6c757d);
}

.qb-player-info__row-value {
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: right;
    min-width: 0;
}

/* Banner när spelarens polling misslyckats flera gånger i rad. */
.qb-player-connection-banner {
    position: sticky;
    top: 0;
    z-index: 1050;
    background: #d63939;
    color: #fff;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    animation: qb-connection-pulse 1.6s ease-in-out infinite;
}

@keyframes qb-connection-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

.qb-player-info__status {
    padding: 0.65rem 0.75rem;
    border-radius: 0.625rem;
    background: rgba(0, 0, 0, 0.04);
    text-align: center;
}

.qb-player-info__status-text {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.35;
}

.qb-player-info__status--active {
    background: rgba(47, 179, 68, 0.12);
    color: #1a7f31;
}

.qb-player-info__status--winner {
    background: rgba(47, 179, 68, 0.18);
    color: #1a7f31;
}

.qb-player-info__status--locked {
    background: rgba(108, 117, 125, 0.12);
    color: #495057;
}

.qb-player-info__status--locked-buzz {
    color: #1a7f31;
}

.qb-player-info__status--waiting {
    background: rgba(var(--qb-accent-rgb), 0.1);
    color: var(--qb-accent-hover);
}

.qb-buzz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: min(11rem, 42vw, calc(100dvh - 14rem));
    height: min(11rem, 42vw, calc(100dvh - 14rem));
    min-width: 7.5rem;
    min-height: 7.5rem;
    max-width: 11rem;
    max-height: 11rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
    background: #adb5bd;
    box-shadow: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.qb-buzz-btn--active:not(:disabled) {
    background: #2fb344;
    box-shadow: 0 6px 20px rgba(47, 179, 68, 0.35);
    animation: qb-buzz-pulse 1.5s ease-in-out infinite;
}

.qb-live-player--static .qb-buzz-btn--active:disabled {
    background: #2fb344;
    box-shadow: 0 6px 20px rgba(47, 179, 68, 0.35);
    animation: qb-buzz-pulse 1.5s ease-in-out infinite;
    opacity: 1;
}

.qb-buzz-btn--locked,
.qb-buzz-btn:disabled {
    background: #adb5bd;
    box-shadow: none;
    cursor: not-allowed;
}

.qb-buzz-btn--winner {
    background: #2fb344;
    box-shadow: 0 6px 20px rgba(47, 179, 68, 0.35);
    animation: none;
}

.qb-buzz-btn--sound-preview {
    background: #f47e4a;
    box-shadow: 0 6px 20px rgba(244, 126, 74, 0.35);
    font-size: 0.95rem;
    line-height: 1.25;
    padding: 0.75rem;
    text-align: center;
    white-space: normal;
}

.qb-buzz-btn--sound-preview:not(:disabled):active {
    transform: scale(0.97);
}

.qb-buzz-btn--sound-preview:disabled {
    background: #adb5bd;
    box-shadow: none;
    cursor: not-allowed;
}

.qb-play-waiting__sound {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 20rem;
    margin-inline: auto;
}

.qb-play-waiting__status {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 1.25rem;
    text-align: center;
}

.qb-play-waiting__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
}

.qb-play-waiting__dots span {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: rgba(var(--qb-accent-rgb, 244, 126, 74), 0.85);
    opacity: 0.35;
    animation: qb-play-waiting-dot 1.25s ease-in-out infinite;
}

.qb-play-waiting__dots span:nth-child(2) {
    animation-delay: 0.18s;
}

.qb-play-waiting__dots span:nth-child(3) {
    animation-delay: 0.36s;
}

@keyframes qb-play-waiting-dot {
    0%,
    70%,
    100% {
        opacity: 0.35;
        transform: translateY(0);
    }

    35% {
        opacity: 1;
        transform: translateY(-0.2rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .qb-play-waiting__dots span {
        animation: none;
        opacity: 0.65;
    }
}

@keyframes qb-buzz-pulse {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }
}

@keyframes qb-countdown-pop {
    0% {
        transform: scale(0.6);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.qb-player-mcq--countdown .btn-check:disabled + label,
.qb-player-mcq--countdown label.btn {
    opacity: 0.85;
}

/* Läsfas: fokusera frågetexten innan alternativ visas */
.qb-player-mcq--reading .qb-live-player__mcq-question {
    font-size: clamp(1.15rem, 4.5vw, 1.55rem);
    -webkit-line-clamp: 8;
    margin-block: 0.75rem 0.35rem;
}

.qb-player-countdown {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qb-player-countdown__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.qb-player-countdown__panel {
    position: relative;
    z-index: 1;
    padding: 1rem;
}

.qb-player-countdown__card {
    min-width: 12rem;
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    background: var(--qb-surface, #fff);
    text-align: center;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.qb-player-countdown__card--flash {
    animation: qb-countdown-flash 0.35s ease-out;
}

.qb-player-countdown__label {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tblr-secondary, #6c757d);
    margin-bottom: 0.5rem;
}

.qb-player-countdown__number {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--qb-accent);
    animation: qb-countdown-pop 0.35s ease-out;
}

.qb-player-countdown__number.is-animation-reset {
    animation: none;
}

@keyframes qb-countdown-flash {
    0% {
        transform: scale(0.98);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

@media (max-width: 991.98px) {
    .qb-quiz-preview-nav {
        position: static;
        max-height: none;
    }

    .qb-quiz-preview-phone-wrap {
        position: static;
    }
}
