/* Fixed 16:9 teaching workspace. Menus page rather than pushing the board away. */
html,body.workspace-body{width:100%;height:100%;overflow:hidden;background:#112d31}
#classroom{position:absolute;left:50%;top:50%;width:1600px;height:900px;max-width:none;min-height:0;padding:0;margin:0;transform:translate(-50%,-50%) scale(var(--workspace-scale,1));transform-origin:center;background:#f4f5ef;display:grid;grid-template-rows:82px minmax(0,1fr) 46px;overflow:hidden;font-size:22px}
#classroom button{font-size:19px;min-height:48px;padding:11px 18px;border-radius:11px;border:1px solid #baccc5;background:#fff;color:#173d39;letter-spacing:0}
#classroom button:hover{background:#e2eee5}#classroom button:disabled{opacity:.4;cursor:default}
.workspace-toolbar{display:flex;align-items:center;gap:12px;padding:16px 24px;background:#fff;border-bottom:1px solid #dbe4dd}
#classroom .brand-button{background:#1e5745;color:#fff;font-size:18px;letter-spacing:1px;padding:15px 13px;white-space:nowrap}
.workspace-title{flex:1;min-width:0;padding:0 6px}.workspace-title strong{display:block;font-size:22px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.workspace-title span{display:block;font-size:15px;color:#64766d;margin-top:5px}.workspace-toolbar>button{white-space:nowrap}
.workspace-board{position:relative;min-height:0;margin:16px 24px 0;border:1px solid #d4ded5;border-radius:18px;overflow:hidden;background:#fcfaf4}
#game-frame{position:absolute;inset:0;width:100%;height:100%;border:0;background:#fcfaf4;min-height:0;display:block}
.board-empty{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:radial-gradient(ellipse at 25% 30%,#e4eddf,transparent 60%),#fcfaf4}.board-empty>span{letter-spacing:3px;font-size:16px;color:#376f56}.board-empty h1{font-size:76px;margin:24px 0 8px}.board-empty p{font-size:28px;color:#66776a}.board-empty button{background:#1e5745!important;color:white!important}
.workspace-status{display:flex;align-items:center;gap:18px;padding:4px 26px;font-size:15px;color:#52665b;white-space:nowrap;overflow:hidden}.workspace-status #workspace-hint{margin-left:auto}.workspace-status button{min-height:30px!important;padding:4px 10px!important;font-size:15px!important;background:transparent!important}.workspace-status #room-status:empty{display:none}
.workspace-popup{position:absolute;z-index:10;inset:0;padding:40px;display:flex;align-items:center;justify-content:center;background:#102e3a88;backdrop-filter:blur(4px)}
.popup-card{width:900px;max-height:820px;padding:30px;background:#fffef9;border:1px solid #cfdcd1;border-radius:24px;box-shadow:0 22px 100px #092c3a44;overflow:hidden}.wide-popup .popup-card{width:1460px;height:810px;display:flex;flex-direction:column}.popup-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;flex:none;margin-bottom:16px}.popup-heading h2{font-size:32px;margin:0}.popup-heading button{font-size:26px!important;min-width:50px}.popup-card input,.popup-card select,.popup-card textarea{font:inherit;max-width:100%;padding:12px;border:1px solid #9db9a9;border-radius:10px;background:#fff;color:#233d35}.popup-card label{display:block;font-size:20px}.popup-card form>input{display:block;width:100%;margin:14px 0 22px}.popup-card form>button{background:#1e5745!important;color:#fff!important}.reset-link{display:inline-block;margin-top:20px;font-size:18px;color:#275d48}.popup-card p{line-height:1.45}.room-code-display{font-size:72px;text-align:center;font-weight:bold;letter-spacing:14px;color:#1e5745;background:#edf4e9;border-radius:15px;margin:22px 0;padding:16px}.connection-options{display:grid;gap:20px;margin:26px 0}.connection-options button{text-align:left;padding:24px!important}.connection-options strong,.connection-options span{display:block}.connection-options span{font-weight:400;margin-top:10px;color:#5a7064;font-size:20px}
#workspace-library{display:flex;flex-direction:column;flex:1;min-height:0}.library-topline{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}.library-topline p{font-size:18px;color:#5c7364;margin:0}.course-path{display:flex;gap:18px;align-items:center}.course-path label{display:flex;align-items:center;gap:10px;font-size:17px;color:#52685b}.course-path select{font-size:18px;padding:8px 14px}.library-navigation{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-bottom:18px;border-bottom:1px solid #d7e2d7}.library-navigation nav{display:flex;gap:8px}.library-navigation button[aria-pressed=true]{background:#1e5745!important;color:white!important;border-color:#1e5745!important}.material-filters{display:flex;gap:10px}.material-filters select{font-size:17px;width:235px;padding:10px}.material-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:16px;flex:1;min-height:0;margin:20px 0}.material-grid.lesson-materials{grid-template-columns:repeat(2,1fr);grid-template-rows:1fr;max-height:460px}.material-card{display:flex;flex-direction:column;text-align:left;padding:20px!important;background:#f5f7ee!important;border-color:#d0dece!important;overflow:hidden;gap:10px}.material-card:hover{background:#e9f2e3!important;border-color:#327558!important}.material-card strong{font-size:25px;line-height:1.15}.material-meta{font-size:13px;letter-spacing:1px;color:#5a7663}.material-description{font-size:17px;line-height:1.35;font-weight:400;color:#52675b}.material-start{margin-top:auto;padding-top:10px;font-size:18px;color:#1e674b}.lesson-materials .material-card{padding:32px!important;gap:22px}.lesson-materials .material-card strong{font-size:38px}.lesson-materials .material-description{font-size:25px;max-width:430px}.lesson-materials .material-meta{font-size:18px}.lesson-materials .material-start{font-size:24px}.empty-materials{grid-column:1/-1;align-self:center;text-align:center}.library-bottom{display:flex;justify-content:space-between;align-items:center;gap:20px;font-size:18px;color:#52685b;margin-top:auto}.library-bottom>div{display:flex;align-items:center;gap:15px}.library-bottom button{min-width:50px}.notes-copy{height:510px;display:flex;flex-direction:column;justify-content:center;gap:18px}.notes-copy p{margin:0;font-size:24px;white-space:pre-line}.notes-pages{display:flex;justify-content:space-between;align-items:center;margin-top:15px}.display-settings{display:grid;gap:24px;margin:24px 0 32px}.display-settings input{width:25px;height:25px;margin-right:10px}.display-settings select{margin-left:20px}
#teacher-phrase-editor{flex:1;min-height:0;display:flex;flex-direction:column}.phrase-editor{border:0;background:transparent;padding:0;margin:0;flex:1;min-height:0}.phrase-editor>summary{display:none}.phrase-tabs{display:flex;gap:10px;margin:14px 0}.phrase-tabs [aria-pressed=true]{background:#1e5745!important;color:white!important}.phrase-panel{height:490px}.phrase-editor textarea{font-size:23px;line-height:1.5}.phrase-editor h3{font-size:24px}.phrase-editor #phrase-kind{font-size:18px}.phrase-editor #phrase-lesson-name{font-size:18px;margin:0}.phrase-editor-status{font-size:18px}.saved-phrases{margin:0}.saved-phrases li{padding:12px 0;font-size:23px}.phrase-pagination{display:flex;align-items:center;justify-content:space-between;margin-top:15px}.phrase-draft-row{margin:8px 0!important}.phrase-draft-row input[type=text]{padding:10px;font-size:21px}.phrase-draft-row input[type=checkbox]{width:22px;height:22px}.phrase-editor .compact-note{font-size:17px;margin:8px 0}
.private-clue-buttons{display:flex;gap:15px;margin:25px 0}#private-clue-copy{min-height:300px;background:#edf4e9;border-radius:16px;padding:30px;font-size:30px;line-height:1.5;white-space:pre-line}

.material-filters select{width:195px}#workspace-lesson{width:150px}
/* The projected board stays 16:9; a portrait phone uses touch-sized controls. */
@media(max-width:700px) and (orientation:portrait){
#classroom{width:100vw;height:100dvh;left:0;top:0;transform:none;grid-template-rows:auto minmax(0,1fr) 42px;font-size:16px}.workspace-toolbar{padding:10px;gap:5px;flex-wrap:wrap}.workspace-title{flex:1 0 100%;padding:0 2px 6px}.workspace-title strong{font-size:18px}.workspace-title span{font-size:12px}.workspace-toolbar .brand-button,.workspace-toolbar>[data-workspace=notes]{display:none}#classroom .workspace-toolbar>button{font-size:12px;padding:9px 7px;min-height:40px;flex:1}.workspace-toolbar>[data-workspace=more]{flex:0!important}.workspace-board{margin:8px 8px 0}.workspace-status{padding:4px 10px;gap:8px;font-size:12px}.workspace-status #workspace-hint{display:none}.workspace-status button{font-size:12px!important}.board-empty h1{font-size:36px}.board-empty p{font-size:18px}.workspace-popup{padding:12px}.popup-card,.wide-popup .popup-card{padding:16px;width:100%;height:auto;max-height:calc(100dvh - 24px);border-radius:16px}.wide-popup .popup-card{height:calc(100dvh - 24px)}.popup-heading{margin-bottom:12px}.popup-heading h2{font-size:23px}#classroom button{font-size:16px;min-height:40px;padding:8px 12px}.popup-heading button{font-size:19px!important;min-width:38px;padding:6px!important}.library-topline{display:block;margin-bottom:12px}.library-topline p{display:none}.course-path{gap:10px}.course-path label{font-size:12px;gap:4px}.course-path select{font-size:12px;padding:7px;max-width:170px}.library-navigation{display:block;padding-bottom:10px}.library-navigation nav{gap:5px}.library-navigation nav button{font-size:12px!important;flex:1}.material-filters{gap:5px;margin-top:10px;flex-wrap:wrap}.material-filters select,#workspace-lesson{font-size:12px;padding:8px;flex:1;width:40%;min-width:100px}.material-grid,.material-grid.lesson-materials{grid-template-columns:1fr;grid-template-rows:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0;max-height:none}.material-card,.lesson-materials .material-card{padding:14px!important;gap:7px}.material-card strong,.lesson-materials .material-card strong{font-size:21px}.material-description,.lesson-materials .material-description{font-size:15px}.material-meta,.lesson-materials .material-meta{font-size:11px}.material-start,.lesson-materials .material-start{font-size:15px;padding-top:4px}.library-bottom{font-size:12px;gap:8px}.library-bottom>span{max-width:60%}.library-bottom>div{gap:5px}.library-bottom button{min-width:34px}.popup-card input,.popup-card textarea,.popup-card select{font-size:16px;padding:9px}.popup-card label{font-size:15px}.notes-copy{height:auto;max-height:65vh;gap:12px}.notes-copy p{font-size:16px}.notes-pages{font-size:13px}.connection-options button{padding:16px!important}.connection-options span{font-size:15px}.room-code-display{font-size:36px;letter-spacing:7px}.display-settings{gap:12px;margin:16px 0}.display-settings select{margin:8px 0}.phrase-panel{height:auto;flex:1;min-height:0}.phrase-editor{display:flex;flex-direction:column}.phrase-tabs{gap:6px}.phrase-tabs button{font-size:13px!important;flex:1}.phrase-editor h3{font-size:18px}.phrase-editor textarea{font-size:17px;max-height:170px}.phrase-editor #phrase-kind{font-size:13px}.phrase-editor #phrase-lesson-name{font-size:14px}.phrase-editor .saved-phrases li{font-size:16px;padding:8px 0}.phrase-editor .saved-phrases button{font-size:12px!important}.phrase-editor .phrase-draft-row input[type=text]{font-size:15px;padding:8px}.phrase-editor #phrase-editor-status{font-size:13px}.private-clue-buttons{gap:5px}.private-clue-buttons button{font-size:12px!important}#private-clue-copy{font-size:21px;padding:18px;min-height:220px}
}
@media(max-width:700px) and (orientation:portrait){.course-path label{min-width:0;flex:1}.course-path label:first-child{flex:2}.course-path select{min-width:0;width:100%;font-size:12px!important;padding:8px!important}.course-path label{display:block}.course-path label select{display:block;margin-top:4px}}
