.staff-form{margin:18px 0;padding:18px;background:#f5f8f7;border:1px solid #dce3d1;border-radius:8px}.staff-form label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#617251;margin-bottom:12px}.staff-form input,.staff-form select{width:100%;box-sizing:border-box;padding:9px;border:1px solid #cdd8c1;border-radius:5px;background:#ffffff;color:#45583a}.staff-fields{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}.staff-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0}.staff-actions button{padding:18px;background:#eef5f1;border:1px solid #ccd8bf;border-radius:7px;color:#526b40}.staff-list{max-height:300px;overflow:auto;margin:14px 0}.staff-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid #e0e5d8}.staff-row p{font-size:11px;color:#849375;margin:5px 0}.staff-row button{padding:7px 10px;color:#986957;background:#f5eee8}.staff-row a{font-size:12px;color:#617a4f}#staffMessage{color:#a0694d;font-size:12px}@media(max-width:550px){.staff-fields{grid-template-columns:1fr}}
.student-tools{display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-size:12px}.student-tools button{font-size:10px;padding:7px}.student-row-actions{display:flex;gap:5px;flex-wrap:wrap}.student-row-actions button{font-size:10px}.staff-actions button:disabled,.student-tools button:disabled{opacity:.45;cursor:default}.drive-linked{border:1px solid #d6dfcb;background:#eff3e8;border-radius:8px;padding:14px;display:flex;flex-direction:column;gap:8px;margin-top:16px;font-size:12px}.drive-linked a{color:#557443}.drive-linked small{color:#8a927e;line-height:1.5}.monitor-head{display:flex;justify-content:space-between;align-items:center}.monitor-head h1{font-size:28px;margin:8px 0}.monitor-toolbar{display:flex;gap:20px;align-items:center;margin:20px 0 10px;flex-wrap:wrap}.monitor-toolbar select,.monitor-toolbar button,.monitor-head button{padding:9px 14px;background:#ffffff;border:1px solid #d8dfd0;border-radius:6px;color:#5d6f50}.monitor-legend{display:flex;gap:15px;font-size:12px}.monitor-legend .running{color:#468957}.monitor-legend .call{color:#c95656}.monitor-legend .done{color:#91958e}.monitor-notice{font-size:11px;color:#8b9580;margin:12px 0 20px}.monitor-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.monitor-card{border:1px solid #dce2d4;border-top:4px solid #c6ccbe;border-radius:9px;background:#ffffff;overflow:hidden}.monitor-card.running{border-top-color:#68a477}.monitor-card.call{border-top-color:#cf6666;background:#fff9f6}.monitor-card.done{border-top-color:#aaa}.monitor-card header{display:flex;justify-content:space-between;align-items:center;padding:15px;border-bottom:1px solid #e8ebe2}.monitor-card header strong{font-size:16px}.monitor-card header small{display:block;font-size:10px;color:#909b83;margin-top:5px}.monitor-card header b{font-size:11px;color:#839079}.monitor-card.running header b{color:#468957}.monitor-card.call header b{color:#c95656}.monitor-card.done{color:#92958d}.monitor-card ol{list-style:none;margin:0;padding:10px 15px}.monitor-card li{display:flex;justify-content:space-between;gap:8px;font-size:11px;padding:10px 0;color:#8d9881}.monitor-card li.current{color:#3e7048;font-weight:600}.monitor-card.call li.current{color:#b35c53}.monitor-card time{font-variant-numeric:tabular-nums}.monitor-card footer{font-size:10px;padding:11px 15px;background:#f1f6f3;color:#87947a}.monitor-card.call footer{background:#f9e9e3;color:#b66a59}.monitor-wait{padding:30px 15px;color:#a0a994;font-size:12px}@media(max-width:1000px){.monitor-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){.monitor-grid{grid-template-columns:1fr}}
/* Dense 5 x 3 classroom monitor */
.monitor-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;max-height:calc(100vh - 215px);overflow:auto;padding:4px;align-content:start}.monitor-card{height:174px;border-radius:7px;cursor:pointer}.monitor-card header{padding:9px 10px}.monitor-card header strong{font-size:13px}.monitor-card header small{font-size:9px;margin-top:3px}.monitor-card header b{font-size:9px}.monitor-card ol{padding:3px 7px;height:90px;overflow:auto}.monitor-card li{padding:6px 5px;gap:3px;font-size:9px;border-radius:4px}.monitor-card li.current,.monitor-card.call li.current{background:#454a49;color:#fff}.monitor-card li span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monitor-card time{white-space:nowrap;font-size:9px}.monitor-card time em{font-style:normal}.monitor-card footer{padding:5px 8px;display:flex;justify-content:space-between;align-items:center;font-size:8px}.monitor-card footer button{padding:3px 7px;font-size:9px;background:#fff9f5;border:1px solid #d5c3b9;border-radius:4px;color:#a8554b}.monitor-head h1 small{font-size:14px;color:#8a967d}.monitor-toolbar{margin:10px 0 5px;gap:12px}.monitor-notice{margin:5px 0 9px}.monitor-card.call{animation:callPulse 1.8s ease-in-out infinite}.student-called:after{content:'';position:fixed;inset:0;z-index:99999;pointer-events:none;border:12px solid #db4747;box-shadow:inset 0 0 35px #e0373770;animation:callPulse 1.8s ease-in-out infinite}.monitor-plan{margin:15px 0}.monitor-plan>div{display:flex;align-items:center;gap:5px;padding:8px;border-bottom:1px solid #e1e6d9}.monitor-plan span{flex:1;font-size:12px}.monitor-plan button{padding:5px 8px}#monitorEditor input,#monitorEditor select{padding:8px;border:1px solid #ccd6bf;border-radius:5px}#monitorEditor label{display:flex;gap:10px;font-size:12px;align-items:center}#studentSessionBanner{position:fixed;bottom:12px;left:82px;z-index:10000;background:#ffffff;border:1px solid #cbd6c0;border-radius:7px;font-size:11px;display:flex;align-items:center;gap:12px;padding:8px}#studentSessionBanner:empty{display:none}#studentSessionBanner button{padding:5px 8px;font-size:10px}.student-called #studentSessionBanner{background:#fce6e2;color:#a43636}@keyframes callPulse{0%,100%{box-shadow:inset 0 0 0 3px #d95252,0 0 8px #d9525250;border-color:#dc5555}50%{box-shadow:inset 0 0 0 1px #df9a9a;border-color:#e6b0a8}}@media(prefers-reduced-motion:reduce){.monitor-card.call,.student-called:after{animation:none}}@media(max-width:1000px){.monitor-grid{grid-template-columns:repeat(5,minmax(155px,1fr))}}
body:not(.is-home) aside{width:66px!important;min-width:66px!important;padding-left:7px!important;padding-right:7px!important}body:not(.is-home) .brand{font-size:19px!important;text-align:center}#nav button{justify-content:center!important;padding:12px 6px!important;min-height:43px;font-size:0!important}#nav button span{font-size:19px}#nav button:hover:after,#nav button:focus-visible:after{content:attr(aria-label);position:absolute;left:64px;background:#4e5e43;color:white;padding:7px 10px;border-radius:5px;font-size:11px;z-index:500;white-space:nowrap}.side-bottom{font-size:0!important}.side-bottom button{font-size:10px!important;padding:6px!important}
body:has(.world-main) .layout{grid-template-columns:66px minmax(0,1fr)!important}.monitor-grid{max-height:calc(100vh - 230px)}body:has(.monitor-grid) .world-main{padding:18px 22px}.monitor-card header{height:44px!important;background:transparent!important}.monitor-card li.current time{color:#fff}.monitor-card footer{height:24px}.monitor-card{height:174px;box-sizing:border-box}.monitor-head h1{margin:4px 0;font-size:25px}body:has(.monitor-grid) #main{max-width:none}
.sheet-toolbar{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:17px 0}.sheet-toolbar input,.sheet-toolbar select,.sheet-toolbar button{padding:8px 10px;border:1px solid #d5ddca;border-radius:5px;background:#ffffff;color:#647653;font-size:11px}.sheet-toolbar label{font-size:11px}.sheet-scroll{overflow:auto;max-height:calc(100vh - 270px);border:1px solid #d6dfca;border-radius:6px}.class-sheet{width:100%;border-collapse:collapse;font-size:11px;min-width:1000px}.class-sheet th{position:sticky;top:0;background:#eaf2ee;color:#65774f;padding:10px;text-align:left;z-index:1;white-space:nowrap}.class-sheet td{border:1px solid #e2e7d9;padding:5px;background:#ffffff}.class-sheet tr:nth-child(even) td{background:#f5f8f7}.class-sheet td small{display:block;font-size:9px;color:#95a186;margin-top:3px}.class-sheet input:not([type=checkbox]),.class-sheet select{width:100%;min-width:70px;box-sizing:border-box;border:0;background:transparent;padding:7px 4px;font-size:11px;color:#60734e}.class-sheet td:nth-child(5),.class-sheet td:nth-child(6){min-width:140px}.class-sheet td:nth-child(2){min-width:90px}.sheet-history{font-size:11px;color:#7b8a68;margin-top:20px}.staff-form textarea{padding:10px;border:1px solid #cdd8c1;border-radius:5px;font:12px inherit;background:#ffffff}.test-kind-options{display:flex;gap:15px;flex-wrap:wrap;margin:10px 0}.test-kind-options label{display:flex;flex-direction:row;align-items:center}.test-kind-options input{width:auto}.test-paper{max-height:300px;overflow:auto;font-size:13px;line-height:2}.homework-check{background:#718c5e!important;color:white!important}
.sheet-sync-note{font-size:11px;color:#947651;background:#edf3f5;padding:9px 12px;border-radius:5px}.book-timeline{max-height:380px;overflow:auto}.book-timeline>div{border-left:2px solid #c3d0b3;padding:12px 18px;margin-left:5px}.book-timeline time{font-size:10px;color:#919e84;display:block;margin-bottom:6px}.book-timeline strong{font-size:15px}.book-timeline span{font-size:10px;background:#e8eedf;border-radius:4px;padding:4px 7px;margin-left:12px}.book-timeline p{font-size:12px;color:#879578}

/* Clear palette refresh: fixed menu accents, existing layout and scenery. */
:root{--ink:#29384d;--muted:#718095;--green:#486fc0;--lime:#edf3fc;--paper:#f7faff;--line:#e0e7f0;--orange:#dc7b72}
body,body:has(.game-home),body:has(.world-main){color:#29384d;background:#f5f8fd}
body header,body:has(.game-home) header,body:has(.world-main) header{background:#ffffffed;border-color:#e2e9f2;color:#29384d}
body .brand,body .student-label,body .app-date{color:#334664}
body .badge,body .avatar{background:#edf3fc;color:#536c92}
body .game-home{background:#edf4fc}
body .game-home:before{opacity:1;filter:none}
body .game-home:after{content:none}
body .game-heading{background:#ffffff60}
body .game-heading h1{color:#2d405e}
body .game-heading p,body .game-heading .eyebrow{color:#60738d}
body .game-home .portal{--accent:#486fc0;--tint:#edf3ff;background:linear-gradient(155deg,#fffffffa,var(--tint));color:#2d3d55;border-color:#ffffff;box-shadow:0 4px 0 #7187a126,0 14px 26px #29446618,inset 0 3px var(--accent);animation:none}
body .game-home .portal:nth-child(2){--accent:#338b9b;--tint:#eaf8fa}
body .game-home .portal:nth-child(3){--accent:#8570bd;--tint:#f3effc}
body .game-home .portal:nth-child(4){--accent:#ca786e;--tint:#fff2ef}
body .game-home .portal:nth-child(5){--accent:#587fb4;--tint:#edf4fd}
body .game-home .portal:hover{background:linear-gradient(155deg,#fff,var(--tint));transform:translateY(-3px)!important}
body .game-home .portal h2,body .game-home .portal .tiny-arrow{color:var(--accent)}
body .game-home .portal .en,body .game-home .portal .desc,body .game-home .portal .num{color:#6e7d92}
body .game-home .pixel-icon{filter:drop-shadow(0 4px 0 #2944660d)}
body .game-bottom,body .game-version{color:#526780}
body .game-bottom .profile-strip,body .game-bottom button{background:#ffffffd9;border-color:#e2eaf4;color:#526780}
body .ramimon{animation:rami-breathe 7s ease-in-out infinite!important;translate:0 0!important;transform-origin:50% 100%;filter:drop-shadow(0 2px 1px #29446626);will-change:auto}
body .ramimon-stage:before{animation:none!important;background:#334b6626;scale:1;opacity:.65}
@keyframes rami-breathe{0%,70%,100%{transform:scaleY(1)}78%,88%{transform:scaleY(1.012)}}
body:has(.world-main):before{filter:none}
body:has(.world-main) .world-main{background:#fafcffed;color:#29384d}
body:has(.world-main) aside{background:#fafdfff0;border-color:#e0e8f2}
body:has(.world-main) nav button{color:#6c7b90}
body:has(.world-main) nav button.active{background:#eaf1ff;color:#416bb8;box-shadow:inset 2px 0 #6088ce}
body .world-main h1,body .world-main h2,body .world-main h3{color:#30425c}
body .world-main .sub,body .world-main .sample,body .world-main .row p{color:#6e7e93}
body .world-main .card,body .world-main .reader,body .world-main .study-panel,body .world-main .cd{background:#ffffffed;border-color:#e1e8f1}
body .world-main .primary,body .modal .primary,body .lecture-footer .continue{background:#486fc0;color:#fff}
body .world-main .secondary,body .modal .secondary,body .world-main .notice,body .history-bar,body .modal .notice{background:#edf3fc;color:#5a7093;border-color:#dae5f5}
body .history-bar strong,body .world-main .back,body .world-main .link{color:#526f9a}
body .world-main .tag,body .world-main .step,body .world-main .chips button,body .world-main .record-tabs button{background:#edf3fc;color:#5c7398}
body .world-main .step.current,body .world-main .record-tabs button.active{background:#5279bd;color:#fff}
body .modal{color:#34465f;border-color:#dce5f1}
body .lecture-footer{background:#ffffffed;border-color:#dce5f1}
body .lecture-footer button{background:#edf3fc;color:#567096}
@media(prefers-reduced-motion:reduce){body .ramimon{animation:none!important}body .game-home .portal{transition:none}}


/* Grounded horizontal walking; no floating or visible character name. */
body .ramimon-label{display:none!important}
body .ramimon-stage.walking-stage{width:min(780px,calc(100% - 64px));left:50%;transform:translateX(-50%);height:80px;overflow:visible;pointer-events:none}
body .ramimon-stage.walking-stage:before{content:none}
.rami-walker{position:absolute;left:0;bottom:0;width:80px;height:80px}
.rami-walker:before{content:'';position:absolute;bottom:12px;left:20px;width:40px;height:4px;border-radius:50%;background:#253a5026}
.rami-walk-sprite{display:block;width:80px;height:80px;background:url('/rami-walk.png') 0 0/200% 100% no-repeat;image-rendering:pixelated}
.rami-walker.talking .rami-walk-sprite{background-image:url('/ramimon-green.png');background-size:100% 100%;background-position:0 0!important;transform:none!important}
.rami-speech{position:absolute;bottom:77px;left:50%;transform:translateX(-50%);white-space:nowrap;background:#fffffff2;border:1px solid #d7e2ef;border-radius:10px;padding:6px 10px;color:#3e5675;font-size:11px;font-weight:600;box-shadow:0 3px 10px #334b6610;visibility:hidden}
.rami-speech:after{content:'';position:absolute;bottom:-4px;left:calc(50% - 3px);width:6px;height:6px;background:#fff;border-right:1px solid #d7e2ef;border-bottom:1px solid #d7e2ef;transform:rotate(45deg)}
.rami-walker.talking .rami-speech{visibility:visible}
@media(max-width:780px){body .ramimon-stage.walking-stage{left:auto;transform:none;margin:40px auto 0;width:calc(100% - 50px)}}

/* Walk on the lower foreground paving, with a clearer green robe. */
@media(min-width:781px){body .ramimon-stage.walking-stage{bottom:70px}}
body .rami-walk-sprite{filter:brightness(1.18) saturate(1.22);}
body .rami-walker:before{background:#253a5038;width:42px;left:19px;height:4px}

/* Give inner learning screens more depth while keeping content surfaces bright. */
body:has(.world-main){background:#dce5f0}
body:has(.world-main) .world-main{background:#e7edf5f5}
body:has(.world-main) aside{background:#e1e9f3f5;border-color:#cbd7e6}
body:has(.world-main) nav button.active{background:#d0dff5;color:#345e9d;box-shadow:inset 2px 0 #6088ce}
body .world-main .card,body .world-main .reader,body .world-main .study-panel,body .world-main .cd{background:#fbfdff;border-color:#ccd8e7;box-shadow:0 2px 8px #334b6608}
body .world-main .notice,body .history-bar{background:#d9e4f2;color:#516987}
body .world-main .secondary{background:#dde7f4;border-color:#c4d3e7;color:#4c6487}
body .world-main .sub,body .world-main .sample,body .world-main .row p{color:#62738a}

/* Compact global account bar, independent of classroom card headers. */
body>header{height:44px!important;min-height:44px;padding:0 22px!important}
body>header .brand{font-size:20px}
body>header .user{gap:8px}
.account-login{padding:6px 12px;border:1px solid #cfdbeb;border-radius:6px;background:#edf3fc;color:#365780;font-size:12px;font-weight:600;white-space:nowrap}
.staff-entry{background:#fff;color:#60718a}
body .game-heading{padding:9px 20px}
body .game-heading h1{font-size:26px;margin:3px 0 5px;letter-spacing:-.5px}
body .game-heading p{font-size:12px;letter-spacing:1.2px}
body .game-heading .eyebrow,body .game-bottom{display:none}
body .layout{min-height:calc(100vh - 44px)}
body .game-home{min-height:calc(100svh - 44px)}
@media(min-width:781px){body .game-home{height:calc(100svh - 44px)}}
@media(max-width:620px){body>header{padding:0 12px!important}.account-login{font-size:11px;padding:6px 8px}body .game-heading h1{font-size:23px}}

/* Anchor scenery and walking feet to the same foreground on wide displays. */
body .game-home:before{background-position:center bottom}
@media(min-width:781px){
 body .ramimon-stage.walking-stage{bottom:28px;width:min(1000px,calc(100% - 100px))}
}
/* Preserve the five-menu layout while allowing it to grow with the viewport. */
@media(min-width:1051px){
 body .game-home .portal-grid{grid-template-columns:repeat(5,minmax(0,1fr));width:min(1200px,calc(100% - 96px));gap:clamp(16px,1.5vw,26px)}
 body .game-home .portal{min-height:clamp(210px,17vw,260px);padding:28px 14px 22px}
 body .game-home .portal h2{font-size:clamp(17px,1.25vw,22px)}
 body .game-home .portal .pixel-icon{width:clamp(66px,5vw,84px);height:clamp(66px,5vw,84px)}
 body .game-home .portal .desc{font-size:12px;line-height:1.7}
 body .game-home .portal .en{font-size:10px}
 body .game-home .portal .tiny-arrow{font-size:16px}
}
@media(min-width:1051px) and (max-height:650px){body .game-home .portal{min-height:190px;padding:18px 14px}body .game-home .portal .pixel-icon{width:56px;height:56px;margin-bottom:10px}}

/* Smaller Korean home labels; retain existing card sizing and placement. */
body .game-home .portal h2{font-size:15px;font-weight:700}
body .game-home .portal .desc{font-size:11px}
body .game-home .home-learning h2{font-size:13px}
body .game-home .home-learning p,body .game-home .home-learning li{font-size:11px}
body .game-home .home-learning button{font-size:11px}
@media(min-width:1051px){body .game-home .portal h2{font-size:clamp(15px,1.05vw,18px)}}
@media(max-width:1050px){body .game-home .portal h2{font-size:14px}body .game-home .portal .desc{font-size:10px}}

/* Home hierarchy: compact centered brand, one overview strip, then menu row. */
body .game-home .game-heading{margin-top:0;padding:5px 16px;background:#ffffff38;border-radius:10px}
body .game-home .game-heading h1{font-size:22px;line-height:1.3;margin:0 0 4px}
body .game-home .game-heading p{font-size:10px;letter-spacing:1.5px;margin:0}
@media(min-width:781px){
 body .game-home,body .game-home:has(.home-learning){height:auto;min-height:max(620px,calc(100svh - 44px));padding:clamp(22px,5vh,54px) 32px 150px;justify-content:flex-start}
 body .game-home .home-learning{width:min(1160px,100%);margin:clamp(20px,4vh,40px) auto 0;gap:0;background:#ffffff70;border:1px solid #ffffffa6;border-radius:12px;backdrop-filter:blur(6px);box-shadow:0 5px 22px #2944660a}
 body .game-home .home-learning article{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:16px;align-content:center;padding:16px 20px;min-height:100px;max-height:none;overflow:visible;background:transparent;border:0;border-radius:0;box-shadow:none;backdrop-filter:none}
 body .game-home .home-learning article+article{border-left:1px solid #ffffffa6}
 body .game-home .home-learning h2{grid-column:1;font-size:13px;line-height:1.5;margin:0 0 5px;color:#334964}
 body .game-home .home-learning p,body .game-home .home-learning ol,body .game-home .home-learning small{grid-column:1;font-size:11px;margin:0;color:#536982;line-height:1.6}
 body .game-home .home-learning ol{max-height:55px;overflow:auto;padding-left:16px}
 body .game-home .home-learning button{grid-column:2;grid-row:1 / span 3;align-self:center;margin:0;padding:10px 13px;font-size:11px;border-radius:7px;background:#486fc0;color:white;white-space:nowrap}
 body .game-home .portal-grid{position:relative;top:auto;left:auto;transform:none;width:min(1160px,100%);margin:24px auto 0;grid-template-columns:repeat(5,minmax(0,1fr));gap:clamp(12px,1.5vw,24px)}
 body .game-home .portal{min-height:clamp(196px,16vw,238px);padding:24px 12px 18px}
}
@media(min-width:781px) and (max-width:1000px){
 body .game-home .home-learning article{column-gap:8px;padding:13px}
 body .game-home .home-learning button{grid-column:1;grid-row:auto;justify-self:start;margin-top:8px;padding:8px 11px}
 body .game-home .portal .desc{font-size:10px}
}
@media(max-width:780px){body .game-home .game-heading h1{font-size:21px}}

/* Home is a simple destination picker; learning details stay in Today. */
@media(min-width:781px){body .game-home .portal-grid{margin-top:clamp(24px,4vh,44px)}}


/* Lower the title/menu group together without widening their internal gap. */
@media(min-width:781px){
 body .game-home,body .game-home:has(.home-learning){padding-top:clamp(64px,13vh,140px)}
}
@media(min-width:781px) and (max-height:650px){
 body .game-home,body .game-home:has(.home-learning){padding-top:42px}
}

/* A little more presence, keeping the feet on the same ground line. */
body .ramimon-stage.walking-stage{height:112px}
body .rami-walker{width:112px;height:112px;bottom:-5px}
body .rami-walk-sprite{width:112px;height:112px}
body .rami-walker:before{bottom:17px;left:27px;width:58px;height:4px}
body .rami-speech{bottom:107px;font-size:12px}

/* Soft colored menu surfaces: less glare, fixed colors in every season. */
body .game-home .portal{--accent:#3f5f9a;--surface:#e1eafb;--tint:#cbdaf2;background:linear-gradient(155deg,var(--surface),var(--tint));border-color:#dce6f2;box-shadow:0 4px 0 #526a8926,0 12px 24px #29446618,inset 0 3px var(--accent)}
body .game-home .portal:nth-child(2){--accent:#286a77;--surface:#dceff0;--tint:#c1dfe3}
body .game-home .portal:nth-child(3){--accent:#695294;--surface:#e8e1f4;--tint:#d6cae9}
body .game-home .portal:nth-child(4){--accent:#995b54;--surface:#f4e3df;--tint:#eaccc6}
body .game-home .portal:nth-child(5){--accent:#42658d;--surface:#dfe9f4;--tint:#c9d9eb}
body .game-home .portal:hover{background:linear-gradient(155deg,var(--surface),var(--tint));box-shadow:0 4px 0 #526a8930,0 16px 28px #29446624,inset 0 3px var(--accent)}
body .game-home .portal .desc,body .game-home .portal .en{color:#536176}
body .game-home .portal .num{color:#647187}


/* Shared compact screen headings: English, Korean, then a short description. */
#main .topline,#main .story-heading,#main .library-title{margin:0 0 16px;padding:0;min-height:0;align-items:flex-start;gap:12px}
#main .library-title>.library-heading{display:block}
#main .topline .eyebrow,#main .story-heading>div>small,#main .library-heading>small{display:block;font-size:10px;line-height:1.4;letter-spacing:1.8px;font-weight:600;color:#748399;margin:0 0 5px}
#main .topline h1,#main .story-heading h1,#main .library-heading h1{font-size:24px;line-height:1.3;letter-spacing:-.6px;font-weight:700;color:#35435e;margin:0 0 6px}
#main .topline .sub,#main .story-heading>div>p,#main .library-heading>p{font-size:12px;line-height:1.5;color:#718096;margin:0;letter-spacing:0}
#main .library-title>div:not(.library-heading){flex-wrap:wrap;justify-content:flex-end}
@media(max-width:620px){#main .topline,#main .story-heading,#main .library-title{margin-bottom:12px;flex-wrap:wrap}#main .topline h1,#main .story-heading h1,#main .library-heading h1{font-size:22px}#main .topline .sub,#main .story-heading>div>p,#main .library-heading>p{font-size:11px}}

/* One compact heading scale for all main learning destinations. */
#main .topline,#main .story-heading,#main .library-title{margin:0 0 10px!important;padding:0!important;min-height:0;gap:10px}
#main .topline .eyebrow,#main .story-heading>div>small,#main .library-heading>small{font-size:11px!important;line-height:14px!important;letter-spacing:1.5px;margin:0 0 3px!important}
#main .topline h1,#main .story-heading h1,#main .library-heading h1{font-size:20px!important;line-height:26px!important;margin:0 0 3px!important;letter-spacing:-.4px}
#main .topline .sub,#main .story-heading>div>p,#main .library-heading>p{font-size:13px!important;line-height:19px!important;margin:0!important}
#main:has(#lectureFrame) .topline{display:flex!important}
#main .topline .date{display:none}
#nav button[onclick="go('home')"]{display:none}
.course-assignment .course-picker-toolbar{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.course-assignment .course-search{width:100%;margin:12px 0 8px;padding:10px}.course-assignment .course-mine{display:block;margin-bottom:12px}.course-picker-columns{display:grid;grid-template-columns:minmax(140px,1fr) minmax(220px,2fr);gap:12px}.course-picker-columns>div{max-height:300px;overflow:auto;padding:8px;border:1px solid #dce1ed;border-radius:10px;background:#f5f7fc}.course-picker-columns button{display:block;width:100%;text-align:left;margin-bottom:5px;padding:10px}.course-picker-columns button.selected{background:#dce5fa;color:#344f85;border-color:#98add9}.course-picker-columns label{display:flex;gap:9px;align-items:center;padding:10px;border-bottom:1px solid #e0e5ef}.course-picker-columns input,.course-mine input{width:auto!important}#coursePickerSelected{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin:14px 0}#coursePickerSelected button{font-size:13px;padding:6px 9px;background:#e8edf9}.course-assignment .staff-actions button{padding:10px 16px;font-size:15px}.course-assignment details{margin-top:14px;font-size:13px}@media(max-width:600px){.course-picker-columns{grid-template-columns:1fr}.course-picker-columns>div:first-child{max-height:120px}}
.bulk-scroll{max-height:230px;overflow:auto;border:1px solid #dce2ef;border-radius:10px;padding:10px;margin:10px 0}.bulk-scroll label{display:flex;gap:9px;align-items:flex-start;padding:7px;border-bottom:1px solid #edf0f7}.bulk-scroll input[type=checkbox]{width:auto!important;flex-shrink:0;margin-top:4px}.bulk-scroll small{color:#64748b;font-size:12px}#bulkStudents{display:flex;flex-wrap:wrap;gap:8px;max-height:150px}#bulkAssignmentSummary{max-height:180px;overflow:auto;background:#edf2fc;padding:10px;border-radius:8px}#bulkAssignmentSummary p{margin:4px 0;font-size:13px}.course-assignment>input{width:100%;padding:9px}

.lesson-comments{margin:14px 0;padding:16px;background:#fff;border:1px solid #d9e4de;border-radius:12px;min-width:0}.comment-heading{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}.comment-heading h2{font-size:17px;margin:0}.comment-heading span,.lesson-comments small,.lesson-comments p{font-size:12px;color:#718279}.comment-columns{display:grid;grid-template-columns:minmax(180px,.7fr) minmax(0,1.5fr);gap:16px;margin-top:12px}.comment-student{display:grid!important;grid-template-columns:1fr auto;gap:6px;width:100%;text-align:left;margin:6px 0!important;white-space:normal!important}.comment-student small{grid-column:1/-1;overflow-wrap:anywhere}.comment-student.selected{background:#eaf3ed;border-color:#59876d}.comment-missing{color:#b24b32;font-size:12px}.comment-done{color:#397354;font-size:12px}#commentStudentList{max-height:300px;overflow:auto}.comment-phrases{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0}.comment-phrases button{font-size:12px;white-space:normal;min-height:42px;margin:0!important;max-width:100%;text-align:left}#lessonCommentText{box-sizing:border-box;width:100%;resize:vertical;font:inherit;padding:10px;border:1px solid #ccdcd2;border-radius:8px}.comment-save{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-top:8px}.comment-save span{font-size:12px}.lesson-comments button{min-height:42px}.lesson-comments h3{font-size:15px;margin:0}.lesson-comments h3 small{margin-left:8px}@media(max-width:600px){.comment-columns{grid-template-columns:1fr}.lesson-comments{padding:12px}#commentStudentList{display:flex;gap:8px;overflow-x:auto;max-height:120px}.comment-student{min-width:150px;width:150px;flex-shrink:0}.comment-heading span{width:100%}.comment-save button{width:100%}}

.comment-activities{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}.comment-activities button{white-space:normal;max-width:100%;text-align:left}.comment-activities small{display:block}.comment-activities .selected{border-color:#508265;background:#eaf3ed}.monthly-comment-list section{padding:12px 0;border-bottom:1px solid #dce5df}.monthly-comment-list p{white-space:pre-wrap;overflow-wrap:anywhere}.comment-columns>div{min-width:0}

body.comment-mode .sheet-scroll,body.comment-mode .sheet-history,body.comment-mode .sheet-sync-note,body.comment-mode #sheetStatus{display:none}body.comment-mode .sheet-toolbar>button{display:none}body.comment-mode #main{box-sizing:border-box;min-width:0;max-width:100%;padding:16px!important}body.comment-mode .monitor-head h1{font-size:18px}body.comment-mode .lesson-comments{margin:8px 0}body.comment-mode .layout{min-width:0;width:100%;box-sizing:border-box}body.comment-mode .sheet-toolbar+ .sub{display:none}@media(max-width:600px){body.comment-mode aside{display:none!important}body.comment-mode .layout{display:block!important}body.comment-mode #main{width:100%!important;margin:0!important;padding:10px!important}body.comment-mode .lesson-comments{padding:10px}body.comment-mode .comment-phrases button{flex:1 1 42%;padding:8px;font-size:12px}body.comment-mode .comment-heading button{font-size:12px}body.comment-mode .comment-activities button{font-size:12px}body.comment-mode .comment-student{min-width:160px;width:160px}}

@media(max-width:600px){body.comment-mode #commentStudentList{max-height:none;overflow-y:hidden;padding-bottom:4px}body.comment-mode .comment-student small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}body.comment-mode .comment-student{padding:9px!important;align-content:start}body.comment-mode .comment-student b{font-size:12px}body.comment-mode .comment-student span{font-size:11px}}



/* Compact teacher registration: up to eight students per row, inline checkboxes. */
.modal .teacher-registration{font-size:14px!important}
.modal .teacher-registration p,.modal .teacher-registration label,.modal .teacher-registration span,.modal .teacher-registration input,.modal .teacher-registration select{font-size:14px!important;line-height:1.5}
.modal .teacher-registration #teacherStudentChoices{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(min(100%,max(96px,calc((100% - 56px)/8))),1fr));gap:2px 8px;margin:6px 0;overflow-x:hidden;overflow-y:auto}
.modal .teacher-registration label.teacher-student-choice,.modal .teacher-registration label.teacher-option{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:7px;white-space:nowrap;padding:6px 0;margin:0}
.modal .teacher-registration input[type=checkbox]{display:inline-block!important;width:16px!important;height:16px!important;min-width:16px!important;flex:0 0 16px;margin:0!important;padding:0!important}
.modal .teacher-registration .teacher-student-choice span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.modal .teacher-registration label.teacher-option{margin:8px 0;font-size:14px!important}

.teacher-registration .teacher-class-choices{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:4px 18px;border:1px solid #dce3df;border-radius:8px;padding:10px}.teacher-registration .teacher-class-choices legend{font-size:14px}

.modal .teacher-registration label.teacher-student-choice{min-width:0;padding:3px 0!important;line-height:1.3!important}.modal .teacher-registration .teacher-student-choice span{min-width:0;line-height:1.3!important}
.modal .teacher-registration .teacher-class-choices{gap:2px 12px;padding:6px 10px}.modal .teacher-registration .teacher-class-choices label.teacher-option{margin:0!important;padding:3px 0!important;line-height:1.3!important}

.modal .staff-actions.admin-menu-groups{display:block!important;margin-top:14px}.admin-menu-groups section{margin:0 0 16px}.modal .admin-menu-groups h3{font-size:14px!important;margin:0 0 8px;color:#52617a}.admin-menu-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.modal .admin-menu-grid button{width:100%!important;min-width:0!important;height:56px!important;margin:0!important;padding:8px!important;font-size:14px!important;line-height:1.3;border:1px solid #d4ddeb;border-radius:9px;background:#f0f4fa;color:#344764;white-space:normal;word-break:keep-all}.admin-menu-footer{display:flex;justify-content:flex-end}.modal .admin-menu-footer button{font-size:13px!important;padding:8px 16px!important}@media(max-width:650px){.admin-menu-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.student-detail-link{font-size:inherit;font-weight:700;color:#445d91;text-decoration:underline;text-underline-offset:3px}

/* Calendar scene changes only the home backdrop, never learning controls. */
body[data-home-theme] #main .game-home:before{background-image:var(--rami-home-scene);background-repeat:no-repeat;background-size:cover;opacity:1;filter:none}

body.guest-home[data-home-theme]:before{background-image:var(--rami-home-scene);background-size:cover;background-position:center bottom;opacity:1;filter:none}

body[data-home-theme] .game-home .game-heading{background:#e1ebfff2}body[data-home-theme] .game-home .game-heading h1{color:#243650}body[data-home-theme] .game-home .game-heading p{color:#415570}

body:not(.is-home) aside .side-bottom{display:none!important}

/* A staff iframe is content only; the parent owns navigation and background. */
html.lms-staff-embed,html.lms-staff-embed body{margin:0!important;background:#fff!important;min-height:100%!important;overflow:auto!important}
html.lms-staff-embed body>header,html.lms-staff-embed .layout>aside,html.lms-staff-embed body:before,html.lms-staff-embed body:after{display:none!important}
html.lms-staff-embed .layout{display:block!important;min-height:0!important;margin:0!important;padding:0!important;background:#fff!important}
html.lms-staff-embed #main{margin:0!important;padding:14px!important;width:100%!important;max-width:none!important;min-height:0!important;background:#fff!important;border:0!important;border-radius:0!important}
html.lms-staff-embed #main:before,html.lms-staff-embed #main:after{display:none!important}
html.lms-staff-embed .sheet-scroll{max-height:calc(100dvh - 175px)!important}

/* Keep the academy's home scene visible through today's learning shell. */
body.rami-today-screen[data-home-theme] .layout,
body.rami-today-screen[data-home-theme] #main,
body.rami-lecture-screen[data-home-theme] .layout,
body.rami-lecture-screen[data-home-theme] #main{background:transparent!important}
body.rami-today-screen[data-home-theme]:before,
body.rami-lecture-screen[data-home-theme]:before{opacity:0!important}
body:not(.guest-home) .layout>aside{background:rgba(222,231,246,.7)!important;backdrop-filter:none!important}
body.rami-today-screen #lectureFrame{background:transparent!important}
