.account-modal-open {
    overflow: hidden;
}

.account-page {
    min-height: calc(100vh - 150px);
    padding: 24px 0 40px;
    background: var(--color-page);
}

.account-page__container {
    display: grid;
    gap: 14px;
}

.account-license-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 17px 20px;
    border: 1px solid color-mix(in srgb, var(--color-success, #198754) 30%, var(--color-line));
    border-radius: 16px;
    background: color-mix(in srgb, var(--color-success, #198754) 8%, var(--color-surface));
    color: var(--color-ink);
}

.account-license-notice__icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 12px;
    background: color-mix(in srgb, var(--color-success, #198754) 17%, var(--color-surface));
    color: var(--color-success, #198754);
    font-size: 1.15rem;
}

.account-license-notice strong { display: block; margin: 1px 0 4px; }
.account-license-notice p { margin: 0; color: var(--color-muted); line-height: 1.5; }
.account-license-notice--scheduled {
    border-color: color-mix(in srgb, var(--color-primary) 28%, var(--color-line));
    background: color-mix(in srgb, var(--color-primary) 6%, var(--color-surface));
}

.account-license-offer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 26px;
    border: 1px solid color-mix(in srgb, var(--color-primary) 24%, var(--color-line));
    border-radius: 16px;
    background: linear-gradient(120deg, color-mix(in srgb, var(--color-primary) 9%, var(--color-surface)), var(--color-surface));
    box-shadow: var(--color-shadow);
}

.account-license-offer__copy { min-width: 0; }
.account-license-offer h2 { margin: 0; color: var(--color-ink); font-size: clamp(1.2rem, 2.3vw, 1.65rem); }
.account-license-offer__copy > p:not(.eyebrow) { max-width: 720px; margin: 8px 0 12px; color: var(--color-muted); line-height: 1.55; }
.account-license-offer ul { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; }
.account-license-offer li { display: inline-flex; align-items: center; gap: 7px; color: var(--color-ink); font-size: .82rem; }
.account-license-offer li i { color: var(--color-success, #198754); }
.account-license-offer__button { flex: 0 0 auto; white-space: nowrap; }

.account-license-renewal {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 18px;
    border: 1px solid color-mix(in srgb, #b7791f 32%, var(--color-line));
    border-radius: 12px;
    background: color-mix(in srgb, #b7791f 8%, var(--color-surface));
    color: var(--color-ink);
}
.account-license-renewal > i { color: #9a6414; font-size: 1.2rem; }
.account-license-renewal div { display: grid; gap: 3px; flex: 1; }
.account-license-renewal span { color: var(--color-muted); font-size: .84rem; }
.account-license-renewal .button { flex: 0 0 auto; }

.account-hero {
    display: block;
    padding: 2px 0 4px;
    border-bottom: 1px solid var(--color-line);
}

.account-hero h1,
.account-card h2,
.account-modal h2 {
    margin: 0;
    color: var(--color-ink);
    letter-spacing: -.035em;
}

.account-hero h1 {
    font-size: clamp(1.55rem, 2.7vw, 2.15rem);
}

.account-hero p:not(.eyebrow) {
    max-width: 680px;
    margin: 8px 0 0;
    color: var(--color-muted);
}

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

.account-card {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--color-line);
    border-radius: 6px;
    background: var(--color-surface);
    box-shadow: var(--color-shadow);
}

.account-card__heading,
.account-modal__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.account-card__heading h2 {
    font-size: 1.35rem;
}

.account-card__icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 6px;
    background: var(--color-surface-soft);
    color: var(--color-primary);
    font-size: 1.15rem;
}

.account-details {
    display: grid;
    gap: 10px;
    margin: 0;
}

.account-details > div {
    display: grid;
    grid-template-columns: minmax(110px, .45fr) minmax(0, 1fr);
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-line);
}

.account-details > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.account-details dt,
.account-details dd {
    margin: 0;
    font-size: .85rem;
}

.account-details dt {
    color: var(--color-muted);
    font-weight: 750;
}

.account-details dd {
    overflow-wrap: anywhere;
    color: var(--color-ink);
    font-weight: 800;
}

.account-edit-button {
    width: auto;
    min-width: 0;
    min-height: 36px;
    align-self: start;
    justify-self: start;
    padding: 7px 12px;
    border-radius: 6px;
}

.account-card__intro {
    margin: -6px 0 0;
    color: var(--color-muted);
    font-size: .9rem;
    line-height: 1.55;
}

.account-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.student-game-history { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--color-line); }
.student-game-history__heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.student-game-history__heading h3 { margin: 0 0 4px; font-size: 1.08rem; }
.student-game-history__heading p { margin: 0; color: var(--color-muted); font-size: .9rem; }
.student-game-history__table-wrap { width: 100%; overflow-x: auto; }
.student-game-history .dataTables_wrapper { width: 100%; color: var(--color-ink); }
.student-game-history .dataTables_wrapper > .row:first-child { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; row-gap: 10px; margin: 0 0 12px; }
.student-game-history .dataTables_wrapper > .row:first-child > [class*="col-"] { flex: 0 0 50%; max-width: 50%; }
.student-game-history .dataTables_length,
.student-game-history .dataTables_filter { float: none; width: 100%; margin: 0; }
.student-game-history .dataTables_filter { text-align: right; }
.student-game-history .dataTables_length label,
.student-game-history .dataTables_filter label { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; color: var(--color-ink); font-weight: 500; line-height: 1.4; }
.student-game-history .dataTables_length select,
.student-game-history .dataTables_filter input { min-height: 38px; margin: 0; padding: 7px 11px; border: 1px solid var(--color-line); border-radius: 8px; color: var(--color-ink); background: var(--color-surface); box-shadow: none; }
.student-game-history .dataTables_length select { min-width: 68px; cursor: pointer; }
.student-game-history .dataTables_filter input { width: min(240px, 52vw); }
.student-game-history .dataTables_length select:focus,
.student-game-history .dataTables_filter input:focus { border-color: var(--color-primary); outline: 3px solid color-mix(in srgb, var(--color-primary) 18%, transparent); outline-offset: 1px; }
.student-game-history .dataTables_info { padding-top: 8px; color: var(--color-muted); }
.student-game-history .dataTables_paginate { display: flex; justify-content: flex-end; padding-top: 4px; }
.student-game-history .dataTables_paginate ul.pagination { display: inline-flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.student-game-history .dataTables_paginate ul.pagination > li { display: block; margin: 0; padding: 0; }
.student-game-history .dataTables_paginate ul.pagination > li > a,
.student-game-history .dataTables_paginate ul.pagination > li > span { display: grid; min-width: 34px; min-height: 34px; place-items: center; padding: 5px 9px; border: 1px solid var(--color-line); border-radius: 7px; color: var(--color-ink); background: var(--color-surface); text-decoration: none; }
.student-game-history .dataTables_paginate ul.pagination > li.active > a,
.student-game-history .dataTables_paginate ul.pagination > li.active > span { border-color: var(--color-primary); color: #fff; background: var(--color-primary); }
.student-game-history .dataTables_paginate ul.pagination > li.disabled > a,
.student-game-history .dataTables_paginate ul.pagination > li.disabled > span { color: var(--color-muted); opacity: .65; }
[data-theme="dark"] .student-game-history .dataTables_length select,
[data-theme="dark"] .student-game-history .dataTables_filter input { border-color: var(--color-line); color: var(--color-ink); background: var(--color-surface); }
.student-game-history .dataTables_filter input::placeholder { color: var(--color-muted); opacity: 1; }
.student-game-history__table { width: 100% !important; margin: 0; border: 1px solid var(--color-line) !important; border-collapse: separate !important; border-spacing: 0 !important; color: var(--color-ink); }
.student-game-history__table thead th { padding: 12px 14px; border: 0; border-right: 1px solid var(--color-line); border-bottom: 2px solid var(--color-line); background: var(--color-surface-soft); white-space: nowrap; font-weight: 600; }
.student-game-history__table tbody td { padding: 11px 14px; border: 0; border-right: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line); vertical-align: middle; }
.student-game-history__table thead th:last-child,
.student-game-history__table tbody td:last-child { border-right: 0; }
.student-game-history__table tbody tr:last-child td { border-bottom: 0; }
.student-game-history__table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--color-surface-soft) 55%, transparent); }
.student-game-history__table tbody tr:hover { background: color-mix(in srgb, var(--color-primary) 9%, var(--color-surface)); }
.student-game-history__table thead .sorting:after { font-family: inherit !important; content: "↕" !important; }
.student-game-history__table thead .sorting_asc:after { font-family: inherit !important; content: "↑" !important; }
.student-game-history__table thead .sorting_desc:after { font-family: inherit !important; content: "↓" !important; }
.student-game-history__table td:last-child span { display: inline-block; margin: 2px 8px 2px 0; white-space: nowrap; }
.student-game-history__level { display: block; margin-top: 3px; color: var(--color-muted); font-size: .78rem; }
.student-game-history__state { border-radius: 999px; padding: 3px 8px; font-size: .76rem; }
.student-game-history__state--done { color: #12623e; background: #e5f5ec; }
.student-game-history__state--partial { color: #78571b; background: #fff3d6; }
.student-game-history__status { margin: 10px 0; padding: 10px 12px; border-radius: 8px; color: var(--color-ink); background: var(--color-surface-soft); }
.student-game-history__status.is-error { color: #8d3030; background: #fff0f0; }
.student-game-history__modal { position: fixed; z-index: 1200; inset: 0; display: grid; place-items: center; padding: 20px; }
.student-game-history__modal[hidden] { display: none; }
.student-game-history__backdrop { position: absolute; inset: 0; border: 0; background: rgba(12, 24, 38, .62); }
.student-game-history__dialog { position: relative; width: min(100%, 440px); padding: 28px; border: 1px solid var(--color-line); border-radius: 16px; background: var(--color-surface); color: var(--color-ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.student-game-history__dialog h3 { margin: 12px 32px 8px 0; }
.student-game-history__dialog p { color: var(--color-muted); }
.student-game-history__dialog-icon { display: inline-grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 12%, transparent); font-size: 1.2rem; }
.student-game-history__close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 8px; color: inherit; background: transparent; }
.student-game-history__dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.student-game-history .button--danger { border-color: #a83c3c; color: #fff; background: #a83c3c; }
.student-game-history .button--danger:hover { background: #8d3030; }
.student-history-modal-open { overflow: hidden; }
[data-theme="dark"] .student-game-history__state--done { color: #a9ebc3; background: #153a2a; }
[data-theme="dark"] .student-game-history__state--partial { color: #f3d28a; background: #40351e; }
[data-theme="dark"] .student-game-history__status.is-error { color: #ffb6b6; background: #472525; }

@media (max-width: 600px) {
    .student-game-history .dataTables_wrapper > .row:first-child { align-items: stretch; }
    .student-game-history .dataTables_wrapper > .row:first-child > [class*="col-"] { flex: 0 0 100%; max-width: 100%; width: 100%; }
    .student-game-history .dataTables_filter { text-align: left; }
    .student-game-history .dataTables_length label,
    .student-game-history .dataTables_filter label { width: 100%; justify-content: space-between; }
    .student-game-history .dataTables_length label { justify-content: flex-start; flex-wrap: nowrap; white-space: nowrap; }
    .student-game-history .dataTables_filter input { flex: 1 1 130px; width: auto; min-width: 0; }
    .student-game-history__heading { align-items: flex-start; flex-direction: column; }
    .student-game-history__heading .button { align-self: flex-start; }
    .student-game-history__dialog { padding: 22px; }
    .student-game-history__dialog-actions { justify-content: stretch; }
    .student-game-history__dialog-actions .button { flex: 1 1 auto; }
}

.account-student-action {
    margin: 1rem 0 0;
}

.account-stat {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 12px 9px;
    border: 1px solid var(--color-line);
    border-radius: 6px;
    background: var(--color-surface-soft);
    text-align: center;
}

.account-stat i {
    color: var(--color-primary);
    font-size: 1rem;
}

.account-stat strong {
    color: var(--color-ink);
    font-size: 1.25rem;
}

.account-stat span {
    overflow-wrap: anywhere;
    color: var(--color-muted);
    font-size: .72rem;
    font-weight: 750;
}

.account-teacher-tools {
    display: grid;
    gap: 12px;
    padding-top: 2px;
}

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

.account-teacher-section {
    display: grid;
    align-content: start;
    gap: 9px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--color-surface-soft) 72%, var(--color-surface));
}

.account-teacher-section__badge {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 7px;
    margin: 0;
    padding: 6px 9px;
    border: 1px solid color-mix(in srgb, var(--color-primary) 30%, var(--color-line));
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-primary) 10%, var(--color-surface));
    color: var(--color-primary);
    font-size: .74rem;
    font-weight: 850;
    letter-spacing: .01em;
}

.account-teacher-section--resources .account-teacher-section__badge {
    border-color: color-mix(in srgb, #b7791f 38%, var(--color-line));
    background: color-mix(in srgb, #b7791f 11%, var(--color-surface));
    color: color-mix(in srgb, #b7791f 80%, var(--color-ink));
}

.account-teacher-tools__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.account-teacher-tools__heading h3 {
    margin: 0;
    color: var(--color-ink);
    font-size: 1rem;
    letter-spacing: -.015em;
}

.account-teacher-tools__icon {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 6px;
    background: color-mix(in srgb, var(--color-primary) 10%, var(--color-surface-soft));
    color: var(--color-primary);
}

.account-game-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.account-teacher-section .account-game-links {
    grid-template-columns: 1fr;
}

.account-game-link {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid var(--color-line);
    border-radius: 6px;
    background: var(--color-surface-soft);
    color: inherit;
    text-decoration: none;
    transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.account-game-link:hover,
.account-game-link:focus-visible {
    border-color: color-mix(in srgb, var(--color-primary) 48%, var(--color-line));
    background: color-mix(in srgb, var(--color-primary) 6%, var(--color-surface-soft));
    transform: translateY(-1px);
}

.account-game-link:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--color-primary) 48%, transparent);
    outline-offset: 2px;
}

.account-game-link__media {
    display: grid;
    width: 44px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--color-line);
    border-radius: 5px;
    background: var(--color-surface);
}

.account-game-link__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-game-link__media--icon {
    background: color-mix(in srgb, var(--color-primary) 10%, var(--color-surface-soft));
    color: var(--color-primary);
    border-radius: 6px;
    font-size: 1rem;
}

.account-game-link__copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.account-game-link__copy strong {
    overflow-wrap: anywhere;
    color: var(--color-ink);
    font-size: .78rem;
}

.account-game-link__copy small {
    overflow-wrap: anywhere;
    color: var(--color-muted);
    font-size: .68rem;
    line-height: 1.3;
}

.account-game-link__arrow {
    color: var(--color-primary);
    font-size: .9rem;
}

.account-teacher-tools__all {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 6px;
    color: var(--color-primary);
    font-size: .76rem;
    font-weight: 850;
    text-decoration: none;
}

.account-teacher-tools__all:hover,
.account-teacher-tools__all:focus-visible {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

.account-classes {
    gap: 12px;
}

.account-classes__create {
    border: 0;
    cursor: pointer;
    font: inherit;
}

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

.account-class-item {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) auto auto auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--color-line);
    border-radius: 6px;
    background: var(--color-surface-soft);
}

.account-class-item__copy,
.account-class-item__code {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.account-class-item__copy strong,
.account-class-item__code strong {
    overflow-wrap: anywhere;
    color: var(--color-ink);
    font-size: .82rem;
}

.account-class-item__copy small,
.account-class-item__code span,
.account-class-item__count {
    color: var(--color-muted);
    font-size: .7rem;
}

.account-class-item__code strong {
    color: var(--color-primary);
    letter-spacing: .08em;
}

.account-class-item__button {
    min-height: 32px;
    padding: 6px 9px;
    font-size: .72rem;
    white-space: nowrap;
}

.account-classes__empty {
    display: grid;
    justify-items: start;
    gap: 4px;
    padding: 14px;
    border: 1px dashed var(--color-line);
    border-radius: 6px;
    background: color-mix(in srgb, var(--color-primary) 4%, var(--color-surface));
}

.account-classes__empty > i {
    color: var(--color-primary);
    font-size: 1.2rem;
}

.account-classes__empty strong {
    color: var(--color-ink);
    font-size: .84rem;
}

.account-classes__empty span {
    color: var(--color-muted);
    font-size: .76rem;
}

.account-classes__empty .button { margin-top: 5px; }

.account-classes__status,
.account-classes-modal__status {
    color: var(--color-muted);
    font-size: .78rem;
}

.account-classes__status.is-error,
.account-classes-modal__status.is-error { color: var(--color-danger, #b42318); }

.account-classes__status.is-success,
.account-classes-modal__status.is-success { color: var(--color-success, #198754); }

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

.account-classes-modal {
    position: fixed;
    z-index: 1450;
    display: grid;
    inset: 0;
    padding: 20px;
    place-items: center;
}

.account-classes-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 18, 39, .58);
    cursor: pointer;
}

.account-classes-modal__dialog {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(100%, 440px);
    max-height: min(680px, calc(100vh - 40px));
    gap: 14px;
    overflow-y: auto;
    padding: 22px;
    border: 1px solid var(--color-line);
    border-radius: 6px;
    background: var(--color-surface);
    box-shadow: 0 22px 60px rgba(7, 18, 39, .24);
}

.account-classes-modal__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.account-classes-modal__heading h2 {
    margin: 0;
    color: var(--color-ink);
    font-size: 1.35rem;
    letter-spacing: -.035em;
}

.account-classes-modal form { display: grid; gap: 8px; }

.account-classes-modal label {
    color: var(--color-ink);
    font-size: .8rem;
    font-weight: 850;
}

.account-classes-modal label span,
.account-classes-modal__hint,
.account-classes-modal__code {
    color: var(--color-muted);
    font-size: .75rem;
    font-weight: 500;
}

.account-classes-modal input,
.account-classes-modal select {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--color-line);
    border-radius: 6px;
    background: var(--color-page);
    color: var(--color-ink);
    font: inherit;
    outline: none;
}

.account-classes-modal input:focus,
.account-classes-modal select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 18%, transparent);
}

.account-classes-modal__hint { margin: 0; line-height: 1.45; }
.account-classes-modal__code { margin: 5px 0 0; }
.account-classes-modal__code strong { color: var(--color-primary); letter-spacing: .08em; }

.account-classes-modal__actions,
.account-classes-modal__inline-form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 5px;
}

.account-classes-modal__inline-form input { flex: 1 1 auto; }

.account-classes-modal__dialog.modal-content { display: block; padding: 0; color: var(--color-ink); }
.account-classes-modal__heading.modal-header { margin: 0; padding: 18px 22px 14px; border-bottom: 1px solid var(--color-line); }
.account-classes-modal__heading .eyebrow { margin: 0 0 4px; }
.account-classes-modal__body.modal-body { display: grid; gap: 10px; padding: 18px 22px; }
.account-classes-modal__body .form-control { min-height: 42px; }
.account-classes-modal__actions.modal-footer { justify-content: flex-end; gap: 9px; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--color-line); }
.account-class-years { position: relative; margin-top: 3px; }
.account-class-years > .form-label { display: block; margin-bottom: 6px; color: var(--color-ink); font-size: .8rem; font-weight: 700; }
.account-class-years > .form-label span { color: var(--color-muted); font-size: .75rem; font-weight: 500; }
.account-class-years__toggle { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 8px 36px 8px 12px; color: var(--color-ink); text-align: left; }
.account-class-years__toggle::after { position: absolute; right: 13px; }
.account-class-years__menu { position: absolute; z-index: 6; inset: calc(100% + 4px) 0 auto; display: grid; gap: 2px; width: 100%; max-height: 228px; overflow-y: auto; padding: 8px; border: 1px solid var(--color-line); border-radius: 7px; background: var(--color-surface); box-shadow: 0 12px 30px rgba(12, 25, 43, .16); }
.account-class-years__menu.show { display: grid; }
.account-class-years__menu[hidden] { display: none !important; }
.account-class-years__option { display: flex; align-items: center; gap: 9px; min-height: 36px; margin: 0 !important; padding: 6px 9px; border-radius: 5px; color: var(--color-ink) !important; cursor: pointer; font-size: .82rem !important; font-weight: 500 !important; }
.account-class-years__option:hover { background: color-mix(in srgb, var(--color-primary) 8%, var(--color-surface)); }
.account-classes-modal .account-class-years__option input.form-check-input { flex: 0 0 16px; width: 16px; min-height: 16px; height: 16px; margin: 0; padding: 0; border-radius: 4px; background-color: var(--color-page); }
.account-class-years__option .form-check-label { margin: 0; font-size: .82rem; font-weight: 500; }
.account-class-years .form-hint { display: block; margin-top: 5px; color: var(--color-muted); font-size: .74rem; }

.account-students-list {
    display: grid;
    max-height: 250px;
    gap: 6px;
    overflow-y: auto;
    margin-top: 5px;
}

.account-student-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 9px;
    border: 1px solid var(--color-line);
    border-radius: 6px;
    background: var(--color-surface-soft);
}

.account-student-item strong { color: var(--color-ink); font-size: .78rem; }
.account-student-item small,
.account-students-list__empty { color: var(--color-muted); font-size: .7rem; }

.account-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--color-primary) 22%, var(--color-line));
    border-radius: 6px;
    background: color-mix(in srgb, var(--color-primary) 7%, var(--color-surface));
    color: var(--color-muted);
    font-size: .82rem;
    line-height: 1.45;
}

.account-info i {
    flex: 0 0 auto;
    color: var(--color-primary);
}

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

.account-modal {
    position: fixed;
    z-index: 1400;
    display: grid;
    inset: 0;
    padding: 20px;
    place-items: center;
}

.account-modal__backdrop {
    position: absolute;
    z-index: 0;
    inset: 0;
    border: 0;
    background: rgba(7, 18, 39, .58);
    cursor: pointer;
}

.account-modal__card {
    position: relative;
    z-index: 1;
    pointer-events: auto;
    display: grid;
    width: min(100%, 540px);
    max-height: min(820px, calc(100vh - 40px));
    gap: 14px;
    overflow-y: auto;
    padding: 22px;
    border: 1px solid var(--color-line);
    border-radius: 6px;
    background: var(--color-surface);
    box-shadow: 0 22px 60px rgba(7, 18, 39, .24);
}

.account-modal__heading {
    position: sticky;
    z-index: 2;
    top: -22px;
    margin: -22px -22px 0;
    padding: 22px 22px 8px;
    background: var(--color-surface);
}

.account-modal__heading h2 {
    font-size: 1.35rem;
}

.account-modal__close {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--color-line);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--color-ink);
    cursor: pointer;
}

.account-modal__close:hover,
.account-modal__close:focus-visible {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.account-modal__fields {
    display: grid;
    gap: 8px;
}

.account-modal__fields label,
.account-modal__label {
    color: var(--color-ink);
    font-size: .8rem;
    font-weight: 850;
}

.account-modal__fields input {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--color-line);
    border-radius: 6px;
    background: var(--color-page);
    color: var(--color-ink);
    font: inherit;
    outline: none;
}

.account-modal__fields input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 18%, transparent);
}

.account-modal__fields input[readonly] {
    color: var(--color-muted);
    cursor: not-allowed;
}

.account-modal__hint {
    margin: -2px 0 5px;
    color: var(--color-muted);
    font-size: .74rem;
}

.account-password { display: grid; gap: 9px; padding-top: 16px; border-top: 1px solid var(--color-line); }
.account-password__heading { display: flex; align-items: center; gap: 11px; margin-bottom: 2px; }
.account-password__icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--color-primary) 12%, var(--color-surface)); color: var(--color-primary); font-size: 1.15rem; }
.account-password__heading h3 { margin: 0; color: var(--color-ink); font-size: 1rem; }
.account-password__heading p { margin: 3px 0 0; color: var(--color-muted); font-size: .78rem; line-height: 1.4; }
.account-password > label { margin-top: 3px; color: var(--color-ink); font-size: .8rem; font-weight: 800; }
.account-password__input-wrap { display: flex; min-width: 0; align-items: stretch; overflow: hidden; border: 1px solid var(--color-line); border-radius: 8px; background: var(--color-page); }
.account-password__input-wrap:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 18%, transparent); }
.account-password__input-wrap input { width: 100%; min-width: 0; min-height: 42px; padding: 9px 11px; border: 0; outline: 0; background: transparent; color: var(--color-ink); font: inherit; }
.account-password__visibility { display: grid; width: 44px; min-width: 44px; min-height: 42px; place-items: center; border: 0; border-left: 1px solid var(--color-line); background: transparent; color: var(--color-muted); cursor: pointer; font-size: 1rem; }
.account-password__visibility:hover,
.account-password__visibility:focus-visible { background: color-mix(in srgb, var(--color-primary) 9%, var(--color-page)); color: var(--color-primary); outline: 0; }
.account-password__visibility:focus-visible { box-shadow: inset 0 0 0 2px var(--color-primary); }
.account-password__strength { padding: 11px 12px; border: 1px solid var(--color-line); border-radius: 10px; background: var(--color-page); }
.account-password__strength[hidden] { display: none; }
.account-password__strength-top { display: flex; justify-content: space-between; gap: 8px; color: var(--color-muted); font-size: .75rem; }
.account-password__strength-top strong { color: var(--color-ink); }
.account-password__segments { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin-top: 8px; }
.account-password__segments span { height: 6px; border-radius: 99px; background: var(--color-line); transition: background-color .18s ease; }
.account-password__segments span.is-filled { background: #d99225; }
.account-password__segments span.is-filled.is-complete { background: #15945f; }
.account-password__rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; margin: 10px 0 0; padding: 0; list-style: none; }
.account-password__rules li { display: flex; gap: 6px; color: var(--color-muted); font-size: .73rem; line-height: 1.35; }
.account-password__rules li i { flex: 0 0 auto; }
.account-password__rules li.is-met { color: var(--color-ink); }
.account-password__rules li.is-met i { color: #15945f; }

.header-account-menu [data-account-open] { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 9px; border: 0; border-radius: 10px; background: transparent; color: var(--color-ink); cursor: pointer; font: inherit; font-size: .86rem; font-weight: 750; text-align: left; }
.header-account-menu [data-account-open] i { color: var(--color-primary); font-size: 1.18rem; }
.header-account-menu [data-account-open]:hover,
.header-account-menu [data-account-open]:focus-visible,
.header-account-menu [data-account-open].is-selected { background: color-mix(in srgb, var(--color-primary) 12%, var(--color-surface)); color: var(--color-primary); outline: 0; }

@media (max-width: 600px) {
    .account-password__rules { grid-template-columns: 1fr; }
}

.account-theme-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.account-theme-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--color-line);
    border-radius: 6px;
    background: var(--color-page);
    color: var(--color-muted);
    cursor: pointer;
    font: inherit;
    font-size: .82rem;
    font-weight: 800;
}

.account-theme-button.is-selected {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

.account-modal__save {
    width: 100%;
    border-radius: 6px;
}

.account-modal .login-status {
    margin-top: 0;
}

.account-license-code {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(290px, .9fr);
    align-items: center;
    gap: 24px;
    margin: 0 0 22px;
    padding: 22px 24px;
    border: 1px solid color-mix(in srgb, var(--color-primary) 22%, var(--color-line));
    border-radius: 10px;
    background: color-mix(in srgb, var(--color-primary) 6%, var(--color-surface));
}

.account-license-code__copy {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.account-license-code__icon {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 10px;
    background: var(--color-primary);
    color: #fff;
    font-size: 1.15rem;
}

.account-license-code h2 {
    margin: 0 0 6px;
    color: var(--color-ink);
    font-size: 1.15rem;
}

.account-license-code__copy p:last-child {
    margin: 0;
    color: var(--color-muted);
    font-size: .87rem;
    line-height: 1.55;
}

.account-license-code__copy .account-license-code__thanks {
    margin: 8px 0 0;
    color: var(--color-primary);
    font-size: .8rem;
    font-weight: 700;
}

.account-license-code__form {
    display: grid;
    gap: 7px;
}

.account-license-code__form label {
    color: var(--color-ink);
    font-size: .8rem;
    font-weight: 850;
}

.account-license-code__controls {
    display: flex;
    gap: 8px;
}

.account-license-code__controls input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid var(--color-line);
    border-radius: 7px;
    background: var(--color-surface);
    color: var(--color-ink);
    font: inherit;
    font-size: .95rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.account-license-code__controls input:focus-visible,
.account-license-code__controls button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--color-primary) 38%, transparent);
    outline-offset: 2px;
}

.account-license-code__controls button {
    flex: 0 0 auto;
    white-space: nowrap;
}

.account-license-code__form small {
    color: var(--color-muted);
    font-size: .73rem;
    line-height: 1.4;
}

.account-license-code__status {
    padding: 9px 11px;
    border-radius: 7px;
    background: color-mix(in srgb, var(--color-primary) 10%, var(--color-surface));
    color: var(--color-ink);
    font-size: .82rem;
    line-height: 1.45;
}

.account-license-code__status[data-state="error"] {
    background: color-mix(in srgb, #b42318 10%, var(--color-surface));
    color: #b42318;
}

.account-license-code__status[data-state="success"] {
    background: color-mix(in srgb, #16804a 11%, var(--color-surface));
    color: #12683d;
}

[data-theme="dark"] .account-license-code__status[data-state="error"] { color: #ffaaa3; }
[data-theme="dark"] .account-license-code__status[data-state="success"] { color: #8ce0ae; }

[hidden] { display: none !important; }

@media (max-width: 760px) {
    .account-page {
        padding: 22px 0 34px;
    }

    .account-game-links {
        grid-template-columns: 1fr;
    }

    .account-teacher-sections {
        grid-template-columns: 1fr;
    }

    .account-license-code {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 18px;
    }

    .account-license-offer { align-items: stretch; flex-direction: column; padding: 19px; }
    .account-license-offer__button { align-self: flex-start; }
    .account-license-renewal { align-items: flex-start; flex-wrap: wrap; }
    .account-license-renewal .button { width: 100%; }
    .account-class-item { grid-template-columns: minmax(0, 1fr) auto; }
    .account-class-item__count { grid-column: 1; }
    .account-class-item__button { grid-column: 2; grid-row: 2; }
}

@media (max-width: 420px) {
    .account-card {
        padding: 16px;
    }

    .account-license-code__controls {
        align-items: stretch;
        flex-direction: column;
    }

    .account-license-code__controls button {
        width: 100%;
    }

    .account-stats {
        gap: 6px;
    }

    .account-stat {
        padding-inline: 5px;
    }

    .account-modal {
        padding: 10px;
    }

    .account-modal__card {
        max-height: calc(100vh - 20px);
        padding: 17px;
    }

    .account-modal__heading {
        top: -17px;
        margin: -17px -17px 0;
        padding: 17px 17px 8px;
    }

    .account-classes-modal { padding: 12px; }
    .account-classes-modal__dialog { padding: 18px; }
    .account-classes-modal__inline-form { align-items: stretch; flex-direction: column; }
    .account-classes-modal__inline-form .button { width: 100%; }
}
