/* Reusable worksheet desk. The original page stays white and unobstructed. */
.tablet-heading{flex-wrap:wrap}
.tablet-heading>div{flex:1 1 330px}
.set-picker{display:grid;gap:5px;font-size:14px;font-weight:600}
.set-picker select{font:inherit;min-height:46px;max-width:285px;border:1px solid;border-radius:9px;padding:8px}
.memory-cover{position:absolute;z-index:5;display:grid;place-items:center;box-sizing:border-box;padding:5%;background:#17324d;color:#fff;text-align:center;border-radius:12px;touch-action:pan-y}
.memory-cover p{font:700 clamp(14px,2vw,22px)/1.5 system-ui,sans-serif;color:#fff!important;max-width:27ch}
@media(max-width:600px){.set-picker{margin-top:8px}.set-picker select{max-width:100%;width:100%}.tablet-page #memory-toggle{grid-column:1/-1}.tablet-heading>.set-picker{display:flex;align-items:center;gap:12px}.tablet-heading>.set-picker select{flex:1;min-width:0}}
.tablet-page{margin:0;background:#fff;font:16px/1.5 system-ui,sans-serif}
.tablet-top{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 24px;border-bottom:1px solid #b28aff}
.tablet-top .portal-logo{font-size:25px}.tablet-top>a:last-child{min-height:44px;display:flex;align-items:center}
.tablet-heading{max-width:1440px;margin:auto;padding:20px 24px 14px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.tablet-heading h1{font-size:clamp(25px,3vw,34px);margin:0 0 6px}.tablet-heading p{margin:0;font-size:16px}
.sheet-picker{display:grid;gap:5px;flex-shrink:0;font-size:14px;font-weight:600}.sheet-picker select{font:inherit;min-height:46px;max-width:280px;padding:8px 30px 8px 10px;border:1px solid;border-radius:9px}
.tablet-tools{position:sticky;top:0;z-index:10;background:#b28aff;--brand-ink:#000!important;padding:10px 24px;box-shadow:0 3px 10px #07122514;display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.tool-group{display:flex;align-items:center;gap:5px}.tool-group+ .tool-group{border-left:1px solid #0005;padding-left:12px}
.tablet-page button,.tablet-page .tool-link{font:650 15px/1.3 system-ui,sans-serif;min-width:46px;min-height:46px;box-sizing:border-box;padding:8px 12px;cursor:pointer;border:2px solid transparent;border-radius:10px;background:#fff;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:6px}
.tablet-page button:disabled{opacity:.48;cursor:default}.tablet-page button[aria-pressed=true]{box-shadow:inset 0 0 0 2px #000;background:white!important;border-color:#000!important;text-decoration:underline;text-underline-offset:3px}
.tablet-tools svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.tablet-tools .color-choice{padding:5px;border-radius:50%;background:#fff!important;min-width:44px;min-height:44px}
.color-choice span{display:block;width:25px;height:25px;border-radius:50%;box-shadow:inset 0 0 0 1px #0003}
.color-choice[data-color='#f3c623'] span{background:#f3c623}.color-choice[data-color='#ea6ca5'] span{background:#ea6ca5}.color-choice[data-color='#855329'] span{background:#855329}
.color-choice[data-color='#111111'] span{background:#111111}.color-choice[data-color='#3155ce'] span{background:#3155ce}.color-choice[data-color='#a12ac2'] span{background:#a12ac2}.color-choice[data-color='#e63848'] span{background:#e63848}.color-choice[data-color='#e87c13'] span{background:#e87c13}.color-choice[data-color='#258542'] span{background:#258542}
.tablet-tools select{min-height:46px;border:1px solid #000;border-radius:9px;font:600 14px system-ui,sans-serif;padding:8px}
.tablet-secondary{max-width:1440px;padding:10px 24px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.tablet-zoom{display:flex;align-items:center;gap:6px}.tablet-zoom button{min-height:40px}.tablet-zoom output{min-width:42px;text-align:center;font-size:14px}
.tablet-status{margin:0;font-size:14px;max-width:540px}
.tablet-desk{background:#f5f5f7;overflow:auto;max-height:calc(100dvh - 180px);min-height:300px;padding:18px;overscroll-behavior:contain;scrollbar-gutter:stable}
.tablet-paper{position:relative;width:100%;max-width:1000px;margin:0 auto;background:#fff;line-height:0;box-shadow:0 4px 22px #0002;isolation:isolate}
.tablet-paper img{display:block;width:100%;height:auto;user-select:none;-webkit-user-drag:none;pointer-events:none}
.tablet-paper canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:crosshair;outline-offset:5px!important}
.tablet-paper canvas[data-tool=move]{touch-action:pan-x pan-y;cursor:grab}.tablet-paper canvas[data-tool=eraser]{cursor:cell}
.tablet-paper canvas[data-tool=answer]{touch-action:pan-y;cursor:default}
#answer-layer{position:absolute;inset:0;pointer-events:none;line-height:1.2}
.tablet-page .answer-region{position:absolute;min-width:0;min-height:0;padding:0;pointer-events:auto;background:transparent!important;border:2px dashed transparent;border-radius:16px;color:#17324d!important;font-size:clamp(18px,3vw,32px);touch-action:pan-y;box-shadow:none!important;text-decoration:none!important}
.tablet-page .answer-region:hover,.tablet-page .answer-region:focus-visible{border-color:#6244bb!important;background:#b28aff18!important}
.tablet-page .answer-region[aria-pressed=true]{border-color:transparent!important;background:transparent!important}
.tablet-page .answer-region[data-kind=number][data-filled=false]{border-color:#6244bb!important}
.tablet-page #answer-layer .answer-region,.tablet-page #answer-layer .answer-region[aria-pressed=true]{background:transparent!important;box-shadow:none!important}
.tablet-page #answer-layer .answer-region:hover,.tablet-page #answer-layer .answer-region:focus-visible{background:#b28aff18!important;border-color:#6244bb!important}
.tablet-page #answer-dialog{width:calc(100% - 32px);max-width:490px;box-sizing:border-box;max-height:90dvh;overflow:auto}
.answer-options{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0 22px}
.answer-number-grid{display:grid;grid-template-columns:repeat(4,1fr)}
.answer-number-grid .answer-clear{grid-column:1/-1}.answer-beads{flex:0 0 100%;display:flex;flex-wrap:wrap;gap:10px;min-height:45px;padding:6px;box-sizing:border-box}
.answer-beads i{width:28px;height:28px;border:3px solid #3155ce;border-radius:50%;background:#fff}
.tablet-page #answer-tool{background:#fff!important;color:#071225!important}
@media(max-width:600px){.tablet-page.tablet-activity .tablet-notices #tool-hint{display:block;font-size:13px}}
.pen-position{position:absolute;width:18px;height:18px;border:2px solid #000!important;border-radius:50%;background:#fff8;transform:translate(-50%,-50%);pointer-events:none;display:none}
.tablet-paper:focus-within .pen-position[data-visible=true]{display:block}
.tablet-bottom{max-width:1000px;margin:18px auto;padding:0 24px 28px;font-size:14px}.tablet-bottom p{margin:8px 0}.tablet-bottom summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:650}
.tablet-bottom a{display:inline-flex;min-height:44px;align-items:center;margin-right:18px;text-underline-offset:4px}
.tablet-error{padding:30px;max-width:650px;margin:auto}.tablet-page [hidden]{display:none!important}
.tablet-page dialog{max-width:420px;padding:28px;border:2px solid #071225!important;border-radius:20px}.tablet-page dialog h2{font-size:25px;margin:0 0 14px}.tablet-page dialog p{margin:10px 0 22px}.tablet-dialog-actions{display:flex;gap:12px;justify-content:flex-end}.tablet-page dialog button{border:2px solid #071225!important}.tablet-page dialog button:last-child{background:#b28aff}
.tablet-page #picture-dialog{max-width:600px;max-height:90dvh;overflow:auto}.tablet-page #picture-preview{display:block;width:auto;max-width:100%;height:min(52dvh,500px);object-fit:contain;margin:12px auto}.tablet-page #picture-download{background:#b28aff!important;color:#000!important;border:2px solid #000!important}
.tablet-focus .tablet-top,.tablet-focus .tablet-heading{display:none}
.tablet-entry{display:inline-flex;align-items:center;gap:8px;min-height:48px;padding:10px 16px;background:#b28aff!important;--brand-ink:#000;color:#000!important;border-radius:12px;font:700 16px/1.4 system-ui,sans-serif;text-decoration:none;margin-bottom:12px}.tablet-entry:hover{text-decoration:underline}.tablet-entry-note{font:400 14px/1.5 system-ui,sans-serif;margin:0 0 12px}
@media(max-width:900px){.tablet-heading{align-items:flex-start}.tablet-tools{padding:8px 12px;gap:8px}.tool-group+.tool-group{padding-left:8px}.tablet-desk{padding:12px;max-height:calc(100dvh - 205px)}.tablet-heading,.tablet-secondary{padding-inline:16px}}
@media(max-width:600px){.tablet-top{padding:10px 14px;gap:10px}.tablet-top .portal-logo{font-size:21px}.tablet-top>a:last-child{font-size:14px}.tablet-heading{display:block;padding-top:14px}.tablet-heading p{font-size:14px}.sheet-picker{margin-top:12px;display:flex;align-items:center;gap:12px}.sheet-picker select{flex:1;max-width:none;min-width:0}.tablet-tools{gap:7px;padding:7px 10px}.tablet-tools button{font-size:13px;padding:7px;gap:4px}.tablet-tools svg{width:19px;height:19px}.tablet-tools .color-choice{min-width:36px;min-height:44px;padding:4px}.color-choice span{width:23px;height:23px}.tool-group+.tool-group{padding-left:0;border:0}.tablet-secondary{gap:6px;padding:8px 12px}.tablet-status{font-size:13px}.tablet-desk{padding:10px;max-height:calc(100dvh - 235px)}.tablet-bottom{padding-inline:16px}.tablet-tools select{font-size:13px;padding:5px;max-width:88px}}
@media(prefers-reduced-motion:reduce){.tablet-page *{scroll-behavior:auto!important}}
@media(max-width:600px){
 .tablet-heading>div>p{display:none}.tablet-heading h1{font-size:24px}
 .tablet-secondary .tablet-zoom{order:1;gap:3px}.tablet-secondary #save-copy{order:2}
 .tablet-secondary #tool-hint{order:3;margin:0;width:100%}
 .tablet-zoom button{min-width:38px;font-size:13px;padding:7px}.tablet-zoom output{min-width:40px}
 #save-copy{font-size:13px;padding:8px}
}
.tablet-completion{display:flex;gap:8px;flex-wrap:wrap}
.answer-helper{font:16px/1.4 system-ui;margin:10px 0;max-width:100%}.answer-helper summary{cursor:pointer;font-weight:700;padding:8px}.answer-helper select{max-width:100%;min-height:44px;font:inherit;padding:8px}.answer-helper button{min-height:44px;margin:6px;font:inherit;padding:8px 14px}.answer-picture-option{display:flex!important;flex-direction:column;align-items:center;min-width:120px;min-height:54px}.answer-picture-option canvas{max-width:100%}.answer-token-preview{width:100%;text-align:center;font:700 22px system-ui}.answer-token-preview canvas{display:block;max-width:100%;margin:auto}
.tablet-page #check-work,.tablet-page #save-copy{background:#b28aff!important;color:#000!important;--brand-ink:#000!important;border:2px solid #000!important;font-weight:750}
.tablet-notices{display:flex;justify-content:space-between;gap:6px 20px;flex-wrap:wrap;width:100%;font-size:13px}
.tablet-notices p{margin:0;max-width:none;font-size:13px}.tablet-notices #save-status{font-weight:600}
.tablet-page #check-dialog{max-width:500px;width:calc(100% - 40px);box-sizing:border-box;max-height:90dvh;overflow:auto}
.check-result{border-top:1px solid #071225;padding:14px 0}.check-result h3{font:750 18px/1.4 system-ui,sans-serif!important;margin:0 0 6px}.tablet-page .check-result p{margin:0 0 10px;font-size:16px;line-height:1.5}
.tablet-page #check-dialog .check-note{font-size:14px;margin:8px 0 18px}.tablet-page #close-check{background:#b28aff!important;color:#000!important}
.tablet-page #check-marker{position:absolute;pointer-events:none;width:34px;height:34px;border-radius:50%;border:4px solid #000!important;box-shadow:0 0 0 4px #fff;transform:translate(-50%,-50%);z-index:2}
@media(max-width:600px){.tablet-completion{order:0;width:100%;display:grid;grid-template-columns:1fr 1fr}.tablet-completion button{font-size:14px!important;padding:10px 5px!important}.tablet-secondary .tablet-zoom{order:1}.tablet-notices{order:3}.tablet-notices #tool-hint{display:none}.tablet-notices #save-status{font-size:12px}.tablet-page dialog{padding:20px}.tablet-dialog-actions{flex-wrap:wrap}}
