/*
 * ECourse Describing Object v3.8.0
 * Clean responsive stylesheet for admin, topic list, player, and result views.
 */

:where(.ec-do-admin-shell, .ec-do-topic-page, .ec-do-play-page) {
    --do-primary: #3f78d4;
    --do-primary-dark: #2c5fae;
    --do-success: #55a66a;
    --do-success-dark: #438b56;
    --do-danger: #e84248;
    --do-orange: #f57c35;
    --do-text: #172033;
    --do-muted: #687184;
    --do-border: #dfe4ed;
    --do-surface: #ffffff;
    --do-soft: #f5f7fb;
    --do-radius-sm: 10px;
    --do-radius-md: 16px;
    --do-radius-lg: 22px;
    --do-shadow: 0 12px 32px rgba(31, 43, 66, 0.08);
    width: 100%;
    color: var(--do-text);
    font-family: Poppins, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
}

:where(.ec-do-admin-shell, .ec-do-topic-page, .ec-do-play-page),
:where(.ec-do-admin-shell, .ec-do-topic-page, .ec-do-play-page) * {
    box-sizing: border-box;
}

:where(.ec-do-admin-shell, .ec-do-topic-page, .ec-do-play-page) [hidden] {
    display: none !important;
}

:where(.ec-do-admin-shell, .ec-do-topic-page, .ec-do-play-page) img {
    max-width: 100%;
}

/* Shared typography and controls */
.ec-do-eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    margin: 0 0 8px;
    border-radius: 999px;
    background: #fff1df;
    color: #c96215;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ec-do-admin-head,
.ec-do-section-head,
.ec-do-play-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 20px;
}

.ec-do-admin-head h2,
.ec-do-section-head h2,
.ec-do-play-head h1 {
    margin: 0;
    color: var(--do-text);
    font-size: clamp(21px, 2.1vw, 29px);
    font-weight: 850;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.ec-do-admin-head p,
.ec-do-section-head p {
    margin: 5px 0 0;
    color: var(--do-muted);
    font-size: 14px;
}

.ec-do-admin-actions,
.ec-do-topic-actions,
.ec-do-savebar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ec-do-savebar {
    justify-content: flex-end;
}

.ec-do-btn,
.ec-do-nav-btn,
.ec-do-answer-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 17px;
    border: 0;
    border-radius: 12px;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.ec-do-btn:hover,
.ec-do-nav-btn:hover,
.ec-do-answer-btn:hover {
    transform: translateY(-1px);
}

.ec-do-btn-primary,
.ec-do-nav-primary {
    background: linear-gradient(135deg, var(--do-primary), var(--do-primary-dark));
    color: #fff;
    box-shadow: 0 8px 18px rgba(63, 120, 212, 0.22);
}

.ec-do-btn-success {
    background: linear-gradient(135deg, var(--do-success), var(--do-success-dark));
    color: #fff;
    box-shadow: 0 8px 18px rgba(85, 166, 106, 0.22);
}

.ec-do-btn-soft {
    color: var(--do-text);
    background: var(--do-soft);
    border: 1px solid var(--do-border);
}

.ec-do-btn-small {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 12px;
}

.ec-do-link-danger,
.ec-do-remove-question {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--do-danger);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.ec-do-form-card,
.ec-do-question-builder,
.ec-do-topic-card,
.ec-do-stage-card,
.ec-do-final-card,
.ec-do-topic-panel {
    background: var(--do-surface);
    border: 1px solid var(--do-border);
    border-radius: var(--do-radius-md);
    box-shadow: var(--do-shadow);
}

/* Admin */
.ec-do-admin-shell {
    max-width: 1180px;
    margin: 0 auto;
}

.ec-do-form-card {
    padding: 22px;
    margin: 0 0 20px;
}

.ec-do-form-card h3,
.ec-question-row h3 {
    margin: 0 0 14px;
    font-size: 18px;
    line-height: 1.3;
}

.ec-do-form-card label,
.ec-question-row label {
    display: block;
    margin: 14px 0 6px;
    color: #30394c;
    font-size: 13px;
    font-weight: 800;
}

.ec-do-form-card input,
.ec-do-form-card select,
.ec-do-form-card textarea,
.ec-question-row input,
.ec-question-row textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #bec6d4;
    border-radius: var(--do-radius-sm);
    background: #fff;
    color: var(--do-text);
    font: inherit;
    font-size: 14px;
}

.ec-do-form-card textarea,
.ec-question-row textarea {
    min-height: 108px;
    resize: vertical;
}

.ec-do-form-card input:focus,
.ec-do-form-card select:focus,
.ec-do-form-card textarea:focus,
.ec-question-row input:focus,
.ec-question-row textarea:focus {
    outline: none;
    border-color: var(--do-primary);
    box-shadow: 0 0 0 3px rgba(63, 120, 212, 0.13);
}

.ec-do-help {
    margin: 7px 0 0;
    color: var(--do-muted);
    font-size: 12px;
}

.ec-do-current-image {
    max-width: 280px;
    margin: 8px 0 10px;
}

.ec-do-current-image img,
.ec-do-topic-image img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.ec-do-current-image img {
    max-height: 170px;
    border-radius: 12px;
}

.ec-do-question-builder {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    overflow: hidden;
    margin: 0 0 20px;
}

.ec-do-question-tabs {
    padding: 14px;
    background: #f7f8fb;
    border-right: 1px solid var(--do-border);
}

.ec-do-tab-btn,
.ec-do-collapse-btn {
    width: 100%;
    min-height: 38px;
    padding: 8px 11px;
    margin: 0 0 7px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--do-primary-dark);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.ec-do-tab-btn.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--do-primary-dark), var(--do-primary));
}

.ec-do-question-area {
    min-width: 0;
    padding: 18px;
}

.ec-question-row {
    display: none;
    padding: 18px;
    border: 1px solid var(--do-border);
    border-radius: 14px;
    background: #fff;
}

.ec-question-row.is-active {
    display: block;
}

.ec-do-remove-question {
    min-height: 36px;
    padding: 8px 12px;
    margin-top: 14px;
    border-radius: 999px;
    background: #fff0f1;
}

.ec-do-empty {
    padding: 28px;
    border-radius: var(--do-radius-md);
    background: var(--do-soft);
    color: var(--do-muted);
    text-align: center;
}

.ec-do-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.ec-do-topic-card {
    overflow: hidden;
}

.ec-do-topic-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #edf3ff;
}

.ec-do-topic-image img {
    height: 100%;
}

.ec-do-topic-body {
    padding: 15px;
    text-align: center;
}

.ec-do-topic-body h3 {
    margin: 0 0 5px;
    font-size: 18px;
    line-height: 1.3;
}

.ec-do-topic-body p {
    margin: 0 0 12px;
    color: var(--do-muted);
    font-size: 13px;
}

.ec-do-topic-actions {
    justify-content: center;
}

/* Student topic list and activity — compact style aligned with the other ECourse features */
.ec-do-topic-page,
.ec-do-play-page {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: clamp(12px, 2vw, 22px);
}

.ec-do-topic-page {
    font-size: 14px;
}

.ec-do-hero {
    position: relative;
    min-height: 138px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: clamp(22px, 4vw, 38px);
    margin-bottom: 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6f98f2 0%, #82a9f7 100%);
    box-shadow: 0 5px 15px rgba(61, 105, 194, 0.15);
}

.ec-do-hero::before,
.ec-do-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.ec-do-hero::before {
    width: 180px;
    height: 180px;
    right: -38px;
    top: -86px;
}

.ec-do-hero::after {
    width: 90px;
    height: 90px;
    right: 118px;
    bottom: -53px;
}

.ec-do-hero > div {
    position: relative;
    z-index: 1;
    max-width: 620px;
}

.ec-do-eyebrow {
    min-height: 0;
    padding: 0;
    margin-bottom: 4px;
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    font-size: 10px;
    letter-spacing: 0.06em;
}

.ec-do-hero h1 {
    margin: 0 0 5px;
    color: #fff;
    font-size: clamp(25px, 3.2vw, 34px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.ec-do-hero p {
    max-width: 580px;
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(12px, 1.4vw, 14px);
    line-height: 1.55;
}

.ec-do-topic-panel {
    padding: clamp(16px, 2.2vw, 22px);
    border-radius: 11px;
    box-shadow: none;
}

.ec-do-topic-panel .ec-do-section-head {
    align-items: center;
    margin-bottom: 16px;
}

.ec-do-topic-panel .ec-do-section-head h2 {
    font-size: clamp(16px, 1.8vw, 19px);
}

.ec-do-topic-panel .ec-do-section-head p {
    font-size: 12px;
}

.ec-do-topic-panel .ec-card-grid,
.ec-do-topic-panel .ec-card-grid.three {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important;
    gap: 14px !important;
}

.ec-do-topic-student-card,
.ec-do-topic-panel .ec-card.ec-do-topic-student-card {
    display: flex !important;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    padding: 0 0 13px !important;
    border: 1px solid #dfe3ea !important;
    border-radius: 9px !important;
    background: #fff !important;
    box-shadow: none !important;
    text-align: center;
}

.ec-do-topic-student-card :where(.ec-card-image, .ec-course-card-image, figure, picture) {
    width: 100%;
    margin: 0;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #f3f6fc;
}

.ec-do-topic-student-card img {
    width: 100% !important;
    height: 128px !important;
    display: block;
    object-fit: cover;
}

.ec-do-topic-student-card h3 {
    margin: 10px 10px 3px !important;
    color: #171d2a;
    font-size: 14px !important;
    font-weight: 750;
    line-height: 1.3;
}

.ec-do-topic-student-card p {
    margin: 0 10px 9px !important;
    color: #6e7685 !important;
    font-size: 11px !important;
    line-height: 1.3;
}

.ec-do-topic-student-card .ec-btn {
    align-self: center;
    min-width: 98px;
    min-height: 34px;
    padding: 8px 14px;
    margin: auto 10px 0;
    border: 0;
    border-radius: 7px;
    background: #ff7b32;
    color: #fff;
    font-size: 11px;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    box-shadow: none;
}

/* Student player */
.ec-do-play-page {
    max-width: 860px;
    color: #171d2a;
    font-size: 14px;
}

.ec-do-player,
.ec-do-final-page {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
}

.ec-do-play-head {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 52px;
    align-items: center;
    gap: 10px;
    margin: 0 0 9px;
    padding: 0 2px;
}

.ec-do-play-title {
    min-width: 0;
    text-align: center;
}

.ec-do-play-title h1,
.ec-do-play-head h1 {
    margin: 0;
    overflow-wrap: anywhere;
    color: #111722;
    font-size: clamp(16px, 1.8vw, 19px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.ec-do-play-title p {
    margin: 2px 0 0;
    color: #6c7380;
    font-size: 10px;
    line-height: 1.35;
}

.ec-do-back-inline {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid #dfe3e9;
    border-radius: 8px;
    background: #fff;
    color: #354052;
    text-decoration: none !important;
    box-shadow: none;
}

.ec-do-back-inline svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.ec-do-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid #dfe5ee;
    border-radius: 999px;
    background: #f7f9fc;
    color: #556174;
    font-size: 10px;
    font-weight: 750;
}

.ec-do-stage-card {
    min-height: 0;
    padding: clamp(15px, 2.2vw, 20px);
    border: 1px solid #d9dee7;
    border-radius: 9px;
    background: #fff;
    box-shadow: none;
}

.ec-do-stage-layout {
    display: grid;
    grid-template-columns: minmax(180px, 29%) minmax(0, 1fr);
    align-items: start;
    gap: clamp(15px, 2.2vw, 21px);
}

.ec-do-image-wrap {
    width: 100%;
    max-width: 220px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border: 1px solid #e0e4ea;
    border-radius: 5px;
    background: #f2f4f7;
}

.ec-do-image-wrap img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.ec-do-question-content {
    min-width: 0;
    padding-top: 1px;
}

.ec-do-question-content h2,
#ec-do-question-title {
    margin: 0 0 9px;
    color: #111722;
    font-size: clamp(14px, 1.5vw, 16px);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0;
}

.ec-do-audio-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(100%, 470px);
    margin: 0 0 5px;
}

.ec-do-icon-btn {
    appearance: none;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #111;
    cursor: pointer;
    box-shadow: none;
}

.ec-do-icon-btn:hover {
    background: #f1f3f6;
}

.ec-do-icon-btn svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}

.ec-do-audio-bar {
    position: relative;
    flex: 1;
    min-width: 80px;
    height: 8px;
    overflow: hidden;
    border-radius: 2px;
    background: #555;
}

.ec-do-audio-bar span {
    display: block;
    width: 0;
    height: 100%;
    background: #222;
    transition: width 0.2s linear;
}

.ec-do-audio-bar.is-speaking span {
    animation: ecDoAudio 3.8s linear forwards;
}

@keyframes ecDoAudio {
    from { width: 0; }
    to { width: 100%; }
}

.ec-do-instruction {
    max-width: 620px;
    margin: 0;
    color: #777f8d;
    font-size: 10px;
    line-height: 1.4;
}

.ec-do-record-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 12px 0 0;
}

.ec-do-answer-btn {
    min-height: 32px;
    padding: 6px 12px;
    border: 0;
    border-radius: 7px;
    background: #5bad6b;
    color: #fff;
    font-size: 11px;
    font-weight: 750;
    box-shadow: none;
}

.ec-do-answer-btn:hover {
    background: #4d9a5d;
}

.ec-do-answer-btn svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.ec-do-answer-btn.is-recording {
    background: #ef3138;
}

.ec-do-answer-btn.is-loading {
    background: #6b7280;
    cursor: wait;
}

.ec-do-answer-btn:disabled,
.ec-do-nav-btn:disabled,
.ec-do-nav-btn.is-disabled {
    opacity: 0.52;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ec-do-recording {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 6px 9px;
    border-radius: 6px;
    background: transparent;
    color: #697180;
    font-size: 10px;
    font-weight: 600;
}

.ec-do-wave {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 17px;
}

.ec-do-wave i {
    width: 3px;
    height: 10px;
    border-radius: 999px;
    background: #777;
    animation: ecDoWave 0.72s ease-in-out infinite;
}

.ec-do-wave i:nth-child(2) { height: 15px; animation-delay: 0.1s; }
.ec-do-wave i:nth-child(3) { height: 12px; animation-delay: 0.2s; }
.ec-do-wave i:nth-child(4) { height: 14px; animation-delay: 0.3s; }

@keyframes ecDoWave {
    0%, 100% { transform: scaleY(0.55); }
    50% { transform: scaleY(1); }
}

.ec-do-transcript-box,
.ec-do-question-feedback {
    width: 100%;
    margin-top: 8px;
    padding: 9px 11px;
    border: 1px solid #e1e5eb;
    border-radius: 6px;
    background: #f6f7fa;
}

.ec-do-transcript-box strong {
    display: block;
    margin-bottom: 2px;
    color: #4e5766;
    font-size: 9px;
    font-weight: 700;
    text-transform: none;
}

.ec-do-transcript-box p {
    margin: 0;
    color: #343c49;
    font-size: 11px;
    line-height: 1.4;
}

.ec-do-question-feedback {
    padding: 8px 10px;
}

.ec-do-question-feedback.is-correct {
    border-color: #cfe6d4;
    background: #f1f9f3;
}

.ec-do-question-feedback.is-wrong {
    border-color: #efd7d8;
    background: #fff3f3;
}

.ec-do-question-feedback h3 {
    margin: 0 0 2px;
    color: #2d3542;
    font-size: 10px;
    font-weight: 750;
    line-height: 1.3;
}

.ec-do-feedback-main,
.ec-do-suggestion {
    margin: 0;
    color: #555e6d;
    font-size: 10px;
    line-height: 1.4;
}

.ec-do-suggestion {
    margin-top: 2px;
    padding: 0;
    background: transparent;
}

.ec-do-suggestion strong {
    color: #353d49;
}

.ec-do-nav-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid #edf0f4;
}

.ec-do-nav-btn {
    min-width: 86px;
    min-height: 32px;
    padding: 8px 13px;
    border: 1px solid #d9dee6;
    border-radius: 7px;
    background: #f4f6f9;
    color: #303948;
    font-size: 11px;
    font-weight: 750;
    box-shadow: none;
}

.ec-do-nav-primary,
.ec-do-nav-primary:hover {
    border-color: #3977dd;
    background: #3977dd;
    color: #fff;
}

.ec-do-nav-primary.is-done,
.ec-do-nav-primary.is-done:hover {
    border-color: #3977dd;
    background: #3977dd;
}

.ec-do-player.is-single-question .ec-do-nav-row {
    justify-content: center;
}

.ec-do-player.is-single-question #ec-do-next {
    min-width: 116px;
}

.ec-do-exit-row {
    display: flex;
    justify-content: center;
    margin-top: 11px;
}

.ec-do-back-topic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    min-height: 32px;
    padding: 7px 13px;
    border-radius: 6px;
    background: #ff7430;
    color: #fff !important;
    font-size: 10px;
    font-weight: 750;
    line-height: 1;
    text-decoration: none !important;
}

/* Final result */
.ec-do-final-page {
    padding-top: 2px;
}

.ec-do-final-card {
    max-width: 650px;
    margin: 0 auto;
    padding: clamp(24px, 4vw, 34px);
    border: 1px solid #dfe3e9;
    border-radius: 9px;
    background: #fff;
    box-shadow: none;
    text-align: center;
}

.ec-do-final-card h2 {
    margin: 0 0 4px;
    color: #4a9b5a;
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 850;
    line-height: 1.2;
}

.ec-do-final-subtitle {
    margin: 0 0 15px;
    color: #17202d;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.ec-do-final-result {
    max-width: 540px;
    margin: 0 auto 14px;
    padding: 16px;
    border: 1px solid #dfe3e9;
    border-radius: 7px;
}

.ec-do-final-result > h3 {
    margin: 0 0 8px;
    color: #4e5764;
    font-size: 11px;
    font-weight: 650;
}

.ec-do-progress-pill {
    position: relative;
    width: min(280px, 100%);
    min-height: 31px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
    padding: 5px 11px;
    margin: 0 auto 11px;
    border: 1px solid #e2e6ec;
    border-radius: 7px;
    background: #fff;
}

.ec-do-progress-pill span {
    position: absolute;
    left: 11px;
    top: 50%;
    width: 0;
    max-width: calc(100% - 58px);
    height: 8px;
    transform: translateY(-50%);
    border-radius: 999px;
    background: #58a968;
    transition: width 0.35s ease;
}

.ec-do-progress-pill b {
    position: relative;
    z-index: 1;
    color: #1b2430;
    font-size: 12px;
}

.ec-do-final-feedback {
    max-width: 520px;
    margin: 0 auto;
    padding: 11px 13px;
    border: 1px solid #e2e5eb;
    border-radius: 6px;
    background: #f6f7fa;
    text-align: left;
}

.ec-do-final-feedback > h3 {
    margin: 0 0 3px;
    color: #171d27;
    font-size: 12px;
    font-weight: 800;
}

.ec-do-final-feedback > p {
    margin: 0;
    color: #596271;
    font-size: 10px;
    line-height: 1.45;
}

#ec-do-back-final {
    min-width: 130px;
    min-height: 34px;
    padding: 8px 13px;
    margin-top: 0;
    border-radius: 6px;
    background: #58a968;
    color: #fff;
    font-size: 10px;
    box-shadow: none;
}

/* Admin + student responsive behavior */
@media (max-width: 900px) {
    .ec-do-question-builder {
        grid-template-columns: 1fr;
    }

    .ec-do-question-tabs {
        display: flex;
        align-items: center;
        gap: 7px;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid var(--do-border);
    }

    .ec-do-tab-btn,
    .ec-do-collapse-btn {
        width: auto;
        flex: 0 0 auto;
        margin: 0;
        white-space: nowrap;
    }
}

@media (max-width: 720px) {
    .ec-do-admin-head,
    .ec-do-section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .ec-do-admin-actions,
    .ec-do-savebar {
        width: 100%;
    }

    .ec-do-admin-actions .ec-do-btn,
    .ec-do-savebar .ec-do-btn {
        flex: 1;
    }

    .ec-do-topic-panel .ec-card-grid,
    .ec-do-topic-panel .ec-card-grid.three {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .ec-do-stage-layout {
        grid-template-columns: minmax(180px, 35%) minmax(0, 1fr);
        gap: 16px;
    }

    .ec-do-image-wrap {
        max-width: none;
    }
}

@media (max-width: 600px) {
    .ec-do-topic-page,
    .ec-do-play-page {
        padding: 10px;
    }

    .ec-do-hero {
        min-height: 122px;
        padding: 20px;
        border-radius: 10px;
    }

    .ec-do-topic-panel {
        padding: 14px;
    }

    .ec-do-play-head {
        grid-template-columns: 34px minmax(0, 1fr) 46px;
        gap: 7px;
    }

    .ec-do-play-title h1,
    .ec-do-play-head h1 {
        font-size: 16px;
    }

    .ec-do-play-title p {
        font-size: 9px;
    }

    .ec-do-back-inline {
        width: 32px;
        height: 32px;
    }

    .ec-do-count {
        min-width: 44px;
        min-height: 26px;
        font-size: 9px;
    }

    .ec-do-stage-card {
        padding: 14px;
    }

    .ec-do-stage-layout {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .ec-do-image-wrap {
        width: min(100%, 360px);
        margin: 0 auto;
        aspect-ratio: 16 / 10;
    }

    .ec-do-question-content h2,
    #ec-do-question-title {
        font-size: 15px;
    }

    .ec-do-audio-row {
        width: 100%;
    }

    .ec-do-record-row {
        margin-top: 10px;
    }

    .ec-do-nav-row {
        justify-content: stretch;
    }

    .ec-do-nav-btn {
        flex: 1 1 0;
        min-width: 0;
    }

    .ec-do-player.is-single-question #ec-do-next {
        flex: 0 1 130px;
    }

    .ec-do-final-card {
        padding: 22px 15px;
    }

    .ec-do-final-result {
        padding: 13px;
    }
}

@media (max-width: 430px) {
    .ec-do-topic-panel .ec-card-grid,
    .ec-do-topic-panel .ec-card-grid.three {
        grid-template-columns: 1fr !important;
    }

    .ec-do-topic-student-card img {
        height: 160px !important;
    }

    .ec-do-play-head {
        grid-template-columns: 32px minmax(0, 1fr) 42px;
    }

    .ec-do-play-title h1,
    .ec-do-play-head h1 {
        font-size: 15px;
    }

    .ec-do-stage-card {
        padding: 12px;
    }

    .ec-do-answer-btn,
    .ec-do-recording {
        min-height: 34px;
    }
}

@media (prefers-reduced-motion: reduce) {
    :where(.ec-do-admin-shell, .ec-do-topic-page, .ec-do-play-page) *,
    :where(.ec-do-admin-shell, .ec-do-topic-page, .ec-do-play-page) *::before,
    :where(.ec-do-admin-shell, .ec-do-topic-page, .ec-do-play-page) *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.ec-do-play-page .ec-do-nav-btn:hover,
.ec-do-play-page .ec-do-answer-btn:hover,
.ec-do-topic-page .ec-btn:hover,
.ec-do-play-page .ec-do-btn:hover { transform: none; }


/* =========================================================
   STUDENT UI v3.7.0 — MATCH ECOURSE CORE
   Uses the same ec-kid-* structure as Listening/Reading.
   ========================================================= */

.ec-do-topic-page,
.ec-do-play-page {
    --ec-kid-blue: var(--ec-blue, #2f6fc8);
    --ec-kid-blue-dark: #245eaf;
    --ec-kid-orange: var(--ec-orange, #ff8412);
    --ec-kid-text: var(--ec-text, #0b0b0f);
    --ec-kid-muted: #697386;
    --ec-kid-border: #e0e6ef;
    width: calc(100% - 32px) !important;
    max-width: 1320px !important;
    min-height: 0 !important;
    margin: 18px auto 28px !important;
    padding: clamp(18px, 2.2vw, 28px) !important;
    display: block !important;
    overflow: hidden !important;
    color: var(--ec-kid-text) !important;
    background: rgba(255, 255, 255, 0.97) !important;
    border: 1px solid rgba(217, 219, 227, 0.95) !important;
    border-radius: 22px !important;
    box-shadow: 0 18px 45px rgba(27, 40, 63, 0.12) !important;
    font-family: Poppins, Arial, sans-serif !important;
    font-size: 12px !important;
    line-height: 1.55 !important;
}

.ec-do-topic-page *,
.ec-do-play-page * {
    box-sizing: border-box !important;
}

.ec-do-topic-page .screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Topic list: identical structure and proportions to core topics. */
.ec-do-topic-page.ec-kid-topics-page {
    display: grid !important;
    gap: 16px !important;
}

.ec-do-topic-page .ec-kid-topic-hero {
    min-height: 162px !important;
    margin: 0 !important;
    padding: 20px 22px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 245px !important;
    align-items: center !important;
    gap: 20px !important;
    position: relative !important;
    overflow: hidden !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #438df0 0%, #2f7ee5 100%) !important;
    border: 0 !important;
    border-radius: 17px !important;
    box-shadow: 0 10px 25px rgba(47, 111, 200, 0.18) !important;
}

.ec-do-topic-page .ec-kid-topic-hero::before,
.ec-do-topic-page .ec-kid-topic-hero::after {
    content: "" !important;
    position: absolute !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.11) !important;
    pointer-events: none !important;
}

.ec-do-topic-page .ec-kid-topic-hero::before {
    width: 230px !important;
    height: 230px !important;
    right: -92px !important;
    bottom: -132px !important;
}

.ec-do-topic-page .ec-kid-topic-hero::after {
    width: 105px !important;
    height: 105px !important;
    right: 170px !important;
    top: -45px !important;
}

.ec-do-topic-page .ec-kid-topic-hero > div:first-child {
    min-width: 0 !important;
    position: relative !important;
    z-index: 2 !important;
}

.ec-do-topic-page .ec-kid-topic-kicker {
    display: block !important;
    margin: 0 0 6px !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 9px !important;
    line-height: 1.4 !important;
    font-weight: 750 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}

.ec-do-topic-page .ec-kid-topic-hero h1 {
    margin: 0 0 5px !important;
    color: #ffffff !important;
    font-size: clamp(25px, 3vw, 34px) !important;
    line-height: 1.18 !important;
    font-weight: 760 !important;
    letter-spacing: -0.035em !important;
}

.ec-do-topic-page .ec-kid-topic-hero p {
    max-width: 560px !important;
    margin: 0 !important;
    color: rgba(255, 255, 255, 0.92) !important;
    font-size: 11.5px !important;
    line-height: 1.55 !important;
}

.ec-do-topic-page .ec-kid-topic-hero-image {
    width: 245px !important;
    height: 126px !important;
    justify-self: end !important;
    position: relative !important;
    z-index: 2 !important;
    overflow: hidden !important;
    background: rgba(255, 255, 255, 0.24) !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    border-radius: 15px !important;
    box-shadow: 0 8px 20px rgba(24, 82, 163, 0.16) !important;
}

.ec-do-topic-page .ec-kid-topic-hero-image-file,
.ec-do-topic-page .ec-kid-topic-hero-image img {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center !important;
    border: 0 !important;
    border-radius: 0 !important;
}

.ec-do-topic-page .ec-kid-topic-hero-image-fallback {
    width: 100% !important;
    height: 100% !important;
    display: grid !important;
    place-items: center !important;
    color: #ffffff !important;
    font-size: 32px !important;
}

.ec-do-topic-page .ec-kid-topic-section {
    width: 100% !important;
    margin: 0 !important;
    padding: 16px !important;
    background: #ffffff !important;
    border: 1px solid #e4e8ee !important;
    border-radius: 17px !important;
    box-shadow: 0 5px 16px rgba(22, 34, 51, 0.045) !important;
}

.ec-do-topic-page .ec-kid-topic-toolbar {
    margin: 0 0 13px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
}

.ec-do-topic-page .ec-kid-topic-search {
    width: min(500px, 100%) !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
}

.ec-do-topic-page .ec-kid-topic-search input[type="search"] {
    min-width: 0 !important;
    min-height: 38px !important;
    flex: 1 1 auto !important;
    margin: 0 !important;
    padding: 8px 11px !important;
    color: var(--ec-kid-text) !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 9px !important;
    box-shadow: none !important;
    font: inherit !important;
    font-size: 11px !important;
}

.ec-do-topic-page .ec-kid-topic-search button,
.ec-do-topic-page .ec-kid-topic-search a {
    min-height: 38px !important;
    padding: 8px 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 9px !important;
    font: inherit !important;
    font-size: 10.5px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

.ec-do-topic-page .ec-kid-topic-search button {
    color: #ffffff !important;
    background: var(--ec-kid-blue) !important;
    border: 1px solid var(--ec-kid-blue) !important;
}

.ec-do-topic-page .ec-kid-topic-search a {
    color: #4f5b6d !important;
    background: #ffffff !important;
    border: 1px solid #d5dce6 !important;
}

.ec-do-topic-page .ec-kid-topic-total {
    min-height: 30px !important;
    padding: 6px 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    color: #2c62a6 !important;
    background: #eaf3ff !important;
    border-radius: 999px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}

.ec-do-topic-page .ec-kid-topic-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(210px, 1fr)) !important;
    grid-auto-rows: 1fr !important;
    gap: 14px !important;
}

.ec-do-topic-page .ec-kid-topic-card {
    min-width: 0 !important;
    min-height: 0 !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border: 1px solid #e1e6ed !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 13px rgba(22, 34, 51, 0.055) !important;
}

.ec-do-topic-page .ec-kid-topic-media-wrap {
    position: relative !important;
}

.ec-do-topic-page .ec-kid-card-media {
    width: 100% !important;
    height: 142px !important;
    position: relative !important;
    overflow: hidden !important;
    background: #eaf3ff !important;
    border-bottom: 1px solid #e0e6ef !important;
}

.ec-do-topic-page .ec-kid-card-media img,
.ec-do-topic-page .ec-kid-card-image {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center !important;
    border: 0 !important;
    border-radius: 0 !important;
}

.ec-do-topic-page .ec-kid-card-image-fallback {
    width: 100% !important;
    height: 100% !important;
    padding: 14px !important;
    display: grid !important;
    place-items: center !important;
    color: #345681 !important;
    background: linear-gradient(135deg, #dcecff, #f1f7ff) !important;
    font-size: 13px !important;
    font-weight: 750 !important;
    text-align: center !important;
}

.ec-do-topic-page .ec-kid-topic-number {
    width: 25px !important;
    height: 25px !important;
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    z-index: 2 !important;
    display: grid !important;
    place-items: center !important;
    color: #ffffff !important;
    background: var(--ec-kid-blue) !important;
    border-radius: 8px !important;
    font-size: 9px !important;
    font-weight: 750 !important;
}

.ec-do-topic-page .ec-kid-topic-state {
    min-height: 25px !important;
    padding: 4px 7px 4px 4px !important;
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    z-index: 2 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    color: #386c3f !important;
    background: rgba(240, 249, 241, 0.96) !important;
    border: 1px solid #d3e9d6 !important;
    border-radius: 999px !important;
    font-size: 8px !important;
    font-weight: 750 !important;
}

.ec-do-topic-page .ec-kid-topic-state.is-new {
    color: #2c62a6 !important;
    background: rgba(234, 243, 255, 0.96) !important;
    border-color: #d8e8fb !important;
}

.ec-do-topic-page .ec-kid-topic-state b {
    width: 17px !important;
    height: 17px !important;
    display: grid !important;
    place-items: center !important;
    color: inherit !important;
    background: #ffffff !important;
    border-radius: 50% !important;
    font-size: 9px !important;
}

.ec-do-topic-page .ec-kid-card-content {
    min-height: 132px !important;
    padding: 11px 12px 12px !important;
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 7px !important;
}

.ec-do-topic-page .ec-kid-topic-card h2 {
    min-height: 38px !important;
    margin: 0 !important;
    display: -webkit-box !important;
    overflow: hidden !important;
    color: var(--ec-kid-text) !important;
    font-size: 14px !important;
    line-height: 1.34 !important;
    font-weight: 750 !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
}

.ec-do-topic-page .ec-kid-topic-meta {
    width: 100% !important;
    min-height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 7px !important;
}

.ec-do-topic-page .ec-kid-material-badge {
    min-height: 23px !important;
    padding: 4px 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    color: #2869c4 !important;
    background: #e9f3ff !important;
    border-radius: 999px !important;
    font-size: 9px !important;
    font-weight: 700 !important;
}

.ec-do-topic-page .ec-kid-topic-meta small {
    color: #687080 !important;
    font-size: 8.5px !important;
}

.ec-do-topic-page .ec-kid-topic-link {
    width: 100% !important;
    min-height: 34px !important;
    margin: auto 0 0 !important;
    padding: 6px 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    color: var(--ec-kid-blue) !important;
    background: #f1f6fd !important;
    border: 1px solid #dbe8f9 !important;
    border-radius: 8px !important;
    font-size: 10px !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

.ec-do-topic-page .ec-kid-topic-link:hover {
    color: #ffffff !important;
    background: var(--ec-kid-blue) !important;
    border-color: var(--ec-kid-blue) !important;
}

.ec-do-topic-page .ec-kid-topic-link span {
    font-size: 17px !important;
    line-height: 1 !important;
}

/* Player: same direct-page header and centered material card as core. */
.ec-do-play-page {
    max-width: 1240px !important;
}

.ec-do-play-page .ec-do-player,
.ec-do-play-page .ec-do-final-page {
    width: 100% !important;
    max-width: 980px !important;
    margin: 0 auto !important;
}

.ec-do-play-page .ec-kid-material-page-header {
    min-height: 58px !important;
    margin: 0 0 15px !important;
    padding: 10px 13px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    background: #ffffff !important;
    border: 1px solid #e0e5ec !important;
    border-radius: 13px !important;
    box-shadow: 0 4px 13px rgba(22, 34, 51, 0.045) !important;
}

.ec-do-play-page .ec-kid-page-back {
    width: 36px !important;
    height: 36px !important;
    flex: 0 0 36px !important;
    display: inline-grid !important;
    place-items: center !important;
    color: #344054 !important;
    background: #f7f9fc !important;
    border: 1px solid #dce2e9 !important;
    border-radius: 9px !important;
    font-size: 25px !important;
    line-height: 1 !important;
    font-weight: 500 !important;
    text-decoration: none !important;
}

.ec-do-play-page .ec-kid-material-page-header > div {
    min-width: 0 !important;
}

.ec-do-play-page .ec-kid-material-page-header h1 {
    margin: 0 !important;
    color: var(--ec-kid-text) !important;
    font-size: clamp(19px, 2vw, 24px) !important;
    line-height: 1.3 !important;
    font-weight: 750 !important;
}

.ec-do-play-page .ec-kid-material-page-header p {
    margin: 3px 0 0 !important;
    color: #687080 !important;
    font-size: 10.5px !important;
    line-height: 1.45 !important;
}

.ec-do-play-page .ec-do-stage-card {
    width: 100% !important;
    max-width: 980px !important;
    margin: 0 auto !important;
    padding: 14px !important;
    display: block !important;
    background: #ffffff !important;
    border: 1px solid #dfe4eb !important;
    border-radius: 15px !important;
    box-shadow: 0 5px 15px rgba(22, 34, 51, 0.05) !important;
}

.ec-do-play-page .ec-do-question-toolbar {
    min-height: 34px !important;
    margin: 0 0 12px !important;
    padding: 0 0 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    border-bottom: 1px solid #edf0f4 !important;
}

.ec-do-play-page .ec-do-question-label {
    color: #344054 !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
    font-weight: 750 !important;
}

.ec-do-play-page .ec-do-count {
    min-width: 48px !important;
    min-height: 27px !important;
    padding: 5px 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #2c62a6 !important;
    background: #eaf3ff !important;
    border: 1px solid #d8e8fb !important;
    border-radius: 999px !important;
    font-size: 9.5px !important;
    line-height: 1 !important;
    font-weight: 750 !important;
}

.ec-do-play-page .ec-do-stage-layout {
    display: grid !important;
    grid-template-columns: minmax(230px, 300px) minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 20px !important;
}

.ec-do-play-page .ec-do-image-wrap {
    width: 100% !important;
    min-height: 180px !important;
    aspect-ratio: 4 / 3 !important;
    margin: 0 !important;
    overflow: hidden !important;
    background: #f2f5f9 !important;
    border: 1px solid #dfe4eb !important;
    border-radius: 12px !important;
}

.ec-do-play-page .ec-do-image-wrap img {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center !important;
    border: 0 !important;
    border-radius: 0 !important;
}

.ec-do-play-page .ec-do-question-content {
    min-width: 0 !important;
    padding: 1px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
}

.ec-do-play-page #ec-do-question-title {
    margin: 0 0 9px !important;
    color: #111827 !important;
    font-size: clamp(15px, 1.7vw, 18px) !important;
    line-height: 1.42 !important;
    font-weight: 700 !important;
}

.ec-do-play-page .ec-do-audio-row {
    width: 100% !important;
    max-width: 520px !important;
    margin: 0 0 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.ec-do-play-page .ec-do-icon-btn {
    width: 31px !important;
    height: 31px !important;
    flex: 0 0 31px !important;
    padding: 0 !important;
    display: inline-grid !important;
    place-items: center !important;
    color: #344054 !important;
    background: #f7f9fc !important;
    border: 1px solid #dce2e9 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
}

.ec-do-play-page .ec-do-icon-btn svg {
    width: 17px !important;
    height: 17px !important;
    fill: currentColor !important;
}

.ec-do-play-page .ec-do-audio-bar {
    height: 7px !important;
    flex: 1 1 auto !important;
    position: relative !important;
    overflow: hidden !important;
    background: #e6e9ee !important;
    border-radius: 999px !important;
}

.ec-do-play-page .ec-do-audio-bar > span {
    width: 0;
    height: 100% !important;
    display: block !important;
    background: #4d5562 !important;
    border-radius: inherit !important;
    transition: width 0.25s ease !important;
}

.ec-do-play-page .ec-do-instruction {
    margin: 0 0 10px !important;
    color: #687080 !important;
    font-size: 10.5px !important;
    line-height: 1.5 !important;
}

.ec-do-play-page .ec-do-record-row {
    min-height: 34px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    flex-wrap: wrap !important;
}

.ec-do-play-page .ec-do-answer-btn {
    min-width: 92px !important;
    min-height: 34px !important;
    padding: 7px 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    color: #ffffff !important;
    background: #5aa96b !important;
    border: 1px solid #5aa96b !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 10px rgba(90, 169, 107, 0.18) !important;
    font-size: 10.5px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
}

.ec-do-play-page .ec-do-answer-btn svg {
    width: 15px !important;
    height: 15px !important;
    fill: currentColor !important;
}

.ec-do-play-page .ec-do-answer-btn.is-recording {
    background: #ef3439 !important;
    border-color: #ef3439 !important;
}

.ec-do-play-page .ec-do-answer-btn:disabled {
    opacity: 0.68 !important;
    cursor: default !important;
}

.ec-do-play-page .ec-do-recording {
    min-height: 32px !important;
    padding: 6px 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: #5c6573 !important;
    background: #f7f8fa !important;
    border: 1px solid #e1e5eb !important;
    border-radius: 8px !important;
    font-size: 9.5px !important;
    font-weight: 650 !important;
}

.ec-do-play-page .ec-do-transcript-box,
.ec-do-play-page .ec-do-question-feedback {
    width: 100% !important;
    margin: 9px 0 0 !important;
    padding: 9px 11px !important;
    background: #f6f7fa !important;
    border: 1px solid #e1e5eb !important;
    border-radius: 7px !important;
}

.ec-do-play-page .ec-do-transcript-box strong {
    display: block !important;
    margin: 0 0 2px !important;
    color: #4e5766 !important;
    font-size: 9px !important;
    font-weight: 700 !important;
}

.ec-do-play-page .ec-do-transcript-box p,
.ec-do-play-page .ec-do-question-feedback p {
    margin: 0 !important;
    color: #343c49 !important;
    font-size: 10.5px !important;
    line-height: 1.45 !important;
}

.ec-do-play-page .ec-do-question-feedback.is-correct {
    background: #f1f9f3 !important;
    border-color: #cfe6d4 !important;
}

.ec-do-play-page .ec-do-question-feedback.is-wrong {
    background: #fff3f3 !important;
    border-color: #efd7d8 !important;
}

.ec-do-play-page .ec-do-question-feedback h3 {
    margin: 0 0 2px !important;
    color: #2d3542 !important;
    font-size: 10.5px !important;
    line-height: 1.35 !important;
    font-weight: 750 !important;
}

.ec-do-play-page .ec-do-suggestion {
    margin-top: 3px !important;
}

.ec-do-play-page .ec-do-nav-row {
    margin: 14px 0 0 !important;
    padding: 13px 0 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    border-top: 1px solid #edf0f4 !important;
}

.ec-do-play-page .ec-do-nav-btn {
    min-width: 88px !important;
    min-height: 34px !important;
    padding: 7px 13px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    font: inherit !important;
    font-size: 10.5px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
    cursor: pointer !important;
}

.ec-do-play-page .ec-do-prev-btn {
    color: #344054 !important;
    background: #f7f9fc !important;
    border: 1px solid #dce2e9 !important;
}

.ec-do-play-page .ec-do-nav-primary {
    color: #ffffff !important;
    background: var(--ec-kid-blue) !important;
    border: 1px solid var(--ec-kid-blue) !important;
    box-shadow: 0 4px 10px rgba(47, 111, 200, 0.18) !important;
}

.ec-do-play-page .ec-do-nav-primary.is-done {
    background: #5aa96b !important;
    border-color: #5aa96b !important;
    box-shadow: 0 4px 10px rgba(90, 169, 107, 0.18) !important;
}

.ec-do-play-page .ec-do-nav-btn:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
}

.ec-do-play-page .ec-do-player.is-single-question .ec-do-nav-row {
    justify-content: flex-end !important;
}

.ec-do-play-page .ec-do-player.is-single-question #ec-do-next {
    min-width: 110px !important;
}

.ec-do-play-page .ec-kid-material-footer {
    width: 100% !important;
    max-width: 980px !important;
    margin: 15px auto 0 !important;
    padding: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    border: 1px solid #dfe4eb !important;
    border-radius: 13px !important;
}

.ec-do-play-page .ec-kid-back-to-topics,
.ec-do-play-page .ec-kid-result-back {
    min-width: 190px !important;
    min-height: 40px !important;
    padding: 8px 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    color: #ffffff !important;
    background: var(--ec-kid-orange) !important;
    border: 1px solid var(--ec-kid-orange) !important;
    border-radius: 9px !important;
    box-shadow: 0 5px 12px rgba(255, 132, 18, 0.18) !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
    font-weight: 750 !important;
    text-decoration: none !important;
}

/* Final result: same card language as the other ECourse result pages. */
.ec-do-play-page .ec-do-final-page {
    min-height: 510px !important;
    display: grid !important;
    place-items: center !important;
}

.ec-do-play-page .ec-do-final-page[hidden] {
    display: none !important;
}

.ec-do-play-page .ec-do-final-card {
    width: 100% !important;
    max-width: 900px !important;
    min-height: 430px !important;
    padding: clamp(24px, 4vw, 40px) !important;
    display: flex !important;
    align-items: center !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 14px !important;
    background: #ffffff !important;
    border: 1px solid #ccd2da !important;
    border-radius: 16px !important;
    box-shadow: 0 9px 28px rgba(22, 34, 51, 0.07) !important;
    text-align: center !important;
}

.ec-do-play-page .ec-kid-result-icon {
    width: 52px !important;
    height: 52px !important;
    display: grid !important;
    place-items: center !important;
    color: #ffffff !important;
    background: #5aa96b !important;
    border-radius: 50% !important;
    box-shadow: 0 7px 15px rgba(90, 169, 107, 0.22) !important;
    font-size: 25px !important;
    font-weight: 800 !important;
}

.ec-do-play-page .ec-do-final-card > h1 {
    margin: 0 !important;
    color: #5aa96b !important;
    font-size: clamp(27px, 3.5vw, 37px) !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
}

.ec-do-play-page .ec-kid-result-message {
    max-width: 700px !important;
    margin: 0 !important;
    color: #111111 !important;
    font-size: clamp(15px, 1.8vw, 20px) !important;
    line-height: 1.45 !important;
    font-weight: 650 !important;
}

.ec-do-play-page .ec-do-final-result {
    width: 100% !important;
    max-width: 720px !important;
    min-height: 180px !important;
    padding: 18px !important;
    display: flex !important;
    align-items: center !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 12px !important;
    background: #ffffff !important;
    border: 1px solid #ccd2da !important;
    border-radius: 13px !important;
}

.ec-do-play-page .ec-do-final-result > h2 {
    margin: 0 !important;
    color: #5f5656 !important;
    font-size: clamp(18px, 2vw, 24px) !important;
    font-weight: 600 !important;
}

.ec-do-play-page .ec-kid-result-score-row {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
}

.ec-do-play-page .ec-do-progress-pill {
    width: min(300px, calc(100% - 70px)) !important;
    height: 16px !important;
    padding: 0 !important;
    position: relative !important;
    overflow: hidden !important;
    background: #e8edf0 !important;
    border: 0 !important;
    border-radius: 999px !important;
}

.ec-do-play-page .ec-do-progress-pill::before {
    display: none !important;
    content: none !important;
}

.ec-do-play-page .ec-do-progress-pill > span {
    width: 0;
    max-width: none !important;
    height: 100% !important;
    position: static !important;
    display: block !important;
    background: #5aa96b !important;
    border-radius: inherit !important;
    transform: none !important;
    transition: width 0.35s ease !important;
}

.ec-do-play-page #ec-do-final-ratio {
    min-width: 50px !important;
    color: #111111 !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
    font-weight: 750 !important;
    font-variant-numeric: tabular-nums !important;
}

.ec-do-play-page .ec-do-final-feedback {
    width: 100% !important;
    max-width: 600px !important;
    padding: 10px 12px !important;
    color: #344054 !important;
    background: #f6f7fa !important;
    border: 1px solid #e1e5eb !important;
    border-radius: 8px !important;
    text-align: left !important;
}

.ec-do-play-page .ec-do-final-feedback h3 {
    margin: 0 0 3px !important;
    color: #2d3542 !important;
    font-size: 10.5px !important;
    font-weight: 750 !important;
}

.ec-do-play-page .ec-do-final-feedback p {
    margin: 0 !important;
    color: #555e6d !important;
    font-size: 10.5px !important;
    line-height: 1.45 !important;
}

@media (max-width: 900px) {
    .ec-do-topic-page .ec-kid-topic-grid {
        grid-template-columns: repeat(2, minmax(210px, 1fr)) !important;
    }

    .ec-do-play-page .ec-do-stage-layout {
        grid-template-columns: minmax(210px, 270px) minmax(0, 1fr) !important;
        gap: 16px !important;
    }
}

@media (max-width: 700px) {
    .ec-do-topic-page,
    .ec-do-play-page {
        width: calc(100% - 16px) !important;
        margin: 8px auto 18px !important;
        padding: 12px !important;
        border-radius: 16px !important;
    }

    .ec-do-topic-page .ec-kid-topic-hero {
        min-height: 145px !important;
        padding: 17px !important;
        grid-template-columns: minmax(0, 1fr) 150px !important;
        gap: 12px !important;
    }

    .ec-do-topic-page .ec-kid-topic-hero-image {
        width: 150px !important;
        height: 100px !important;
    }

    .ec-do-topic-page .ec-kid-topic-toolbar {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    .ec-do-topic-page .ec-kid-topic-search {
        width: 100% !important;
    }

    .ec-do-topic-page .ec-kid-topic-total {
        align-self: flex-start !important;
    }

    .ec-do-play-page .ec-kid-material-page-header {
        min-height: 52px !important;
        padding: 8px 10px !important;
        border-radius: 11px !important;
    }

    .ec-do-play-page .ec-kid-page-back {
        width: 34px !important;
        height: 34px !important;
        flex-basis: 34px !important;
    }

    .ec-do-play-page .ec-do-stage-card {
        padding: 11px !important;
        border-radius: 12px !important;
    }

    .ec-do-play-page .ec-do-stage-layout {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .ec-do-play-page .ec-do-image-wrap {
        width: min(100%, 430px) !important;
        min-height: 0 !important;
        margin: 0 auto !important;
        aspect-ratio: 16 / 10 !important;
    }

    .ec-do-play-page .ec-kid-material-footer {
        margin-top: 11px !important;
        padding: 10px !important;
    }

    .ec-do-play-page .ec-kid-back-to-topics,
    .ec-do-play-page .ec-kid-result-back {
        width: 100% !important;
        min-width: 0 !important;
    }

    .ec-do-play-page .ec-do-final-card {
        min-height: 0 !important;
        padding: 24px 14px !important;
    }
}

@media (max-width: 520px) {
    .ec-do-topic-page .ec-kid-topic-hero {
        grid-template-columns: 1fr !important;
    }

    .ec-do-topic-page .ec-kid-topic-hero-image {
        display: none !important;
    }

    .ec-do-topic-page .ec-kid-topic-grid {
        grid-template-columns: 1fr !important;
    }

    .ec-do-topic-page .ec-kid-topic-card {
        width: 100% !important;
        max-width: 340px !important;
        justify-self: center !important;
    }

    .ec-do-topic-page .ec-kid-topic-search {
        flex-wrap: wrap !important;
    }

    .ec-do-topic-page .ec-kid-topic-search input[type="search"] {
        flex-basis: 100% !important;
    }

    .ec-do-play-page .ec-do-nav-row {
        justify-content: stretch !important;
    }

    .ec-do-play-page .ec-do-nav-btn {
        flex: 1 1 0 !important;
        min-width: 0 !important;
    }

    .ec-do-play-page .ec-do-player.is-single-question #ec-do-next {
        flex: 1 1 auto !important;
    }

    .ec-do-play-page .ec-kid-result-score-row {
        flex-direction: column !important;
        gap: 7px !important;
    }

    .ec-do-play-page .ec-do-progress-pill {
        width: 100% !important;
    }
}

/* =========================================================
   v3.8.0 — completion guard, manual hero, upload limits
========================================================= */
.ec-do-topic-page .ec-do-manual-hero-image .ec-kid-topic-hero-image-file {
    object-fit: cover !important;
    object-position: center !important;
}

.ec-do-upload-note {
    margin: 6px 0 0 !important;
    color: #697386 !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
}

.ec-do-upload-error {
    margin: 6px 0 0 !important;
    padding: 7px 9px !important;
    border: 1px solid #f4b8bc !important;
    border-radius: 8px !important;
    background: #fff1f2 !important;
    color: #b4232d !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
}

.ec-do-admin-notice {
    max-width: 1180px;
    margin: 0 auto 14px !important;
    border-left-color: #d63638 !important;
}

.ec-do-done-note {
    margin: 7px 0 0 !important;
    color: #a15c08 !important;
    font-size: 10.5px !important;
    font-weight: 650 !important;
    line-height: 1.45 !important;
    text-align: right !important;
}

.ec-do-play-page .ec-do-nav-primary.is-done:disabled {
    border-color: #c7ced8 !important;
    background: #c7ced8 !important;
    color: #ffffff !important;
    box-shadow: none !important;
    opacity: 0.75 !important;
}

@media (max-width: 600px) {
    .ec-do-done-note {
        text-align: center !important;
    }
}

/* =========================================================
   STUDENT ANSWER REVIEW FLOW v3.8.1
   Answer -> Stop -> Review transcript -> Replay or Kirim Jawaban.
   ========================================================= */
.ec-do-play-page .ec-do-recording {
    display: none !important;
}

.ec-do-play-page .ec-do-answer-actions {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.ec-do-play-page .ec-do-answer-actions[hidden] {
    display: none !important;
}

.ec-do-play-page .ec-do-secondary-action,
.ec-do-play-page .ec-do-send-action {
    min-height: 34px !important;
    padding: 7px 13px !important;
    border-radius: 9px !important;
    border: 1px solid transparent !important;
    font-size: 10.5px !important;
    line-height: 1.3 !important;
    font-weight: 750 !important;
    cursor: pointer !important;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease !important;
}

.ec-do-play-page .ec-do-secondary-action {
    color: #4f5b6d !important;
    background: #ffffff !important;
    border-color: #dfe5ee !important;
    box-shadow: 0 4px 10px rgba(31, 41, 55, 0.06) !important;
}

.ec-do-play-page .ec-do-send-action {
    color: #ffffff !important;
    background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
    border-color: rgba(37, 99, 235, 0.35) !important;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.22) !important;
}

.ec-do-play-page .ec-do-secondary-action:hover,
.ec-do-play-page .ec-do-send-action:hover {
    transform: translateY(-1px) !important;
}

.ec-do-play-page .ec-do-secondary-action:disabled,
.ec-do-play-page .ec-do-send-action:disabled {
    opacity: .65 !important;
    cursor: wait !important;
    transform: none !important;
}

.ec-do-play-page .ec-do-answer-btn[hidden] {
    display: none !important;
}

.ec-do-play-page .ec-do-answer-btn.is-recording {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.22) !important;
}

.ec-do-play-page .ec-do-answer-btn.is-loading {
    background: #6b7280 !important;
    border-color: #6b7280 !important;
    cursor: wait !important;
}

.ec-do-play-page .ec-do-transcript-box.is-draft strong::after {
    content: ' — periksa dulu sebelum dikirim';
    color: #8a94a6;
    font-weight: 600;
    text-transform: none;
}

.ec-do-play-page .ec-do-question-feedback:not([hidden]) + * {
    margin-top: 8px !important;
}

@media (max-width: 640px) {
    .ec-do-play-page .ec-do-answer-actions,
    .ec-do-play-page .ec-do-answer-btn {
        width: 100% !important;
    }

    .ec-do-play-page .ec-do-secondary-action,
    .ec-do-play-page .ec-do-send-action {
        flex: 1 1 140px !important;
        justify-content: center !important;
    }
}
