:root{--purple:#7962ce;--purple-dark:#6550b7;--ink:#292d3d;--muted:#9596a6;--border:#eeedf3;--green:#4caa96;--bg:#f7f8fc}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:'Noto Sans SC',-apple-system,BlinkMacSystemFont,'Microsoft YaHei',sans-serif;font-size:14px;letter-spacing:.15px}button,a,input{font:inherit}button{cursor:pointer}button{transition:background .18s,transform .18s}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,a:focus-visible{outline:3px solid #b9a8eb;outline-offset:3px}svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;flex-shrink:0}.svg-defs{position:absolute;width:0;height:0;overflow:hidden}[hidden]{display:none!important}.sidebar{position:fixed;inset:0 auto 0 0;width:234px;background:white;border-right:1px solid var(--border);display:flex;flex-direction:column;padding:35px 22px 0;z-index:20}.brand{display:flex;gap:11px;align-items:center;color:var(--ink);text-decoration:none;font-size:20px;font-weight:800;letter-spacing:1px;margin:0 0 57px 7px}.brand-mark{display:grid;place-items:center;width:43px;height:43px;border-radius:13px;background:var(--purple);color:white;transform:rotate(-7deg);box-shadow:0 6px 12px #7962ce24}.brand-mark svg{width:29px;height:29px}.brand small{display:block;font-size:9px;letter-spacing:3.2px;font-weight:500;color:#a5a0b8;margin-top:5px}.workspace-label{font-size:10px;color:#a4a4b2;letter-spacing:1px;padding-left:15px;margin-bottom:17px}.workspace-label span{font-size:8px;margin-left:4px}nav{display:flex;flex-direction:column;gap:9px}.nav-item{display:flex;align-items:center;gap:12px;border:0;background:none;color:#7b7b8f;padding:15px 17px;border-radius:9px;text-align:left;font-weight:500;font-size:13px;white-space:nowrap}.nav-item.active{background:#efebfa;color:var(--purple-dark);font-weight:700}.nav-item:hover{background:#f5f2fb}.nav-dot{width:6px;height:6px;border-radius:50%;background:var(--purple);margin-left:auto}.side-count{background:#f0f0f5;color:#8a879b;border-radius:5px;padding:1px 7px;font-size:10px;margin-left:auto}.new-tag{font-size:9px;color:#9e8cce;background:#f1eef9;border-radius:4px;padding:2px 5px;margin-left:auto}.sidebar-lesson{margin-top:auto;margin-bottom:28px;background:#f8f6fc;border:1px solid #efeaf7;border-radius:12px;padding:17px 15px 0;overflow:hidden}.lesson-icon{color:var(--purple);font-size:25px;margin-bottom:8px}.sidebar-lesson strong{font-size:12px}.sidebar-lesson p{font-size:10px;line-height:2;color:#aaa4b7;margin-top:10px}.tiny-dice{height:67px;display:flex;align-items:center;justify-content:center;gap:12px;color:#b4a4e0}.tiny-dice span{font-size:49px;line-height:1;transform:rotate(-14deg)}.tiny-dice span:nth-child(2){transform:rotate(13deg);color:#d1c7ec;font-size:40px}.tiny-dice i{align-self:flex-start;color:#c1b5db;font-size:23px}.sidebar-help{border:0;background:none;display:flex;align-items:center;gap:10px;color:#858396;padding:12px;font-size:12px;margin-bottom:16px}.sidebar-help span{margin-left:auto}.profile{border-top:1px solid var(--border);padding:21px 0;display:flex;align-items:center;gap:11px}.avatar{border:0;background:#ece7f8;color:var(--purple);width:37px;height:37px;display:grid;place-items:center;border-radius:50%;font-size:13px;font-weight:600}.profile strong{font-size:11px;display:block}.profile small{display:block;font-size:9px;color:#a7a3b4;margin-top:5px}.app-shell{margin-left:234px}.topbar{height:77px;display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid var(--border);padding:0 39px}.breadcrumb-text{font-size:11px;color:#aaa7b7}.breadcrumb-text span{margin:0 17px;color:#d4d0dd}.breadcrumb-text strong{font-weight:500;color:#666477}.top-actions{display:flex;align-items:center;gap:22px;font-size:10px;color:#9190a0}.sync-state{display:flex;gap:7px;align-items:center}.sync-state i,.chart-foot i{width:6px;height:6px;border-radius:50%;background:#5eb69c;display:inline-block}.sync-state.error i{background:#e38a7c}.top-divider{height:17px;width:1px;background:#efedf4}.small-avatar{width:31px;height:31px;font-size:10px}main{max-width:1600px;margin:auto;padding:34px 39px 0}.page-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:29px}.eyebrow{font-size:9px;letter-spacing:2px;color:#a19ab5;margin:0 0 10px}h1{font-size:27px;font-weight:750;letter-spacing:.7px;margin:0 0 10px}h1 span{font-size:25px;color:#c0afd9;margin-left:9px;display:inline-block;transform:rotate(10deg)}.page-heading p{font-size:11px;color:#9593a5;margin:0}.heading-actions{display:flex;gap:10px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:41px;padding:10px 17px;border-radius:7px;font-size:11px;font-weight:500;border:1px solid transparent;white-space:nowrap}.btn svg{width:16px;height:16px}.btn-primary{background:var(--purple);border-color:var(--purple);color:white;box-shadow:0 4px 8px #7962ce13}.btn-primary:hover,.btn-primary:active{background:var(--purple-dark)!important;border-color:var(--purple-dark)!important}.btn-white{background:white;border-color:#e7e5ee;color:#777386}.btn-white:hover{background:#f4f0fb;border-color:#cec1ea;color:var(--purple-dark)}.class-strip{background:linear-gradient(105deg,#f1ecfb,#f9f6fd);border:1px solid #e8e0f5;border-radius:11px;padding:19px 23px;display:flex;align-items:center;justify-content:space-between;margin-bottom:21px}.class-info{display:flex;align-items:center;gap:14px}.class-icon{background:#e9e0f8;color:var(--purple);width:42px;height:42px;border-radius:10px;display:grid;place-items:center}.class-icon svg{width:25px;height:25px}.class-info strong{font-size:13px;font-weight:600;display:block;margin-bottom:7px}.live-pill{font-size:9px;color:#8471b3;background:#e9e1f5;padding:3px 7px;border-radius:4px}.class-meta{font-size:9px;color:#a49ab5;margin-left:10px}.class-meta b{margin:0 7px;font-weight:400}.class-code{border:0;border-left:1px solid #e4dbf1;display:flex;gap:14px;align-items:center;background:none;color:#9c8db5;padding-left:25px;font-size:10px}.class-code strong{color:#776098;font-size:21px;letter-spacing:4px;font-weight:600}.class-code svg{width:17px;height:17px}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:24px}.stat-card{background:white;border:1px solid var(--border);border-radius:10px;padding:20px 19px;display:flex;justify-content:space-between;gap:5px}.stat-label{font-size:10px;color:#8e8a9e}.stat-number{display:flex;gap:8px;align-items:baseline;margin:7px 0 7px}.stat-number strong{font-size:30px;line-height:1.3;letter-spacing:-.5px;font-family:Arial,sans-serif;font-weight:600}.stat-number span{font-size:10px;color:#aba6b8}.stat-card small{font-size:9px;color:#b2adbe}.stat-icon{width:35px;height:35px;border-radius:10px;display:grid;place-items:center}.stat-icon svg{width:18px;height:18px}.purple{color:#9b85cc;background:#f0ebf9}.mint{color:#75b9a6;background:#eaf6f1}.peach{color:#d5a47b;background:#fcf2e8}.blue{color:#8dadd9;background:#edf3fb}.panel{background:#fff;border:1px solid var(--border);border-radius:11px}.main-chart-panel{padding:24px 25px 0}.panel-heading{display:flex;justify-content:space-between;align-items:center}.panel-heading h2,h2{font-size:15px;font-weight:650;margin:0}.panel-heading p{font-size:10px;color:#aaa4b7;margin:9px 0 0}.label-soft{display:inline-block;padding:4px 7px;font-size:8px;background:#f0edf8;color:#a08abd;border-radius:4px;vertical-align:middle;margin-left:7px;font-weight:400}.chart-actions{display:flex;gap:12px;align-items:center}.segmented{display:inline-flex;gap:3px;background:#f5f4f8;border:1px solid #efedf3;border-radius:6px;padding:3px}.segmented button{border:0;background:none;border-radius:4px;color:#a19aac;padding:6px 13px;font-size:10px}.segmented button.active{background:white;color:#8370b7;box-shadow:0 1px 4px #39304b0b}.icon-button{border:1px solid #eae7ef;background:white;color:#a9a3b7;display:grid;place-items:center;border-radius:6px;width:32px;height:32px}.icon-button svg{width:15px;height:15px}.chart-legend{display:flex;align-items:center;justify-content:flex-end;gap:18px;margin:16px 0 0;color:#aaa3b7;font-size:9px}.chart-legend>span{display:flex;align-items:center;gap:6px}.legend-square{width:8px;height:8px;background:#aa95dc;border-radius:2px}.theory-switch{display:flex;align-items:center;gap:6px;cursor:pointer}.theory-switch input{accent-color:var(--purple);width:12px;height:12px}.histogram{height:252px;position:relative;padding:23px 0 25px 37px;margin-top:9px}.plot{height:100%;position:relative;display:grid;grid-template-columns:repeat(11,1fr);gap:12px;isolation:isolate}.plot-grid{position:absolute;inset:0;z-index:-1}.grid-line{position:absolute;width:100%;border-top:1px dashed #ecebf2}.grid-line span{position:absolute;right:calc(100% + 12px);top:-7px;color:#b5aebe;font:10px Arial;white-space:nowrap}.bar-column{height:100%;display:flex;justify-content:flex-end;align-items:center;flex-direction:column;position:relative}.bar{width:72%;max-width:58px;background:#ae99dd;border-radius:4px 4px 0 0;position:relative;min-height:0;transition:height .45s ease;background-image:linear-gradient(to top,transparent calc(100% - 1px),#ffffff9e 1px);background-size:100% var(--cell-height,100%)}.bar.mid{background-color:#8e73cb}.bar.edge{background-color:#d3c6ec}.bar-value{position:absolute;bottom:calc(100% + 6px);width:100%;text-align:center;font-size:9px;color:#a99cbe;white-space:nowrap}.bar-label{position:absolute;top:calc(100% + 10px);font:11px Arial;color:#94899f}.theory-line{position:absolute;width:85%;border-top:2px dashed #dfa865;z-index:3;pointer-events:none}.chart-empty{position:absolute;top:45%;left:50%;transform:translate(-50%,-50%);text-align:center;color:#b3a8c4;font-size:11px;background:#ffffffed;padding:12px 25px;border-radius:8px;white-space:nowrap}.chart-foot{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #f1eff6;margin-top:19px;padding:14px 0;font-size:9px;color:#aaa4b6}.chart-foot>span:first-child{display:flex;gap:6px;align-items:center}.chart-foot b{font-weight:400;padding:0 8px}.chart-foot i{width:5px;height:5px}.section-heading{display:flex;align-items:center;justify-content:space-between;margin:27px 0 17px}.section-heading h2{font-size:14px}.section-heading h2 span{font-size:9px;color:#aaa2b6;font-weight:400;margin-left:11px}.section-heading p{font-size:10px;color:#aaa4b6;margin:8px 0 0}.text-link{background:none;border:0;display:inline-flex;align-items:center;gap:7px;color:#9985bf;font-size:10px;padding:4px 0}.text-link svg{width:13px;height:13px}.group-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:15px}.group-card{padding:17px 17px 12px;text-align:left;color:var(--ink);cursor:pointer;transition:transform .18s,border-color .18s}.group-card:hover{transform:translateY(-3px);border-color:#cfc0e8}.group-card-top{display:flex;align-items:center;justify-content:space-between;gap:5px}.group-name{display:flex;gap:8px;align-items:center;font-size:11px;font-weight:600}.group-number{font-family:Arial,sans-serif;color:#a692c6;background:#f1edf9;border-radius:7px;font-size:10px;width:27px;height:27px;display:grid;place-items:center}.group-status{font-size:8px;color:#bdac89;white-space:nowrap}.group-status.done{color:#67aa94}.mini-chart{height:59px;display:flex;align-items:flex-end;justify-content:space-between;gap:4px;margin:20px 3px 12px;border-bottom:1px solid #f0edf6}.mini-chart span{flex:1;background:#c8b8e4;border-radius:2px 2px 0 0;min-height:2px}.mini-chart span:nth-child(n+4):nth-child(-n+8){background:#a38ad3}.group-card-bottom{font-size:9px;color:#aaa3b5;display:flex;justify-content:space-between}.group-card-bottom strong{color:#91839f;font-weight:500}.progress{height:4px;background:#f1edf8;border-radius:5px;margin-top:10px}.progress-bar{background:#b39cdb;border-radius:5px}.empty-groups{grid-column:1/-1;min-height:148px;border:1px dashed #ddd5ea;border-radius:11px;display:flex;align-items:center;justify-content:center;flex-direction:column;color:#a496b6;background:#fcfbfe;gap:9px}.empty-groups svg{color:#baacd0;width:26px;height:26px}.empty-groups strong{font-size:12px;font-weight:500}.empty-groups p{font-size:10px;margin:0}.explore-banner{background:#f0edf8;border:1px solid #e8e2f2;border-radius:10px;padding:19px 23px;display:flex;align-items:center;gap:18px;margin-top:24px}.explore-mark{font-size:37px;color:#aa95ca}.explore-banner strong{font-size:12px;color:#84719f;font-weight:600}.explore-banner p{font-size:10px;color:#b0a2c0;margin:6px 0 0}.explore-banner .btn{margin-left:auto;background:#faf8fd;border-color:#e7dff1;color:#9984b7;font-size:10px}footer{display:flex;justify-content:space-between;color:#b6b0c1;font-size:9px;padding:25px 0}footer b{font-weight:400;padding:0 7px}.simulation-intro{padding:14px 0 26px}.simulation-intro .label-soft{margin:0 0 14px}.simulation-intro h2{font-size:25px;margin-bottom:12px}.simulation-intro p{font-size:12px;color:#9991a8}.sim-settings{display:flex;gap:14px;align-items:center;margin-top:24px}.sim-settings .segmented button{padding:11px 20px}.theory-key{font-size:10px;color:#cf9f6c}.insight-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:22px}.insight{padding:25px}.insight>span{font-size:10px;color:#af9acb}.insight h3{font-size:15px;margin:15px 0 12px}.insight p{font-size:12px;color:#a49aaf;line-height:1.9;margin:0}.group-tools{display:flex;gap:20px;align-items:center;margin-top:28px;color:#aea6b8;font-size:10px}.danger-text{color:#c38585}.student-panel{padding:30px;max-width:900px;margin:auto}.student-panel>.label-soft{margin:0 0 15px}.student-panel h2{font-size:25px;margin-bottom:13px}.student-panel p{color:#a097ac;line-height:1.9;font-size:12px}.student-progress{margin:26px 0}.student-progress strong{font-size:25px;color:var(--purple)}.student-progress span{margin-left:10px;color:#aaa1b5;font-size:11px}.sum-buttons{display:grid;grid-template-columns:repeat(6,1fr);gap:12px}.sum-btn{border:1px solid #e8e0f3;border-radius:12px;background:#f8f5fd;color:#8a70b8;font-size:30px;font-weight:600;min-height:78px}.sum-btn:hover{background:#e9e0f7;transform:translateY(-2px)}.sum-btn small{display:block;font-size:9px;color:#b3a3c7;font-weight:400;margin-top:2px}.student-bottom{display:flex;justify-content:space-between;align-items:center;margin-top:22px;color:#a196ac;font-size:11px}.modal-backdrop-custom{position:fixed;inset:0;z-index:100;background:#2d25465c;backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;padding:24px}.dialog{width:100%;max-width:510px;max-height:90vh;overflow:auto;background:white;border-radius:18px;padding:36px;position:relative;box-shadow:0 30px 100px #29203c22}.dialog-close{position:absolute;right:18px;top:12px;border:0;background:none;font-size:27px;color:#b6a9c7}.dialog h2{font-size:22px;margin:3px 0 12px}.dialog p{font-size:12px;color:#a298ae;line-height:1.9}.dialog label{display:block;font-size:12px;margin:20px 0 9px;color:#81758f}.form-control{border:1px solid #e3dbed;border-radius:8px;font-size:14px;padding:12px 14px;background:#fcfbfd}.form-control:focus{box-shadow:0 0 0 3px #eee8f7;border-color:#b49bd4}.dialog .btn{font-size:12px}.dialog .submit-btn{width:100%;margin-top:24px}.dialog-kicker{font-size:10px;letter-spacing:2px;color:#ae98ce;margin-bottom:13px}.share-code{font-size:42px;letter-spacing:9px;color:#8e73ba;background:#f5f0fb;padding:22px 10px;text-align:center;border-radius:10px;margin:23px 0}.dialog-error{color:#c57575;font-size:11px;margin-top:14px}.dialog ol{padding-left:20px;font-size:12px;color:#968aa3;line-height:2.4}.dialog .record-list{display:flex;flex-wrap:wrap;gap:7px;margin-top:15px}.record-list span{display:grid;place-items:center;width:30px;height:30px;background:#f1ebfa;color:#9679bc;border-radius:6px;font-size:11px}.dialog-actions{display:flex;gap:12px;margin-top:22px}.dialog-actions .btn{flex:1}#toast{position:fixed;bottom:30px;left:calc(50% + 100px);transform:translateX(-50%);background:#645479;color:white;padding:13px 23px;border-radius:9px;font-size:12px;z-index:200;box-shadow:0 5px 22px #4f39652e}.error-banner{background:#fff1ed;color:#bd806e;border:1px solid #f0d8cc;padding:13px 17px;margin-bottom:20px;border-radius:8px;font-size:12px}.offline-note{font-size:11px;color:#bb8c6b}body.student-mode nav,body.student-mode .sidebar-lesson{display:none}body.student-mode .sidebar-help{margin-top:auto}body.student-mode .heading-actions #createBtn{display:none}
@media(min-width:1600px){main{padding-top:42px}.histogram{height:300px}.stat-card{padding:24px}.group-card{padding:20px}.mini-chart{height:75px}}
@media(max-width:1200px){.sidebar{width:200px;padding-left:15px;padding-right:15px}.app-shell{margin-left:200px}main{padding:28px 25px 0}.topbar{padding:0 25px}.stat-card{padding:17px 13px}.stat-icon{width:29px;height:29px}.stat-number strong{font-size:27px}.stat-card small{font-size:8px}.group-grid{gap:11px}.group-card{padding:15px 12px}.group-name{gap:5px;font-size:10px}.group-number{width:23px;height:23px}.class-meta{font-size:8px}.class-code{padding-left:16px;gap:10px}.class-code strong{font-size:19px}}
@media(max-width:1000px){.sidebar{width:178px}.app-shell{margin-left:178px}.brand{font-size:16px;margin-left:0}.brand-mark{width:35px;height:35px}.brand small{font-size:8px}.workspace-label span{display:none}.nav-item{padding:14px 10px;font-size:12px;gap:9px}.new-tag{display:none}.sidebar-lesson{padding:12px}.sidebar-lesson strong{font-size:10px}.sidebar-lesson p{font-size:9px}.topbar{height:67px}.subject-tag{display:none}main{padding:25px 20px 0}h1{font-size:23px}.page-heading p{font-size:10px}.heading-actions{gap:7px}.heading-actions .btn{font-size:10px;padding:9px 12px}.class-meta{display:block;margin:7px 0 0}.class-info strong{font-size:12px}.class-code{flex-direction:column;gap:3px}.class-code svg{display:none}.class-info{gap:10px}.stats-grid{gap:10px}.stat-icon{display:none}.stat-card{padding:17px 12px}.stat-label{font-size:9px}.stat-card small{font-size:8px}.stat-number{gap:4px}.stat-number span{font-size:9px}.stat-number strong{font-size:27px}.group-grid{grid-template-columns:repeat(2,1fr)}.mini-chart{height:65px}.explore-banner{padding:17px;gap:12px}.explore-banner strong{font-size:11px}.explore-banner p{font-size:9px}.explore-banner .btn{padding:9px 10px;font-size:9px}.plot{gap:6px}.bar{width:80%}.sim-settings .segmented button{padding:9px 12px}.insight{padding:20px}}
@media(max-width:650px){.sidebar{position:sticky;top:0;height:61px;width:100%;padding:0 15px;flex-direction:row;align-items:center;border-right:0;border-bottom:1px solid var(--border);gap:12px}.brand{font-size:13px;margin:0;gap:7px}.brand-mark{width:30px;height:30px;border-radius:9px}.brand-mark svg{width:23px;height:23px}.brand small,.workspace-label,.sidebar-lesson,.sidebar-help,.profile{display:none}.sidebar nav{margin-left:auto;flex-direction:row;gap:1px}.nav-item{font-size:10px;padding:9px 8px;gap:4px;border-radius:6px}.nav-item svg{width:14px;height:14px}.nav-dot,.side-count{display:none}.app-shell{margin-left:0}.topbar{height:47px;padding:0 18px}.top-actions{gap:10px;font-size:9px}.top-divider,.small-avatar{display:none}.breadcrumb-text{font-size:10px}main{padding:23px 16px 0}.page-heading{align-items:flex-start;gap:10px;margin-bottom:20px}.eyebrow{font-size:7px;letter-spacing:1.4px}h1{font-size:21px}h1 span{font-size:18px;margin-left:1px}.page-heading p{font-size:9px;max-width:195px;line-height:1.8}.heading-actions{flex-direction:column;gap:6px}.heading-actions .btn{min-height:31px;padding:6px 10px;font-size:9px}.heading-actions .btn svg{width:12px;height:12px}.class-strip{padding:15px 12px;gap:7px}.class-icon{display:none}.class-info strong{font-size:11px;max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.class-meta{font-size:8px}.class-meta b{margin:0 3px}.class-code{padding-left:11px}.class-code strong{font-size:17px;letter-spacing:2px}.class-code span{font-size:8px}.stats-grid{grid-template-columns:repeat(2,1fr);gap:9px;margin-bottom:18px}.stat-card{padding:15px}.stat-icon{display:grid}.stat-number strong{font-size:29px}.stat-card small{font-size:8px}.main-chart-panel{padding:18px 14px 0}.panel-heading h2{font-size:12px}.label-soft{font-size:7px;padding:3px 5px;margin-left:3px}.panel-heading p{font-size:8px;line-height:1.8;margin-top:7px;max-width:210px}.chart-actions{gap:5px}.segmented button{padding:5px 8px;font-size:9px}.icon-button{width:26px;height:26px}.chart-legend{font-size:8px;gap:10px;margin-top:18px}.histogram{height:234px;padding-left:25px}.plot{gap:4px}.bar{width:90%;border-radius:3px 3px 0 0}.bar-value{font-size:8px}.bar-label{font-size:10px}.grid-line span{font-size:8px;right:calc(100% + 5px)}.chart-foot{font-size:7px;gap:5px;margin-top:14px;line-height:1.7}.chart-foot b{padding:0 2px}.section-heading{margin-top:22px;gap:5px}.section-heading h2{font-size:12px}.section-heading p{font-size:8px}.section-heading h2 span{font-size:8px;margin-left:4px}.text-link{font-size:8px}.group-grid{gap:10px}.group-card{padding:14px 12px}.group-name{font-size:10px}.mini-chart{height:56px;margin-top:16px}.group-card-bottom{font-size:8px}.explore-banner{margin-top:18px;padding:16px 13px;gap:10px;flex-wrap:wrap}.explore-mark{font-size:28px}.explore-banner strong{font-size:10px}.explore-banner p{font-size:8px}.explore-banner .btn{margin-left:38px;min-height:32px}.explore-banner .btn svg{width:13px;height:13px}footer{font-size:8px;padding:20px 0}.simulation-intro h2{font-size:23px}.simulation-intro p{font-size:11px;line-height:1.8}.sim-settings{flex-wrap:wrap}.sim-settings .segmented{width:100%}.sim-settings .segmented button{flex:1;padding:10px 8px}.insight-grid{grid-template-columns:1fr;gap:12px}.insight p{font-size:11px}.group-tools{align-items:flex-start;gap:10px;font-size:8px}.student-panel{padding:22px 16px}.sum-buttons{grid-template-columns:repeat(4,1fr);gap:9px}.sum-btn{font-size:27px;min-height:72px}.student-bottom{font-size:9px;gap:10px}.student-bottom .btn{font-size:9px;padding:8px}.dialog{padding:29px 24px}.dialog h2{font-size:21px}.share-code{font-size:34px;letter-spacing:6px}#toast{left:50%;width:max-content;max-width:90%;font-size:11px}.theory-key{font-size:8px}.chart-empty{font-size:9px;padding:10px}body.student-mode .sidebar{justify-content:center}}

.accumulate-controls{margin-right:auto;display:flex;align-items:center;gap:9px;font-size:9px}.accumulate-controls button{border:1px solid #e9e1f4;background:#faf7fe;color:#9c83c3;border-radius:5px;padding:4px 8px;font-size:9px}.accumulate-controls span{color:#b0a3c1}@media(max-width:650px){.chart-legend{flex-wrap:wrap}.accumulate-controls{width:100%}.accumulate-controls button{font-size:8px}.accumulate-controls span{font-size:8px}}

.stat-label{color:#81768f;font-size:11px}.stat-card small{color:#a096ad;font-size:10px}.panel-heading p,.section-heading p{color:#9a8fa7;font-size:11px}.chart-foot{color:#9a8da5;font-size:10px}.page-heading p{color:#93869f}.grid-line span,.bar-label{color:#9d8dac}.group-card-bottom{color:#9c8da8;font-size:10px}.bar-value{color:#947cae;font-size:10px}@media(max-width:1000px){.stat-card small{font-size:9px}.stat-label{font-size:10px}.panel-heading p,.section-heading p{font-size:10px}.chart-foot{font-size:8px}}@media(max-width:650px){.chart-foot{font-size:8px}.group-card-bottom{font-size:9px}.bar-value{font-size:8px}.stat-label{font-size:11px}.stat-card small{font-size:9px}}

@media(min-width:651px) and (max-width:900px){.stats-grid{grid-template-columns:repeat(2,1fr)}.stat-icon{display:grid}.stat-card{padding:19px}.stat-card small{font-size:10px}.stat-label{font-size:11px}}

.brand{flex-shrink:0;white-space:nowrap}@media(max-width:420px){.sidebar{gap:8px}.sidebar nav .nav-item{padding:9px 7px}.sidebar nav .nav-item svg{display:none}}

.settings-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.settings-grid label{margin-top:16px}.settings-grid .form-control{padding:10px 8px;font-size:13px}@media(max-width:650px){.settings-grid{grid-template-columns:1fr 1fr 1fr;gap:6px}.settings-grid .form-control{font-size:12px;padding:9px 6px}}
/* Dice sum colors: 2,3,4,10,11,12 blue; 5 through 9 red. */
.bar.blue,.mini-chart span.blue{background-color:#3986e8}
.bar.red,.mini-chart span.red{background-color:#e7484f}
.bar.blue .bar-value{color:#286bbd}
.bar.red .bar-value{color:#c7353d}
.sum-btn.blue{background:#eef5ff;border-color:#c5dcfa;color:#286bbd}
.sum-btn.red{background:#fff0f1;border-color:#facbd0;color:#c7353d}
.sum-btn.blue:hover{background:#deecff}
.sum-btn.red:hover{background:#ffe0e3}
.sum-btn.blue small{color:#5786bc}
.sum-btn.red small{color:#c16d73}
.legend-square.blue{background:#3986e8}.legend-square.red{background:#e7484f}

/* Random dice controls. */
.dice-stage{background:#faf8ff;border:1px solid #e8e0f3;border-radius:16px;padding:28px 16px;text-align:center}
.category-totals{display:flex;align-items:stretch;justify-content:center;gap:16px;flex-wrap:wrap;border-top:1px solid #f1eff6;padding:14px 0 3px}.category-total{display:flex;align-items:center;gap:9px;flex:1;max-width:420px;min-width:260px;padding:14px 22px;border-radius:9px}.category-total.a{background:#eef5ff;color:#286bbd}.category-total.b{background:#fff0f1;color:#c7353d}.category-dot{width:10px;height:10px;border-radius:50%;background:#3986e8}.category-total.b .category-dot{background:#e7484f}.category-total small,.category-total strong{display:block}.category-total small{font-size:9px;opacity:.78}.category-total strong{font-size:20px}.category-total em{font-style:normal;font-size:12px;margin-left:auto;opacity:.78}.category-total-caption{width:100%;text-align:center;color:#9b90ac;font-size:9px}.visualization-fullscreen{background:#fff!important;padding:30px!important;overflow:auto}.visualization-fullscreen .histogram{height:min(52vh,520px)}
.count-table{margin:15px 0 0;border:1px solid #ebe8f1;border-radius:9px;overflow:hidden;background:#fff}.count-table-title{font-size:10px;color:#91879f;padding:9px 12px;border-bottom:1px solid #f0edf5}.count-table-row{display:grid;grid-template-columns:repeat(11,1fr)}.count-cell{text-align:center;padding:8px 3px;border-right:1px solid #f0edf5}.count-cell:last-child{border-right:0}.count-cell span,.count-cell strong,.count-cell small{display:block}.count-cell span{font:13px Arial;color:#4b4658}.count-cell strong{font:600 15px Arial;margin-top:5px}.count-cell small{font-size:8px;color:#9f96aa}.count-cell.blue strong{color:#3986e8}.count-cell.red strong{color:#e7484f}
.dice-pair{display:flex;align-items:center;justify-content:center;gap:20px;margin-bottom:24px}
.die{width:90px;height:90px;display:grid;place-items:center;border-radius:18px;background:white;border:1px solid #ded5f1;box-shadow:0 6px 14px #7962ce12;font-family:'Segoe UI Symbol','Arial Unicode MS',sans-serif;font-size:76px;line-height:1;color:#6550b7}
.dice-operator{font-size:26px;color:#a89abf}.dice-sum{font-size:42px;min-width:52px;color:#7962ce;background:none}.dice-sum.red{color:#e7484f}.dice-sum.blue{color:#3986e8}
.roll-button{font-size:16px;min-height:52px;padding:12px 28px}.dice-caption{font-size:11px;color:#9b90ac;margin-top:14px}
.rolling .die{animation:dice-shake .16s infinite alternate}
@keyframes dice-shake{from{transform:rotate(-10deg) translateY(-3px)}to{transform:rotate(10deg) translateY(3px)}}
@media(prefers-reduced-motion:reduce){.rolling .die{animation:none}}
@media(max-width:650px){.dice-pair{gap:9px}.die{width:64px;height:64px;font-size:54px;border-radius:13px}.dice-operator{font-size:20px}.dice-sum{font-size:32px;min-width:36px}.roll-button{font-size:14px}.dice-caption{font-size:10px}}
/* Requirement updates: yellow A group, count based charts, compact columns and centered summaries. */
.bar.blue,.mini-chart span.blue{background-color:#f1c40f}.bar.blue .bar-value{color:#b48600}.legend-square.blue{background:#f1c40f}.sum-btn.blue{background:#fff9db;border-color:#f4dc75;color:#b48600}.sum-btn.blue:hover{background:#fff2b3}.sum-btn.blue small{color:#b79529}
.dice-sum.blue{color:#d4a900}
.count-cell.blue{background:#fff9db}.category-total.a{background:#fff9db;color:#9b7600}.category-winner{width:100%;text-align:center;color:#c58b00;font-size:18px;font-weight:700;padding:4px 0}.category-winner span{display:inline-block;margin-right:7px;color:#d59c00;font-size:21px}.category-total-caption{order:4}
.count-cell.blue strong{color:#d4a900!important}.category-dot{background:#d4a900}.category-total.a .category-dot{background:#d4a900}.category-total.a strong{color:#b48600}
.mini-chart span.blue,.mini-chart span:nth-child(n+1):nth-child(-n+3),.mini-chart span:nth-child(n+9):nth-child(-n+11){background:#f1c40f!important}.mini-chart span.red,.mini-chart span:nth-child(n+4):nth-child(-n+8){background:#e7484f!important}
.group-winner{min-height:18px;text-align:center;color:#c58b00;font-size:10px;font-weight:700;margin:-5px 0 5px}.group-winner span{color:#d59c00;font-size:13px;margin-right:4px}
.plot{gap:0}.bar{width:100%;max-width:none;border-radius:2px 2px 0 0}.chart-legend{font-size:10px}.sim-custom{display:flex;align-items:center;gap:7px;color:#9d91ac;font-size:10px}.sim-custom input{width:100px;border:1px solid #e3dbed;border-radius:6px;padding:8px 9px;color:#6d6280;background:#fff}.student-result{margin-top:20px;padding:18px;border-radius:12px;background:#fbf8ff;border:1px solid #e9e1f4;text-align:center}.result-title{font-size:13px;color:#7962ce;font-weight:650}.result-cards{display:flex;justify-content:center;gap:16px;margin:15px auto;max-width:700px}.result-card{flex:1;max-width:300px;padding:14px 25px;border-radius:9px;display:flex;justify-content:space-between;align-items:center;font-size:12px}.result-card.a{background:#fff9db;color:#9b7600}.result-card.b{background:#fff0f1;color:#c7353d}.result-card strong{font-size:20px}.winner{font-size:18px;font-weight:700;color:#c58b00}.winner small{font-size:11px;font-weight:400;margin-left:8px;color:#a18b9f}@media(max-width:650px){.count-table{overflow-x:auto}.count-table-row{min-width:620px}.category-total{min-width:0;max-width:none}.result-cards{gap:8px}.result-card{padding:12px 9px;font-size:10px}.result-card strong{font-size:16px}.sim-custom{width:100%}.sim-custom input{flex:1}}
