.tablet-word-nav,.tablet-word-footer,.tablet-word-controls{display:none}
.tablet-tools-panel{border:1px solid #c9d8d2;border-radius:18px;padding:24px;max-width:min(640px,80vw);max-height:85dvh;overflow:auto;color:#203c35;background:#fff}
.tablet-tools-panel::backdrop{background:rgb(12 35 28 / 50%)}
.tablet-tools-panel aside{display:block!important;width:auto!important;position:static!important}
.tablet-tools-heading{display:flex;align-items:center;gap:20px;justify-content:space-between;margin-bottom:20px}
.tablet-tools-heading h2{font-size:20px;margin:0}
.tablet-tools-heading button{min-width:48px;min-height:48px;background:#edf4ef;border:1px solid #cad9d0;border-radius:12px}
/* Slider mode can be selected manually on any screen. */
 body.tablet-word-layout{--tablet-rail:clamp(150px,18vw,240px);--tablet-footer:max(48px,10dvh)}
 .tablet-word-layout .tablet-word-nav{display:flex;position:fixed;inset:0 auto 0 0;width:var(--tablet-rail);z-index:30;flex-direction:column;justify-content:center;gap:22px;padding:16px 10px;background:#123c33;color:#fff;border-right:1px solid #356457}
 .tablet-word-nav button,.tablet-word-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:65.8px;padding:8.4px 4px;border:1px solid #64877a;border-radius:18px;background:#204e41;color:white;text-decoration:none;text-align:center}
 .tablet-word-nav span{font-size:32px;font-weight:750;line-height:1.1}
 .tablet-word-nav small{font-size:13px;line-height:1.4}
 .tablet-word-layout .site-header,.tablet-word-layout .afterschool-practice-header,.tablet-word-layout main.shell{margin-left:var(--tablet-rail);width:calc(100% - var(--tablet-rail));max-width:none}
 .tablet-word-layout .learning-layout{grid-template-columns:minmax(0,1fr)}
 .tablet-word-layout .learning-layout>aside{display:none}
 .tablet-word-study .site-header,.tablet-word-study .afterschool-practice-header,.tablet-word-study .account-card,.tablet-word-study .intro,.tablet-word-study main>p,.tablet-word-study main>.controls,.tablet-word-study main>.section-label,.tablet-word-study main>.grades,.tablet-word-study main>footer{display:none}
 .tablet-word-study main.shell{padding:20px 24px calc(var(--tablet-footer) + 24px);min-height:100dvh}
 .tablet-word-study .learning-layout{margin:0;gap:0}
 .tablet-word-study .maya-workspaces{min-width:0}
 .tablet-word-study .workspace{padding:20px 26px;border:0;box-shadow:none;background:transparent}
 .tablet-word-study .lesson-heading{margin-bottom:10px}
 .tablet-word-study .lesson-heading h2{font-size:23px}
 .tablet-word-study #activity-description,.tablet-word-study .workspace>.description,.tablet-word-study .study-header,.tablet-word-study .study-head,.tablet-word-study #activity>.quiz-actions,.tablet-word-study #speech-status,.tablet-word-study #activity>.reading-illustration,.tablet-word-study #activity>details,.tablet-word-study #activity>p,.tablet-word-study .word-section-heading{display:none}
 .tablet-word-study .word-grid{display:block!important;touch-action:pan-y}
 .tablet-word-study .word-card{padding:24px;border:1px solid #ccdcd4;border-radius:24px;background:#fff;box-shadow:0 8px 30px rgb(22 60 45 / 6%);min-width:0}
 .tablet-word-study .word-card[hidden]{display:none!important}
 .tablet-word-study .word-top-illustrated,.tablet-word-study.ryan-page .word-top-illustrated{display:grid;grid-template-columns:minmax(0,1fr) 300px;align-items:center;gap:14px}
 body.tablet-word-study .word-card .word-top-illustrated .word-illustration{grid-column:2;grid-row:1 / span 2;width:300px;height:300px;min-width:300px;max-width:300px;min-height:300px;max-height:300px;object-fit:contain}
 .tablet-word-study .word-top h3{font-size:clamp(30px,4vw,50px);line-height:1.2;overflow-wrap:anywhere;grid-column:1}
 .tablet-word-study .word-card p{font-size:21px;line-height:1.325;margin:7px 0}
 .tablet-word-study .word-card .translation,.tablet-word-study .word-card .zh{font-size:44px;color:#275d48}
 .tablet-word-study .word-card .example,.tablet-word-study .word-card .sentence-translation,.tablet-word-study .word-card .example small{font-size:40px;line-height:1.3}
 .tablet-word-study .word-card .example small{display:block;margin-top:4px}
 .tablet-word-study .workshop-audio,.tablet-word-study .vocabulary-audio{display:flex;flex-wrap:wrap;gap:12px;grid-column:1}
 .tablet-word-study .listen{min-height:33.6px;padding:7px 18px;font-size:17px}
 .tablet-word-study .tablet-word-controls{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:12px 0 18px}
 .tablet-word-controls button{min-height:33.6px;padding:7px 18px;border:1px solid #cadbd0;border-radius:14px;background:#eef5ef;color:#214a3b;font-size:16px;font-weight:650}
 .tablet-word-controls [role=status]{font-size:16px;color:#466155}
 .tablet-word-study .tablet-word-footer{display:flex;position:fixed;bottom:0;left:var(--tablet-rail);right:0;height:calc(var(--tablet-footer) + env(safe-area-inset-bottom));padding:14px 18px calc(14px + env(safe-area-inset-bottom));align-items:center;gap:10px;overflow-x:auto;background:#edf4ef;border-top:1px solid #c8d9cc;z-index:25}
 .tablet-word-footer button{flex:0 0 auto;min-height:33.6px;padding:7px 18px;white-space:nowrap;border:1px solid #b9cdbd;border-radius:14px;background:#fff;color:#214a3b;font-size:17px}
 .tablet-word-footer button[aria-current=true]{background:#174f3b;color:white;border-color:#174f3b}
 .tablet-word-layout button:focus-visible,.tablet-word-layout a:focus-visible{outline:3px solid #d38d12;outline-offset:3px}


.vocabulary-view-toggle{min-height:48px;cursor:pointer}
.learning-layout>aside>.vocabulary-view-toggle{margin-bottom:16px;width:100%;justify-content:center}
.tablet-word-nav>.vocabulary-view-toggle{font-size:15px;min-height:42px}
.tablet-word-layout .tablet-word-nav{overflow-y:auto}
.tablet-grade-control{margin-top:auto;padding-top:20px;flex-shrink:0;text-align:center}
.tablet-grade-control[hidden]{display:none}
.tablet-rail-search{margin-top:auto;min-width:0;flex-shrink:0}
.tablet-rail-search:empty,.tablet-rail-activity:empty{display:none}
.tablet-rail-search~.tablet-grade-control{margin-top:0}
.tablet-word-nav .vocabulary-find{margin:0;padding:10px;background:#edf4ef;color:#20332c}
.tablet-word-nav .vocabulary-find label{font-size:14px}
.tablet-word-nav .vocabulary-find input{font-size:14px;padding:8px}
.tablet-word-nav .vocabulary-find button{min-height:28px;padding:5.6px 8px;border-radius:8px;font-size:13px}
.tablet-word-nav .vocabulary-find-status{font-size:12px}
.tablet-word-nav .vocabulary-find ul{max-height:180px}
.tablet-word-nav .vocabulary-find-result small{font-size:12px;color:#fff}
.tablet-rail-activity{flex-shrink:0;min-width:0}
.tablet-rail-activity label{display:flex;flex-direction:column;gap:8px;font-size:14px;font-weight:700;color:#fff}
.tablet-rail-activity select{box-sizing:border-box;width:100%;min-width:0;min-height:44px;padding:8px;border:1px solid #8bab99;border-radius:8px;background:#fff;color:#20332c;font:inherit}
.tablet-lesson-control{margin-top:0;padding-top:16px}
.tablet-word-layout .lesson-picker{display:none}
.tablet-grade-control label{display:block;font-size:13px;color:#fff}
.tablet-grade-control output{display:block;margin:8px 0;font-size:24px;font-weight:750;color:#fff}
.tablet-grade-stepper{display:flex;align-items:center;gap:4px}
.tablet-word-nav .tablet-grade-stepper button{flex:0 0 28px;min-height:28px;padding:0;border-radius:8px;font-size:22px;cursor:pointer}
.tablet-grade-stepper input{width:100%;min-width:0;margin:0;accent-color:#f5cb70;cursor:pointer}
.tablet-grade-stepper button:disabled{opacity:.4;cursor:default}
.tablet-grade-stepper input:focus-visible{outline:3px solid #d38d12;outline-offset:3px}

.word-card .speaking-word{background:#ffe58a;color:#18251e;border-radius:4px;box-shadow:0 2px 0 #b77900}

body[data-full-word-index="1"] .word-top h3{overflow-wrap:anywhere;min-width:0;line-height:1.3}

.tablet-word-nav>[data-tablet-words],.tablet-word-nav>a{flex-direction:row;gap:12px;min-height:44.8px}
.tablet-word-nav>[data-tablet-words] small,.tablet-word-nav>a small{text-align:left}
.vocabulary-find-status:empty{display:none}

.tablet-word-study .word-card .definition,.tablet-word-study .word-card [id^="spoken-meaning-"]{font-size:42px}

/* Keep intrinsic line height and padding from expanding the compact buttons. */
.tablet-word-nav>button,.tablet-word-nav>a{box-sizing:border-box;padding-block:0}
.tablet-word-nav>[data-tablet-calendar]{height:65.8px;flex-direction:row;gap:12px}
.tablet-word-nav>[data-tablet-calendar] span{font-size:24px}
.tablet-word-nav>[data-tablet-calendar] small{font-size:11px;line-height:1.2;text-align:left}
.tablet-word-nav>[data-tablet-words],.tablet-word-nav>a{height:44.8px}
.tablet-word-nav>[data-tablet-words] small,.tablet-word-nav>a small{line-height:1.2}
.tablet-word-nav>.vocabulary-view-toggle{height:42px}
.tablet-word-study .listen,.tablet-word-controls button,.tablet-word-footer button{box-sizing:border-box;height:33.6px;padding-block:0}
.tablet-word-nav .vocabulary-find button,.tablet-word-nav .tablet-grade-stepper button{box-sizing:border-box;min-height:28px;padding-block:0;line-height:1.1}

.tablet-word-study .word-top .word-heading{display:flex;align-items:center;gap:14px;grid-column:1;min-width:0;flex-wrap:wrap}
.tablet-word-study .word-heading h3{margin:0}
.tablet-word-study .word-heading .vocabulary-audio,.tablet-word-study .word-heading .workshop-audio{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:8px}
.tablet-word-study .word-heading .listen{white-space:nowrap;margin:0}
.tablet-word-study .word-card .sentence-translation{line-height:1.3;margin-top:4px}

.tablet-word-study .word-top-illustrated .word-heading{grid-column:1 / -1;grid-row:1}
body.tablet-word-study .word-card .word-top-illustrated .word-illustration{grid-row:2;justify-self:end}

/* Let the illustration share the text rows instead of reserving a header row. */
body.tablet-word-study .word-card:has(.word-illustration){display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:7px 24px;align-items:start}
body.tablet-word-study .word-card .word-top-illustrated{display:contents}
body.tablet-word-study .word-card .word-heading{grid-column:1 / -1;grid-row:1}
body.tablet-word-study .word-card .word-top-illustrated .word-illustration{grid-column:2;grid-row:2 / span 4;align-self:start}
body.tablet-word-study .word-card:has(.word-illustration)>p{grid-column:1;margin:0}

/* Keep every personal workshop tool reachable on short screens. */
.tablet-word-layout .tablet-word-nav{justify-content:flex-start;gap:14px}
.tablet-word-nav>button,.tablet-word-nav>a{flex-shrink:0}
.tablet-rail-extras:empty{display:none}
.tablet-rail-extras .subjects{display:flex;flex-direction:column;gap:8px;margin:0 0 10px}
.tablet-word-nav .tablet-rail-extras button{min-height:40px;padding:8px;font-size:14px}
.tablet-word-nav .tablet-grade-control>a{min-height:36px;padding:6px;font-size:12px;margin-top:8px}
.tablet-word-nav .tablet-lesson-control output{font-size:14px;overflow-wrap:anywhere}

/* Personal slider navigation shows names without supporting descriptions. */
.tablet-personal-nav .tablet-rail-extras small{display:none}

/* Slider typography follows the viewport, with readable minimums and capped sizes. */
body.tablet-word-layout{
 --slider-heading:clamp(1.275rem,calc(0.6375rem + 2.975vmin),2.65625rem);
 --slider-text:clamp(0.95625rem,calc(0.425rem + 2.55vmin),2.23125rem);
 --slider-translation:clamp(1.0625rem,calc(0.53125rem + 2.55vmin),2.3375rem);
 --slider-ui:clamp(0.690625rem,calc(0.53125rem + 0.51vmin),0.903125rem);
 --slider-small:clamp(0.6375rem,calc(0.425rem + 0.51vmin),0.796875rem);
}
.tablet-word-study .word-top h3{font-size:var(--slider-heading)}
.tablet-word-study .word-card p,
.tablet-word-study .word-card .definition,
.tablet-word-study .word-card [id^="spoken-meaning-"],
.tablet-word-study .word-card .example,
.tablet-word-study .word-card .sentence-translation,
.tablet-word-study .word-card .example small{font-size:var(--slider-text);line-height:1.35;overflow-wrap:anywhere}
.tablet-word-study .word-card .translation,
.tablet-word-study .word-card .zh{font-size:var(--slider-translation)}
.tablet-word-study .lesson-heading h2{font-size:clamp(0.95625rem,calc(0.6375rem + 1.02vmin),1.4875rem)}
.tablet-word-layout .tablet-word-nav button,
.tablet-word-layout .tablet-word-nav input,
.tablet-word-layout .tablet-word-nav select,
.tablet-word-layout .tablet-word-nav label,
.tablet-word-layout .tablet-word-nav .tablet-lesson-control output,
.tablet-word-study .listen,
.tablet-word-layout .tablet-word-controls button,
.tablet-word-layout .tablet-word-controls [role=status],
.tablet-word-layout .tablet-word-footer button{font-size:var(--slider-ui)}
.tablet-word-layout .tablet-word-nav small,
.tablet-word-layout .tablet-word-nav .vocabulary-find-status,
.tablet-word-layout .tablet-word-nav .tablet-grade-control>a{font-size:var(--slider-small)}
.tablet-word-layout .tablet-word-nav .tablet-grade-stepper button,
.tablet-word-layout .tablet-word-nav .tablet-grade-control:not(.tablet-lesson-control) output{font-size:clamp(0.95625rem,calc(0.6375rem + 1.02vmin),1.275rem)}
.tablet-word-study .listen,
.tablet-word-layout .tablet-word-controls button,
.tablet-word-layout .tablet-word-footer button{height:auto;min-height:34px;padding-block:5px}
/* Stack the illustration when the remaining study column is narrow. */
@media(max-width:900px){
 .tablet-word-study main.shell{padding:16px 12px calc(var(--tablet-footer) + 16px)}
 .tablet-word-study .workspace{padding:12px 0}
 .tablet-word-study .word-card{padding:16px}
 body.tablet-word-study .word-card:has(.word-illustration){grid-template-columns:minmax(0,1fr)}
 body.tablet-word-study .word-card .word-top-illustrated .word-illustration{grid-column:1;grid-row:auto;justify-self:center;width:min(100%,220px);height:auto;min-width:0;min-height:0;max-width:220px;max-height:220px}
 .tablet-word-study .word-heading .vocabulary-audio,.tablet-word-study .word-heading .workshop-audio{flex-wrap:wrap}
}
@media(max-width:540px){
 body.tablet-word-layout{--tablet-rail:120px}
 .tablet-word-layout .tablet-word-nav{padding-inline:6px;gap:10px}
 .tablet-word-study .tablet-word-controls{flex-wrap:wrap;gap:8px}
 .tablet-word-layout .tablet-word-controls button{padding-inline:8px}
}

/* Keep the sidebar switch reachable even while the navigation is collapsed. */
.tablet-sidebar-toggle{display:none}
.tablet-word-layout .tablet-sidebar-toggle{display:block;position:fixed;top:10px;left:10px;z-index:35;box-sizing:border-box;min-height:44px;max-width:calc(var(--tablet-rail) - 20px);padding:8px 12px;border:1px solid #64877a;border-radius:12px;background:#204e41;color:#fff;font-size:var(--slider-ui);font-weight:650;cursor:pointer}
.tablet-word-layout .tablet-word-nav{box-sizing:border-box;padding-top:68px}
body.tablet-word-layout.tablet-sidebar-collapsed{--tablet-rail:0px}
.tablet-word-layout.tablet-sidebar-collapsed .tablet-word-nav{display:none}
.tablet-word-layout.tablet-sidebar-collapsed .tablet-sidebar-toggle{max-width:none}
.tablet-word-layout.tablet-sidebar-collapsed main.shell{padding-top:68px}

/* Mouse and keyboard users can also collapse the standard desktop column. */
body.vocabulary-sidebar-ready:not(.tablet-word-layout) .tablet-sidebar-toggle{display:block;position:fixed;top:10px;left:10px;z-index:35;min-height:44px;padding:8px 12px;border:1px solid #64877a;border-radius:12px;background:#204e41;color:#fff;font-size:14px;font-weight:650;cursor:pointer}
body.vocabulary-sidebar-ready:not(.tablet-word-layout) .site-header,
body.vocabulary-sidebar-ready:not(.tablet-word-layout) .afterschool-practice-header{padding-top:64px}
body.vocabulary-sidebar-ready.tablet-sidebar-collapsed:not(.tablet-word-layout) .learning-layout{grid-template-columns:minmax(0,1fr)}
body.vocabulary-sidebar-ready.tablet-sidebar-collapsed:not(.tablet-word-layout) .learning-layout>aside{display:none}

/* Word navigation occupies about one tenth of the visible viewport height. */
.tablet-word-study .tablet-word-footer{box-sizing:border-box;padding:clamp(4px,1dvh,14px) 18px calc(clamp(4px,1dvh,14px) + env(safe-area-inset-bottom));height:calc(var(--tablet-footer) + env(safe-area-inset-bottom))}
.tablet-word-study main.shell{padding-bottom:calc(var(--tablet-footer) + env(safe-area-inset-bottom) + 24px)}

/* Keep slider word illustrations at the requested size on every screen. */
body.tablet-word-study .word-card:has(.word-illustration){grid-template-columns:minmax(0,1fr) 150px}
body.tablet-word-study .word-card .word-top-illustrated .word-illustration{width:150px;height:150px;min-width:150px;max-width:150px;min-height:150px;max-height:150px;object-fit:contain}
@media(max-width:900px){
 body.tablet-word-study .word-card:has(.word-illustration){grid-template-columns:minmax(0,1fr)}
}

/* Float the image at the right edge without stretching the text rows. */
body.tablet-word-study .word-card:has(.word-illustration){display:flow-root}
body.tablet-word-study .word-card .word-top-illustrated .word-illustration{float:right;display:block;margin:0 0 12px 16px}
body.tablet-word-study .word-card .word-heading{margin:0 0 7px;gap:10px}
body.tablet-word-study .word-card:has(.word-illustration)>p{margin:7px 0 0}

/* Dock Menu at the start of the word footer until the user drags it away. */
body.tablet-word-layout .tablet-sidebar-toggle{touch-action:none;user-select:none;cursor:grab;max-width:none;width:112px;min-height:44px}
body.tablet-word-layout .tablet-sidebar-toggle:active{cursor:grabbing}
body.tablet-word-study:not(.tablet-menu-moved) .tablet-sidebar-toggle{top:auto;left:calc(var(--tablet-rail) + 6px);bottom:calc((var(--tablet-footer) - 44px)/2 + env(safe-area-inset-bottom));height:44px}
body.tablet-word-study:not(.tablet-menu-moved) .tablet-word-footer{padding-left:126px}
body.tablet-word-study .tablet-word-nav{padding-top:16px}
body.tablet-word-study.tablet-sidebar-collapsed main.shell{padding-top:20px}
body.vocabulary-sidebar-ready .tablet-sidebar-toggle{touch-action:none;user-select:none}

/* Compact both language buttons in the vocabulary slider. */
.tablet-word-study .vocabulary-audio .listen,.tablet-word-study .workshop-audio .listen{padding-inline:9px}
