@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;700&display=swap');

:root {
    --palstudio-font-family: "Nunito", system-ui, sans-serif;
}

body.palstudio-app {
    margin: 0;
    font-family: var(--palstudio-font-family);
    background: #f7f7f8;
    color: #1f2933;
}

.palstudio-main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 20px;
}

.palstudio-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.palstudio-dashboard-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: start;
}

.palstudio-dashboard-header h1 {
    margin-top: 0;
}

.palstudio-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.palstudio-language-toggle {
    display: inline-block;
    padding: 9px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #1f2937;
    background: #ffffff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.palstudio-language-toggle:hover,
.palstudio-language-toggle:focus-visible {
    background: #f8fafc;
    outline: none;
}

.palstudio-header-link,
.palstudio-logout {
    display: inline-block;
    padding: 9px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
    background: #ffffff;
}

.palstudio-header-link:hover,
.palstudio-logout:hover {
    background: #f8fafc;
}

.palstudio-settings-drawer {
    position: relative;
}

.palstudio-settings-drawer > summary {
    list-style: none;
    cursor: pointer;
}

.palstudio-settings-drawer > summary::-webkit-details-marker {
    display: none;
}

.palstudio-settings-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1000;
    width: min(380px, calc(100vw - 24px));
    height: 100vh;
    overflow-y: auto;
    background: #ffffff;
    border-left: 1px solid #e2e8f0;
    box-shadow: -18px 0 40px rgba(15, 23, 42, 0.18);
    padding: 18px;
}

.palstudio-settings-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}

.palstudio-settings-panel-header h2 {
    margin: 0;
    font-size: 1.05rem;
}

.palstudio-settings-form {
    display: grid;
    gap: 12px;
}

.palstudio-settings-form label {
    display: grid;
    gap: 5px;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
}

.palstudio-settings-form input,
.palstudio-settings-form select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 7px 9px;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.palstudio-settings-form button {
    justify-self: start;
}

.palstudio-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.palstudio-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.palstudio-form input,
.palstudio-form select,
.palstudio-members-table input,
.palstudio-members-table select {
    box-sizing: border-box;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
    background: #ffffff;
}

.palstudio-form input,
.palstudio-form select {
    max-width: 420px;
}

.palstudio-form button,
.palstudio-table-actions button {
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
    background: #1f2937;
    color: #ffffff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.palstudio-errors {
    margin: 16px 0;
    padding: 12px 16px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fef2f2;
    color: #7f1d1d;
    grid-column: 1 / -1;
}

.palstudio-errors h2 {
    margin-top: 0;
    font-size: 1rem;
}

.palstudio-notice {
    margin: 0;
    padding: 12px 16px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: #f0fdf4;
    color: #14532d;
    grid-column: 1 / -1;
}

.palstudio-grid-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    align-items: end;
}

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

.palstudio-members-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

.palstudio-members-table th,
.palstudio-members-table td {
    padding: 12px;
    border-top: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
}

.palstudio-members-table thead th {
    border-top: 0;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 700;
}

.palstudio-table-actions {
    white-space: nowrap;
}

.palstudio-table-actions button {
    margin-right: 8px;
}

.palstudio-table-actions .palstudio-danger-button {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

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

@media (max-width: 720px) {
    .palstudio-dashboard-header {
        grid-template-columns: 1fr;
    }

.palstudio-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.palstudio-language-toggle {
    display: inline-block;
    padding: 9px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #1f2937;
    background: #ffffff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.palstudio-language-toggle:hover,
.palstudio-language-toggle:focus-visible {
    background: #f8fafc;
    outline: none;
}

.palstudio-logout {
        justify-self: start;
    }
}

.palstudio-tabs-card {
    margin-bottom: 20px;
}

.palstudio-tab-list {
    display: flex;
    align-items: end;
    gap: 4px;
    padding: 0 8px;
    border-bottom: 1px solid #d1d5db;
}

.palstudio-tab {
    appearance: none;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin: 0 0 -1px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-bottom-color: #d1d5db;
    border-radius: 10px 10px 0 0;
    background: #f1f5f9;
    color: #475569;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.palstudio-tab:hover,
.palstudio-tab:focus-visible {
    background: #ffffff;
    color: #111827;
    outline: none;
}

.palstudio-tab[aria-selected="true"] {
    border-color: #d1d5db;
    border-bottom-color: #ffffff;
    background: #ffffff;
    color: #111827;
}

.palstudio-tab-body {
    padding-top: 20px;
}

.palstudio-tab-panel[hidden] {
    display: none;
}

.palstudio-tab-panel .palstudio-card:last-child {
    margin-bottom: 0;
}

@media (max-width: 720px) {
    .palstudio-tab-list {
        display: grid;
        gap: 8px;
        padding: 0;
        border-bottom: 0;
    }

    .palstudio-tab {
        width: 100%;
        margin: 0;
        border: 1px solid #d1d5db;
        border-radius: 10px;
        justify-content: flex-start;
    }

    .palstudio-tab[aria-selected="true"] {
        border-color: #1f2937;
    }
}

.palstudio-categories-list {
    display: grid;
    gap: 18px;
}

.palstudio-category-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    background: #f8fafc;
}

.palstudio-category-edit-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) minmax(120px, 0.5fr);
    gap: 14px;
    align-items: end;
}

.palstudio-category-edit-grid label,
.palstudio-add-practice-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.palstudio-category-edit-grid input,
.palstudio-category-edit-grid select,
.palstudio-category-edit-grid textarea,
.palstudio-practices-table textarea,
.palstudio-add-practice-form textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
    background: #ffffff;
}

.palstudio-full-width {
    grid-column: 1 / -1;
}

.palstudio-category-meta {
    margin: 8px 0 14px;
    color: #475569;
}

.palstudio-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.palstudio-card-header h2 {
    margin: 0;
}

.palstudio-secondary-button {
    padding: 10px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #1f2937;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.palstudio-secondary-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.palstudio-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

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

.palstudio-card-actions button,
.palstudio-form-actions button {
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
    background: #1f2937;
    color: #ffffff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.palstudio-card-actions .palstudio-danger-button {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.palstudio-practices-section {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
}

.palstudio-practice-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    background: #f8fafc;
}

.palstudio-practice-editor-card {
    margin-top: 18px;
    background: #ffffff;
}

.palstudio-practice-editor-card h3 { font-size: 1.45rem; font-weight: 900; margin: 0 0 1rem; color: #0f172a; }

.palstudio-practices-table td {
    vertical-align: top;
}

.palstudio-practices-table td a {
    overflow-wrap: anywhere;
}

.palstudio-practice-more-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.palstudio-practice-editor-form { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px 8px; align-items: start; }
.palstudio-practice-editor-form > p { margin: 0; min-width: 0; }
.palstudio-practice-more-options-card { border: 1px solid #e2e8f0; border-radius: 12px; padding: 0.75rem; background: #f8fafc; }
.palstudio-practice-more-options-card summary { cursor: pointer; font-weight: 800; color: #1f2937; }
.palstudio-practice-more-options-card > .palstudio-practice-more-options { margin-top: 0.75rem; }
.palstudio-practice-form-section-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0.6rem 0 0; padding-top: 0.8rem; border-top: 1px solid #e2e8f0; color: #0f172a; font-weight: 900; }
.palstudio-practice-form-section-title:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.palstudio-practice-aids-title .palstudio-secondary-button { padding: 0.4rem 0.7rem; font-size: 0.85rem; border-radius: 999px; }
.palstudio-practice-more-options .palstudio-practice-form-section-title { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid #e2e8f0; }
.palstudio-practice-more-options .palstudio-practice-form-section-title:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.palstudio-practice-more-options .palstudio-upload-sheet-music-form { border-top: 0; padding-top: 0; }
.palstudio-practice-title-field { grid-column: 1 / span 5; }
.palstudio-practice-title-field input,
.palstudio-practice-section-field select,
.palstudio-practice-sort-field input { width: 100%; max-width: none; box-sizing: border-box; }
.palstudio-practice-section-field { grid-column: 6 / span 4; justify-self: stretch; min-width: 0; }
.palstudio-practice-sort-field { grid-column: 10 / span 3; width: 100%; min-width: 0; }
.palstudio-practice-editor-form > p.palstudio-full-width:has([data-palstudio-practice-description]) { grid-column: 1 / -1; align-self: stretch; }
.palstudio-practice-editor-form > p.palstudio-full-width:has([data-palstudio-practice-description]) textarea { min-height: 5.25rem; height: 5.25rem; resize: vertical; }
.palstudio-practice-more-options { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 16px; align-items: start; }
.palstudio-practice-more-options > p { margin: 0; }
.palstudio-practice-video-url-field { grid-column: 1 / span 9; }
.palstudio-practice-video-url-field input { max-width: none; width: 100%; }
.palstudio-practice-video-speed-field { grid-column: 10 / span 3; justify-self: stretch; width: 100%; }
.palstudio-practice-video-speed-field select { width: 100%; max-width: none; }
.palstudio-practice-metronome-field { grid-column: 1 / span 6; justify-self: stretch; }
.palstudio-practice-drone-field { grid-column: 7 / span 6; justify-self: stretch; }
.palstudio-practice-metronome-field input,
.palstudio-practice-drone-field select { width: 100%; max-width: none; min-height: 42px; box-sizing: border-box; }
.palstudio-practice-sheet-url-field { grid-column: 1 / span 6; align-self: start; justify-self: stretch; }
.palstudio-practice-sheet-url-field label { line-height: 1.25; min-height: 1.25em; margin: 0 0 6px; }
.palstudio-practice-sheet-url-field input { width: 100%; max-width: none; min-height: 46px; }
.palstudio-upload-sheet-music-form { grid-column: 7 / span 6; margin-top: 0; padding: 0; border: 0; background: transparent; align-self: start; justify-self: stretch; }
.palstudio-upload-sheet-music-form .palstudio-upload-context { display: block; font-weight: 600; margin: 0 0 6px; color: #1f2937; line-height: 1.25; min-height: 1.25em; }
.palstudio-upload-sheet-music-form p { margin: 0; }
.palstudio-upload-sheet-music-form p:last-child { margin-bottom: 0; }
.palstudio-upload-sheet-music-control { width: 100%; }
.palstudio-upload-sheet-music-form input[type="file"] { box-sizing: border-box; display: block; width: 100%; max-width: none; min-height: 46px; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: #ffffff; font: inherit; line-height: normal; }
.palstudio-practice-editor-form > .palstudio-form-actions { grid-column: 1 / -1; justify-content: flex-start; padding-top: 0; margin-top: 0.75rem; border-top: 0; flex-direction: row; flex-wrap: nowrap; gap: 0.75rem; }
.palstudio-practice-editor-form > .palstudio-form-actions .palstudio-danger-button { margin-left: auto; background: #dc2626; border-color: #dc2626; color: #fff; }
.palstudio-practice-editor-form > .palstudio-form-actions .palstudio-danger-button:hover,
.palstudio-practice-editor-form > .palstudio-form-actions .palstudio-danger-button:focus { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.palstudio-practice-editor-form > .palstudio-form-actions button { white-space: nowrap; min-width: 7.5rem; }
.palstudio-practice-editor-form > .palstudio-form-actions [data-palstudio-cancel-practice-edit] { min-width: 9.5rem; }
@media (max-width: 720px) { .palstudio-practice-editor-form, .palstudio-practice-more-options { grid-template-columns: 1fr; } .palstudio-practice-title-field, .palstudio-practice-section-field, .palstudio-practice-sort-field, .palstudio-practice-editor-form > p.palstudio-full-width:has([data-palstudio-practice-description]), .palstudio-practice-video-url-field, .palstudio-practice-video-speed-field, .palstudio-practice-metronome-field, .palstudio-practice-drone-field, .palstudio-practice-sheet-url-field, .palstudio-upload-sheet-music-form { grid-column: 1; grid-row: auto; width: auto; justify-self: stretch; } .palstudio-practice-editor-form > p.palstudio-full-width:has([data-palstudio-practice-description]) textarea { min-height: 6rem; height: auto; } .palstudio-practice-editor-form > .palstudio-form-actions { justify-content: flex-start; flex-wrap: wrap; } }

.palstudio-practice-more-options[hidden] {
    display: none;
}

.palstudio-upload-sheet-music-form {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.palstudio-upload-context {
    margin: 0;
    color: #475569;
    font-weight: 600;
}

.palstudio-upload-sheet-music-form[hidden] {
    display: none;
}

.palstudio-practices-section h3 {
    margin-top: 0;
}

.palstudio-categories-table {
    min-width: 1040px;
    margin-bottom: 22px;
}

.palstudio-categories-table textarea,
.palstudio-practices-table textarea {
    min-height: 44px;
}

.palstudio-practice-groups {
    display: grid;
    gap: 18px;
    margin-top: 20px;
}

.palstudio-practices-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 1 1 auto;
    margin-left: auto;
    text-align: right;
    flex-wrap: nowrap;
}

.palstudio-practices-header-actions[hidden] {
    display: none;
}

.palstudio-practices-header-actions .palstudio-secondary-button {
    padding: 5px 10px;
    font-size: 0.82rem;
    white-space: nowrap;
}

.palstudio-practice-search-label {
    display: inline-flex;
    align-items: center;
    color: #64748b;
}

.palstudio-practice-search-input {
    box-sizing: border-box;
    width: clamp(96px, 13vw, 160px);
    padding: 5px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font: inherit;
    font-size: 0.82rem;
}

.palstudio-practices-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 12px;
}

.palstudio-practices-pagination[hidden] {
    display: none;
}

.palstudio-practice-no-results {
    margin: 12px 0 0;
    color: #475569;
    font-weight: 600;
}

.palstudio-practices-table {
    min-width: 760px;
    margin-bottom: 16px;
}

.palstudio-practices-table { table-layout: auto; }
.palstudio-practices-table th:nth-child(n+2):nth-child(-n+5),
.palstudio-practices-table td:nth-child(n+2):nth-child(-n+5) { width: 1%; white-space: nowrap; text-align: center; vertical-align: middle; }
.palstudio-practices-table td:first-child { font-size: 1.05rem; }
.palstudio-practices-table .palstudio-icon-button { width: 3.8rem; height: 3.8rem; }
.palstudio-practices-table .palstudio-icon-button img { width: 2.55rem; height: 2.55rem; }
.palstudio-play-icon-button span { display: inline-flex; align-items: center; justify-content: center; width: 2.55rem; height: 2.55rem; border-radius: 0.45rem; background: #2f8bc4; color: #ffffff; font-size: 1.45rem; line-height: 1; }
.palstudio-practices-table .palstudio-practice-aids { justify-content: center; flex-wrap: nowrap; }
.palstudio-practices-table .palstudio-table-actions { white-space: nowrap; }

.palstudio-add-practice-form {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #cbd5e1;
}

@media (max-width: 720px) {
    .palstudio-category-edit-grid {
        grid-template-columns: 1fr;
    }
}

.palstudio-category-filter {
    margin: 18px 0;
}

.palstudio-category-filter label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.palstudio-category-filter select {
    box-sizing: border-box;
    width: min(100%, 420px);
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
    background: #ffffff;
}

.palstudio-practices-section[hidden] {
    display: none;
}

.palstudio-eyebrow {
    margin: 0 0 6px;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.palstudio-muted {
    color: #64748b;
}

.palstudio-student-summary-card {
    align-items: start;
}

.palstudio-student-summary-card .palstudio-header-actions {
    grid-column: 2;
    grid-row: 1;
}

.palstudio-student-progress-block,
.palstudio-week-minutes-block {
    grid-column: 1 / -1;
}

.palstudio-student-progress-block {
    padding-top: 10px;
}

.palstudio-student-progress-copy h2,
.palstudio-week-minutes-block h2 {
    margin: 0 0 8px;
}

.palstudio-student-progress-copy p {
    margin: 0 0 12px;
    color: #475569;
}

.palstudio-progress {
    height: 16px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.palstudio-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #22c55e);
}

.palstudio-progress-caption {
    margin: 8px 0 0;
    color: #475569;
    font-weight: 700;
}

.palstudio-week-minutes-block {
    margin-top: 12px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.palstudio-week-minutes-block .palstudio-card-header {
    margin-bottom: 6px;
}

.palstudio-week-total {
    color: #1f2937;
    font-weight: 800;
}

.palstudio-week-minutes-list {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.palstudio-week-minutes-list li {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.palstudio-week-minutes-list li.is-today {
    border-color: #2563eb;
    background: #eff6ff;
}

.palstudio-week-minutes-list li span {
    color: #64748b;
    font-size: 0.9rem;
}

.palstudio-week-minutes-list li strong {
    color: #111827;
    font-size: 1.1rem;
}

@media (max-width: 900px) {
    .palstudio-week-minutes-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .palstudio-student-summary-card .palstudio-header-actions {
        grid-column: 1;
        grid-row: auto;
        justify-content: flex-start;
    }

    .palstudio-week-minutes-list {
        grid-template-columns: 1fr;
    }
}

.palstudio-action-link {
    display: inline-block;
    margin-right: 8px;
    padding: 9px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #1f2937;
    background: #ffffff;
    text-decoration: none;
    font-weight: 700;
}

.palstudio-action-link:hover,
.palstudio-action-link:focus-visible {
    background: #f8fafc;
    outline: none;
}

.palstudio-assigned-practices-table {
    min-width: 620px;
    margin-bottom: 18px;
}

.palstudio-table-actions form {
    display: inline-block;
    margin: 0;
}

.palstudio-assign-practice-section {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.palstudio-assign-practice-section h3 {
    margin-top: 0;
}

.palstudio-student-practices-table {
    min-width: 0;
    table-layout: fixed;
}

.palstudio-student-practices-table th:nth-child(1),
.palstudio-student-practices-table td:nth-child(1) { width: 8%; text-align: center; }
.palstudio-student-practices-table th:nth-child(2),
.palstudio-student-practices-table td:nth-child(2) { width: 15%; }
.palstudio-student-practices-table th:nth-child(3),
.palstudio-student-practices-table td:nth-child(3) { width: 23%; }
.palstudio-student-practices-table th:nth-child(4),
.palstudio-student-practices-table td:nth-child(4) { width: 15%; text-align: center; }
.palstudio-student-practices-table th:nth-child(5),
.palstudio-student-practices-table td:nth-child(5) { width: 15%; text-align: center; }
.palstudio-student-practices-table th:nth-child(6),
.palstudio-student-practices-table td:nth-child(6) { width: 12%; }
.palstudio-student-practices-table th:nth-child(7),
.palstudio-student-practices-table td:nth-child(7) { width: 12%; }

.palstudio-student-practices-table th,
.palstudio-student-practices-table td {
    overflow-wrap: anywhere;
    word-break: normal;
}

.palstudio-student-practices-table td {
    vertical-align: top;
}

.palstudio-feedback-box {
    min-width: 180px;
    min-height: 88px;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #334155;
}

.palstudio-video-embed,
.palstudio-sheet-preview {
    width: 240px;
    max-width: 100%;
    aspect-ratio: 4 / 3;
}

.palstudio-student-practices-table .palstudio-video-embed {
    width: 100%;
}

.palstudio-student-practices-table .palstudio-practice-aids {
    display: grid;
    gap: 0.35rem;
    justify-items: start;
}

.palstudio-student-practices-table .palstudio-audio-button {
    white-space: nowrap;
    padding: 0.35rem 0.55rem;
}

@media (max-width: 720px) {
    .palstudio-table-wrap { overflow-x: visible; }
    .palstudio-student-practices-table,
    .palstudio-student-practices-table thead,
    .palstudio-student-practices-table tbody,
    .palstudio-student-practices-table tr,
    .palstudio-student-practices-table th,
    .palstudio-student-practices-table td { display: block; width: 100% !important; min-width: 0; }
    .palstudio-student-practices-table { table-layout: auto; border-collapse: separate; border-spacing: 0; }
    .palstudio-student-practices-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .palstudio-student-practices-table tbody { display: grid; gap: 0.9rem; }
    .palstudio-student-practices-table tr { padding: 0.9rem; border: 1px solid #e2e8f0; border-radius: 14px; background: #ffffff; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06); }
    .palstudio-student-practices-table td { display: grid; grid-template-columns: 5.75rem minmax(0, 1fr); align-items: start; gap: 0.75rem; padding: 0.65rem 0; border: 0; border-bottom: 1px solid #f1f5f9; overflow-wrap: normal; word-break: normal; }
    .palstudio-student-practices-table td:last-child { border-bottom: 0; padding-bottom: 0; }
    .palstudio-student-practices-table td::before { color: #64748b; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; line-height: 1.2; text-transform: uppercase; }
    .palstudio-student-practices-table td:nth-child(1)::before { content: "Record"; }
    .palstudio-student-practices-table td:nth-child(2)::before { content: "Practice"; }
    .palstudio-student-practices-table td:nth-child(3)::before { content: "Instructions"; }
    .palstudio-student-practices-table td:nth-child(4)::before { content: "Video"; }
    .palstudio-student-practices-table td:nth-child(5)::before { content: "Image"; }
    .palstudio-student-practices-table td:nth-child(6)::before { content: "Practice aids"; }
    .palstudio-student-practices-table td:nth-child(7)::before { content: "Status"; }
    .palstudio-student-practices-table .palstudio-practice-title-with-recorder { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
    .palstudio-student-practices-table .palstudio-video-embed,
    .palstudio-student-practices-table .palstudio-sheet-preview { width: min(100%, 15rem); max-width: 15rem; justify-self: start; }
    .palstudio-student-practices-table .palstudio-icon-button { justify-self: start; }
    .palstudio-student-practices-table .palstudio-practice-aids { justify-items: start; }
}

.palstudio-video-embed iframe,
.palstudio-video-embed video,
.palstudio-sheet-preview iframe,
.palstudio-sheet-preview img {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 10px;
    object-fit: contain;
    background: #f1f5f9;
}

.palstudio-sheet-preview {
    display: block;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    cursor: zoom-in;
    overflow: hidden;
}

.palstudio-sheet-lightbox[hidden] {
    display: none;
}

.palstudio-sheet-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    grid-template-rows: auto 1fr;
    background: rgba(15, 23, 42, 0.92);
}

.palstudio-sheet-lightbox-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.95);
}

.palstudio-sheet-lightbox-toolbar button {
    padding: 9px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.palstudio-sheet-lightbox-stage {
    position: relative;
    overflow: hidden;
    touch-action: none;
    cursor: grab;
}

.palstudio-sheet-lightbox-stage.is-dragging {
    cursor: grabbing;
}

.palstudio-sheet-lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center center;
    max-width: 90vw;
    max-height: 82vh;
    border: 0;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

img.palstudio-sheet-lightbox-content {
    object-fit: contain;
}

iframe.palstudio-sheet-lightbox-content {
    width: 90vw;
    height: 82vh;
}

/* Sheet music previews contain iframes/images; keep them clickable as a single preview button. */
.palstudio-sheet-preview iframe,
.palstudio-sheet-preview img {
    pointer-events: none;
}

.palstudio-sheet-preview::after {
    content: 'Click to enlarge';
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
}

.palstudio-sheet-preview {
    position: relative;
}

.palstudio-sheet-lightbox-content {
    pointer-events: none;
    user-select: none;
}

.palstudio-sheet-lightbox-stage::before {
    content: attr(data-palstudio-sheet-help);
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    font-size: 0.85rem;
    pointer-events: none;
}

.palstudio-sheet-preview::after {
    content: none;
}

.palstudio-sheet-preview-label {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 2;
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.88);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
}

canvas.palstudio-sheet-lightbox-canvas {
    max-width: 90vw;
    max-height: 82vh;
    background: #ffffff;
}

.palstudio-pdf-fallback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 24px;
    border-radius: 12px;
    background: #ffffff;
    color: #111827;
    text-align: center;
}

.palstudio-pdf-fallback a {
    display: inline-block;
    margin-top: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    background: #1f2937;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
}

.palstudio-sheet-lightbox-content {
    max-width: none;
    max-height: none;
}

img.palstudio-sheet-lightbox-content {
    width: auto;
    height: auto;
}

.palstudio-sheet-lightbox-content-fix-v2 { display: none; }

/* Fullscreen sheet content is explicitly sized by JS to fit the stage. */
.palstudio-sheet-lightbox-content {
    width: auto;
    height: auto;
    max-width: none !important;
    max-height: none !important;
}

.palstudio-sheet-lightbox-fit-v3 { display: none; }

img.palstudio-sheet-lightbox-content {
    display: block;
    object-fit: contain;
}

.palstudio-sheet-lightbox-img-fit-v4 { display: none; }

iframe.palstudio-drive-lightbox-content {
    width: 94vw;
    height: 86vh;
    max-width: 94vw !important;
    max-height: 86vh !important;
    pointer-events: auto;
}

.palstudio-pdf-spread {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: center;
    background: transparent;
    box-shadow: none;
}

.palstudio-pdf-page-canvas {
    display: block;
    max-height: 100%;
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.32);
}

.palstudio-video-embed {
    position: relative;
}

.palstudio-video-fullscreen-play {
    position: absolute;
    left: 50%;
    bottom: 12px;
    z-index: 3;
    transform: translateX(-50%);
    padding: 9px 14px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.88);
    color: #ffffff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.palstudio-video-fullscreen-play[hidden] {
    display: none;
}

.palstudio-youtube-poster {
    position: relative;
    display: block;
    width: 100%;
    min-height: 180px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    cursor: pointer;
}

.palstudio-youtube-poster .YT-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.palstudio-youtube-poster .YT-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(220, 38, 38, 0.92);
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
    padding-left: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.palstudio-student-stats-strip {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 22px;
    margin-top: 8px;
}

.palstudio-week-minutes-compact {
    flex: 1 1 auto;
    gap: 8px;
    margin: 0;
    padding-right: 22px;
    border-right: 1px solid #bfdbfe;
}

.palstudio-week-minutes-compact li {
    padding: 0;
    border: 0;
    background: transparent;
    text-align: center;
    gap: 6px;
}

.palstudio-week-minutes-compact li span {
    color: #334155;
    font-size: 0.95rem;
    font-weight: 700;
}

.palstudio-week-minutes-compact li strong {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    min-height: 34px;
    margin: 0 auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
}

.palstudio-week-minutes-compact li strong:not(:empty).is-over-required {
    border-color: #16a34a;
    background: #16a34a;
}

.palstudio-week-minutes-compact li strong:not(:empty).is-under-required {
    border-color: #dc2626;
    background: #dc2626;
}

.palstudio-today-minutes-box {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-weight: 700;
}

.palstudio-today-minutes-box strong {
    min-width: 56px;
    padding: 7px 18px;
    border-radius: 8px;
    background: #f5efe6;
    color: #38bdf8;
    text-align: center;
    font-size: 1.1rem;
}

.palstudio-today-goal-line {
    grid-column: 1 / -1;
    margin: 4px 0 0;
    color: #334155;
    font-weight: 700;
}

@media (max-width: 720px) {
    .palstudio-student-stats-strip {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .palstudio-week-minutes-compact {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        padding-right: 0;
        padding-bottom: 14px;
        border-right: 0;
        border-bottom: 1px solid #bfdbfe;
    }

    .palstudio-today-minutes-box {
        justify-content: flex-start;
    }
}

.palstudio-student-summary-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    margin-top: 12px;
}

.palstudio-student-subcard {
    min-width: 0;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.palstudio-student-subcard h2 {
    margin: 0 0 14px;
    color: #1f2937;
    font-size: 1rem;
}

.palstudio-student-summary-grid .palstudio-week-minutes-compact {
    padding-right: 0;
    border-right: 0;
}

.palstudio-today-subcard .palstudio-progress {
    margin-top: 12px;
}

.palstudio-today-subcard .palstudio-progress-caption {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.palstudio-today-subcard .palstudio-progress-caption strong {
    color: #0f766e;
}

@media (max-width: 720px) {
    .palstudio-student-summary-grid {
        grid-template-columns: 1fr;
    }
}

.palstudio-today-progress-row {
    display: grid;
    grid-template-columns: auto minmax(140px, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    color: #334155;
    font-weight: 700;
}

.palstudio-today-progress {
    position: relative;
    height: 34px;
    overflow: hidden;
    border-radius: 8px;
    background: #f5efe6;
}

.palstudio-today-progress > span {
    display: flex;
    align-items: center;
    min-width: 0;
    height: 100%;
    border-radius: inherit;
    background: #16a34a;
    transition: width 180ms ease;
}

.palstudio-today-progress strong {
    padding-left: 12px;
    color: #ecfdf5;
    font-size: 1.05rem;
    line-height: 1;
}

.palstudio-today-progress > span[style*="width: 0%"] strong {
    position: absolute;
    left: 12px;
    color: #38bdf8;
}

.palstudio-today-subcard .palstudio-today-goal-line {
    margin: 0 0 12px;
    color: #1f2937;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.25;
}

.palstudio-today-subcard .palstudio-today-goal-line strong {
    font-weight: 900;
}

.palstudio-today-progress-row {
    font-size: 0.9rem;
    font-weight: 400;
}

.palstudio-today-progress-row > span {
    font-weight: 400;
}

.palstudio-today-progress strong {
    font-size: 0.9rem;
    font-weight: 400;
}

.palstudio-week-subcard h2 {
    margin: 0 0 12px;
    color: #1f2937;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.25;
}

.palstudio-practice-aids {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.palstudio-audio-button {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #1f2937;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.palstudio-audio-button.is-active {
    background: #166534;
    border-color: #166534;
    color: #ffffff;
}

.palstudio-submissions-cockpit {
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #f8fbff;
    padding: 16px;
    margin-bottom: 18px;
}

.palstudio-submissions-cockpit > summary {
    cursor: pointer;
    list-style: none;
}

.palstudio-submissions-cockpit > summary::-webkit-details-marker {
    display: none;
}

.palstudio-submissions-cockpit-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}

.palstudio-submissions-cockpit-main h2 {
    margin: 0 0 4px;
    font-size: 1.05rem;
}

.palstudio-submissions-stat-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

.palstudio-summary-caret {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    color: #64748b !important;
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    transition: transform 0.15s ease;
}

.palstudio-submissions-cockpit[open] .palstudio-summary-caret,
.palstudio-submissions-history[open] > summary .palstudio-summary-caret,
.palstudio-student-submission-history[open] > summary .palstudio-summary-caret,
.palstudio-student-submission-history-month[open] > summary .palstudio-summary-caret {
    transform: rotate(90deg);
}

.palstudio-submissions-stat-strip span {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    padding: 5px 10px;
    font-size: 0.82rem;
    color: #475569;
    white-space: nowrap;
}

.palstudio-submissions-cockpit-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(360px, 1.3fr);
    gap: 14px;
    margin-top: 14px;
}

.palstudio-submissions-cockpit-panel,
.palstudio-submissions-manual-form {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    padding: 12px;
}

.palstudio-submissions-missing-list {
    margin: 8px 0 0;
    padding-left: 18px;
    columns: 2;
    column-gap: 18px;
    font-size: 0.86rem;
}

.palstudio-submissions-missing-list a {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}

.palstudio-submissions-missing-list a:hover,
.palstudio-submissions-missing-list a:focus {
    text-decoration: underline;
}

.palstudio-submissions-manual-form {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: 10px;
    align-items: end;
}

.palstudio-submissions-manual-form > strong {
    grid-column: 1 / -1;
}

.palstudio-submissions-manual-form label {
    display: grid;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
}

.palstudio-submissions-manual-form input,
.palstudio-submissions-manual-form select {
    min-height: 32px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 5px 8px;
    font-size: 0.86rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.palstudio-submissions-manual-form button {
    min-height: 32px;
    padding: 5px 10px;
    font-size: 0.82rem;
}

.palstudio-submissions-recent-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin: 2px 0 10px;
}

.palstudio-submissions-recent-header h3 {
    margin: 0;
    font-size: 0.96rem;
    font-weight: 700;
}

.palstudio-submissions-recent-header .palstudio-muted {
    font-size: 0.8rem;
}

.palstudio-submissions-history {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    margin-top: 18px;
    padding: 0;
}

.palstudio-submissions-history > summary,
.palstudio-submissions-history-month > summary,
.palstudio-submissions-history-day > summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}

.palstudio-submissions-history > summary::-webkit-details-marker,
.palstudio-submissions-history-month > summary::-webkit-details-marker,
.palstudio-submissions-history-day > summary::-webkit-details-marker {
    display: none;
}

.palstudio-submissions-history > summary {
    align-items: center;
    padding: 11px 14px;
    font-size: 0.96rem;
    font-weight: 700;
    color: #1e293b;
}

.palstudio-submissions-history > summary span:first-child {
    margin-right: auto;
}

.palstudio-submissions-history > summary span:not(:first-child):not(.palstudio-summary-caret),
.palstudio-submissions-history-month > summary span:last-child,
.palstudio-submissions-history-day > summary span:last-child {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.palstudio-submissions-history-body {
    border-top: 1px solid #e2e8f0;
    padding: 10px;
}

.palstudio-submissions-history-month,
.palstudio-submissions-history-day {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
    margin-bottom: 8px;
}

.palstudio-submissions-history-month > summary,
.palstudio-submissions-history-day > summary {
    padding: 9px 12px;
    font-size: 0.86rem;
    font-weight: 700;
}

.palstudio-submissions-history-days,
.palstudio-submissions-history-list {
    display: grid;
    gap: 8px;
    padding: 0 10px 10px;
}

.palstudio-submissions-history-day {
    background: #fff;
}

.palstudio-submissions-history-row {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px 10px;
    cursor: default;
    font-size: 0.88rem;
}

.palstudio-submissions-history-row .palstudio-submission-summary-student {
    font-size: 0.88rem;
    font-weight: 700;
}

.palstudio-submissions-history-missing {
    border-radius: 10px;
    background: #fff7ed;
    color: #9a3412;
    padding: 8px 10px;
    font-size: 0.85rem;
}

.palstudio-student-submission-week {
    display: grid;
    gap: 10px;
}

.palstudio-student-submission-week h3 {
    margin: 0;
    font-size: 0.96rem;
    font-weight: 700;
}

.palstudio-student-submission-history {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    margin-top: 14px;
}

.palstudio-student-submission-history > summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    cursor: pointer;
    list-style: none;
    font-size: 0.96rem;
    font-weight: 700;
}

.palstudio-student-submission-history > summary::-webkit-details-marker {
    display: none;
}

.palstudio-student-submission-history > summary span:first-child {
    margin-right: auto;
}

.palstudio-student-submission-history > summary span:not(:first-child):not(.palstudio-summary-caret) {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.palstudio-student-submission-history-list,
.palstudio-student-submission-history-month-list {
    display: grid;
    gap: 10px;
    padding: 10px;
}

.palstudio-student-submission-history-list {
    border-top: 1px solid #e2e8f0;
}

.palstudio-student-submission-history-month {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}

.palstudio-student-submission-history-month > summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    cursor: pointer;
    list-style: none;
    font-size: 0.86rem;
    font-weight: 700;
}

.palstudio-student-submission-history-month > summary::-webkit-details-marker {
    display: none;
}

.palstudio-student-submission-history-month > summary span:first-child {
    margin-right: auto;
}

.palstudio-student-submission-history-month > summary span:not(:first-child):not(.palstudio-summary-caret) {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.palstudio-student-submission-history-month-list {
    border-top: 1px solid #e5e7eb;
}

.palstudio-submission-summary-row {
    display: grid;
    grid-template-columns: minmax(9rem, 0.95fr) minmax(9rem, 0.85fr) minmax(12.5rem, 1.15fr) minmax(5.5rem, max-content) minmax(7rem, max-content) 1rem;
    column-gap: clamp(0.65rem, 1.6vw, 1.25rem);
    row-gap: 0.35rem;
    align-items: center;
    cursor: pointer;
}

.palstudio-submission-summary-row::-webkit-details-marker {
    display: none;
}

.palstudio-submission-summary-row::marker {
    content: '';
}

.palstudio-submission-summary-row h3,
.palstudio-submission-summary-row p {
    margin: 0;
}

.palstudio-submission-summary-row > * {
    min-width: 0;
}

.palstudio-submission-summary-student {
    font-weight: 700;
}

.palstudio-submission-summary-time,
.palstudio-submission-summary-count {
    white-space: nowrap;
}

.palstudio-submission-summary-time {
    padding-right: clamp(0.45rem, 1.2vw, 0.9rem);
}

.palstudio-submission-summary-link {
    white-space: nowrap;
    overflow-wrap: normal;
    line-height: 1.2;
}

.palstudio-submission-playlist-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #1f2937;
    text-decoration: none;
    background: #ffffff;
    font-size: 0.82rem;
}

.palstudio-submission-playlist-icon:hover,
.palstudio-submission-playlist-icon:focus-visible {
    background: #f8fafc;
    outline: none;
}

.palstudio-submission-playlist-action {
    justify-self: end;
    font-size: 0.82rem;
    font-weight: 800;
}

.palstudio-submission-summary-icon {
    grid-column: -1;
    justify-self: end;
    transition: transform 0.15s ease;
}

.palstudio-submission-review[open] > .palstudio-submission-summary-row .palstudio-submission-summary-icon {
    transform: rotate(90deg);
}

@media (max-width: 900px) {
    .palstudio-submissions-cockpit-main,
    .palstudio-submissions-cockpit-grid,
    .palstudio-submissions-manual-form {
        grid-template-columns: 1fr;
    }

    .palstudio-submissions-stat-strip {
        justify-content: flex-start;
    }

    .palstudio-submissions-missing-list {
        columns: 1;
    }

    .palstudio-submission-summary-row {
        grid-template-columns: 1fr auto;
    }
    .palstudio-submission-summary-icon {
        grid-column: 2;
        grid-row: 1;
    }
}

.palstudio-feedback-editor { margin-top: 0.75rem; }
.palstudio-feedback-toggle { display: inline-flex; align-items: center; justify-content: center; width: 4.7rem; height: 4.7rem; border: 1px solid #d6e0ee; background: #f8fbff; color: #19304f; border-radius: 0.9rem; padding: 0.45rem; font-size: 0.95rem; cursor: pointer; }
.palstudio-feedback-toggle.has-feedback { border-color: #7bbf8a; background: #effaf1; }
.palstudio-feedback-toggle.is-empty { opacity: 0.85; }
.palstudio-feedback-toggle img { width: 3.1rem; height: 3.1rem; object-fit: contain; }
.palstudio-feedback-panel { margin-top: 0.5rem; border: 1px solid #d6e0ee; border-radius: 0.75rem; background: #fff; padding: 0.55rem; min-width: 15rem; max-width: 28rem; }
.palstudio-rich-toolbar { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.45rem; }
.palstudio-rich-toolbar button { min-height: 2rem; padding: 0.25rem 0.5rem; border: 1px solid #cbd6e2; border-radius: 0.45rem; background: #f6f8fb; cursor: pointer; }
.palstudio-rich-toolbar input[type="color"] { width: 2.2rem; height: 2rem; padding: 0.1rem; border: 1px solid #cbd6e2; border-radius: 0.45rem; background: #fff; }
.palstudio-rich-editor { min-height: 5rem; max-height: 15rem; overflow: auto; border: 1px solid #dbe3ee; border-radius: 0.55rem; padding: 0.55rem; background: #fff; line-height: 1.45; }
.palstudio-rich-editor:focus { outline: 2px solid rgba(71, 126, 204, 0.22); border-color: #7ca5dd; }
.palstudio-rich-editor img { max-width: 100%; height: auto; border-radius: 0.35rem; }
.palstudio-feedback-actions { display: flex; align-items: center; gap: 0.65rem; margin-top: 0.5rem; }
.palstudio-feedback-actions button { padding: 0.35rem 0.75rem; }
.palstudio-feedback-actions span { font-size: 0.85rem; color: #60728a; }

.palstudio-student-feedback-stack { display: grid; gap: 0.65rem; }
.palstudio-student-feedback-section img { max-width: 100%; height: auto; border-radius: 0.35rem; }
.palstudio-student-feedback-section p { margin-top: 0; }
.palstudio-student-feedback-section p:last-child { margin-bottom: 0; }
.palstudio-copy-pid { display: inline-flex; align-items: center; width: fit-content; border: 1px solid #cbd6e2; border-radius: 999px; background: #f6f8fb; color: #315783; padding: 0.15rem 0.45rem; margin-top: 0.18rem; font-size: 0.78rem; line-height: 1.2; cursor: pointer; }
.palstudio-copy-pid:hover, .palstudio-copy-pid:focus { background: #eaf2ff; border-color: #7ca5dd; }

.palstudio-submission-playlist-row { display: grid; grid-template-columns: max-content minmax(14rem, 32rem) auto; gap: 0.75rem; align-items: center; justify-content: start; margin-top: 1rem; }
.palstudio-submission-playlist-row label { margin: 0; font-weight: 600; }
.palstudio-submission-playlist-row input { width: min(100%, 32rem); }
@media (max-width: 700px) { .palstudio-submission-playlist-row { grid-template-columns: 1fr; } }

.palstudio-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 4.7rem; height: 4.7rem; padding: 0.45rem; border: 1px solid #d6e0ee; border-radius: 0.9rem; background: #fff; cursor: pointer; }
.palstudio-icon-button:hover, .palstudio-icon-button:focus { background: #eef5ff; border-color: #7ca5dd; }
.palstudio-icon-button img { width: 3.1rem; height: 3.1rem; object-fit: contain; }
.palstudio-feedback-lightbox { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(15, 23, 42, 0.48); }
.palstudio-feedback-lightbox-card { position: relative; box-sizing: border-box; width: min(38rem, calc(100vw - 2rem)); max-width: calc(100vw - 2rem); max-height: min(42rem, 90vh); overflow: auto; border-radius: 1rem; background: #fff; box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24); padding: 1.25rem; }
.palstudio-feedback-lightbox-close { position: absolute; top: 0.5rem; right: 0.6rem; border: 0; background: transparent; font-size: 1.7rem; line-height: 1; cursor: pointer; color: #53657d; }
.palstudio-feedback-lightbox-content { padding-top: 1rem; }

.palstudio-icon-button.palstudio-sheet-preview { width: 4.7rem; height: 4.7rem; aspect-ratio: auto; cursor: zoom-in; }
.palstudio-icon-button.palstudio-sheet-preview::after { content: none; }
.palstudio-icon-button.palstudio-sheet-preview img { width: 3.1rem; height: 3.1rem; border-radius: 0; background: transparent; }

.palstudio-submissions-table { width: 100%; min-width: 0; table-layout: auto; }
.palstudio-submissions-table th:nth-child(1), .palstudio-submissions-table td:nth-child(1) { width: auto; }
.palstudio-submissions-table th:nth-child(2), .palstudio-submissions-table td:nth-child(2),
.palstudio-submissions-table th:nth-child(3), .palstudio-submissions-table td:nth-child(3),
.palstudio-submissions-table th:nth-child(4), .palstudio-submissions-table td:nth-child(4),
.palstudio-submissions-table th:nth-child(5), .palstudio-submissions-table td:nth-child(5) { width: 1%; text-align: center; white-space: nowrap; }
.palstudio-submissions-table th:nth-child(6), .palstudio-submissions-table td:nth-child(6) { width: 1%; white-space: nowrap; }
.palstudio-submissions-table th:nth-child(7), .palstudio-submissions-table td:nth-child(7) { width: auto; }
.palstudio-submissions-table th, .palstudio-submissions-table td { overflow-wrap: anywhere; }
.palstudio-submissions-table .palstudio-icon-button span { font-size: 2.4rem; line-height: 1; }
.palstudio-submissions-table .palstudio-feedback-toggle { width: 4rem; height: 4rem; min-height: 4rem; padding: 0.35rem; }
.palstudio-submissions-table .palstudio-feedback-toggle img,
.palstudio-submissions-table .palstudio-icon-button img { width: 2.65rem; height: 2.65rem; }
.palstudio-submissions-table .palstudio-icon-button,
.palstudio-submissions-table .palstudio-icon-button.palstudio-sheet-preview { width: 4rem; height: 4rem; padding: 0.35rem; }
.palstudio-submissions-table .palstudio-submission-video iframe { width: min(100%, 260px); height: 146px; }
.palstudio-popup-text { white-space: normal; line-height: 1.5; }
.palstudio-popup-video iframe { width: min(72vw, 720px); aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 0.75rem; }
.palstudio-submission-aids { justify-content: flex-start; }

.palstudio-feedback-editor-lightbox-card { width: min(34rem, calc(100vw - 2rem)); }
.palstudio-feedback-editor-lightbox .palstudio-feedback-panel { margin-top: 0; max-width: none; min-width: 0; border: 0; padding: 0; }
.palstudio-feedback-editor-lightbox .palstudio-rich-editor { min-height: 12rem; max-height: 48vh; }
.palstudio-popup-video { width: min(720px, calc(100vw - 4.5rem)); max-width: 100%; overflow: hidden; }
.palstudio-popup-video iframe { display: block; width: 100%; max-width: 100%; }
@media (max-width: 520px) { .palstudio-popup-video { width: calc(100vw - 3rem); } }

.palstudio-recording-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.palstudio-other-takes-button { border: 1px solid #cbd6e2; border-radius: 999px; background: #f6f8fb; color: #315783; padding: 0.45rem 0.75rem; font-size: 0.85rem; cursor: pointer; white-space: nowrap; }
.palstudio-other-takes-button:hover, .palstudio-other-takes-button:focus { background: #eaf2ff; border-color: #7ca5dd; }
.palstudio-other-takes-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.85rem; width: min(720px, calc(100vw - 4.5rem)); max-width: 100%; }
.palstudio-other-take-thumb { display: flex; width: 100%; min-height: 6.2rem; aspect-ratio: 16 / 9; align-items: center; justify-content: center; padding: 0; border: 1px solid #d6e0ee; border-radius: 0.75rem; background: linear-gradient(135deg, #1e293b, #334155); color: #fff; overflow: hidden; cursor: pointer; }
.palstudio-other-take-thumb img { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.palstudio-other-take-thumb span { display: inline-flex; width: 3rem; height: 3rem; border-radius: 999px; align-items: center; justify-content: center; background: rgba(37, 99, 235, 0.92); color: #fff; font-size: 1.8rem; line-height: 1; box-shadow: 0 8px 20px rgba(15, 23, 42, 0.28); }

.palstudio-practice-title-feedback { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.palstudio-practice-title-feedback strong { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.palstudio-practice-title-feedback .palstudio-feedback-editor { flex: 0 0 auto; }
.palstudio-submissions-table tbody td { vertical-align: middle; }
.palstudio-submissions-table .palstudio-feedback-editor { margin-top: 0; display: inline-flex; align-items: center; }
.palstudio-submissions-table .palstudio-submission-sheet-music,
.palstudio-submissions-table .palstudio-recording-actions,
.palstudio-submissions-table .palstudio-submission-aids { min-height: 4rem; align-items: center; }
.palstudio-submissions-table .palstudio-submission-aids { display: flex; flex-wrap: nowrap; gap: 0.35rem; }
.palstudio-submissions-table .palstudio-audio-button { display: inline-flex; align-items: center; min-height: 2rem; white-space: nowrap; padding: 0.35rem 0.5rem; }

.palstudio-submission-detail-card { margin: 1rem 0 0; padding: 1rem; border: 1px solid #dbe3ee; border-radius: 1rem; background: #f8fafc; }
.palstudio-submission-detail-card .palstudio-table-wrap { background: #fff; border-radius: 0.85rem; }
.palstudio-unmatched-videos { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e2e8f0; }
.palstudio-unmatched-videos h4 { margin: 0 0 0.75rem; }
.palstudio-unmatched-recordings-list { display: grid; gap: 0.55rem; }
.palstudio-unmatched-recording-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; padding: 0.55rem 0.7rem; border: 1px solid #e2e8f0; border-radius: 0.75rem; background: #fff; }
.palstudio-unmatched-recording-row span { min-width: 0; overflow-wrap: anywhere; }
.palstudio-unmatched-recording-row .palstudio-icon-button { width: 3.25rem; height: 3.25rem; padding: 0.3rem; }
.palstudio-unmatched-recording-row .palstudio-icon-button span { font-size: 1.8rem; line-height: 1; }

@media (max-width: 1100px) { .palstudio-submission-summary-row { grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.85fr) minmax(0, 1.15fr) auto auto 1rem; column-gap: 0.85rem; } .palstudio-submission-summary-icon { grid-column: -1; } }

/* Local recorder / EVM-style recording settings */
.palstudio-recording-settings-card { display: grid; gap: 0.75rem; }
.palstudio-recording-settings-heading { display: flex; justify-content: center; align-items: center; gap: 0.5rem; width: 100%; border: 0; background: transparent; color: #0f172a; font-weight: 800; font-size: 1.05rem; cursor: pointer; text-decoration: underline; }
.palstudio-recording-settings-heading:hover, .palstudio-recording-settings-heading:focus-visible { color: #1d4ed8; outline: none; }
.palstudio-recording-settings-chevron { display: inline-flex; width: 1em; justify-content: center; text-decoration: none; }
.palstudio-recording-settings-body { display: grid; gap: 0.75rem; }
.palstudio-recording-settings-body[hidden] { display: none !important; }
.palstudio-recording-settings-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.65rem 1rem; }
.palstudio-recording-settings-row label { display: inline-flex; align-items: center; gap: 0.3rem; }
.palstudio-recorder-device-warning { margin: 0; padding: 0.65rem 0.8rem; border-radius: 0.75rem; background: #fef2f2; color: #991b1b; text-align: center; }
.palstudio-recorder-settings-status { min-height: 1.2rem; text-align: center; color: #2563eb; margin: 0; }
.palstudio-recording-devices-list { max-height: 12rem; overflow: auto; padding: 0.75rem; border-radius: 0.75rem; background: #f8fafc; border: 1px solid #e2e8f0; white-space: pre-wrap; }
.palstudio-practice-title-with-recorder { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.5rem; }
.palstudio-practice-title-lines { display: grid; gap: 0.1rem; min-width: 0; }
.palstudio-practice-title-lines strong { overflow-wrap: anywhere; }
.palstudio-record-start-button { flex: 0 0 auto; width: 2.6rem; height: 2.6rem; border-radius: 999px; border: 1px solid #fecaca; background: #fff1f2; color: #dc2626; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1.75rem; line-height: 1; }
.palstudio-record-start-button:disabled { opacity: 0.35; cursor: not-allowed; filter: grayscale(1); }
.palstudio-recording-row-status { display: block; min-width: 7rem; margin-top: 0.25rem; font-size: 0.82rem; color: #16a34a; }
.palstudio-recorder-shell[hidden] { display: none; }
.palstudio-recorder-shell { position: fixed; top: 0.75rem; right: 0.75rem; z-index: 2147483647; display: flex; align-items: flex-start; justify-content: flex-end; padding: 0; background: transparent; pointer-events: none; }
.palstudio-recorder-card { position: relative; width: min(34vw, 22rem); min-width: 15rem; max-height: 42vh; overflow: auto; background: rgba(255,255,255,0.72); opacity: 0.82; border-radius: 1rem; padding: 0.75rem; box-shadow: 0 16px 40px rgba(15,23,42,0.28); display: grid; gap: 0.45rem; pointer-events: auto; backdrop-filter: blur(4px); }
.palstudio-recorder-close { display: none !important; }
.palstudio-recorder-card h2, .palstudio-recorder-context { text-align: center; margin: 0; }
.palstudio-recorder-card h2 { font-size: 0.9rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palstudio-recorder-message { display: none !important; }
.palstudio-recorder-video-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #020617; border-radius: 0.75rem; overflow: hidden; }
.palstudio-recorder-video-wrap video { width: 100%; height: 100%; object-fit: contain; background: #020617; }
.palstudio-recorder-timer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(0,0,0,0.18); text-shadow: 0 2px 8px rgba(0,0,0,0.85); font-size: clamp(2rem, 8vw, 4.5rem); font-weight: 900; pointer-events: none; }
.palstudio-recorder-countdown { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(0,0,0,0.35); font-size: clamp(4rem, 18vw, 9rem); font-weight: 900; }
.palstudio-recorder-controls { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; align-items: center; }
@media (max-width: 720px) {
  .palstudio-recording-settings-row { justify-content: flex-start; }
  .palstudio-practice-title-with-recorder { align-items: flex-start; }
  .palstudio-record-start-button { width: 2.35rem; height: 2.35rem; font-size: 1.45rem; }
}

.palstudio-recording-row-status { font-weight: 700; color: #16a34a; }
@media (max-width: 720px) { .palstudio-recorder-card { width: min(54vw, 18rem); min-width: 12rem; opacity: 0.84; } }

.palstudio-recorder-timer[hidden] { display: none !important; }

.palstudio-card-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.palstudio-card-heading-row h2 { margin: 0; }
.palstudio-muted { color: #64748b; margin: 0; }
.palstudio-recording-sessions-list { display: grid; gap: 0.75rem; margin-top: 1rem; }
.palstudio-recording-session { border: 1px solid #e2e8f0; border-radius: 0.9rem; background: #ffffff; overflow: hidden; }
.palstudio-recording-session summary { cursor: pointer; padding: 0.8rem 1rem; font-weight: 800; color: #0f172a; background: #f8fafc; }
.palstudio-recording-takes-list { display: grid; gap: 0.65rem; padding: 0.85rem; }
.palstudio-recording-take-row { display: grid; gap: 0.3rem; padding: 0.75rem; border: 1px solid #e5e7eb; border-radius: 0.8rem; background: #fff; }
.palstudio-recording-take-row strong { color: #111827; }
.palstudio-recording-take-row span { margin-left: 0.4rem; color: #2563eb; font-weight: 800; }
.palstudio-recording-take-meta { color: #16a34a; font-weight: 800; font-size: 0.9rem; }
.palstudio-recording-filename { color: #64748b; font-size: 0.85rem; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .palstudio-card-heading-row { align-items: flex-start; flex-direction: column; }
  .palstudio-recordings-refresh { align-self: flex-start; }
}

/* PAL admin */
.palstudio-admin-shell {
    max-width: 980px;
    margin: 0 auto;
    padding: 24px;
}
.palstudio-admin-card {
    margin-bottom: 18px;
}
.palstudio-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}
.palstudio-eyebrow,
.palstudio-muted {
    color: #667085;
}
.palstudio-admin-form {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}
.palstudio-admin-form label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}
.palstudio-admin-form input[type="text"],
.palstudio-admin-form input[type="url"],
.palstudio-admin-form input[type="password"],
.palstudio-admin-form input[type="number"] {
    width: 100%;
    max-width: 560px;
    padding: 10px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
}
.palstudio-checkbox-row {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 10px !important;
}
.palstudio-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.palstudio-admin-inline-form {
    grid-template-columns: minmax(220px, 360px) auto;
    align-items: end;
}
.palstudio-admin-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 18px;
}
.palstudio-admin-status div,
.palstudio-notice {
    border-radius: 12px;
    padding: 12px;
    background: #f8fafc;
}
.palstudio-admin-status dt {
    font-weight: 700;
}
.palstudio-admin-status dd {
    margin: 4px 0 0;
}
.palstudio-notice-success {
    background: #ecfdf3;
    color: #027a48;
}
.palstudio-notice-error {
    background: #fef3f2;
    color: #b42318;
}
@media (max-width: 720px) {
    .palstudio-card-header,
    .palstudio-admin-inline-form {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* PAL admin */
.palstudio-admin-shell {
    max-width: 980px;
    margin: 0 auto;
    padding: 24px;
}
.palstudio-admin-card {
    margin-bottom: 18px;
}
.palstudio-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}
.palstudio-eyebrow,
.palstudio-muted {
    color: #667085;
}
.palstudio-admin-form {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}
.palstudio-admin-form label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}
.palstudio-admin-form input[type="text"],
.palstudio-admin-form input[type="url"],
.palstudio-admin-form input[type="password"],
.palstudio-admin-form input[type="number"] {
    width: 100%;
    max-width: 560px;
    padding: 10px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
}
.palstudio-checkbox-row {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 10px !important;
}
.palstudio-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.palstudio-admin-inline-form {
    grid-template-columns: minmax(220px, 360px) auto;
    align-items: end;
}
.palstudio-admin-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 18px;
}
.palstudio-admin-status div,
.palstudio-notice {
    border-radius: 12px;
    padding: 12px;
    background: #f8fafc;
}
.palstudio-admin-status dt {
    font-weight: 700;
}
.palstudio-admin-status dd {
    margin: 4px 0 0;
}
.palstudio-notice-success {
    background: #ecfdf3;
    color: #027a48;
}
.palstudio-notice-error {
    background: #fef3f2;
    color: #b42318;
}
@media (max-width: 720px) {
    .palstudio-card-header,
    .palstudio-admin-inline-form {
        display: grid;
        grid-template-columns: 1fr;
    }
}

[data-palstudio-tabs] [role="tabpanel"][hidden] {
    display: none !important;
}
.palstudio-admin-management-panel {
    display: grid;
    gap: 18px;
}
.palstudio-admin-panel-header,
.palstudio-admin-card-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.palstudio-admin-card-title-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.1fr) minmax(220px, 1fr) minmax(260px, 1.2fr) auto;
    align-items: center;
    column-gap: 28px;
    row-gap: 12px;
}
.palstudio-admin-panel-header h2,
.palstudio-admin-card-title-row h3 {
    margin: 0 0 4px;
}
.palstudio-admin-org-teacher {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: visible;
    white-space: nowrap;
    color: #475569;
    cursor: help;
}
.palstudio-admin-org-teacher:hover::after,
.palstudio-admin-org-teacher:focus::after {
    content: attr(data-email);
    position: absolute;
    z-index: 10;
    left: 0;
    top: calc(100% + 8px);
    max-width: min(360px, 70vw);
    border-radius: 10px;
    background: #17243a;
    color: #fff;
    padding: 8px 10px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
}
.palstudio-admin-org-teacher:focus {
    outline: 2px solid #bfdbfe;
    outline-offset: 3px;
    border-radius: 8px;
}
.palstudio-admin-org-agreement,
.palstudio-admin-card-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.palstudio-admin-org-agreement {
    justify-content: center;
}
.palstudio-admin-card-top-actions {
    justify-content: flex-end;
}
.palstudio-admin-card-top-actions {
    padding-left: 28px;
}
.palstudio-admin-org-teacher span {
    color: #667085;
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.palstudio-admin-org-teacher strong {
    flex: 0 0 auto;
    color: #17243a;
    font-weight: 900;
}
.palstudio-admin-org-teacher > a {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.palstudio-admin-panel-header > strong {
    flex: 0 0 auto;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    padding: 6px 12px;
    font-size: 0.9rem;
}
.palstudio-admin-application-list,
.palstudio-admin-organization-list {
    display: grid;
    gap: 14px;
}
.palstudio-admin-application-card,
.palstudio-admin-organization-card {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #ffffff;
    padding: 16px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}
.palstudio-admin-application-card p,
.palstudio-admin-organization-card p {
    margin: 4px 0;
}
.palstudio-admin-application-top-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}
.palstudio-admin-application-teacher {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 18px;
    min-width: 0;
}
.palstudio-admin-application-teacher h3 {
    margin: 0;
    margin-right: 12px;
}
.palstudio-admin-application-contact,
.palstudio-admin-website-link {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}
.palstudio-admin-application-contact {
    color: #475569;
    font-weight: 750;
}
.palstudio-admin-application-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}
.palstudio-admin-website-link {
    color: #1d4ed8;
    font-weight: 850;
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
}
.palstudio-admin-meta-grid.palstudio-admin-application-meta-grid {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
}
.palstudio-dev-admin-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}
.palstudio-dev-admin-info-card {
    display: grid;
    gap: 4px;
    min-width: 0;
}
.palstudio-dev-admin-info-card strong,
.palstudio-dev-admin-info-card small {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.palstudio-dev-admin-table-wrap {
    margin-top: 14px;
}
.palstudio-dev-admin-status-table td {
    overflow-wrap: anywhere;
}
.palstudio-dev-admin-details summary {
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 900;
    color: #111827;
}
.palstudio-dev-admin-details summary span {
    margin-left: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    color: #64748b;
}
.palstudio-admin-meta-grid.palstudio-admin-application-bio-grid {
    grid-template-columns: 1fr;
}
.palstudio-admin-application-bio-card {
    min-height: 112px;
    align-content: start;
}
.palstudio-admin-action-button,
.palstudio-admin-action-button:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.palstudio-admin-meta-grid,
.palstudio-admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.palstudio-admin-meta-grid span,
.palstudio-admin-summary-grid span {
    display: grid;
    gap: 2px;
    border-radius: 12px;
    background: #f8fafc;
    padding: 10px;
    color: #475569;
}
.palstudio-admin-meta-grid strong,
.palstudio-admin-summary-grid strong {
    color: #0f172a;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.palstudio-admin-card-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
}
.palstudio-admin-details,
.palstudio-admin-organization-details {
    margin-top: 12px;
}
.palstudio-admin-details summary,
.palstudio-admin-organization-details summary {
    cursor: pointer;
    font-weight: 800;
    color: #1f2937;
}
.palstudio-admin-organization-details > summary {
    list-style: none;
}
.palstudio-admin-organization-details > summary::-webkit-details-marker {
    display: none;
}
.palstudio-admin-organization-details > summary.palstudio-admin-summary-grid {
    font-weight: inherit;
}
.palstudio-admin-summary-grid span {
    cursor: pointer;
}
.palstudio-admin-chip-row,
.palstudio-admin-teacher-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}
.palstudio-admin-status-chip {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border-radius: 999px;
    padding: 4px 9px;
    background: #f1f5f9;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}
.palstudio-admin-status-chip.is-good {
    background: #dcfce7;
    color: #166534;
}
.palstudio-admin-status-chip.is-pending {
    background: #fff7ed;
    color: #9a3412;
}
.palstudio-admin-status-chip.is-attention {
    background: #fef2f2;
    color: #991b1b;
}
.palstudio-admin-student-table-wrap {
    margin-top: 12px;
    overflow-x: auto;
}
.palstudio-admin-organization-students-table {
    min-width: 1080px;
    table-layout: fixed;
}
.palstudio-admin-organization-students-table th:nth-child(1),
.palstudio-admin-organization-students-table td:nth-child(1) { width: 28%; }
.palstudio-admin-organization-students-table th:nth-child(2),
.palstudio-admin-organization-students-table td:nth-child(2) { width: 9%; }
.palstudio-admin-organization-students-table th:nth-child(3),
.palstudio-admin-organization-students-table td:nth-child(3) { width: 33%; }
.palstudio-admin-organization-students-table th:nth-child(4),
.palstudio-admin-organization-students-table td:nth-child(4) { width: 30%; }
.palstudio-admin-organization-students-table th:nth-child(4),
.palstudio-admin-organization-students-table td:nth-child(4) {
    padding-left: 36px;
    padding-right: 0;
    text-align: left;
}
.palstudio-admin-students-table td {
    vertical-align: middle;
}
.palstudio-admin-student-audit-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
}
.palstudio-admin-student-audit-table th:nth-child(1),
.palstudio-admin-student-audit-table td:nth-child(1) { width: 22%; }
.palstudio-admin-student-audit-table th:nth-child(2),
.palstudio-admin-student-audit-table td:nth-child(2) { width: 20%; }
.palstudio-admin-student-audit-table th:nth-child(3),
.palstudio-admin-student-audit-table td:nth-child(3) { width: 8%; }
.palstudio-admin-student-audit-table th:nth-child(4),
.palstudio-admin-student-audit-table td:nth-child(4) { width: 24%; }
.palstudio-admin-student-audit-table th:nth-child(5),
.palstudio-admin-student-audit-table td:nth-child(5) { width: 26%; }
.palstudio-admin-student-audit-table td:nth-child(1) {
    font-size: 0.95rem;
    white-space: nowrap;
}
.palstudio-admin-student-audit-table td:nth-child(2),
.palstudio-admin-student-audit-table .palstudio-admin-email-cell {
    font-size: 0.9rem;
}
.palstudio-admin-student-audit-table td:nth-child(2) strong {
    font-size: 0.95rem;
}
.palstudio-admin-student-audit-table .palstudio-admin-email-cell a {
    display: inline-block;
    max-width: calc(100% - 74px);
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}
.palstudio-admin-student-audit-table .palstudio-admin-agreement-inline {
    gap: 6px;
}
.palstudio-admin-student-audit-table .palstudio-admin-agreement-inline small {
    font-size: 0.82rem;
}
.palstudio-admin-student-audit-table .palstudio-admin-compact-button {
    padding-inline: 10px;
}
.palstudio-admin-agreement-cell {
    white-space: nowrap;
}
.palstudio-admin-agreement-inline {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    white-space: nowrap;
    width: 100%;
}
.palstudio-admin-agreement-inline small {
    color: #475569;
    font-size: 0.95rem;
}
.palstudio-admin-email-cell {
    white-space: nowrap;
}
.palstudio-admin-email-cell a {
    margin-right: 10px;
}
.palstudio-admin-invitation-cell {
    white-space: nowrap;
}
.palstudio-admin-invitation-cell form {
    margin-top: 8px;
}
.palstudio-admin-resend-button {
    appearance: none;
    border: 0;
    background: transparent;
    color: #1d4ed8;
    padding: 0;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
.palstudio-admin-action-button,
.palstudio-admin-shell button.palstudio-admin-action-button {
    appearance: none;
    border: 1px solid #17243a;
    background: #17243a;
    color: #fff;
    border-radius: 14px;
    min-height: 46px;
    padding: 12px 18px;
    font-family: var(--palstudio-font-family) !important;
    font-size: 0.98rem;
    font-weight: 900;
    line-height: 1.1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(23, 36, 58, 0.14);
    white-space: nowrap;
}
.palstudio-admin-action-button:disabled,
.palstudio-admin-shell button.palstudio-admin-action-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(1);
}
.palstudio-admin-compact-button,
.palstudio-admin-shell button.palstudio-admin-compact-button {
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
}
.palstudio-admin-students-table form,
.palstudio-admin-teacher-actions form,
.palstudio-admin-card-actions form,
.palstudio-admin-card-top-actions form,
.palstudio-admin-org-agreement form {
    margin: 0;
}
@media (max-width: 760px) {
    .palstudio-admin-panel-header,
    .palstudio-admin-card-title-row,
    .palstudio-admin-card-main {
        display: grid;
        grid-template-columns: 1fr;
    }
    .palstudio-admin-card-actions,
    .palstudio-admin-chip-row,
    .palstudio-admin-teacher-actions {
        justify-content: flex-start;
    }
}

/* Student tabs / PeerTube upload status */
.palstudio-student-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 14px;
}
.palstudio-student-tab {
    border: 1px solid #d0d5dd;
    background: #fff;
    border-radius: 999px;
    padding: 9px 14px;
    font-weight: 700;
    cursor: pointer;
}
.palstudio-student-tab.is-active {
    background: #1e66f5;
    color: #fff;
    border-color: #1e66f5;
}
[data-palstudio-recordings-upload-badge] {
    display: inline-block;
    margin-left: 6px;
    border-radius: 999px;
    padding: 2px 7px;
    background: #fff4cc;
    color: #7a4b00;
    font-size: 0.75rem;
}
.palstudio-recording-take-row progress {
    width: 100%;
    max-width: 260px;
    height: 8px;
    margin: 6px 0;
}

.palstudio-recordings-submit-bar { display: flex; align-items: center; gap: 0.75rem; justify-content: flex-start; margin-bottom: 0.85rem; }
.palstudio-recordings-submit-bar .palstudio-submit-message { margin: 0; min-height: 1.2rem; }
.palstudio-recording-sessions-list { margin-top: 0; }
.palstudio-recordings-subcard { border: 1px solid #e2e8f0; border-radius: 0.95rem; background: #ffffff; padding: 0.85rem; display: grid; gap: 0.75rem; }
.palstudio-recordings-subcard + .palstudio-recordings-subcard { margin-top: 0.85rem; }
.palstudio-recordings-subcard h3 { margin: 0; font-size: 1rem; color: #0f172a; }
.palstudio-upload-recordings-list { display: grid; gap: 0.65rem; }
.palstudio-upload-recording-row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(8rem, 12rem); gap: 0.75rem; align-items: center; padding: 0.65rem; border: 1px solid #e5e7eb; border-radius: 0.8rem; background: #f8fafc; }
.palstudio-upload-recording-row.is-updating { opacity: 0.6; }
.palstudio-upload-recording-check { display: inline-flex; align-items: center; justify-content: center; margin: 0; }
.palstudio-upload-recording-check input { width: 1.15rem; height: 1.15rem; }
.palstudio-upload-recording-main { min-width: 0; display: grid; gap: 0.2rem; }
.palstudio-upload-recording-main strong { color: #111827; overflow-wrap: anywhere; }
.palstudio-upload-recording-meta { color: #475569; font-size: 0.86rem; font-weight: 700; }
.palstudio-upload-recording-video { width: 100%; aspect-ratio: 16 / 9; border-radius: 0.65rem; overflow: hidden; background: #0f172a; }
.palstudio-upload-recording-video iframe, .palstudio-recording-video-lazy, .palstudio-recording-video-placeholder { width: 100%; height: 100%; border: 0; display: flex; align-items: center; justify-content: center; }
.palstudio-recording-video-lazy { cursor: pointer; color: #fff; background: linear-gradient(135deg, #1e293b, #334155); gap: 0.35rem; font-weight: 800; }
.palstudio-recording-video-play { width: 2rem; height: 2rem; border-radius: 999px; background: rgba(255,255,255,0.2); display: inline-flex; align-items: center; justify-content: center; }
.palstudio-recording-video-placeholder { color: #cbd5e1; font-size: 0.8rem; text-decoration: none; text-align: center; padding: 0.5rem; box-sizing: border-box; }
@media (max-width: 720px) { .palstudio-upload-recording-row { grid-template-columns: auto minmax(0, 1fr); } .palstudio-upload-recording-video { grid-column: 1 / -1; } }

.palstudio-recordings-subcard h3 { display: flex; align-items: baseline; gap: 0.55rem; flex-wrap: wrap; }
.palstudio-recordings-subcard-stats { color: #64748b; font-size: 0.86rem; font-weight: 700; }

.palstudio-recordings-subcard-header { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.75rem; }
.palstudio-recordings-subcard-header h3 { margin: 0; }
.palstudio-upload-recording-row { grid-template-columns: auto minmax(0, 1fr) minmax(8rem, 12rem) auto; }
.palstudio-upload-recording-actions { display: flex; align-items: center; justify-content: flex-end; }
.palstudio-upload-recording-actions .palstudio-danger-button { padding: 0.3rem 0.6rem; font-size: 0.8rem; }

/* Student tab/layout cleanup */
.palstudio-student-tabs-card { margin-bottom: 20px; }
.palstudio-student-tabs { margin: 0; }
.palstudio-student-tab { border-radius: 10px 10px 0 0; }
.palstudio-student-tab.is-active { background: #fff; color: #111827; border-color: #d1d5db; border-bottom-color: #fff; }
.palstudio-student-tab-panel > .palstudio-card:last-child { margin-bottom: 0; }
.palstudio-recordings-subcard h3 { font-size: 1.05rem; font-weight: 800; }
.palstudio-upload-recording-row { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 0.55rem; padding: 0.5rem 0.65rem; }
.palstudio-local-recording-row { grid-template-columns: minmax(0, 1fr) auto; }
.palstudio-upload-recording-video { width: auto; aspect-ratio: auto; border-radius: 0; overflow: visible; background: transparent; display: flex; align-items: center; justify-content: center; gap: 0.45rem; }
.palstudio-record-again-button,
.palstudio-recording-preview-button { white-space: nowrap; padding: 0.45rem 0.75rem; font-size: 0.85rem; border-radius: 999px; text-decoration: none; }
.palstudio-practice-record-again-target { animation: palstudio-record-again-highlight 1.8s ease; }
@keyframes palstudio-record-again-highlight {
  0%, 100% { box-shadow: none; }
  18%, 72% { box-shadow: 0 0 0 4px rgba(83, 96, 255, .28); }
}
.palstudio-recording-video-icon { width: 3.25rem; height: 3.25rem; padding: 0.3rem; }
.palstudio-recording-video-icon span { font-size: 1.8rem; line-height: 1; }
.palstudio-recording-video-icon-placeholder { color: #94a3b8; }
.palstudio-upload-recording-actions .palstudio-secondary-button,
.palstudio-recordings-subcard-header .palstudio-secondary-button { padding: 0.45rem 0.75rem; font-size: 0.85rem; border-radius: 999px; }
@media (max-width: 720px) {
  .palstudio-upload-recording-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .palstudio-upload-recording-video { grid-column: auto; }
  .palstudio-local-recording-row { grid-template-columns: 1fr; }
}

.palstudio-submit-words-input { flex: 1 1 22rem; min-width: min(22rem, 100%); padding: 0.55rem 0.75rem; border: 1px solid #cbd5e1; border-radius: 999px; font: inherit; }
.palstudio-recordings-submit-bar > button[type="submit"] { margin-left: auto; flex: 0 0 auto; }
.palstudio-recordings-subcard-header .palstudio-danger-button,
.palstudio-upload-recording-actions .palstudio-danger-button { background: #dc2626; border-color: #dc2626; color: #ffffff; border-radius: 999px; padding: 0.45rem 0.75rem; font-size: 0.85rem; }
.palstudio-recordings-subcard-header .palstudio-danger-button:hover,
.palstudio-recordings-subcard-header .palstudio-danger-button:focus-visible,
.palstudio-upload-recording-actions .palstudio-danger-button:hover,
.palstudio-upload-recording-actions .palstudio-danger-button:focus-visible { background: #b91c1c; border-color: #b91c1c; color: #ffffff; }

.palstudio-upload-practice-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(15, 23, 42, 0.55); }
.palstudio-upload-practice-card { width: min(28rem, calc(100vw - 2rem)); background: #fff; border-radius: 1rem; padding: 1rem; box-shadow: 0 24px 80px rgba(15,23,42,0.35); display: grid; gap: 0.85rem; }
.palstudio-upload-practice-card h3 { margin: 0; }
.palstudio-upload-practice-card label { display: grid; gap: 0.35rem; font-weight: 700; }
.palstudio-upload-practice-card select { width: 100%; padding: 0.55rem 0.65rem; border: 1px solid #cbd5e1; border-radius: 0.65rem; font: inherit; }
.palstudio-upload-practice-actions { display: flex; justify-content: flex-end; gap: 0.55rem; }

/* Director/principal student avatar directory */
.palstudio-student-directory-card { margin-bottom: 1rem; }
.palstudio-student-directory-card[hidden] { display: none; }
.palstudio-student-avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 0.9rem; margin-top: 1rem; }
.palstudio-student-avatar-grid[hidden] { display: none; }
.palstudio-student-avatar-card { border: 1px solid #e2e8f0; border-radius: 18px; background: #fff; padding: 1rem 0.75rem; min-height: 142px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.65rem; cursor: pointer; box-shadow: 0 10px 24px rgba(15,23,42,.06); color: #0f172a; font-weight: 800; text-align: center; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.palstudio-student-avatar-card:hover, .palstudio-student-avatar-card:focus-visible, .palstudio-student-avatar-card.is-active { transform: translateY(-2px); border-color: #2563eb; box-shadow: 0 16px 34px rgba(37,99,235,.15); outline: none; }
.palstudio-student-avatar { width: 72px; height: 72px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #dbeafe, #eef2ff); color: #1d4ed8; font-size: 1.45rem; font-weight: 900; letter-spacing: .02em; }
.palstudio-student-avatar-add { background: #ecfdf5; color: #047857; font-size: 2.4rem; line-height: 1; }
.palstudio-student-avatar-name { display: block; max-width: 100%; overflow-wrap: anywhere; line-height: 1.15; }
.palstudio-student-detail-stack { display: grid; gap: 1rem; }
.palstudio-student-detail-heading { display: flex; align-items: center; gap: 0.9rem; }
.palstudio-student-detail-header { align-items: flex-start; flex-wrap: wrap; }
.palstudio-student-detail-header .palstudio-student-detail-actions { margin-top: 0; justify-content: flex-end; }
.palstudio-student-detail-header .palstudio-secondary-button { white-space: nowrap; }
.palstudio-student-brief-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.75rem; margin: 1rem 0; }
.palstudio-student-brief-info div { border: 1px solid #e2e8f0; border-radius: 12px; padding: 0.75rem; background: #f8fafc; }
.palstudio-student-brief-info dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #64748b; font-weight: 900; }
.palstudio-student-brief-info dd { margin: .25rem 0 0; color: #0f172a; font-weight: 700; overflow-wrap: anywhere; }
.palstudio-student-detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: .75rem; }
.palstudio-student-detail-actions .palstudio-secondary-button,
.palstudio-student-detail-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 5px 10px;
    font-size: 0.82rem;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}
.palstudio-student-detail-action-button.is-active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(29, 78, 216, 0.18);
}
.palstudio-student-edit-card { margin-top: 1rem; border-top: 1px solid #e2e8f0; padding-top: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.palstudio-student-embedded-assignments,
.palstudio-student-embedded-submissions {
    margin-top: 1rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
}
.palstudio-student-embedded-assignments[hidden],
.palstudio-student-embedded-submissions[hidden] { display: none; }
.palstudio-student-embedded-loading {
    padding: 1rem;
    color: #64748b;
    font-weight: 700;
}
.palstudio-student-embedded-content > .palstudio-app.palstudio-student {
    min-height: 0;
    background: transparent;
    padding: 0;
}
.palstudio-student-embedded-content .palstudio-main {
    max-width: none;
    padding: 0;
}
.palstudio-assignment-manager { display: grid; gap: 1rem; }
.palstudio-assignment-manager-header {
    align-items: flex-start;
    gap: 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}
.palstudio-assignment-view-tabs { display: flex; flex-wrap: nowrap; gap: 10px; justify-content: flex-end; white-space: nowrap; align-items: center; }
.palstudio-assignment-view-tabs .palstudio-secondary-button { padding: 5px 10px; font-size: 0.82rem; white-space: nowrap; flex: 0 0 auto; }
.palstudio-assignment-legend-button {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #1d4ed8;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}
.palstudio-assignment-legend-button:hover,
.palstudio-assignment-legend-button[aria-expanded="true"] { background: #eff6ff; border-color: #93c5fd; }
.palstudio-assignment-view-tabs [hidden] { display: none !important; }
.palstudio-assignment-view-tabs .palstudio-secondary-button.is-active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(29, 78, 216, 0.18);
}
.palstudio-assignment-legend {
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #f8fafc;
    padding: 0.85rem 1rem;
    color: #0f172a;
}
.palstudio-assignment-legend[hidden] { display: none; }
.palstudio-assignment-legend ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.55rem 1rem;
    margin: 0.65rem 0 0;
    padding: 0;
    list-style: none;
}
.palstudio-assignment-legend li { display: flex; align-items: flex-start; gap: 0.5rem; color: #475569; line-height: 1.35; }
.palstudio-status-copy { display: grid; gap: 0.12rem; }
.palstudio-status-copy b { color: #0f172a; }
.palstudio-status-copy span { display: block; }
.palstudio-status-dot { width: 0.72rem; height: 0.72rem; border-radius: 999px; flex: 0 0 auto; background: #94a3b8; margin-top: 0.28rem; }
.palstudio-status-dot.is-active { background: #1d4ed8; }
.palstudio-status-dot.is-completed { background: #16a34a; }
.palstudio-status-dot.is-available { background: #7c3aed; }
.palstudio-status-dot.is-locked { background: #94a3b8; }
.palstudio-status-dot.is-assigned,
.palstudio-status-dot.is-assigned_locked { background: #f59e0b; }
.palstudio-status-dot.is-paused { background: #f97316; }
.palstudio-status-lifecycle {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid #e2e8f0;
}
.palstudio-status-lifecycle-track {
    display: grid;
    gap: 0.45rem;
    margin-top: 0.75rem;
}
.palstudio-status-track-label {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.palstudio-status-lifecycle-path {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: flex-end;
    margin-top: 0.6rem;
}
.palstudio-status-step {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    padding: 0.35rem 0.65rem;
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 800;
}
.palstudio-status-transition {
    display: grid;
    justify-items: center;
    align-items: end;
    gap: 0.1rem;
    min-width: 74px;
    color: #64748b;
    line-height: 1.1;
}
.palstudio-status-transition small {
    font-size: 0.64rem;
    font-weight: 800;
    text-align: center;
    color: #64748b;
}
.palstudio-status-transition span {
    font-size: 1rem;
    font-weight: 900;
    color: #475569;
}
.palstudio-status-lifecycle p { margin: 0.6rem 0 0; color: #64748b; font-size: 0.9rem; }
.palstudio-assignment-recommendation {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    background: #eff6ff;
    color: #1e3a8a;
}
.palstudio-path-map { display: grid; gap: 1rem; overflow-x: auto; padding-bottom: 0.35rem; }
.palstudio-path-map-level { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 0.75rem; align-items: stretch; }
.palstudio-path-map-level-label {
    align-self: center;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.palstudio-path-map-nodes { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0.75rem; }
.palstudio-active-category-list { display: grid; gap: 0.7rem; }
.palstudio-active-category-list-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    color: #0f172a;
}
.palstudio-active-category-list-header strong { font-size: 1rem; font-weight: 900; }
.palstudio-active-category-list-header p { margin: 0.15rem 0 0; color: #64748b; font-size: 0.82rem; line-height: 1.35; }
.palstudio-active-category-list-header span { color: #64748b; font-size: 0.82rem; font-weight: 800; white-space: nowrap; }
.palstudio-active-category-empty {
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    padding: 0.85rem;
}
.palstudio-active-category-table {
    display: grid;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}
.palstudio-active-category-table-head,
.palstudio-active-category-row {
    display: grid;
    grid-template-columns: minmax(130px, 0.72fr) minmax(155px, 0.9fr) minmax(5.4rem, 0.48fr) minmax(5.8rem, 0.52fr) minmax(4.2rem, 0.42fr) minmax(7.4rem, 0.58fr);
    column-gap: clamp(0.7rem, 2vw, 1.6rem);
    row-gap: 0.45rem;
    align-items: center;
}
.palstudio-active-category-table-head {
    padding: 0.55rem 0.75rem;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom: 1px solid #e2e8f0;
}
.palstudio-active-category-table-head span:nth-child(n+3):nth-child(-n+6) { text-align: center; }
.palstudio-active-category-row {
    border: 0;
    border-left: 1px solid #e2e8f0;
    border-radius: 0;
    background: #ffffff;
    padding: 0.65rem 0.75rem;
    box-shadow: none;
}
.palstudio-active-category-row + .palstudio-active-category-row { border-top: 1px solid #e2e8f0; }
.palstudio-active-category-name,
.palstudio-active-practice-current { min-width: 0; }
.palstudio-active-category-name {
    display: grid;
    gap: 0.12rem;
}
.palstudio-active-category-row h3 { margin: 0; color: #0f172a; font-size: 0.94rem; }
.palstudio-active-category-name span,
.palstudio-active-practice-current span { display: block; color: #64748b; font-size: 0.76rem; font-weight: 800; }
.palstudio-active-category-name strong,
.palstudio-active-practice-current > strong {
    display: block;
    margin-top: 0.15rem;
    color: #0f172a;
    font-size: 0.88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.palstudio-active-category-manage {
    justify-self: start;
    margin-top: 0.25rem;
    min-height: 28px;
    padding: 4px 9px;
    font-size: 0.8rem;
}
.palstudio-active-practice-detail-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}
.palstudio-active-practice-current strong,
.palstudio-active-practice-expanded-row strong {
    display: block;
    color: #0f172a;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.palstudio-active-practice-detail-cell .palstudio-icon-button,
.palstudio-active-practice-detail-cell .palstudio-icon-button.palstudio-sheet-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.2rem;
    height: 3.2rem;
    padding: 0.3rem;
    box-sizing: border-box;
    text-decoration: none;
    line-height: 1;
}
.palstudio-active-practice-detail-cell .palstudio-icon-button img,
.palstudio-active-practice-detail-cell .palstudio-icon-button.palstudio-sheet-preview img {
    width: 2.1rem;
    height: 2.1rem;
}
.palstudio-active-practice-detail-cell .palstudio-play-icon-button span {
    width: 2.1rem;
    height: 2.1rem;
    font-size: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-decoration: none;
}
.palstudio-active-practice-detail-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.2rem;
    height: 3.2rem;
    color: #94a3b8;
    font-size: 1rem;
    font-weight: 800;
}
.palstudio-active-practice-aids { display: inline-flex; align-items: center; justify-content: center; flex-wrap: nowrap; gap: 0.2rem; width: 100%; min-width: 6.2rem; min-height: 3.2rem; justify-self: center; margin: 0 auto; }
.palstudio-active-practice-aids .palstudio-audio-button { flex: 0 0 auto; min-height: 1.35rem; padding: 2px 5px; font-size: 0.66rem; line-height: 1.1; white-space: nowrap; }
.palstudio-status-pill {
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.palstudio-status-pill.is-active { background: #eff6ff; color: #1d4ed8; border: 1px solid #93c5fd; }
.palstudio-active-category-actions { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 0.25rem; }
.palstudio-active-practice-current .palstudio-active-category-actions { margin-top: 0.7rem; }
.palstudio-active-category-actions button { min-width: 2.2rem; min-height: 28px; padding: 4px 8px; font-size: 0.8rem; line-height: 1.15; }
.palstudio-active-category-row.is-expanded [data-palstudio-active-practice-prev],
.palstudio-active-category-row.is-expanded [data-palstudio-active-practice-next] { display: none; }
.palstudio-active-category-row.is-expanded .palstudio-active-practice-current > span,
.palstudio-active-category-row.is-expanded .palstudio-active-practice-current [data-palstudio-active-practice-detail-current],
.palstudio-active-category-row.is-expanded [data-palstudio-active-practice-detail-current-instructions],
.palstudio-active-category-row.is-expanded [data-palstudio-active-practice-detail-current-sheet],
.palstudio-active-category-row.is-expanded [data-palstudio-active-practice-detail-current-video],
.palstudio-active-category-row.is-expanded [data-palstudio-active-practice-detail-current-aids] {
    visibility: hidden;
}
.palstudio-active-practice-expanded {
    grid-column: 2 / -1;
    padding: 0.45rem 0 0.15rem;
}
.palstudio-active-practice-expanded[hidden] { display: none; }
.palstudio-active-practice-expanded-table { display: grid; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; background: #fff; }
.palstudio-active-practice-expanded-row {
    display: grid;
    grid-template-columns: minmax(155px, 0.9fr) minmax(5.4rem, 0.48fr) minmax(5.8rem, 0.52fr) minmax(4.2rem, 0.42fr) minmax(7.4rem, 0.58fr);
    column-gap: clamp(0.7rem, 2vw, 1.6rem);
    row-gap: 0.45rem;
    align-items: center;
}
.palstudio-active-practice-expanded-row { padding: 0.55rem 0.6rem; }
.palstudio-active-practice-expanded-row + .palstudio-active-practice-expanded-row { border-top: 1px solid #e2e8f0; }
@media (max-width: 760px) {
    .palstudio-active-category-list-header { display: grid; }
    .palstudio-active-category-table { border-radius: 12px; overflow: visible; border: 0; background: transparent; gap: 0.65rem; }
    .palstudio-active-category-table-head { display: none; }
    .palstudio-active-category-row {
        grid-template-columns: 1fr;
        gap: 0.55rem;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 0.75rem;
    }
    .palstudio-active-practice-expanded { grid-column: 1; }
    .palstudio-active-category-row.is-expanded .palstudio-active-practice-current > span,
    .palstudio-active-category-row.is-expanded .palstudio-active-practice-current [data-palstudio-active-practice-detail-current],
    .palstudio-active-category-row.is-expanded [data-palstudio-active-practice-detail-current-instructions],
    .palstudio-active-category-row.is-expanded [data-palstudio-active-practice-detail-current-sheet],
    .palstudio-active-category-row.is-expanded [data-palstudio-active-practice-detail-current-video],
    .palstudio-active-category-row.is-expanded [data-palstudio-active-practice-detail-current-aids] { display: none; }
    .palstudio-active-practice-expanded-row { grid-template-columns: 1fr 3rem 3rem 3rem 6rem; overflow-x: auto; }
    .palstudio-active-category-row + .palstudio-active-category-row { border-top: 1px solid #e2e8f0; }
    .palstudio-active-category-name strong,
    .palstudio-active-practice-current strong,
    .palstudio-active-practice-expanded-row strong { white-space: normal; }
    .palstudio-active-practice-detail-cell .palstudio-icon-button,
    .palstudio-active-practice-detail-cell .palstudio-icon-button.palstudio-sheet-preview,
    .palstudio-active-practice-detail-empty { width: 3rem; height: 3rem; min-height: 3rem; }
    .palstudio-active-practice-aids { width: 6rem; min-height: 3rem; }
    .palstudio-active-practice-detail-cell .palstudio-icon-button img,
    .palstudio-active-practice-detail-cell .palstudio-icon-button.palstudio-sheet-preview img,
    .palstudio-active-practice-detail-cell .palstudio-play-icon-button span { width: 2rem; height: 2rem; }
    .palstudio-active-category-actions { align-items: stretch; }
    .palstudio-active-category-actions button { flex: 1 1 auto; }
}
.palstudio-category-list-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.75rem; }
.palstudio-path-node,
.palstudio-category-list-card {
    min-height: 96px;
    border: 1px solid #cbd5e1;
    border-left-width: 5px;
    border-radius: 14px;
    background: #ffffff;
    color: #0f172a;
    padding: 0.8rem;
    text-align: left;
    display: grid;
    gap: 0.25rem;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}
.palstudio-path-node { flex: 0 0 170px; max-width: 210px; }
.palstudio-category-list-card { width: 100%; }
.palstudio-path-node strong,
.palstudio-category-list-card strong { font-size: 0.95rem; }
.palstudio-path-node > span,
.palstudio-category-list-card > span { font-size: 0.78rem; font-weight: 900; text-transform: uppercase; color: #475569; }
.palstudio-path-node small,
.palstudio-category-list-card small { color: #64748b; line-height: 1.35; }
.palstudio-path-node .palstudio-path-node-meta,
.palstudio-path-node .palstudio-path-node-meta span {
    display: block;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 500;
    line-height: 1.35;
    text-transform: none;
    letter-spacing: normal;
}
.palstudio-path-node.is-active,
.palstudio-category-list-card.is-active { border-left-color: #1d4ed8; background: #eff6ff; }
.palstudio-path-node.is-completed,
.palstudio-category-list-card.is-completed { border-left-color: #16a34a; background: #f0fdf4; }
.palstudio-path-node.is-locked,
.palstudio-category-list-card.is-locked { border-left-color: #94a3b8; background: #f8fafc; opacity: 0.88; }
.palstudio-path-node.is-available,
.palstudio-category-list-card.is-available { border-left-color: #7c3aed; background: #f5f3ff; }
.palstudio-path-node.is-assigned,
.palstudio-category-list-card.is-assigned,
.palstudio-path-node.is-assigned_locked,
.palstudio-category-list-card.is-assigned_locked { border-left-color: #f59e0b; background: #fffbeb; }
.palstudio-path-node.is-paused,
.palstudio-category-list-card.is-paused { border-left-color: #f97316; background: #fff7ed; }
.palstudio-path-node.is-selected,
.palstudio-category-list-card.is-selected { outline: 3px solid rgba(37, 99, 235, 0.22); box-shadow: 0 14px 28px rgba(37, 99, 235, 0.14); }
.palstudio-category-operation-panel {
    margin-top: 1rem;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #ffffff;
    padding: 1rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}
.palstudio-category-operation-panel[hidden] { display: none; }
.palstudio-category-action-summary { color: #475569; margin: 0.3rem 0 0.85rem; }
.palstudio-category-action-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.75rem; margin: 0.75rem 0 1rem; }
.palstudio-category-action-item { border: 1px solid #e2e8f0; border-radius: 12px; padding: 0.8rem; background: #f8fafc; }
.palstudio-category-action-item strong { display: block; color: #0f172a; font-size: 0.92rem; font-weight: 900; }
.palstudio-category-action-item span { display: block; margin-top: 0.25rem; color: #64748b; font-size: 0.82rem; line-height: 1.35; }
.palstudio-category-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.65rem;
    color: #64748b;
    font-size: 0.8rem;
}
.palstudio-category-chip {
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    padding: 4px 9px;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
}
.palstudio-category-chip.is-active { border-color: #93c5fd; background: #eff6ff; color: #1d4ed8; }
.palstudio-category-chip.is-completed { border-color: #86efac; background: #f0fdf4; color: #166534; }
.palstudio-category-chip.is-available { border-color: #c4b5fd; background: #f5f3ff; color: #6d28d9; }
.palstudio-category-chip.is-locked { border-color: #cbd5e1; background: #f8fafc; color: #475569; }
.palstudio-category-chip.is-assigned_locked { border-color: #fcd34d; background: #fffbeb; color: #92400e; }
.palstudio-category-chip.is-paused { border-color: #fdba74; background: #fff7ed; color: #c2410c; }
.palstudio-practice-filter-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #eff6ff;
    color: #1e3a8a;
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.85rem;
}
.palstudio-practice-filter-banner[hidden] { display: none; }
.palstudio-practice-filter-banner button { padding: 5px 10px; min-height: 30px; font-size: 0.82rem; }
.palstudio-category-action-item input {
    margin-top: 0.7rem;
    width: 4.5rem;
    max-width: 4.5rem;
    height: 30px;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 0.82rem;
    line-height: 1.2;
    vertical-align: middle;
}
.palstudio-category-action-item button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.7rem;
    height: 30px;
    min-height: 30px;
    padding: 5px 10px;
    box-sizing: border-box;
    font-size: 0.82rem;
    line-height: 1.2;
    white-space: nowrap;
    vertical-align: middle;
}
.palstudio-category-operation-panel dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.75rem; margin: 0.75rem 0; }
.palstudio-category-operation-panel > div:not([data-palstudio-category-practice-templates]) { border: 1px solid #e2e8f0; border-radius: 12px; padding: 0.7rem; background: #f8fafc; }
.palstudio-category-practice-drawer { grid-column: 1 / -1; }
.palstudio-category-operation-panel .palstudio-category-practice-drawer,
.palstudio-category-operation-panel .palstudio-category-practice-table,
.palstudio-category-operation-panel .palstudio-category-practice-table-head,
.palstudio-category-operation-panel .palstudio-category-practice-row,
.palstudio-category-operation-panel .palstudio-category-practice-row > div { padding: 0; border: 0; border-radius: 0; background: transparent; }
.palstudio-category-practice-table {
    display: grid;
    overflow: hidden;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    background: #ffffff !important;
}
.palstudio-category-practice-table-head,
.palstudio-category-practice-row {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(5.4rem, 0.55fr) minmax(5.8rem, 0.58fr) minmax(4.2rem, 0.45fr) minmax(7.4rem, 0.62fr);
    column-gap: clamp(0.6rem, 1.6vw, 1.25rem);
    align-items: center;
}
.palstudio-category-practice-table-head {
    padding: 0.5rem 0.7rem !important;
    background: #f8fafc !important;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.palstudio-category-practice-table-head span:nth-child(n+2),
.palstudio-category-practice-row > div:nth-child(n+2) { text-align: center; }
.palstudio-category-practice-row { padding: 0.6rem 0.7rem !important; }
.palstudio-category-practice-row + .palstudio-category-practice-row { border-top: 1px solid #e2e8f0 !important; }
.palstudio-category-practice-row strong { color: #0f172a; font-size: 0.9rem; }
.palstudio-category-operation-panel dt { font-size: 0.72rem; color: #64748b; font-weight: 900; text-transform: uppercase; letter-spacing: 0.05em; }
.palstudio-category-operation-panel dd { margin: 0.2rem 0 0; color: #0f172a; font-weight: 750; }
.palstudio-student-edit-card input,
.palstudio-student-edit-card select,
.palstudio-student-edit-card button,
.palstudio-student-edit-footer button,
.palstudio-password-reset-row .palstudio-secondary-button,
.palstudio-student-danger-actions button {
    min-height: 30px;
    height: 30px;
    padding: 5px 10px;
    box-sizing: border-box;
    font-size: 0.82rem;
    line-height: 1.2;
}
.palstudio-student-edit-card input,
.palstudio-student-edit-card select {
    border-radius: 8px;
}
.palstudio-student-edit-card .palstudio-student-field-full { grid-column: 1 / -1; }
.palstudio-student-edit-card > .palstudio-form-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: nowrap; align-items: center; }
.palstudio-student-edit-card > .palstudio-form-actions button { white-space: nowrap; }

.palstudio-student-inline-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
}
.palstudio-student-more-options { border: 1px solid #e2e8f0; border-radius: 12px; padding: 0.75rem; background: #f8fafc; }
.palstudio-student-more-options summary { cursor: pointer; font-weight: 800; color: #1f2937; }
.palstudio-student-more-options .palstudio-grid-form { margin-top: 0.75rem; }
@media (max-width: 640px) { .palstudio-student-avatar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .palstudio-student-avatar-card { min-height: 126px; } .palstudio-student-avatar { width: 60px; height: 60px; } }

.palstudio-password-reset-row { grid-column: 1 / -1; }
.palstudio-password-reset-row span { display: flex; align-items: center; gap: 0.75rem; width: 100%; max-width: 760px; }
.palstudio-password-reset-row input { flex: 1 1 auto; min-width: 18rem; max-width: none; }
.palstudio-password-reset-row .palstudio-secondary-button { flex: 0 0 auto; margin-left: auto; white-space: nowrap; background: #ffffff; color: #1f2937; border: 1px solid #cbd5e1; line-height: 1.2; }
.palstudio-student-edit-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.palstudio-student-danger-actions { display: flex; justify-content: flex-end; gap: 0.75rem; margin: 0; margin-left: auto; }
.palstudio-form .palstudio-warning-button,
.palstudio-warning-button { padding: 10px 16px; border: 1px solid #f59e0b; border-radius: 8px; background: #facc15; color: #713f12; font: inherit; font-weight: 700; cursor: pointer; }
.palstudio-form .palstudio-danger-button,
.palstudio-danger-button { padding: 10px 16px; border: 1px solid #dc2626; border-radius: 8px; background: #dc2626; color: #ffffff; font: inherit; font-weight: 700; cursor: pointer; }
.palstudio-student-edit-footer .palstudio-warning-button,
.palstudio-student-edit-footer .palstudio-danger-button,
.palstudio-student-edit-footer .palstudio-form-actions button,
.palstudio-password-reset-row .palstudio-secondary-button {
    height: 30px;
    min-height: 30px;
    padding: 5px 10px;
    font-size: 0.82rem;
    line-height: 1.2;
}
@media (max-width: 640px) { .palstudio-password-reset-row span { max-width: none; } .palstudio-password-reset-row input { min-width: 0; } .palstudio-student-edit-footer { align-items: stretch; } .palstudio-student-danger-actions { justify-content: flex-start; flex-wrap: wrap; margin-left: 0; } }

.palstudio-student-edit-card[hidden] { display: none !important; }

/* Practice Planner Shell */
.palstudio-planner-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: visible;
    min-height: 600px;
}

.palstudio-planner-sidebar {
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
}

.palstudio-planner-sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.palstudio-planner-sidebar-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.palstudio-planner-sidebar-title-row h3 {
    margin: 0;
}

.palstudio-planner-sidebar-tools {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.palstudio-planner-sidebar-search-toggle,
.palstudio-planner-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font: inherit;
    line-height: 1;
    cursor: pointer;
}

.palstudio-planner-sidebar-search-toggle {
    font-size: 0.95rem;
}

.palstudio-planner-sidebar-toggle {
    font-size: 1.2rem;
}

.palstudio-planner-sidebar-search-toggle:hover,
.palstudio-planner-sidebar-search-toggle:focus-visible,
.palstudio-planner-sidebar-search-toggle.is-active,
.palstudio-planner-sidebar-toggle:hover,
.palstudio-planner-sidebar-toggle:focus-visible {
    background: #f1f5f9;
}

.palstudio-planner-shell.is-sidebar-collapsed {
    grid-template-columns: 56px minmax(0, 1fr);
}

.palstudio-planner-shell.is-flat-default-mode {
    grid-template-columns: minmax(0, 1fr);
}

.palstudio-planner-shell.is-flat-default-mode .palstudio-planner-sidebar {
    display: none;
}

.palstudio-planner-shell.is-flat-default-mode .palstudio-planner-detail-panel {
    background: #fff;
}


.palstudio-planner-shell.is-sidebar-collapsed .palstudio-planner-sidebar-header {
    padding: 10px 8px;
}

.palstudio-planner-shell.is-sidebar-collapsed .palstudio-planner-sidebar-title-row {
    justify-content: center;
}

.palstudio-planner-shell.is-sidebar-collapsed .palstudio-planner-sidebar-title-row h3,
.palstudio-planner-shell.is-sidebar-collapsed .palstudio-planner-sidebar-search-toggle,
.palstudio-planner-shell.is-sidebar-collapsed .palstudio-planner-sidebar-search,
.palstudio-planner-shell.is-sidebar-collapsed .palstudio-planner-category-list {
    display: none;
}

.palstudio-planner-shell.is-sidebar-collapsed .palstudio-planner-sidebar-toggle {
    transform: rotate(180deg);
}

.palstudio-planner-sidebar-search {
    width: 100%;
    margin-top: 10px;
}

.palstudio-planner-sidebar-search,
.palstudio-practice-search-input {
    box-sizing: border-box;
    padding: 5px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font: inherit;
    font-size: 0.82rem;
}

.palstudio-planner-category-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.palstudio-planner-category-group {
    display: grid;
    gap: 2px;
    margin-bottom: 6px;
}

.palstudio-planner-category-item, .palstudio-planner-section-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #475569;
    transition: background 0.16s ease;
    margin-bottom: 2px;
}

.palstudio-planner-edit-icon {
    background: transparent;
    border: 0;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.16s ease, background 0.16s ease;
}

.palstudio-planner-edit-icon:hover {
    color: #475569;
    background: #e2e8f0;
}

.palstudio-planner-section-item.palstudio-planner-add-item {
    justify-content: flex-start;
    text-align: left;
    font-style: italic;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    margin-top: 4px;
}

.palstudio-planner-section-item.palstudio-planner-add-item:hover {
    background: #f8fafc;
    color: #1e293b;
}

.palstudio-danger-button {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.palstudio-danger-button:hover,
.palstudio-danger-button:focus {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}

.palstudio-planner-form-actions .palstudio-danger-button {
    margin-left: auto;
}


.palstudio-planner-batch-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.palstudio-planner-batch-toolbar .palstudio-secondary-button,
.palstudio-table-actions .palstudio-planner-edit-practice-button {
    padding: 5px 10px;
    font-size: 0.82rem;
}

.palstudio-planner-batch-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 1 1 auto;
    flex-wrap: wrap;
    margin-left: auto;
    text-align: right;
}

.palstudio-table-actions .palstudio-planner-edit-practice-button {
    margin-right: 0;
    white-space: nowrap;
}

.palstudio-planner-select-all,
.palstudio-planner-batch-toolbar .palstudio-muted {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.palstudio-planner-batch-toolbar .palstudio-practice-search-label {
    flex: 0 1 160px;
}

@media (max-width: 720px) {
    .palstudio-planner-batch-toolbar {
        flex-wrap: wrap;
    }

    .palstudio-planner-batch-toolbar .palstudio-practice-search-label {
        flex: 1 1 120px;
    }

    .palstudio-practice-search-input {
        width: 100%;
    }
}

.palstudio-planner-select-heading,
.palstudio-planner-select-cell,
.palstudio-planner-drag-heading,
.palstudio-planner-drag-cell {
    width: 4rem;
    text-align: center;
    vertical-align: middle;
}

.palstudio-planner-select-cell input[type="checkbox"] {
    display: block;
    margin: 0 auto;
}

.palstudio-planner-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    cursor: grab;
    touch-action: none;
    user-select: none;
    font-size: 0.9rem;
    line-height: 1;
}

.palstudio-planner-drag-handle:hover,
.palstudio-planner-drag-handle:focus {
    border-color: #38bdf8;
    color: #0369a1;
}

.palstudio-planner-drag-handle:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

.palstudio-planner-practices-table tr.is-dragging {
    opacity: 0.55;
}

.palstudio-planner-practices-table tr.is-drag-over {
    outline: 2px dashed #38bdf8;
    outline-offset: -2px;
}

.palstudio-planner-practices-table tbody.is-saving-order {
    opacity: 0.65;
    pointer-events: none;
}

.palstudio-planner-category-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.palstudio-planner-category-caret {
    display: inline-flex;
    width: 0.85rem;
    color: #64748b;
    transition: transform 0.16s ease;
}

.palstudio-planner-category-caret.is-empty {
    visibility: hidden;
}

.palstudio-planner-category-group.is-expanded .palstudio-planner-category-caret {
    transform: rotate(90deg);
}


.palstudio-planner-category-group.is-collapsed .palstudio-planner-section-list {
    display: none !important;
}

.palstudio-planner-section-list {
    display: grid;
    gap: 2px;
    margin: 0 0 4px 14px;
    padding-left: 10px;
    border-left: 2px solid #e2e8f0;
}

.palstudio-planner-section-item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    text-align: left;
}

.palstudio-planner-section-label {
    flex: 1;
    min-width: 0;
}

.palstudio-planner-section-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    color: #94a3b8;
    cursor: grab;
    touch-action: none;
    user-select: none;
    line-height: 1;
}

.palstudio-planner-section-drag-handle:hover,
.palstudio-planner-section-drag-handle:focus {
    color: #0369a1;
    background: #e0f2fe;
}

.palstudio-planner-section-list.is-saving-order {
    opacity: 0.65;
    pointer-events: none;
}

.palstudio-planner-section-item.is-dragging {
    opacity: 0.55;
}

.palstudio-planner-section-item:hover,
.palstudio-planner-section-item.is-active {
    background: #e0f2fe;
    color: #0f172a;
}

.palstudio-planner-no-sections {
    color: #94a3b8;
    font-size: 0.8rem;
    padding: 4px 10px 8px;
}

.palstudio-planner-category-count {
    font-size: 0.75rem;
    background: #cbd5e1;
    color: #475569;
    padding: 2px 6px;
    border-radius: 999px;
}

.palstudio-planner-main {
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.palstudio-planner-main-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.palstudio-planner-current-category-heading {
    min-width: 0;
}

.palstudio-planner-current-category-title {
    margin: 0;
}

.palstudio-planner-current-category-description {
    margin: 0.25rem 0 0;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.35;
}

.palstudio-planner-content {
    flex: 1;
    overflow: visible;
    padding: 16px;
    display: grid;
    gap: 16px;
    align-content: start;
}

.palstudio-planner-detail-panel {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
    padding: 16px;
}

.palstudio-planner-detail-panel:has(.palstudio-planner-assignment-panel),
.palstudio-planner-detail-panel:has(.palstudio-planner-progress-panel) {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.palstudio-planner-practice-list {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.palstudio-planner-practice-list[hidden] {
    display: none !important;
}

.palstudio-planner-section {
    margin-bottom: 24px;
}

.palstudio-planner-section-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.palstudio-planner-practice-row {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.16s ease;
}

.palstudio-planner-practice-row:hover {
    background: #f8fafc;
}

.palstudio-planner-practice-row.is-active {
    background: #eff6ff;
    border-left: 4px solid #2563eb;
}

.palstudio-planner-practice-info {
    display: flex;
    flex-direction: column;
}

.palstudio-planner-practice-title {
    font-weight: 600;
    color: #1e293b;
}

.palstudio-planner-practice-meta {
    font-size: 0.8rem;
    color: #64748b;
}

.palstudio-planner-main-actions-inline,
.palstudio-planner-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.palstudio-planner-form {
    display: grid;
    gap: 12px;
    max-width: 100%;
    min-width: 0;
}

.palstudio-planner-form *,
.palstudio-planner-form *::before,
.palstudio-planner-form *::after {
    box-sizing: border-box;
}

.palstudio-planner-form h4,
.palstudio-planner-main-details h4 {
    margin: 0 0 8px;
}

.palstudio-planner-form label {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: #334155;
    font-weight: 700;
}

.palstudio-planner-form input,
.palstudio-planner-form select,
.palstudio-planner-form textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 10px;
    font: inherit;
    font-weight: 400;
}

.palstudio-planner-title-order-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: end;
    gap: 10px;
}

.palstudio-planner-title-order-row .palstudio-planner-sort-order-field {
    justify-self: end;
    width: max-content;
}

.palstudio-planner-title-order-row .palstudio-planner-sort-order-field input {
    width: 5.5rem;
}

@media (max-width: 520px) {
    .palstudio-planner-title-order-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .palstudio-planner-title-order-row .palstudio-planner-sort-order-field input {
        width: 4.75rem;
    }
}

.palstudio-planner-form-status {
    min-height: 1.2em;
    margin: 0;
    color: #2563eb;
    font-weight: 700;
}

.palstudio-planner-form-status.is-error,
.palstudio-planner-error {
    color: #b91c1c;
}

.palstudio-planner-management-list {
    display: grid;
    gap: 8px;
}

.palstudio-planner-management-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
}

.palstudio-planner-management-row span {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 0.82rem;
}


.palstudio-planner-practices-table {
    min-width: 0;
}

.palstudio-planner-practices-table th,
.palstudio-planner-practices-table td {
    padding: 8px 6px;
    vertical-align: middle;
}

.palstudio-planner-practices-table tbody tr {
    cursor: pointer;
}

.palstudio-planner-practices-table tbody tr.is-active {
    background: #eff6ff;
}

.palstudio-planner-practices-table th:nth-child(4),
.palstudio-planner-practices-table th:nth-child(5),
.palstudio-planner-practices-table th:nth-child(6),
.palstudio-planner-practices-table th:nth-child(7),
.palstudio-planner-practices-table td:nth-child(4),
.palstudio-planner-practices-table td:nth-child(5),
.palstudio-planner-practices-table td:nth-child(6),
.palstudio-planner-practices-table td:nth-child(7) {
    text-align: center;
    vertical-align: middle;
}

.palstudio-planner-practices-table .palstudio-icon-button,
.palstudio-planner-practices-table .palstudio-icon-button.palstudio-sheet-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.8rem;
    height: 3.8rem;
    padding: 0.35rem;
}

.palstudio-planner-practices-table .palstudio-icon-button img,
.palstudio-planner-practices-table .palstudio-icon-button.palstudio-sheet-preview img {
    width: 2.55rem;
    height: 2.55rem;
}

.palstudio-planner-practices-table .palstudio-practice-aids {
    justify-content: center;
    align-items: center;
}

.palstudio-planner-empty-list {
    padding: 16px;
}

.palstudio-planner-pagination {
    display: block;
    padding: 16px;
    border-top: 1px solid #e5e7eb;
}

.palstudio-planner-pagination[hidden] {
    display: none;
}

.palstudio-pagination-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    font-size: 0.82rem;
}

.palstudio-pagination-controls .palstudio-secondary-button {
    padding: 5px 10px;
    font-size: 0.82rem;
}

.palstudio-pagination-controls > [data-palstudio-planner-prev] {
    grid-column: 2;
}

.palstudio-pagination-controls > label[for="palstudio-planner-per-page"] {
    grid-column: 6;
    color: #64748b;
}

.palstudio-pagination-controls > input[data-palstudio-per-page] {
    width: 56px;
    padding: 5px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font: inherit;
    font-size: 0.82rem;
    text-align: center;
}

.palstudio-pagination-controls > input[data-palstudio-per-page] + span {
    color: #64748b;
}

@media (max-width: 1100px) {
    .palstudio-planner-shell {
        grid-template-columns: 240px minmax(0, 1fr);
    }

    .palstudio-planner-shell.is-sidebar-collapsed {
        grid-template-columns: 56px minmax(0, 1fr);
    }

}

@media (max-width: 900px) {
    .palstudio-planner-shell {
        grid-template-columns: 220px minmax(0, 1fr);
        height: auto;
    }

    .palstudio-planner-shell.is-sidebar-collapsed {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .palstudio-planner-sidebar {
        border-right: 1px solid #e5e7eb;
        border-bottom: 0;
    }
}

@media (max-width: 640px) {
    .palstudio-planner-shell {
        grid-template-columns: 1fr;
    }

    .palstudio-planner-sidebar {
        border-right: 0;
        border-bottom: 1px solid #e5e7eb;
    }
}

.palstudio-planner-practices-button,
.palstudio-planner-assign-button,
.palstudio-planner-progress-button,
.palstudio-planner-assignment-panel .palstudio-secondary-button {
    padding: 5px 10px;
    font-size: 0.82rem;
    white-space: nowrap;
}

.palstudio-planner-practices-button.is-active,
.palstudio-planner-assign-button.is-active,
.palstudio-planner-progress-button.is-active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(29, 78, 216, 0.18);
}

.palstudio-planner-assignment-panel {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
}

.palstudio-planner-assignment-header,
.palstudio-assignment-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.palstudio-planner-assignment-header h3 {
    margin: 0;
}

.palstudio-category-mode-help,
.palstudio-assignment-mode-context {
    margin: 4px 0 0;
    font-size: 0.82rem;
    line-height: 1.35;
}

.palstudio-category-rules {
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 10px;
    padding: 8px 10px;
    background: rgba(248, 250, 252, 0.72);
}

.palstudio-category-rules summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
}

.palstudio-category-rules label {
    margin-top: 8px;
}

.palstudio-category-rules select[multiple] {
    min-height: 72px;
}

.palstudio-category-rules-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.palstudio-category-rules-grid label {
    margin: 0;
}

.palstudio-category-rules-grid label[hidden],
.palstudio-category-rules-grid [hidden] {
    display: none !important;
}

.palstudio-category-rules-grid .palstudio-category-rule-row-start {
    padding-top: 8px;
}

.palstudio-category-rules-grid .palstudio-category-rule-row-help {
    grid-column: 1 / -1;
    margin: 2px 0 4px;
}

.palstudio-category-rules-grid input,
.palstudio-category-rules-grid select {
    width: 100%;
}

@media (max-width: 700px) {
    .palstudio-category-rules-grid {
        grid-template-columns: 1fr;
    }
}

.palstudio-category-rule-help {
    margin: 4px 0 0;
    font-size: 0.8rem;
    line-height: 1.35;
}

.palstudio-assignment-header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.palstudio-assignment-controls {
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.palstudio-assignment-limit-group,
.palstudio-assignment-action-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.palstudio-assignment-limit-group {
    justify-content: flex-start;
}

.palstudio-assignment-action-group {
    justify-content: flex-end;
    margin-left: auto;
}

.palstudio-assignment-controls label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    font-weight: 600;
    color: #475569;
}

.palstudio-assignment-controls input[type="number"] {
    width: 4.5rem;
    padding: 5px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
}

.palstudio-assignment-list {
    display: grid;
    gap: 6px;
}

.palstudio-assignment-list.is-avatar-view {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.palstudio-assignment-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
}

.palstudio-assignment-avatar-card {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    min-height: 132px;
    text-align: center;
}

.palstudio-assignment-avatar-card .palstudio-assignment-student {
    justify-items: center;
    text-align: center;
}

.palstudio-assignment-avatar-stack {
    display: grid;
    justify-items: center;
    gap: 4px;
    min-width: 0;
}

.palstudio-assignment-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin: 0 auto 4px;
}

.palstudio-assignment-avatar-card input[type="checkbox"] {
    align-self: start;
    margin-top: 2px;
}

.palstudio-assignment-student {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.palstudio-assignment-student small {
    color: #64748b;
    overflow-wrap: anywhere;
}

.palstudio-assignment-inline-status {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
}

.palstudio-assignment-inline-status.is-assigned {
    color: #166534;
}

.palstudio-assignment-inline-status.is-inherited {
    color: #1d4ed8;
}

.palstudio-assignment-status {
    padding: 3px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.78rem;
    white-space: nowrap;
}

.palstudio-assignment-status.is-assigned {
    background: #dcfce7;
    color: #166534;
}

.palstudio-assignment-status.is-inherited {
    background: #dbeafe;
    color: #1d4ed8;
}

.palstudio-progress-table-wrap {
    overflow-x: auto;
}

.palstudio-progress-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
    font-size: 0.84rem;
}

.palstudio-progress-table th,
.palstudio-progress-table td {
    border-bottom: 1px solid #e2e8f0;
    padding: 7px 8px;
    text-align: left;
    vertical-align: top;
}

.palstudio-progress-table th {
    color: #475569;
    font-size: 0.76rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.palstudio-progress-chip {
    display: inline-block;
    max-width: 9rem;
    margin: 0 4px 4px 0;
    padding: 2px 6px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 0.74rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.palstudio-progress-empty {
    color: #94a3b8;
}

@media (max-width: 760px) {
    .palstudio-progress-table {
        min-width: 680px;
    }
}

.palstudio-progress-controls {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
    margin: 10px 0 12px;
}

.palstudio-progress-controls-main {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    flex-wrap: wrap;
    min-width: 0;
}

.palstudio-progress-search-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    font-size: 0.82rem;
    box-sizing: border-box;
}

.palstudio-progress-search-label input {
    border: 0;
    min-width: 150px;
    height: 30px;
    outline: 0;
    font-size: 0.82rem;
}

.palstudio-progress-filter-group {
    display: inline-flex;
    flex-wrap: nowrap;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    overflow: hidden;
    background: #fff;
}

.palstudio-progress-filter-group button {
    min-height: 32px;
    padding: 0 12px;
    border: 0;
    border-right: 1px solid #cbd5e1;
    background: #fff;
    color: #1e293b;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    box-sizing: border-box;
    cursor: pointer;
}

.palstudio-progress-filter-group button:last-child {
    border-right: 0;
}

.palstudio-progress-filter-group button.is-active {
    background: #1d4ed8;
    color: #fff;
}

.palstudio-progress-view-toggle {
    min-height: 32px;
    padding: 0 12px;
    font-size: 0.82rem;
    line-height: 1;
    box-sizing: border-box;
    white-space: nowrap;
}

.palstudio-progress-view-toggle {
    flex: 0 0 auto;
    margin-left: auto;
}

.palstudio-progress-list {
    display: grid;
    gap: 10px;
}

.palstudio-progress-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    padding: 12px;
}

.palstudio-progress-card-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.palstudio-progress-card h4,
.palstudio-progress-card h5 {
    margin: 0 0 6px;
}

.palstudio-progress-card-meta {
    color: #64748b;
    font-size: 0.78rem;
    margin: 4px 0 10px;
}

.palstudio-progress-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.palstudio-progress-chip-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0 4px 4px 0;
    flex-wrap: wrap;
}

.palstudio-progress-chip-actions {
    display: inline-flex;
    gap: 4px;
}

.palstudio-progress-chip-actions .palstudio-secondary-button {
    padding: 2px 6px;
    font-size: 0.72rem;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .palstudio-progress-controls {
        align-items: stretch;
        flex-direction: column;
    }
    .palstudio-progress-detail-grid {
        grid-template-columns: 1fr;
    }
}

.palstudio-assignment-mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0;
    margin: 0;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 999px;
    overflow: hidden;
    width: fit-content;
}

.palstudio-assignment-mode-toggle .palstudio-secondary-button {
    border: 0;
    border-radius: 0;
    margin: 0;
    min-height: 32px;
}

.palstudio-assignment-mode-toggle .palstudio-secondary-button.is-active {
    background: #2563eb;
    color: #fff;
}

.palstudio-assignment-header-actions .palstudio-assignment-mode-toggle {
    margin-left: auto;
}

@media (max-width: 640px) {
    .palstudio-assignment-header-actions .palstudio-assignment-mode-toggle {
        margin-left: 0;
    }
}

.palstudio-simple-assignment-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(240px, 0.85fr);
    gap: 14px;
    align-items: start;
}

.palstudio-simple-assignment-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.palstudio-simple-assignment-section-header .palstudio-muted {
    font-size: 0.82rem;
}

.palstudio-simple-practice-list {
    display: grid;
    gap: 6px;
    max-height: 420px;
    overflow: auto;
    padding: 8px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.8);
}

.palstudio-simple-practice-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.palstudio-simple-practice-option.is-disabled {
    opacity: 0.6;
}

.palstudio-simple-assignment-help {
    margin: 0 0 8px;
    font-size: 0.82rem;
    line-height: 1.35;
}

.palstudio-assignment-status.is-partial,
.palstudio-assignment-inline-status.is-partial {
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
}

.palstudio-simple-assignment-actions {
    justify-content: flex-end;
    margin-top: 12px;
}

@media (max-width: 820px) {
    .palstudio-simple-assignment-grid {
        grid-template-columns: 1fr;
    }
}

.palstudio-director-today-card {
    margin-bottom: 16px;
}

.palstudio-director-today-card .palstudio-card-header,
.palstudio-student-progress-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.palstudio-director-today-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.palstudio-director-stat {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
    min-height: 0;
    padding: 12px 14px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.palstudio-director-stat:hover,
.palstudio-director-stat:focus-visible {
    border-color: #93c5fd;
    background: #eff6ff;
    outline: none;
    transform: translateY(-1px);
}

.palstudio-director-stat strong {
    display: inline-block;
    flex: 0 0 auto;
    font-size: 1.45rem;
    line-height: 1;
    color: #0f172a;
}

.palstudio-director-stat span {
    display: inline;
    min-width: 0;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.palstudio-compact-list small,
.palstudio-director-action-row small,
.palstudio-director-progress-chip span {
    display: block;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.35;
}

.palstudio-director-today-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.palstudio-student-progress-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.palstudio-director-today-section {
    min-width: 0;
    min-height: 260px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.palstudio-director-today-section-wide {
    grid-column: 1 / -1;
    min-height: 0;
}

.palstudio-director-today-section h3,
.palstudio-student-progress-block h4,
.palstudio-student-progress-summary h3 {
    margin-top: 0;
}

.palstudio-director-action-list,
.palstudio-director-chip-list {
    display: grid;
    gap: 10px;
}

.palstudio-director-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 10px 0;
    border-top: 1px solid #e5e7eb;
}

.palstudio-director-action-row:first-child {
    border-top: 0;
}

.palstudio-director-action-row > div {
    min-width: 0;
}

.palstudio-director-action-row strong,
.palstudio-director-action-row small {
    overflow-wrap: anywhere;
}

.palstudio-director-action-row .palstudio-secondary-button {
    justify-self: end;
    min-height: 30px;
    height: 30px;
    padding: 5px 10px;
    box-sizing: border-box;
    font-size: 0.82rem;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

.palstudio-director-today-section-wide .palstudio-director-chip-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.palstudio-director-progress-chip {
    display: grid;
    gap: 3px;
    min-width: 0;
    min-height: 58px;
    text-align: left;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    padding: 10px 12px;
    cursor: pointer;
}

.palstudio-director-progress-chip:hover,
.palstudio-director-progress-chip:focus-visible {
    border-color: #93c5fd;
    background: #eff6ff;
    outline: none;
}

.palstudio-director-progress-chip strong,
.palstudio-director-progress-chip span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.palstudio-student-progress-summary {
    margin: 12px 0 18px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.palstudio-student-progress-summary-header {
    margin-bottom: 12px;
}

.palstudio-student-progress-summary .palstudio-student-progress-block {
    grid-column: auto;
    min-width: 0;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.palstudio-student-progress-block h4 {
    margin-bottom: 12px;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 850;
}

.palstudio-compact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.palstudio-compact-list li {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 10px;
    border: 1px solid #eef2f7;
    border-radius: 10px;
    background: #f8fafc;
}

.palstudio-compact-list li:first-child {
    border-top: 1px solid #eef2f7;
}

.palstudio-compact-list strong,
.palstudio-compact-list small {
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .palstudio-director-today-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .palstudio-director-today-grid,
    .palstudio-director-today-section-wide .palstudio-director-chip-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .palstudio-student-progress-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .palstudio-director-action-row,
    .palstudio-director-today-card .palstudio-card-header,
    .palstudio-student-progress-summary-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .palstudio-director-action-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .palstudio-director-action-row .palstudio-secondary-button {
        justify-self: stretch;
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 520px) {
    .palstudio-director-today-stats {
        grid-template-columns: 1fr;
    }

    .palstudio-director-stat {
        min-height: 0;
    }
}

.palstudio-review-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.palstudio-review-status.is-unreviewed {
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #9a3412;
}

.palstudio-review-status.is-reviewed {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.palstudio-submission-review-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}

.palstudio-submission-review-actions form {
    margin: 0;
}

/* Student prototype component alignment */
.palstudio-student-app-header,
.palstudio-student-app-actions,
.palstudio-student-brand,
.palstudio-student-prototype-tabs,
.palstudio-student-tab-list,
.palstudio-prototype-section-header,
.palstudio-section-header,
.palstudio-student-mini-card,
.palstudio-student-week-strip {
    display: flex;
    align-items: center;
}
.palstudio-student-app-header {
    justify-content: space-between;
    gap: 16px;
    color: #15233b;
}
.palstudio-student-brand { gap: 13px; font-size: 1.08rem; }
.palstudio-student-brand-mark,
.palstudio-animal-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #d7e8f5;
    color: #183153;
    flex: 0 0 auto;
}
.palstudio-student-brand .bubble-mark,
.palstudio-app .bubble-mark.palstudio-student-brand-mark {
    display: inline-block;
    width: 43px;
    height: 43px;
    border: 2px solid rgba(67, 156, 220, 0.52);
    border-radius: 50%;
    background:
        radial-gradient(circle at 34% 27%, #fff 0 8%, transparent 10%),
        radial-gradient(circle at 66% 70%, rgba(61, 154, 219, 0.25), transparent 43%),
        linear-gradient(145deg, #edfaff, #a8dbf6);
    box-shadow: inset 4px 4px 10px rgba(255, 255, 255, 0.86), 0 4px 10px rgba(37, 108, 169, 0.11);
}
.palstudio-student-brand-mark { width: 43px; height: 43px; }
.palstudio-animal-avatar { width: 64px; height: 64px; font-size: 2rem; overflow: hidden; }
.palstudio-student-app-actions { gap: 14px; font-size: 0.92rem; }
.palstudio-student-app-actions strong,
.palstudio-student-app-actions a,
.palstudio-student-app-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    min-height: 2.4rem;
    padding: 0.42rem 0.7rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #15233b;
    font: inherit;
    font-weight: 850;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}
.palstudio-student-app-actions strong {
    cursor: default;
}
.palstudio-student-app-actions a:hover,
.palstudio-student-app-actions a:focus-visible,
.palstudio-student-app-actions button:hover,
.palstudio-student-app-actions button:focus-visible {
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 8px 20px rgba(31, 45, 75, 0.08);
    outline: none;
}
.palstudio-student-prototype-tabs,
.palstudio-student-tab-list {
    align-items: flex-end;
    border-bottom: 1px solid rgba(82, 111, 145, 0.25);
    gap: 6px;
}
.palstudio-student-prototype-tab,
.palstudio-student-section-tab {
    appearance: none;
    align-items: center;
    border: 1px solid rgba(82, 111, 145, 0.25);
    border-bottom-color: transparent;
    background: rgba(255,255,255,0.82);
    box-sizing: border-box;
    color: #15233b;
    display: inline-flex;
    font-family: inherit;
    font-size: inherit;
    font-weight: 800;
    justify-content: center;
    line-height: normal;
    border-radius: 14px 14px 0 0;
    padding: 10px 18px;
    cursor: grab;
    margin-bottom: -1px;
    text-decoration: none;
}
.palstudio-student-prototype-tab:active,
.palstudio-student-section-tab:active,
.palstudio-student-prototype-tab.is-dragging,
.palstudio-student-section-tab.is-dragging {
    cursor: grabbing;
}
.palstudio-student-prototype-tab.is-dragging,
.palstudio-student-section-tab.is-dragging {
    opacity: .55;
}
.palstudio-student-prototype-tab.is-active,
.palstudio-student-section-tab.is-active,
.palstudio-student-prototype-tab[aria-selected="true"],
.palstudio-student-section-tab[aria-selected="true"] {
    background: #5865f2;
    color: #fff;
    border-color: #5865f2;
    border-bottom-color: #5865f2;
}
.palstudio-student-mini-card,
.palstudio-student-practice-board,
.palstudio-student-prototype-section.palstudio-card,
.palstudio-student-section.palstudio-card {
    background: rgba(255,255,255,0.88);
    border: 1px solid rgba(82, 111, 145, 0.16);
    border-radius: 24px;
    box-shadow: 0 18px 44px rgba(30, 58, 93, 0.10), 0 3px 10px rgba(30, 58, 93, 0.05);
}
.palstudio-student-hero-stat,
.palstudio-prototype-settings-grid label,
.palstudio-settings-grid label,
.palstudio-student-beta-card div {
    background: #f7fbfe;
    border: 1px solid rgba(82, 111, 145, 0.14);
    border-radius: 18px;
    padding: 13px;
}
.palstudio-prototype-settings-grid span,
.palstudio-settings-grid span,
.palstudio-student-mini-card span { display:block; color:#637083; font-weight:800; font-size:.84rem; }
.palstudio-prototype-settings-grid strong,
.palstudio-settings-grid strong { color:#15233b; font-weight:900; }
.palstudio-student-week-strip { gap: 8px; flex-wrap: wrap; }
.palstudio-student-week-strip b { background:#eef5fa; border-radius:999px; padding:6px 9px; color:#15233b; font-size:.82rem; }
.palstudio-student-week-strip b.is-today { background:#dbeafe; }
.palstudio-student-week-strip em { font-style:normal; color:#637083; }
.palstudio-student-prototype-section,
.palstudio-student-section { display:grid; gap:12px; }
.palstudio-student-prototype-section h2,
.palstudio-student-section h2 { margin:0; color:#15233b; font-size:1.4rem; }
.palstudio-student-practice-board { padding: 16px; background:#d9e9f5; }
.palstudio-student-practice-board[hidden] { display:none!important; }
.palstudio-student-mini-card { padding:14px 16px; gap:12px; }
.palstudio-prototype-section-header,
.palstudio-section-header { justify-content:space-between; gap:10px; }
.palstudio-prototype-recordings-list,
.palstudio-recordings-list { display:grid; gap:0; }
.palstudio-student-settings-panel { padding:22px; }
.palstudio-prototype-settings-grid,
.palstudio-settings-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.palstudio-prototype-settings-grid label,
.palstudio-settings-grid label { display:grid; gap:7px; }
.palstudio-prototype-settings-grid input,
.palstudio-prototype-settings-grid select,
.palstudio-settings-grid input,
.palstudio-settings-grid select { width:100%; border:1px solid rgba(82,111,145,.22); border-radius:12px; padding:10px 12px; color:#637083; font-weight:800; background:#f8fbfd; }
.palstudio-prototype-settings-grid input[readonly],
.palstudio-settings-grid input[readonly] { cursor:not-allowed; }
.palstudio-prototype-settings-grid small,
.palstudio-settings-grid small { color:#637083; font-weight:800; }
.palstudio-student-beta-card div { display:grid; gap:4px; }
.palstudio-student-beta-card span { color:#637083; font-weight:800; }
.palstudio-help-prototype-shell,
.palstudio-help-shell { gap: 0; }
.palstudio-help-prototype-shell .palstudio-student-prototype-tabs,
.palstudio-help-shell .palstudio-student-tab-list {
    border-bottom: 1px solid rgba(82, 111, 145, 0.25);
}
.palstudio-help-content {
    padding: 20px;
    min-height: 520px;
}
.palstudio-help-page-head {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 48px;
}
.palstudio-help-page-head h1 {
    color: #173662;
    font-size: 2rem;
    line-height: 1.15;
    margin: 8px 0 0;
}
.palstudio-help-back-button {
    align-items: center;
    background: transparent;
    border: 1px solid #d3e1ef;
    border-radius: 12px;
    color: #17243a;
    display: inline-flex;
    font-weight: 800;
    min-height: 46px;
    padding: 10px 15px;
    text-decoration: none;
}
.palstudio-help-support-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1.2fr) minmax(256px, 0.8fr);
}
.palstudio-help-faq-section {
    margin-top: 24px;
}
.palstudio-help-section-head {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 12px;
}
.palstudio-help-section-head h2,
.palstudio-help-submit-card h2,
.palstudio-help-submit-card p {
    margin: 0;
}
.palstudio-help-section-head h2,
.palstudio-help-submit-card h2 {
    color: #173662;
}
.palstudio-help-faq-list {
    display: grid;
    gap: 10px;
}
.palstudio-help-faq-list details {
    background: #fff;
    border: 1px solid #a7c6ee;
    border-radius: 14px;
    color: #173662;
    padding: 14px 12px;
}
.palstudio-help-faq-list summary {
    cursor: pointer;
    font-weight: 900;
}
.palstudio-help-faq-list p {
    color: #687385;
    font-weight: 700;
    margin: 10px 0 0;
}
.palstudio-help-submit-card {
    background: #fff;
    border: 1px solid #a7c6ee;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(54, 118, 207, 0.12);
    display: grid;
    gap: 18px;
    padding: 32px 16px;
}
.palstudio-help-eyebrow,
.palstudio-help-secondary {
    color: #687385;
    font-weight: 800;
}
.palstudio-help-primary-button {
    align-items: center;
    background: #18396a;
    border: 1px solid #18396a;
    border-radius: 12px;
    color: #fff;
    display: inline-flex;
    font-weight: 900;
    justify-content: center;
    justify-self: start;
    padding: 12px 16px;
    text-decoration: none;
}
.palstudio-help-email {
    font-size: .88rem;
}
@media (max-width: 760px) {
    .palstudio-student-app-header,
    .palstudio-student-app-actions,
    .palstudio-student-prototype-tabs { flex-wrap:wrap; }
    .palstudio-help-support-grid { grid-template-columns: 1fr; }
    .palstudio-prototype-settings-grid,
    .palstudio-settings-grid { grid-template-columns:1fr; }
}

/* Prototype scoped button/input corrections after live browser review */
.palstudio-student-unified-shell .palstudio-primary-button,
.palstudio-student-unified-shell button.palstudio-primary-button {
    appearance: none;
    border: 1px solid #17243a;
    background: #17243a;
    color: #fff;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 900;
    font-size: 0.98rem;
    line-height: 1.1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(23, 36, 58, 0.14);
}
.palstudio-student-unified-shell .palstudio-secondary-button,
.palstudio-student-unified-shell button.palstudio-secondary-button,
.palstudio-student-unified-shell a.palstudio-secondary-button {
    appearance: none;
    border: 1px solid rgba(82, 111, 145, 0.28);
    background: #fff;
    color: #17243a;
    border-radius: 14px;
    padding: 10px 16px;
    font-weight: 900;
    font-size: 0.95rem;
    line-height: 1.1;
    text-decoration: none;
    cursor: pointer;
}
.palstudio-student-unified-shell .palstudio-student-start-practice-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
    margin-top: 8px;
    min-width: 150px;
}
.palstudio-student-unified-shell .palstudio-student-start-practice-button[hidden] {
    display: none !important;
}
.palstudio-student-unified-shell .palstudio-recordings-submit-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin: 8px 0 16px;
}
.palstudio-student-unified-shell .palstudio-submit-words-input {
    border: 1px solid rgba(82,111,145,.24);
    border-radius: 999px;
    padding: 13px 16px;
    font-weight: 700;
    color: #637083;
    background: #fff;
}
.palstudio-student-unified-shell .palstudio-student-settings-panel > .palstudio-primary-button {
    width: auto;
    justify-self: start;
    margin-top: 8px;
}
.palstudio-student-unified-shell .palstudio-prototype-section-header .palstudio-secondary-button {
    white-space: nowrap;
}
@media (max-width: 760px) {
    .palstudio-student-unified-shell .palstudio-recordings-submit-bar {
        grid-template-columns: 1fr;
    }
    .palstudio-student-unified-shell .palstudio-prototype-section-header {
        align-items: stretch;
        flex-direction: column;
    }
}
.palstudio-student-hero-stat {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
}
.palstudio-student-week-strip {
    display: flex;
    align-items: center;
    gap: 10px;
}
.palstudio-student-practice-section {
    justify-items: center;
}
.palstudio-student-practice-section .palstudio-student-start-practice-button {
    justify-self: center;
    margin: 8px auto 0;
}
.palstudio-student-practice-section .palstudio-student-practice-board {
    width: 100%;
}
.palstudio-prototype-settings-grid label {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    display: grid;
    gap: 7px;
}
.palstudio-prototype-settings-grid .palstudio-prototype-input-card,
.palstudio-prototype-settings-grid input,
.palstudio-prototype-settings-grid select,
.palstudio-prototype-settings-grid .palstudio-secondary-button {
    min-height: 46px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(82,111,145,.22);
    border-radius: 14px;
    padding: 10px 12px;
    color: #637083;
    font-weight: 800;
    background: #f8fbfd;
    box-sizing: border-box;
}
.palstudio-prototype-settings-grid .palstudio-secondary-button {
    justify-content: flex-start;
    width: 100%;
}
.palstudio-prototype-email-field {
    grid-column: auto;
    max-width: none;
}
.palstudio-email-tooltip {
    position: relative;
    display: block;
    width: 100%;
}
.palstudio-email-tooltip input {
    box-sizing: border-box;
    width: 100%;
}
.palstudio-email-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 12px;
    top: calc(100% + 8px);
    z-index: 30;
    width: max-content;
    max-width: min(280px, 80vw);
    padding: 8px 10px;
    border-radius: 10px;
    background: #17243a;
    color: #fff;
    font-size: 0.78rem;
    line-height: 1.25;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(23, 36, 58, 0.18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.14s ease, transform 0.14s ease;
}
.palstudio-email-tooltip::before {
    content: "";
    position: absolute;
    left: 24px;
    top: calc(100% + 3px);
    z-index: 31;
    border: 6px solid transparent;
    border-bottom-color: #17243a;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.14s ease;
}
.palstudio-email-tooltip:hover::after,
.palstudio-email-tooltip:focus-within::after,
.palstudio-email-tooltip:hover::before,
.palstudio-email-tooltip:focus-within::before {
    opacity: 1;
    transform: translateY(0);
}
.palstudio-student-agreements-card {
    padding: 22px;
}
.palstudio-student-agreements-list {
    display: grid;
    gap: 12px;
}
.palstudio-student-agreements-list article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #f7fbfe;
    border: 1px solid rgba(82,111,145,.14);
    border-radius: 18px;
    padding: 14px;
}
.palstudio-student-agreements-list article div {
    display: grid;
    gap: 4px;
}
.palstudio-student-agreements-list strong {
    color: #15233b;
    font-weight: 900;
}
.palstudio-student-agreements-list span {
    color: #637083;
    font-weight: 800;
}
.palstudio-student-signed-documents article {
    background: #fff;
    border-color: rgba(86, 105, 140, .22);
    border-radius: 16px;
    padding: 16px;
}
.palstudio-student-document-status {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: #e7f8f0;
    color: #21725a !important;
    font-size: .78rem;
    font-weight: 900 !important;
}
.palstudio-student-document-status.is-active {
    background: #e7f8f0;
    color: #21725a !important;
}
.palstudio-student-document-actions {
    display: flex !important;
    grid-auto-flow: column;
    gap: 10px !important;
    align-items: center;
}
.palstudio-student-legal-readonly-grid .palstudio-prototype-input-card {
    background: #f8fbff;
}
.palstudio-legal-readonly-checks input:disabled {
    opacity: .8;
}
.palstudio-legal-guidance {
    margin: 0 0 14px;
    border: 1px solid rgba(220, 38, 38, .28);
    background: #fff5f5;
    color: #b91c1c;
    border-radius: 14px;
    padding: 10px 12px;
    font-weight: 900;
}
.palstudio-field-missing > span,
.palstudio-field-missing strong,
.palstudio-field-missing .palstudio-legal-checkbox span {
    color: #b91c1c !important;
}
.palstudio-field-missing input,
.palstudio-field-missing select,
.palstudio-student-agreements-list article.palstudio-field-missing {
    border-color: rgba(220, 38, 38, .55) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .10);
    background: #fff7f7;
}
.palstudio-legal-checkbox-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 14px 0;
}
.palstudio-legal-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #15233b;
    font-weight: 800;
}
.palstudio-legal-checkbox input {
    margin-top: 3px;
    flex: 0 0 auto;
}
@media (max-width: 760px) {
    .palstudio-student-agreements-list article {
        align-items: flex-start;
        flex-direction: column;
    }
    .palstudio-prototype-email-field {
        max-width: none;
    }
}

/* Student prototype typography normalization */
.palstudio-student-unified-shell {
    font-size: 16px;
    line-height: 1.42;
    font-weight: 500;
    color: #15233b;
}
.palstudio-student-unified-shell .palstudio-student-brand strong {
    font-size: 1.45rem;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -.03em;
}
.palstudio-student-app-actions,
.palstudio-student-app-actions strong,
.palstudio-student-app-actions a,
.palstudio-student-app-actions button,
.palstudio-student-prototype-tab {
    font-size: 0.94rem;
    line-height: 1.2;
    font-weight: 850;
}
.palstudio-student-prototype-tab {
    padding: 10px 16px;
}
.palstudio-student-mini-card strong {
    font-size: clamp(1.9rem, 2.6vw, 2.6rem);
    line-height: 1.08;
    font-weight: 850;
    letter-spacing: -0.03em;
}
.palstudio-student-prototype-section h2,
.palstudio-student-section h2,
.palstudio-student-settings-panel h2,
.palstudio-student-agreements-card h2,
.palstudio-student-beta-card h2 {
    font-size: 1.55rem;
    line-height: 1.2;
    font-weight: 850;
    letter-spacing: -0.02em;
}
.palstudio-student-hero-stat span,
.palstudio-prototype-settings-grid label > span,
.palstudio-student-mini-card span,
.palstudio-student-settings-panel > p,
.palstudio-student-agreements-card > p,
.palstudio-student-beta-card span,
.palstudio-student-agreements-list article span,
.palstudio-prototype-settings-grid small {
    font-size: 0.86rem !important;
    line-height: 1.28;
    font-weight: 650 !important;
    color: #4f5d70;
}
.palstudio-student-hero-stat strong,
.palstudio-prototype-settings-grid .palstudio-prototype-input-card,
.palstudio-prototype-settings-grid input,
.palstudio-prototype-settings-grid select,
.palstudio-student-beta-card strong,
.palstudio-student-agreements-list article strong {
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 700 !important;
    color: #15233b;
}
.palstudio-student-record-cell small,
.palstudio-practice-aids,
.palstudio-practice-aids button {
    font-size: 0.86rem !important;
    line-height: 1.25;
    font-weight: 700 !important;
}
.palstudio-student-unified-shell button,
.palstudio-student-unified-shell .palstudio-primary-button,
.palstudio-student-unified-shell .palstudio-secondary-button {
    font-size: 0.94rem !important;
    line-height: 1.2;
    font-weight: 850 !important;
}
.palstudio-student-round-record {
    font-size: 1rem !important;
}

/* Student secondary tab vertical spacing */
.palstudio-student-tab-panel[data-palstudio-student-tab-panel="recordings"] .palstudio-student-mini-card,
.palstudio-student-tab-panel[data-palstudio-student-tab-panel="settings"] .palstudio-student-mini-card {
    margin-bottom: 18px;
}

/* First-recording child notice */
.palstudio-child-notice-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(246, 250, 251, 0.72);
    backdrop-filter: blur(3px);
}
.palstudio-child-notice-card {
    width: min(670px, calc(100vw - 56px));
    display: grid;
    gap: 26px;
    padding: 22px 20px 22px;
    border: 1px solid #bfd3e7;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 0.12rem 0.3rem rgba(20, 35, 59, 0.06), 0 0.7rem 1.55rem rgba(54, 118, 207, 0.10);
    color: #14233b;
}
.palstudio-child-notice-brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    min-height: 43px;
}
.palstudio-child-notice-brand .bubble-mark {
    display: inline-block;
    width: 43px;
    height: 43px;
    border: 2px solid rgba(67, 156, 220, 0.52);
    border-radius: 50%;
    background:
        radial-gradient(circle at 34% 27%, #fff 0 8%, transparent 10%),
        radial-gradient(circle at 66% 70%, rgba(61, 154, 219, 0.25), transparent 43%),
        linear-gradient(145deg, #edfaff, #a8dbf6);
    box-shadow: inset 4px 4px 10px rgba(255, 255, 255, 0.86), 0 4px 10px rgba(37, 108, 169, 0.11);
}
.palstudio-child-notice-brand strong {
    color: #14233b;
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}
.palstudio-child-notice-eyebrow {
    margin: 6px 0 0;
    color: #687385;
    font-size: 0.98rem;
    font-weight: 850;
}
.palstudio-child-notice-card h1 {
    margin: 0;
    color: #14233b;
    font-size: clamp(1.95rem, 3vw, 2.25rem);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.04em;
}
.palstudio-child-notice-copy {
    margin: 10px 0 0;
    color: #14233b;
    font-size: 1.02rem;
    line-height: 1.45;
    font-weight: 800;
}
.palstudio-child-notice-status {
    min-height: 1.2em;
    margin: -8px 0 0;
    color: #bd3f4c;
    font-weight: 800;
}
.palstudio-child-notice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.palstudio-child-notice-actions .palstudio-primary-button,
.palstudio-child-notice-actions .palstudio-secondary-button {
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 10px;
    font-family: var(--palstudio-font-family) !important;
    font-size: 1rem;
    font-weight: 900;
}
@media (max-width: 640px) {
    .palstudio-child-notice-overlay { padding: 16px; align-items: start; }
    .palstudio-child-notice-card { width: 100%; padding: 20px 18px; }
}

/* Prototype-aligned teacher dashboard */
.palstudio-teacher-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px;
    color: #162033;
    font-family: var(--palstudio-font-family);
}
.palstudio-teacher-shell button,
.palstudio-teacher-shell input,
.palstudio-teacher-shell select,
.palstudio-teacher-shell textarea,
.palstudio-teacher-shell a,
.palstudio-teacher-tab,
.palstudio-teacher-button,
.palstudio-teacher-practice-drag-handle {
    font-family: var(--palstudio-font-family) !important;
}
.palstudio-teacher-shell [hidden] {
    display: none !important;
}
.palstudio-teacher-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.palstudio-teacher-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}
.palstudio-teacher-brand strong {
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: -.03em;
}
.palstudio-teacher-brand span {
    color: #6a7384;
    font-weight: 700;
}
.palstudio-teacher-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 24px;
    border-bottom: 1px solid rgba(89, 100, 255, .16);
}
.palstudio-teacher-tab,
.palstudio-teacher-button {
    appearance: none;
    border: 1px solid rgba(89, 100, 255, .22);
    border-radius: 999px;
    background: #fff;
    color: #253047;
    padding: 10px 16px;
    font-weight: 850;
    font-size: .94rem;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(31, 45, 75, .08);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.palstudio-teacher-tab {
    border-radius: 14px 14px 0 0;
    border-bottom-color: transparent;
    box-shadow: none;
    cursor: grab;
    margin-bottom: -1px;
}
.palstudio-teacher-tab:active,
.palstudio-teacher-tab.is-dragging { cursor: grabbing; }
.palstudio-teacher-tab.is-dragging { opacity: .55; }
.palstudio-teacher-tooltip-anchor {
    display: inline-flex;
}
.palstudio-teacher-button:disabled {
    cursor: not-allowed;
    opacity: .58;
}
.palstudio-teacher-tab[aria-selected="true"],
.palstudio-teacher-button-primary {
    background: #5865f2;
    border-color: #5865f2;
    color: #fff;
}
.palstudio-teacher-content {
    background: #f7f8ff;
    border: 1px solid rgba(114, 126, 255, .16);
    border-radius: 28px;
    padding: 24px;
    box-shadow: 0 20px 70px rgba(38, 49, 93, .10);
}
.palstudio-teacher-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}
.palstudio-teacher-page-head h1 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 3.1rem);
    letter-spacing: -.05em;
    line-height: 1;
}
.palstudio-teacher-page-head p,
.palstudio-teacher-practice-row p,
.palstudio-teacher-agreement-card p {
    margin: 6px 0 0;
    color: #647084;
    font-weight: 650;
}
.palstudio-teacher-head-actions,
.palstudio-teacher-row-actions,
.palstudio-teacher-card-actions,
.palstudio-teacher-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.palstudio-teacher-list,
.palstudio-teacher-practice-table {
    display: grid;
    gap: 12px;
}
.palstudio-teacher-list-row,
.palstudio-teacher-practice-row,
.palstudio-teacher-student-card,
.palstudio-teacher-agreement-card,
.palstudio-teacher-document-row {
    background: #fff;
    border: 1px solid rgba(111, 124, 255, .14);
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(38, 49, 93, .08);
}
.palstudio-teacher-list-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) .8fr .6fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
}
.palstudio-teacher-review-section-heading {
    color: #536a80;
    font-size: .82rem;
    font-weight: 950;
    letter-spacing: .12em;
    margin: 14px 0 -2px;
    text-transform: uppercase;
}
.palstudio-teacher-list .palstudio-teacher-review-section-heading:first-child {
    margin-top: 0;
}
.palstudio-teacher-list-row.is-reviewed {
    background: rgba(255,255,255,.78);
}
.palstudio-teacher-review-empty {
    color: #6b7f96;
}
.palstudio-teacher-list-main {
    display: flex;
    align-items: center;
    gap: 14px;
}
.palstudio-teacher-avatar,
.palstudio-teacher-add-mark {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f3f5ff, #dfe4ff);
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.85);
    overflow: hidden;
}
.palstudio-teacher-avatar img,
.palstudio-animal-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.palstudio-teacher-list-row h3,
.palstudio-teacher-student-card h3,
.palstudio-teacher-practice-row h3,
.palstudio-teacher-document-row h3 {
    margin: 0;
    font-size: 1.08rem;
    letter-spacing: -.02em;
}
.palstudio-teacher-search-row {
    margin-bottom: 14px;
}
.palstudio-teacher-search-row label,
.palstudio-teacher-inline-form label,
.palstudio-teacher-form-grid label {
    display: grid;
    gap: 7px;
    font-weight: 850;
    color: #465169;
}
.palstudio-teacher-search-row input,
.palstudio-teacher-inline-form input,
.palstudio-teacher-inline-form select,
.palstudio-teacher-inline-form textarea,
.palstudio-teacher-form-grid input,
.palstudio-teacher-form-grid select,
.palstudio-teacher-form-grid textarea {
    border: 1px solid rgba(83, 96, 255, .18);
    border-radius: 18px;
    padding: 13px 14px;
    background: #fff;
    color: #162033;
    font: inherit;
    font-weight: 700;
}
.palstudio-teacher-search-row input { width: min(420px, 100%); }
.palstudio-teacher-inline-form,
.palstudio-teacher-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.palstudio-teacher-wide { grid-column: 1 / -1; }
.palstudio-teacher-notice {
    background: #fff7df;
    border: 1px solid rgba(244, 182, 72, .34);
    color: #7b5616;
    border-radius: 20px;
    padding: 14px 16px;
    font-weight: 750;
}
.palstudio-teacher-folder-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}
.palstudio-teacher-practice-head,
.palstudio-teacher-practice-row {
    display: grid;
    grid-template-columns: 1.1fr 1.2fr .7fr .7fr .8fr auto;
    gap: 14px;
    align-items: center;
}
.palstudio-teacher-practice-head {
    padding: 0 16px;
    color: #6a7384;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.palstudio-teacher-practice-row { padding: 16px; }
.palstudio-teacher-student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}
.palstudio-teacher-student-card {
    padding: 18px;
    min-height: 210px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
}
.palstudio-teacher-student-card .palstudio-teacher-card-actions {
    justify-content: center;
}
.palstudio-teacher-card-actions form { margin: 0; }
.palstudio-admin-student-subcard {
    margin-top: 12px;
    padding: 10px;
    border: 1px solid rgba(86, 105, 140, .18);
    border-radius: 14px;
    background: #f8fbff;
}
.palstudio-admin-student-subcard summary {
    cursor: pointer;
    font-weight: 900;
}
.palstudio-admin-student-list {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}
.palstudio-admin-student-row {
    display: grid;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(86, 105, 140, .16);
    border-radius: 12px;
    background: #fff;
}
.palstudio-admin-student-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.palstudio-admin-student-status-grid span {
    display: grid;
    gap: 2px;
    padding: 8px;
    border-radius: 10px;
    background: #f7f8ff;
    color: #4b5563;
    font-size: .85rem;
}
.palstudio-admin-student-status-grid strong {
    color: #111827;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.palstudio-admin-student-reset-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.palstudio-admin-student-reset-actions form { margin: 0; }
.palstudio-teacher-student-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(255, 193, 7, .16);
    color: #7a4d00;
    font-size: .86rem;
    font-weight: 850;
    line-height: 1.2;
}
.palstudio-teacher-add-card {
    align-items: center;
    justify-content: center;
    text-align: center;
    border-style: dashed;
}
.palstudio-teacher-add-mark {
    color: #5865f2;
    font-size: 2rem;
    font-weight: 900;
}
.palstudio-teacher-agreement-card {
    margin-top: 18px;
    padding: 18px;
}
.palstudio-teacher-document-row {
    margin-top: 12px;
    padding: 16px;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 14px;
    align-items: center;
}
.palstudio-teacher-document-row > span {
    color: #0f8f61;
    font-weight: 900;
}
@media (max-width: 860px) {
    .palstudio-teacher-header,
    .palstudio-teacher-page-head { flex-direction: column; align-items: stretch; }
    .palstudio-teacher-list-row,
    .palstudio-teacher-practice-head,
    .palstudio-teacher-practice-row,
    .palstudio-teacher-document-row,
    .palstudio-teacher-inline-form,
    .palstudio-teacher-form-grid { grid-template-columns: 1fr; }
    .palstudio-teacher-practice-head { display: none; }
}

.palstudio-teacher-agreement-gate {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid #fde68a;
    border-radius: 18px;
    background: #fffbeb;
    color: #78350f;
    box-shadow: 0 12px 26px rgba(120, 53, 15, 0.08);
}
.palstudio-teacher-agreement-required .palstudio-tab-panel:not(#palstudio-panel-settings) {
    opacity: 0.42;
    pointer-events: none;
    filter: grayscale(0.2);
}
.palstudio-agreement-modal[hidden] { display: none; }
.palstudio-agreement-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(15, 23, 42, 0.62);
    padding: 22px;
    overflow: auto;
}
.palstudio-agreement-dialog {
    max-width: 1080px;
    margin: 0 auto;
    background: #f8fafc;
    border-radius: 26px;
    padding: 20px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
}
.palstudio-agreement-header,
.palstudio-agreement-toolbar,
.palstudio-agreement-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.palstudio-agreement-header h2 { margin: 0; }
.palstudio-agreement-header p { margin: 4px 0 0; color: #64748b; }
.palstudio-agreement-toolbar { margin: 16px 0; }
.palstudio-agreement-toolbar label,
.palstudio-agreement-form label {
    display: grid;
    gap: 6px;
    font-weight: 700;
    color: #334155;
}
.palstudio-agreement-toolbar select,
.palstudio-agreement-form input,
.palstudio-agreement-form select {
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
}
.palstudio-agreement-viewer {
    height: min(58vh, 720px);
    border: 1px solid #dbe3ef;
    border-radius: 18px;
    overflow: auto;
    background: #e2e8f0;
    padding: 14px;
}
.palstudio-pdf-page {
    position: relative;
    width: max-content;
    max-width: 100%;
    margin: 0 auto 14px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.16);
}
.palstudio-pdf-page canvas {
    display: block;
    max-width: 100%;
    height: auto !important;
}
.palstudio-pdf-loading {
    min-height: 260px;
    display: grid;
    place-items: center;
    color: #64748b;
    font-weight: 700;
    background: #fff;
    border-radius: 12px;
}
.palstudio-pdf-error { color: #b91c1c; }
.palstudio-pdf-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.palstudio-pdf-overlay-input,
.palstudio-pdf-overlay-check,
.palstudio-pdf-overlay-signature,
.palstudio-pdf-overlay-signature-preview,
.palstudio-pdf-overlay-signature-hint {
    position: absolute;
    pointer-events: auto;
    box-sizing: border-box;
}
.palstudio-pdf-overlay-input {
    border: 1px solid rgba(37, 99, 235, 0.4);
    border-radius: 3px;
    background: rgba(255,255,255,0.86);
    color: #0f172a;
    font: 600 10px/1.1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    padding: 1px 3px;
}
.palstudio-pdf-overlay-section20-input {
    border: 1.5px solid rgba(37, 99, 235, 0.72);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.65) inset;
}
.palstudio-pdf-overlay-select {
    padding: 0 2px;
    font-size: 8px;
}
.palstudio-pdf-overlay-signature-line {
    border: 0;
    background: transparent;
    box-shadow: none;
}
.palstudio-pdf-overlay-input:focus,
.palstudio-pdf-overlay-signature:focus {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}
.palstudio-pdf-overlay-check {
    accent-color: #1d4ed8;
    margin: 0;
}
.palstudio-pdf-overlay-signature {
    border: 1px dashed rgba(37, 99, 235, 0.85);
    border-radius: 4px;
    background: #ffffff;
    touch-action: none;
}
.palstudio-pdf-overlay-signature-preview {
    border: 0;
    border-radius: 0;
    background: transparent;
    pointer-events: none;
}
.palstudio-pdf-overlay-signature-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: rgba(15, 23, 42, 0.62);
    font: 700 12px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: center;
    background: rgba(255, 255, 255, 0.28);
}
.palstudio-pdf-overlay-signature-hint.is-hidden { display: none; }
.palstudio-pdf-overlay-date { background: rgba(255,255,255,0.72); color: #334155; }
.palstudio-pdf-overlay-clear {
    position: absolute;
    pointer-events: auto;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: rgba(255,255,255,0.92);
    color: #1e293b;
    font: 700 9px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    padding: 2px 5px;
    cursor: pointer;
}
.palstudio-pdf-overlay-qc-required [data-overlay-name="quebecEnglishChoice"] {
    outline: 2px solid #dc2626;
    outline-offset: 1px;
}
.palstudio-agreement-form > label,
.palstudio-agreement-checks,
.palstudio-signature-pad-wrap {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
}
.palstudio-agreement-actions { margin-top: 0; }
.palstudio-agreement-form {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.palstudio-agreement-checks,
.palstudio-signature-pad-wrap,
.palstudio-agreement-actions { grid-column: 1 / -1; }
.palstudio-agreement-checks {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    background: #fff;
}
.palstudio-agreement-checks label { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; }
.palstudio-agreement-checks input { width: auto; margin-top: 3px; }
.palstudio-signature-pad-wrap {
    display: grid;
    gap: 10px;
    font-weight: 800;
}
.palstudio-signature-pad-wrap canvas {
    width: 100%;
    max-width: 820px;
    height: 220px;
    background: #fff;
    border: 2px dashed #94a3b8;
    border-radius: 16px;
    touch-action: none;
}
@media (max-width: 760px) {
    .palstudio-agreement-modal { padding: 10px; }
    .palstudio-agreement-dialog { padding: 14px; border-radius: 18px; }
    .palstudio-agreement-form { grid-template-columns: 1fr; }
    .palstudio-agreement-viewer { height: 48vh; }
}


/* Teacher Library prototype parity */
.palstudio-teacher-library-title {
    margin-bottom: 20px;
}
.palstudio-teacher-library-title h1 {
    color: #162033;
}
.palstudio-teacher-library-title p {
    color: #657184;
    font-weight: 650;
}
.palstudio-teacher-library-search-actions {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(360px, 1fr) auto;
    margin-bottom: 16px;
}
.palstudio-teacher-library-search-actions label {
    color: #465169;
    display: grid;
    font-weight: 850;
    gap: 7px;
}
.palstudio-teacher-library-search-actions input,
.palstudio-teacher-folder-form input,
.palstudio-teacher-practice-create input,
.palstudio-teacher-practice-create select,
.palstudio-teacher-practice-create textarea {
    background: #fff;
    border: 1px solid rgba(83, 96, 255, .18);
    border-radius: 18px;
    box-sizing: border-box;
    box-shadow: none;
    color: #15233b;
    font: inherit;
    font-weight: 700;
    min-height: 52px;
    padding: 13px 14px;
    width: 100%;
}
.palstudio-teacher-library-search-actions input,
.palstudio-teacher-folder-form input {
    min-height: 40px;
    padding: 9px 14px;
}
.palstudio-teacher-library-search-actions input::placeholder,
.palstudio-teacher-practice-create input::placeholder,
.palstudio-teacher-practice-create textarea::placeholder {
    color: #8b95a6;
    font-weight: 700;
}
.palstudio-teacher-folder-form {
    align-items: end;
    background: rgba(238, 246, 255, 0.68);
    border: 1px solid rgba(109, 128, 153, 0.24);
    border-radius: 12px;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(220px, min(62vw, 640px)) auto auto;
    justify-content: start;
    margin: 0 0 16px;
    padding: 12px;
}
.palstudio-teacher-folder-form label {
    color: #465169;
    display: grid;
    font-weight: 850;
    gap: 7px;
    min-width: 0;
    width: 100%;
}
.palstudio-teacher-folder-form .palstudio-teacher-button {
    align-self: end;
    min-height: 40px;
    white-space: nowrap;
}
.palstudio-teacher-folder-row {
    gap: 8px;
    margin: 14px 0 24px;
}
.palstudio-teacher-folder-row .palstudio-teacher-button {
    border-radius: 10px;
    min-height: 48px;
    padding: 0 18px;
}
.palstudio-teacher-practice-table {
    border: 1px solid rgba(77, 103, 135, 0.28);
    border-radius: 14px;
    display: block;
    overflow: hidden;
    width: 100%;
}
.palstudio-teacher-practice-head,
.palstudio-teacher-practice-row {
    display: grid;
    gap: 0;
    grid-template-columns: minmax(170px, 1.05fr) minmax(230px, 1.35fr) minmax(135px, .78fr) minmax(120px, .72fr) minmax(135px, .82fr) minmax(110px, .65fr);
}
.palstudio-teacher-practice-head {
    background: #dceaf7;
    color: #16395f;
    font-size: .86rem;
    font-weight: 850;
    letter-spacing: 0;
    padding: 0;
    text-transform: none;
}
.palstudio-teacher-practice-head span,
.palstudio-teacher-practice-row > div {
    align-self: stretch;
    border-right: 1px solid rgba(77, 103, 135, 0.26);
    box-sizing: border-box;
    min-width: 0;
    padding: 14px 12px;
}
.palstudio-teacher-practice-head span {
    align-items: center;
    display: flex;
}
.palstudio-teacher-practice-row > div {
    border-bottom: 1px solid rgba(77, 103, 135, 0.22);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.palstudio-teacher-practice-head span:last-child,
.palstudio-teacher-practice-row > div:last-child {
    border-right: 0;
}
.palstudio-teacher-practice-table .palstudio-teacher-practice-row:last-child > div {
    border-bottom: 0;
}
.palstudio-teacher-review-lazy {
    width: 100%;
}
.palstudio-teacher-review-back {
    appearance: none;
    background: transparent;
    border: 0;
    color: #16395f;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    margin: 0 0 18px;
    padding: 0;
}
.palstudio-teacher-review-hero {
    align-items: center;
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(82,111,145,.16);
    border-radius: 22px;
    box-shadow: 0 18px 44px rgba(30,58,93,.10), 0 3px 10px rgba(30,58,93,.05);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 20px 22px;
}
.palstudio-teacher-review-hero h1 {
    color: #102d4c;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    margin: 0 0 6px;
}
.palstudio-teacher-review-hero p {
    color: #5b6d82;
    font-weight: 800;
    margin: 0;
}
.palstudio-teacher-review-table {
    background: rgba(255,255,255,.82);
    border: 1px solid rgba(77,103,135,.28);
    border-radius: 14px;
    display: block;
    overflow: hidden;
    width: 100%;
}
.palstudio-teacher-review-head,
.palstudio-teacher-review-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}
.palstudio-teacher-review-head {
    background: #dceaf7;
    color: #16395f;
    font-size: .86rem;
    font-weight: 850;
}
.palstudio-teacher-review-head span,
.palstudio-teacher-review-row > div {
    align-self: stretch;
    border-right: 1px solid rgba(77,103,135,.26);
    box-sizing: border-box;
    min-width: 0;
    padding: 14px 12px;
}
.palstudio-teacher-review-head span {
    align-items: center;
    display: flex;
}
.palstudio-teacher-review-row > div {
    align-items: flex-start;
    border-bottom: 1px solid rgba(77,103,135,.22);
    display: flex;
    justify-content: center;
}
.palstudio-teacher-review-row:last-child > div { border-bottom: 0; }
.palstudio-teacher-review-head span:last-child,
.palstudio-teacher-review-row > div:last-child { border-right: 0; }
.palstudio-teacher-review-practice {
    align-items: flex-start !important;
    color: #102d4c;
    flex-direction: column !important;
    gap: 5px;
    justify-content: flex-start !important;
}
.palstudio-teacher-review-practice > span {
    color: #6b7f96;
    font-size: .82rem;
    font-weight: 850;
}
.palstudio-teacher-review-practice h3 {
    color: #102d4c;
    font-size: 1.36rem;
    font-weight: 900;
    margin: 0;
}
.palstudio-teacher-review-practice p {
    color: #536a80;
    font-size: .9rem;
    font-weight: 750;
    margin: 0;
}
.palstudio-teacher-review-comment {
    appearance: none;
    background: #14345e;
    border: 0;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: .95rem;
    font-weight: 900;
    min-height: 44px;
    padding: 0 16px;
    white-space: nowrap;
}
.palstudio-teacher-review-comment.has-feedback { background: #1d7e9f; }
.palstudio-teacher-review-row .palstudio-teacher-media-tile,
.palstudio-teacher-recording-tile {
    height: 122px;
    min-height: 122px;
    min-width: 122px;
    width: 122px;
}
.palstudio-teacher-video-stack {
    align-items: center;
    display: inline-flex;
    flex-direction: column;
    gap: 7px;
}
.palstudio-teacher-video-speed-text {
    color: #536a80;
    display: block;
    font-size: .82rem;
    font-weight: 850;
    line-height: 1.12;
    text-align: center;
    white-space: nowrap;
}
.palstudio-teacher-recording-tile {
    align-items: center;
    appearance: none;
    background: #eef6fb;
    border: 1px solid rgba(77,103,135,.24);
    border-radius: 14px;
    color: #102d4c;
    cursor: pointer;
    display: inline-grid;
    font: inherit;
    font-weight: 950;
    gap: 8px;
    justify-items: center;
    padding: 12px;
    text-align: center;
}
.palstudio-teacher-recording-tile span {
    align-items: center;
    background: #14345e;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    height: 46px;
    justify-content: center;
    width: 46px;
}
.palstudio-teacher-recording-tile strong {
    font-size: .95rem;
    font-weight: 950;
    line-height: 1.12;
}
.palstudio-teacher-review-row > div:last-child {
    flex-direction: column;
    gap: 10px;
}
.palstudio-teacher-review-row .palstudio-other-takes-button {
    max-width: 122px;
}
.palstudio-teacher-review-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 18px;
}
.palstudio-teacher-practice-name-cell {
    align-items: center;
    flex-direction: row !important;
    gap: 14px;
    justify-content: flex-start !important;
}
.palstudio-teacher-practice-name-cell > div {
    min-width: 0;
}
.palstudio-teacher-practice-drag-handle {
    align-items: center;
    appearance: none;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(49, 83, 122, 0.16);
    border-radius: 12px;
    color: #183f68;
    cursor: grab;
    display: inline-flex;
    flex: 0 0 40px;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 900;
    height: 48px;
    justify-content: center;
    padding: 0;
    width: 40px;
}
.palstudio-teacher-practice-drag-handle:active {
    cursor: grabbing;
}
.palstudio-teacher-assigned-sortable .palstudio-teacher-practice-row.is-dragging {
    opacity: .58;
}
.palstudio-teacher-assigned-sortable .palstudio-teacher-practice-row.is-drop-target > div {
    box-shadow: inset 0 3px 0 rgba(24, 63, 120, 0.34);
}
.palstudio-teacher-practice-row {
    background: rgba(250, 253, 255, 0.72);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}
.palstudio-teacher-practice-row h3 {
    color: #10345a;
    font-size: 1.12rem;
    font-weight: 950;
    line-height: 1.2;
    margin: 0;
}
.palstudio-teacher-practice-row p,
.palstudio-teacher-practice-row [role="cell"] {
    color: #17375e;
    font-weight: 850;
    line-height: 1.4;
}
.palstudio-teacher-practice-row p {
    color: #667386;
    font-size: .86rem;
    margin-top: 12px;
}
.palstudio-teacher-media-tile {
    align-items: center;
    appearance: none;
    border: 0;
    border-radius: 14px;
    box-sizing: border-box;
    cursor: pointer;
    display: inline-grid;
    font: inherit;
    gap: 5px;
    justify-items: center;
    min-height: 122px;
    padding: 12px;
    text-align: center;
    text-decoration: none;
    width: 100%;
}
.palstudio-teacher-video-tile {
    background: #14345e;
    color: #fff;
}
.palstudio-teacher-video-tile span {
    align-items: center;
    background: rgba(255,255,255,.82);
    border-radius: 999px;
    color: #14345e;
    display: inline-flex;
    font-size: 1.25rem;
    height: 46px;
    justify-content: center;
    width: 46px;
}
.palstudio-teacher-media-tile strong {
    font-size: .95rem;
    font-weight: 950;
    line-height: 1.12;
}
.palstudio-teacher-practice-row .palstudio-teacher-preview-tile {
    overflow: hidden;
    position: relative;
}
.palstudio-teacher-practice-row .palstudio-teacher-preview-tile img,
.palstudio-teacher-practice-row .palstudio-teacher-preview-tile video {
    height: 100%;
    inset: 0;
    object-fit: cover;
    position: absolute;
    width: 100%;
    z-index: 0;
}
.palstudio-teacher-practice-row .palstudio-teacher-preview-tile::before {
    background: rgba(20, 52, 94, .46);
    content: "";
    inset: 0;
    position: absolute;
    z-index: 1;
}
.palstudio-teacher-practice-row .palstudio-teacher-preview-tile strong,
.palstudio-teacher-practice-row .palstudio-teacher-preview-tile .palstudio-teacher-play-overlay {
    position: relative;
    z-index: 2;
}
.palstudio-teacher-practice-row .palstudio-teacher-preview-tile .palstudio-teacher-play-overlay {
    align-items: center;
    background: rgba(255,255,255,.82);
    border-radius: 999px;
    color: #14345e;
    display: inline-flex;
    font-size: 1.25rem;
    height: 46px;
    justify-content: center;
    padding-left: 3px;
    width: 46px;
}
.palstudio-teacher-image-tile {
    background: transparent;
    border: 0;
    color: #102d4c;
    min-height: 0;
    padding: 0;
    width: auto;
}
.palstudio-teacher-image-tile span {
    background: repeating-linear-gradient(to bottom, #fff 0 8px, #c9d3df 9px 10px);
    border: 0;
    display: block;
    height: 70px;
    overflow: hidden;
    position: relative;
    width: 58px;
}
.palstudio-teacher-image-tile .palstudio-teacher-image-thumb {
    background: #fff;
}
.palstudio-teacher-image-tile .palstudio-teacher-image-thumb img,
.palstudio-teacher-image-tile .palstudio-teacher-image-thumb canvas {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}
.palstudio-teacher-image-tile span::before,
.palstudio-teacher-image-tile span::after {
    background: #102d4c;
    border-radius: 999px;
    content: "";
    height: 5px;
    left: 28px;
    position: absolute;
    width: 5px;
}
.palstudio-teacher-image-tile .palstudio-teacher-image-thumb::before,
.palstudio-teacher-image-tile .palstudio-teacher-image-thumb::after {
    content: none;
}
.palstudio-teacher-image-tile span::before { top: 28px; }
.palstudio-teacher-image-tile span::after { top: 49px; }
.palstudio-teacher-empty-mark {
    align-items: center;
    color: #6b7280;
    display: flex;
    font-size: 1.15rem;
    font-weight: 600;
    height: 100%;
    justify-content: center;
    min-height: 80px;
}
.palstudio-teacher-practice-row .palstudio-teacher-row-actions {
    align-content: start;
    display: grid;
    gap: 8px;
    justify-items: center;
}
.palstudio-teacher-practice-row .palstudio-teacher-row-actions .palstudio-teacher-button {
    border-radius: 999px;
    justify-content: center;
    min-height: 0;
    padding: 10px 16px;
    width: 86px;
}
.palstudio-teacher-practice-row .palstudio-teacher-row-actions form {
    display: grid;
    justify-items: center;
    margin: 0;
}
.palstudio-teacher-library-empty {
    border-top: 1px solid rgba(77, 103, 135, 0.22);
    border-radius: 0;
    margin: 0;
}
.palstudio-teacher-practice-create {
    display: grid;
    gap: 18px;
}
.palstudio-teacher-practice-create[hidden] { display: none; }
.palstudio-teacher-practice-create-grid {
    display: grid;
    gap: 18px 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.palstudio-teacher-practice-create label,
.palstudio-teacher-image-upload-inline,
.palstudio-teacher-music-tools {
    min-width: 0;
}
.palstudio-teacher-practice-create input:not([type="file"]),
.palstudio-teacher-practice-create select,
.palstudio-teacher-practice-create textarea {
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
}
.palstudio-teacher-practice-create input:not([type="file"]),
.palstudio-teacher-practice-create select {
    min-height: 52px;
}
.palstudio-teacher-image-upload-control {
    align-items: center;
    box-sizing: border-box;
    display: flex;
    gap: 10px;
    min-height: 52px;
    max-width: 100%;
    overflow: hidden;
    width: 100%;
}
.palstudio-teacher-image-upload-control input[type="file"] {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(83, 96, 255, .18);
    border-radius: 18px;
    box-sizing: border-box;
    display: flex;
    flex: 1 1 auto;
    font: inherit;
    font-weight: 700;
    height: 52px;
    min-height: 52px;
    min-width: 0;
    padding: 13px 14px;
}
.palstudio-teacher-image-upload-control .palstudio-teacher-button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 14px;
}
.palstudio-teacher-practice-create label,
.palstudio-teacher-image-upload-inline {
    color: #465169;
    display: grid;
    font-weight: 850;
    gap: 7px;
}
.palstudio-teacher-practice-create textarea {
    min-height: 136px;
    resize: vertical;
}
.palstudio-teacher-music-tools {
    background: #fff;
    border: 1px solid rgba(111, 124, 255, .14);
    border-radius: 24px;
    box-sizing: border-box;
    box-shadow: 0 12px 30px rgba(38, 49, 93, .08);
    display: grid;
    gap: 14px 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 6px 0 0;
    padding: 20px 16px 16px;
    position: relative;
}
.palstudio-teacher-music-tools legend {
    color: #465169;
    font-weight: 850;
    padding: 0 8px;
}
.palstudio-teacher-practice-create .palstudio-teacher-form-actions {
    margin-top: 2px;
}
@media (max-width: 980px) {
    .palstudio-teacher-library-search-actions,
    .palstudio-teacher-practice-create-grid,
    .palstudio-teacher-music-tools {
        grid-template-columns: 1fr;
    }
    .palstudio-teacher-practice-table {
        overflow-x: auto;
    }
    .palstudio-teacher-practice-head,
    .palstudio-teacher-practice-row {
        min-width: 860px;
    }
}

.palstudio-teacher-icon-cell {
    align-items: center;
    display: flex;
    justify-content: center;
}
.palstudio-teacher-practice-table .palstudio-icon-button,
.palstudio-teacher-practice-table .palstudio-icon-button.palstudio-sheet-preview {
    height: 3.8rem;
    width: 3.8rem;
    padding: .4rem;
}
.palstudio-teacher-practice-table .palstudio-icon-button img,
.palstudio-teacher-practice-table .palstudio-icon-button.palstudio-sheet-preview img {
    height: 2.55rem;
    width: 2.55rem;
}
.palstudio-teacher-practice-table .palstudio-play-icon-button span {
    height: 2.55rem;
    width: 2.55rem;
    font-size: 1.45rem;
}
.palstudio-teacher-library-aids {
    justify-content: center;
}
.palstudio-teacher-library-aids .palstudio-audio-button {
    min-height: 2rem;
    padding: .35rem .7rem;
    white-space: nowrap;
}


.palstudio-teacher-account-stack {
    display: grid;
    gap: 18px;
}
.palstudio-teacher-account-panel {
    color: #14233f;
}
.palstudio-teacher-account-back,
.palstudio-teacher-account-secondary,
.palstudio-teacher-account-save {
    appearance: none;
    border: 1px solid #d6dde8;
    border-radius: 12px;
    background: rgba(255,255,255,.78);
    color: #15223a;
    padding: 12px 17px;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(31,45,75,.04);
}
.palstudio-teacher-account-back {
    margin-bottom: 4px;
}
.palstudio-teacher-account-panel > h1 {
    margin: 0 0 24px;
    color: #18375e;
    font-size: clamp(2rem, 3vw, 3.15rem);
    line-height: 1;
    letter-spacing: -.05em;
}
.palstudio-teacher-account-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.palstudio-teacher-photo-card {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 20px 18px;
    border: 1px solid #b9cce5;
    border-radius: 16px;
    background: #dcebf9;
}
.palstudio-teacher-photo-card strong,
.palstudio-teacher-account-form label > span,
.palstudio-teacher-account-reset > span {
    display: block;
    margin-bottom: 8px;
    color: #111827;
    font-weight: 900;
}
.palstudio-teacher-photo-card > div:last-child {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.palstudio-teacher-photo-card strong {
    line-height: 1.1;
    margin-bottom: 10px;
}
.palstudio-teacher-photo-card .palstudio-teacher-avatar {
    width: 72px;
    height: 72px;
    font-size: 2rem;
    border: 1px solid #b9cce5;
    box-shadow: 0 10px 24px rgba(35, 67, 115, .12), inset 0 0 0 2px rgba(255,255,255,.85);
    overflow: hidden;
}
.palstudio-teacher-photo-card .palstudio-teacher-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.palstudio-teacher-photo-card p {
    margin: 10px 0 0;
    color: #5f6c80;
    font-weight: 750;
    line-height: 1.35;
}
.palstudio-teacher-file-control {
    display: inline-flex;
    max-width: none;
    width: auto;
}
.palstudio-teacher-photo-upload-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 12px;
    margin-top: 0;
}
.palstudio-teacher-file-button {
    cursor: pointer;
    margin: 0;
}
.palstudio-teacher-file-button span,
.palstudio-teacher-photo-upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    min-width: 176px;
    box-sizing: border-box;
    border-radius: 12px;
    font-weight: 850;
    line-height: 1;
    text-align: center;
}
.palstudio-teacher-file-button span {
    border: 1px solid #ccd6e3;
    background: rgba(255,255,255,.86);
    color: #15223a;
    padding: 0 16px;
}
.palstudio-teacher-file-button input[type="file"] {
    position: absolute;
    width: 1px !important;
    min-height: 1px !important;
    height: 1px !important;
    opacity: 0;
    pointer-events: none;
    padding: 0 !important;
    border: 0 !important;
}
.palstudio-teacher-photo-upload-button {
    padding: 0 18px;
}
.palstudio-teacher-file-control input,
.palstudio-teacher-account-form input,
.palstudio-teacher-account-form select {
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    border: 1px solid #ccd6e3;
    border-radius: 10px;
    background: rgba(255,255,255,.74);
    color: #5d6675;
    padding: 12px 14px;
    font: inherit;
    font-weight: 750;
}
.palstudio-teacher-file-control input {
    padding: 11px 14px;
}
.palstudio-teacher-account-reset {
    display: grid;
    align-content: end;
}
.palstudio-teacher-account-reset button {
    width: 100%;
    min-height: 48px;
    justify-content: center;
    background: rgba(255,255,255,.86);
}
.palstudio-teacher-account-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    margin-top: 4px;
}
.palstudio-teacher-account-save {
    background: #183f78;
    border-color: #183f78;
    color: #fff;
}
.palstudio-teacher-account-status {
    margin-top: 28px;
}
.palstudio-teacher-account-status h2 {
    margin: 0;
    color: #18375e;
    font-size: 1.55rem;
    letter-spacing: -.04em;
}
.palstudio-teacher-account-status p {
    margin: 4px 0 14px;
    color: #5f6c80;
    font-weight: 750;
}
.palstudio-teacher-account-status > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
@media (max-width: 860px) {
    .palstudio-teacher-account-form,
    .palstudio-teacher-photo-card { grid-template-columns: 1fr; }
    .palstudio-teacher-photo-card .palstudio-teacher-avatar { width: 64px; height: 64px; }
}


/* Teacher-managed student Practice page prototype */
.palstudio-teacher-practice-stack { display: grid; gap: 18px; }
.palstudio-teacher-practice-panel[hidden],
.palstudio-teacher-practice-add-form[hidden],
[data-palstudio-teacher-practice-main][hidden],
[data-palstudio-teacher-practice-main-table][hidden] { display: none !important; }
.palstudio-teacher-practice-panel { color: #14233f; }
.palstudio-teacher-practice-back,
.palstudio-teacher-add-practice-button {
    appearance: none;
    border: 1px solid #d6dde8;
    border-radius: 12px;
    background: rgba(255,255,255,.86);
    color: #15223a;
    padding: 12px 17px;
    font: inherit;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(31,45,75,.04);
}
.palstudio-teacher-practice-add-form > .palstudio-teacher-practice-back { justify-self: start; }
.palstudio-teacher-add-practice-button {
    background: #183f78;
    border-color: #183f78;
    color: #fff;
}
.palstudio-teacher-practice-hero {
    display: grid;
    grid-template-columns: minmax(260px, .85fr) minmax(420px, 1.6fr);
    gap: 16px;
    padding: 16px;
    border: 1px solid #b7cde6;
    border-radius: 22px;
    background: #dcebf9;
    box-shadow: 0 18px 44px rgba(30, 58, 93, .12);
}
.palstudio-teacher-practice-identity {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 130px;
}
.palstudio-teacher-practice-identity .palstudio-teacher-avatar {
    width: 72px;
    height: 72px;
    border: 1px solid #b9cce5;
}
.palstudio-teacher-practice-identity h1 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1;
    letter-spacing: -.05em;
    color: #061424;
}
.palstudio-teacher-practice-requirement,
.palstudio-teacher-practice-lifetime,
.palstudio-teacher-practice-week {
    background: rgba(255,255,255,.82);
    border: 1px solid #c7d8e9;
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(33, 62, 102, .10);
}
.palstudio-teacher-practice-requirement {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 18px;
    padding: 18px;
    align-items: center;
}
.palstudio-teacher-practice-requirement span,
.palstudio-teacher-practice-lifetime span,
.palstudio-teacher-practice-week > span {
    display: block;
    color: #6a7384;
    font-weight: 900;
    margin-bottom: 6px;
}
.palstudio-teacher-practice-requirement strong,
.palstudio-teacher-practice-lifetime strong { color: #17243a; font-weight: 950; }
.palstudio-teacher-minute-stepper { display: inline-flex; align-items: center; gap: 8px; }
.palstudio-teacher-minute-stepper button {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 1px solid #d7e2ee;
    background: #f8fbfd;
    color: #17243a;
    font-weight: 900;
}
.palstudio-teacher-minute-stepper input {
    width: 92px;
    border: 0;
    background: transparent;
    color: #17243a;
    font: inherit;
    font-weight: 900;
    text-align: center;
    -moz-appearance: textfield;
}
.palstudio-teacher-minute-stepper input::-webkit-outer-spin-button,
.palstudio-teacher-minute-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.palstudio-teacher-practice-progress {
    grid-column: 1 / -1;
    height: 10px;
    border-radius: 999px;
    background: #dbe7f1;
    overflow: hidden;
}
.palstudio-teacher-practice-progress span { display:block; height:100%; background:#183f78; border-radius:999px; }
.palstudio-teacher-practice-lifetime { padding: 18px; display: grid; align-content: center; }
.palstudio-teacher-practice-week { padding: 18px; }
.palstudio-teacher-practice-week ul {
    display: grid;
    grid-template-columns: repeat(7, minmax(64px, 1fr));
    gap: 8px;
    padding: 0;
    margin: 10px 0 0;
    list-style: none;
}
.palstudio-teacher-practice-week li { display: grid; gap: 7px; text-align: center; }
.palstudio-teacher-practice-week li span { color: #17243a; font-weight: 900; font-size: .86rem; }
.palstudio-teacher-practice-week li strong {
    border: 1px solid #a7c6c4;
    border-radius: 10px;
    background: #d8eee4;
    color: #173662;
    min-height: 38px;
    display: grid;
    place-items: center;
    font-weight: 950;
}
.palstudio-teacher-practice-week li.is-empty strong { background: #edf2f6; border-color: #c7d8e9; color: #17243a; }
.palstudio-teacher-assigned-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 26px 0 12px;
}
.palstudio-teacher-assigned-head h2 { margin: 0; color: #173662; font-size: 1.55rem; letter-spacing: -.03em; }
.palstudio-teacher-assigned-minutes {
    align-items: center;
    background: #eef6ff;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 999px;
    color: #1e3a8a;
    display: inline-flex;
    flex-wrap: wrap;
    font-size: .92rem;
    font-weight: 800;
    gap: .25rem;
    margin: .45rem 0 0;
    padding: .45rem .75rem;
}
.palstudio-teacher-assigned-minutes strong {
    color: #102d4c;
    font-weight: 950;
}
.palstudio-teacher-assigned-minutes.is-complete {
    background: #ecfdf5;
    border-color: rgba(16, 185, 129, .28);
    color: #047857;
}
.palstudio-teacher-assigned-minutes.is-under {
    background: #fff7ed;
    border-color: rgba(249, 115, 22, .28);
    color: #9a3412;
}
.palstudio-teacher-practice-add-form {
    display: grid;
    gap: 18px;
    margin: 0;
}
@media (max-width: 900px) {
    .palstudio-teacher-practice-hero,
    .palstudio-teacher-practice-requirement,
    .palstudio-teacher-practice-lifetime,
    .palstudio-teacher-practice-week { grid-template-columns: 1fr; }
    .palstudio-teacher-practice-week ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.palstudio-teacher-show-unadded {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    color: #16395f;
    font-weight: 850;
}
.palstudio-teacher-show-unadded input {
    width: 18px;
    height: 18px;
    accent-color: #183f78;
}


/* Student practice list prototype visual pass — table-only, preserves recorder/media markup */
.palstudio-student-practice-section {
    margin-top: 18px;
}
.palstudio-student-practice-section .palstudio-table-wrap {
    overflow-x: auto;
    padding-bottom: 2px;
}
.palstudio-student-practice-board {
    background: rgba(255,255,255,0.88) !important;
    border: 1px solid rgba(82, 111, 145, 0.16) !important;
    border-radius: 24px !important;
    box-shadow: 0 18px 44px rgba(30, 58, 93, 0.10), 0 3px 10px rgba(30, 58, 93, 0.05) !important;
    padding: 18px !important;
    --palstudio-recorded-progress: 0%;
}
.palstudio-student-practice-board h2 {
    margin: 0 0 12px !important;
    color: #16243b;
    font-size: 1.28rem !important;
    font-weight: 850 !important;
}
.palstudio-student-practice-board h2::after {
    content: "";
    display: block;
    height: 6px;
    margin-top: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, #1f5f9f 0 var(--palstudio-recorded-progress, 0%), #c7ddeb var(--palstudio-recorded-progress, 0%) 100%);
}
.palstudio-student-practices-table {
    width: 100%;
    min-width: 0;
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
    table-layout: fixed;
}
.palstudio-student-practices-table thead th {
    padding: 0 14px 8px !important;
    background: transparent !important;
    border: 0 !important;
    color: #15233b !important;
    font-size: 0.82rem !important;
    font-weight: 850 !important;
    line-height: 1.18;
    text-align: left;
}
.palstudio-student-practices-table thead th:first-child,
.palstudio-student-practices-table tbody td:first-child {
    text-align: center;
}
.palstudio-student-practices-table tbody tr {
    filter: drop-shadow(0 8px 16px rgba(30, 58, 93, 0.055));
}
.palstudio-student-practices-table tbody td {
    padding: 14px !important;
    background: #f7fbfe !important;
    border-top: 1px solid rgba(82, 111, 145, 0.13) !important;
    border-bottom: 1px solid rgba(82, 111, 145, 0.13) !important;
    border-right: 1px solid rgba(82, 111, 145, 0.13) !important;
    color: #4f5d70;
    font-size: 0.94rem !important;
    font-weight: 650 !important;
    line-height: 1.35;
    vertical-align: top;
}
.palstudio-student-practices-table tbody td:first-child {
    border-left: 1px solid rgba(82, 111, 145, 0.13) !important;
    border-radius: 18px 0 0 18px;
}
.palstudio-student-practices-table tbody td:last-child {
    border-radius: 0 18px 18px 0;
}
.palstudio-student-practices-table .palstudio-practice-title-lines {
    display: grid;
    gap: 4px;
}
.palstudio-student-practices-table .palstudio-practice-title-lines strong {
    color: #15233b;
    font-size: 1.05rem !important;
    font-weight: 850 !important;
    line-height: 1.22;
}
.palstudio-student-practice-feedback {
    margin-top: .6rem;
    padding: .55rem .65rem;
    border-radius: .75rem;
    background: #eef6ff;
    color: #1e3a8a;
    font-size: .9rem;
    line-height: 1.35;
}
.palstudio-student-practice-feedback strong {
    display: inline-block;
    margin-bottom: .15rem;
    font-weight: 900;
}
.palstudio-student-practices-table .palstudio-practice-title-lines small,
.palstudio-student-record-cell small,
.palstudio-prototype-status-pill,
.palstudio-status-pill,
.palstudio-student-video-type-label {
    color: #637083;
    font-size: 0.84rem !important;
    font-weight: 750 !important;
    line-height: 1.22;
}
.palstudio-student-practices-table .palstudio-status-pill {
    display: inline-block;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
}
.palstudio-student-record-cell {
    width: 100% !important;
    display: grid;
    justify-items: center !important;
    align-items: center !important;
    align-content: center !important;
    gap: 6px;
    text-align: center !important;
}
.palstudio-student-record-cell .palstudio-student-round-record,
.palstudio-student-record-cell .pb-record-button {
    grid-column: 1 / -1 !important;
    justify-self: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
.palstudio-student-record-cell {
    grid-template-columns: minmax(0, 1fr) !important;
}
.palstudio-student-round-record,
.pb-record-button {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    border-radius: 999px !important;
    background: #e1433b !important;
    border: 0 !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(217, 60, 54, 0.24) !important;
    position: relative;
}
.pb-record-button::before {
    content: "";
    position: absolute;
    inset: 13px;
    border-radius: 999px;
    background: #fff;
}
.pb-record-button:hover,
.pb-record-button:focus-visible {
    background: #cf302b !important;
    box-shadow: 0 10px 22px rgba(217, 60, 54, 0.32) !important;
}
.pb-record-button:disabled::before {
    opacity: 0.75;
}
.palstudio-student-practices-table .palstudio-copy-pid[hidden] {
    display: none !important;
}
.palstudio-student-practices-table .palstudio-copy-pid {
    justify-self: start;
    width: auto;
    min-height: 0;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.72rem !important;
}
.palstudio-student-practices-table .palstudio-video-embed {
    width: 122px !important;
    height: 122px !important;
    min-width: 122px !important;
    min-height: 122px !important;
    aspect-ratio: auto !important;
    display: grid;
    gap: 0;
    align-content: center;
    padding: 0;
    border-radius: 14px;
    background: transparent;
    color: #fff;
    overflow: hidden;
    margin: 0 auto;
}
.palstudio-student-practices-table .palstudio-video-embed .palstudio-student-video-type-label {
    display: none !important;
}
.palstudio-student-practices-table .palstudio-youtube-poster {
    width: 122px !important;
    height: 122px !important;
    min-width: 122px !important;
    min-height: 122px !important;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
}
.palstudio-student-practices-table .palstudio-student-video-tile {
    align-items: center;
    appearance: none;
    background: rgba(20, 52, 94, 0.66);
    box-sizing: border-box;
    color: #fff;
    cursor: pointer;
    display: inline-grid;
    font: inherit;
    gap: 5px;
    justify-items: center;
    padding: 12px !important;
    position: relative;
    text-align: center;
    text-decoration: none;
}
.palstudio-student-practices-table .palstudio-student-video-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(20, 52, 94, 0.58);
}
.palstudio-student-practices-table .palstudio-student-video-tile .YT-img {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}
.palstudio-student-practices-table .palstudio-student-video-tile strong {
    color: #fff;
    font-size: .95rem;
    font-weight: 950;
    line-height: 1.12;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.42);
}
.palstudio-student-practices-table .palstudio-youtube-poster .YT-play-button {
    align-items: center !important;
    background: rgba(255,255,255,.82) !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    color: #14345e !important;
    display: inline-flex !important;
    font-size: 1.25rem !important;
    height: 46px !important;
    inset: auto !important;
    justify-content: center !important;
    line-height: 1 !important;
    padding-left: 3px !important;
    position: static !important;
    transform: none !important;
    width: 46px !important;
    z-index: 2;
}
.palstudio-student-practices-table .palstudio-video-embed iframe,
.palstudio-student-practices-table .palstudio-video-embed video {
    border: 0;
    border-radius: 10px;
    overflow: hidden;
}
.palstudio-student-practices-table .palstudio-video-embed:fullscreen,
.palstudio-student-practices-table .palstudio-video-embed:-webkit-full-screen {
    display: block !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: #000 !important;
}
.palstudio-student-practices-table .palstudio-video-embed:fullscreen .palstudio-student-video-type-label,
.palstudio-student-practices-table .palstudio-video-embed:-webkit-full-screen .palstudio-student-video-type-label {
    display: none !important;
}
.palstudio-student-practices-table .palstudio-video-embed:fullscreen iframe,
.palstudio-student-practices-table .palstudio-video-embed:fullscreen video,
.palstudio-student-practices-table .palstudio-video-embed:-webkit-full-screen iframe,
.palstudio-student-practices-table .palstudio-video-embed:-webkit-full-screen video {
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    border-radius: 0 !important;
}
.palstudio-student-practices-table .palstudio-sheet-preview:not(.palstudio-teacher-image-tile) {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    aspect-ratio: auto !important;
    border-radius: 12px !important;
    background: #f8fbfd !important;
    border: 1px solid rgba(82, 111, 145, 0.22) !important;
    display: inline-grid !important;
    place-items: center !important;
    padding: 0 !important;
}
.palstudio-student-practices-table .palstudio-sheet-preview img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}
.palstudio-student-practices-table .palstudio-teacher-image-tile.palstudio-sheet-preview {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    display: inline-grid !important;
    place-items: center !important;
    margin: 0 auto !important;
}
.palstudio-student-practices-table .palstudio-teacher-image-tile.palstudio-sheet-preview span {
    height: 136px;
    width: 112px;
}
.palstudio-student-practices-table .palstudio-teacher-image-tile.palstudio-sheet-preview .palstudio-teacher-image-thumb img,
.palstudio-student-practices-table .palstudio-teacher-image-tile.palstudio-sheet-preview .palstudio-teacher-image-thumb canvas {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}
.palstudio-student-practices-table .palstudio-teacher-image-tile.palstudio-sheet-preview span::before,
.palstudio-student-practices-table .palstudio-teacher-image-tile.palstudio-sheet-preview span::after {
    left: 54px;
}
.palstudio-student-practices-table .palstudio-teacher-image-tile.palstudio-sheet-preview span::before { top: 54px; }
.palstudio-student-practices-table .palstudio-teacher-image-tile.palstudio-sheet-preview span::after { top: 95px; }
.palstudio-student-practices-table .palstudio-practice-aids {
    display: grid;
    gap: 6px;
    justify-items: start;
}
.palstudio-student-practices-table .palstudio-audio-button {
    border-radius: 999px;
    padding: 6px 10px !important;
    white-space: nowrap;
}
@media (max-width: 720px) {
    .palstudio-student-practices-table {
        min-width: 0;
        border-spacing: 0 !important;
    }
    .palstudio-student-practices-table tbody tr {
        filter: none;
    }
    .palstudio-student-practices-table tbody td:first-child,
    .palstudio-student-practices-table tbody td:last-child {
        border-radius: 0;
    }
}


/* Student summary now reuses the teacher selected-student card structure. */
.palstudio-student-unified-content .palstudio-student-summary-card {
    margin-bottom: 18px;
}
.palstudio-student-unified-shell,
.palstudio-student-unified-content {
    background-clip: padding-box;
}


/* Shared app shell/layout primitives for teacher + student pages. */
.palstudio-app-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 32px 48px;
    color: #162033;
    font-family: var(--palstudio-font-family);
}
.palstudio-app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}
.palstudio-app-tabs {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    border-bottom: 1px solid rgba(89, 100, 255, .16);
    margin: 0 0 24px;
}
.palstudio-app-tab {
    appearance: none;
    background: #fff;
    border: 1px solid rgba(89, 100, 255, .22);
    border-bottom-color: transparent;
    border-radius: 14px 14px 0 0;
    color: #253047;
    cursor: grab;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font: inherit;
    font-size: .94rem;
    font-weight: 850;
    line-height: 1.2;
    margin-bottom: -1px;
    min-height: 2.4rem;
    padding: 10px 16px;
    text-decoration: none;
}
.palstudio-app-tab[aria-selected="true"] {
    background: #5865f2;
    border-color: #5865f2;
    color: #fff;
}
.palstudio-app-content {
    background: #f7f8ff;
    border: 1px solid rgba(114, 126, 255, .16);
    border-radius: 28px;
    padding: 24px;
    box-shadow: 0 20px 70px rgba(38, 49, 93, .10);
}
.palstudio-teacher-practice-hero { align-items: stretch; }
@media (max-width: 820px) {
    .palstudio-app-shell { padding: 18px; }
    .palstudio-app-header { align-items: flex-start; flex-direction: column; }
    .palstudio-app-content { padding: 18px; border-radius: 22px; }
}

/* Teacher dashboard mockup alignment */
.palstudio-teacher-shell {
    background: #f4f8fc;
    border: 1px solid #cad6e4;
    border-radius: 18px;
    box-shadow: 0 22px 70px rgba(19, 44, 80, .10);
    box-sizing: border-box;
    margin: 10px auto 24px;
    max-width: 1680px;
    overflow: hidden;
    padding: 0;
    width: calc(100vw - 48px);
}
.palstudio-teacher-header {
    background: rgba(247, 250, 253, .94);
    border-bottom: 1px solid #d2dce8;
    margin: 0;
    padding: 16px 18px;
}
.palstudio-teacher-brand { gap: 10px; }
.palstudio-teacher-brand strong {
    color: #13284a;
    font-size: 1.25rem;
    font-weight: 950;
}
.palstudio-teacher-brand-divider {
    background: #ccd6e3;
    display: inline-block;
    height: 26px;
    width: 1px;
}
.palstudio-teacher-dashboard-label {
    color: #111827 !important;
    font-size: .94rem;
    font-weight: 900 !important;
}
.palstudio-teacher-header .palstudio-student-app-actions { gap: 8px; }
.palstudio-teacher-header .palstudio-student-app-actions > strong {
    color: #111827;
    font-size: .9rem;
    font-weight: 900;
    padding: 0 6px;
}
.palstudio-teacher-header .palstudio-logout {
    align-items: center;
    background: #f7f9fc;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    box-shadow: 0 2px 7px rgba(16, 38, 67, .04);
    box-sizing: border-box;
    color: #111827;
    display: inline-flex;
    justify-content: center;
    min-height: 38px;
    min-width: 76px;
    padding: 9px 14px;
    text-align: center;
}
.palstudio-teacher-header .palstudio-language-toggle {
    min-width: 76px;
}
.palstudio-teacher-tab-list {
    background: #edf3f8;
    border-bottom: 1px solid #d2dce8;
    gap: 6px;
    margin: 0;
    padding: 10px 18px;
}
.palstudio-teacher-tab {
    background: #f6f9fc;
    border: 1px solid #d8e2ee;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(16, 38, 67, .04);
    color: #111827;
    cursor: grab;
    font-size: .92rem;
    font-weight: 950;
    margin: 0;
    min-height: 40px;
    padding: 10px 14px;
}
.palstudio-teacher-tab[aria-selected="true"] {
    background: #14345e;
    border-color: #14345e;
    color: #fff;
}
.palstudio-teacher-content {
    background: linear-gradient(180deg, #f7fbff 0%, #eef5fb 100%);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 22px 18px 18px;
}
.palstudio-teacher-page-head {
    border-bottom: 1px solid #d4deea;
    margin-bottom: 16px;
    padding-bottom: 18px;
}
.palstudio-teacher-page-head h1 {
    color: #13284a;
    font-size: clamp(1.75rem, 2.6vw, 2.2rem);
    font-weight: 950;
    letter-spacing: -.04em;
}
.palstudio-teacher-page-head p {
    color: #3f4c61;
    font-weight: 800;
}
.palstudio-teacher-list { gap: 10px; }
.palstudio-teacher-list-row {
    border: 1px solid rgba(190, 201, 217, .9);
    border-radius: 12px;
    box-shadow: 0 9px 23px rgba(36, 55, 83, .08);
    color: #18345a;
    grid-template-columns: minmax(260px, 1.4fr) .78fr .7fr auto;
    margin-top: 0;
    min-height: 68px;
    overflow: hidden;
    padding: 12px;
}
.palstudio-teacher-list-row.is-unreviewed { background: #f1f0fb; }
.palstudio-teacher-list-row.is-reviewed { background: #e3f3eb; }
.palstudio-teacher-list-row > div {
    color: #18345a;
    font-weight: 900;
}
.palstudio-teacher-list-row.is-reviewed > div { color: #5c697a; }
.palstudio-teacher-list-row h3 {
    color: #18345a;
    font-size: 1.02rem;
    font-weight: 950;
}
.palstudio-teacher-avatar {
    background: #e7f2fb;
    border: 1px solid #b9cce2;
    box-shadow: inset 0 0 0 3px rgba(255,255,255,.72), 0 4px 12px rgba(31, 54, 87, .08);
    font-size: 1.35rem;
    height: 42px;
    width: 42px;
}
.palstudio-teacher-review-section-heading {
    color: #4c5f76;
    font-size: .78rem;
    font-weight: 950;
    letter-spacing: .08em;
    margin: 16px 0 8px;
}
.palstudio-teacher-row-actions { justify-content: flex-end; }
.palstudio-teacher-row-actions .palstudio-teacher-button,
.palstudio-teacher-list-row .palstudio-teacher-button-primary {
    background: #14345e;
    border-color: #14345e;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(20, 52, 94, .16);
    color: #fff;
    font-weight: 950;
    min-height: 40px;
    padding: 9px 15px;
}
.palstudio-teacher-list-row.is-reviewed .palstudio-teacher-button-primary {
    background: #fff;
    border-color: #d8e2ee;
    box-shadow: 0 4px 10px rgba(30, 55, 86, .07);
    color: #18345a;
}
@media (max-width: 860px) {
    .palstudio-teacher-shell {
        border-radius: 14px;
        margin: 8px;
        width: calc(100vw - 16px);
    }
    .palstudio-teacher-list-row {
        border-radius: 13px;
        margin-top: 10px;
    }
}

.palstudio-student-start-practice-wrap {
    display: grid;
    justify-items: center;
    padding: 26px 0 30px;
}
.palstudio-student-start-practice-button {
    appearance: none;
    background: #14345e;
    border: 0;
    border-radius: 22px;
    box-shadow: 0 10px 24px rgba(20, 52, 94, .18);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 950;
    letter-spacing: -.03em;
    min-height: 82px;
    min-width: min(100%, 260px);
    padding: 20px 28px;
    text-align: center;
}
.palstudio-student-start-practice-button:hover,
.palstudio-student-start-practice-button:focus-visible {
    background: #102d4f;
    outline: 3px solid rgba(20, 52, 94, .22);
    outline-offset: 3px;
}

/* Student Practice responsive containment fixes */
.palstudio-student-unified-shell,
.palstudio-student-unified-shell * {
    box-sizing: border-box;
}
.palstudio-student-unified-shell {
    max-width: 100%;
    overflow-x: hidden;
}
.palstudio-student-app-header,
.palstudio-student-app-actions,
.palstudio-student-prototype-tabs,
.palstudio-student-unified-content,
.palstudio-student-tab-panel,
.palstudio-student-practice-section,
.palstudio-student-practice-board,
.palstudio-student-summary-card,
.palstudio-student-unified-shell .palstudio-table-wrap {
    min-width: 0;
    max-width: 100%;
}
.palstudio-student-app-header {
    flex-wrap: wrap;
}
.palstudio-student-brand {
    min-width: min(100%, 260px);
}
.palstudio-student-app-actions {
    flex: 1 1 420px;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
}
.palstudio-student-app-actions strong,
.palstudio-student-app-actions a,
.palstudio-student-app-actions button {
    flex: 0 1 auto;
    white-space: nowrap;
}
.palstudio-student-unified-content .palstudio-student-summary-card,
.palstudio-student-summary-card.palstudio-teacher-practice-hero {
    grid-template-columns: minmax(220px, .75fr) minmax(0, 1.45fr);
    width: 100%;
    overflow: hidden;
}
.palstudio-student-summary-card .palstudio-teacher-practice-requirement,
.palstudio-student-summary-card .palstudio-teacher-practice-lifetime,
.palstudio-student-summary-card .palstudio-teacher-practice-week {
    min-width: 0;
    max-width: 100%;
}
.palstudio-student-summary-card .palstudio-teacher-practice-week ul {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    min-width: 0;
    width: 100%;
}
.palstudio-student-summary-card .palstudio-teacher-practice-week li,
.palstudio-student-summary-card .palstudio-teacher-practice-week li strong {
    min-width: 0;
}
.palstudio-student-summary-card .palstudio-teacher-practice-week li strong {
    padding: 0 6px;
}
.palstudio-student-unified-shell .palstudio-table-wrap {
    overflow-x: auto;
}
.palstudio-student-unified-shell .palstudio-members-table,
.palstudio-student-unified-shell .palstudio-student-practices-table {
    table-layout: fixed;
    width: 100%;
    min-width: 0 !important;
}
.palstudio-student-unified-shell .palstudio-members-table th,
.palstudio-student-unified-shell .palstudio-members-table td {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: normal;
}
.palstudio-student-unified-shell .palstudio-student-practices-table th:nth-child(1),
.palstudio-student-unified-shell .palstudio-student-practices-table td:nth-child(1) { width: 112px; }
.palstudio-student-unified-shell .palstudio-student-practices-table th:nth-child(2),
.palstudio-student-unified-shell .palstudio-student-practices-table td:nth-child(2) { width: 190px; }
.palstudio-student-unified-shell .palstudio-student-practices-table th:nth-child(4),
.palstudio-student-unified-shell .palstudio-student-practices-table td:nth-child(4),
.palstudio-student-unified-shell .palstudio-student-practices-table th:nth-child(5),
.palstudio-student-unified-shell .palstudio-student-practices-table td:nth-child(5) { width: 130px; }
@media (max-width: 1120px) {
    .palstudio-student-unified-content .palstudio-student-summary-card,
    .palstudio-student-summary-card.palstudio-teacher-practice-hero {
        grid-template-columns: 1fr;
    }
    .palstudio-student-summary-card .palstudio-teacher-practice-identity {
        min-height: 0;
    }
}
@media (max-width: 860px) {
    .palstudio-student-app-header {
        gap: 10px;
        margin-bottom: 10px;
    }
    .palstudio-student-app-actions {
        align-content: flex-start;
        flex: 0 1 auto;
        gap: 6px 8px;
        justify-content: flex-start;
        width: 100%;
    }
    .palstudio-student-app-actions strong,
    .palstudio-student-app-actions a,
    .palstudio-student-app-actions button {
        min-height: 1.8rem;
        padding: 0.18rem 0.35rem;
    }
    .palstudio-student-summary-card .palstudio-teacher-practice-week ul {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .palstudio-student-unified-shell .palstudio-student-practices-table,
    .palstudio-student-unified-shell .palstudio-student-practices-table thead,
    .palstudio-student-unified-shell .palstudio-student-practices-table tbody,
    .palstudio-student-unified-shell .palstudio-student-practices-table tr,
    .palstudio-student-unified-shell .palstudio-student-practices-table th,
    .palstudio-student-unified-shell .palstudio-student-practices-table td {
        display: block;
        width: 100% !important;
    }
    .palstudio-student-unified-shell .palstudio-student-practices-table thead {
        position: absolute;
        width: 1px !important;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }
    .palstudio-student-unified-shell .palstudio-student-practices-table tr {
        border: 1px solid rgba(82,111,145,.16);
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
        overflow: visible;
    }
    .palstudio-student-unified-shell .palstudio-student-practices-table td {
        display: grid;
        grid-template-columns: 120px minmax(0, 1fr);
        gap: 12px;
        align-items: center;
        border-right: 0 !important;
        justify-items: center;
        text-align: center;
    }
    .palstudio-student-unified-shell .palstudio-student-practices-table td::before {
        color: #637083;
        font-weight: 900;
        justify-self: center;
        text-align: center;
    }
    .palstudio-student-unified-shell .palstudio-student-practices-table td:nth-child(1)::before { content: 'Record'; }
    .palstudio-student-unified-shell .palstudio-student-practices-table td:nth-child(2)::before { content: 'Practice name'; }
    .palstudio-student-unified-shell .palstudio-student-practices-table td:nth-child(3)::before { content: 'Instructions'; }
    .palstudio-student-unified-shell .palstudio-student-practices-table td:nth-child(4)::before { content: 'Video'; }
    .palstudio-student-unified-shell .palstudio-student-practices-table td:nth-child(5)::before { content: 'Image'; }
    .palstudio-student-unified-shell .palstudio-student-practices-table td:nth-child(6)::before { content: 'Practice aids'; }
    .palstudio-student-unified-shell .palstudio-student-practices-table td:nth-child(7)::before { content: 'Status'; }
}

/* Review page media thumbnail previews */
.palstudio-teacher-review-row .palstudio-teacher-preview-tile {
    position: relative;
    overflow: hidden;
    width: min(100%, 156px);
    min-height: 94px;
    aspect-ratio: 16 / 10;
    padding: 0;
    border-radius: 14px;
    background: #e7f2fb;
    border: 1px solid #c9d9e8;
    display: grid;
    place-items: center;
}
.palstudio-teacher-review-row .palstudio-teacher-recording-tile.palstudio-teacher-preview-tile {
    width: min(100%, 184px);
    min-height: 112px;
}
.palstudio-teacher-review-row .palstudio-teacher-preview-tile img,
.palstudio-teacher-review-row .palstudio-teacher-preview-tile canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #fff;
}
.palstudio-teacher-review-row .palstudio-teacher-image-tile.palstudio-teacher-preview-tile img,
.palstudio-teacher-review-row .palstudio-teacher-image-tile.palstudio-teacher-preview-tile canvas {
    object-fit: contain;
    padding: 4px;
}
.palstudio-teacher-review-row .palstudio-teacher-preview-tile strong {
    position: relative;
    z-index: 2;
    align-self: end;
    width: 100%;
    padding: 18px 8px 8px;
    color: #102d4f;
    background: linear-gradient(180deg, rgba(231,242,251,0) 0%, rgba(231,242,251,.94) 62%, rgba(231,242,251,.98) 100%);
    text-shadow: 0 1px 0 rgba(255,255,255,.8);
}
.palstudio-teacher-review-row .palstudio-teacher-video-tile.palstudio-teacher-preview-tile strong,
.palstudio-teacher-review-row .palstudio-teacher-recording-tile.palstudio-teacher-preview-tile strong {
    color: #fff;
    background: linear-gradient(180deg, rgba(11,37,69,0) 0%, rgba(11,37,69,.68) 58%, rgba(11,37,69,.82) 100%);
    text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.palstudio-teacher-play-overlay {
    position: relative;
    z-index: 3;
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: rgba(20,52,94,.92);
    color: #fff;
    box-shadow: 0 8px 18px rgba(0,0,0,.25);
    line-height: 1;
    padding-left: 3px;
}
.palstudio-teacher-review-row .palstudio-teacher-preview-tile:not(:has(img)):not(:has(canvas)) .palstudio-teacher-play-overlay {
    margin-top: 12px;
}
.palstudio-teacher-review-row .palstudio-other-take-thumb.palstudio-teacher-preview-tile {
    width: 150px;
    min-height: 86px;
}
.palstudio-teacher-review-row .palstudio-other-take-thumb.palstudio-teacher-preview-tile strong {
    display: none;
}


/* Teacher mobile practice/list/review cards */
@media (max-width: 860px) {
    body.palstudio-app,
    body.palstudio-app .palstudio-main,
    body.palstudio-app .palstudio-card,
    .palstudio-teacher-content,
    .palstudio-teacher-practice-panel,
    .palstudio-teacher-library-list,
    .palstudio-teacher-review-detail,
    .palstudio-teacher-practice-panel *,
    .palstudio-teacher-library-list *,
    .palstudio-teacher-review-detail * {
        box-sizing: border-box;
        max-width: 100%;
        min-width: 0;
    }
    body.palstudio-app,
    body.palstudio-app .palstudio-main,
    body.palstudio-app .palstudio-card,
    .palstudio-teacher-content,
    .palstudio-teacher-practice-panel,
    .palstudio-teacher-library-list,
    .palstudio-teacher-review-detail,
    .palstudio-teacher-practice-panel .palstudio-teacher-practice-table,
    .palstudio-teacher-library-list .palstudio-teacher-practice-table,
    .palstudio-teacher-review-detail .palstudio-teacher-review-table {
        overflow-x: hidden;
    }
    .palstudio-teacher-practice-panel .palstudio-student-summary-card .palstudio-teacher-practice-week ul {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-width: 100%;
        min-width: 0;
    }
    .palstudio-teacher-practice-panel .palstudio-teacher-practice-table,
    .palstudio-teacher-library-list .palstudio-teacher-practice-table,
    .palstudio-teacher-review-detail .palstudio-teacher-review-table {
        display: grid;
        gap: 0.9rem;
        min-width: 0;
        overflow: hidden;
    }
    .palstudio-teacher-library-list .palstudio-teacher-practice-table,
    .palstudio-teacher-review-detail .palstudio-teacher-review-table {
        border: 0;
        border-radius: 0;
        background: transparent;
    }
    .palstudio-teacher-practice-panel .palstudio-teacher-practice-head,
    .palstudio-teacher-library-list .palstudio-teacher-practice-head,
    .palstudio-teacher-review-detail .palstudio-teacher-review-head {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
    .palstudio-teacher-practice-panel .palstudio-teacher-practice-row,
    .palstudio-teacher-library-list .palstudio-teacher-practice-row,
    .palstudio-teacher-review-detail .palstudio-teacher-review-row {
        display: block;
        width: 100%;
        overflow: hidden;
        padding: 0.9rem;
        border: 1px solid rgba(82,111,145,.16);
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
    }
    .palstudio-teacher-practice-panel .palstudio-teacher-practice-row > [role="cell"],
    .palstudio-teacher-library-list .palstudio-teacher-practice-row > [role="cell"],
    .palstudio-teacher-review-detail .palstudio-teacher-review-row > [role="cell"] {
        display: grid;
        grid-template-columns: 6.25rem minmax(0, 1fr);
        gap: 0.75rem;
        align-items: center;
        justify-items: center;
        padding: 0.75rem 0.65rem;
        border: 1px solid rgba(82, 111, 145, 0.24);
        border-bottom: 0;
        min-width: 0;
        overflow-wrap: normal;
        word-break: normal;
        text-align: center;
    }
    .palstudio-teacher-practice-panel .palstudio-teacher-practice-row > [role="cell"]:last-child,
    .palstudio-teacher-library-list .palstudio-teacher-practice-row > [role="cell"]:last-child,
    .palstudio-teacher-review-detail .palstudio-teacher-review-row > [role="cell"]:last-child {
        border-bottom: 1px solid rgba(82, 111, 145, 0.24);
        padding-bottom: 0.75rem;
    }
    .palstudio-teacher-practice-panel .palstudio-teacher-practice-row > [role="cell"]::before,
    .palstudio-teacher-library-list .palstudio-teacher-practice-row > [role="cell"]::before,
    .palstudio-teacher-review-detail .palstudio-teacher-review-row > [role="cell"]::before {
        color: #637083;
        content: '';
        font-size: 0.72rem;
        font-weight: 900;
        justify-self: start;
        letter-spacing: 0.04em;
        line-height: 1.2;
        text-transform: uppercase;
    }
    .palstudio-teacher-practice-panel .palstudio-teacher-practice-row > [role="cell"] > *,
    .palstudio-teacher-library-list .palstudio-teacher-practice-row > [role="cell"] > *,
    .palstudio-teacher-review-detail .palstudio-teacher-review-row > [role="cell"] > * {
        justify-self: center;
    }
    .palstudio-teacher-practice-panel .palstudio-teacher-practice-row > [role="cell"]:nth-child(1)::before,
    .palstudio-teacher-library-list .palstudio-teacher-practice-row > [role="cell"]:nth-child(1)::before,
    .palstudio-teacher-review-detail .palstudio-teacher-review-row > [role="cell"]:nth-child(1)::before { content: 'Practice'; }
    .palstudio-teacher-practice-panel .palstudio-teacher-practice-row > [role="cell"]:nth-child(2)::before,
    .palstudio-teacher-library-list .palstudio-teacher-practice-row > [role="cell"]:nth-child(2)::before { content: 'Instructions'; }
    .palstudio-teacher-practice-panel .palstudio-teacher-practice-row > [role="cell"]:nth-child(3)::before,
    .palstudio-teacher-library-list .palstudio-teacher-practice-row > [role="cell"]:nth-child(3)::before,
    .palstudio-teacher-review-detail .palstudio-teacher-review-row > [role="cell"]:nth-child(3)::before { content: 'Video'; }
    .palstudio-teacher-practice-panel .palstudio-teacher-practice-row > [role="cell"]:nth-child(4)::before,
    .palstudio-teacher-library-list .palstudio-teacher-practice-row > [role="cell"]:nth-child(4)::before,
    .palstudio-teacher-review-detail .palstudio-teacher-review-row > [role="cell"]:nth-child(4)::before { content: 'Image'; }
    .palstudio-teacher-practice-panel .palstudio-teacher-practice-row > [role="cell"]:nth-child(5)::before,
    .palstudio-teacher-library-list .palstudio-teacher-practice-row > [role="cell"]:nth-child(5)::before,
    .palstudio-teacher-review-detail .palstudio-teacher-review-row > [role="cell"]:nth-child(5)::before { content: 'Practice aids'; }
    .palstudio-teacher-practice-panel .palstudio-teacher-practice-row > [role="cell"]:nth-child(6)::before,
    .palstudio-teacher-library-list .palstudio-teacher-practice-row > [role="cell"]:nth-child(6)::before { content: 'Actions'; }
    .palstudio-teacher-review-detail .palstudio-teacher-review-row > [role="cell"]:nth-child(2)::before { content: 'Feedback'; }
    .palstudio-teacher-review-detail .palstudio-teacher-review-row > [role="cell"]:nth-child(6)::before { content: 'Student recording'; }
    .palstudio-teacher-practice-panel .palstudio-teacher-practice-name-cell {
        grid-template-columns: 6.25rem minmax(0, 1fr) !important;
    }
    .palstudio-teacher-practice-panel .palstudio-teacher-practice-name-cluster {
        align-items: center;
        display: inline-grid;
        grid-template-columns: auto max-content;
        justify-self: center;
        column-gap: 0.75rem;
        max-width: 100%;
        text-align: left;
    }
    .palstudio-teacher-library-list .palstudio-teacher-practice-row > [role="cell"]:first-child {
        align-content: center;
        text-align: center;
    }
    .palstudio-teacher-library-list .palstudio-teacher-practice-row > [role="cell"]:first-child h3,
    .palstudio-teacher-library-list .palstudio-teacher-practice-row > [role="cell"]:first-child p {
        grid-column: 2;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
    .palstudio-teacher-practice-panel .palstudio-teacher-media-tile,
    .palstudio-teacher-library-list .palstudio-teacher-media-tile,
    .palstudio-teacher-review-detail .palstudio-teacher-preview-tile,
    .palstudio-teacher-review-detail .palstudio-teacher-recording-tile {
        width: 122px !important;
        height: 122px !important;
        min-width: 122px !important;
        min-height: 122px !important;
        max-width: 122px !important;
        aspect-ratio: 1 / 1;
        justify-self: center;
    }
    .palstudio-teacher-practice-panel .palstudio-teacher-row-actions,
    .palstudio-teacher-library-list .palstudio-teacher-row-actions {
        display: grid !important;
        grid-template-columns: 1fr;
        justify-content: center;
        justify-items: center;
        place-items: center;
        text-align: center;
    }
    .palstudio-teacher-practice-panel .palstudio-teacher-row-actions form {
        display: grid !important;
        margin: 0;
        width: auto;
    }
    .palstudio-teacher-practice-panel .palstudio-teacher-row-actions form,
    .palstudio-teacher-practice-panel .palstudio-teacher-row-actions .palstudio-teacher-button,
    .palstudio-teacher-library-list .palstudio-teacher-row-actions form,
    .palstudio-teacher-library-list .palstudio-teacher-row-actions .palstudio-teacher-button,
    .palstudio-teacher-review-detail .palstudio-teacher-review-row > [role="cell"]:last-child > :not(template) {
        grid-column: 2;
        justify-self: center;
    }
    .palstudio-teacher-practice-panel .palstudio-teacher-row-actions form {
        justify-items: center;
    }
    .palstudio-teacher-practice-panel .palstudio-teacher-library-aids {
        justify-content: center;
    }
    .palstudio-teacher-review-detail .palstudio-teacher-review-practice {
        align-items: center !important;
        justify-content: center !important;
        text-align: center;
    }
    .palstudio-teacher-review-detail .palstudio-other-takes-button {
        justify-self: center;
        margin-left: auto;
        margin-right: auto;
    }
}
@media (max-width: 420px) {
    .palstudio-teacher-practice-panel .palstudio-student-summary-card .palstudio-teacher-practice-week ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .palstudio-teacher-practice-panel .palstudio-teacher-practice-row > [role="cell"],
    .palstudio-teacher-library-list .palstudio-teacher-practice-row > [role="cell"],
    .palstudio-teacher-review-detail .palstudio-teacher-review-row > [role="cell"],
    .palstudio-teacher-practice-panel .palstudio-teacher-practice-name-cell {
        grid-template-columns: 5.75rem minmax(0, 1fr) !important;
    }
}
/* Student non-prototype alias-only leftovers */
.palstudio-settings-grid .palstudio-input-card,
.palstudio-settings-grid .palstudio-secondary-button {
    width: 100%;
}
.palstudio-email-field { min-width: 0; }
.palstudio-student-legal-readonly-grid .palstudio-input-card { min-height: 42px; }

/* Login page aligned to logged-in PAL Studio app shell */
body.palstudio-login {
    background: #f4f8fc;
}
.palstudio-login-shell {
    box-sizing: border-box;
    min-height: 100vh;
    padding: 24px;
    color: #162033;
    font-family: var(--palstudio-font-family);
}
.palstudio-login-card {
    background: #f4f8fc;
    border: 1px solid #cad6e4;
    border-radius: 18px;
    box-shadow: 0 22px 70px rgba(19, 44, 80, .10);
    box-sizing: border-box;
    margin: 0 auto;
    max-width: 1180px;
    overflow: hidden;
}
.palstudio-login-header {
    align-items: center;
    background: rgba(247, 250, 253, .94);
    border-bottom: 1px solid #d2dce8;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 16px 18px;
}
.palstudio-login-brand {
    align-items: center;
    display: flex;
    gap: 10px;
    min-width: 0;
}
.palstudio-login-brand-mark {
    background:
        radial-gradient(circle at 32% 24%, rgba(255,255,255,.96) 0 8%, transparent 9%),
        radial-gradient(circle at 58% 62%, rgba(151, 216, 246, .38) 0 0, transparent 52%),
        linear-gradient(145deg, #ffffff 0%, #d9f4ff 34%, #9edaf3 72%, #79c2e8 100%);
    border: 3px solid #76bbe4;
    border-radius: 999px;
    box-shadow: 0 10px 20px rgba(120, 164, 189, .22);
    display: inline-block;
    flex: 0 0 auto;
    height: 46px;
    position: relative;
    width: 46px;
}
.palstudio-login-brand-mark::after {
    background: rgba(255, 255, 255, .88);
    border-radius: 999px;
    content: '';
    height: 8px;
    left: 12px;
    position: absolute;
    top: 10px;
    width: 8px;
}
.palstudio-login-brand > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.palstudio-login-brand strong {
    color: #13284a;
    font-size: 1.25rem;
    font-weight: 950;
    letter-spacing: -.03em;
    line-height: 1.1;
}
.palstudio-login-brand span:not(.palstudio-login-brand-mark) {
    color: #3f4c61;
    font-size: .9rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.palstudio-login-language-toggle {
    align-items: center;
    background: #f7f9fc;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    box-shadow: 0 2px 7px rgba(16, 38, 67, .04);
    color: #111827;
    display: inline-flex;
    justify-content: center;
    min-height: 38px;
    min-width: 76px;
    padding: 9px 14px;
    text-align: center;
    text-decoration: none;
}
.palstudio-login-content {
    background: linear-gradient(180deg, #f7fbff 0%, #eef5fb 100%);
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    padding: clamp(24px, 5vw, 58px);
}
.palstudio-login-copy {
    align-self: center;
    max-width: 560px;
}
.palstudio-login-kicker {
    color: #4c5f76;
    font-size: .78rem;
    font-weight: 950;
    letter-spacing: .08em;
    margin: 0 0 12px;
    text-transform: uppercase;
}
.palstudio-login-copy h1 {
    color: #13284a;
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    font-weight: 950;
    letter-spacing: -.06em;
    line-height: .95;
    margin: 0;
}
.palstudio-login-copy p:not(.palstudio-login-kicker) {
    color: #3f4c61;
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 800;
    line-height: 1.45;
    margin: 18px 0 0;
}
.palstudio-login-form-card {
    background: #fff;
    border: 1px solid rgba(190, 201, 217, .9);
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(36, 55, 83, .10);
    padding: 24px;
}
.palstudio-login-form-card form {
    display: grid;
    gap: 14px;
    margin: 0;
}
.palstudio-login-form-card p {
    margin: 0;
}
.palstudio-login-form-card label {
    color: #18345a;
    display: grid;
    font-weight: 900;
    gap: 7px;
}
.palstudio-login-form-card input[type="text"],
.palstudio-login-form-card input[type="password"] {
    background: #f7f9fc;
    border: 1px solid #d8e2ee;
    border-radius: 12px;
    box-sizing: border-box;
    color: #111827;
    font: inherit;
    min-height: 46px;
    padding: 10px 12px;
    width: 100%;
}
.palstudio-login-form-card input:focus-visible {
    border-color: #14345e;
    box-shadow: 0 0 0 3px rgba(20, 52, 94, .16);
    outline: none;
}
.palstudio-login-form-card .login-remember label {
    align-items: center;
    color: #3f4c61;
    display: flex;
    flex-direction: row;
    font-size: .94rem;
    font-weight: 800;
    gap: 8px;
}
.palstudio-login-form-card .login-submit {
    margin-top: 4px;
}
.palstudio-login-form-card input[type="submit"] {
    background: #14345e;
    border: 1px solid #14345e;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(20, 52, 94, .18);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 950;
    min-height: 46px;
    padding: 11px 18px;
    width: 100%;
}
.palstudio-login-form-card input[type="submit"]:hover,
.palstudio-login-form-card input[type="submit"]:focus-visible {
    background: #102d4f;
    outline: 3px solid rgba(20, 52, 94, .22);
    outline-offset: 3px;
}
.palstudio-login-actions {
    justify-content: center;
    margin-top: 16px;
}
.palstudio-login-actions a {
    color: #14345e;
    font-weight: 900;
    text-decoration: none;
}
.palstudio-login-actions a:hover,
.palstudio-login-actions a:focus-visible {
    text-decoration: underline;
}
@media (max-width: 820px) {
    .palstudio-login-shell {
        padding: 8px;
    }
    .palstudio-login-card {
        border-radius: 14px;
    }
    .palstudio-login-header {
        align-items: flex-start;
        flex-direction: column;
    }
    .palstudio-login-brand span:not(.palstudio-login-brand-mark) {
        white-space: normal;
    }
    .palstudio-login-content {
        grid-template-columns: 1fr;
        padding: 22px 18px;
    }
    .palstudio-login-copy h1 {
        font-size: clamp(2rem, 12vw, 3.2rem);
    }
    .palstudio-login-form-card {
        padding: 18px;
    }
}

/* Keep each Plan settings selector beside its own action. */
#palstudio-admin-tab-plans .palstudio-admin-plan-control-row {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 500px;
}
#palstudio-admin-tab-plans .palstudio-admin-plan-control-row select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}
#palstudio-admin-tab-plans .palstudio-admin-plan-control-row .palstudio-button {
    justify-self: start;
    align-self: center;
}
#palstudio-admin-tab-plans .palstudio-admin-plan-control-row a.palstudio-button {
    box-sizing: border-box;
    display: inline-block;
    padding: 1px 6px;
    border: 2px outset ButtonBorder;
    border-radius: 0;
    background: ButtonFace;
    color: ButtonText;
    font: 13.3333px Arial;
    line-height: normal;
    text-align: center;
    text-decoration: none;
}
#palstudio-admin-tab-plans .palstudio-admin-plan-control-row .palstudio-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
