#classroom-lobby[hidden],#shared-classroom[hidden],#classroom-create[hidden],#classroom-notice[hidden]{display:none!important}
#classroom-lobby{height:100vh;height:100dvh;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;padding:clamp(22px,5vw,64px);background:linear-gradient(140deg,#f8f0e4,#ead6b8);scrollbar-width:thin;scrollbar-color:#aa8a63 #efe2ce}
.lobby-heading,.lobby-tools,.classroom-list,.create-room{max-width:1080px;margin-inline:auto}
.lobby-heading a{color:#735333;text-decoration:none;font-weight:700}
.lobby-heading h1{font-size:clamp(26px,4vw,36px);margin:28px 0 10px;font-weight:800}
.lobby-heading p{color:#79634a}.lobby-tools{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-block:28px 16px;color:#79634a;font-size:14px}
#classroom-lobby button,#classroom-history-dialog button,#classroom-history{border:1px solid #d6c2a5;border-radius:9px;background:#fffbf4;color:#62492c;padding:9px 15px;font:inherit}
#classroom-lobby button:disabled{opacity:.55;cursor:default}
.classroom-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));gap:18px}
.classroom-card{border:1px solid #d8c2a3;background:#fffbf4;border-radius:16px;padding:24px;box-shadow:0 8px 24px #7856360c;display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px}
.classroom-card h2{font-size:21px;font-weight:750;margin:0;grid-column:1/-1}.classroom-card p{grid-column:1/-1;min-height:44px;font-size:14px;margin:0;color:#826d55;overflow-wrap:anywhere}.classroom-card span{font-size:14px;color:#826d55}
#classroom-lobby .classroom-card button,.create-room button[type=submit]{background:#4f6b55;color:#fff;border-color:#4f6b55}
#classroom-lobby .new-classroom{display:grid;place-content:center;border-style:dashed;min-height:194px;background:#ffffff45;font-size:18px}
.create-room{margin-block:24px;background:#fffbf4;border:1px solid #d8c2a3;border-radius:16px;padding:24px}.create-room h2{font-size:21px}.create-room label{display:grid;gap:8px;margin-block:16px}.create-room input{border:1px solid #d8c2a3;padding:12px;border-radius:8px;min-width:0}.create-room p{font-size:13px;color:#826d55}.create-room>div{display:flex;gap:12px}
#classroom-notice{position:fixed;z-index:1090;left:50%;bottom:24px;transform:translateX(-50%);width:max-content;max-width:90vw;padding:12px 20px;border-radius:12px;background:#3d362deb;color:white;box-shadow:0 4px 20px #0002}
.chat-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}#classroom-history{font-size:12px;padding:5px 8px}
#classroom-history-dialog{border:1px solid #d8c2a3;border-radius:16px;background:#fffbf4;color:#433323;width:min(640px,94vw);max-height:80dvh;padding:22px;scrollbar-width:thin;scrollbar-color:#aa8a63 #efe2ce}#classroom-history-dialog::backdrop{background:#211b1666}#classroom-history-dialog header{display:flex;align-items:center;justify-content:space-between;gap:20px}#classroom-history-dialog h2{font-size:20px;margin:0}#classroom-history-list{margin-top:20px;font-size:14px;overflow-wrap:anywhere}#classroom-history-list p{padding:10px 0;border-bottom:1px solid #e8dcca}
/* Four rows preserve six columns and the three paired desk groups. */
.room-stage{overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#aa8a63 #ead6b8}
.seat-area{height:max(390px,calc(100dvh - 470px));min-height:390px;margin-top:26px;padding:28px 0 10px}
.desk-grid{grid-template-rows:repeat(4,minmax(70px,1fr));row-gap:12px;transform:none;height:100%;max-height:460px}
@media(max-width:900px){
 .seat-area{width:100%;margin-left:0;margin-right:0;height:390px;min-height:390px}
 .desk-grid{grid-template-columns:repeat(2,minmax(0,1fr)) minmax(10px,.3fr) repeat(2,minmax(0,1fr)) minmax(10px,.3fr) repeat(2,minmax(0,1fr));grid-template-rows:repeat(4,1fr);column-gap:4px;row-gap:12px}
 .seat{min-width:0;min-height:70px}.desk-number{font-size:10px}.seat .name-tag{max-width:70px;overflow:hidden;text-overflow:ellipsis}
 .room-stage{padding-inline:12px}.top-strip{max-height:none;overflow:visible;padding-right:0}.room-stage::before{position:fixed;height:50%;z-index:0}
 .lobby-tools{align-items:flex-start}
}

#classroom-lobby>.room-kind-tabs{max-width:1080px;margin:20px auto}#classroom-lobby .room-kind-tabs .active{background:#50694a;color:white}#classroom-team-settings{border:1px solid #c4cfbc;background:#f3f6ec;border-radius:8px;padding:6px 12px;margin-bottom:12px;color:#466044}.honor-list{overflow:auto;scrollbar-width:thin}.team-wall-rank b{white-space:nowrap}#classroom-team-settings[hidden]{display:none}
.team-rank-periods{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:0 0 6px}
.team-rank-periods[hidden]{display:none!important}
.team-rank-periods button{height:24px;padding:0 4px;border:1px solid #d6c2a5;border-radius:6px;background:#fffbf4;color:#62492c;font-size:11px;font-weight:700;line-height:1;cursor:pointer}
.team-rank-periods button.active{background:#4f6b55;border-color:#4f6b55;color:#fff}
.team-wall-rank{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:3px 6px;border:0;border-radius:6px;background:transparent;color:#49341f;font-size:.8rem;text-align:left;cursor:pointer}
.team-wall-rank:hover{background:rgba(143,84,38,.08)}
.team-wall-rank span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* The classic room reserves space instead of placing its sidebar over seats. */
#shared-classroom:not(.forest-room)>.room-stage{width:calc(100% - 300px)}
body.panel-collapsed #shared-classroom:not(.forest-room)>.room-stage{width:100%}
#shared-classroom:not(.forest-room) .seat-area{width:100%;margin-inline:0}
#shared-classroom:not(.forest-room) #forest-immersive-open{right:370px;top:14px}
body.panel-collapsed #shared-classroom:not(.forest-room) #forest-immersive-open{right:70px}
#shared-classroom:not(.forest-room) .room-side{padding-top:20px;padding-bottom:96px}
#shared-classroom:not(.forest-room) .top-strip{padding-top:68px}
.timer-card{position:relative}
.clock-mode-bar{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.clock-mode-pill{height:22px;padding:0 8px;border:1px solid rgba(111,73,42,.26);border-radius:999px;background:rgba(255,255,255,.78);color:#5d4531;font-size:11px;font-weight:700;line-height:1;cursor:pointer}
.clock-mode-pill.active{background:#8f5426;border-color:#8f5426;color:#fff8ed}
.clock-mode-pill--set{margin-left:auto}
.clock-mode-pop{position:absolute;right:10px;top:44px;z-index:45;width:min(248px,92%);padding:10px;border:1px solid rgba(111,73,42,.22);border-radius:10px;background:rgba(255,250,243,.98);box-shadow:0 14px 30px rgba(47,30,18,.22);display:grid;gap:7px;font-size:12px;color:#4a3522}
.clock-mode-pop[hidden]{display:none!important}
.clock-mode-pop label{display:flex;align-items:center;justify-content:space-between;gap:8px;font-weight:700}
.clock-mode-pop input{width:68px;height:26px;padding:0 6px;border:1px solid #d6c2a5;border-radius:6px;background:#fff;color:#2d241f;text-align:center;font-size:12px;font-weight:700}
.clock-mode-pop small{color:#79634a;font-size:11px;line-height:1.35}
.tc-clock-sub{font-size:11px;font-weight:700;color:#6b4c30;text-align:center;line-height:1.2}
.tc-clock-sub[hidden],.tc-clock-sub:empty{display:none!important}
.tc-records-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:6px;margin-bottom:6px;border-bottom:1px solid rgba(111,73,42,.14);font-size:12px}
.tc-records-bar a{color:#4f6b55;font-weight:700;text-decoration:none}
.tc-records-bar a:hover{text-decoration:underline}
.tc-records-toggle{height:24px;padding:0 8px;border:1px solid rgba(111,73,42,.26);border-radius:6px;background:#fffaf3;color:#5d4531;font-size:11px;font-weight:700;cursor:pointer}
html.ql-room-stage-active.ql-stage-compact-h #shared-classroom:not(.forest-room) .top-strip .timer-card{gap:5px!important;padding:8px 12px!important}
html.ql-room-stage-active.ql-stage-compact-h #shared-classroom:not(.forest-room) .top-strip .timer-card #timeshow{min-height:46px!important;padding:4px 6px!important;font-size:clamp(1.7rem,2.4vw,2.35rem)!important}
html.ql-room-stage-active.ql-stage-compact-h #shared-classroom:not(.forest-room) .top-strip .timer-card .timer-actions button{min-height:28px!important}
html.ql-room-stage-active.ql-stage-compact-h #shared-classroom:not(.forest-room) .top-strip .timer-card .record-button{min-height:26px!important}
@media(max-width:1440px) and (min-width:901px){#shared-classroom:not(.forest-room) .top-strip{width:100%;grid-template-columns:minmax(150px,1fr) minmax(270px,1.7fr) minmax(180px,1fr);gap:12px}}
@media(max-width:900px){#shared-classroom:not(.forest-room)>.room-stage{width:100%}#shared-classroom:not(.forest-room) #forest-immersive-open{right:70px}.room-side{padding-top:74px!important}}
