:root {
    color-scheme: light;
    --ink: #111;
    --muted: #555;
    --line: #202020;
    --green: #5d8d22;
    --green-dark: #4b7418;
    --blue-soft: #eaf8ff;
    --page: #e2dfe0;
    --danger: #b42318;
    --ok: #067647;
}

* {
    box-sizing: border-box;
    min-width: 0;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Yu Gothic", Meiryo, "Noto Sans", sans-serif;
    color: var(--ink);
    background: #edf2f5;
    overflow-x: hidden;
}

html {
    width: 100%;
    min-height: 100%;
}

button, a {
    font: inherit;
}

ruby {
    ruby-position: over;
}

rt {
    font-size: 0.65em;
    line-height: 1;
}

.admin-toolbar-popup-close {
    display: block;
    width: calc(100% - 16px);
    margin: 8px;
    padding: 7px 10px;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    background: #f8fafc;
    color: #0b5953;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
}

.admin-toolbar-popup-close:hover {
    border-color: #0b776f;
    background: #eef8f6;
}

.home {
    max-width: 1040px;
    margin: 0 auto;
    padding: 40px 20px;
}

.home-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 6px;
    color: #0f766e;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

h1, h2 {
    margin: 0;
    letter-spacing: 0;
}

.exam-list {
    display: grid;
    gap: 16px;
}

.exam-card {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    border: 1px solid #d7dde5;
    border-radius: 8px;
    background: #fff;
}

.exam-card-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.exam-card-link:hover,
.exam-card-link:focus-visible {
    border-color: #0f766e;
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.12);
    transform: translateY(-1px);
    outline: none;
}

.exam-card p {
    color: #667085;
    line-height: 1.5;
}

.exam-meta {
    display: flex;
    gap: 12px;
    margin: 16px 0 0;
}

.exam-meta div {
    min-width: 96px;
    padding: 10px 12px;
    border: 1px solid #d7dde5;
    border-radius: 6px;
}

.exam-meta dt {
    color: #667085;
    font-size: 12px;
}

.exam-meta dd {
    margin: 2px 0 0;
    font-weight: 700;
}

.primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 6px;
    color: #fff;
    background: #0f766e;
    text-decoration: none;
    cursor: pointer;
}

.primary-link:hover {
    background: #0b5953;
}

.btn-intro {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid #1F3864;
    border-radius: 6px;
    background: #1F3864;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.btn-intro:hover {
    background: #162b4d;
    border-color: #162b4d;
}

.admin-home-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    background: #fff;
    color: #0b5953;
    text-decoration: none;
    font-weight: 700;
}

.home-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.cbt-body {
    height: 100vh;
    background: var(--page);
    font-family: "Segoe UI", "Yu Gothic", Meiryo, "Noto Sans", sans-serif;
    overflow: hidden;
}

.cbt-body.feedback-body {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
}

.cbt-window {
    width: min(1120px, calc(100vw - 48px));
    max-width: calc(100vw - 48px);
    height: calc(100vh - 24px);
    margin: 12px auto;
    background: #fff;
    box-shadow: 0 0 0 1px #c8c8c8;
    display: grid;
    grid-template-rows: 40px 20px 1fr 46px;
    overflow: hidden;
}

.cbt-header {
    display: grid;
    grid-template-columns: 1fr 270px 146px;
    align-items: center;
    gap: 12px;
    padding: 4px 10px 5px 14px;
    background: #000;
    color: #fff;
    font-size: 14px;
    line-height: 1.15;
}

.cbt-header-left {
    display: grid;
    gap: 2px;
}

.cbt-header-left strong,
.cbt-time strong {
    font-weight: 700;
}

.cbt-time {
    display: grid;
    grid-template-columns: 22px 1fr;
    align-items: center;
    column-gap: 6px;
}

.cbt-time strong {
    grid-column: 2;
}

.clock-icon {
    grid-row: 1 / span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    border: 3px solid #fff;
    border-radius: 50%;
    color: var(--green);
    font-size: 9px;
}

.finish-section {
    min-height: 32px;
    border: 1px solid #d59b3d;
    border-radius: 4px;
    background: #ffd890;
    color: #263238;
    font-weight: 700;
    cursor: pointer;
}

.finish-section:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.cbt-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    background: var(--green);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.cbt-layout {
    min-height: 0;
    display: grid;
    grid-template-columns: 166px minmax(0, 1fr);
    background: #fff;
    overflow: hidden;
}

.cbt-rail {
    position: relative;
    border-right: 1px solid #d2d2d2;
    background: #f7f7f7;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
}

.rail-back {
    display: block;
    padding: 5px 4px 0;
    color: #444;
    text-decoration: none;
    font-size: 14px;
}

.rail-intro,
.rail-section-row {
    display: grid;
    grid-template-columns: 88px 1fr;
    min-height: 76px;
    border-bottom: 1px solid #d5dbe0;
}

.rail-intro {
    display: none;
}

.rail-intro .rail-section-label i,
.rail-section-label i {
    display: block;
    width: 12px;
    height: 54px;
    margin: 8px auto 0;
    border-radius: 10px;
    background: #e0e7eb;
}

.rail-intro .rail-section-label i,
.rail-section-row.completed .rail-section-label i,
.rail-section-row.active .rail-section-label i {
    background: var(--green);
}

.rail-section-row.upcoming .rail-section-label i {
    background: #e0e7eb;
}

.rail-section-row.active .rail-section-label span {
    color: #333;
    font-weight: 700;
}

.rail-sections {
    min-height: 0;
}

.rail-section-label {
    min-width: 0;
    padding-top: 4px;
    padding-left: 4px;
}

.rail-section-label span {
    display: block;
    color: #4f5962;
    font-size: 13px;
    line-height: 1.2;
    white-space: normal;
    overflow: hidden;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.rail-question-panel {
    min-width: 0;
    padding: 6px 4px 8px 6px;
}

.rail-block {
    min-height: 196px;
    padding: 0 5px 8px;
}

.rail-label,
.section-button span {
    display: block;
    margin-bottom: 5px;
    color: #777;
    font-size: 14px;
    white-space: nowrap;
}

.question-grid {
    display: grid;
    gap: 4px;
    justify-content: center;
    padding-top: 4px;
}

.question-dot {
    position: relative;
    width: 36px;
    height: 18px;
    border: 0;
    border-radius: 4px;
    background: var(--green);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.question-dot.answered {
    background: #9aa0a6;
}

.question-dot.current {
    background: var(--green);
}

.question-dot.current::after {
    content: "";
    position: absolute;
    top: 4px;
    right: -9px;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 9px solid var(--green);
}

.question-dot.flagged::before {
    content: attr(data-flag);
    position: absolute;
    top: -10px;
    right: -5px;
    color: #d05a00;
    font-size: 13px;
    line-height: 1;
}

.question-dot:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.section-button {
    display: block;
    width: 100%;
    height: 82px;
    padding: 0 4px;
    border: 1px solid #d5dbe0;
    border-left: 0;
    border-right: 0;
    background: #f7f7f7;
    text-align: left;
    cursor: pointer;
}

.section-button i {
    display: block;
    width: 10px;
    height: 54px;
    margin: 0 auto;
    border-radius: 8px;
    background: #e0e7eb;
}

.section-button.active i {
    background: var(--green);
}

.section-button.active {
    display: none;
}

.section-button:disabled {
    cursor: not-allowed;
}

.section-button.completed i {
    background: #b8c4cc;
}

.cbt-main {
    min-width: 0;
    min-height: 0;
    display: block;
    background: #fff;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
}

.question-top {
    min-height: 0;
    overflow-y: visible;
    overflow-x: hidden;
    padding: 16px 28px 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.question-top::-webkit-scrollbar {
    display: none;
}

.question-bottom {
    border-top: 2px solid #d8dee4;
    background: #f7f9fb;
    min-height: 0;
    overflow: visible;
    padding: 14px 28px 28px;
}

.prompt-box {
    width: 100%;
    min-height: 0;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: var(--blue-soft);
    color: #111;
    font-size: 18px;
    line-height: 1.55;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.passage-box {
    width: min(900px, 100%);
    max-width: 100%;
    min-height: 0;
    margin: 0 0 10px;
    padding: 10px 12px;
    border: 1px solid #b7c6d0;
    background: #fff;
    font-size: 17px;
    line-height: 1.65;
    white-space: pre-line;
}

.passage-box:has(.question-visual-document) {
    width: min(860px, 100%);
    margin-bottom: 8px;
    padding: 0;
    border: 0;
    background: transparent;
}

.passage-content {
    white-space: pre-line;
}

.question-visual {
    display: grid;
    justify-items: start;
    margin: 8px 0 4px;
}

.question-visual img {
    display: block;
    max-width: min(640px, 100%);
    height: auto;
    object-fit: contain;
}

.question-visual-document img {
    width: auto;
    max-width: 100%;
    max-height: min(500px, 54vh);
}

.question-visual-scene img {
    width: auto;
    max-width: min(320px, 100%);
    max-height: min(300px, 34vh);
}

.question-visual figcaption {
    margin-top: 8px;
    color: #555;
    font-size: 13px;
}

.passage-image {
    width: min(760px, 100%);
    padding: 8px;
    background: #fff;
}

.official-sample-image {
    margin: 0;
}

.official-sample-image img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: min(310px, 34vh);
    height: auto;
    border: 1px solid #d6dde3;
    background: #fff;
}

.official-sample-image figcaption {
    margin-top: 8px;
    color: #555;
    font-size: 13px;
}

.passage-transcript {
    border-color: #9fb6c4;
    background: #f8fcff;
}

.passage-menu,
.passage-schedule,
.passage-table,
.passage-notice {
    border-color: #8fa3b0;
    background: #fff;
    font-family: "Segoe UI", "Yu Gothic", Meiryo, "Noto Sans", sans-serif;
}

.audio-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.audio-player {
    display: none;
}

.audio-play-button {
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid #6c6c6c;
    border-radius: 3px;
    background: #fff;
    color: #111;
    font-weight: 700;
    cursor: pointer;
}

.audio-play-button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.language-buttons {
    display: grid;
    gap: 8px;
    width: max-content;
    margin: 0 0 18px;
}

.language-buttons button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #4f5f64;
    border-radius: 4px;
    background: #415055;
    color: #fff;
    font-family: "Courier New", monospace;
    font-size: 14px;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}

.language-guide-icon,
.language-guide-open {
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    color: #fff;
    font-size: 13px;
    line-height: 1;
}

.choices {
    display: grid;
    gap: 14px;
    width: min(900px, 100%);
    max-width: 100%;
}

.choices:has(.choice-media-option) {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: stretch;
    width: 100%;
}

.choices:has(.sub-question-section) {
    grid-template-columns: 1fr;
}

.choice {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: #111;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.choice-media-option {
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
    min-height: 0;
    padding: 10px;
}

.choice:has(input:checked) {
    outline: 3px solid var(--green);
    outline-offset: 1px;
    background: #f4ffe7;
}

.choice-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 2px;
    background: #eef3f7;
    color: #111;
    font-size: 13px;
}

.choice-media {
    display: grid;
    gap: 6px;
    align-items: center;
    justify-items: start;
    width: 100%;
}

.choice-media img {
    display: block;
    max-width: 180px;
    max-height: 120px;
    border: 1px solid #d8dee4;
    background: #fff;
    object-fit: contain;
}

.choice-media-option .choice-media {
    justify-items: center;
}

.choice-media-option .choice-media img {
    width: 100%;
    max-width: 220px;
    max-height: 150px;
}

.choice-caption {
    font-size: 14px;
    line-height: 1.25;
}

.choice-media-option .choice-caption {
    justify-self: start;
    padding-left: 2px;
}

.choice input {
    position: absolute;
    opacity: 0;
}

.sub-question-section {
    margin-bottom: 24px;
}

.sub-question-label {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 8px 14px;
    margin-bottom: 14px;
    background: #e8f0fb;
    border: 1px solid #b3cce8;
    border-left: 4px solid #4a7cc9;
    font-size: 18px;
    font-weight: 700;
}

.sub-question-prompt {
    font-size: 15px;
    font-weight: 400;
    color: #333;
}

.sub-question-choices {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: min(900px, 100%);
    max-width: 100%;
}

.sub-question-choices .choice {
    grid-template-columns: 28px 1fr;
    min-height: 0;
    padding: 8px;
    align-items: start;
}

.sub-question-choices .choice-media img {
    max-width: 100%;
    max-height: 100px;
    width: 100%;
    object-fit: contain;
}

.cbt-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    border-top: 4px solid var(--green);
    background: #000;
}

.footer-icons {
    display: flex;
    gap: 10px;
    color: #fff;
    font-size: 25px;
    line-height: 1;
}

.footer-actions {
    display: flex;
    gap: 6px;
}

.flag-button,
.nav-button {
    min-height: 34px;
    border: 0;
    border-radius: 3px;
    background: var(--green);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.flag-button {
    width: 36px;
    font-size: 18px;
}

.nav-button {
    min-width: 63px;
    padding: 0 10px;
}

.flag-button:hover,
.nav-button:hover {
    background: var(--green-dark);
}

.flag-button.active {
    background: #d05a00;
}

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

.language-modal {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(0, 0, 0, .42);
}

.language-modal[hidden] {
    display: none;
}

.exam-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.42);
}

.exam-confirm-dialog {
    width: min(360px, 100%);
    padding: 18px;
    border: 2px solid var(--green);
    border-radius: 8px;
    background: #fff;
    color: #111;
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
    text-align: center;
}

.exam-confirm-dialog strong {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
}

.exam-confirm-dialog p {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.45;
}

.exam-confirm-dialog div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.exam-confirm-dialog button {
    min-height: 42px;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    background: #fff;
    color: #111;
    font-weight: 800;
    cursor: pointer;
}

.exam-confirm-dialog .exam-confirm-ok {
    border-color: var(--green);
    background: var(--green);
    color: #fff;
}

.language-dialog {
    width: min(720px, 100%);
    max-height: min(620px, 90vh);
    overflow: auto;
    border: 2px solid #00aeef;
    background: #fff;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .28);
}

.language-dialog header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 38px;
    padding: 6px 10px;
    background: #000;
    color: #fff;
}

.language-dialog header button {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 3px;
    background: #fff;
    color: #111;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

#languageModalBody {
    padding: 0;
    font-size: 14px;
    line-height: 1.35;
}

#languageModalBody pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: 8px 0 0;
    padding: 10px;
    border: 1px solid #ccd3d8;
    background: #f8fcff;
    font: inherit;
}

.language-support-image {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #ccd3d8;
    background: #fff;
}

.language-support-crop {
    overflow: hidden;
    border: 1px solid #ccd3d8;
    background: #fff;
}

.language-support-crop .language-support-image {
    margin-top: -39px;
    border: 0;
}

.language-guide-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.language-guide-table th,
.language-guide-table td {
    padding: 10px 8px;
    border: 1px solid #6f6f6f;
    vertical-align: middle;
}

.language-guide-table th {
    width: 72px;
    color: #263238;
    font-weight: 400;
    text-align: left;
    white-space: nowrap;
}

.language-guide-table td {
    color: #111;
}

.result-panel {
    padding: 22px 28px;
    border-top: 1px solid #ccd3d8;
    background: #fff;
}

.score {
    font-size: 28px;
    font-weight: 700;
}

.answer-review {
    margin-top: 18px;
    border-top: 1px solid #d7dde5;
}

.review-item {
    padding: 14px 0;
    border-bottom: 1px solid #d7dde5;
}

.review-item strong.correct {
    color: var(--ok);
}

.review-item strong.wrong {
    color: var(--danger);
}

.feedback-window {
    width: min(1120px, calc(100vw - 48px));
    margin: 24px auto;
    background: #fff;
    box-shadow: 0 0 0 1px #c8c8c8;
}

.feedback-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    padding: 0 10px 0 14px;
    background: #000;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.exit-test {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 138px;
    height: 32px;
    border: 1px solid #d59b3d;
    border-radius: 4px;
    background: #ffd890;
    color: #263238;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.feedback-green {
    height: 19px;
    background: var(--green);
}

.feedback-main {
    padding: 14px 24px 28px;
}

.feedback-card {
    border: 1px solid #d4d4d4;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    background: #fff;
}

.feedback-card h1 {
    margin: 0;
    padding: 12px 14px;
    background: #000;
    color: #fff;
    font-size: 14px;
    line-height: 1;
}

.feedback-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 14px;
    border-left: 1px solid #dcdcdc;
    border-right: 1px solid #dcdcdc;
    background: #f8fafc;
    color: #111;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

.feedback-score > span,
.feedback-score > small {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #dce3ea;
    border-radius: 6px;
    background: #fff;
}

.feedback-score small {
    color: #3f4b57;
    font-size: 13px;
    font-weight: 700;
}

.feedback-pass-status {
    min-width: 82px;
    padding: 8px 14px;
    border-radius: 6px;
    color: #fff;
    text-align: center;
    font-size: 15px;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.16);
}

.feedback-pass-status.passed {
    background: #0b8f37;
}

.feedback-pass-status.failed {
    background: #c62828;
}

.feedback-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.feedback-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 12px;
}

.feedback-table th,
.feedback-table td {
    border: 1px solid #dcdcdc;
    vertical-align: middle;
}

.feedback-table th {
    height: 54px;
    background: #f1f3f4;
    text-align: center;
    font-weight: 700;
}

.feedback-table th span,
.feedback-category span,
.feedback-section span,
.feedback-answer span,
.feedback-answer small {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.15;
}

.feedback-table th:nth-child(1) {
    width: 118px;
}

.feedback-table th:nth-child(2) {
    width: 210px;
}

.feedback-table th:nth-child(3) {
    width: 78px;
}

.feedback-table th:nth-child(4) {
    width: 240px;
}

.feedback-section {
    padding: 8px 8px;
    text-align: center;
    line-height: 1.25;
    font-weight: 700;
}

.feedback-section strong,
.feedback-category strong {
    display: block;
}

.feedback-category {
    padding: 10px 12px;
    line-height: 1.35;
    font-weight: 700;
}

.feedback-result {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
}

.feedback-result.correct {
    color: #0b8f37;
}

.feedback-result.wrong {
    color: #001dff;
}

.feedback-answer {
    padding: 10px 12px;
    line-height: 1.35;
    font-weight: 700;
}

.feedback-answer small {
    margin-top: 8px;
    color: #333;
    font-weight: 400;
}

.feedback-answer-key {
    display: block;
    margin-bottom: 6px;
    color: #0b5e16;
}

.feedback-choice-media {
    display: grid;
    gap: 6px;
}

.feedback-choice-media img {
    max-width: 96px;
    max-height: 72px;
    border: 1px solid #d8dee4;
    object-fit: contain;
}

@media (max-width: 880px) {
    .cbt-window,
    .feedback-window {
        width: 100%;
        min-height: 100vh;
        margin: 0;
    }

    .cbt-window {
        height: 100vh;
    }
}

@media (max-width: 720px) {
    body {
        min-width: 0;
    }

    .home {
        padding: 24px 14px;
    }

    .home-header {
        display: block;
        margin-bottom: 18px;
    }

    .home h1 {
        font-size: 25px;
        line-height: 1.2;
    }

    .exam-card {
        display: grid;
        gap: 16px;
        padding: 16px;
    }

    .exam-card h2 {
        font-size: 19px;
        line-height: 1.25;
    }

    .exam-meta {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .exam-meta div {
        min-width: 0;
    }

    .primary-link {
        width: 100%;
    }

    .cbt-body {
        background: #fff;
    }

    .cbt-window {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        height: 100dvh;
        min-height: 100vh;
        min-height: 100dvh;
        grid-template-rows: auto auto 1fr auto;
        overflow: hidden;
    }

    .cbt-header {
        grid-template-columns: minmax(0, 1fr) 112px;
        gap: 8px;
        padding: 8px;
        font-size: 12px;
    }

    .cbt-header-left {
        min-width: 0;
    }

    .cbt-header-left strong,
    .cbt-header-left span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cbt-time {
        grid-template-columns: 18px 1fr;
        grid-column: 1 / -1;
        order: 3;
        min-width: 0;
    }

    .cbt-time span:not(.clock-icon) {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .clock-icon {
        width: 18px;
        height: 18px;
        border-width: 2px;
    }

    .finish-section {
        width: 100%;
        min-height: 38px;
        padding: 0 8px;
        font-size: 12px;
    }

    .cbt-layout {
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .cbt-meta {
        display: grid;
        gap: 2px;
        padding: 4px 8px;
        font-size: 11px;
        line-height: 1.2;
    }

    .cbt-meta span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cbt-rail {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: center;
        min-height: 50px;
        max-height: 72px;
        padding: 6px 8px;
        border-right: 0;
        border-bottom: 1px solid #d2d2d2;
        overflow: hidden;
    }

    .rail-intro {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
        border-bottom: 0;
    }

    .rail-intro .rail-section-label,
    .rail-sections {
        display: none;
    }

    .rail-sections {
        display: block;
        min-width: 0;
    }

    .rail-section-row {
        display: none;
    }

    .rail-section-row.active {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 8px;
        align-items: center;
        min-height: 0;
        border-bottom: 0;
    }

    .rail-section-label {
        padding-top: 0;
    }

    .rail-section-label span {
        max-width: 54px;
        font-size: 12px;
    }

    .rail-section-label i {
        display: none;
    }

    .rail-question-panel {
        padding: 0;
        min-width: 0;
    }

    .rail-label {
        margin: 0;
        font-size: 12px;
    }

    .question-grid {
        display: flex;
        justify-content: flex-start;
        gap: 5px;
        overflow-x: auto;
        padding: 2px 14px 4px 0;
        scrollbar-width: thin;
    }

    .question-dot {
        flex: 0 0 auto;
        width: 34px;
        height: 28px;
        font-size: 12px;
    }

    .question-dot.current::after {
        top: auto;
        right: 11px;
        bottom: -8px;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 8px solid var(--green);
        border-bottom: 0;
    }

    .section-button {
        display: none;
    }

    .section-button.active {
        display: none;
    }

    .cbt-main {
        flex: 1;
        min-height: 0;
        display: block;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .question-top {
        overflow: visible;
        padding: 14px 12px 8px;
    }

    .question-bottom {
        min-height: auto;
        overflow: visible;
        padding: 12px 12px 22px;
    }

    .prompt-box {
        min-height: 0;
        padding: 12px;
        font-size: 19px;
        line-height: 1.55;
    }

    .language-buttons {
        gap: 6px;
        width: min(232px, 100%);
        margin: 8px 0 18px 8px;
    }

    .language-buttons button {
        width: 100%;
        justify-content: space-between;
        height: 34px;
        padding: 0 8px;
        border-color: #777;
        background: #fff;
        color: #333;
        font-size: 16px;
        line-height: 1;
        box-shadow: none;
    }

    .language-guide-icon,
    .language-guide-open {
        color: #555;
        font-size: 18px;
    }

    .passage-box {
        width: 100%;
        padding: 11px;
        font-size: 15px;
        line-height: 1.55;
    }

    .choices {
        width: 100%;
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 0;
        padding-bottom: 8px;
    }

    .choices:has(.choice-media-option),
    .sub-question-choices {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .choice {
        grid-template-columns: 34px 1fr;
        min-height: 48px;
        padding: 9px 10px;
        font-size: 15px;
        line-height: 1.35;
        word-break: break-word;
    }

    .choice-media-option {
        grid-template-columns: 34px minmax(0, 1fr);
        align-items: center;
    }

    .choice-media-option .choice-media {
        justify-items: start;
    }

    .choice-media img,
    .choice-media-option .choice-media img,
    .sub-question-choices .choice-media img {
        width: auto;
        max-width: min(260px, 100%);
        max-height: 170px;
    }

    .question-visual,
    .official-sample-image {
        display: grid;
        justify-items: center;
    }

    .question-visual img,
    .question-visual-scene img,
    .question-visual-document img,
    .official-sample-image img {
        width: auto;
        max-width: 100%;
        max-height: none;
    }

    .sub-question-section {
        margin-bottom: 18px;
    }

    .sub-question-label {
        display: grid;
        gap: 6px;
        padding: 9px 11px;
        margin-bottom: 10px;
        font-size: 16px;
        line-height: 1.35;
    }

    .sub-question-prompt {
        font-size: 14px;
        line-height: 1.4;
    }

    .choice-key {
        width: 24px;
        height: 24px;
    }

    .cbt-footer {
        min-height: 64px;
        padding: 8px 10px;
    }

    .footer-icons {
        gap: 7px;
        font-size: 24px;
    }

    .footer-icons span:last-child {
        display: none;
    }

    .footer-actions {
        flex: 1;
        justify-content: flex-end;
        gap: 8px;
        min-width: 0;
    }

    .flag-button {
        flex: 0 0 48px;
        width: 48px;
        min-height: 48px;
        font-size: 22px;
    }

    .nav-button {
        min-width: 104px;
        min-height: 48px;
        padding: 0 12px;
        font-size: 16px;
        white-space: nowrap;
    }

    .feedback-window {
        min-height: 100svh;
        background: #fff;
    }

    .feedback-header {
        height: auto;
        min-height: 48px;
        padding: 8px 10px;
        font-size: 15px;
    }

    .exit-test {
        width: 104px;
        height: 34px;
        font-size: 13px;
    }

    .feedback-main {
        padding: 12px 10px 20px;
        overflow-x: hidden;
    }

    .feedback-card {
        border-radius: 8px 8px 0 0;
        overflow: hidden;
    }

    .feedback-card h1,
    .feedback-score {
        min-width: 0;
    }

    .feedback-table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
        font-size: 10px;
    }

    .feedback-table th {
        height: auto;
        padding: 8px 3px;
        line-height: 1.25;
    }

    .feedback-table th:nth-child(1) {
        width: 17%;
    }

    .feedback-table th:nth-child(2) {
        width: 27%;
    }

    .feedback-table th:nth-child(3) {
        width: 10%;
    }

    .feedback-table th:nth-child(4),
    .feedback-table th:nth-child(5) {
        width: 23%;
    }

    .feedback-category,
    .feedback-answer {
        padding: 8px 5px;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .feedback-section {
        padding: 8px 3px;
        overflow-wrap: anywhere;
    }

    .feedback-result {
        font-size: 15px;
    }

    .feedback-table th span,
    .feedback-category span,
    .feedback-section span,
    .feedback-answer span,
    .feedback-answer small {
        font-size: 9px;
        line-height: 1.2;
    }

    .feedback-choice-media img {
        max-width: 66px;
        max-height: 58px;
    }
}

@media (max-width: 390px) {
    .cbt-header {
        grid-template-columns: minmax(0, 1fr) 96px;
        gap: 6px;
        padding: 7px;
    }

    .finish-section {
        font-size: 11px;
    }

    .prompt-box {
        font-size: 17px;
    }

    .choice {
        font-size: 14px;
    }

    .cbt-footer {
        padding: 7px 8px;
    }

    .footer-icons {
        display: none;
    }

    .footer-actions {
        justify-content: stretch;
    }

    .flag-button {
        flex-basis: 44px;
        min-height: 44px;
    }

    .nav-button {
        flex: 1;
        min-width: 0;
        min-height: 44px;
        padding: 0 8px;
        font-size: 14px;
    }

    .feedback-table {
        font-size: 9px;
    }

    .feedback-score {
        gap: 8px;
        padding: 8px 10px;
        font-size: 12px;
    }

    .feedback-category,
    .feedback-answer {
        padding: 7px 4px;
    }

    .feedback-choice-media img {
        max-width: 56px;
        max-height: 50px;
    }
}

.admin-body {
    height: auto;
    min-height: 100vh;
    background: #edf2f5;
    overflow-y: auto;
}

.admin-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 28px 18px 44px;
}

.admin-top {
    display: grid;
    grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    margin-bottom: 20px;
}

.admin-top h1 {
    font-size: 28px;
    line-height: 1.2;
}

.admin-nav {
    display: grid;
    justify-items: end;
    gap: 10px;
}

.admin-nav-groups {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-nav-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 6px;
    border: 1px solid #d7dde5;
    border-radius: 8px;
    background: #f8fafc;
}

.admin-nav-group > span {
    padding: 0 6px;
    color: #667085;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.admin-nav a,
.admin-row-actions a,
.admin-section-row a,
.admin-submit-row a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    background: #fff;
    color: #0b5953;
    text-decoration: none;
    font-weight: 700;
}

.admin-nav a {
    min-height: 32px;
    padding: 0 10px;
    border-color: transparent;
    border-radius: 6px;
    background: transparent;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.admin-nav a:hover {
    border-color: #b9d7d3;
    background: #fff;
}

.admin-nav a.is-active {
    border-color: #0f766e;
    background: #0f766e;
    color: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .12);
}

.admin-card {
    margin-bottom: 16px;
    padding: 18px;
    border: 1px solid #d7dde5;
    border-radius: 8px;
    background: #fff;
}

.admin-card h2 {
    margin-bottom: 12px;
    font-size: 20px;
}

.admin-flash,
.admin-error {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 6px;
    background: #e7f5f2;
    color: #0b5953;
    font-weight: 700;
}

.admin-error {
    background: #fee4e2;
    color: #912018;
}

.admin-alert-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.38);
}

.admin-alert-dialog {
    width: min(460px, 100%);
    padding: 20px;
    border: 2px solid #d92d20;
    border-radius: 10px;
    background: #fff5f5;
    color: #7a271a;
    box-shadow: 0 20px 50px rgba(16, 24, 40, 0.28);
    text-align: center;
}

.admin-alert-dialog strong {
    display: block;
    margin-bottom: 8px;
    color: #b42318;
    font-size: 20px;
}

.admin-alert-dialog p {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.45;
}

.admin-alert-dialog button {
    min-width: 92px;
    min-height: 38px;
    border: 0;
    border-radius: 6px;
    background: #d92d20;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.admin-actions {
    margin-bottom: 16px;
}

.admin-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 6px;
    background: #0f766e;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

.admin-primary:hover {
    background: #0b5953;
}

.admin-form {
    display: grid;
    gap: 14px;
}

.admin-form label {
    display: grid;
    gap: 6px;
    color: #344054;
    font-weight: 700;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    background: #fff;
    color: #111;
    font: inherit;
    font-weight: 400;
}

.admin-form textarea {
    resize: vertical;
    line-height: 1.5;
}

.admin-form input[type="file"] {
    width: min(100%, 280px);
    max-width: 100%;
}

.admin-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.admin-login {
    width: min(440px, 100%);
    max-width: 440px;
    margin: 0;
    padding: 28px;
    border: 1px solid #d6e0e7;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(16, 24, 40, .08);
}

.admin-login-home-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    justify-self: start;
    margin-bottom: 14px;
    padding: 0 12px;
    border: 1px solid #cfd8e3;
    border-radius: 7px;
    background: #fff;
    color: #0b5953;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.admin-login-home-link:hover,
.admin-login-home-link:focus-visible {
    border-color: #0b776f;
    background: #eef8f6;
    outline: none;
}

.admin-centered-panel {
    display: grid;
    place-items: start center;
    width: 100%;
}

.admin-login-panel {
    display: grid;
    justify-items: center;
    align-items: center;
    min-height: calc(100vh - 160px);
    width: min(440px, 100%);
    margin: 0 auto;
}

.admin-login-heading {
    display: grid;
    gap: 6px;
    margin-bottom: 6px;
    text-align: center;
}

.admin-login-heading h1 {
    font-size: 28px;
    line-height: 1.15;
}

.admin-login .admin-primary {
    min-height: 42px;
    margin-top: 4px;
}

.password-field {
    position: relative;
    display: grid;
    align-items: center;
}

.admin-form .password-field input {
    padding-right: 44px;
}

.password-field button {
    position: absolute;
    top: 4px;
    right: 8px;
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #475467;
    cursor: pointer;
}

.password-field button:hover {
    background: #eef4f7;
}

.admin-list {
    display: grid;
    gap: 12px;
}

.admin-exam-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
}

.admin-exam-row p,
.admin-user-row p {
    margin: 8px 0;
    color: #667085;
    line-height: 1.45;
}

.admin-user-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
}

.admin-row-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-row-actions form,
.admin-delete-form {
    margin: 0;
}

.admin-row-actions button,
.admin-delete-form button {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #fda29b;
    border-radius: 6px;
    background: #fff;
    color: #b42318;
    font-weight: 700;
    cursor: pointer;
}

.admin-row-actions .admin-neutral-button {
    border-color: #b8c4d0;
    color: #344054;
}

.admin-check-row {
    display: flex;
    gap: 10px;
    align-items: center;
    width: fit-content;
    color: #344054;
    font-weight: 700;
}

.admin-check-row input {
    width: 18px;
    height: 18px;
    accent-color: #0b776f;
}

.admin-status {
    display: inline-flex;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.admin-exam-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 8px;
    color: #475467;
    font-size: 12px;
    font-weight: 700;
}

.admin-edit-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px 12px;
    border: 1px solid #d7dde5;
    border-radius: 6px;
    background: #f8fafc;
    color: #475467;
    font-size: 13px;
    font-weight: 800;
}

.admin-status.is-public {
    background: #dcfae6;
    color: #067647;
}

.admin-status.is-hidden {
    background: #f2f4f7;
    color: #475467;
}

.admin-trash-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid #d7dde5;
    border-radius: 6px;
    background: #fff;
}

.admin-trash-row h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.admin-trash-row p {
    margin: 0 0 4px;
    color: #475467;
    font-size: 13px;
    font-weight: 700;
}

.admin-trash-row small {
    color: #667085;
    line-height: 1.4;
}

.admin-trash-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-trash-actions form {
    margin: 0;
}

.admin-trash-actions button {
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid #fda29b;
    border-radius: 6px;
    background: #fff;
    color: #b42318;
    font-weight: 700;
    cursor: pointer;
}

.admin-trash-actions .admin-neutral-button {
    border-color: #b8c4d0;
    color: #344054;
}

.admin-question-list-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid #d7dde5;
    border-radius: 6px;
    background: #fff;
}

.admin-question-list-heading {
    display: flex;
    gap: 8px;
    align-items: baseline;
    flex-wrap: wrap;
}

.admin-question-list-heading span,
.admin-question-list-row small {
    color: #667085;
    font-size: 12px;
    font-weight: 700;
}

.admin-question-list-row p {
    margin: 6px 0 4px;
    line-height: 1.45;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-pagination-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin: 12px 0;
    color: #475467;
    font-size: 13px;
    font-weight: 800;
}

.admin-pagination-bottom {
    margin-bottom: 0;
}

.admin-pagination-bar form,
.admin-pagination-bar label {
    display: flex;
    gap: 6px;
    align-items: center;
}

.admin-pagination-bar select {
    min-height: 32px;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    background: #fff;
    color: #111;
    font: inherit;
}

.admin-pagination {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    padding: 0 9px;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    background: #fff;
    color: #0b5953;
    font-weight: 800;
    text-decoration: none;
}

.admin-pagination a.is-current {
    border-color: #0b776f;
    background: #0b776f;
    color: #fff;
}

.admin-pagination a.is-disabled {
    pointer-events: none;
    opacity: 0.45;
}

.admin-question-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1080px;
}

.admin-exam-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.admin-stats-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    table-layout: fixed;
}

.admin-stats-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.admin-stats-summary a {
    display: block;
    padding: 16px;
    border: 1px solid #d7dde5;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.admin-stats-summary a:hover,
.admin-stats-summary a.is-current {
    border-color: #0b776f;
    background: #eef8f6;
    box-shadow: inset 0 0 0 1px #0b776f;
}

.admin-stats-summary span {
    display: block;
    color: #667085;
    font-size: 13px;
    font-weight: 800;
}

.admin-stats-summary strong {
    display: block;
    margin-top: 6px;
    color: #0b5953;
    font-size: 28px;
    line-height: 1;
}

.admin-question-table th,
.admin-question-table td,
.admin-exam-table th,
.admin-exam-table td,
.admin-stats-table th,
.admin-stats-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #edf1f5;
    text-align: left;
    vertical-align: middle;
}

.admin-question-table th,
.admin-exam-table th,
.admin-stats-table th {
    color: #344054;
    font-size: 13px;
    font-weight: 900;
    background: #f8fafc;
}

.admin-question-table td,
.admin-exam-table td,
.admin-stats-table td {
    color: #182230;
    font-size: 13px;
    line-height: 1.45;
}

.admin-question-table tbody tr:hover,
.admin-exam-table tbody tr:hover,
.admin-stats-table tbody tr:hover {
    background: #fbfcfe;
}

.admin-question-table tbody tr.admin-shared-group-row {
    background: #fff7df;
    box-shadow: inset 4px 0 0 #f0a400;
}

.admin-question-table tbody tr.admin-shared-group-row:hover {
    background: #fff1c4;
}

.admin-question-table tbody tr.admin-shared-group-row .admin-question-actions-cell {
    background: #fff7df;
}

.admin-group-badge {
    display: inline-flex;
    align-items: center;
    margin: 0 0 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f0a400;
    color: #111;
    font-size: 12px;
    font-weight: 800;
}

.admin-exam-title-cell {
    width: 30%;
}

.admin-exam-table td,
.admin-exam-table th {
    overflow-wrap: anywhere;
}

.admin-exam-table code {
    white-space: normal;
}

.admin-stats-table code {
    white-space: normal;
    overflow-wrap: anywhere;
}

.admin-filter-card {
    padding-bottom: 18px;
}

.admin-stats-filter {
    display: grid;
    grid-template-columns: minmax(160px, 1.1fr) minmax(180px, 1fr) minmax(180px, 1fr) minmax(100px, .6fr) auto auto;
    gap: 12px;
    align-items: end;
}

.admin-stats-filter label {
    display: grid;
    gap: 6px;
    color: #344054;
    font-size: 13px;
    font-weight: 800;
}

.admin-stats-filter input,
.admin-stats-filter select {
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    background: #fff;
    color: #182230;
    font: inherit;
}

.admin-neutral-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    background: #fff;
    color: #0b5953;
    font-weight: 900;
    text-decoration: none;
}

.admin-stats-table small {
    display: block;
    margin-top: 5px;
    color: #667085;
    font-size: 12px;
    font-weight: 700;
}

.admin-user-agent {
    max-width: 300px;
    color: #475467;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.admin-exam-title-cell small {
    display: block;
    margin-top: 5px;
    color: #667085;
    line-height: 1.4;
}

.admin-exam-actions-head,
.admin-exam-actions-cell {
    width: 108px;
    min-width: 108px;
}

.admin-table-actions {
    display: grid;
    gap: 6px;
}

.admin-table-actions form {
    margin: 0;
}

.admin-table-actions a,
.admin-table-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    background: #fff;
    color: #0b5953;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.admin-table-actions a:hover,
.admin-table-actions button:hover {
    border-color: #0b776f;
    background: #eef8f6;
}

.admin-table-actions .admin-danger-button {
    border-color: #fda29b;
    color: #b42318;
}

.admin-table-actions .admin-danger-button:hover {
    border-color: #d92d20;
    background: #fff5f5;
}

.admin-question-exam {
    min-width: 190px;
    max-width: 240px;
    word-break: normal;
    overflow-wrap: normal;
}

.admin-question-table-prompt {
    min-width: 260px;
    color: #101828;
    font-size: 14px;
}

.admin-question-actions-head,
.admin-question-actions-cell {
    width: 96px;
    min-width: 96px;
}

.admin-question-table .admin-question-actions-head,
.admin-question-table .admin-question-actions-cell {
    position: sticky;
    right: 0;
    z-index: 1;
    background: #fff;
    box-shadow: -8px 0 12px rgba(16, 24, 40, 0.04);
}

.admin-question-table .admin-question-actions-head {
    z-index: 2;
    background: #f8fafc;
}

.admin-mini-badge,
.admin-type-pill,
.admin-user-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    font-weight: 800;
    white-space: nowrap;
}

.admin-mini-badge {
    padding: 3px 8px;
    background: #eef4f7;
    color: #344054;
    white-space: normal;
}

.admin-type-pill {
    padding: 3px 8px;
    background: #e6f4f1;
    color: #0b5953;
}

.admin-user-chip {
    padding: 2px 7px;
    background: #f2f4f7;
    color: #344054;
}

.admin-current-user {
    display: inline-flex;
    align-items: center;
    justify-self: end;
    gap: 6px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #b9d7d3;
    border-radius: 7px;
    background: #e7f6f3;
    color: #0b5953;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.admin-current-user strong {
    color: #063b36;
}

.admin-current-user em {
    padding: 2px 7px;
    border-radius: 999px;
    background: #fff;
    color: #344054;
    font-style: normal;
    font-size: 12px;
}

.admin-muted {
    margin-top: -4px;
    color: #667085;
    font-size: 13px;
    font-weight: 700;
}

.admin-sample-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 900;
}

.admin-question-table tbody tr.admin-sample-question-row {
    background: #f8fbff;
    box-shadow: inset 4px 0 0 #2563eb;
}

.admin-question-table tbody tr.admin-sample-question-row:hover {
    background: #eff6ff;
}

.admin-question-table tbody tr.admin-sample-question-row .admin-question-actions-cell {
    background: #f8fbff;
}

.admin-section-list {
    display: grid;
    gap: 8px;
}

.admin-section-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #d7dde5;
    border-radius: 6px;
    background: #f8fafc;
}

.admin-section-row div {
    display: grid;
    gap: 3px;
}

.admin-section-row span,
.admin-question-row > span:nth-child(2) {
    color: #667085;
    font-size: 13px;
}

.admin-question-row {
    display: grid;
    grid-template-columns: 70px 170px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #edf1f5;
}

.admin-question-row.admin-shared-group-row {
    border-left: 5px solid #f0a400;
    background: #fff7df;
}

.admin-question-row.admin-shared-group-row:hover {
    background: #fff1c4;
}

.admin-question-row a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    background: #fff;
    color: #0b5953;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.admin-question-row a:hover {
    border-color: #0b776f;
    background: #eef8f6;
}

.admin-question-summary {
    display: grid;
    gap: 4px;
}

.admin-question-summary small {
    color: #667085;
    font-size: 12px;
    font-weight: 700;
}

.admin-question-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.admin-question-actions form {
    margin: 0;
}

.admin-question-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #fda29b;
    border-radius: 6px;
    background: #fff;
    color: #b42318;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.admin-question-actions button:hover {
    border-color: #d92d20;
    background: #fff5f5;
}

.admin-question-table .admin-question-actions {
    gap: 6px;
    justify-content: flex-start;
    flex-direction: column;
    align-items: stretch;
}

.admin-question-table .admin-question-actions a,
.admin-question-table .admin-question-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    background: #fff;
    color: #0b5953;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.admin-question-table .admin-question-actions a:hover,
.admin-question-table .admin-question-actions button:hover {
    border-color: #0b776f;
    background: #eef8f6;
}

.admin-question-table .admin-question-actions .admin-danger-button {
    border-color: #fda29b;
    color: #b42318;
}

.admin-question-table .admin-question-actions .admin-danger-button:hover {
    border-color: #d92d20;
    background: #fff5f5;
}

.admin-fieldset {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 14px;
    border: 1px solid #d7dde5;
    border-radius: 8px;
}

.admin-optional-block {
    background: #fbfcfe;
}

.admin-optional-block summary {
    cursor: pointer;
    font-weight: 700;
    color: #1d2939;
}

.admin-optional-block[open] summary {
    margin-bottom: 10px;
}

.admin-fieldset legend {
    padding: 0 6px;
    font-weight: 700;
}

.admin-visual-preview {
    position: relative;
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 12px;
    border: 1px solid #d7dde5;
    border-radius: 6px;
    background: #fff;
}

.admin-visual-preview img {
    display: block;
    max-width: min(360px, 100%);
    max-height: 240px;
    object-fit: contain;
}

.admin-visual-preview figcaption {
    color: #667085;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.admin-audio-preview {
    display: grid;
    gap: 6px;
    width: min(520px, 100%);
}

.admin-audio-preview audio {
    width: 100%;
}

.admin-audio-preview small {
    color: #667085;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.admin-audio-fieldset {
    display: block;
    padding: 8px 14px 10px;
}

.admin-audio-fieldset legend {
    margin-bottom: 6px;
}

.admin-audio-tools {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-audio-tools label {
    width: auto;
    min-width: 130px;
}

.admin-inline-secondary,
.admin-inline-danger {
    justify-self: start;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 6px;
    background: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.admin-inline-secondary {
    border: 1px solid #cfd8e3;
    color: #344054;
}

.admin-inline-danger {
    border: 1px solid #fda29b;
    color: #b42318;
}

.admin-icon-danger {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid #fda29b;
    border-radius: 50%;
    background: #fff;
    color: #b42318;
    font: inherit;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.admin-icon-danger:hover {
    background: #fee4e2;
}

.admin-choice-preview {
    position: relative;
    display: inline-grid;
    justify-items: start;
    margin: 0;
}

.admin-choice-preview img {
    display: block;
    max-width: 160px;
    max-height: 110px;
    border: 1px solid #d7dde5;
    border-radius: 4px;
    object-fit: contain;
}

.admin-choice-edit {
    display: grid;
    grid-template-columns: 34px minmax(560px, 1fr) minmax(180px, 240px);
    gap: 12px;
    align-items: end;
    padding: 10px 0;
    border-bottom: 1px solid #edf1f5;
}

.admin-choice-edit .tox-tinymce {
    width: 100%;
}

.admin-choice-media-tools {
    display: grid;
    gap: 8px;
    align-self: start;
}

.admin-choice-edit:last-child {
    border-bottom: 0;
}

.admin-form-note {
    padding: 10px 12px;
    border-radius: 6px;
    background: #f1f5f9;
}

.admin-form-note span {
    display: block;
    margin-top: 4px;
    color: #667085;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
}

.admin-question-jump {
    display: grid;
    grid-template-columns: minmax(150px, .8fr) minmax(320px, 1.2fr);
    gap: 12px 18px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid #b9d7d3;
    border-radius: 8px;
    background: linear-gradient(180deg, #f4fbfa 0%, #eef8f6 100%);
}

.admin-question-jump-head {
    display: grid;
    gap: 4px;
}

.admin-question-jump-head div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
}

.admin-question-jump-head span {
    color: #0b5953;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-question-jump-head strong {
    color: #101828;
    font-size: 18px;
    line-height: 1.2;
}

.admin-question-jump-head small {
    color: #667085;
    font-size: 13px;
    font-weight: 700;
}

.admin-question-jump-actions {
    display: grid;
    grid-template-columns: 92px minmax(140px, 1fr) 92px;
    gap: 8px;
    align-items: center;
}

.admin-question-jump-step,
.admin-question-jump-grid a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border: 1px solid #b9d7d3;
    border-radius: 7px;
    background: #fff;
    color: #0b5953;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
}

.admin-question-jump-step:hover,
.admin-question-jump-grid a:hover {
    border-color: #0f766e;
    background: #e7f6f3;
}

.admin-question-jump-step.is-disabled {
    color: #98a2b3;
    border-color: #d7dde5;
    background: #f2f4f7;
    box-shadow: none;
}

.admin-question-jump-actions select {
    width: 100%;
    min-height: 36px;
    border-color: #b9d7d3;
    border-radius: 7px;
    background-color: #fff;
    color: #1d2939;
    font-size: 13px;
    font-weight: 800;
}

.admin-question-jump-grid {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
}

.admin-question-jump-grid a {
    width: 34px;
    min-height: 34px;
    padding: 0;
}

.admin-question-jump-grid a.is-grouped {
    border-color: var(--group-border);
    background: var(--group-bg);
    color: var(--group-text);
    box-shadow: inset 0 -3px 0 var(--group-border), 0 1px 2px rgba(16, 24, 40, .06);
}

.admin-question-jump-grid a.is-grouped:hover {
    filter: saturate(1.08);
}

.admin-question-jump-grid a.is-current {
    border-color: #0f766e;
    background: #0f766e;
    color: #fff;
}

.admin-question-jump-grid a.is-current.is-grouped {
    border-color: #0f766e;
    background: #0f766e;
    color: #fff;
    box-shadow: inset 0 -4px 0 var(--group-border), 0 2px 4px rgba(16, 24, 40, .14);
}

.admin-question-jump-section {
    display: grid;
    grid-template-columns: minmax(170px, 240px) 1fr;
    gap: 8px 12px;
    align-items: start;
}

.admin-question-jump-section > span {
    color: #344054;
    font-size: 12px;
    font-weight: 900;
    line-height: 34px;
}

.admin-question-jump-section > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.admin-group-note {
    display: grid;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #b2ddff;
    border-radius: 6px;
    background: #eff8ff;
    color: #182230;
}

.admin-group-note span {
    color: #475467;
    font-size: 13px;
    font-weight: 700;
}

.admin-group-note div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-group-note a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid #84caff;
    border-radius: 999px;
    background: #fff;
    color: #0b5953;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.admin-group-note a.is-current {
    border-color: #0b776f;
    background: #d9f2ee;
}

.admin-group-fields {
    background: #fbfcfe;
}

.admin-group-fields small {
    color: #667085;
    font-size: 13px;
    line-height: 1.4;
}

.admin-vietnamese-field {
    padding: 12px;
    border: 1px solid #b9d7d3;
    border-radius: 8px;
    background: #f4fbfa;
}

.admin-vietnamese-field small {
    color: #667085;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.admin-submit-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-submit-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid #fda29b;
    border-radius: 6px;
    background: #fff;
    color: #b42318;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.admin-submit-danger:hover {
    border-color: #d92d20;
    background: #fff5f5;
}

.admin-delete-form {
    display: none;
}

@media (max-width: 820px) {
    .admin-shell {
        padding: 18px 10px 32px;
    }

    .admin-top,
    .admin-exam-row {
        display: grid;
        grid-template-columns: 1fr;
        align-items: start;
        gap: 12px;
    }

    .admin-nav,
    .admin-current-user {
        justify-items: stretch;
        justify-self: stretch;
    }

    .admin-nav-groups {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .admin-nav-group {
        display: grid;
        grid-template-columns: 82px repeat(auto-fit, minmax(112px, 1fr));
        align-items: center;
        width: 100%;
    }

    .admin-nav a {
        min-height: 38px;
    }

    .admin-top h1 {
        font-size: 24px;
    }

    .admin-card {
        padding: 12px;
        border-radius: 6px;
    }

    .admin-grid-2,
    .admin-question-row,
    .admin-choice-edit {
        grid-template-columns: 1fr;
    }

    .admin-stats-summary {
        grid-template-columns: 1fr 1fr;
    }

    .admin-stats-filter {
        grid-template-columns: 1fr;
    }

    .admin-section-row {
        grid-template-columns: 1fr;
    }

    .admin-nav a,
    .admin-row-actions a,
    .admin-section-row a,
    .admin-submit-row a,
    .admin-primary,
    .admin-submit-danger,
    .admin-delete-form button {
        width: 100%;
        min-height: 44px;
    }

    .admin-submit-row,
    .admin-nav,
    .admin-row-actions,
    .admin-question-jump-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

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

    .admin-question-jump-section {
        grid-template-columns: 1fr;
    }

    .admin-question-jump-section > span {
        line-height: 1.3;
    }

    .admin-fieldset {
        padding: 12px;
    }

    .admin-form input[type="file"] {
        padding: 8px;
        font-size: 14px;
    }

    .admin-choice-preview img,
    .admin-visual-preview img {
        max-width: 100%;
        max-height: 180px;
    }

    .admin-delete-form {
        padding: 0 10px 24px;
    }
}
/* Guest entry form */
.guest-entry-body {
    min-height: 100vh;
    margin: 0;
    background: #eef5f8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.guest-entry-shell {
    width: min(100%, 480px);
}

.guest-entry-card {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .16);
}

.guest-home-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin-bottom: 14px;
    padding: 0 12px;
    border: 1px solid #cfd8e3;
    border-radius: 7px;
    background: #fff;
    color: #0b5953;
    font-size: .9rem;
    font-weight: 800;
    text-decoration: none;
}

.guest-home-link:hover,
.guest-home-link:focus-visible {
    border-color: #0b776f;
    background: #eef8f6;
    outline: none;
}

.guest-entry-head {
    margin-bottom: 20px;
}

.guest-entry-head h1 {
    margin: 4px 0 0;
    font-size: 1.35rem;
    line-height: 1.25;
}

.guest-exam-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 20px;
}

.guest-exam-info div {
    border: 1px solid #d7e0eb;
    border-radius: 8px;
    padding: 10px 12px;
    background: #f8fafc;
}

.guest-exam-info dt {
    margin: 0 0 4px;
    color: #64748b;
    font-size: .78rem;
}

.guest-exam-info dd {
    margin: 0;
    color: #0f172a;
    font-weight: 700;
}

.guest-form-group {
    margin-bottom: 16px;
}

.guest-form-group label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: .88rem;
    font-weight: 700;
}

.guest-form-group label span {
    color: #d32f2f;
}

.guest-form-group label em {
    color: #94a3b8;
    font-style: normal;
    font-weight: 500;
}

.guest-form-group input,
.class-combo-input {
    width: 100%;
    box-sizing: border-box;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    color: #334155;
    background: #fff;
    font: inherit;
    font-size: .96rem;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.guest-form-group input:focus,
.class-combo-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.class-combo-input {
    text-transform: uppercase;
}

.class-combo-wrap {
    position: relative;
}

.class-combo-list {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 30;
    display: none;
    max-height: min(240px, 42vh);
    overflow-y: auto;
    margin: 4px 0 0;
    padding: 4px 0;
    list-style: none;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .16);
}

.class-combo-list.open {
    display: block;
}

.class-combo-item,
.class-combo-msg {
    padding: 10px 14px;
    color: #334155;
    font-size: .92rem;
}

.class-combo-item {
    cursor: pointer;
}

.class-combo-item:hover,
.class-combo-item.class-combo-active {
    background: #eff6ff;
}

.class-combo-msg {
    color: #64748b;
}

.guest-start-button {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #244bbf 0%, #0f5a84 100%);
    color: #fff;
    font: inherit;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 7px 20px rgba(15, 90, 132, .25);
}

.guest-start-button:hover {
    filter: brightness(1.04);
}

.guest-form-error {
    margin-bottom: 16px;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: .9rem;
}

.guest-field-error {
    display: none;
    margin-top: 6px;
    color: #d32f2f;
    font-size: .82rem;
}

.guest-field-error.show {
    display: block;
}

.guest-form-group input.input-invalid,
.class-combo-input.input-invalid {
    border-color: #d32f2f;
    background: #fff8f8;
}

.guest-class-notice {
    margin: 8px 0 0;
    padding: 8px 10px;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    background: #fffbeb;
    color: #92400e;
    font-size: .78rem;
    line-height: 1.45;
}

@media (max-width: 560px) {
    .guest-entry-body {
        align-items: flex-start;
        padding: 16px;
    }

    .guest-entry-card {
        padding: 22px;
    }
}
