:root {
    color-scheme: light;
    --ink: #1f293b;
    --muted: #5e6b82;
    --line: #e3e8f2;
    --brand: #ff6a2a;
    --brand-strong: #e94b76;
    --brand-alt: #2f7dff;
    --accent-pink: #ec3f8c;
    --accent-orange: #ff7022;
    --accent-cyan: #16b7d7;
    --paper: #ffffff;
    --soft: #fbf8ff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 112, 34, .10), transparent 28%),
        radial-gradient(circle at 88% 10%, rgba(236, 63, 140, .10), transparent 30%),
        linear-gradient(180deg, #fff7fb 0, #f8f9ff 280px, #f7f9fd 100%);
    font-family: Arial, Helvetica, sans-serif;
}

.muted {
    color: var(--muted);
}

.report-metrics-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.shell {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    padding: 24px 0 96px;
}

.hero,
.topbar {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 24px;
    align-items: center;
    margin-bottom: 18px;
}

.hero-copy {
    padding: 28px 0;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent-pink);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

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

h1 {
    font-size: clamp(30px, 5vw, 54px);
    line-height: 1.02;
}

.hero p:not(.eyebrow) {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.55;
}

.video-panel {
    aspect-ratio: 16 / 9;
    background: #111;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(24, 32, 42, .16);
}

.video-panel iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.student-panel,
.exercise-card,
.notice,
.table-wrap {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.student-panel {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 14px;
    align-items: end;
    padding: 16px;
    margin-bottom: 18px;
}

label span,
.student-panel label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cbd3dc;
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--ink);
    font: inherit;
    background: #fff;
}

select,
textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cbd3dc;
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--ink);
    font: inherit;
    background: #fff;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.link-button {
    border: 0;
    background: transparent;
    color: var(--primary);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.profile-save-strip {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border: 1px solid #e1e7ef;
    border-radius: 14px;
    background: #f8fafc;
}

.profile-save-strip strong,
.profile-save-strip span {
    display: block;
}

.profile-save-strip span {
    color: var(--muted);
    font-size: 0.94rem;
}

.profile-save-strip .button {
    flex: 0 0 auto;
}

.profile-save-strip-bottom {
    background: transparent;
}

input:focus {
    outline: 3px solid rgba(255, 106, 42, .18);
    border-color: var(--brand);
}

.progress {
    color: var(--muted);
    font-size: 14px;
}

.preview-banner {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #f0c36a;
    border-radius: 8px;
    color: #4f3510;
    background: #fff7df;
}

.preview-banner span {
    color: #6b4b18;
}

.validator-shell {
    max-width: 1500px;
}

.validator-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 16px;
}

.validator-toolbar form {
    display: grid;
    gap: 6px;
}

.validator-summary,
.validator-side,
.validator-stage,
.validator-answers {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.validator-summary {
    min-width: 170px;
    padding: 12px;
}

.validator-summary strong {
    display: block;
    font-size: 28px;
}

.validator-summary span,
.validator-answers small {
    color: var(--muted);
    font-size: 14px;
}

.validator-resource-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.validator-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.validator-side {
    position: sticky;
    top: 14px;
    display: grid;
    gap: 14px;
    padding: 14px;
}

.validator-feedback {
    display: block;
    min-height: 22px;
    margin-top: 6px;
    color: var(--muted);
    font-weight: 800;
}

.validator-feedback.ok {
    color: #0f7a45;
}

.validator-feedback.bad {
    color: #b4233c;
}

.validator-answers {
    display: grid;
    gap: 6px;
    padding: 12px;
    background: #f8fafc;
}

.validator-answers code {
    white-space: normal;
    word-break: break-word;
    color: #101828;
    font-weight: 800;
}

.validator-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.validator-list {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

.validator-list button {
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #344054;
    background: #fff;
    font-weight: 800;
    cursor: pointer;
}

.validator-list button.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-pink));
}

.validator-stage {
    overflow: auto;
    padding: 12px;
    background: #f8fafc;
}

.validator-page {
    position: relative;
    width: min(100%, 1120px);
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.validator-page img {
    display: block;
    width: 100%;
    height: auto;
}

.validator-fallback-sheet {
    display: grid;
    gap: 10px;
    padding: 28px;
    border-bottom: 1px solid var(--line);
}

.validator-fallback-sheet h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.35;
}

.validator-fallback-controls {
    display: grid;
    gap: 12px;
    padding: 24px 28px 28px;
}

.validator-fallback-controls label {
    display: grid;
    grid-template-columns: minmax(120px, 240px) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.validator-fallback-controls label:has(input[type="radio"]) {
    grid-template-columns: auto minmax(0, 1fr);
}

.validator-fallback-controls .validator-input {
    position: static;
    width: 100%;
    min-height: 40px;
    font-size: 16px;
}

.validator-input {
    box-sizing: border-box;
    position: absolute;
    min-height: 0;
    padding: 0;
    border: 2px solid rgba(255, 106, 42, .75);
    border-radius: 1px;
    color: transparent;
    background: transparent;
    font-size: clamp(8px, .9vw, 12px);
    font-weight: 700;
    line-height: 1;
    text-align: center;
    caret-color: transparent;
    text-shadow: 0 0 0 #111820;
    -webkit-text-fill-color: transparent;
}

.validator-input:focus {
    caret-color: transparent;
    color: transparent;
    text-shadow: 0 0 0 #111820;
    -webkit-text-fill-color: transparent;
}

.validator-choice {
    box-sizing: border-box;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 106, 42, .65);
    border-radius: 8px;
    background: rgba(255, 247, 223, .28);
    cursor: pointer;
}

.validator-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.validator-choice span {
    min-width: 30px;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(17, 24, 39, .78);
    font-weight: 900;
}

.validator-choice-marker {
    border-color: rgba(255, 106, 42, .85);
    border-radius: 999px;
    background: rgba(255, 255, 255, .02);
}

.validator-choice-marker-square {
    border-radius: 3px;
}

.validator-choice-marker span {
    min-width: 100%;
    min-height: 100%;
    color: transparent;
    background: transparent;
    font-size: 0;
}

.validator-choice-radio-group span {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    border-radius: 3px;
    color: transparent;
    background: transparent;
    font-size: 0;
    box-shadow: none;
}

.validator-choice-radio-group {
    border-radius: 3px;
    background: rgba(255, 247, 223, .12);
}

.validator-choice-card span {
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 32px;
    min-height: 32px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .2);
}

.validator-choice-card,
.validator-choice-no-label {
    border-radius: 3px;
}

.validator-choice-tall-card span {
    top: -20px;
    min-width: 24px;
    min-height: 24px;
    font-size: 12px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .18);
}

.validator-choice-text span {
    position: absolute;
    width: 0;
    height: 0;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    color: transparent;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.validator-choice-no-label span {
    width: 0;
    height: 0;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    color: transparent;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.validator-choice:has(input:checked) {
    border-color: #14b8a6;
    background: rgba(20, 184, 166, .18);
}

.resource-bank-shell {
    max-width: 1480px;
}

.resource-bank-grid {
    display: grid;
    grid-template-columns: 390px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.resource-bank-panel,
.resource-bank-detail {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.resource-bank-panel {
    display: grid;
    gap: 14px;
    padding: 14px;
}

.resource-bank-filters {
    display: grid;
    gap: 10px;
}

.resource-bank-count {
    padding: 12px;
    border-radius: 8px;
    background: #f8fafc;
}

.resource-bank-count strong {
    display: block;
    font-size: 30px;
}

.resource-bank-count span {
    color: var(--muted);
    font-size: 14px;
}

.resource-bank-list {
    display: grid;
    gap: 8px;
}

.resource-bank-list a {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    text-decoration: none;
}

.resource-bank-list a.active {
    border-color: rgba(255, 106, 42, .65);
    background: #fff7df;
}

.resource-bank-list span {
    color: var(--muted);
    font-size: 13px;
}

.resource-bank-pages {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.resource-bank-pages a {
    min-width: 34px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    font-weight: 800;
    text-decoration: none;
}

.resource-bank-pages a.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-pink));
}

.resource-bank-detail {
    display: grid;
    gap: 16px;
    padding: 20px;
}

.resource-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.resource-meta-grid div {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.resource-meta-grid span {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.resource-meta-grid strong {
    font-size: 14px;
}

.resource-downloads {
    margin: 0;
}

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

.exercise-card {
    padding: 12px;
}

.worksheet-card {
    overflow-x: auto;
    overflow-y: hidden;
    display: none;
}

.worksheet-card.active {
    display: block;
}

.exercise-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    min-height: 38px;
    padding: 0 4px 10px;
}

.pdf-stage {
    position: relative;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.pdf-stage img {
    display: block;
    width: 100%;
    height: auto;
}

.worksheet-input {
    position: absolute;
    min-height: 0;
    padding: 0 4px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: transparent;
    background: transparent;
    box-shadow: none;
    font-size: clamp(12px, 1.65vw, 20px);
    font-weight: 800;
    line-height: 1;
    text-align: center;
    overflow: hidden;
    caret-color: transparent;
    text-shadow: 0 0 0 #111820;
    -webkit-text-fill-color: transparent;
}

.field-input,
.digit-input,
.final-input {
    padding: 0 2px;
}

.worksheet-input:focus {
    outline: 2px solid rgba(50, 179, 137, .75);
    background: rgba(255, 255, 255, .5);
    caret-color: transparent;
    color: transparent;
    text-shadow: 0 0 0 #111820;
    -webkit-text-fill-color: transparent;
}

.digit-input {
    padding: 0;
}

.worksheet-choice {
    box-sizing: border-box;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid transparent;
    border-radius: 8px;
    background: rgba(255, 255, 255, .03);
    cursor: pointer;
}

.worksheet-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 1px;
    opacity: 0;
}

.worksheet-choice span {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    border: 2px solid transparent;
    border-radius: 50%;
    color: transparent;
    background: transparent;
}

.worksheet-choice:hover,
.worksheet-choice:focus-within {
    border-color: rgba(47, 125, 111, .22);
    background: rgba(47, 125, 111, .04);
}

.worksheet-choice input:checked + span {
    border-color: #32b389;
    color: #fff;
    background: #32b389;
}

.worksheet-choice-card input:checked + span {
    border-color: transparent;
    color: transparent;
    background: transparent;
}

.worksheet-choice-card:has(input:checked) {
    border-color: #32b389;
    background: rgba(50, 179, 137, .18);
}

.worksheet-choice-card {
    border-radius: 3px;
}

.worksheet-panel {
    position: absolute;
    width: min(42%, 440px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border: 2px solid rgba(47, 125, 111, .28);
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 10px 24px rgba(17, 24, 39, .14);
}

.worksheet-panel label span {
    margin-bottom: 3px;
    color: #39424e;
    font-size: 11px;
}

.worksheet-panel input {
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid #bfc8d1;
    color: transparent;
    font-weight: 800;
    text-align: center;
    caret-color: transparent;
    text-shadow: 0 0 0 #111820;
    -webkit-text-fill-color: transparent;
}

.worksheet-panel input:focus {
    caret-color: transparent;
    color: transparent;
    text-shadow: 0 0 0 #111820;
    -webkit-text-fill-color: transparent;
}

.feedback {
    min-height: 20px;
    margin: 0;
    font-weight: 700;
}

.exercise-card.correct {
    border-color: #76d2a5;
    background: #f0fff7;
}

.worksheet-card.locked .worksheet-input,
.worksheet-card.locked .worksheet-panel input {
    color: transparent;
    text-shadow: 0 0 0 #0f5132;
    -webkit-text-fill-color: transparent;
    cursor: not-allowed;
}

.worksheet-card.locked .worksheet-choice {
    cursor: not-allowed;
}

.exercise-card.incorrect {
    border-color: #f1a0aa;
    background: #fff6f7;
}

.actionbar {
    position: fixed;
    left: 50%;
    bottom: 14px;
    width: min(1180px, calc(100% - 28px));
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 12px 30px rgba(24, 32, 42, .16);
    backdrop-filter: blur(10px);
}

.actionbar-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.question-nav {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin: 16px 0 86px;
}

.button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    padding: 0 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-pink));
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(236, 63, 140, .20);
}

.button:hover {
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
}

.button.secondary {
    border: 1px solid var(--line);
    color: #1f293b;
    background: #fff;
    box-shadow: none;
}

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

#saveMessage {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 14px;
}

.notice {
    padding: 18px;
}

.notice.error {
    border-color: #f1a0aa;
    background: #fff6f7;
}

.notice.success {
    border-color: #76d2a5;
    background: #f0fff7;
}

.auth-page {
    background:
        radial-gradient(circle at 85% 15%, rgba(236, 63, 140, .10), transparent 28%),
        linear-gradient(90deg, #f8fbff 0%, #fff8fb 100%);
}

.auth-shell {
    width: min(430px, calc(100% - 28px));
    min-height: 100vh;
    display: grid;
    align-items: center;
    margin: 0 auto;
    padding: clamp(20px, 4vh, 40px) 0;
}

.auth-shell-split {
    width: 100%;
    max-width: none;
    grid-template-columns: minmax(0, 1.05fr) minmax(390px, .95fr);
    gap: 0;
    padding: 0;
}

.auth-visual {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 16% 18%, rgba(255, 255, 255, .12), transparent 22%),
        linear-gradient(145deg, #080b2d 0%, #131742 100%);
}

.auth-visual img {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    display: block;
    object-fit: cover;
}

.auth-visual-fallback {
    isolation: isolate;
    color: #fff;
}

.auth-visual-pattern {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background:
        radial-gradient(circle at 8% 16%, transparent 0 132px, rgba(255, 255, 255, .55) 133px 134px, transparent 135px),
        radial-gradient(circle at 91% 9%, transparent 0 112px, rgba(255, 255, 255, .45) 113px 114px, transparent 115px);
}

.math-icon,
.math-dot {
    position: absolute;
    display: grid;
    place-items: center;
}

.math-icon {
    width: 56px;
    height: 56px;
    border: 3px solid currentColor;
    border-radius: 8px;
    font-size: 32px;
    font-weight: 900;
}

.math-icon-one {
    top: 18%;
    left: 9%;
    color: #19bfd3;
}

.math-icon-two {
    top: 12%;
    right: 16%;
    color: var(--accent-pink);
    transform: rotate(-12deg);
}

.math-icon-three {
    right: 8%;
    bottom: 20%;
    color: #ffc247;
    transform: rotate(10deg);
}

.math-dot {
    width: 13px;
    height: 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
}

.math-dot-one {
    left: 14%;
    bottom: 22%;
}

.math-dot-two {
    right: 23%;
    bottom: 10%;
}

.math-dot-three {
    left: 48%;
    top: 32%;
}

.auth-visual-copy {
    width: min(520px, calc(100% - 72px));
    display: grid;
    gap: 18px;
    justify-items: center;
    text-align: center;
}

.auth-visual-copy strong {
    color: #56d5d6;
    font-size: clamp(2.1rem, 5vw, 3.25rem);
    line-height: 1;
    letter-spacing: .02em;
}

.auth-visual-copy span {
    max-width: 24ch;
    color: #fff;
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 800;
    line-height: 1.25;
}

.auth-visual-shade {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(6, 10, 38, .08), rgba(6, 10, 38, .20)),
        radial-gradient(circle at 50% 42%, transparent 0%, rgba(6, 10, 38, .10) 100%);
}

.auth-login-panel {
    width: 100%;
    display: grid;
    align-items: center;
    justify-items: center;
}

.auth-shell-split .auth-login-panel {
    min-height: 100vh;
    padding: clamp(28px, 6vw, 72px);
    background: linear-gradient(180deg, rgba(255, 253, 239, .88), rgba(255, 248, 252, .92));
}

.auth-card,
.panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.auth-card {
    width: min(100%, 420px);
    gap: 12px;
    padding: clamp(24px, 4vw, 34px);
    border-color: rgba(227, 232, 242, .84);
    box-shadow: 0 18px 42px rgba(31, 41, 59, .11);
}

.auth-brand {
    display: grid;
    gap: 7px;
    justify-items: center;
    margin-bottom: 8px;
}

.auth-logo {
    max-width: 88px;
    max-height: 62px;
    justify-self: center;
    object-fit: contain;
}

.auth-institution,
.auth-subtitle {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
    text-align: center;
}

.auth-institution {
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.auth-platform {
    font-size: clamp(1.38rem, 2.8vw, 1.78rem);
    line-height: 1.1;
    text-align: center;
}

.auth-subtitle {
    max-width: 34ch;
    justify-self: center;
    font-size: .92rem;
}

.auth-card h1,
.auth-card h2,
.panel h2,
.table-wrap h2,
.month-column h2,
.month-column h3 {
    margin: 0;
}

.auth-form-heading {
    display: grid;
    gap: 4px;
    margin-top: 4px;
}

.auth-form-heading h2 {
    font-size: clamp(1.85rem, 4vw, 2.28rem);
    line-height: 1.1;
}

.auth-card .eyebrow {
    margin: 0;
    font-size: 11px;
}

.auth-card label {
    color: var(--ink);
    font-size: .94rem;
    font-weight: 700;
}

.auth-card input {
    min-height: 44px;
    margin-top: 6px;
    border-color: #d3dbea;
    background: rgba(255, 255, 255, .92);
}

.auth-card .button {
    min-height: 48px;
    margin-top: 6px;
    font-size: 1rem;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.auth-card .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(236, 63, 140, .18);
}

.auth-card .plain-link {
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.35;
}

.auth-links {
    display: grid;
    gap: 8px;
    justify-items: start;
    margin-top: 2px;
}

.plain-link {
    color: var(--accent-orange);
    font-weight: 700;
    text-decoration: none;
}

.panel-grid {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: 16px;
    margin-bottom: 16px;
}

.section-head,
.inline-form,
.header-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: end;
}

.inline-form label {
    flex: 1;
}

.classroom-card {
    margin-bottom: 18px;
}

.app-banner,
.classroom-banner {
    padding: 28px;
    border-radius: 8px;
    color: #fff;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, .20), transparent 18%),
        linear-gradient(135deg, #273653 0%, #ff7022 48%, #ec3f8c 100%);
    box-shadow: 0 18px 42px rgba(236, 63, 140, .18);
}

.app-banner .eyebrow,
.app-banner p,
.classroom-banner a,
.classroom-banner span,
.classroom-banner strong {
    color: rgba(255, 255, 255, .88);
}

.classroom-banner {
    display: grid;
    gap: 18px;
    margin-bottom: 22px;
}

.classroom-banner nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.classroom-teacher {
    margin: -10px 0 0;
    color: rgba(255, 255, 255, .88);
    font-weight: 800;
}

.classroom-banner a,
.back-link {
    font-weight: 800;
    text-decoration: none;
}

.back-link {
    display: inline-flex;
    margin-bottom: 18px;
    color: var(--accent-orange);
}

.classroom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.ap-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(31, 41, 59, .09);
}

.classroom-tile {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.classroom-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}

.classroom-grade {
    min-height: 64px;
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, #273653, #ff7022 55%, #ec3f8c);
    font-size: 28px;
    font-weight: 900;
}

.classroom-manage {
    position: relative;
}

.classroom-manage summary {
    list-style: none;
}

.classroom-manage summary::-webkit-details-marker {
    display: none;
}

.classroom-edit-toggle {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 8px 18px rgba(31, 41, 59, .08);
    cursor: pointer;
    font-size: 20px;
    font-weight: 900;
}

.classroom-edit-toggle:hover,
.classroom-manage[open] .classroom-edit-toggle {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #ff7022, #ec3f8c);
}

.classroom-manage:not([open]) .classroom-manage-panel {
    display: none;
}

.classroom-manage-panel {
    position: absolute;
    z-index: 10;
    top: calc(100% + 8px);
    right: 0;
    width: min(520px, calc(100vw - 40px));
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(31, 41, 59, .18);
}

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

.classroom-count {
    display: grid;
    justify-items: center;
    color: var(--muted);
}

.classroom-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    text-align: center;
}

.classroom-stats div {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #fff, #fff7fb);
}

.classroom-count strong {
    color: var(--ink);
    font-size: 24px;
}

.classroom-count span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
}

.tile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.classroom-edit-form {
    display: grid;
    grid-template-columns: .7fr .8fr minmax(170px, 1fr);
    gap: 10px;
    align-items: end;
}

.classroom-edit-form label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.classroom-edit-form input,
.classroom-edit-form select {
    margin-top: 4px;
}

.classroom-edit-form .button {
    grid-column: 1 / -1;
}

.create-classroom,
.schedule-form,
.assign-card,
.student-create-form,
.student-edit-form,
.report-filter-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
}

.progress-banner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 220px));
    gap: 14px;
    margin-bottom: 18px;
}

.progress-banner div {
    padding: 18px;
    border-radius: 8px;
    color: #fff;
    background: #2f7d6f;
}

.progress-banner strong {
    display: block;
    font-size: 36px;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.option-card {
    min-height: 150px;
    display: grid;
    place-items: center;
    padding: 18px;
    border-radius: 8px;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
}

.option-blue {
    background: #3e7cb1;
}

.option-red {
    background: #d94f61;
}

.option-yellow {
    background: #d89a27;
}

.month-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 18px;
}

.month-tabs a {
    flex: 0 1 auto;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #273653;
    background: #fff;
    font-weight: 800;
    text-decoration: none;
}

.month-tabs a.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-pink));
}

.program-card,
.resource-detail {
    display: grid;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.resource-detail {
    max-width: 900px;
}

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

.download-list a {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--brand-strong);
    font-weight: 800;
    text-decoration: none;
}

.schedule-row td {
    background: #f7fafc;
}

.schedule-form {
    grid-template-columns: minmax(260px, 2fr) .8fr .7fr 1fr 1fr .7fr 1fr auto;
    align-items: end;
}

.schedule-form label,
.assign-card label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.schedule-form input,
.schedule-form select,
.assign-card input,
.assign-card select {
    margin-top: 4px;
}

.assign-card {
    grid-template-columns: 1fr;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7fafc;
}

.assign-fields {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) minmax(110px, .8fr) minmax(80px, .6fr) minmax(140px, 1fr) minmax(140px, 1fr) minmax(90px, .7fr) minmax(150px, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.assign-card h2,
.assign-card p {
    margin: 0;
}

.assign-card-head,
.activity-bank-list {
    grid-column: 1 / -1;
}

.assign-card-head {
    display: block;
}

.assign-card-head p {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.activity-bank-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 126px;
    overflow: auto;
    padding-top: 2px;
}

.activity-bank-list span {
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #273653;
    background: #fff;
    font-size: 12px;
    font-weight: 800;
}

.activity-bank-list small {
    color: var(--muted);
    font-weight: 700;
}

.student-create-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.student-edit-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
}

.student-create-form .button,
.student-edit-form .button {
    grid-column: 1 / -1;
    justify-self: start;
}

.student-create-form .import-help {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.student-create-form .import-help .button {
    grid-column: auto;
}

.student-create-form .import-help .row-hint {
    margin: 0;
    flex: 1 1 320px;
}

.student-enroll-search {
    display: grid;
    gap: 12px;
    max-width: 760px;
}

.student-enroll-search label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.student-enroll-search input[type="search"] {
    margin-top: 6px;
}

.student-search-results {
    display: grid;
    gap: 8px;
}

.student-search-item,
.student-search-empty {
    border: 1px solid rgba(96, 105, 123, 0.22);
    border-radius: 10px;
    background: #fff;
    padding: 12px 14px;
    text-align: left;
}

.student-search-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    cursor: pointer;
}

.student-search-item strong {
    color: var(--ink);
}

.student-search-item small {
    color: var(--muted);
    font-weight: 700;
}

.student-search-item span {
    align-self: center;
    border-radius: 999px;
    background: rgba(74, 222, 128, 0.16);
    color: #167443;
    font-size: 12px;
    font-weight: 900;
    padding: 4px 8px;
}

.student-search-item:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.student-search-item:disabled span {
    background: rgba(100, 116, 139, 0.15);
    color: var(--muted);
}

.student-search-item.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.12);
}

.student-search-empty {
    color: var(--muted);
    font-weight: 800;
}

.bulk-enroll-summary {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 14px 0;
}

.bulk-enroll-summary div {
    min-width: 170px;
    border: 1px solid rgba(96, 105, 123, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.86);
    padding: 12px 14px;
}

.bulk-enroll-summary strong {
    display: block;
    color: var(--ink);
    font-size: 26px;
    line-height: 1;
}

.bulk-enroll-summary span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.student-edit-form label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.student-edit-form input,
.student-edit-form select {
    margin-top: 4px;
}

.student-edit-open {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--accent-orange);
    background: #fff;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: 0.2s ease;
}

.student-edit-open:hover,
.student-edit-open:focus-visible {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #ff7022, #ec3f8c);
}

.student-edit-dialog {
    width: min(860px, calc(100vw - 32px));
    border: 0;
    border-radius: 8px;
    padding: 0;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 24px 80px rgba(14, 18, 32, 0.25);
}

.student-edit-dialog::backdrop {
    background: rgba(19, 24, 34, 0.52);
}

.student-edit-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}

.student-edit-dialog-head h3 {
    margin: 0;
}

.student-edit-dialog .student-edit-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 18px;
}

.student-edit-dialog .row-hint {
    margin: 0;
    padding: 0 18px 18px;
}

.student-edit-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.student-edit-close:hover,
.student-edit-close:focus-visible {
    color: var(--ink);
    border-color: var(--ink);
}

.report-filter-form {
    grid-template-columns: 1fr 1.4fr auto auto;
}

.attempt-danger-panel {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-end;
    margin: 18px 0;
    padding: 18px;
    border: 1px solid #f1b5b0;
    border-radius: 8px;
    background: #fff5f4;
}

.attempt-danger-panel h2 {
    margin: 0 0 6px;
}

.attempt-danger-panel p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
}

.attempt-danger-panel form,
.attempt-delete-form {
    display: grid;
    gap: 10px;
}

.attempt-danger-panel label,
.attempt-delete-form label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.attempt-danger-panel input,
.attempt-delete-form input {
    margin-top: 4px;
}

.attempt-delete-dialog {
    width: min(560px, calc(100vw - 32px));
}

.attempt-delete-form {
    padding: 18px;
}

.attempt-delete-form p {
    margin: 0;
    color: var(--muted);
}

.credentials-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid #76d2a5;
    border-radius: 8px;
    background: #f0fff7;
}

.credentials-card h2,
.credentials-card p {
    margin: 0;
}

.credentials-card p {
    margin-top: 6px;
    color: var(--muted);
}

.credentials-card dl {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

.credentials-card dl div {
    min-width: 180px;
    padding: 10px 12px;
    border: 1px solid #bdebd2;
    border-radius: 8px;
    background: #fff;
}

.credentials-card dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.credentials-card dd {
    margin: 4px 0 0;
    color: var(--accent-pink);
    font-size: 20px;
    font-weight: 900;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.month-column {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 120px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f9fbfd;
}

.activity-pill,
.student-activity {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid #d7dee7;
    border-radius: 8px;
    background: #fff;
}

.activity-pill span,
.student-activity h3 {
    font-weight: 800;
}

.student-activity p {
    margin: 0;
    color: var(--muted);
}

.student-hero {
    grid-template-columns: minmax(0, 1fr) auto;
}

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

.student-summary article {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(31, 41, 59, .08);
}

.student-summary strong {
    display: block;
    color: var(--accent-orange);
    font-size: 30px;
}

.student-summary span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.student-activity-board {
    display: grid;
    gap: 18px;
}

.gamification-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.gamification-card h2,
.gamification-card p {
    margin: 0;
}

.gamification-badge {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-pink));
    font-size: 34px;
    font-weight: 900;
}

.gamification-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.gamification-summary,
.mission-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.gamification-summary article,
.mission-strip article {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.gamification-summary span,
.mission-strip span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.gamification-summary strong,
.mission-strip strong {
    display: block;
    margin-top: 4px;
    font-size: 24px;
}

.mission-strip p {
    margin: 6px 0 0;
    color: var(--muted);
}

.manual-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.manual-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.manual-card h2 {
    margin: 0 0 8px;
}

.manual-card p {
    margin: 0;
    color: var(--muted);
}

.challenge-board {
    display: grid;
    gap: 16px;
    max-width: 680px;
    margin: 0 auto;
}

.challenge-score {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-weight: 900;
}

.tug-stage {
    display: grid;
    grid-template-columns: 170px minmax(220px, 1fr) 170px;
    gap: 12px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.tug-team {
    display: grid;
    gap: 4px;
    min-height: 92px;
    align-content: center;
    padding: 12px;
    border-radius: 8px;
    color: #fff;
    text-align: center;
}

.tug-team-left {
    background: linear-gradient(135deg, #334155, #64748b);
}

.tug-team-right {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-pink));
}

.tug-team span {
    font-size: 12px;
    font-weight: 800;
}

.tug-lane {
    position: relative;
    min-height: 104px;
    overflow: hidden;
    border: 1px dashed #c9d2df;
    border-radius: 8px;
    background: linear-gradient(90deg, #eef2f7 0 49%, #fff 49% 51%, #fff1f2 51% 100%);
}

.tug-center {
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 50%;
    border-left: 2px dashed #94a3b8;
}

.tug-rope {
    position: absolute;
    top: 48px;
    left: calc(50% - 150px);
    width: 300px;
    height: 8px;
    border-radius: 999px;
    background: repeating-linear-gradient(90deg, #7c4a1d 0 14px, #b77938 14px 28px);
    transition: transform 0.22s ease;
}

.tug-knot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    border: 4px solid #f97316;
    border-radius: 999px;
    background: #fff;
    transform: translate(-50%, -50%);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
}

.challenge-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.challenge-card p,
.challenge-card h2 {
    margin: 0;
}

.challenge-card h2 {
    font-size: 42px;
}

.challenge-card input {
    min-height: 56px;
    text-align: center;
    font-size: 30px;
    font-weight: 900;
}

.challenge-keypad {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.challenge-keypad button {
    min-height: 54px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
}

.challenge-keypad button:hover {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-pink));
}

.duel-board {
    display: grid;
    gap: 16px;
    max-width: 880px;
    margin: 0 auto;
}

.duel-scoreboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
}

.duel-player,
.duel-clock {
    display: grid;
    gap: 8px;
    align-content: center;
    min-height: 152px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    text-align: center;
    box-shadow: 0 16px 34px rgba(31, 41, 59, .08);
}

.duel-player.is-active {
    border-color: #f97316;
    box-shadow: 0 18px 42px rgba(249, 115, 22, .18);
}

.duel-player-avatar {
    width: 70px;
    height: 82px;
    object-fit: contain;
    justify-self: center;
    filter: drop-shadow(0 10px 12px rgba(15, 23, 42, .16));
}

.duel-player label {
    display: grid;
    gap: 6px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.duel-player input {
    width: 100%;
    min-height: 42px;
    text-align: center;
    font-size: 17px;
    font-weight: 900;
}

.duel-player strong {
    font-size: 34px;
    line-height: 1;
}

.duel-player span,
.duel-clock span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.duel-clock strong {
    font-size: 28px;
}

.duel-arena {
    display: grid;
    gap: 16px;
}

.duel-settings {
    display: flex;
    justify-content: center;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(31, 41, 59, .07);
}

.duel-settings label {
    display: grid;
    gap: 6px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.duel-settings input {
    width: 118px;
    min-height: 42px;
    text-align: center;
    font-size: 18px;
    font-weight: 900;
}

.duel-settings span {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid #fde0cf;
    border-radius: 8px;
    background: #fff7ed;
    color: #9a3412;
    font-weight: 900;
}

.duel-audio-controls {
    display: inline-flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
}

.duel-audio-controls .button {
    min-height: 42px;
    padding-block: 0;
}

.duel-audio-controls label {
    min-width: 136px;
}

.duel-audio-controls input[type="range"] {
    width: 136px;
    min-height: 42px;
    accent-color: #9f1239;
}

.duel-character-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: end;
    min-height: 158px;
    padding: 8px 22px 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fafc, #fff);
}

.duel-character-stage img {
    width: min(130px, 38vw);
    height: 154px;
    object-fit: contain;
    align-self: end;
    filter: drop-shadow(0 18px 16px rgba(15, 23, 42, .18));
}

.duel-character-stage img.is-left-side {
    transform: scaleX(-1);
}

.duel-character-stage img:first-child {
    justify-self: start;
}

.duel-character-stage img:last-child {
    justify-self: end;
}

.duel-track {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 92px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.duel-track::after {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 50%;
    border-left: 2px dashed #94a3b8;
}

.duel-half-left {
    background: linear-gradient(135deg, rgba(59, 130, 246, .16), rgba(14, 165, 233, .08));
}

.duel-half-right {
    background: linear-gradient(135deg, rgba(249, 115, 22, .16), rgba(244, 63, 94, .08));
}

.duel-token {
    position: absolute;
    top: calc(50% - 24px);
    left: calc(50% - 24px);
    z-index: 1;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 3px solid #fff;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    transition: transform .22s ease;
    box-shadow: 0 14px 26px rgba(15, 23, 42, .26);
}

.duel-card {
    max-width: 620px;
    width: 100%;
    margin: 0 auto;
}

.duel-actions {
    display: flex;
    order: -1;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 760px) {
    .duel-scoreboard {
        grid-template-columns: 1fr;
    }

    .duel-character-stage {
        min-height: 138px;
        padding-inline: 12px;
    }

    .duel-character-stage img {
        height: 132px;
    }
}

.student-month-section {
    display: grid;
    gap: 12px;
}

.student-month-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: end;
    padding-bottom: 6px;
    border-bottom: 2px solid #ffe0d2;
}

.student-month-head span {
    color: var(--muted);
    font-weight: 800;
}

.student-activity-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 12px;
}

.student-activity {
    align-content: start;
    gap: 14px;
    padding: 16px;
    border-color: #dbe3ea;
    box-shadow: 0 14px 32px rgba(31, 41, 59, .08);
}

.student-activity-main {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
}

.student-activity h3 {
    margin-top: 8px;
    line-height: 1.2;
}

.activity-status {
    display: inline-flex;
    width: max-content;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.activity-status.open {
    color: #9a3f00;
    background: #fff0df;
}

.activity-status.closed {
    color: #3f4752;
    background: #e8edf3;
}

.activity-meta-row {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
}

.activity-action {
    width: 100%;
}

.score-badge {
    width: max-content;
    padding: 5px 8px;
    border-radius: 999px;
    color: #0d646f;
    background: #dcf8ff;
    font-size: 13px;
    font-weight: 800;
}

.score-badge.pending {
    color: #60470c;
    background: #fff2cc;
}

.status-badge {
    display: inline-flex;
    width: max-content;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.status-draft {
    color: #60470c;
    background: #fff2cc;
}

.status-enabled {
    color: #0d646f;
    background: #dcf8ff;
}

.status-disabled {
    color: #3f4752;
    background: #e8edf3;
}

.status-retired {
    color: #842029;
    background: #f8d7da;
}

.assignment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.teacher-pacing-panel {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7fafc;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 16px;
    align-items: end;
}

.teacher-pacing-panel h2,
.teacher-pacing-panel p {
    margin: 0;
}

.teacher-pacing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: end;
}

.teacher-pacing-actions form {
    display: flex;
    gap: 8px;
    align-items: end;
}

.teacher-pacing-actions select {
    min-height: 44px;
}

.resource-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.live-class-hero {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 150px;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.live-class-hero h1,
.live-class-hero p {
    margin: 0;
}

.live-question-meter {
    min-height: 136px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-pink));
    color: #fff;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 14px;
}

.live-question-meter span,
.live-question-meter small {
    font-weight: 800;
}

.live-question-meter strong {
    font-size: 56px;
    line-height: 1;
}

.live-class-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 12px;
    margin: 14px 0;
}

.live-class-stats article {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.live-class-stats strong {
    display: block;
    font-size: 30px;
}

.live-class-stats span {
    color: var(--muted);
    font-weight: 800;
}

.live-control-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7fafc;
    margin-bottom: 16px;
}

.live-control-panel form {
    display: flex;
    gap: 8px;
    align-items: end;
}

.live-control-panel label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.live-control-panel input,
.live-control-panel select {
    min-height: 44px;
    margin-top: 4px;
}

.live-next-button {
    min-width: 180px;
}

.live-roster {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.live-status {
    display: inline-flex;
    width: max-content;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    background: #e8edf3;
    color: #3f4752;
}

.live-status-esperando {
    color: #0d646f;
    background: #dcf8ff;
}

.live-status-completado {
    color: #0f7a45;
    background: #dff8ea;
}

.live-status-trabajando {
    color: #60470c;
    background: #fff2cc;
}

.button.danger {
    color: #fff;
    background: #b42318;
}

.button.danger:hover {
    background: #921b13;
}

.row-hint {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

@media (max-width: 820px) {
    .hero,
    .topbar,
    .student-panel,
    .panel-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        padding: 10px 0;
    }

    .exercise-toolbar,
    .actionbar,
    .question-nav,
    .validator-toolbar,
    .validator-grid,
    .resource-bank-grid,
    .resource-meta-grid {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .actionbar-buttons {
        display: grid;
        grid-template-columns: 1fr;
    }

    .worksheet-panel {
        width: 52%;
        gap: 6px;
        padding: 7px;
    }

    .worksheet-panel label span {
        font-size: 10px;
    }

    .worksheet-panel input {
        min-height: 30px;
        padding: 4px;
    }

    .pdf-stage {
        min-width: 760px;
    }

    .section-head,
    .inline-form,
    .header-actions,
    .auth-shell-split,
    .credentials-card {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .auth-visual {
        display: none;
    }

    .auth-shell {
        width: min(430px, calc(100% - 24px));
        padding: 18px 0;
    }

    .auth-shell-split {
        width: 100%;
    }

    .auth-shell-split .auth-login-panel {
        min-height: 100vh;
        padding: 18px 12px;
        background: transparent;
    }

    .auth-card {
        padding: 22px;
    }

    .auth-logo {
        max-width: 84px;
        max-height: 58px;
    }

    .auth-form-heading h2 {
        font-size: 2rem;
    }

    .student-create-form,
    .student-edit-form,
    .classroom-edit-form,
    .create-classroom {
        grid-template-columns: 1fr;
    }

    .profile-save-strip {
        align-items: stretch;
        flex-direction: column;
    }

    .student-summary,
    .student-activity-list,
    .gamification-summary,
    .mission-strip {
        grid-template-columns: 1fr;
    }

    .gamification-card {
        grid-template-columns: 1fr;
    }

    .tug-stage {
        grid-template-columns: 1fr;
    }

    .student-activity-main,
    .student-month-head {
        align-items: stretch;
        flex-direction: column;
    }

    .assign-card,
    .assign-fields,
    .schedule-form,
    .teacher-pacing-panel,
    .live-class-hero,
    .live-class-stats {
        grid-template-columns: 1fr;
    }

    .teacher-pacing-actions,
    .teacher-pacing-actions form,
    .live-control-panel,
    .live-control-panel form,
    .resource-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .report-filter-form {
        grid-template-columns: 1fr;
    }

    .attempt-danger-panel {
        display: grid;
        align-items: stretch;
    }
}
