:root{font-family:Noto Sans SC,PingFang SC,Microsoft YaHei,system-ui,sans-serif;color:#172018;background:#f3f0e6;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}html{min-width:320px;background:#f3f0e6}body{margin:0;min-width:320px;min-height:100vh}button,input,textarea{font:inherit}button,a{-webkit-tap-highlight-color:transparent}a{color:inherit;text-decoration:none}button{color:inherit}.wordmark{display:inline-flex;align-items:center;font:800 .82rem/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.22em}.wordmark span{color:#f15b3a}.wordmark.dark{color:#172018}.auth-page{min-height:100vh;display:grid;grid-template-columns:minmax(330px,.9fr) minmax(460px,1.1fr);background:#f4f1e8}.auth-intro{min-height:100vh;padding:clamp(32px,5vw,72px);display:flex;flex-direction:column;justify-content:space-between;color:#f8f4e9;background:#163e32;background-image:radial-gradient(circle at 20% 80%,rgba(148,197,135,.18),transparent 34%),linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);background-size:auto,52px 52px,52px 52px}.auth-intro>div{max-width:510px}.auth-eyebrow{margin:0 0 18px;color:#a9d29c!important;font-size:.82rem!important;font-weight:750;letter-spacing:.16em}.auth-intro h1{max-width:520px;margin:0;font-size:clamp(3rem,6vw,6.5rem);line-height:.98;letter-spacing:-.065em}.auth-intro p{max-width:470px;margin:24px 0 0;color:#bdcec6;font-size:1rem;line-height:1.8}.auth-intro blockquote{margin:0;color:#91aaa0;font-family:serif;font-size:.9rem}.auth-panel{display:grid;place-items:center;padding:52px clamp(24px,7vw,110px)}.auth-card{width:min(440px,100%)}.auth-card-heading{margin-bottom:34px;display:flex;align-items:flex-start;gap:15px}.auth-card-heading span{margin-top:7px;color:#df5739;font:700 .68rem/1 ui-monospace,monospace}.auth-card h2{margin:0;font-size:2rem;letter-spacing:-.045em}.auth-card form{display:grid;gap:20px}label{display:grid;gap:9px;color:#34443b;font-size:.88rem;font-weight:700}input,textarea{width:100%;border:1px solid #cdd0c5;border-radius:11px;outline:0;color:#172018;background:#ffffff94;transition:border .18s,box-shadow .18s,background .18s}input{height:50px;padding:0 15px}textarea{min-height:210px;padding:14px 15px;resize:vertical;line-height:1.7}input:focus,textarea:focus{border-color:#2b7159;background:#fff;box-shadow:0 0 0 4px #2b71591a}.field-with-action{display:grid;grid-template-columns:1fr auto;gap:9px}.field-with-action button{min-width:104px;border:1px solid #b6bdb2;border-radius:11px;background:transparent;cursor:pointer;font-size:.82rem;font-weight:750}.field-with-action button:disabled{opacity:.45;cursor:not-allowed}.primary-button{min-height:52px;border:0;border-radius:11px;color:#fff;background:#1d5b47;font-weight:800;cursor:pointer;box-shadow:0 12px 28px #1d5b4729;transition:transform .18s,background .18s}.primary-button:hover:not(:disabled){transform:translateY(-2px);background:#164a3a}.primary-button:disabled{opacity:.6;cursor:wait}.auth-switch{margin:25px 0 0;color:#7b837c;font-size:.88rem;text-align:center}.auth-switch a{color:#1d5b47;font-weight:800}.form-error,.form-success{margin:-3px 0 0;padding:11px 13px;border-radius:9px;font-size:.83rem;line-height:1.5}.form-error{color:#9a3427;background:#fae4de}.form-success{color:#246147;background:#dfeee5}.roll-page{height:100dvh;overflow:hidden;padding:0 clamp(18px,4vw,56px);color:#101828;background:#f6f8fc}.roll-header{height:66px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e4e8f0}.roll-brand{display:inline-flex;align-items:center;gap:12px;font-size:1rem;font-weight:850;letter-spacing:-.02em}.brand-mark{width:34px;height:34px;padding:8px;display:flex;align-items:flex-end;justify-content:center;gap:3px;border-radius:11px;background:#4b5cff;box-shadow:0 8px 20px #4b5cff40}.brand-mark i{width:4px;border-radius:4px;background:#fff}.brand-mark i:nth-child(1){height:9px;opacity:.72}.brand-mark i:nth-child(2){height:17px}.brand-mark i:nth-child(3){height:13px;opacity:.84}.account-menu{display:flex;align-items:center;gap:14px;color:#667085;font-size:.82rem}.account-menu button{min-height:36px;padding:0 13px;border:1px solid #d8dee9;border-radius:10px;background:#fff;cursor:pointer;color:#344054;font-weight:700}.account-menu button:hover{border-color:#aab3c5}.loading-state{height:calc(100dvh - 66px);display:grid;place-items:center;color:#667085}.roll-workspace{width:min(1180px,100%);height:calc(100dvh - 66px);min-height:0;margin:0 auto;padding:24px 0 22px;display:flex;flex-direction:column}.course-heading{display:flex;align-items:center;justify-content:center;text-align:center}.course-heading h1{margin:0;font-size:clamp(1.75rem,3vw,2.65rem);line-height:1.08;color:#101828;letter-spacing:-.045em}.edit-button{min-height:44px;padding:0 16px;display:inline-flex;align-items:center;gap:8px;border:1px solid #d8dee9;border-radius:12px;background:#fff;box-shadow:0 4px 12px #1018280a;cursor:pointer;color:#344054;font-size:.85rem;font-weight:750}.edit-button:hover{border-color:#aeb8ca;transform:translateY(-1px)}.edit-button svg{width:17px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}.roll-stage{min-height:0;flex:1;margin-top:20px;display:grid;grid-template-rows:minmax(0,1fr) auto;gap:14px}.roster-panel{min-height:0;padding:18px 20px 16px;display:flex;flex-direction:column;border:1px solid #e2e7f0;border-radius:22px;background:#fff;box-shadow:0 16px 45px #29345b12}.roster-title{display:flex;align-items:center;gap:9px;margin-bottom:13px}.roster-title span{font-size:.9rem;font-weight:850}.roster-title small{padding:3px 8px;border-radius:20px;color:#667085;background:#f0f2f7;font-size:.72rem}.student-grid{min-height:0;flex:1;display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));grid-auto-rows:44px;gap:8px;align-content:start}.student-grid>span{min-width:0;padding:5px 8px;display:grid;place-items:center;overflow:hidden;border:1px solid #e3e7ee;border-radius:9px;color:#344054;background:#f8f9fc;font-size:.95rem;font-weight:700;text-align:center;text-overflow:ellipsis;transition:color .06s,background .06s,border-color .06s,transform .06s,box-shadow .06s}.student-grid.compact{grid-template-columns:repeat(auto-fill,minmax(88px,1fr));grid-auto-rows:42px;gap:7px}.student-grid.compact>span{padding:4px 6px;font-size:.9rem}.student-grid.dense{grid-template-columns:repeat(auto-fill,minmax(78px,1fr));grid-auto-rows:38px;gap:6px}.student-grid.dense>span{border-radius:8px;font-size:.82rem}.student-grid>span.active{z-index:1;border-color:#4b5cff;color:#fff;background:#4b5cff;transform:scale(1.04);box-shadow:0 8px 22px #4b5cff47}.student-grid>span.winner{animation:winner-pop .45s cubic-bezier(.2,.8,.2,1)}.empty-roster{flex:1;border:1px dashed #cbd2df;border-radius:14px;color:#4b5cff;background:#f8f9ff;cursor:pointer;font-weight:750}.winner-bar{min-height:64px;margin-top:14px;padding:10px 17px;display:flex;align-items:center;justify-content:space-between;gap:20px;border-radius:14px;color:#667085;background:#f5f7fb}.winner-bar small{font-size:.76rem;font-weight:750}.winner-bar strong{color:#344054;font-size:clamp(1rem,2vw,1.45rem);letter-spacing:-.02em}.winner-bar.revealed{color:#3343d8;background:#eef0ff}.winner-bar.revealed strong{color:#3343d8}.roll-actions{display:flex;align-items:stretch;justify-content:center;gap:10px}.roll-button{width:min(360px,calc(100% - 154px));min-height:62px;margin:0;padding:8px 18px 8px 10px;display:flex;align-items:center;justify-content:flex-start;gap:12px;border:0;border-radius:16px;color:#fff;background:#4b5cff;cursor:pointer;box-shadow:0 10px 24px #4b5cff3d;transition:transform .2s,background .2s}.roll-actions .edit-button{min-height:62px;padding:0 17px}.roll-button:hover:not(:disabled){transform:translateY(-1px);background:#3d4eea}.roll-button:disabled{cursor:not-allowed;opacity:.55;box-shadow:none}.roll-icon{width:46px;height:46px;flex:0 0 auto;display:grid;place-items:center;border-radius:12px;background:#ffffff24}.roll-icon svg{width:23px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}.roll-copy{display:grid;gap:2px;text-align:left}.roll-copy strong{font-size:.95rem}.roll-copy small{color:#ffffffb8;font-size:.7rem}.page-error{margin:20px 0 0;color:#a13b2d}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:20;padding:24px;display:grid;place-items:center;background:#1018288f;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.editor-modal{width:min(600px,100%);max-height:calc(100vh - 48px);overflow:auto;padding:clamp(24px,5vw,40px);border:1px solid rgba(255,255,255,.5);border-radius:24px;background:#fff;box-shadow:0 35px 100px #10182847}.modal-heading{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:30px}.modal-heading p{margin:0 0 6px;color:#788079;font-size:.75rem;font-weight:750;letter-spacing:.13em}.modal-heading h2{margin:0;font-size:2rem;letter-spacing:-.045em}.modal-heading>button{width:38px;height:38px;border:1px solid #c4c9c0;border-radius:50%;background:transparent;cursor:pointer;font-size:1.5rem;line-height:1}.editor-modal form{display:grid;gap:20px}.editor-modal label small{color:#7e867f;font-size:.75rem;font-weight:500}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:6px}.modal-actions button{min-height:46px;padding:0 19px;border:1px solid #bbc0b7;border-radius:10px;background:transparent;cursor:pointer;font-weight:750}.modal-actions .primary-button{border:0;background:#4b5cff}@keyframes winner-pop{0%{transform:scale(.93)}65%{transform:scale(1.08)}to{transform:scale(1.04)}}@media(prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;animation-iteration-count:1!important}}.admin-entry{padding:7px 12px;border-radius:10px;color:#3343d8;background:#eef0ff;font-size:.8rem;font-weight:750}.admin-entry:hover{background:#e2e6ff}.admin-page{min-height:100dvh;padding:0 clamp(18px,4vw,56px) 28px;background:#f6f8fc}.admin-body{width:min(1240px,100%);margin:0 auto;padding:22px 0;display:grid;grid-template-columns:minmax(240px,.32fr) minmax(0,1fr);gap:18px;align-items:start}.admin-card{border:1px solid #e2e7f0;border-radius:20px;background:#fff;box-shadow:0 16px 45px #29345b0f}.group-panel{padding:18px;position:sticky;top:22px}.channel-panel{padding:18px 20px 20px;min-height:460px;display:flex;flex-direction:column}.admin-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.admin-card-head h2{margin:0;font-size:1.05rem;letter-spacing:-.02em}.head-actions{display:inline-flex;align-items:center;gap:8px}.total-hint{color:#667085;font-size:.76rem}.ghost-button{min-height:36px;padding:0 12px;border:1px solid #d8dee9;border-radius:10px;background:#fff;cursor:pointer;color:#344054;font-size:.8rem;font-weight:750}.ghost-button:hover:not(:disabled){border-color:#aab3c5}.ghost-button:disabled{opacity:.5;cursor:not-allowed}.primary-button.small{min-height:36px;padding:0 14px;font-size:.82rem;border-radius:10px;background:#4b5cff;box-shadow:none}.group-list{margin:0;padding:0;list-style:none;display:grid;gap:6px}.group-list li{padding:10px 11px;display:flex;align-items:center;gap:8px;border:1px solid transparent;border-radius:11px;cursor:pointer}.group-list li:hover{background:#f7f8fc}.group-list li.active{border-color:#d6dbf7;background:#eef0ff}.group-name{flex:1;min-width:0;overflow:hidden;font-size:.9rem;font-weight:750;text-overflow:ellipsis;white-space:nowrap}.group-list li small{color:#667085;font-size:.74rem}.group-list .row-actions{display:none;gap:3px}.group-list li:hover .row-actions,.group-list li.active .row-actions{display:inline-flex}.group-list li small+.row-actions{margin-left:2px}.row-actions button{padding:2px 6px;border:0;border-radius:6px;background:#edf0f7;cursor:pointer;color:#475467;font-size:.72rem}.row-actions button:hover:not(:disabled){background:#e0e5f0}.row-actions button:disabled{opacity:.4;cursor:not-allowed}.channel-list{display:grid;gap:10px}.channel-card{padding:12px 13px;display:flex;align-items:center;gap:13px;border:1px solid #e6eaf2;border-radius:14px;background:#fcfdff}.channel-card.disabled{background:#f8f9fb;opacity:.72}.channel-logo{width:46px;height:46px;flex:0 0 auto;display:grid;place-items:center;overflow:hidden;border-radius:11px;color:#3343d8;background:#eef0ff;font-size:1.1rem;font-weight:800}.channel-logo img{width:100%;height:100%;object-fit:contain;background:#fff}.channel-info{flex:1;min-width:0;display:grid;gap:3px}.channel-info strong{display:inline-flex;align-items:center;gap:7px;font-size:.95rem}.channel-info strong b{padding:1px 6px;border-radius:6px;color:#475467;background:#eef1f6;font-size:.72rem}.channel-info small{color:#667085;font-size:.75rem}.source-url{margin:0;overflow:hidden;color:#98a2b3;font:.72rem/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;text-overflow:ellipsis;white-space:nowrap}.channel-actions{flex:0 0 auto;display:inline-flex;gap:6px}.channel-actions button{min-height:32px;padding:0 10px;border:1px solid #d8dee9;border-radius:9px;background:#fff;cursor:pointer;color:#344054;font-size:.76rem;font-weight:700}.channel-actions button:hover:not(:disabled){border-color:#aab3c5}.channel-actions button:disabled{opacity:.5;cursor:not-allowed}.admin-empty{margin:8px 0 0;padding:26px 16px;border:1px dashed #cbd2df;border-radius:14px;color:#667085;font-size:.85rem;text-align:center}.admin-foot{margin-top:auto;padding-top:16px;display:grid;gap:4px;color:#98a2b3;font-size:.74rem}.admin-foot code{padding:2px 6px;border-radius:6px;background:#f2f4f8;font-size:.72rem}.admin-toast{position:fixed;left:50%;bottom:28px;z-index:30;transform:translate(-50%);margin:0;padding:11px 20px;border-radius:12px;color:#fff;background:#3343d8;box-shadow:0 14px 34px #3343d84d;font-size:.84rem}.admin-error{position:fixed;left:50%;bottom:74px;z-index:30;transform:translate(-50%);margin:0;padding:10px 18px;border-radius:12px;color:#9a3427;background:#fae4de;font-size:.84rem}.compact-modal{width:min(460px,100%)}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}.editor-modal select{width:100%;height:50px;padding:0 13px;border:1px solid #cdd0c5;border-radius:11px;outline:0;color:#172018;background:#ffffff94}.editor-modal select:focus{border-color:#2b7159;background:#fff;box-shadow:0 0 0 4px #2b71591a}.checkbox-row{display:flex;align-items:center;gap:9px}.checkbox-row input{width:18px;height:18px}@media(max-width:780px){.auth-page{grid-template-columns:1fr}.auth-intro{min-height:330px;padding:30px 24px 42px}.auth-intro h1{font-size:3.2rem}.auth-intro blockquote{display:none}.auth-panel{padding:42px 24px 60px}.roll-header{height:62px}.roll-workspace{height:calc(100dvh - 62px);padding:18px 0 16px}.account-menu span{display:none}.course-heading{align-items:center}.roll-stage{margin-top:15px}.student-grid{grid-template-columns:repeat(auto-fill,minmax(78px,1fr));grid-auto-rows:40px;gap:6px}.student-grid>span{font-size:.88rem}.winner-bar{min-height:54px}.admin-body{grid-template-columns:1fr}.group-panel{position:static}.channel-card{flex-wrap:wrap}.channel-info{flex:1 1 160px}}@media(max-width:480px){.auth-intro{min-height:290px}.auth-intro h1{font-size:2.65rem}.field-with-action{grid-template-columns:1fr}.field-with-action button{min-height:44px}.course-heading h1{font-size:1.7rem}.roll-actions .edit-button{min-height:56px;padding:0 12px}.roster-panel{padding:14px}.student-grid{grid-template-columns:repeat(auto-fill,minmax(64px,1fr));grid-auto-rows:36px;gap:5px}.student-grid>span{padding:3px 4px;font-size:.8rem}.winner-bar{padding:8px 12px}.roll-button{min-height:56px}.modal-backdrop{padding:12px}.field-row{grid-template-columns:1fr}.channel-actions{width:100%;justify-content:flex-end}}
