.childsrs-dashboard {
    max-width: 900px;
}
.childsrs-stat-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}
.childsrs-stat {
    border: 1px solid #ddd;
    border-radius: 0.75rem;
    padding: 1rem;
    min-width: 180px;
    background: #fff;
}
.childsrs-stat-number {
    font-size: 2rem;
    font-weight: 700;
}
.childsrs-card {
    max-width: 900px;
    border: 1px solid #ddd;
    border-radius: 1rem;
    padding: 1.5rem;
    background: #fff;
    margin: 1rem 0;
}
.childsrs-sentence-box {
    display: none;
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #ddd;
    font-size: 1.6rem;
    line-height: 1.5;
    background: #f8f9fa;
}
.childsrs-meta {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}
.childsrs-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.childsrs-command {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
}
.childsrs-filter-form,
.childsrs-reset-form {
    max-width: 900px;
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0;
}
.childsrs-browser-table {
    font-size: 0.92rem;
}
.childsrs-browser-table td {
    vertical-align: top;
}
.childsrs-row-actions {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.childsrs-row-actions button {
    margin-bottom: 0.25rem;
}
.childsrs-answer-help {
    flex-basis: 100%;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}
.childsrs-template-form {
    max-width: 1000px;
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0 2rem;
}
.childsrs-template-textarea {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.childsrs-template-preview {
    max-width: 1000px;
    border: 1px solid #ddd;
    border-radius: 0.75rem;
    padding: 1rem;
    background: #fff;
    margin: 1rem 0;
}
.childsrs-template-box-visible {
    margin: 0.75rem 0 1.25rem;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #ddd;
    background: #f8f9fa;
    font-size: 1.25rem;
    line-height: 1.5;
}
.childsrs-card-label {
    color: #666;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}
.childsrs-prompt,
.childsrs-answer {
    font-size: 1.8rem;
    line-height: 1.5;
}
.childsrs-translation {
    margin-top: 0.75rem;
    color: #555;
}

.childsrs-inline-form {
    display: inline-block;
    margin: 0 0.25rem 0.25rem 0;
}
.childsrs-preview-form {
    max-width: 500px;
    display: grid;
    gap: 0.5rem;
    margin: 0.75rem 0 1rem;
}
.childsrs-help-text {
    margin: 0.25rem 0 1rem 0;
    color: #555;
    font-size: 0.95rem;
}
.childsrs-audio-player {
    display: block;
    width: 100%;
    max-width: 520px;
    margin: 0.75rem 0;
}
.childsrs-image-tag {
    display: block;
    max-width: 100%;
    max-height: 420px;
    margin: 0.75rem 0;
    border-radius: 0.75rem;
}

.childsrs-audio-quick-card .childsrs-audio-front {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 0.75rem;
    background: #f8f9fa;
}
.childsrs-audio-quick-card .childsrs-audio-player {
    max-width: 720px;
}
.childsrs-audio-answers .btn-lg {
    padding-left: 2rem;
    padding-right: 2rem;
    font-weight: 700;
}
.childsrs-audio-answer {
    font-size: 1.4rem;
}

.childsrs-student-home {
    max-width: 1000px;
    margin: 0 auto;
}
.childsrs-student-title-zh {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ff5a00;
    line-height: 1.15;
}
.childsrs-student-title-en {
    font-size: 1.45rem;
    color: #555;
    margin-bottom: 1.25rem;
}
.childsrs-student-summary {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}
.childsrs-student-due-card {
    border: 1px solid #ddd;
    border-radius: 1rem;
    padding: 1.25rem;
    background: #fff;
    min-width: 210px;
}
.childsrs-student-due-number {
    font-size: 2.4rem;
    font-weight: 700;
}
.childsrs-card-zh,
.childsrs-level-title-zh,
.childsrs-level-name-zh {
    font-size: 1.15rem;
    font-weight: 600;
}
.childsrs-card-en,
.childsrs-level-title-en,
.childsrs-level-name-en {
    display: block;
    color: #666;
    font-size: 0.95rem;
}
.childsrs-current-level {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: #f8f9fa;
    border: 1px solid #e3e3e3;
    max-width: 480px;
}
.childsrs-student-actions {
    margin: 1.25rem 0;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}
.childsrs-locked-message,
.childsrs-today-limit {
    color: #666;
    font-size: 0.95rem;
}
.childsrs-level-heading {
    margin-top: 2rem;
}
.childsrs-level-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1rem 0 2rem;
}
.childsrs-level-card {
    border: 1px solid #ddd;
    border-radius: 1rem;
    padding: 1rem;
    background: #fff;
}
.childsrs-level-locked {
    opacity: 0.45;
    background: #f3f3f3;
}
.childsrs-level-title-row {
    margin-bottom: 0.5rem;
}
.childsrs-level-status,
.childsrs-level-progress-text {
    color: #666;
    font-size: 0.9rem;
    margin: 0.35rem 0;
}
.childsrs-progressbar {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: #e9ecef;
    overflow: hidden;
}
.childsrs-progressbar-fill {
    height: 100%;
    background: #86b97a;
    border-radius: 999px;
}

.childsrs-audio-study-page {
    max-width: 760px;
    margin: 0 auto;
}
.childsrs-student-main-title {
    color: #ff5a00;
    margin-bottom: 1rem;
}
.childsrs-study-left-card {
    width: 240px;
    border: 1px solid #ddd;
    border-radius: 1rem;
    background: #fff;
    padding: 1rem;
    margin: 1rem 0 1.25rem;
}
.childsrs-study-left-number {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1;
}
.childsrs-study-left-label {
    margin-bottom: 0.35rem;
    font-weight: 600;
}
.childsrs-audio-simple-card {
    max-width: 760px;
    padding: 1.25rem;
}
.childsrs-audio-front-simple {
    margin-bottom: 0.75rem;
}
.childsrs-audio-front-simple .childsrs-audio-player {
    width: 100%;
    max-width: 720px;
}
.childsrs-audio-top-buttons {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin: 0.75rem 0 1rem;
}
.childsrs-audio-answer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(105px, 1fr));
    gap: 0.6rem;
    margin-top: 1rem;
}
.childsrs-answer-btn {
    min-height: 74px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.15;
    white-space: normal;
}
.childsrs-answer-btn strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 1rem;
}
.childsrs-answer-delay {
    display: inline-flex;
    align-items: baseline;
    gap: 0.22rem;
}
.childsrs-answer-delay-number {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
}
.childsrs-answer-delay-unit {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
}
.childsrs-answer-main {
    font-weight: 700;
}
.childsrs-audio-answer-simple {
    font-size: 1.25rem;
}
.childsrs-empty-message {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}
.childsrs-back-button {
    margin-top: 0.5rem;
}
@media (max-width: 640px) {
    .childsrs-audio-answer-grid {
        grid-template-columns: repeat(2, minmax(110px, 1fr));
    }
}

.childsrs-main-action-row {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}
.childsrs-today-left-simple {
    margin: 0.75rem 0 1.75rem 0;
    font-size: 1.05rem;
    color: #444;
}
.childsrs-deck-list {
    margin-top: 1rem;
    max-width: 980px;
}
.childsrs-student-deck {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 0.75rem 1rem 1rem 1rem;
    margin-bottom: 1rem;
    background: #fff;
}
.childsrs-deck-locked {
    opacity: 0.65;
}
.childsrs-deck-summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.childsrs-deck-summary::-webkit-details-marker {
    display: none;
}
.childsrs-deck-title-zh {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ff5a00;
}
.childsrs-deck-title-en {
    font-size: 1.05rem;
    color: #555;
}
.childsrs-deck-progress-text {
    margin-left: auto;
    color: #777;
}
.childsrs-admin-deck {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    background: #fff;
}
.childsrs-admin-deck summary {
    cursor: pointer;
    font-weight: 700;
    color: #ff5a00;
    margin-bottom: 0.5rem;
}
.childsrs-muted {
    color: #777;
    font-weight: 400;
}


.childsrs-inline-note-form { min-width: 260px; }
.childsrs-inline-note-form textarea { margin-bottom: .35rem; font-size: .9rem; }
.childsrs-browser-table audio { max-width: 220px; }
.childsrs-browser-table td { vertical-align: top; }


/* Compact admin browser layout. */
.childsrs-browser-table-compact {
    font-size: 0.9rem;
}
.childsrs-browser-table-compact td,
.childsrs-browser-table-compact th {
    vertical-align: top;
}
.childsrs-browser-table-compact textarea.childsrs-browser-edit {
    min-height: 3.2rem;
    resize: vertical;
}
.childsrs-note-field-row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}
.childsrs-note-field {
    flex: 1 1 0;
    min-width: 150px;
}
.childsrs-browser-field-label {
    display: block;
    font-size: 0.78rem;
    color: #666;
    margin-bottom: 0.15rem;
}
.childsrs-save-note-btn {
    margin-top: 0.35rem;
    white-space: nowrap;
}
.childsrs-browser-help {
    max-width: 1200px;
    margin: 0.75rem 0 1rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid #e5e5e5;
    border-radius: 0.5rem;
    background: #fafafa;
    color: #555;
    font-size: 0.9rem;
}
.childsrs-browser-meta-line {
    margin-bottom: 0.25rem;
}
.childsrs-browser-order {
    font-weight: 700;
    font-size: 1rem;
}
.childsrs-browser-sentenceid {
    color: #555;
    font-size: 0.86rem;
}
.childsrs-browser-srs .childsrs-srs-main {
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.childsrs-srs-line {
    display: block;
    color: #555;
    font-size: 0.86rem;
    margin-bottom: 0.15rem;
}
.childsrs-srs-pill {
    display: inline-block;
    padding: 0.2rem 0.45rem;
    border-radius: 0.4rem;
    background: #f1f3f5;
}
.childsrs-srs-suspended {
    background: #fff3cd;
}
.childsrs-browser-action-cell {
    min-width: 300px;
}
.childsrs-browser-audio {
    margin-bottom: 0.45rem;
}
.childsrs-browser-audio .childsrs-audio-player,
.childsrs-browser-audio audio {
    width: 260px;
    max-width: 100%;
    height: 34px;
    margin: 0 0 0.25rem 0;
}
.childsrs-row-actions-horizontal,
.childsrs-action-form-inline {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin: 0;
}
.childsrs-row-actions-horizontal .btn {
    white-space: nowrap;
}
@media (max-width: 1100px) {
    .childsrs-note-field-row {
        flex-direction: column;
    }
    .childsrs-browser-action-cell {
        min-width: 220px;
    }
}


.childsrs-student-home-simple {
    max-width: 920px;
    margin: 0 auto;
}

.childsrs-simple-study-panel {
    margin: 1rem 0 1.25rem 0;
    padding: 1.25rem;
    border: 1px solid #e6e6e6;
    border-radius: 16px;
    background: #fff;
    text-align: center;
}

.childsrs-simple-left-line {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: .5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.childsrs-simple-left-label-zh {
    font-size: 1.05rem;
    font-weight: 700;
}

.childsrs-simple-left-number {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1;
}

.childsrs-simple-left-label-en {
    font-size: .95rem;
    color: #555;
}

.childsrs-big-start-button {
    min-width: 220px;
    border-radius: 999px;
    font-size: 1.2rem;
    padding: .75rem 1.4rem;
}

.childsrs-simple-notice {
    font-size: 1.05rem;
    padding: .75rem;
    color: #444;
}

.childsrs-admin-link-small {
    margin-left: .5rem;
}

.childsrs-learning-map-details {
    margin-top: 1rem;
    border: 1px solid #ececec;
    border-radius: 12px;
    background: #fafafa;
    padding: .75rem 1rem;
}

.childsrs-learning-map-summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 1.05rem;
}


/* Tidy admin landing page. */
.childsrs-stat-grid-compact .childsrs-stat-small {
    min-width: 150px;
    padding: 0.85rem 1rem;
}
.childsrs-admin-tool-group {
    margin: 1.25rem 0 1.75rem;
}
.childsrs-admin-tool-group h3 {
    margin-bottom: 0.75rem;
}
.childsrs-admin-tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.75rem;
    max-width: 1150px;
}
.childsrs-admin-link-card {
    border: 1px solid #e3e3e3;
    border-radius: 0.75rem;
    padding: 0.8rem;
    background: #fff;
}
.childsrs-admin-link-card .btn {
    margin-bottom: 0.45rem;
}
.childsrs-admin-link-help {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.35;
}
.childsrs-admin-note,
.childsrs-maintenance-panel {
    max-width: 1100px;
    margin: 1rem 0;
    padding: 0.9rem 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 0.75rem;
    background: #fafafa;
}

.childsrs-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 16px;
    max-width: 1100px;
}
.childsrs-audio-selection-actions {
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.childsrs-generate-audio-table td,
.childsrs-generate-audio-table th {
    vertical-align: middle;
}
.childsrs-generate-audio-table audio.childsrs-browser-audio {
    max-width: 170px;
    height: 32px;
}
.childsrs-audio-status-line {
    max-width: 1100px;
    padding: 10px 14px;
}
.childsrs-muted {
    color: #667085;
    font-size: 0.9em;
}
.childsrs-inline-error {
    color: #b42318;
    margin-left: 12px;
}


.childsrs-filter-grid .childsrs-note-field label {
    display: block;
    min-height: 1.6rem;
    margin-bottom: 0.25rem;
}
.childsrs-generate-note-cell {
    min-width: 420px;
}
.childsrs-generate-note-fields {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.childsrs-generate-note-field {
    flex: 1 1 190px;
    margin: 0;
}
.childsrs-generate-note-field span {
    display: block;
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 0.2rem;
}
.childsrs-generate-note-input {
    min-height: 58px;
    resize: vertical;
}
.childsrs-generate-note-actions {
    margin-top: 0.45rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}


/* Editable Manage Levels table. */
.childsrs-inline-level-form {
    margin: 0;
}
.childsrs-level-order-input,
.childsrs-level-small-input {
    width: 6.5rem;
    min-width: 6.5rem;
    max-width: 6.5rem;
}
.childsrs-level-key-input {
    min-width: 120px;
}
.childsrs-level-name-input {
    min-width: 140px;
}
.childsrs-level-range-inputs {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 170px;
}
.childsrs-level-range-input {
    max-width: 80px;
}
.childsrs-level-range-dash {
    color: #666;
}
.childsrs-admin-deck table td {
    vertical-align: middle;
}
.childsrs-inline-action-form {
    display: inline-flex;
    margin: 0;
}

.childsrs-level-sentences-panel {
    margin: 1rem 0 1.5rem 0;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}
.childsrs-level-sentences-table textarea.childsrs-level-sentence-textarea {
    min-width: 260px;
    width: 100%;
    resize: vertical;
}
.childsrs-level-sentences-table td {
    vertical-align: top;
}
.childsrs-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    align-items: center;
}

/* Course structure workbench */
.childsrs-level-workbench-header {
    margin-bottom: 1rem;
}
.childsrs-admin-foldout {
    border: 1px solid #e5e5e5;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    margin: 1rem 0 1.25rem;
    background: #fafafa;
}
.childsrs-admin-foldout > summary {
    cursor: pointer;
    font-weight: 700;
}
.childsrs-view-switch {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1rem 0 1.25rem;
}
.childsrs-level-workbench-list {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}
.childsrs-workbench-deck {
    border-left: 6px solid #888;
    border-radius: 0.75rem;
    background: #fff;
    padding: 0.5rem 0.75rem 0.75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.childsrs-workbench-deck > summary {
    cursor: pointer;
    font-weight: 700;
    padding: 0.4rem 0;
}
.childsrs-level-workbench-card {
    border: 1px solid #e0e0e0;
    border-left: 6px solid #888;
    border-radius: 0.75rem;
    padding: 0.85rem;
    margin: 0.75rem 0;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.childsrs-level-workbench-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}
.childsrs-level-workbench-name {
    font-weight: 700;
    font-size: 1.08rem;
}
.childsrs-level-workbench-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.childsrs-level-edit-grid {
    display: grid;
    grid-template-columns: 110px minmax(120px, 1fr) minmax(160px, 2fr) minmax(140px, 1.5fr) 110px 110px 110px;
    gap: 0.75rem;
    align-items: end;
}
.childsrs-level-edit-grid .childsrs-note-field {
    margin: 0;
}
.childsrs-level-edit-grid label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
}
.childsrs-level-visible-field {
    align-self: center;
}
.childsrs-level-sentences-panel {
    border: 1px solid #d8e5f2;
    border-radius: 0.75rem;
    background: #f8fbff;
    padding: 1rem;
    margin: 0.75rem 0 1.25rem;
}
.childsrs-level-sentence-header h4 {
    margin-top: 0;
}
.childsrs-level-sentence-actions {
    align-items: center;
    margin-bottom: 0.75rem;
}
.childsrs-level-overwrite {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0.5rem;
    color: #555;
}
.childsrs-level-sentence-workbench-table textarea {
    min-width: 180px;
}
.childsrs-level-sentence-workbench-table td,
.childsrs-level-sentence-workbench-table th {
    vertical-align: top;
}
.childsrs-level-inline-text {
    resize: vertical;
}
@media (max-width: 1200px) {
    .childsrs-level-edit-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}
@media (max-width: 760px) {
    .childsrs-level-workbench-top {
        display: block;
    }
    .childsrs-level-workbench-actions {
        justify-content: flex-start;
        margin-top: 0.75rem;
    }
    .childsrs-level-edit-grid {
        grid-template-columns: 1fr;
    }
}

/* Manage levels workbench layout refinement, 2026-06-09 */
.childsrs-level-workbench-page {
    max-width: 1200px;
}
.childsrs-level-workbench-page .childsrs-actions {
    align-items: center;
}
.childsrs-level-workbench-card {
    padding: 0.85rem 1rem;
    margin: 0.7rem 0;
}
.childsrs-level-workbench-top {
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}
.childsrs-level-workbench-actions {
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}
.childsrs-level-workbench-actions .btn,
.childsrs-level-action-btn {
    padding: 0.35rem 0.65rem;
    min-height: 2.25rem;
    line-height: 1.2;
    white-space: nowrap;
}
.childsrs-level-workbench-name {
    font-size: 1.05rem;
    line-height: 1.25;
}
.childsrs-level-workbench-meta {
    font-size: 0.9rem;
    line-height: 1.25;
}
.childsrs-level-edit-grid.childsrs-level-edit-grid-compact {
    grid-template-columns: 5.2rem minmax(7.5rem, 0.85fr) minmax(10rem, 1.15fr) minmax(9rem, 1fr) 8.2rem 5.4rem;
    gap: 0.6rem 0.75rem;
    align-items: end;
}
.childsrs-level-edit-grid.childsrs-level-edit-grid-compact label {
    display: block;
    margin-bottom: 0.25rem;
    line-height: 1.15;
}
.childsrs-level-edit-grid.childsrs-level-edit-grid-compact .form-control {
    min-height: 2.25rem;
    padding: 0.38rem 0.55rem;
}
.childsrs-level-order-input {
    width: 4.8rem !important;
    min-width: 4.8rem !important;
    max-width: 4.8rem !important;
}
.childsrs-level-range-input {
    width: 8rem !important;
    min-width: 8rem !important;
    max-width: 8rem !important;
}
.childsrs-level-small-input {
    width: 5.5rem !important;
    min-width: 5.5rem !important;
    max-width: 5.5rem !important;
}
.childsrs-level-key-input,
.childsrs-level-name-input {
    width: 100%;
    min-width: 0;
}
.childsrs-level-visible-field {
    align-self: end;
}
.childsrs-level-visible-field > label:first-child {
    margin-bottom: 0.35rem;
}
.childsrs-compact-checkbox {
    display: inline-flex !important;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    min-height: 2.25rem;
    padding-top: 0.15rem;
}
.childsrs-compact-checkbox input {
    margin: 0;
}
.childsrs-workbench-deck {
    background: linear-gradient(90deg, rgba(255,255,255,0.94), #fff 4rem);
}
.childsrs-workbench-deck > summary {
    font-size: 1.02rem;
}
.childsrs-level-filter-grid {
    display: grid;
    grid-template-columns: minmax(10rem, 12rem) minmax(14rem, 1fr) 5.5rem auto;
    gap: 0.6rem 0.75rem;
    align-items: end;
    margin: 0.7rem 0 0.75rem;
}
.childsrs-level-filter-grid .childsrs-note-field {
    margin: 0;
}
.childsrs-level-filter-grid label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.25rem;
}
.childsrs-level-filter-actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    align-items: end;
    padding-bottom: 0.05rem;
}
.childsrs-level-filter-actions .btn,
.childsrs-level-sentence-actions .btn {
    white-space: nowrap;
}
.childsrs-level-sentence-actions {
    margin-top: 0.7rem;
    gap: 0.5rem;
}
.childsrs-level-overwrite {
    min-height: 2rem;
}
.childsrs-level-sentence-workbench-table {
    table-layout: fixed;
    width: 100%;
    font-size: 0.92rem;
}
.childsrs-level-sentence-workbench-table th:first-child,
.childsrs-level-sentence-workbench-table td:first-child {
    width: 2rem;
}
.childsrs-level-sentence-workbench-table th:nth-child(2),
.childsrs-level-sentence-workbench-table td:nth-child(2),
.childsrs-level-order-cell {
    width: 4.8rem;
}
.childsrs-level-order-cell strong {
    display: block;
    font-size: 0.9rem;
    line-height: 1.1;
}
.childsrs-level-order-cell .childsrs-muted {
    display: block;
    font-size: 0.78rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
}
.childsrs-level-note-cell {
    width: auto;
}
.childsrs-level-audio-cell {
    width: 18rem;
}
.childsrs-level-row-actions {
    width: 6.5rem;
}
.childsrs-level-note-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
}
.childsrs-level-note-field {
    display: block;
    margin: 0;
}
.childsrs-level-note-field span {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.2rem;
}
.childsrs-level-inline-text {
    width: 100%;
    min-width: 0 !important;
    resize: vertical;
}
.childsrs-level-audio-cell audio,
.childsrs-level-audio-cell .childsrs-browser-audio {
    width: 100%;
    max-width: 16rem;
}
.childsrs-level-row-message {
    margin: 0.35rem 0 0;
}
@media (max-width: 1100px) {
    .childsrs-level-edit-grid.childsrs-level-edit-grid-compact {
        grid-template-columns: 5.2rem minmax(7rem, 1fr) minmax(10rem, 1.2fr) minmax(9rem, 1.1fr);
    }
    .childsrs-level-filter-grid {
        grid-template-columns: minmax(10rem, 12rem) minmax(12rem, 1fr) 5.5rem;
    }
    .childsrs-level-filter-actions {
        grid-column: 1 / -1;
    }
}
@media (max-width: 760px) {
    .childsrs-level-edit-grid.childsrs-level-edit-grid-compact,
    .childsrs-level-filter-grid,
    .childsrs-level-note-fields {
        grid-template-columns: 1fr;
    }
    .childsrs-level-order-input,
    .childsrs-level-range-input,
    .childsrs-level-small-input {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }
    .childsrs-level-sentence-workbench-table {
        table-layout: auto;
    }
    .childsrs-level-audio-cell,
    .childsrs-level-row-actions,
    .childsrs-level-order-cell {
        width: auto;
    }
}


/* Level sentence table width refinement, 2026-06-09 */
.childsrs-level-sentence-workbench-table th:first-child,
.childsrs-level-sentence-workbench-table td:first-child {
    width: 1.8rem;
}
.childsrs-level-sentence-workbench-table th:nth-child(2),
.childsrs-level-sentence-workbench-table td:nth-child(2),
.childsrs-level-order-cell {
    width: 3.9rem;
}
.childsrs-level-sentence-workbench-table th:nth-child(3),
.childsrs-level-note-cell {
    width: auto;
}
.childsrs-level-sentence-workbench-table th:nth-child(4),
.childsrs-level-audio-cell {
    width: 13.5rem;
}
.childsrs-level-sentence-workbench-table th:nth-child(5),
.childsrs-level-row-actions {
    width: 5.6rem;
}
.childsrs-level-audio-cell audio,
.childsrs-level-audio-cell .childsrs-browser-audio {
    max-width: 12rem;
}
.childsrs-level-note-fields {
    grid-template-columns: minmax(13rem, 1fr) minmax(13rem, 1fr);
}
.childsrs-level-row-actions .btn {
    white-space: nowrap;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
}
@media (max-width: 900px) {
    .childsrs-level-sentence-workbench-table th:nth-child(4),
    .childsrs-level-audio-cell,
    .childsrs-level-sentence-workbench-table th:nth-child(5),
    .childsrs-level-row-actions {
        width: auto;
    }
}


/* Student level settings picker, 2026-06-09 */
.childsrs-student-level-settings {
    max-width: 1050px;
}
.childsrs-student-picker-grid {
    display: grid;
    grid-template-columns: minmax(12rem, 16rem) minmax(14rem, 1fr) minmax(18rem, 1.45fr) auto;
    gap: 0.75rem;
    align-items: end;
}
.childsrs-student-picker-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.childsrs-student-picker-actions {
    display: flex;
    align-items: end;
}
.childsrs-student-picker-actions .btn {
    white-space: nowrap;
    min-height: 2.4rem;
}
.childsrs-student-cohort-line {
    margin: -0.25rem 0 1rem;
    color: #555;
    font-size: 0.95rem;
}
@media (max-width: 900px) {
    .childsrs-student-picker-grid {
        grid-template-columns: 1fr;
    }
    .childsrs-student-picker-actions .btn {
        width: 100%;
    }
}

/* Student learning map path refinement, 2026-06-09. */
.childsrs-learning-map-help {
    color: #555;
    font-size: 0.95rem;
    margin: 0.5rem 0 0.9rem 0;
}
.childsrs-learning-path-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 820px;
}
.childsrs-learning-path-card {
    display: grid;
    grid-template-columns: 3rem 1fr;
    gap: 0.85rem;
    align-items: flex-start;
    border: 1px solid #e2e2e2;
    border-radius: 1rem;
    background: #fff;
    padding: 0.9rem 1rem;
}
.childsrs-learning-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 999px;
    background: #f1f3f5;
    color: #444;
    font-weight: 800;
    font-size: 1.1rem;
}
.childsrs-learning-step-main {
    min-width: 0;
}
.childsrs-learning-step-title-row {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    flex-wrap: wrap;
}
.childsrs-learning-step-status {
    margin-left: auto;
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    background: #f1f3f5;
    color: #444;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
}
.childsrs-learning-step-deck {
    color: #777;
    font-size: 0.88rem;
    margin: 0.25rem 0 0.45rem 0;
}
.childsrs-learning-step-progressbar {
    max-width: 520px;
}
.childsrs-learning-path-current {
    border-color: #86b97a;
    box-shadow: 0 0 0 2px rgba(134, 185, 122, 0.18);
}
.childsrs-learning-path-current .childsrs-learning-step-number,
.childsrs-learning-path-current .childsrs-learning-step-status {
    background: #e8f3e4;
    color: #2f6b25;
}
.childsrs-learning-path-finished .childsrs-learning-step-number,
.childsrs-learning-path-finished .childsrs-learning-step-status {
    background: #e8f3e4;
    color: #2f6b25;
}
.childsrs-learning-path-locked {
    opacity: 0.58;
    background: #f7f7f7;
}
.childsrs-learning-path-locked .childsrs-progressbar-fill {
    width: 0 !important;
}
@media (max-width: 640px) {
    .childsrs-learning-path-card {
        grid-template-columns: 2.5rem 1fr;
        padding: 0.8rem;
    }
    .childsrs-learning-step-status {
        margin-left: 0;
    }
}

.childsrs-deck-edit-bar {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(180px, 1.4fr) minmax(160px, 1.2fr) minmax(100px, 0.7fr) minmax(180px, 1.1fr) auto;
    gap: 12px;
    align-items: end;
    padding: 14px 18px;
    border-top: 1px solid #e5e7eb;
    background: #fbfbfb;
}

.childsrs-deck-edit-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    white-space: nowrap;
}

.childsrs-archive-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 8px;
}

.childsrs-level-workbench-name .childsrs-archive-pill,
.childsrs-level-workbench-title .childsrs-archive-pill {
    vertical-align: middle;
}

@media (max-width: 1050px) {
    .childsrs-deck-edit-bar {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .childsrs-deck-edit-bar {
        grid-template-columns: 1fr;
    }
    .childsrs-deck-edit-actions {
        justify-content: flex-start;
    }
}


/* Manage levels visibility and wrapping refinement, 2026-06-09 */
.childsrs-level-workbench-page,
.childsrs-level-workbench-card,
.childsrs-workbench-deck {
    max-width: 100%;
    box-sizing: border-box;
}
.childsrs-level-workbench-card input,
.childsrs-deck-edit-bar input {
    min-width: 0;
}
.childsrs-deck-edit-bar {
    grid-template-columns: minmax(8rem, 1fr) minmax(11rem, 1.3fr) minmax(10rem, 1.1fr) 6.5rem minmax(6.8rem, 0.75fr) auto;
    gap: 10px;
    padding: 12px 18px;
}
.childsrs-deck-visible-field,
.childsrs-level-visible-field {
    min-width: 0;
}
.childsrs-compact-checkbox {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.2;
}
.childsrs-deck-visible-field .childsrs-compact-checkbox,
.childsrs-level-visible-field .childsrs-compact-checkbox {
    max-width: 8rem;
}
.childsrs-level-edit-grid.childsrs-level-edit-grid-compact {
    grid-template-columns: 5.2rem minmax(7rem, 0.85fr) minmax(9.5rem, 1.1fr) minmax(8.5rem, 1fr) 7.5rem minmax(5.8rem, 0.6fr);
    gap: 0.55rem 0.65rem;
}
@media (max-width: 1250px) {
    .childsrs-deck-edit-bar {
        grid-template-columns: minmax(8rem, 1fr) minmax(10rem, 1.2fr) minmax(10rem, 1.1fr) 6rem minmax(6.5rem, 0.7fr) auto;
    }
    .childsrs-level-edit-grid.childsrs-level-edit-grid-compact {
        grid-template-columns: 5.2rem minmax(7rem, 1fr) minmax(9rem, 1.2fr) minmax(8rem, 1.1fr) 7.2rem minmax(5.8rem, 0.7fr);
    }
}
@media (max-width: 1050px) {
    .childsrs-deck-edit-bar {
        grid-template-columns: 1fr 1fr;
    }
    .childsrs-deck-visible-field .childsrs-compact-checkbox,
    .childsrs-level-visible-field .childsrs-compact-checkbox {
        max-width: none;
    }
}


/* Manage Levels visibility restore and layout refinement, 2026-06-09 */
.childsrs-deck-edit-bar {
    grid-template-columns: minmax(11rem, 1fr) minmax(14rem, 1.25fr) minmax(12rem, 1.1fr) 7.5rem minmax(11rem, 0.85fr) minmax(12rem, auto);
    align-items: end;
}
.childsrs-deck-edit-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
}
.childsrs-deck-visible-field,
.childsrs-level-visible-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.childsrs-deck-visible-field .childsrs-compact-checkbox,
.childsrs-level-visible-field .childsrs-compact-checkbox {
    max-width: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}
.childsrs-deck-visible-field input[type="checkbox"],
.childsrs-level-visible-field input[type="checkbox"] {
    flex: 0 0 auto;
}
.childsrs-autosaving {
    opacity: 0.72;
}
.childsrs-archive-pill {
    margin-left: 0;
}
@media (max-width: 1320px) {
    .childsrs-deck-edit-bar {
        grid-template-columns: minmax(9rem, 1fr) minmax(12rem, 1.15fr) minmax(10rem, 1fr) 6.5rem minmax(10rem, 0.9fr) minmax(9rem, auto);
        gap: 8px;
    }
}
@media (max-width: 1120px) {
    .childsrs-deck-edit-bar {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 700px) {
    .childsrs-deck-edit-bar {
        grid-template-columns: 1fr;
    }
    .childsrs-deck-visible-field .childsrs-compact-checkbox,
    .childsrs-level-visible-field .childsrs-compact-checkbox {
        white-space: normal;
    }
}

/* Why this works page */
.childsrs-why-card {
    margin: 1rem auto 1.25rem auto;
    max-width: 980px;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.15rem;
    border: 1px solid #d9e4f2;
    border-radius: 18px;
    background: linear-gradient(135deg, #f7fbff 0%, #ffffff 100%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}
.childsrs-why-card-title {
    font-size: 1.15rem;
    font-weight: 750;
    color: #17324d;
    margin-bottom: 0.25rem;
}
.childsrs-why-card-desc {
    font-size: 0.96rem;
    line-height: 1.45;
    color: #4d6276;
}
.childsrs-why-card-button {
    flex: 0 0 auto;
    white-space: nowrap;
}
.childsrs-why-page {
    max-width: 1040px;
    margin: 0 auto 3rem auto;
    padding: 0.5rem 0.25rem 2rem 0.25rem;
}
.childsrs-why-back {
    margin-bottom: 1rem;
}
.childsrs-why-main-title {
    font-size: clamp(2rem, 4vw, 3.1rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #14283d;
    margin: 0.5rem 0 0.4rem 0;
}
.childsrs-why-subtitle {
    font-size: 1.08rem;
    color: #5c6f82;
    margin-bottom: 1.35rem;
}
.childsrs-why-section,
.childsrs-why-diagram-card,
.childsrs-why-final-card {
    background: #ffffff;
    border: 1px solid #dfe8f2;
    border-radius: 20px;
    padding: 1.25rem;
    margin: 1rem 0;
    box-shadow: 0 10px 30px rgba(20, 40, 61, 0.05);
}
.childsrs-why-section-head {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    margin-bottom: 0.7rem;
}
.childsrs-why-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    background: #e7f0fb;
    color: #173f68;
    font-weight: 800;
    flex: 0 0 auto;
}
.childsrs-why-title-wrap {
    min-width: 0;
}
.childsrs-why-title-en {
    font-size: 1.32rem;
    margin: 0;
    color: #17324d;
    font-weight: 780;
}
.childsrs-why-title-zh {
    font-size: 1.04rem;
    color: #425c76;
    margin-top: 0.15rem;
    font-weight: 650;
}
.childsrs-why-body-en,
.childsrs-why-body-zh,
.childsrs-why-diagram-card p {
    font-size: 1rem;
    line-height: 1.65;
    color: #25384c;
    margin: 0.35rem 0;
}
.childsrs-why-body-zh {
    color: #394a5c;
}
.childsrs-why-diagram-card h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.18rem;
    color: #17324d;
    font-weight: 760;
}
.childsrs-why-diagram-card h3 span {
    color: #425c76;
    font-weight: 650;
}
.childsrs-why-svg {
    width: 100%;
    height: auto;
    display: block;
    margin: 0.25rem 0 0.85rem 0;
}
.childsrs-svg-bg {
    fill: #f7fbff;
    stroke: #d7e5f4;
    stroke-width: 2;
}
.childsrs-svg-axis {
    stroke: #6f8397;
    stroke-width: 3;
    stroke-linecap: round;
}
.childsrs-svg-curve {
    fill: none;
    stroke: #7b91a8;
    stroke-width: 5;
    stroke-linecap: round;
}
.childsrs-svg-review {
    fill: none;
    stroke: #2e6ea6;
    stroke-width: 6;
    stroke-linecap: round;
}
.childsrs-svg-dot,
.childsrs-svg-step {
    fill: #2e6ea6;
}
.childsrs-svg-label {
    fill: #394a5c;
    font-size: 17px;
    font-weight: 650;
}
.childsrs-svg-number {
    fill: #ffffff;
    font-size: 18px;
    font-weight: 800;
}
.childsrs-svg-node {
    fill: #e8f2fc;
    stroke: #2e6ea6;
    stroke-width: 3;
}
.childsrs-svg-arrow {
    fill: none;
    stroke: #2e6ea6;
    stroke-width: 5;
    stroke-linecap: round;
    marker-end: url(#arrowhead);
}
.childsrs-svg-node-text {
    fill: #17324d;
    font-size: 15px;
    font-weight: 760;
    text-anchor: middle;
}
.childsrs-svg-island {
    fill: #e7f0fb;
    stroke: #2e6ea6;
    stroke-width: 3;
}
.childsrs-svg-bridge {
    fill: none;
    stroke: #8aa6bf;
    stroke-width: 10;
    stroke-linecap: round;
}
.childsrs-svg-island-text {
    fill: #17324d;
    font-size: 17px;
    font-weight: 780;
    text-anchor: middle;
}
.childsrs-why-final-card {
    border-color: #c9dcf2;
    background: linear-gradient(135deg, #f3f8ff 0%, #ffffff 100%);
}
.childsrs-why-final-title {
    margin: 0 0 0.7rem 0;
    font-size: 1.35rem;
    color: #17324d;
}
.childsrs-why-bottom-button {
    margin: 1rem 0 2rem 0;
}
@media (max-width: 700px) {
    .childsrs-why-card {
        align-items: stretch;
        flex-direction: column;
    }
    .childsrs-why-card-button {
        width: 100%;
        text-align: center;
    }
    .childsrs-why-section,
    .childsrs-why-diagram-card,
    .childsrs-why-final-card {
        padding: 1rem;
        border-radius: 16px;
    }
    .childsrs-why-section-head {
        gap: 0.7rem;
    }
    .childsrs-why-title-en {
        font-size: 1.18rem;
    }
}
.childsrs-svg-arrow-head {
    fill: #2e6ea6;
}

.childsrs-story-study-page {
    max-width: 980px;
    margin: 0 auto;
}

.childsrs-story-card {
    padding: 1.5rem;
}

.childsrs-story-title {
    font-size: 1.6rem;
    margin: 0.5rem 0 1rem;
}

.childsrs-story-audio {
    width: 100%;
    margin: 0.75rem 0;
}

.childsrs-story-audio-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0.5rem 0 1rem;
}

.childsrs-story-toggle {
    margin: 0.75rem 0;
}

.childsrs-story-scroll {
    max-height: 430px;
    overflow-y: auto;
    border: 1px solid #d8dee9;
    border-radius: 12px;
    padding: 1rem;
    background: #fff;
    margin: 1rem 0;
}

.childsrs-story-line {
    padding: 0.65rem 0;
    border-bottom: 1px solid #eef1f5;
}

.childsrs-story-line:last-child {
    border-bottom: 0;
}

.childsrs-story-line-en {
    font-size: 1.25rem;
    line-height: 1.55;
    font-weight: 600;
}

.childsrs-story-line-zh {
    margin-top: 0.3rem;
    font-size: 1.05rem;
    line-height: 1.5;
    color: #44546a;
}

.childsrs-story-hidden {
    display: none;
}

.childsrs-story-no-audio {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: #fff3cd;
    border: 1px solid #ffe69c;
    margin: 0.75rem 0;
}

.childsrs-story-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.childsrs-inline-form {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin: 0.25rem 0.5rem 0.25rem 0;
}
.childsrs-small-number {
    width: 6rem;
    display: inline-block;
    margin-left: 0.35rem;
}
.childsrs-story-line-main {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}
.childsrs-story-line-play {
    min-width: 2.2rem;
    line-height: 1.2;
    flex: 0 0 auto;
}
.childsrs-story-line-noaudio {
    display: inline-flex;
    width: 2.2rem;
    justify-content: center;
    opacity: 0.45;
    flex: 0 0 auto;
}
.childsrs-story-line-active {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

.childsrs-story-main-image {
    display: block;
    max-width: 100%;
    max-height: 320px;
    object-fit: contain;
    margin: 1rem auto;
    border-radius: 12px;
}

.childsrs-story-line-image {
    display: block;
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
    margin: 0.5rem 0 0.75rem 2.25rem;
    border-radius: 10px;
}

.childsrs-small-number {
    max-width: 8rem;
}

.childsrs-inline-form .form-control {
    margin-bottom: 0.35rem;
}

.childsrs-story-browser-table textarea,
.childsrs-story-browser-table input[type="text"],
.childsrs-story-browser-table input[type="number"] {
    max-width: 100%;
}

.childsrs-story-browser-form {
    min-width: 420px;
}

.childsrs-story-browser-title-row {
    margin-bottom: 0.65rem;
}

.childsrs-story-browser-settings-row {
    display: flex;
    gap: 0.6rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.childsrs-story-browser-settings-row input[type="number"] {
    width: 7rem;
}

.childsrs-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0.25rem 0;
}

.childsrs-story-browser-lines {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0.75rem 0;
}

.childsrs-story-browser-line {
    border: 1px solid #e5e7eb;
    border-radius: 0.7rem;
    padding: 0.65rem;
    background: #fff;
}

.childsrs-story-browser-line-meta {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.45rem;
}

.childsrs-line-number-input {
    width: 5.5rem;
}

.childsrs-line-audio-player {
    max-width: 240px;
    height: 34px;
}

.childsrs-story-browser-edit {
    margin-top: 0.4rem;
}

.childsrs-story-browser-thumb {
    display: block;
    max-width: 180px;
    max-height: 140px;
    object-fit: contain;
    border-radius: 0.5rem;
    margin: 0.5rem 0;
}


/* Story browser layout tidy-up */
.childsrs-story-browser-table {
    table-layout: fixed;
    width: 100%;
}

.childsrs-story-browser-table th:nth-child(1),
.childsrs-story-browser-table td:nth-child(1) {
    width: 7rem;
}

.childsrs-story-browser-table th:nth-child(3),
.childsrs-story-browser-table td:nth-child(3) {
    width: 21rem;
}

.childsrs-story-browser-form {
    min-width: 0;
}

.childsrs-story-browser-side {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.childsrs-story-browser-side-section {
    border: 1px solid #e5e7eb;
    border-radius: 0.7rem;
    padding: 0.75rem;
    background: #fff;
}

.childsrs-story-browser-side-heading {
    margin: 0 0 0.55rem 0;
    font-size: 0.98rem;
    line-height: 1.3;
}

.childsrs-story-browser-side .childsrs-browser-action-cell {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.childsrs-story-browser-side .childsrs-row-actions-horizontal,
.childsrs-story-browser-side .childsrs-action-form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

@media (max-width: 1280px) {
    .childsrs-story-browser-table th:nth-child(3),
    .childsrs-story-browser-table td:nth-child(3) {
        width: 18rem;
    }
}

@media (max-width: 960px) {
    .childsrs-story-browser-table,
    .childsrs-story-browser-table tbody,
    .childsrs-story-browser-table tr,
    .childsrs-story-browser-table td,
    .childsrs-story-browser-table th {
        display: block;
        width: 100%;
    }

    .childsrs-story-browser-table thead {
        display: none;
    }

    .childsrs-story-browser-table tr {
        margin-bottom: 1rem;
        border: 1px solid #e5e7eb;
        border-radius: 0.8rem;
        overflow: hidden;
        background: #fff;
    }

    .childsrs-story-browser-table td {
        border-bottom: 1px solid #f0f0f0;
    }

    .childsrs-story-browser-table td:last-child {
        border-bottom: 0;
    }
}


/* Release planner */
.childsrs-release-filter input[type="number"] {
    max-width: 9rem;
}

.childsrs-release-note p {
    margin-bottom: 0;
}

.childsrs-release-table {
    width: 100%;
}

.childsrs-release-path-table td,
.childsrs-release-path-table th {
    vertical-align: top;
}

.childsrs-release-path-table th:nth-child(1),
.childsrs-release-path-table td:nth-child(1) {
    width: 8rem;
}

.childsrs-release-path-table th:nth-child(2),
.childsrs-release-path-table td:nth-child(2) {
    width: 8rem;
}

.childsrs-release-english {
    margin-top: 0.25rem;
}

.childsrs-rp-pill {
    display: inline-block;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    border: 1px solid #d9e4d2;
    background: #f7fbf5;
    font-size: 0.9rem;
}

.childsrs-rp-pill-story {
    border-color: #f0d8c7;
    background: #fff8f3;
}

.childsrs-rp-ok {
    color: #2f7d32;
    font-weight: 600;
}

.childsrs-rp-warn {
    color: #b45309;
    font-weight: 600;
}

.childsrs-release-warning-list li {
    margin-bottom: 0.45rem;
}

/* Renumber tools */
.childsrs-renumber-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.childsrs-renumber-card h3 {
    margin-top: 0;
}

.childsrs-renumber-card form {
    margin-top: 0.75rem;
}

.childsrs-renumber-card input[type="text"] {
    margin-bottom: 0.75rem;
}

.childsrs-renumber-danger {
    border-color: #f3b4b4;
}


/* Story browser inline preview */
.childsrs-story-browser-preview {
    margin-top: 1rem;
    border: 1px solid #d8e7d1;
    border-radius: 0.8rem;
    background: #f8fbf6;
    padding: 0.85rem;
}

.childsrs-story-browser-preview-heading {
    margin: 0 0 0.55rem 0;
    font-size: 1rem;
    line-height: 1.3;
    color: #f25c05;
}

.childsrs-story-browser-preview-title {
    font-weight: 600;
    margin-bottom: 0.7rem;
}

.childsrs-story-browser-preview-line {
    border-top: 1px solid #e5e7eb;
    padding: 0.55rem 0;
}

.childsrs-story-browser-preview-line:first-of-type {
    border-top: 0;
}

.childsrs-story-browser-preview-line-no {
    font-size: 0.82rem;
    font-weight: 600;
    color: #697386;
    margin-bottom: 0.2rem;
}

.childsrs-story-browser-preview-english {
    font-size: 1rem;
    line-height: 1.45;
}

.childsrs-story-browser-preview-chinese {
    margin-top: 0.2rem;
    color: #374151;
    line-height: 1.45;
}

.childsrs-story-browser-preview-audio {
    margin-top: 0.4rem;
}


/* Sentence audio generator playback stability */
.childsrs-sentence-audio-player {
    min-width: 150px;
}


/* Unified sentence card browser */
.childsrs-sentence-browser-filter {
    max-width: 1180px;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    align-items: start;
}

.childsrs-filter-item {
    min-width: 0;
}

.childsrs-filter-item label {
    display: block;
    margin-bottom: 0.35rem;
}

.childsrs-filter-item .form-control {
    width: 100%;
    max-width: 100%;
}

.childsrs-filter-item .childsrs-filter-hint {
    margin-top: 0.35rem;
    font-size: 0.92rem;
    color: #666;
}

.childsrs-filter-submit {
    display: flex;
    align-items: end;
}

.childsrs-filter-submit .btn {
    width: 100%;
}

.childsrs-sentence-audio-browser-panel,
.childsrs-column-toggle-panel {
    max-width: 1180px;
}

.childsrs-column-toggle-panel {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    align-items: center;
}

.childsrs-column-toggle-panel h4 {
    flex-basis: 100%;
    margin-bottom: 0.2rem;
}

.childsrs-sentence-card-browser-table {
    table-layout: auto;
    width: 100%;
}

.childsrs-sentence-card-browser-table th,
.childsrs-sentence-card-browser-table td {
    resize: horizontal;
    overflow: auto;
    min-width: 3.2rem;
}

.childsrs-browser-audio-cell-inner {
    min-width: 190px;
}

.childsrs-browser-audio-player {
    width: 100%;
    max-width: 250px;
}

.childsrs-browser-audio-status {
    margin-top: 0.35rem;
    font-size: 0.9rem;
    color: #555;
}

.childsrs-sentence-audio-player {
    min-width: 150px;
}

.childsrs-column-toggle-label {
    margin-right: 0.5rem;
}

@media (max-width: 900px) {
    .childsrs-sentence-browser-filter {
        grid-template-columns: 1fr;
    }
}


/* Sentence card insertion and visibility tools */
.childsrs-insert-card-panel {
    max-width: 1180px;
}

.childsrs-insert-card-form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr);
    gap: 1rem;
    align-items: start;
    max-width: 980px;
}

.childsrs-insert-field {
    min-width: 0;
}

.childsrs-insert-field label {
    display: block;
    margin-bottom: 0.35rem;
}

.childsrs-insert-field .form-control {
    width: 100%;
    max-width: 100%;
}

.childsrs-insert-field-wide {
    grid-column: 1 / -1;
}

.childsrs-insert-textarea {
    min-height: 4.5rem;
    resize: vertical;
}

.childsrs-insert-help {
    margin-top: 0.3rem;
    font-size: 0.9rem;
    color: #666;
}

.childsrs-insert-field-disabled {
    opacity: 0.62;
}

.childsrs-insert-button-field {
    display: flex;
    align-items: end;
}

.childsrs-insert-button-field .btn {
    width: 100%;
    min-height: 2.7rem;
}

@media (max-width: 900px) {
    .childsrs-insert-card-form {
        grid-template-columns: 1fr;
    }

    .childsrs-insert-field-wide {
        grid-column: auto;
    }
}


/* Student report page */
.childsrs-report-filter {
    max-width: 760px;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    align-items: end;
}

.childsrs-report-note {
    max-width: 1180px;
}

.childsrs-student-report-table td {
    vertical-align: top;
}

@media (max-width: 900px) {
    .childsrs-report-filter {
        grid-template-columns: 1fr;
    }
}


/* Sentence browser simplification panels */
.childsrs-collapsible-panel {
    padding: 0;
    overflow: hidden;
}

.childsrs-collapsible-panel > summary {
    cursor: pointer;
    padding: 0.85rem 1rem;
    font-size: 1.15rem;
    color: #f25c05;
    list-style-position: inside;
}

.childsrs-collapsible-panel > summary + * {
    margin-top: 0.4rem;
}

.childsrs-collapsible-panel > .childsrs-help-text,
.childsrs-collapsible-panel > form,
.childsrs-collapsible-panel > .childsrs-actions,
.childsrs-collapsible-panel > label,
.childsrs-collapsible-panel > #childsrs-browser-audio-message {
    margin-left: 1rem;
    margin-right: 1rem;
}

.childsrs-collapsible-panel > form:last-child,
.childsrs-collapsible-panel > .childsrs-actions:last-child,
.childsrs-collapsible-panel > #childsrs-browser-audio-message:last-child {
    margin-bottom: 1rem;
}

.childsrs-column-toggle-panel.childsrs-collapsible-panel {
    display: block;
}

.childsrs-column-toggle-panel.childsrs-collapsible-panel .childsrs-column-toggle-label {
    display: inline-block;
    margin-left: 1rem;
    margin-bottom: 0.55rem;
}

/* Enhanced student reports */
.childsrs-report-filter-tidy {
    max-width: 1180px;
    grid-template-columns: repeat(4, minmax(200px, 1fr));
    align-items: end;
}

.childsrs-report-columns {
    max-width: 1180px;
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    align-items: center;
}

.childsrs-report-columns h4 {
    flex-basis: 100%;
    margin-bottom: 0.2rem;
}

.childsrs-student-report-table-wide td {
    vertical-align: top;
}

.childsrs-report-target-complete,
.childsrs-report-target-incomplete {
    display: inline-block;
    padding: 0.35rem 0.55rem;
    border-radius: 0.45rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.childsrs-report-target-complete {
    background: #d9ead3;
    color: #1e6b1e;
    border: 1px solid #93c47d;
}

.childsrs-report-target-incomplete {
    background: #f4cccc;
    color: #990000;
    border: 1px solid #cc0000;
}

@media (max-width: 900px) {
    .childsrs-report-filter-tidy {
        grid-template-columns: 1fr;
    }
}


/* Unified story browser audio tools */
.childsrs-story-browser-audio-panel,
.childsrs-story-column-toggle-panel {
    max-width: 1180px;
}

.childsrs-browser-summary-heading {
    cursor: pointer;
    font-weight: 600;
    color: #f05a28;
    margin-bottom: 0.6rem;
}

.childsrs-story-audio-selection-actions {
    align-items: center;
}

.childsrs-story-line-select-label {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    margin: 0;
}

.childsrs-story-line-audio-state {
    font-size: 0.85rem;
    margin-left: 0.4rem;
    white-space: nowrap;
}

.childsrs-story-line-audio-ready {
    color: #2b7a2b;
}

.childsrs-story-line-audio-queued {
    color: #8a6d1d;
    font-weight: 600;
}

.childsrs-story-unified-browser-table {
    table-layout: auto;
    width: 100%;
}

.childsrs-story-unified-browser-table th,
.childsrs-story-unified-browser-table td {
    resize: horizontal;
    overflow: auto;
    min-width: 5rem;
}

.childsrs-story-column-toggle-panel {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    align-items: center;
}

.childsrs-story-column-toggle-panel summary {
    flex-basis: 100%;
}


/* Story browser management symmetry stage 2 */
.childsrs-story-browser-filter {
    max-width: 1180px;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    align-items: start;
}

.childsrs-story-add-panel {
    max-width: 1180px;
}

.childsrs-story-add-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.childsrs-story-add-field {
    display: block;
}

.childsrs-story-add-field .form-control,
.childsrs-story-add-field select {
    margin-top: 0.3rem;
    width: 100%;
}

.childsrs-story-add-lines {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.childsrs-story-add-line,
.childsrs-story-row-add-line-form {
    display: grid;
    grid-template-columns: 5rem minmax(12rem, 1fr) minmax(12rem, 1fr);
    gap: 0.6rem;
    align-items: start;
}

.childsrs-story-add-line-number {
    font-weight: 600;
    padding-top: 0.55rem;
}

.childsrs-story-row-add-line {
    margin: 0.75rem 0;
    border: 1px solid #e2e2e2;
    border-radius: 0.5rem;
    padding: 0.6rem;
    background: #fbfbfb;
}

.childsrs-story-row-add-line-summary {
    cursor: pointer;
    font-weight: 600;
    color: #555;
}

.childsrs-story-row-add-line-form {
    grid-template-columns: minmax(12rem, 1fr) minmax(12rem, 1fr) auto;
    margin-top: 0.75rem;
}

@media (max-width: 900px) {
    .childsrs-story-browser-filter,
    .childsrs-story-add-grid,
    .childsrs-story-add-line,
    .childsrs-story-row-add-line-form {
        grid-template-columns: 1fr;
    }
}


/* Story browser line management stage 3 */
.childsrs-story-row-insert-line-form {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) minmax(14rem, 1.4fr) minmax(14rem, 1.4fr) auto;
    gap: 0.75rem;
    align-items: end;
}

.childsrs-story-line-insert-field {
    display: block;
    margin: 0;
}

.childsrs-story-line-insert-field .form-control,
.childsrs-story-line-insert-field select,
.childsrs-story-line-insert-field textarea {
    width: 100%;
    max-width: 100%;
    margin-top: 0.25rem;
}

.childsrs-story-row-line-management {
    margin-top: 0.75rem;
}

.childsrs-story-line-management-list {
    display: grid;
    gap: 0.45rem;
}

.childsrs-story-line-management-row {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) auto auto auto;
    gap: 0.35rem;
    align-items: center;
    padding: 0.45rem;
    border: 1px solid #e5e5e5;
    border-radius: 0.45rem;
    background: #fff;
}

.childsrs-story-line-management-title {
    font-size: 0.92rem;
    color: #333;
    min-width: 0;
}

.childsrs-story-line-manage-note {
    display: inline-block;
    margin-left: 0.4rem;
    font-size: 0.82rem;
    color: #666;
}

@media (max-width: 900px) {
    .childsrs-story-row-insert-line-form,
    .childsrs-story-line-management-row {
        grid-template-columns: 1fr;
    }
}


/* Story browser stage 4 audio action controls */
.childsrs-story-generate-line-audio {
    white-space: nowrap;
}

.childsrs-story-browser-line-meta .childsrs-story-generate-line-audio {
    margin-left: 0.35rem;
}

.childsrs-story-line-audio-queued {
    font-weight: 600;
    color: #7a4d00;
}


.childsrs-story-add-lines {
    display: grid;
    gap: 0.65rem;
    max-width: 1180px;
}

.childsrs-story-add-line {
    display: grid;
    grid-template-columns: 4.5rem minmax(14rem, 1fr) minmax(14rem, 1fr) auto;
    gap: 0.65rem;
    align-items: start;
}

.childsrs-story-add-line-number {
    font-weight: 600;
    padding-top: 0.65rem;
}

.childsrs-story-add-line-actions {
    margin-top: 0.75rem;
}

@media (max-width: 900px) {
    .childsrs-story-add-line {
        grid-template-columns: 1fr;
    }
    .childsrs-story-add-line-number {
        padding-top: 0;
    }
}


/* Story browser display controls */
.childsrs-story-display-panel {
    max-width: 1180px;
}

.childsrs-story-display-actions {
    gap: 0.5rem;
}

.childsrs-story-content-details,
.childsrs-story-preview-details {
    border: 1px solid #e1e5ea;
    border-radius: 0.5rem;
    padding: 0.65rem;
    margin-bottom: 0.75rem;
    background: #fff;
}

.childsrs-story-content-details > summary,
.childsrs-story-preview-details > summary,
.childsrs-story-row-section-summary {
    cursor: pointer;
    color: #ff5a00;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.childsrs-story-content-details:not([open]),
.childsrs-story-preview-details:not([open]) {
    padding-bottom: 0.45rem;
}


.childsrs-story-details-toggle {
    width: 100%;
}

.childsrs-story-details-toggle > summary {
    cursor: pointer;
    color: #ff5a00;
    font-weight: 600;
    margin-bottom: 0.55rem;
}

.childsrs-story-details-toggle:not([open]) {
    min-height: 0;
}

.childsrs-story-details-toggle:not([open]) > summary {
    margin-bottom: 0;
}

.childsrs-route-picker-layout {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(320px, 2fr);
    gap: 18px;
    align-items: start;
    margin: 18px 0;
}

.childsrs-route-selected-panel,
.childsrs-route-available-panel,
.childsrs-route-deck-card,
.childsrs-admin-route-deck-card {
    border: 1px solid #d8e4d0;
    border-radius: 14px;
    background: #fff;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.childsrs-route-selected-panel {
    position: sticky;
    top: 12px;
    background: #f8fff5;
    border-color: #93c783;
}

.childsrs-route-selected-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.childsrs-route-chip {
    display: inline-block;
    border-radius: 999px;
    background: #87b97a;
    color: #fff;
    padding: 6px 10px;
    font-size: 0.92rem;
}

.childsrs-route-empty {
    color: #6b7280;
    font-style: italic;
}

.childsrs-route-deck-card,
.childsrs-admin-route-deck-card {
    margin-bottom: 14px;
}

.childsrs-route-deck-header {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.childsrs-route-deck-title {
    font-weight: 700;
    font-size: 1.05rem;
}

.childsrs-route-level-grid,
.childsrs-admin-route-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.childsrs-route-level-tile,
.childsrs-route-level-option {
    border: 1px solid #d5dde5;
    border-radius: 12px;
    padding: 10px;
    background: #fafafa;
}

.childsrs-route-level-tile.is-selected,
.childsrs-route-level-option:has(input:checked) {
    border-color: #87b97a;
    background: #eef9ea;
}

.childsrs-route-level-name {
    font-weight: 600;
}

.childsrs-route-level-meta {
    color: #536171;
    font-size: 0.86rem;
    margin-top: 3px;
}

.childsrs-admin-only-note {
    border-color: #f0b35a;
    background: #fff7e8;
}

@media (max-width: 800px) {
    .childsrs-route-picker-layout {
        grid-template-columns: 1fr;
    }
    .childsrs-route-selected-panel {
        position: static;
    }
}

/* v0.24.39: make student/admin route choice panels consistent and easier to scan. */
.childsrs-route-picker-layout {
    grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr);
}

.childsrs-route-decks-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.childsrs-route-selected-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.childsrs-route-chip {
    display: block;
    border-radius: 18px;
    padding: 9px 12px;
    line-height: 1.25;
}

.childsrs-route-level-grid,
.childsrs-admin-route-levels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.childsrs-route-level-tile,
.childsrs-route-level-option {
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.childsrs-route-level-tile:hover,
.childsrs-route-level-option:hover {
    border-color: #9bcf8f;
    box-shadow: 0 2px 8px rgba(58, 125, 50, 0.10);
}

.childsrs-route-level-tile.is-selected,
.childsrs-route-level-option:has(input:checked) {
    box-shadow: 0 2px 8px rgba(58, 125, 50, 0.12);
}

@media (max-width: 1100px) {
    .childsrs-route-decks-list,
    .childsrs-route-selected-chips,
    .childsrs-route-level-grid,
    .childsrs-admin-route-levels {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .childsrs-route-picker-layout {
        grid-template-columns: 1fr;
    }
}

/* v0.24.40: keep route chooser readable.
   The main page is already split into selected/available panels, so deck cards
   must stay full-width. Inside each deck, level tiles use two columns. */
.childsrs-route-decks-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
}

.childsrs-route-available-panel .childsrs-route-deck-card,
.childsrs-route-available-panel .childsrs-admin-route-deck-card {
    width: 100%;
}

.childsrs-route-level-grid,
.childsrs-admin-route-levels {
    grid-template-columns: repeat(2, minmax(210px, 1fr));
}

.childsrs-route-deck-header {
    align-items: flex-start;
    flex-wrap: wrap;
}

.childsrs-route-deck-title {
    min-width: 180px;
}

.childsrs-route-deck-header label {
    max-width: 260px;
    line-height: 1.25;
}

@media (max-width: 1200px) {
    .childsrs-route-picker-layout {
        grid-template-columns: 1fr;
    }
    .childsrs-route-selected-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .childsrs-route-selected-chips,
    .childsrs-route-level-grid,
    .childsrs-admin-route-levels {
        grid-template-columns: 1fr;
    }
}

.childsrs-learning-path-target {
    border-color: #f59e0b;
    background: #fffbeb;
}

.childsrs-current-target-level {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 0.75rem 0 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #f59e0b;
    border-radius: 0.75rem;
    background: #fffbeb;
}

.childsrs-current-target-label {
    font-weight: 600;
}

.childsrs-inline-form,
.childsrs-target-level-form {
    display: inline-block;
    margin: 0.5rem 0 0;
}


.childsrs-mylist-dashboard-card {
    margin-top: 1.5rem;
    padding: 1rem;
    border: 1px solid #d9e6f2;
    border-radius: 0.75rem;
    background: #fbfdff;
}
.childsrs-mylist-dashboard-title {
    font-weight: 700;
    color: #113b5f;
    margin-bottom: 0.25rem;
}
.childsrs-mylist-dashboard-help {
    color: #5f6f7f;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}
.childsrs-mylist-page {
    max-width: 1280px;
    margin: 0 auto;
}
.childsrs-mylist-title {
    color: #ff5a00;
    margin-top: 1rem;
}
.childsrs-mylist-intro,
.childsrs-mylist-counts {
    color: #4f5f6f;
    margin-bottom: 0.6rem;
}
.childsrs-mylist-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    margin: 0.5rem 0 0.8rem 0;
}
.childsrs-mylist-limit-form {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
}

.childsrs-mylist-field-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(10rem, 1fr));
    gap: 0.75rem 1rem;
    align-items: end;
}
.childsrs-mylist-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}
.childsrs-mylist-form-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-left: 0.5rem;
    flex-wrap: wrap;
}
.childsrs-mylist-limit-form label,
.childsrs-mylist-showing {
    color: #536272;
    font-size: 0.9rem;
}
.childsrs-mylist-limit-form label {
    margin: 0;
    line-height: 1.25;
}
.childsrs-mylist-limit-form select {
    min-width: 5rem;
    padding: 0.22rem 0.45rem;
    height: auto;
}

.childsrs-mylist-showing-main {
    display: inline;
}
.childsrs-mylist-showing-range {
    display: inline;
    color: #76a65f;
}
.childsrs-mylist-spacing-help {
    margin: 0.55rem 0 0.8rem 0;
    padding: 0.55rem 0.75rem;
    border: 1px solid #dce8f4;
    border-radius: 0.6rem;
    background: #fbfdff;
    color: #425466;
    font-size: 0.9rem;
}
.childsrs-mylist-spacing-help summary {
    cursor: pointer;
    font-weight: 700;
    color: #113b5f;
}
.childsrs-mylist-spacing-text {
    margin-top: 0.45rem;
    line-height: 1.35;
}
.childsrs-mylist-table {
    --childsrs-mylist-col-pos: 3rem;
    --childsrs-mylist-col-audio: 3.4rem;
    --childsrs-mylist-col-en: minmax(20rem, 2.4fr);
    --childsrs-mylist-col-zh: minmax(13rem, 1.2fr);
    --childsrs-mylist-col-due: 8rem;
    border: 1px solid #e1e6ec;
    border-radius: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    background: #fff;
}
.childsrs-mylist-grid {
    display: grid;
    grid-template-columns: var(--childsrs-mylist-col-pos) var(--childsrs-mylist-col-audio) var(--childsrs-mylist-col-en) var(--childsrs-mylist-col-zh) var(--childsrs-mylist-col-due);
    min-width: 860px;
}
.childsrs-mylist-header {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f7fafc;
    border-bottom: 1px solid #dfe6ee;
    font-size: 0.8rem;
    font-weight: 700;
    color: #526273;
}
.childsrs-mylist-headcell {
    position: relative;
    padding: 0.32rem 0.5rem;
    border-right: 1px solid #edf1f5;
    white-space: nowrap;
}
.childsrs-mylist-headcell:last-child {
    border-right: 0;
}
.childsrs-mylist-resizer {
    position: absolute;
    top: 0;
    right: -3px;
    width: 7px;
    height: 100%;
    cursor: col-resize;
}
.childsrs-mylist-resizer:hover {
    background: rgba(47, 95, 159, 0.16);
}
.childsrs-mylist-rows {
    background: #fff;
}
.childsrs-mylist-row {
    border-bottom: 1px solid #edf1f5;
}
.childsrs-mylist-row:last-child {
    border-bottom: 0;
}
.childsrs-mylist-summary {
    align-items: center;
    padding: 0;
    cursor: pointer;
    font-size: 0.86rem;
    line-height: 1.16;
    list-style: none;
}
.childsrs-mylist-summary::-webkit-details-marker {
    display: none;
}
.childsrs-mylist-summary::marker {
    content: '';
}
.childsrs-mylist-summary > span {
    padding: 0.28rem 0.5rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.childsrs-mylist-summary:hover {
    background: #fbfaf3;
}
.childsrs-mylist-pos {
    font-weight: 700;
    color: #708090;
}
.childsrs-mylist-audio-cell {
    text-align: center;
}
.childsrs-mylist-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.7rem;
    width: 1.7rem;
    height: 1.7rem;
    border: 1px solid #cfdde8;
    border-radius: 999px;
    background: #ffffff;
    color: #4e8f45;
    font-weight: 700;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}
.childsrs-mylist-play:hover,
.childsrs-mylist-play-active {
    background: #f2faf0;
}
.childsrs-mylist-play-active {
    color: #2f3740;
}
.childsrs-mylist-noaudio {
    color: #b0bac5;
}
.childsrs-mylist-expanded-audio-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.35rem 0 0.15rem 0;
    color: #536272;
    font-size: 0.84rem;
}
.childsrs-mylist-english {
    font-weight: 600;
    color: #3f4850;
}
.childsrs-mylist-english-text,
.childsrs-mylist-chinese,
.childsrs-mylist-due {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.childsrs-mylist-chinese {
    color: #5f6670;
}
.childsrs-mylist-spacing-detail {
    margin: 0 0 0.55rem 0;
    padding: 0.5rem 0.65rem;
    border: 1px solid #e5edf5;
    border-radius: 0.55rem;
    background: #ffffff;
    color: #455a64;
    font-size: 0.84rem;
    line-height: 1.35;
}
.childsrs-mylist-due {
    font-weight: 700;
    font-size: 0.82rem;
}
.childsrs-mylist-due-due {
    color: #b00020;
}
.childsrs-mylist-due-new {
    color: #227a30;
}
.childsrs-mylist-due-later {
    color: #2f5f9f;
}
.childsrs-mylist-due-future {
    color: #7a6a00;
}
.childsrs-mylist-due-suspended {
    color: #666;
}
.childsrs-mylist-details {
    padding: 0.55rem 0.85rem 0.75rem 0.85rem;
    background: #fcfcfd;
    border-top: 1px solid #edf1f5;
}
.childsrs-mylist-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 0.25rem 0.8rem;
    margin-bottom: 0.55rem;
    font-size: 0.82rem;
}
.childsrs-mylist-meta-label {
    color: #6b7785;
    font-weight: 700;
}
.childsrs-mylist-meta-value {
    color: #2f3740;
}
.childsrs-mylist-expanded-english {
    font-weight: 700;
    margin-bottom: 0.2rem;
}
.childsrs-mylist-expanded-chinese {
    color: #4d5965;
    margin-bottom: 0.4rem;
}
.childsrs-mylist-audio {
    width: 100%;
    max-width: 520px;
    display: block;
    margin-top: 0.3rem;
}
.childsrs-mylist-story-lines {
    --childsrs-mylist-story-col-num: 2.4rem;
    --childsrs-mylist-story-col-audio: 3rem;
    --childsrs-mylist-story-col-en: minmax(24rem, 2.2fr);
    --childsrs-mylist-story-col-zh: minmax(13rem, 1fr);
    display: grid;
    gap: 0;
    border: 1px solid #edf1f5;
    border-radius: 0.55rem;
    overflow-x: auto;
    overflow-y: hidden;
    background: #fff;
}
.childsrs-mylist-story-line {
    display: grid;
    grid-template-columns: var(--childsrs-mylist-story-col-num) var(--childsrs-mylist-story-col-audio) var(--childsrs-mylist-story-col-en) var(--childsrs-mylist-story-col-zh);
    align-items: center;
    min-width: 760px;
    border-bottom: 1px solid #edf1f5;
    font-size: 0.84rem;
    min-height: 1.95rem;
}
.childsrs-mylist-story-line:last-child {
    border-bottom: 0;
}
.childsrs-mylist-story-line > span {
    min-width: 0;
    padding: 0.18rem 0.45rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.childsrs-mylist-story-line-header {
    background: #f7fafc;
    color: #536272;
    font-size: 0.74rem;
    font-weight: 700;
    min-height: 1.55rem;
}
.childsrs-mylist-story-headcell {
    position: relative;
    border-right: 1px solid #edf1f5;
}
.childsrs-mylist-story-headcell:last-child {
    border-right: 0;
}
.childsrs-mylist-story-resizer {
    position: absolute;
    top: 0;
    right: -3px;
    width: 7px;
    height: 100%;
    cursor: col-resize;
}
.childsrs-mylist-story-resizer:hover {
    background: rgba(47, 95, 159, 0.16);
}
.childsrs-mylist-story-line-audio {
    display: flex;
    justify-content: center;
}
.childsrs-mylist-story-line-number {
    color: #7a8695;
    font-weight: 700;
}
.childsrs-mylist-story-line-en {
    font-weight: 600;
    color: #3f4850;
}
.childsrs-mylist-story-line-zh {
    color: #596775;
}
.childsrs-mylist-pager {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    align-items: stretch;
    margin-top: 0.8rem;
}
.childsrs-mylist-page-ranges,
.childsrs-mylist-page-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}
.childsrs-mylist-range-link.is-current {
    cursor: default;
    pointer-events: none;
}
@media (max-width: 640px) {
    .childsrs-mylist-page-ranges,
    .childsrs-mylist-page-nav {
        justify-content: flex-start;
    }
    .childsrs-mylist-page-ranges .btn {
        min-width: 5.4rem;
    }
}
@media (max-width: 900px) {
    .childsrs-mylist-page {
        max-width: 100%;
    }
    .childsrs-mylist-table {
        --childsrs-mylist-col-pos: 2.6rem;
        --childsrs-mylist-col-audio: 3rem;
        --childsrs-mylist-col-en: 16rem;
        --childsrs-mylist-col-zh: 13rem;
        --childsrs-mylist-col-due: 7rem;
    }
    .childsrs-mylist-story-lines {
        --childsrs-mylist-story-col-num: 2.2rem;
        --childsrs-mylist-story-col-audio: 2.7rem;
        --childsrs-mylist-story-col-en: 20rem;
        --childsrs-mylist-story-col-zh: 12rem;
    }
}


.childsrs-mylist-range-input {
    width: 6.5rem;
    max-width: 100%;
}
.childsrs-mylist-limit-form .btn {
    white-space: nowrap;
}

/* Admin student sentence list */
.childsrs-mylist-student-selector {
    margin: 1rem 0;
    align-items: end;
}
.childsrs-mylist-student-select {
    min-width: 320px;
}
.childsrs-mylist-selected-student {
    margin: 0.5rem 0 1rem;
    font-weight: 600;
    color: #24415c;
}

/* Scheduler examples */
.childsrs-scheduler-examples {
    margin-top: 2rem;
}
.childsrs-scroll-table {
    max-width: 100%;
    overflow-x: auto;
    margin: 0.5rem 0 1.5rem;
    border: 1px solid #e2e7ec;
    border-radius: 8px;
}
.childsrs-scheduler-example-table {
    min-width: 1100px;
    margin-bottom: 0;
    font-size: 0.9rem;
}
.childsrs-scheduler-example-table th,
.childsrs-scheduler-example-table td {
    padding: 0.35rem 0.5rem;
    vertical-align: top;
}
.childsrs-scheduler-example-table th {
    white-space: nowrap;
    background: #f6f9fb;
}
.childsrs-scheduler-example-table td:nth-child(7),
.childsrs-scheduler-example-table td:nth-child(8),
.childsrs-scheduler-example-table td:nth-child(9) {
    min-width: 220px;
}


.childsrs-answer-selected {
    position: relative;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12) inset;
    opacity: 1 !important;
}

button.childsrs-answer-selected:disabled,
.childsrs-answer-selected[disabled] {
    opacity: 1 !important;
    filter: none;
}

.childsrs-answer-selected-tick {
    font-weight: 700;
    margin-left: 0.35rem;
}

.childsrs-route-order-field {
    margin-top: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.86rem;
}

.childsrs-route-order-field label {
    margin: 0;
    white-space: nowrap;
}

.childsrs-route-order-input {
    max-width: 5.5rem;
    padding: 0.18rem 0.35rem;
    height: 1.9rem;
}


/* Student section chooser: keep ordering simple for children. */
.childsrs-my-deck-route .childsrs-route-picker-layout {
    display: block;
}

.childsrs-my-deck-route .childsrs-route-selected-panel,
.childsrs-my-deck-route .childsrs-route-available-panel {
    margin-bottom: 18px;
    position: static;
}

.childsrs-my-deck-route .childsrs-route-order-field {
    display: none;
}

.childsrs-my-deck-route .childsrs-route-selected-chips {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.childsrs-selected-section-card {
    border: 1px solid #b8d9ac;
    background: #f8fff5;
    border-radius: 14px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.childsrs-selected-section-main {
    min-width: 0;
}

.childsrs-selected-section-label {
    font-weight: 650;
    color: #22364a;
}

.childsrs-selected-section-deck-chip {
    display: inline-block;
    margin-top: 0.45rem;
    border-radius: 999px;
    padding: 0.18rem 0.65rem;
    background: rgba(255, 255, 255, 0.7);
    font-size: 0.88rem;
    font-weight: 650;
    color: #445;
}

.childsrs-selected-section-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 700px) {
    .childsrs-selected-section-card {
        grid-template-columns: 1fr;
    }
    .childsrs-selected-section-actions {
        justify-content: flex-start;
    }
}

/* Student selected route buttons: active actions must look clickable and disabled actions must look unavailable. */
.childsrs-my-deck-route .childsrs-route-action-button {
    min-width: 7.2rem;
    border-radius: 9px;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}

.childsrs-my-deck-route .childsrs-route-action-button:not(:disabled):active {
    transform: translateY(1px);
}

.childsrs-my-deck-route .childsrs-route-action-move {
    background: #2f7d32;
    border: 1px solid #2f7d32;
    color: #fff;
}

.childsrs-my-deck-route .childsrs-route-action-move:hover:not(:disabled),
.childsrs-my-deck-route .childsrs-route-action-move:focus:not(:disabled) {
    background: #256829;
    border-color: #256829;
    color: #fff;
}

.childsrs-my-deck-route .childsrs-route-action-remove {
    background: #fff;
    border: 1px solid #d92d20;
    color: #b42318;
}

.childsrs-my-deck-route .childsrs-route-action-remove:hover:not(:disabled),
.childsrs-my-deck-route .childsrs-route-action-remove:focus:not(:disabled) {
    background: #d92d20;
    border-color: #d92d20;
    color: #fff;
}

.childsrs-my-deck-route .childsrs-route-action-button:disabled,
.childsrs-my-deck-route .childsrs-route-action-button[disabled] {
    background: #eef1f4;
    border: 1px solid #d7dde3;
    color: #9aa4af;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 1;
}

.childsrs-my-deck-route .childsrs-selected-section-card {
    border-width: 2px;
}

.childsrs-my-deck-route .childsrs-selected-section-card:hover {
    border-color: #7dbb70;
}


.childsrs-my-deck-route .childsrs-selected-section-card[class*="childsrs-deck-colour-"] {
    border-left: 8px solid var(--childsrs-deck-accent);
    background: linear-gradient(90deg, var(--childsrs-deck-soft) 0, #ffffff 62%);
}

.childsrs-my-deck-route .childsrs-selected-section-card[class*="childsrs-deck-colour-"] .childsrs-selected-section-label {
    color: var(--childsrs-deck-text);
}

.childsrs-my-deck-route .childsrs-selected-section-card[class*="childsrs-deck-colour-"] .childsrs-selected-section-deck-chip {
    background: var(--childsrs-deck-chip);
    color: var(--childsrs-deck-text);
}

/* v0.24.87: student dashboard wording and deck colour clarity. */
.childsrs-simple-left-review-zh {
    font-size: 1rem;
    color: #4b5563;
    font-weight: 600;
}

.childsrs-deck-colour-1 {
    --childsrs-deck-accent: #8bb9e8;
    --childsrs-deck-soft: #f2f7fd;
    --childsrs-deck-chip: #e3f0fb;
    --childsrs-deck-text: #26537a;
}
.childsrs-deck-colour-2 {
    --childsrs-deck-accent: #91c788;
    --childsrs-deck-soft: #f3fbf1;
    --childsrs-deck-chip: #e5f5df;
    --childsrs-deck-text: #2f6b25;
}
.childsrs-deck-colour-3 {
    --childsrs-deck-accent: #eab68a;
    --childsrs-deck-soft: #fff7ef;
    --childsrs-deck-chip: #fdebd9;
    --childsrs-deck-text: #8a4b15;
}
.childsrs-deck-colour-4 {
    --childsrs-deck-accent: #b7a6e8;
    --childsrs-deck-soft: #f7f4ff;
    --childsrs-deck-chip: #eee8ff;
    --childsrs-deck-text: #574191;
}
.childsrs-deck-colour-5 {
    --childsrs-deck-accent: #e8a7c3;
    --childsrs-deck-soft: #fff4f9;
    --childsrs-deck-chip: #fde6f0;
    --childsrs-deck-text: #8a3157;
}
.childsrs-deck-colour-6 {
    --childsrs-deck-accent: #8fcfc5;
    --childsrs-deck-soft: #f0fbf9;
    --childsrs-deck-chip: #ddf4f0;
    --childsrs-deck-text: #23685f;
}

.childsrs-learning-path-card[class*="childsrs-deck-colour-"] {
    border-left: 8px solid var(--childsrs-deck-accent);
    background: linear-gradient(90deg, var(--childsrs-deck-soft) 0, #ffffff 56%);
}

.childsrs-learning-path-card[class*="childsrs-deck-colour-"] .childsrs-learning-step-deck {
    display: inline-block;
    width: fit-content;
    border-radius: 999px;
    padding: 0.18rem 0.65rem;
    background: var(--childsrs-deck-chip);
    color: var(--childsrs-deck-text);
    font-weight: 650;
}

.childsrs-learning-path-card[class*="childsrs-deck-colour-"] .childsrs-progressbar-fill {
    background: var(--childsrs-deck-accent);
}

.childsrs-route-deck-card[class*="childsrs-deck-colour-"],
.childsrs-admin-route-deck-card[class*="childsrs-deck-colour-"] {
    border-left: 8px solid var(--childsrs-deck-accent);
    background: linear-gradient(90deg, var(--childsrs-deck-soft) 0, #ffffff 60%);
}

.childsrs-route-deck-card[class*="childsrs-deck-colour-"] .childsrs-route-deck-title,
.childsrs-admin-route-deck-card[class*="childsrs-deck-colour-"] .childsrs-route-deck-title {
    color: var(--childsrs-deck-text);
}

.childsrs-why-card-bottom {
    margin-top: 1.25rem;
    margin-bottom: 0;
}


/* v0.24.92: student sentence list Chinese wording and review-first ordering. */
.childsrs-mylist-review-first-note {
    margin: 0.35rem 0 0.65rem 0;
    color: #44546a;
    font-size: 0.95rem;
}


/* v0.24.95: student route page autosave and Chinese-only route headings. */
.childsrs-my-deck-route .childsrs-route-autosave-status {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    margin: 0 0 0.8rem 0;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: #eef7ec;
    color: #2d6a2f;
    font-size: 0.95rem;
    font-weight: 650;
}
.childsrs-my-deck-route .childsrs-route-autosave-status[data-state="saving"] {
    background: #fff7e6;
    color: #8a5a00;
}
.childsrs-my-deck-route .childsrs-route-autosave-status[data-state="error"] {
    background: #fff0f0;
    color: #a4262c;
}
.childsrs-my-deck-route .childsrs-route-autosave-status[data-state="saved"] {
    background: #eef7ec;
    color: #2d6a2f;
}


/* v0.24.96: make the student sentence list controls readable on narrow mobile screens. */
@media (max-width: 640px) {
    .childsrs-mylist-controls {
        display: block;
        margin: 0.75rem 0 1rem 0;
    }

    .childsrs-mylist-limit-form {
        display: block;
        width: 100%;
    }

    .childsrs-mylist-field-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .childsrs-mylist-field {
        gap: 0.28rem;
    }

    .childsrs-mylist-limit-form label {
        display: block;
        width: 100%;
        max-width: none;
        margin: 0;
        white-space: nowrap;
        word-break: keep-all;
        line-height: 1.25;
        font-size: 1rem;
    }

    .childsrs-mylist-limit-form select,
    .childsrs-mylist-limit-form input[type="number"],
    .childsrs-mylist-range-input {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        min-height: 3rem;
        box-sizing: border-box;
        font-size: 1.05rem;
    }

    .childsrs-mylist-form-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.5rem;
        margin: 0.9rem 0 0 0;
    }

    .childsrs-mylist-limit-form .btn,
    .childsrs-mylist-form-actions .btn,
    .childsrs-mylist-form-actions .btn-link {
        width: 100%;
        margin: 0;
        text-align: center;
    }

    .childsrs-mylist-showing {
        margin-top: 0.85rem;
        font-size: 1rem;
        line-height: 1.35;
    }

    .childsrs-mylist-showing-main,
    .childsrs-mylist-showing-range {
        display: block;
    }

    .childsrs-mylist-showing-range {
        margin-top: 0.2rem;
    }
}


/* v0.24.100: simplify audio quick study page headings and show reviews before new cards. */
.childsrs-audio-review-left {
    margin-top: 0.45rem;
    color: #44546a;
    font-size: 0.95rem;
    font-weight: 650;
    line-height: 1.35;
}
.childsrs-audio-front-simple {
    font-size: 1.05rem;
    line-height: 1.55;
}
