.room-tabs{display:flex;gap:6px;border-bottom:1px solid #d5dfda;margin:0 0 24px;padding-bottom:10px}
.room-tabs button{background:transparent;color:#566b61;padding:10px 20px;border:0;border-radius:6px;font-weight:600}
.room-tabs button.active{background:#254b40;color:white}
#tests-room{letter-spacing:0}#tests-room h1{font-size:28px}#tests-room h2{font-size:18px}#tests-room h3{font-size:16px}
.test-layout{display:grid;grid-template-columns:310px minmax(0,1fr);gap:32px;margin-top:22px}
.topic-sidebar{min-width:0;border-right:1px solid #d5dfda;padding-right:22px}.topic-sidebar .section-title{gap:8px}.topic-sidebar h2{margin:0}
.topic-column-head{display:flex;justify-content:space-between;color:#65776e;font-size:12px;padding:14px 6px 8px}
.topic-chapter{border-top:1px solid #d5dfda}.topic-chapter summary{cursor:pointer;padding:13px 0;font-weight:600;font-size:14px;overflow-wrap:anywhere}
.topic-row{display:grid;grid-template-columns:minmax(0,1fr) 28px;gap:10px;align-items:center;padding:8px 4px;border-radius:4px}
.topic-row:hover{background:#e8eeeb}.topic-choice{display:flex!important;align-items:center;gap:8px;font-size:13px;margin:0!important;cursor:pointer;min-width:0}
#tests-room input[type=checkbox],#tests-room input[type=radio]{width:17px;height:17px;flex:0 0 17px;margin:0;accent-color:#254b40}
.topic-choice span{flex:1;overflow-wrap:anywhere}.topic-choice small{color:#637970;font-size:12px}.learned-check{display:flex;justify-content:center;margin:0!important}
#tests-room .chapter-learned{display:flex;align-items:center;justify-content:flex-end;gap:8px;font-size:12px;color:#65776e;margin:0 4px 8px}
.test-content{min-width:0}.test-builder{border-bottom:1px solid #d5dfda;padding-bottom:26px}.test-modes{width:100%;display:flex!important}.test-modes button{flex:1;min-width:0;font-size:14px;padding:12px 8px;white-space:normal}
.selected-topics{font-size:14px;min-height:24px;overflow-wrap:anywhere;color:#254b40}.test-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
#tests-room label{font-size:13px;display:block;margin:10px 0}#tests-room input:not([type=checkbox]):not([type=radio]),#tests-room select{width:100%;min-width:0;border:1px solid #c8d5cf;border-radius:6px;padding:10px;background:#fff;color:#223e33}
.test-generate{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:14px}.test-generate p{font-size:13px;line-height:1.7;flex:1}.test-generate button{flex-shrink:0}
.test-history-section,.library-browse,.paper-preview{padding:24px 0;border-bottom:1px solid #d5dfda}.test-history-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0;border-bottom:1px solid #e2e8e4}.test-history-row strong{font-size:14px;overflow-wrap:anywhere}.test-history-row small{display:block;color:#65776e;margin-top:4px}.test-history-row button{flex-shrink:0}
.library-search{display:grid;grid-template-columns:minmax(0,1fr) minmax(130px,180px) auto;gap:10px}.library-item,.paper-question{padding:20px 0;border-bottom:1px solid #dfe6e2}.library-item h3,.paper-question h3{margin:0 0 12px}.question-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;line-height:1.9}
.topic-tags{font-size:12px;color:#65776e;margin:10px 0 0;line-height:1.8;overflow-wrap:anywhere}.topic-tags .cross-topic{color:#8b4754;margin-right:8px}.paper-actions{display:flex;gap:8px;flex-wrap:wrap}.paper-actions button{font-size:13px}.paper-preview h2{overflow-wrap:anywhere}.paper-question img{display:block;max-width:100%;max-height:280px;margin:16px auto}.paper-answer{margin-top:20px;padding-top:12px;border-top:1px dashed #bfcec6}.paper-answer h4{font-size:14px;margin:12px 0 6px}.katex-display{overflow-x:auto;overflow-y:hidden;padding:5px 0}
#library-summary{font-size:14px}#progress-status,#download-status{font-size:12px;min-height:20px}.test-builder button:disabled{opacity:.5;cursor:not-allowed}
@media(min-width:1100px){#topic-tree{max-height:calc(100vh - 270px);overflow-y:auto;padding-right:6px}.topic-sidebar{align-self:start;position:sticky;top:20px}}
@media(max-width:900px){.test-layout{grid-template-columns:245px minmax(0,1fr);gap:20px}.topic-sidebar{padding-right:14px}.test-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.library-search{grid-template-columns:minmax(0,1fr) auto}.library-search select{grid-row:2;grid-column:1 / -1}.test-generate{align-items:flex-start}}
@media(max-width:650px){#tests-room h1{font-size:23px}.test-layout{display:block}.topic-sidebar{position:static;border-right:0;border-bottom:1px solid #d5dfda;padding:0 0 20px;margin-bottom:24px}#topic-tree{max-height:340px;overflow-y:auto}.test-modes button{font-size:12px}.test-generate{flex-wrap:wrap;gap:8px}.test-generate p{flex-basis:100%;margin:4px 0}.test-generate button{width:100%}.paper-actions button{flex:1 1 45%;padding:10px 6px}.room-tabs{margin-top:4px}.room-tabs button{flex:1;padding:10px}.paper-preview .page-heading{align-items:flex-start}.paper-preview .page-heading button{flex-shrink:0}#tests-room .page-heading{gap:12px}#tests-room .page-heading>button{flex-shrink:0}}
