/* Classroom specifics. Shared primitives live in tools-ui.css. */
.layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.roster {
    position: sticky;
    top: 16px;
}

.roster textarea {
    min-height: 260px;
}

.roster-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

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

.message {
    margin: 12px 0 0;
    min-height: 1.5em;
    color: var(--text-muted);
}

.message.error {
    color: var(--danger);
}

.tool {
    margin-top: 4px;
}

.fields {
    align-items: flex-end;
}

input[type="number"] {
    width: 7rem;
    padding: 9px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font: inherit;
}

.result {
    margin-top: 16px;
}

.share {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}

.card {
    padding: 12px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.card h3 {
    margin: 0 0 8px;
    font-size: 0.9375rem;
}

.card ol {
    margin: 0;
    padding-left: 1.3em;
}

.seats {
    display: grid;
    gap: 8px;
}

.seat {
    min-height: 44px;
    padding: 8px;
    display: grid;
    place-items: center;
    text-align: center;
    font-size: 0.875rem;
    overflow-wrap: anywhere;
    background: var(--accent-soft);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
}

.seat.empty {
    background: transparent;
    border-style: dashed;
    color: var(--text-muted);
}

.board {
    margin-bottom: 10px;
    padding: 6px;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
    background: var(--surface-2);
    border-radius: 6px;
}

.picker {
    display: grid;
    grid-template-columns: minmax(0, 420px) 1fr;
    gap: 24px;
    align-items: center;
}

.wheel-box {
    position: relative;
    max-width: 420px;
}

.wheel-box canvas {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    transition: transform 4.2s cubic-bezier(0.12, 0.6, 0.1, 1);
}

.pointer {
    position: absolute;
    left: 50%;
    top: -6px;
    z-index: 1;
    width: 0;
    height: 0;
    transform: translateX(-50%);
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 22px solid var(--danger);
}

.winner {
    margin: 0 0 16px;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 700;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.lock {
    margin-top: 12px;
}

.timer {
    display: grid;
    place-items: center;
    padding: 24px 12px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    margin-bottom: 16px;
}

.clock {
    font-family: var(--mono);
    font-size: clamp(3.5rem, 14vw, 7rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.timer.done {
    background: var(--danger-soft);
    animation: blink 0.8s step-end 6;
}

.timer:fullscreen {
    background: var(--bg);
}

.timer:fullscreen .clock {
    font-size: 22vw;
}

@keyframes blink {
    50% {
        background: var(--surface-2);
    }
}

.quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.attendance {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.attendance label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    background: var(--success-soft);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.attendance label.absent {
    background: var(--danger-soft);
}

.attendance .state {
    margin-left: auto;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--success);
}

.attendance .absent .state {
    color: var(--danger);
}

.summary {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

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

    .roster {
        position: static;
    }

    .roster textarea {
        min-height: 150px;
    }

    .picker {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wheel-box canvas {
        transition: none;
    }
}
