:root {
    --ink: #203047;
    --muted: #718096;
    --line: #e5eaf0;
    --paper: #fff;
    --bg: #f5f7fa;
    --accent: #3878d8;
    --disabled: #e5e7eb
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.45 system-ui, -apple-system, Segoe UI, sans-serif
}

.top {
    padding: 28px max(24px, calc((100% - 1280px)/2));
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--line)
}

h1,
h2 {
    margin: 0 0 5px
}

h1 {
    font-size: 27px;
    letter-spacing: -.04em
}

.eyebrow {
    color: var(--accent);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 700
}

.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 16px #1e355008
}

.admin-grid {
    max-width: 1280px;
    margin: 24px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 18px
}

.turn-card {
    grid-column: 1/-1
}

.history {
    grid-column: 1/-1
}

.public-layout {
    max-width: 1280px;
    margin: 24px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 18px
}

.map img {
    width: 100%;
    height: auto;
    border-radius: 8px
}

.button,
.small-button,
.icon-button {
    border: 0;
    border-radius: 7px;
    background: var(--accent);
    color: #fff;
    padding: 9px 14px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 650
}

.secondary {
    background: #eef3fb;
    color: var(--accent)
}

.primary {
    font-size: 16px
}

.wide {
    width: 100%;
    margin-top: 16px
}

.compact-form {
    display: grid;
    grid-template-columns: 1.5fr 1fr 44px auto;
    gap: 7px;
    margin: 16px 0
}

.teacher-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin: 16px 0
}

.teacher-form>input {
    flex: 1;
    min-width: 170px
}

.checks {
    display: flex;
    gap: 6px;
    align-items: center
}

.checks label {
    font-size: 13px
}

.date-label {
    display: block;
    margin: 16px 0 12px;
    font-weight: 650
}

.date-label input,
input,
select {
    border: 1px solid #d8e0e9;
    border-radius: 6px;
    padding: 9px;
    background: #fff;
    color: inherit
}
input[type=color] {
    padding: 0px !important;
}

small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400
}

.items-list,
.teacher-table {
    border-top: 1px solid var(--line)
}

.item-row,
.teacher-line,
.history-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--line)
}

.item-row>span:nth-child(2),
.teacher-line>span:first-child,
.history-row>span {
    display: flex;
    align-items: center;
    gap: 8px
}

.swatch {
    width: 18px;
    height: 18px;
    border-radius: 4px
}

.icon-button {
    padding: 0 8px;
    background: transparent;
    color: #9aa6b4;
    font-size: 20px
}

.table-head,
.teacher-line {
    display: grid;
    grid-template-columns: 1.6fr .7fr .8fr auto;
    gap: 10px
}

.table-head {
    padding: 8px 0;
    color: var(--muted);
    font-size: 12px
}

.small-button {
    padding: 5px 9px;
    font-size: 12px;
    background: #edf2f8;
    color: var(--ink)
}

.teacher-line.disabled {
    opacity: .55
}

.section-head {
    display: flex;
    justify-content: space-between
}

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

.board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px
}

.zone {
    background: color-mix(in srgb, var(--zone-color, #f8fafc) 24%, white);
    border: 1px solid var(--line);
    border-left: 6px solid var(--zone-color, #d5dde8);
    border-radius: 8px;
    min-height: 120px
}

.zone.unassigned {
    border-left-color: #ccd5df;
    background: #fff
}

.zone.over {
    outline: 2px solid var(--accent)
}

.zone-title {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #ffffff99
}

.zone-title span {
    font-size: 11px;
    color: var(--muted)
}

.drop-list {
    padding: 5px;
    min-height: 72px
}

.person {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #e6ebf1;
    border-radius: 6px;
    padding: 7px;
    margin: 4px 0;
    cursor: grab
}

.person-disabled {
    background: var(--disabled);
    color: #687386
}

.drag {
    color: #adb7c4
}

.person-name {
    flex: 1
}

.person-name small {
    font-size: 10px
}

.anchor,
.enable {
    border: 0;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px
}

.anchor.on {
    color: #d18b1d
}

.enable {
    color: #39a16d
}

.person-disabled .enable {
    color: #9aa1aa
}

.notice {
    max-width: 1280px;
    margin: 15px auto 0;
    padding: 10px 16px;
    border-radius: 7px;
    background: #ddf6e8;
    color: #17633b
}

.notice.error {
    background: #fde4e4;
    color: #8d2525
}

.public-zone {
    border-left: 6px solid #ccd5df;
    margin: 12px 0;
    padding: 0 10px 6px;
    background: #fafbfd
}

.public-person {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    border-top: 1px solid var(--line)
}

.public-person.assigned {
    font-weight: 700
}

.pill {
    font-size: 12px;
    color: var(--accent)
}

.empty {
    padding: 30px 0;
    color: var(--muted)
}

@media(max-width:800px) {

    .admin-grid,
    .public-layout {
        display: block
    }

    .card {
        margin-bottom: 16px
    }

    .compact-form {
        grid-template-columns: 1fr 1fr
    }

    .top {
        padding: 20px 16px
    }

    .admin-grid,
    .public-layout {
        padding: 0 12px
    }

    .table-head {
        display: none
    }

    .teacher-line {
        grid-template-columns: 1fr auto
    }

    .map {
        display: none
    }
}