/* IELTS v1.4.1: one scaled book-room scene; readable controls live above it. */
html:root body.home-desk-mode{--table-fraction:.67;--home-calendar-width:220px}
html:root body.home-desk-mode #app{width:100%;height:100%}
html:root body.home-desk-mode .home-desk-root{height:100dvh}
html:root body.home-desk-mode .workspace{margin:0;padding:0}
html:root body.home-desk-mode .book-spine strong{margin:0}
html:root body.home-desk-mode button{padding:0;min-height:0;border-radius:0}
html:root body.home-desk-mode .desk-side:has(.book.is-open,.book.is-closing){position:relative;z-index:10}
html:root body.home-desk-mode .desk-scene{--depth:92px;--aux-vocab-depth:60px;--aux-phrase-depth:58px;--aux-points-depth:56px;transform-origin:50% 67%}
/* All seven books use the same scale. Never cancel it on the smaller spines. */
html:root body.home-desk-mode .book-aux{--depth:var(--aux-vocab-depth);--book-height-factor:.69;--closed-height:calc(var(--book-height)*var(--book-height-factor));height:var(--closed-height)}
html:root body.home-desk-mode .book.phrase{--depth:var(--aux-phrase-depth);--book-height-factor:.65}
/* Closed wrongbook shows only its spine; edge-on 3D faces must not leave a pale seam. */
html:root body.home-desk-mode .book.phrase:not(.is-open):not(.is-closing) :is(.book-front,.book-back,.book-pages,.book-pages-top){visibility:hidden}
html:root body.home-desk-mode .book.points{--depth:var(--aux-points-depth);--book-height-factor:.62}
html:root body.home-desk-mode .book-aux .book-spine strong{font:600 27px/1.2 var(--serif);writing-mode:vertical-rl;text-orientation:upright;white-space:nowrap;letter-spacing:.08em;left:50%;top:18%;bottom:auto;transform:translateX(-50%);display:block}
html:root body.home-desk-mode .book.points .book-spine strong{font-size:25px}
html:root body.home-desk-mode :is(.book.fill,.book.daily,.book.academic) .book-spine strong{display:flex;flex-direction:column;align-items:center;justify-content:space-between;position:absolute;inset:15% 0 16%;writing-mode:horizontal-tb;text-orientation:mixed;white-space:nowrap;letter-spacing:normal;font-family:Georgia,'Times New Roman',serif;font-weight:500;line-height:1;transform:none}
html:root body.home-desk-mode .passage-spine-word{writing-mode:vertical-rl;text-orientation:mixed;font-size:32px;letter-spacing:.055em}
html:root body.home-desk-mode .passage-spine-number{display:block;font-size:40px;line-height:1;font-weight:600}
html:root body.home-desk-mode .book-spine:after{bottom:6%;font-size:8px}
html:root body.home-desk-mode .book-trigger:focus-visible{outline:3px solid #fff2bc;outline-offset:4px}
html:root body.home-desk-mode .book-front{line-height:1.5}
html:root body.home-desk-mode .book-title{white-space:normal}
/* The original yellow paper is one link; its lower action is plain printed text. */
html:root body.home-desk-mode .bookplate-link{min-height:calc(88px/var(--scene-scale,1));text-decoration:none;cursor:pointer}
html:root body.home-desk-mode .bookplate-link .book-current{display:block;margin:0;font:400 calc(11px/var(--scene-scale,1))/1.5 var(--sans);color:#756b43}
html:root body.home-desk-mode .bookplate-action{display:flex;align-items:center;gap:.4em;margin-top:auto;min-height:calc(32px/var(--scene-scale,1));padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;color:#6d3727;font:500 calc(14px/var(--scene-scale,1))/1.5 var(--sans)}
html:root body.home-desk-mode .book-entry-arrow{display:inline-block;transition:transform .16s ease}
html:root body.home-desk-mode .bookplate-link:hover .book-entry-label{text-decoration:underline;text-underline-offset:.2em;text-decoration-thickness:1px}
html:root body.home-desk-mode .bookplate-link:hover .book-entry-arrow{transform:translateX(calc(2px/var(--scene-scale,1)))}
html:root body.home-desk-mode .bookplate-link:focus:not(:focus-visible){outline:none}
html:root body.home-desk-mode .bookplate-link:focus-visible{outline:2px solid #6d3727;outline-offset:calc(3px/var(--scene-scale,1))}
@media(prefers-reduced-motion:reduce){html:root body.home-desk-mode .book-entry-arrow{transition:none}html:root body.home-desk-mode .bookplate-link:hover .book-entry-arrow{transform:none}}
html:root body.home-desk-mode .book.is-open .book-dismiss{width:calc(40px/var(--scene-scale,1));height:calc(40px/var(--scene-scale,1));min-height:calc(40px/var(--scene-scale,1));font-size:calc(26px/var(--scene-scale,1));line-height:1;right:0;top:0;border-radius:50%;z-index:5;background:#203b341c}
html:root body.home-desk-mode .book.is-open .book-kicker{right:calc(26px/var(--scene-scale,1));top:calc(5px/var(--scene-scale,1))}
html:root body.home-desk-mode .book.is-reader-book{--scene-scale:1;width:calc(var(--open-height)*.7);height:var(--open-height)}
html:root body.home-desk-mode .book.is-reader-book .book-dismiss{width:44px;height:44px;min-height:44px;font-size:28px}
html:root body.home-desk-mode .home-readable-layer{z-index:120}
/* The bottom dock stays in place, with clear 44px navigation targets. */
html:root body.home-desk-mode #header.site-header{display:flex;align-items:center;justify-content:space-between;gap:14px;position:fixed;top:auto;bottom:24px;left:50%;right:auto;transform:translateX(-50%);width:calc(100% - 64px);max-width:1320px;margin:0;padding:10px 18px;min-height:66px;height:auto;border:1px solid #8e7b5650;border-radius:10px;background:#f6edcf;box-shadow:0 5px 18px #57492512;z-index:30}
html:root body.home-desk-mode #header a{color:#435b48;text-decoration:none}
html:root body.home-desk-mode #header .unified-brand{flex:none;font-size:15px;font-weight:700;padding-right:18px;border-right:1px solid #36554526}
html:root body.home-desk-mode #header nav{display:flex;flex:1;align-items:center;justify-content:center;gap:4px;min-width:0;white-space:nowrap}
html:root body.home-desk-mode #header nav a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 12px;font-size:14px;border-radius:7px;font-weight:500}
html:root body.home-desk-mode #header nav a:hover{background:#e9dfbb}
html:root body.home-desk-mode #header nav a[aria-current=page]{background:#dce4ce;color:#254d3b;font-weight:700;box-shadow:inset 0 0 0 1px #5577492b}
html:root body.home-desk-mode #header #shelf-search{display:flex;align-items:center;gap:6px;min-width:0}
html:root body.home-desk-mode #shelf-search input{width:150px;min-height:38px;padding:6px 9px;font-size:13px;background:#fff8e6}
html:root body.home-desk-mode #shelf-search button{min-width:40px;min-height:44px;font-size:13px}
html:root body.home-desk-mode #sync-status{white-space:nowrap;font-size:12px}
html:root body.home-desk-mode .unified-account{display:inline-flex;align-items:center;min-height:44px;white-space:nowrap;font-size:13px}
/* Keep the existing wall calendar size and placement. */
html:root body.home-desk-mode .homework-side.learning-calendar-host{position:absolute;right:4vw;top:32px;width:220px;height:auto;padding:0;margin:0;z-index:5}
html:root body.home-desk-mode .learning-calendar-paper{padding:18px 13px 11px}
html:root body.home-desk-mode .calendar-brand{text-align:center;letter-spacing:1px;font-size:10px}
html:root body.home-desk-mode .next-calendar-title{display:flex;align-items:center;justify-content:space-between;margin:8px 0;border-bottom:1px solid #a6aa95;padding-bottom:5px}
html:root body.home-desk-mode .next-calendar-title strong{font:26px Georgia,serif}
html:root body.home-desk-mode .next-calendar-title button{min-width:32px;min-height:32px;font-size:23px}
html:root body.home-desk-mode .next-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px;text-align:center;margin-bottom:10px}
html:root body.home-desk-mode .next-calendar-grid button{position:relative;border-radius:50%;min-height:25px;padding:2px;font-size:12px}
html:root body.home-desk-mode .next-calendar-grid .selected,html:root body.home-desk-mode .next-calendar-grid .is-today{outline:1px solid #ab6044}
html:root body.home-desk-mode .next-calendar-grid i{position:absolute;bottom:-4px;left:45%;font-style:normal}
html:root body.home-desk-mode .calendar-pocket{display:block;padding:8px 0 0;border-top:1px solid #bfc3ab;border-radius:0;background:transparent;min-height:0;width:auto;margin:8px 0 0;font-size:12px;box-shadow:none}
html:root body.home-desk-mode .calendar-pocket p{margin:4px 0}
html:root body.home-desk-mode #toast{z-index:1000}
@media(min-width:981px){
 html:root body.home-desk-mode .app{width:92%;max-width:1540px;height:calc(100dvh - 110px);min-height:0;margin:0 auto;padding:0;display:block}
 html:root body.home-desk-mode .workspace{height:100%;min-height:0;display:block}
 html:root body.home-desk-mode .desk-side{width:calc(100% - var(--home-calendar-width) - 36px);height:100%;display:block;min-height:0}
 html:root body.home-desk-mode .desk{height:100%;min-height:0}
}
@media(max-width:1250px){html:root body.home-desk-mode #header #shelf-search{display:none}}
@media(min-width:981px) and (max-width:1100px){
 html:root body.home-desk-mode #header.site-header{width:calc(100% - 32px);gap:8px;padding-inline:12px}
 html:root body.home-desk-mode #header nav a{padding-inline:9px}
 html:root body.home-desk-mode{--home-calendar-width:210px}
 html:root body.home-desk-mode .homework-side.learning-calendar-host{right:3vw;width:210px}
}
@media(max-width:980px){
 html:has(body.home-desk-mode){height:auto;min-height:100%}
 html:root body.home-desk-mode{height:auto;min-height:100dvh;overflow-x:hidden;overflow-y:auto;--paper:#cbb87e;--ink:#203d3e;--muted:#756b43;background:var(--paper)}
 html:root body.home-desk-mode .home-desk-root{height:auto;min-height:100dvh;display:flex;flex-direction:column}
 html:root body.home-desk-mode .app{order:1;display:block;width:100%;max-width:none;height:auto;min-height:0;margin:0;padding:0 16px}
 html:root body.home-desk-mode .workspace{display:block;min-height:0;width:100%}
 html:root body.home-desk-mode .desk-side{display:block;width:100%;height:auto;padding:0;margin:0}
 html:root body.home-desk-mode .desk{height:var(--compact-height);min-height:0;overflow:visible;max-width:none;background:linear-gradient(to bottom,var(--paper) 0 var(--compact-table-y),#efe2b9 var(--compact-table-y) 100%)}
 html:root body.home-desk-mode .desk-scene{height:640px;left:0;top:0;transform:translateX(calc(12px*var(--scene-scale,1))) scale(var(--scene-scale,1));transform-origin:0 0}
 html:root body.home-desk-mode .reading-table{opacity:1}
 html:root body.home-desk-mode .books-row{pointer-events:auto}
 html:root body.home-desk-mode .homework-side.learning-calendar-host{position:relative;inset:auto;width:min(300px,100%);margin:20px auto 16px;padding:0}
 html:root body.home-desk-mode .next-calendar-grid button{min-height:32px;font-size:13px}
 html:root body.home-desk-mode [data-home-header-slot]{order:2}
 html:root body.home-desk-mode #header.site-header{position:relative;inset:auto;transform:none;width:calc(100% - 24px);max-width:none;margin:12px;flex-wrap:wrap;padding:10px 12px;gap:6px 12px}
 html:root body.home-desk-mode #header .unified-brand{font-size:14px;border:0;padding:0;flex:1}
 html:root body.home-desk-mode #header nav{order:3;width:100%;flex-basis:100%;display:flex;flex-wrap:wrap;gap:2px}
 html:root body.home-desk-mode #header nav a{font-size:13px;padding-inline:10px}
 html:root body.home-desk-mode #header .unified-account{max-width:none;margin:0}
 html:root body.home-desk-mode #sync-status{font-size:11px}
}

/* Same normal-page navigation vocabulary and menus in the original home dock. */
html:root body.home-desk-mode #header.site-navigation{display:grid;grid-template-columns:minmax(150px,190px) minmax(0,1fr) auto;gap:16px;flex-wrap:nowrap}
html:root body.home-desk-mode #header .unified-brand{max-width:190px;white-space:normal;font-size:13px}
html:root body.home-desk-mode #header nav{flex-wrap:nowrap;gap:4px;grid-column:auto;grid-row:auto}
html:root body.home-desk-mode #header nav :is(a,.unified-bank-trigger){min-height:44px;height:44px;padding:8px 10px;font-size:14px;border:0;border-radius:6px}
html:root body.home-desk-mode #header .unified-tools{display:flex;align-items:center;justify-content:flex-end;gap:16px;grid-column:auto;grid-row:auto}
html:root body.home-desk-mode #header #shelf-search{margin:0;flex:none}
html:root body.home-desk-mode #header #shelf-search input{height:44px;min-height:44px;margin:0}
html:root body.home-desk-mode #header #shelf-search button{height:44px;margin:0}
html:root body.home-desk-mode #header .unified-account{gap:8px}
html:root body.home-desk-mode #header .unified-account-menu{max-width:130px}
html:root body.home-desk-mode #header .unified-account-menu>summary{gap:6px}
html:root body.home-desk-mode #header .unified-account-menu>summary>span:nth-child(2){max-width:68px;overflow:hidden;text-overflow:ellipsis}
html:root body.home-desk-mode #header .unified-account-panel{top:auto;bottom:calc(100% + 8px)}
@media(max-width:980px){html:root body.home-desk-mode #header.site-navigation{grid-template-columns:minmax(0,1fr) auto;gap:6px 12px}html:root body.home-desk-mode #header nav{grid-column:1/-1;grid-row:2;flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto}html:root body.home-desk-mode #header .unified-brand{max-width:none;grid-column:1;grid-row:1}html:root body.home-desk-mode #header .unified-tools{grid-column:2;grid-row:1;gap:8px}html:root body.home-desk-mode #header .unified-account-panel{top:auto;bottom:calc(100% + 8px)}}
/* Avoid a transformed containing block so fixed bank menus use viewport coordinates. */
@media(min-width:981px){html:root body.home-desk-mode #header.site-navigation{left:0;right:0;transform:none;margin-inline:auto}}


/* Daily homework uses server progress and stays within the existing paper. */
html:root body.home-desk-mode .calendar-day-tools{display:flex;align-items:center;justify-content:space-between;gap:4px}
html:root body.home-desk-mode .calendar-day-tools small{font-size:10px}
html:root body.home-desk-mode .calendar-day-tools button,html:root body.home-desk-mode .calendar-homework header button{min-height:28px;padding:2px 6px;font-size:11px}
html:root body.home-desk-mode .next-calendar-grid .is-today{font-weight:800;background:#e5e8d6}
html:root body.home-desk-mode .next-calendar-grid i.is-completed{color:#356747}
html:root body.home-desk-mode .next-calendar-grid i.is-overdue{color:#a0372a}
html:root body.home-desk-mode .next-calendar-grid i.is-pending{color:#a0372a}
html:root body.home-desk-mode .calendar-homework header{display:flex;align-items:center;justify-content:space-between;gap:4px;margin-bottom:4px}
html:root body.home-desk-mode .calendar-homework-list{list-style:none;padding:0;margin:0;max-height:180px;overflow:auto;overscroll-behavior:contain}
html:root body.home-desk-mode .calendar-homework-item{padding:8px 0;border-bottom:1px dashed #bdc1a8;overflow-wrap:anywhere}
html:root body.home-desk-mode .calendar-homework-item:last-child{border-bottom:0}
html:root body.home-desk-mode .calendar-homework-item>a{display:block;color:#4e542d;text-decoration:none;min-height:32px}
html:root body.home-desk-mode .calendar-homework-item strong{display:block;line-height:1.45}
html:root body.home-desk-mode .calendar-homework-item p{font-size:11px}
html:root body.home-desk-mode .calendar-homework-item small{display:block;font-size:10px;color:#62644e;line-height:1.5}
html:root body.home-desk-mode .calendar-task-status{display:inline-block;margin-top:4px;font-size:10px;line-height:1.6;color:#795918}
html:root body.home-desk-mode .calendar-task-status.is-completed{color:#356747}
html:root body.home-desk-mode .calendar-task-status.is-overdue{color:#a0372a}
html:root body.home-desk-mode .calendar-empty,html:root body.home-desk-mode .calendar-load-state{font-size:12px;line-height:1.6;margin:9px 0}
html:root body.home-desk-mode .calendar-overdue{border-top:1px solid #bfc3ab;padding-top:7px;margin-top:8px;font-size:11px}
html:root body.home-desk-mode .calendar-overdue summary{cursor:pointer;min-height:28px;align-content:center}
html:root body.home-desk-mode .calendar-overdue ul{margin:4px 0;padding:0;list-style:none;max-height:120px;overflow:auto}
html:root body.home-desk-mode .calendar-overdue li{margin:7px 0;overflow-wrap:anywhere}
html:root body.home-desk-mode .calendar-overdue small{display:block;font-size:10px}
html:root body.home-desk-mode .calendar-overdue p,html:root body.home-desk-mode .calendar-legacy-note{font-size:10px;line-height:1.5;margin:5px 0 0}
html:root body.home-desk-mode .learning-calendar-paper a:focus-visible,html:root body.home-desk-mode .learning-calendar-paper button:focus-visible,html:root body.home-desk-mode .calendar-overdue summary:focus-visible{outline:2px solid #547b5c;outline-offset:2px}

/* v1.4.16: the wall calendar and scene have separate horizontal space. */
html:root body.home-desk-mode .calendar-detail-head{display:flex;align-items:center;justify-content:space-between;gap:3px;padding:5px 0 7px;border-bottom:1px solid #a6aa9566}
html:root body.home-desk-mode .calendar-detail-head>strong{font-size:11px;font-weight:500;text-align:center}
html:root body.home-desk-mode .calendar-detail-head>span{display:flex;flex:none}
html:root body.home-desk-mode .calendar-detail-head button{padding:4px 2px;font-size:11px;min-height:32px}
html:root body.home-desk-mode .calendar-detail-head [data-calendar-shift]{min-width:22px;font-size:18px}
html:root body.home-desk-mode .learning-calendar-paper [data-calendar-day-heading]:focus{outline:none}
@media(min-width:981px){html:root body.home-desk-mode .learning-calendar-paper{max-height:calc(100dvh - 156px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}}
@media(max-width:980px){html:root body.home-desk-mode .calendar-detail-head button{min-height:44px}html:root body.home-desk-mode .calendar-detail-head [data-calendar-shift]{min-width:32px}}

/* v1.4.17: restore the home bottom dock without losing the calendar's own lane. */
html:root body.home-desk-mode [data-home-header-slot]{order:2}
@media(min-width:981px){
 html:root body.home-desk-mode .app{flex:0 0 auto}
 html:root body.home-desk-mode .workspace{position:relative}
 html:root body.home-desk-mode .homework-side.learning-calendar-host{top:32px;right:0;height:calc(100% - 32px);max-height:calc(100% - 32px)}
 html:root body.home-desk-mode .learning-calendar-paper{max-height:100%}
}
/* Home navigation: underline grows out from the center; no background fill. */
html:root body.home-desk-mode #header.site-navigation nav.unified-text-navigation>:is(a,button){position:relative;min-height:44px;background:transparent;transition:color .5s ease}
html:root body.home-desk-mode #header.site-navigation nav.unified-text-navigation>:is(a,button)::after{content:"";position:absolute;left:0;right:0;bottom:0;margin:auto;width:0;height:1px;background:#547b5c;border-radius:1px;pointer-events:none;transition:width .5s ease}
html:root body.home-desk-mode #header.site-navigation nav.unified-text-navigation>:is(a,button):hover,html:root body.home-desk-mode #header.site-navigation nav.unified-text-navigation>[aria-current=page]{background:transparent;color:#304b39}
html:root body.home-desk-mode #header.site-navigation nav.unified-text-navigation>:is(a,button):focus-visible::after,html:root body.home-desk-mode #header.site-navigation nav.unified-text-navigation>:is(a,button):active::after,html:root body.home-desk-mode #header.site-navigation nav.unified-text-navigation>[aria-current=page]::after{width:100%}
html:root body.home-desk-mode #header.site-navigation nav.unified-text-navigation>:is(a,button):focus-visible{outline:2px solid #547b5c;outline-offset:2px;color:#304b39}
@media(hover:hover){html:root body.home-desk-mode #header.site-navigation nav.unified-text-navigation>:is(a,button):hover::after{width:100%}}
@media(prefers-reduced-motion:reduce){html:root body.home-desk-mode #header.site-navigation nav.unified-text-navigation>:is(a,button),html:root body.home-desk-mode #header.site-navigation nav.unified-text-navigation>:is(a,button)::after{transition:none}}
html:root body.home-desk-mode #header #shelf-search,html:root body.home-desk-mode #header #shelf-search input,html:root body.home-desk-mode #header #shelf-search button{background:transparent;box-shadow:none}

/* Cancelled quota history is retained without an unfinished red marker. */
html:root body.home-desk-mode .next-calendar-grid i.is-cancelled,html:root body.home-desk-mode .calendar-task-status.is-cancelled{color:#778071}

/* Same read-only today union as homework; calendar squares keep original dates. */
.calendar-today-summary{display:block;text-align:center;font-size:11px;line-height:1.6;color:var(--green);text-decoration:none;margin:-4px 8px 10px;padding:5px 3px;border-bottom:1px solid #65765420;overflow-wrap:anywhere}
.calendar-today-summary:focus-visible{outline:2px solid var(--green);outline-offset:2px}

/* The invitation uses the clear right-hand floor, away from the vase fall path. */
html:root body.home-desk-mode .desk-side{position:relative}
html:root body.home-desk-mode .home-classroom-entry{--classroom-lift:0px;box-sizing:border-box;position:absolute;z-index:6;top:83.5%;left:calc(100% - 110px);transform:translate(-50%,calc(-50% + var(--classroom-lift)));display:flex;align-items:center;justify-content:center;gap:18px;width:220px;max-width:calc(100% - 32px);min-height:60px;margin:0;padding:15px 24px;border:1px solid #b5a273;border-radius:3px;background:linear-gradient(110deg,#f8f1dc,#f1e8c9);box-shadow:0 3px 0 #8e7b5614,0 6px 14px #57492512;color:#435b48;font:500 15px/1.5 var(--sans,system-ui);letter-spacing:.04em;text-align:center;text-decoration:none;overflow-wrap:anywhere;transition:transform .2s ease,box-shadow .2s ease}
html:root body.home-desk-mode .home-classroom-arrow{flex:none;color:#7c7b52;font:400 20px/1 Georgia,serif}
html:root body.home-desk-mode .home-classroom-entry:hover{--classroom-lift:-3px;box-shadow:0 3px 0 #8e7b561c,0 9px 18px #5749251c}
html:root body.home-desk-mode .home-classroom-entry:focus-visible{outline:2px solid #435b48;outline-offset:4px}
html:root body.home-desk-mode .home-classroom-entry[hidden]{display:none!important}
@media(max-width:980px){html:root body.home-desk-mode .home-classroom-entry{position:relative;top:auto;left:auto;transform:translateY(var(--classroom-lift));margin:20px auto 24px}}
@media(min-width:981px) and (max-height:359px){html:root body.home-desk-mode .home-classroom-entry{top:calc(67% + 14px);transform:translate(-50%,var(--classroom-lift));min-height:44px;padding-block:10px}}
@media(prefers-reduced-motion:reduce){html:root body.home-desk-mode .home-classroom-entry{transition:none}html:root body.home-desk-mode .home-classroom-entry:hover{--classroom-lift:0px}}
