body.listening-test-mode.b1-listening-mode {
    margin: 0;
    background: #eef6fb;
    overflow: hidden;
    height: 100vh;
}

body.listening-test-mode.b1-listening-mode .listening-test-wrap {
    padding: 0;
    max-width: none;
    height: 100vh;
    overflow: hidden;
}

.b1-listening-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 0;
    overflow: hidden;
    background: #eef6fb;
    color: #1a2b3c;
    font-family: Arial, Helvetica, sans-serif;
}

.b1-start-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 43, 60, 0.55);
    padding: 1rem;
}

.b1-start-overlay.is-hidden {
    display: none !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.b1-start-card {
    width: min(520px, 100%);
    background: #fff;
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.b1-start-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #e8f7fd;
    color: #0077a8;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.b1-start-card__title {
    font-size: 1.35rem;
    margin: 0 0 0.35rem;
}

.b1-start-card__mode {
    color: #5c6b7a;
    margin-bottom: 1rem;
}

.b1-start-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.b1-start-card__stat {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #f4f8fb;
    padding: 0.4rem 0.65rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.b1-start-card__tips {
    margin: 0 0 1.25rem;
    padding-left: 1.1rem;
    color: #4a5968;
    font-size: 0.92rem;
}

.b1-start-btn {
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: #41b6e6;
    color: #fff;
    font-weight: 600;
    padding: 0.85rem 1rem;
    cursor: pointer;
}

.b1-start-btn:hover {
    background: #2a9fd4;
}

.b1-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    background: #fff;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    z-index: 100;
}

.b1-header__side {
    display: flex;
    align-items: center;
    min-width: 0;
}

.b1-header__side--left {
    justify-content: flex-start;
}

.b1-header__side--right {
    justify-content: flex-end;
    gap: 0.75rem;
}

.b1-header__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.b1-header__logo {
    height: 28px;
    width: auto;
    flex-shrink: 0;
}

.b1-header__title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0077a8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.b1-header__timer {
    justify-self: center;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 1.35rem;
    line-height: 1;
    color: #1a2b3c;
    text-align: center;
    padding: 0.15rem 0;
}

.b1-header__submit {
    border: 0;
    background: #2a6c96;
    color: #fff;
    border-radius: 6px;
    padding: 0.45rem 0.85rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}

.b1-audio-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    padding: 0.5rem 1rem;
    background: #f8fcff;
    border-bottom: 1px solid #d9e8f2;
}

.b1-audio-bar__status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #0077a8;
    font-weight: 600;
    font-size: 0.9rem;
}

.b1-audio-bar__player {
    margin-left: auto;
}

.b1-audio-bar__player audio {
    width: min(420px, 100%);
    height: 36px;
}

.b1-audio-bar__player.is-locked audio {
    pointer-events: none;
    opacity: 0.85;
}

.b1-main {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1.25rem 1rem 6.5rem;
    scrollbar-width: thin;
    scrollbar-color: #41b6e6 #dce8f0;
}

.b1-main::-webkit-scrollbar {
    width: 12px;
}

.b1-main::-webkit-scrollbar-track {
    background: #dce8f0;
    border-radius: 999px;
}

.b1-main::-webkit-scrollbar-thumb {
    background: #41b6e6;
    border-radius: 999px;
    border: 2px solid #dce8f0;
}

.b1-main::-webkit-scrollbar-thumb:hover {
    background: #2a9fd4;
}

.b1-rubric {
    max-width: 920px;
    margin: 0 auto 1rem;
    background: #fff;
    border-left: 4px solid #41b6e6;
    padding: 0.85rem 1rem;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.b1-rubric__headline {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    color: #0077a8;
}

.b1-rubric__text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.b1-screen-host {
    max-width: 920px;
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    min-height: 280px;
}

.b1-question-prompt {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.b1-question-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #41b6e6;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
}

.b1-question-text {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.45;
    margin: 0.15rem 0 0;
    white-space: pre-line;
}

.b1-options {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.b1-options--text {
    flex-direction: column;
    align-items: stretch;
}

.b1-options--image {
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: center;
    gap: 0.75rem;
}

.b1-options--image .b1-option {
    flex: 1 1 0;
    min-width: 0;
    max-width: 300px;
}

.b1-option {
    position: relative;
}

.b1-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.b1-option label {
    display: block;
    cursor: pointer;
    border: 2px solid #d9e8f2;
    border-radius: 8px;
    padding: 0.35rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.b1-option label:hover {
    border-color: #41b6e6;
}

.b1-option input:checked + label {
    border-color: #0077a8;
    box-shadow: 0 0 0 2px rgba(65, 182, 230, 0.35);
}

.b1-option--image label {
    padding: 0.5rem;
    background: #fff;
}

.b1-option--image label:hover {
    border-color: #41b6e6;
    background: #f8fcff;
}

.b1-option--image input:checked + label {
    border-width: 4px;
    border-color: #005f87;
    background: #e8f7fd;
    box-shadow: 0 0 0 3px rgba(0, 95, 135, 0.28);
}

.b1-option--image input:checked + label img {
    outline: 3px solid #005f87;
    outline-offset: -1px;
}

.b1-palette-num.is-unavailable {
    opacity: 0.35;
    cursor: not-allowed;
    text-decoration: line-through;
}

.b1-option--image img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.b1-option--text label {
    padding: 0.75rem 1rem;
    font-size: 0.98rem;
}

.b1-option-letter {
    display: inline-block;
    font-weight: 700;
    margin-right: 0.5rem;
    color: #0077a8;
}

.b1-note-passage h2 {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.b1-mc-group {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.b1-mc-group__item {
    background: #fff;
    border: 1px solid #d9e8f2;
    border-radius: 10px;
    padding: 1rem 1.1rem;
    scroll-margin-top: 1rem;
}

.b1-mc-group__item.is-active {
    border-color: #41b6e6;
    box-shadow: 0 0 0 2px rgba(65, 182, 230, 0.25);
}

.b1-options--stacked {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
}

.b1-options--stacked .b1-option--text label {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
}

.b1-note-passage p {
    line-height: 2;
    margin: 0 0 0.85rem;
    font-size: 1rem;
}

.b1-gap-input,
.b1-note-passage .b1-gap-input {
    display: inline-block;
    min-width: 140px;
    max-width: 220px;
    border: none;
    border-bottom: 2px solid #0077a8;
    background: #f0f9fd;
    padding: 0.15rem 0.35rem;
    font-size: 1rem;
    vertical-align: baseline;
}

.b1-gap-input:focus {
    outline: none;
    background: #e3f4fb;
    border-bottom-color: #41b6e6;
}

.b1-gap-input.is-active {
    background: #fff8dc;
}

.b1-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 110;
}

.b1-footer__nav {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
    margin-left: auto;
}

.b1-footer__arrow {
    border: 0;
    background: #2a6c96;
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.b1-footer__arrow:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.b1-palette {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.15rem 0;
}

.b1-palette-part {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem;
    min-width: max-content;
    padding-right: 0.5rem;
    border-right: 1px solid #d6e8f2;
}

.b1-palette-part:last-child {
    border-right: 0;
    padding-right: 0;
}

.b1-palette-part__tab {
    border: 0;
    background: transparent;
    color: #0077a8;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 0;
    cursor: pointer;
    text-align: left;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 30px;
}

.b1-palette-part.is-active .b1-palette-part__tab {
    color: #1a2b3c;
}

.b1-palette-part__nums {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.25rem;
}

.b1-palette-num {
    border: 1px solid #c5d9e8;
    background: #fff;
    color: #1a2b3c;
    min-width: 30px;
    height: 30px;
    border-radius: 4px;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0 0.25rem;
}

.b1-palette-num.is-active {
    background: #41b6e6;
    border-color: #41b6e6;
    color: #fff;
    font-weight: 700;
}

.b1-palette-num.is-answered {
    background: #7ec8e3;
    border-color: #0077a8;
    border-width: 2px;
    color: #003049;
    font-weight: 700;
}

.b1-palette-num.is-answered.is-active {
    background: #005f87;
    border-color: #003049;
    color: #fff;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #41b6e6;
}

@media (max-width: 768px) {
    .b1-header {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    }

    .b1-header__timer {
        font-size: 1.15rem;
    }

    .b1-header__title {
        display: none;
    }

    .b1-audio-bar__player {
        width: 100%;
        margin-left: 0;
    }

    .b1-options--text {
        flex-direction: column;
        align-items: stretch;
    }

    .b1-options--image {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    .b1-options--image .b1-option {
        max-width: none;
    }

    .b1-option--image label {
        padding: 0.35rem;
    }

    .b1-gap-input {
        min-width: 110px;
        max-width: 160px;
    }
}
