[hidden] { display: none !important; }
.workspace { width: min(1560px, calc(100% - 80px)); margin: 22px auto 40px; }
.site-header { max-width: 1656px; }
.class-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.class-heading h1 { margin: 12px 0 8px; font-size: clamp(30px, 3vw, 46px); }.class-heading p { margin: 0; }
.soft-button { border: 1px solid #d8e2f0; border-radius: 12px; background: white; padding: 12px 20px; color: #466181; font: inherit; font-size: 14px; cursor: pointer; }
.class-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 26px; }
.class-metrics article { background: #ffffffd9; border: 1px solid #e1e9f5; padding: 18px 26px; border-radius: 18px; display: grid; grid-template-columns: 1fr auto; align-items: center; }
.class-metrics span { font-size: 14px; color: #536c8c; }.class-metrics strong { grid-row: span 2; font-size: 34px; font-variant-numeric: tabular-nums; color: #234b87; }.class-metrics small { font-size: 12px; color: #7a8ba2; margin-top: 7px; }
.draw-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: stretch; }
.draw-settings { padding: 28px; border-radius: 22px; border: 1px solid #e0e8f4; background: white; }.draw-settings h2 { font-size: 21px; margin: 14px 0 26px; }
fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 12px; }
.count-presets { display: flex; gap: 8px; margin-bottom: 12px; }.count-presets button { flex: 1; border-radius: 10px; border: 1px solid #dce5f3; padding: 11px 4px; background: #f8faff; color: #547195; font: inherit; font-size: 16px; cursor: pointer; }.count-presets button.active { color: #245de2; background: #eaf1ff; border-color: #96b7ff; font-weight: 700; }
.custom-count { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }.custom-count input { width: 84px; padding: 10px 12px; border: 1px solid #dce5f3; border-radius: 10px; color: #1b3c6c; font-size: 19px; background: white; }.custom-count span { font-size: 12px; color: #7d8ca1; }
select { width: 100%; background: #f8faff; border: 1px solid #dce5f3; padding: 13px 10px; border-radius: 10px; color: #294a78; font: inherit; font-size: 14px; }.strategy-help { min-height: 66px; margin: 12px 0 20px; font-size: 12px; line-height: 1.8; color: #7487a0; }
.round-info { border-top: 1px solid #e9eef6; padding-top: 20px; }.round-info span { font-size: 12px; color: #7d8ca1; }.round-info strong { display: block; font-size: 15px; margin: 8px 0; }.round-info small { display: block; color: #7d8ca1; font-size: 11px; line-height: 1.7; }
.draw-stage { min-width: 0; display: flex; flex-direction: column; background: radial-gradient(ellipse at 50% 20%, #edf4ff, transparent 68%), white; border: 1px solid #dce7f6; border-radius: 24px; padding: 26px 36px; min-height: 555px; box-shadow: 0 18px 70px #356cc008; }
.stage-top { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #68809f; }.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #2da77b; }.stage-label { margin-left: auto; color: #91a0b5; }
.stage-content { flex: 1; min-height: 290px; display: grid; place-items: center; padding: 24px 0; }.draw-placeholder { text-align: center; }.draw-placeholder h2 { font-size: clamp(22px, 2.1vw, 32px); margin: 23px 0 12px; }.draw-placeholder p { font-size: 14px; color: #8393aa; }.dice-mark { width: 86px; height: 86px; border-radius: 26px; background: linear-gradient(140deg, #387afb, #245adb); color: white; font-size: 62px; line-height: 86px; margin: 0 auto; box-shadow: 0 15px 28px #2563eb26; transform: rotate(-8deg); }
.stage-actions { text-align: center; }#start-draw { border: 0; background: linear-gradient(115deg, #377cf5, #245cdd); color: white; padding: 19px 40px; border-radius: 16px; font: inherit; font-size: clamp(20px, 1.7vw, 27px); font-weight: 700; min-width: min(360px, 100%); box-shadow: 0 10px 28px #2563eb30; cursor: pointer; transition: transform .15s, box-shadow .15s; }#start-draw:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 30px #2563eb40; }#start-draw span { margin-right: 8px; }.stage-actions p { font-size: 12px; color: #8797af; margin: 14px 0 0; }button:disabled { opacity: .5; cursor: not-allowed; }button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #9bbdff; outline-offset: 3px; }
.rolling-names { text-align: center; font-size: clamp(30px, 4vw, 60px); font-weight: 700; color: #326fe1; word-break: keep-all; line-height: 1.8; animation: rolling-pulse .6s ease-in-out infinite alternate; }
.draw-result { text-align: center; width: 100%; }.draw-result h2 { font-size: 20px; font-weight: 500; color: #607b9f; margin: 0 0 22px; }.student-cards { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; max-height: 350px; overflow-y: auto; padding: 8px; }.student-card { border: 1px solid #ccdefb; border-radius: 18px; background: linear-gradient(145deg, white, #eff5ff); padding: 22px 26px; min-width: 145px; max-width: 100%; animation: card-arrive .45s both; animation-delay: var(--delay, 0ms); }.student-card strong { display: block; font-size: clamp(28px, 2.7vw, 42px); color: #204b8b; overflow-wrap: anywhere; }.student-card span { display: block; color: #879bb7; font-size: 12px; margin-top: 9px; }.student-cards.single .student-card { padding: 25px 60px; }.student-cards.single strong { font-size: clamp(44px, 5vw, 76px); }.draw-result p { font-size: 12px; margin: 18px 0 0; color: #7d91ab; }
.class-message { padding: 14px 20px; border: 1px solid #c6dafb; background: #eef5ff; color: #466b9d; border-radius: 12px; margin-bottom: 20px; font-size: 14px; }.class-message.error { border-color: #f0c8c8; background: #fff4f3; color: #ab4945; }
.class-roster { margin-top: 24px; background: #ffffffaa; border: 1px solid #e3eaf5; border-radius: 16px; padding: 18px 24px; }.class-roster summary { cursor: pointer; color: #547193; font-size: 14px; }.class-roster summary span { color: #8798b0; margin-left: 12px; font-size: 12px; }.roster-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }.roster-chip { border-radius: 9px; padding: 10px 14px; border: 1px solid #e0e8f4; background: white; color: #4a678d; font-size: 13px; }.roster-chip.leave { color: #aa7e3e; background: #fff7e9; border-color: #f0dfc1; }.class-roster p { color: #8a9bb0; font-size: 12px; margin: 15px 0 0; }
@keyframes card-arrive { from { opacity: 0; transform: translateY(15px) scale(.92); } to { opacity: 1; transform: translateY(0) scale(1); } }@keyframes rolling-pulse { from { opacity: .6; transform: translateY(-4px); } to { opacity: 1; transform: translateY(4px); } }
@media (min-width: 1700px) { .draw-stage { min-height: 580px; }.draw-settings { padding: 34px; }.draw-layout { grid-template-columns: 330px minmax(0, 1fr); } }
@media (max-width: 950px) { .workspace { width: calc(100% - 32px); }.draw-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 16px; }.draw-stage { padding: 22px; }.stage-label { display: none; }.class-metrics { gap: 10px; }.class-metrics article { padding: 16px; }.class-metrics small { grid-column: 1 / -1; }.class-metrics strong { grid-row: auto; } }
@media (max-width: 650px) { .draw-layout { display: flex; flex-direction: column; }.draw-settings { padding: 22px; }.draw-stage { min-height: 460px; }.class-metrics article { display: block; }.class-metrics strong { display: block; margin: 6px 0; font-size: 26px; }.class-metrics small { display: none; }.class-heading .soft-button { padding: 10px; font-size: 12px; }.draw-settings h2 { margin-bottom: 20px; }.strategy-help { min-height: auto; }.student-cards { max-height: 400px; }.round-info { padding-top: 12px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* 投影时只展示抽取舞台，保留操作按钮与可见的退出入口。 */
.exit-stage-fullscreen { display: none; }
.draw-stage:fullscreen { width: 100%; height: 100%; min-height: 0; border: 0; border-radius: 0; padding: clamp(20px, 4vh, 48px) clamp(20px, 5vw, 100px); overflow: auto; }
.draw-stage:fullscreen .exit-stage-fullscreen { display: inline-flex; margin-left: auto; }
.draw-stage:fullscreen .stage-label { margin-left: 24px; }
.draw-stage:fullscreen .stage-content { min-height: 180px; }
.draw-stage:fullscreen .student-cards { max-height: 58vh; gap: 24px; }
.draw-stage:fullscreen .student-card { padding: 30px 40px; }
.draw-stage:fullscreen .student-card strong { font-size: clamp(40px, 5vw, 90px); }
.draw-stage:fullscreen .student-cards.single strong { font-size: clamp(64px, 9vw, 160px); }
.draw-stage:fullscreen .draw-result h2 { font-size: clamp(22px, 2.5vw, 38px); }
.draw-stage:fullscreen #start-draw { font-size: clamp(24px, 2.3vw, 42px); padding: 22px 60px; }
.draw-stage:fullscreen .class-message { flex-shrink: 0; margin: 16px 0 0; }
