/* Percent width excludes the root scrollbar; vw can exceed the dialog's containing block. */
.db-worksheet{position:fixed;inset:0;box-sizing:border-box;width:min(1120px,calc(100% - 24px));max-width:calc(100% - 24px);height:min(1200px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);margin:auto;padding:0 20px 16px;border:1px solid #b5cbd0;border-radius:18px;background:#eaf2f3;color:#143741;overflow:hidden;font:14px/1.5 Arial,sans-serif;overscroll-behavior:contain}
.db-worksheet[open]{display:flex;flex-direction:column}
.db-worksheet::backdrop{background:rgb(10 39 49 / .78)}
.db-worksheet [hidden]{display:none!important}.db-worksheet *{box-sizing:border-box}
.db-worksheet-toolbar{position:relative;top:auto;flex:0 0 auto;z-index:1;display:flex;gap:14px;align-items:center;flex-wrap:wrap;padding:16px 0;background:#eaf2f3;border-bottom:1px solid #b5cbd0}
.db-worksheet-toolbar small{font-size:10px;font-weight:700;letter-spacing:1px;color:#087f8c}.db-worksheet-toolbar h2{font:700 22px/1.2 Arial,sans-serif;margin:5px 0 0;color:#143741}
.db-worksheet-modes,.db-worksheet-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.db-worksheet-actions{margin-left:auto}
.db-worksheet button,.db-worksheet select{font:700 13px/1.35 Arial,sans-serif;min-height:44px;border:1px solid #b5cbd0;border-radius:10px;padding:10px 13px;color:#143741;background:white;cursor:pointer;white-space:normal}
.db-worksheet button[aria-pressed=true]{background:#f8cb4c;border-color:#e3b936}.db-worksheet button.db-worksheet-download{background:#087f8c;border-color:#087f8c;color:white}
.db-worksheet button:disabled{opacity:.5;cursor:wait}.db-worksheet button:focus-visible,.db-worksheet select:focus-visible{outline:3px solid #143741;outline-offset:2px}
.db-worksheet-status{flex:0 0 auto;margin:8px 0;font:400 13px/1.5 Arial,sans-serif;color:#365961}
.db-worksheet-stage{flex:1 1 0;min-height:0;min-width:0;width:100%;overflow:auto;overscroll-behavior:contain;padding:4px;}
.db-worksheet .db-worksheet-preview{display:block;flex:none;min-width:0;max-width:100%;height:auto;margin:0 auto;background:white;box-shadow:0 3px 10px #14374120}
.db-worksheet-view{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 0;font-size:11px;color:#365961}
.db-worksheet-view button{min-height:36px;padding:6px 12px}
body.db-worksheet-open{overflow:hidden}
.db-activity__actions button,.db-activity__actions button b{white-space:nowrap;word-break:normal;overflow-wrap:normal}
@media(min-width:621px){
 .db-activity:not(:fullscreen):not(:-webkit-full-screen):not(.db-activity--fullscreen-fallback) .db-activity__header{flex-wrap:wrap}
 .db-activity:not(:fullscreen):not(:-webkit-full-screen):not(.db-activity--fullscreen-fallback) .db-activity__header>div:first-child{min-width:0;flex:1 1 100%}
 .db-activity__header h2{overflow-wrap:break-word}
 .db-activity__actions button{flex:0 0 auto}
}
/* Three equal tracks keep the primary button on the card's centre line. */
.db-activity:not(:fullscreen):not(:-webkit-full-screen):not(.db-activity--fullscreen-fallback) .db-activity__header>.db-activity__tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:stretch;justify-items:stretch;justify-self:center;flex:0 1 400px;width:min(100%,400px);max-width:100%;min-width:0;margin-inline:auto}
.db-activity:not(:fullscreen):not(:-webkit-full-screen):not(.db-activity--fullscreen-fallback) .db-activity__actions{display:contents}
.db-activity:not(:fullscreen):not(:-webkit-full-screen):not(.db-activity--fullscreen-fallback) .db-activity__meta{width:100%;min-width:0}
.db-activity:not(:fullscreen):not(:-webkit-full-screen):not(.db-activity--fullscreen-fallback) .db-activity__meta>span{flex:1 1 0}
.db-activity:not(:fullscreen):not(:-webkit-full-screen):not(.db-activity--fullscreen-fallback) .db-activity__meta>span,
.db-activity:not(:fullscreen):not(:-webkit-full-screen):not(.db-activity--fullscreen-fallback) .db-activity__actions button{box-sizing:border-box;width:100%;min-width:0;height:52px;min-height:52px;margin:0;border-radius:14px;align-content:center}
@media(max-width:620px){.db-activity:not(:fullscreen):not(:-webkit-full-screen):not(.db-activity--fullscreen-fallback) .db-activity__header{grid-template-columns:minmax(0,1fr)}}
@media(max-width:620px){.db-activity:not(:fullscreen):not(:-webkit-full-screen):not(.db-activity--fullscreen-fallback) .db-activity__actions button{padding:6px;gap:4px}.db-activity:not(:fullscreen):not(:-webkit-full-screen):not(.db-activity--fullscreen-fallback) .db-activity-print b{white-space:normal;line-height:1.2}}
@media(max-width:340px){.db-activity:is([data-activity-type="quiz"],[data-activity-type="matching_pairs"],[data-activity-type="flashcards"]) .db-activity-print::after{content:"PNG"}}
@media(max-width:640px){.db-worksheet{width:calc(100% - 24px);height:calc(100dvh - 24px);max-height:calc(100dvh - 24px);padding:0 10px 8px;border-radius:12px}.db-worksheet-toolbar{gap:6px;padding:8px 0}.db-worksheet-toolbar>div{width:100%;min-width:0}.db-worksheet-toolbar small{display:none}.db-worksheet-modes{display:grid;grid-template-columns:1fr 1fr}.db-worksheet-actions{display:grid;grid-template-columns:minmax(0,1fr) auto}.db-worksheet-actions select{grid-column:1/-1;width:100%}.db-worksheet-toolbar h2{font-size:17px;margin:0}.db-worksheet button{padding:8px}.db-worksheet-status{font-size:11px;line-height:1.3}.db-worksheet-view{padding:4px 0}}
