:root {
    --accent: #784033;
    --on-accent: #AD9376;
    --sand: #AD9376;
    --ink: #503F37;
    --ink-rgb: 80 63 55;
    --paper: #AD9376;
    --white: #AD9376;
    --line: #503F37;
    --muted: #503F37;
    --backdrop: #503F37;
    --footer-bg: #503F37;
    --footer-fg: #AD9376
}

html[data-theme="dark"] {
    color-scheme: dark;
    --accent: #D9966F;
    --on-accent: #1A1512;
    --sand: #2E2720;
    --ink: #EFE4D4;
    --ink-rgb: 239 228 212;
    --paper: #1A1512;
    --white: #252019;
    --line: #54463B;
    --muted: #B9AA95;
    --backdrop: #0B0907;
    --footer-bg: #0F0C0A;
    --footer-fg: #B9AA95
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif
}

a {
    color: inherit;
    text-decoration: none
}

button,
select,
input,
textarea {
    font: inherit;
    color: inherit
}

.topbar {
    height: 82px;
    padding: 0 max(5vw, 24px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    border-bottom: 1px solid var(--line)
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 750;
    letter-spacing: -.4px
}

.brand small {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: .3px
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: var(--white);
    border-radius: 12px;
    font-size: 22px
}
.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 14px
}

nav a:hover,
.nav-button:hover {
    color: var(--accent)
}

.nav-button {
    border: 0;
    background: none;
    cursor: pointer;
    color: var(--accent);
    font-weight: 700
}

.hero {
    min-height: 440px;
    padding: 70px max(8vw, 28px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
    background: var(--sand);
    color: var(--ink);
    overflow: hidden
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 800;
    color: var(--accent)
}

.hero .eyebrow {
    color: var(--accent)
}

.hero h1 {
    font-size: clamp(42px, 6vw, 68px);
    line-height: 1.04;
    letter-spacing: -2.8px;
    margin: 18px 0
}

.hero h1 em {
    font-family: Georgia, serif;
    font-weight: 400
}

.hero p {
    max-width: 390px;
    color: var(--ink);
    margin-bottom: 28px
}

.primary-link {
    display: inline-flex;
    align-items: center;
    gap: 28px;
    padding: 13px 18px;
    border-radius: 5px;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 13px;
    font-weight: 700
}

.hero-art {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 280px
}

.art-card {
    width: min(340px, 80%);
    height: 240px;
    padding: 30px;
    background: var(--white);
    color: var(--ink);
    border-radius: 4px;
    transform: rotate(3deg);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between
}

.art-card > span {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--accent);
    font-weight: 800
}

.art-card b {
    font: clamp(32px, 9vw, 44px)/1.02 Georgia, serif;
    overflow-wrap: anywhere
}

.art-card i {
    font-size: 11px;
    color: var(--muted)
}

.section {
    padding: 76px max(8vw, 28px)
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 26px
}

.section h2 {
    font: 42px/1.1 Georgia, serif;
    letter-spacing: -1px;
    margin: 9px 0 0
}

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

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px
}

.filter {
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: transparent;
    font-size: 12px;
    cursor: pointer
}

.filter.active,
.filter:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent)
}

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

.news-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 7px;
    overflow: hidden;
    transition: transform .2s
}

.news-card:hover {
    transform: translateY(-4px)
}

.news-image {
    height: 190px;
    background: var(--sand);
    overflow: hidden
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.news-body {
    padding: 19px
}

.meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 11px
}

.category {
    color: var(--accent);
    font-weight: 750
}

.news-body h3 {
    font: 23px/1.2 Georgia, serif;
    margin: 14px 0 8px
}

.news-body p {
    font-size: 13px;
    color: var(--muted);
    min-height: 60px
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    margin-top: 10px
}

.tinted {
    background: var(--sand)
}

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

.event-row {
    display: grid;
    grid-template-columns: 115px 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 18px 20px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 6px
}

.event-date {
    font: 20px Georgia, serif;
    color: var(--accent)
}

.event-row h3 {
    margin: 0;
    font-size: 16px
}

.event-row p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px
}

.event-time {
    text-align: right;
    font-size: 12px;
    color: var(--muted)
}

.class-select {
    font-size: 12px;
    color: var(--muted)
}

select,
input,
textarea {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 9px
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px
}

.schedule-note {
    margin: -24px 0 22px;
    color: var(--muted);
    font-size: 13px;
}

.schedule-loading {
    grid-column: 1 / -1;
}

.day-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 17px
}

.day-card h3 {
    font: 21px Georgia, serif;
    margin: 0 0 13px
}

.lesson {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 11px 0;
    border-top: 1px solid var(--line);
    font-size: 12px;
    align-items: start;
}

.lesson span {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.lesson span strong {
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
}

.lesson-room {
    max-width: 95px;
    text-align: right;
    overflow-wrap: anywhere;
}

.lesson b {
    color: var(--accent)
}

.lesson small {
    color: var(--muted)
}

footer {
    padding: 25px max(8vw, 28px);
    background: var(--footer-bg);
    color: var(--footer-fg);
    display: grid;
    gap: 16px;
    font-size: 12px
}

.foot-row {
    display: flex;
    justify-content: space-between;
    gap: 12px
}

.foot-people {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 44px
}

.person {
    display: grid;
    gap: 3px
}

.person b {
    font-size: 13px
}

.person .links {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 14px
}

.person a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px
}

.person a:hover {
    color: var(--accent)
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 5;
    background: var(--backdrop);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px
}

.modal.open {
    display: flex
}

.modal-card {
    position: relative;
    background: var(--paper);
    border-radius: 8px;
    width: min(760px, 100%);
    max-height: 90vh;
    overflow: auto;
    padding: 30px
}

.article-card {
    width: min(760px, 100%)
}

.close {
    position: absolute;
    right: 17px;
    top: 12px;
    border: 0;
    background: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--accent)
}

.article-content h2 {
    font: 38px Georgia, serif
}

.article-content img {
    max-width: 100%;
    border-radius: 5px;
    margin: 12px 0
}

.article-content p {
    white-space: pre-wrap
}

.admin-card {
    width: min(720px, 100%)
}

.admin-card h2 {
    font: 32px Georgia, serif;
    margin-top: 0
}

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

.admin-form input,
.admin-form textarea,
.admin-form select {
    width: 100%
}

.admin-form textarea {
    min-height: 90px;
    resize: vertical
}

.admin-actions {
    display: flex;
    gap: 9px;
    flex-wrap: wrap
}

.btn {
    border: 0;
    border-radius: 5px;
    padding: 10px 15px;
    background: var(--accent);
    color: var(--on-accent);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700
}

.btn.secondary {
    background: var(--sand)
}

.admin-list {
    display: grid;
    gap: 8px;
    margin: 18px 0
}

.admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 5px;
    font-size: 13px
}

.block-editor {
    border: 1px dashed var(--sand);
    padding: 12px;
    border-radius: 5px;
    display: grid;
    gap: 8px
}

.block-editor textarea {
    min-height: 75px
}

.block-editor img {
    max-width: 120px
}

.danger {
    color: var(--accent);
    background: none;
    border: 0;
    cursor: pointer;
    font-weight: 700
}

.empty {
    padding: 25px;
    text-align: center;
    color: var(--muted);
    background: var(--white);
    border: 1px dashed var(--line);
    border-radius: 6px
}

@media(max-width:800px) {
    nav {
        gap: 12px;
        font-size: 12px
    }

    .hero {
        grid-template-columns: 1fr;
        padding-top: 55px;
        padding-bottom: 45px
    }

    .hero-art {
        min-height: 230px
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr)
    }

   .schedule-grid {
        grid-template-columns: repeat(2, 1fr)
    }
}

@media(max-width:560px) {
    .topbar {
        height: auto;
        min-height: 72px;
        align-items: flex-start;
        padding-top: 15px;
        padding-bottom: 13px;
        gap: 10px;
        flex-direction: column
    }

    nav {
        width: 100%;
        justify-content: space-between;
        gap: 7px
    }

    .hero h1 {
        font-size: 48px
    }

    .section {
        padding: 52px 20px
    }

    .section h2 {
        font-size: 34px
    }

    .news-grid,
   .schedule-grid {
        grid-template-columns: 1fr
    }

    .event-row {
        grid-template-columns: 75px 1fr;
        gap: 12px
    }

    .event-time {
        grid-column: 2;
        text-align: left
    }

    .section-heading {
        align-items: start;
        gap: 15px;
        flex-direction: column
    }

    .foot-row {
        flex-direction: column;
        gap: 6px
    }
}
.filter {
    display: inline-flex;
    align-items: center;
    gap: 8px
}

.filter {
    padding: 9px 15px 9px 11px;
    transition: background .15s, border-color .15s, color .15s
}

.filter input,
.checklist input {
    appearance: none;
    -webkit-appearance: none;
    flex: none;
    width: 17px;
    height: 17px;
    margin: 0;
    border: 1.5px solid var(--ink);
    border-radius: 5px;
    display: grid;
    place-content: center;
    cursor: pointer;
    transition: background .15s, border-color .15s
}

.filter input::after,
.checklist input::after {
    content: "";
    width: 9px;
    height: 5px;
    border: solid var(--accent);
    border-width: 0 0 2px 2px;
    transform: rotate(-45deg) translate(1px, -1px) scale(0);
    transition: transform .15s
}

.filter input:checked,
.checklist input:checked {
    background: var(--on-accent);
    border-color: var(--on-accent)
}

.checklist input:checked {
    background: var(--accent);
    border-color: var(--accent)
}

.checklist input:checked::after {
    border-color: var(--on-accent)
}

.filter input:checked::after,
.checklist input:checked::after {
    transform: rotate(-45deg) translate(1px, -1px) scale(1)
}

.filter input:focus-visible,
.checklist input:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px
}

.cats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px
}

.checklist {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 14px;
    display: grid;
    gap: 6px
}

.checklist label {
    display: flex;
    align-items: center;
    gap: 8px
}

.calendar {
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden
}

.cal-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line)
}

.cal-nav,
.cal-filters {
    display: flex;
    align-items: center;
    gap: 8px
}

.cal-title {
    min-width: 150px;
    text-align: center;
    font: 700 21px Georgia, serif
}

.cal-btn {
    padding: 7px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: transparent;
    font-size: 13px;
    cursor: pointer;
    transition: background .15s, color .15s
}

.cal-btn:hover,
.cal-btn.on {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent)
}

.today-btn {
    margin-left: 6px
}

.cal-legend {
    display: flex;
    gap: 18px;
    padding: 10px 16px;
    font-size: 12px;
    border-bottom: 1px solid var(--line)
}

.cal-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block
}

.cal-chip.event {
    background: var(--c, var(--accent));
    color: var(--on-accent)
}

.dot.news {
    background: var(--ink)
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr))
}

.cal-dow {
    padding: 9px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--line)
}

.cal-cell {
    min-height: 122px;
    padding: 8px 6px;
    border-right: 1px solid rgb(var(--ink-rgb) / .3);
    border-bottom: 1px solid rgb(var(--ink-rgb) / .3);
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0
}

.cal-cell:nth-child(7n+14) {
    border-right: 0
}

.cal-cell.other {
    opacity: .5
}

.cal-cell.has-items {
    cursor: pointer
}

.cal-cell.has-items:hover {
    background: rgb(var(--ink-rgb) / .08)
}

.cal-num {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 700;
    border-radius: 50%
}

.cal-cell.today .cal-num {
    background: var(--accent);
    color: var(--on-accent)
}

.cal-items {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0
}

.cal-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 3px 7px;
    border: 0;
    border-radius: 5px;
    font-size: 11.5px;
    text-align: left;
    cursor: pointer;
    min-width: 0
}

.cal-chip b {
    flex: none;
    font-weight: 700
}

.cal-chip .t {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis
}

.cal-chip.news {
    background: rgb(var(--ink-rgb) / .2);
    color: var(--ink)
}

.cal-chip:hover {
    filter: brightness(1.12)
}

.cal-more {
    border: 0;
    background: transparent;
    font-size: 11.5px;
    text-align: left;
    padding: 2px 7px;
    cursor: pointer;
    color: var(--muted)
}

.day-list {
    display: grid;
    gap: 8px;
    margin-top: 14px
}

.cal-chip.wide {
    padding: 10px 12px;
    font-size: 14px
}

.cal-chip.wide .t {
    white-space: normal
}

.cal-chip.wide small {
    display: block;
    opacity: .8;
    font-size: 12px
}

@media (max-width: 700px) {
    .cal-cell {
        min-height: 62px;
        padding: 6px 2px;
        align-items: center
    }

    .cal-items {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 3px
    }

    .cal-chip:not(.wide) {
        width: 8px;
        height: 8px;
        padding: 0;
        border-radius: 50%;
        pointer-events: none
    }

    .cal-chip:not(.wide) > * {
        display: none
    }

    .cal-more {
        display: none
    }

    .cal-dow {
        padding: 8px 2px;
        text-align: center;
        font-size: 10px
    }

    .cal-title {
        min-width: 0;
        font-size: 18px
    }
}

.cal-chip.wide b {
    min-width: 46px
}

@media (max-width: 700px) {
    .cal-chip.news:not(.wide) {
        background: var(--ink)
    }
}

.btn.secondary {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink)
}

.btn.secondary:hover {
    background: rgb(var(--ink-rgb) / .12)
}

a.btn {
    display: inline-block;
    text-decoration: none
}

.schedule-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 14px
}

.seg {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px
}

.seg label {
    cursor: pointer
}

.seg input {
    position: absolute;
    opacity: 0;
    pointer-events: none
}

.seg span {
    display: block;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    transition: background .15s, color .15s
}

.seg input:checked + span {
    background: var(--accent);
    color: var(--on-accent)
}

.seg input:focus-visible + span {
    outline: 2px solid var(--ink);
    outline-offset: 2px
}

.class-select select {
    max-width: 260px
}

.cal-filter-panel {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: rgb(var(--ink-rgb) / .07)
}

.cal-filter-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 14px
}

.cal-filter-head b {
    display: block;
    font: 700 17px Georgia, serif
}

.cal-filter-head small {
    color: var(--muted);
    font-size: 12px
}

.cal-filter-actions {
    display: flex;
    gap: 8px
}

.cal-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 8px
}

.big-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    transition: background .15s, border-color .15s
}

.big-check:hover {
    background: rgb(var(--ink-rgb) / .1)
}

.big-check.on {
    border-color: var(--c);
    background: rgb(var(--ink-rgb) / .1)
}

.big-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none
}

.big-box {
    flex: none;
    width: 21px;
    height: 21px;
    border: 1.5px solid var(--c);
    border-radius: 6px;
    display: grid;
    place-content: center;
    transition: background .15s
}

.big-box::after {
    content: "";
    width: 11px;
    height: 6px;
    border: solid var(--on-accent);
    border-width: 0 0 2px 2px;
    transform: rotate(-45deg) translate(1px, -1px) scale(0);
    transition: transform .15s
}

.big-check.on .big-box {
    background: var(--c)
}

.big-check.on .big-box::after {
    transform: rotate(-45deg) translate(1px, -1px) scale(1)
}

.big-check input:focus-visible + .big-box {
    outline: 2px solid var(--ink);
    outline-offset: 2px
}

.big-name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 700
}

.big-check em {
    flex: none;
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--c);
    color: var(--on-accent);
    font-style: normal;
    font-size: 12px;
    font-weight: 700;
    text-align: center
}

.admin-card {
    width: min(860px, 100%)
}

.admin-head {
    padding-right: 38px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px
}

.admin-head h2 {
    margin-bottom: 4px
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 18px 0 4px;
    border-bottom: 1px solid var(--line)
}

.admin-tabs button {
    padding: 10px 18px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: -1px
}

.admin-tabs button:hover {
    background: rgb(var(--ink-rgb) / .08)
}

.admin-tabs button.on {
    border-bottom-color: var(--accent);
    color: var(--accent)
}

.admin-pane {
    padding-top: 14px
}

.admin-item small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px
}

.admin-info {
    display: grid;
    gap: 6px;
    justify-items: start;
    margin-top: 6px
}

.admin-info p {
    margin: 4px 0
}

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

.type-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 8px 7px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13px
}

.type-pill:not(:has(button)) {
    padding-right: 14px
}

.type-pill button {
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: rgb(var(--ink-rgb) / .18);
    cursor: pointer;
    line-height: 1
}

.type-pill button:hover {
    background: var(--accent);
    color: var(--on-accent)
}

.admin-form.inline {
    display: flex;
    gap: 8px;
    margin-bottom: 22px
}

.admin-form.inline input {
    flex: 1
}

@media (max-width: 700px) {
    .section-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px
    }

    .schedule-controls {
        justify-content: flex-start
    }

    .cal-filter-grid {
        grid-template-columns: 1fr 1fr
    }

    .big-check {
        padding: 12px;
        gap: 9px
    }

    .big-name {
        font-size: 14px
    }

    .admin-tabs button {
        padding: 9px 12px;
        font-size: 13px
    }
}

@media (max-width: 700px) {
    .modal-card {
        padding: 22px 16px
    }

    .admin-item {
        flex-wrap: wrap
    }

    .seg span {
        padding: 8px 14px
    }

    .cal-nav {
        gap: 6px
    }

    .cal-title {
        white-space: nowrap;
        font-size: 17px
    }

    .today-btn {
        margin-left: 0
    }

    .big-name {
        font-size: 13px;
        line-height: 1.2;
        overflow-wrap: anywhere
    }

    .schedule-controls,
    .class-select {
        width: 100%
    }

    .class-select {
        display: flex;
        align-items: center;
        gap: 8px
    }

    .class-select select {
        flex: 1;
        max-width: 100%;
        font-size: 16px
    }
}

/* ---- language switch ---- */
.lang-switch {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px
}

.lang-switch button {
    border: 0;
    background: transparent;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
    transition: background .15s, color .15s
}

.lang-switch button:hover {
    background: rgb(var(--ink-rgb) / .12)
}

.lang-switch button.on {
    background: var(--accent);
    color: var(--on-accent)
}

@media (max-width: 900px) {
    .topbar {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        height: auto;
        min-height: 72px;
        padding-top: 12px;
        padding-bottom: 12px;
        gap: 10px 12px
    }

    .brand {
        grid-column: 1;
        grid-row: 1
    }

    .top-tools {
        grid-column: 2;
        grid-row: 1
    }

    nav {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 6px 18px
    }
}

/* ---- honor board ---- */
.honor-board {
    display: grid;
    grid-template-columns: minmax(240px, 320px) 1fr;
    gap: 28px;
    align-items: start
}

.teacher-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 22px;
    display: grid;
    gap: 10px;
    justify-items: center;
    text-align: center;
    background: var(--white)
}

.teacher-card h3 {
    font: 700 24px Georgia, serif;
    margin: 4px 0 0
}

.teacher-card p {
    margin: 0
}

.teacher-card .subject {
    color: var(--accent);
    font-weight: 700
}

.avatar {
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover
}

.avatar.ph {
    display: grid;
    place-items: center;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 18px;
    font-weight: 700
}

.avatar.big {
    width: 120px;
    height: 120px;
    font-size: 38px
}

.honor-main {
    display: grid;
    gap: 16px;
    justify-items: start;
    min-width: 0
}

.honor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%
}

.honor-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    min-width: 0
}

.honor-card > div {
    min-width: 0;
    flex: 1
}

.honor-card h3 {
    font: 700 18px Georgia, serif;
    margin: 6px 0 4px
}

.honor-card h3 small {
    font: 600 12px Inter, ui-sans-serif, sans-serif;
    color: var(--muted)
}

.honor-card p {
    margin: 0 0 4px;
    font-size: 13px
}

.ach-title {
    font-weight: 600
}

@media (max-width: 900px) {
    .honor-board {
        grid-template-columns: 1fr
    }

    .teacher-card {
        justify-items: start;
        text-align: left
    }
}

@media (max-width: 700px) {
    .honor-grid {
        grid-template-columns: 1fr
    }
}

/* ---- three-language admin fields ---- */
.i18n {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    margin: 0;
    display: grid;
    gap: 8px
}

.i18n legend {
    padding: 0 6px;
    font-size: 13px;
    font-weight: 700
}

.i18n legend small {
    font-weight: 400;
    color: var(--muted)
}

.i18n-row {
    display: flex;
    gap: 8px;
    align-items: flex-start
}

.i18n-row input,
.i18n-row textarea {
    flex: 1;
    min-width: 0
}

.lang-badge {
    flex: none;
    width: 34px;
    margin-top: 8px;
    padding: 3px 0;
    border-radius: 6px;
    background: rgb(var(--ink-rgb) / .18);
    font-size: 11px;
    font-weight: 700;
    text-align: center
}

.block-editor .i18n-row {
    margin: 6px 0
}

.honor-side {
    display: grid;
    gap: 16px;
    min-width: 0
}

/* ---- personal calendar notes ---- */
.cal-cell {
    position: relative
}

.cal-add {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: rgb(var(--ink-rgb) / .18);
    color: var(--ink);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s, background .15s
}

.cal-cell:hover .cal-add,
.cal-add:focus-visible {
    opacity: 1
}

.cal-add:hover {
    background: var(--accent);
    color: var(--on-accent)
}

@media (hover: none) {
    .cal-add {
        display: none
    }
}

.cal-chip.note {
    background: transparent;
    border: 1px dashed var(--ink);
    color: var(--ink)
}

.notes-title {
    margin-top: 22px
}

.note-list {
    display: grid;
    gap: 8px;
    margin: 10px 0
}

.note-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border: 1px dashed var(--ink);
    border-radius: 8px
}

.note-text {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: pre-wrap
}

.note-actions {
    flex: none;
    white-space: nowrap
}

.note-form {
    display: grid;
    gap: 8px;
    margin-top: 10px
}

.note-form textarea {
    width: 100%;
    resize: vertical
}

.note-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px
}

.note-hint {
    margin-top: 10px;
    font-size: 12px
}

@media (max-width: 700px) {
    .cal-chip.note:not(.wide) {
        background: transparent;
        border: 1.5px solid var(--ink)
    }
}

/* ---- theme toggle ---- */
.top-tools {
    display: flex;
    align-items: center;
    gap: 10px
}

.theme-toggle {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition: background .15s
}

.theme-toggle:hover {
    background: rgb(var(--ink-rgb) / .14)
}

.theme-toggle svg {
    width: 18px;
    height: 18px
}

.theme-toggle .sun,
html[data-theme="dark"] .theme-toggle .moon {
    display: none
}

html[data-theme="dark"] .theme-toggle .sun {
    display: block
}

html[data-theme="dark"] img:not(.avatar) {
    opacity: .92
}
