.class-randomizer-dup-warning { min-height: 18px; margin: 10px 0 0; padding: 8px 12px; background: #fff6e0; border: 1px solid #e8c766; border-radius: 4px; color: #7a5b00; }
.class-randomizer-error { min-height: 18px; margin: 10px 0 0; color: #b42318; }
.class-randomizer-modes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.class-randomizer-mode-btn { padding: 9px 16px; border: 1px solid #3c9ac7; border-radius: 4px; background: #fff; color: #247da8; font-weight: 600; cursor: pointer; }
.class-randomizer-mode-btn.is-active { background: #247da8; color: #fff; }
.class-randomizer-mode-btn:focus-visible, .class-randomizer-secondary:focus-visible, .front-tools-button:focus-visible { outline: 3px solid #ffb300; outline-offset: 2px; }
.class-randomizer-panel { margin-top: 16px; }
.class-randomizer-checkbox, .class-randomizer-radio { display: flex; align-items: center; gap: 8px; color: #233445; font-weight: normal; margin-bottom: 10px; }
.class-randomizer-checkbox input, .class-randomizer-radio input { margin: 0; }
.class-randomizer-options { display: grid; gap: 10px; max-width: 420px; }
.class-randomizer-secondary { background: #fff; color: #247da8; border: 1px solid #3c9ac7; }

.class-randomizer-result h2 { margin-top: 0; color: #233445; font-size: 22px; }
.class-randomizer-progress { color: #71808c; font-size: 14px; margin: 0 0 12px; }
.class-randomizer-chosen { min-height: 90px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.class-randomizer-chosen-name { font-size: 42px; font-weight: 700; color: #1c3f57; text-align: center; word-break: break-word; animation: class-randomizer-pop .25s ease-out; }
@keyframes class-randomizer-pop { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .class-randomizer-chosen-name { animation: none; } }
.class-randomizer-status { min-height: 20px; margin: 4px 0 16px; color: #247da8; }
.class-randomizer-chosen-list-wrap { margin-top: 10px; }
.class-randomizer-chosen-list-title { margin: 0 0 6px; color: #71808c; font-size: 13px; }
.class-randomizer-chosen-list { columns: 2; column-gap: 24px; padding-left: 20px; color: #233445; }

.class-randomizer-order-list { columns: 2; column-gap: 24px; padding-left: 22px; color: #233445; line-height: 1.7; }

.class-randomizer-groups-note { color: #71808c; font-size: 13px; margin: 0 0 14px; }
.class-randomizer-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.class-randomizer-group-card { padding: 16px 18px; border: 1px solid #dce5eb; border-radius: 6px; background: #fff; break-inside: avoid; page-break-inside: avoid; }
.class-randomizer-group-card h3 { margin: 0 0 10px; color: #233445; font-size: 16px; }
.class-randomizer-group-card ol { margin: 0; padding-left: 20px; color: #233445; }

.class-randomizer-faq dt { font-weight: 600; color: #233445; margin-top: 14px; }
.class-randomizer-faq dd { margin: 4px 0 0; color: #465461; }

.class-randomizer-projector {
    position: fixed; inset: 0; z-index: 2000;
    background: #0e1f2c; color: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 18px; padding: 24px;
}
.class-randomizer-projector-close {
    position: absolute; top: 18px; right: 22px;
    width: 48px; height: 48px; border-radius: 50%;
    border: 2px solid #fff; background: transparent; color: #fff;
    font-size: 28px; line-height: 1; cursor: pointer;
}
.class-randomizer-projector-name {
    font-size: clamp(48px, 12vw, 140px); font-weight: 800; text-align: center;
    word-break: break-word; max-width: 100%;
}
.class-randomizer-projector-progress { font-size: clamp(16px, 3vw, 28px); color: #cfe4f0; }
.class-randomizer-projector-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
body.class-randomizer-projector-open { overflow: hidden; }

@media (max-width: 700px) {
    .class-randomizer-chosen-list { columns: 1; }
    .class-randomizer-order-list { columns: 1; }
    .class-randomizer-modes { flex-direction: column; }
    .class-randomizer-mode-btn { width: 100%; text-align: center; }
}

@media print {
    .front-navbar, .front-footer, .front-breadcrumbs, .front-tools-sidebar, .front-tools-local-note,
    .class-randomizer-form, .class-randomizer-modes, .class-randomizer-explanation, .class-randomizer-projector {
        display: none !important;
    }
    .front-tools-layout { display: block; }
    .class-randomizer-result:not([hidden]) { display: block; border: 0; padding: 0; margin: 0; }
    .class-randomizer-chosen-list, .class-randomizer-order-list { columns: 1; }
}
