/* Screen-only, opt-in Word Search editor. Never styles the separate print root. */
@media screen {
  #makerView.zg-ws-active .lesson-view-header { display:none; }
  #makerView.zg-ws-active .lesson-view-shell { gap:0; }
  #makerView.zg-ws-active #makerEngineShell { padding:0; border:0; background:transparent; box-shadow:none; }
  .maker-engine.zg-ws-editor {
    --ws-purple:#7545e8; --ws-accent:#5630b7; --ws-ink:#181818; --ws-muted:#696174;
    --ws-canvas:#f8f5ff; --ws-surface:#fff; --ws-soft:#f0eaff; --ws-line:#e6e0ee;
    --ws-control:#c8bfd4; --ws-error:#b62f42; --ws-rail:400px;
    color:var(--ws-ink); background:var(--ws-surface); display:flex; flex-direction:column; gap:0;
    min-width:0; font:14px/1.5 Inter,system-ui,sans-serif; border:1px solid var(--ws-line);
    border-radius:8px; isolation:isolate; -webkit-font-smoothing:antialiased;
  }
  .maker-engine.zg-ws-editor *, .maker-engine.zg-ws-editor *::before, .maker-engine.zg-ws-editor *::after { box-sizing:border-box; }
  .maker-engine.zg-ws-editor [hidden] { display:none!important; }
  .maker-engine.zg-ws-editor :is(h2,h3,p) { margin:0; }
  .maker-engine.zg-ws-editor :is(h2,h3) { font-family:Poppins,Inter,system-ui,sans-serif; }
  .maker-engine.zg-ws-editor :is(button,input,select,textarea) { font:inherit; }
  .maker-engine.zg-ws-editor :is(button,a,input,select,textarea):focus-visible { outline:3px solid var(--ws-purple); outline-offset:3px; }
  .maker-engine.zg-ws-editor button { cursor:pointer; min-height:44px; }
  .maker-engine.zg-ws-editor button:disabled { opacity:.45; cursor:default; }
  .maker-engine.zg-ws-editor .ws-studio-header { min-height:78px; padding:14px 22px; display:flex; align-items:center; gap:24px; border-bottom:1px solid var(--ws-line); background:var(--ws-surface); }
  .maker-engine.zg-ws-editor .ws-brand { font:800 26px/1 Poppins,system-ui,sans-serif; letter-spacing:-1.5px; color:var(--ws-purple); padding-right:24px; border-right:1px solid var(--ws-line); }
  .maker-engine.zg-ws-editor .ws-brand small { display:block; color:var(--ws-ink); font:600 8px/1 Inter,system-ui,sans-serif; letter-spacing:2px; margin-top:8px; padding-left:2px; }
  .maker-engine.zg-ws-editor .ws-identity { display:flex; align-items:center; gap:12px; }
  .maker-engine.zg-ws-editor .ws-identity>.ph { width:42px; height:42px; background:var(--ws-soft); color:var(--ws-purple); display:grid; place-items:center; font-size:25px; border-radius:6px; }
  .maker-engine.zg-ws-editor .ws-tool-title { font-size:24px; font-weight:700; letter-spacing:-1px; line-height:1.3; }
  .maker-engine.zg-ws-editor .ws-header-actions { margin-left:auto; }
  .maker-engine.zg-ws-editor .maker-help-btn { background:transparent; color:var(--ws-ink); border:0; min-height:44px; }
  .maker-engine.zg-ws-editor .maker-help-panel { background:var(--ws-surface); color:var(--ws-ink); border:1px solid var(--ws-line); z-index:20; }
  .maker-engine.zg-ws-editor .ws-workspace { display:grid; grid-template-columns:var(--ws-rail) minmax(0,1fr); align-items:start; min-width:0; }
  .maker-engine.zg-ws-editor .ws-editing-rail { min-width:0; padding:22px 25px 18px; border-right:1px solid var(--ws-line); }
  .maker-engine.zg-ws-editor .ws-intro h2 { font-size:26px; line-height:1.35; letter-spacing:-1px; margin-bottom:4px; font-weight:700; }
  .maker-engine.zg-ws-editor .ws-intro h2 span { color:var(--ws-purple); }
  .maker-engine.zg-ws-editor .ws-intro p { font-size:13px; color:var(--ws-muted); }
  .maker-engine.zg-ws-editor .maker-engine-section { padding:0; margin:0; border:0; border-radius:0; background:transparent; box-shadow:none; min-width:0; gap:12px; }
  .maker-engine.zg-ws-editor .ws-content { margin-top:22px; }
  .maker-engine.zg-ws-editor .maker-section-title { display:flex; align-items:center; gap:10px; font-size:18px; line-height:1.4; font-weight:700; letter-spacing:-.4px; color:var(--ws-ink); margin:0; }
  .maker-engine.zg-ws-editor .ws-word-count { margin-left:auto; font:500 12px/1.5 Inter,system-ui,sans-serif; color:var(--ws-muted); letter-spacing:0; white-space:nowrap; }
  .maker-engine.zg-ws-editor .maker-source-tabs { display:flex; gap:3px; padding:4px; border:0; background:var(--ws-soft); border-radius:6px; }
  .maker-engine.zg-ws-editor .maker-source-tabs button { flex:1; border:0; border-radius:4px; background:transparent; color:var(--ws-muted); font-size:13px; font-weight:600; min-height:44px; }
  .maker-engine.zg-ws-editor .maker-source-tabs button[aria-pressed=true] { background:var(--ws-surface); color:var(--ws-accent); box-shadow:0 1px 2px #3923530c; }
  .maker-engine.zg-ws-editor .maker-source-panel { gap:9px; }
  .maker-engine.zg-ws-editor :is(.form-control,.form-select,.ws-preview-zoom) { width:100%; min-height:44px; padding:10px 11px; font-size:13px; line-height:1.4; border:1px solid var(--ws-control); border-radius:4px; background-color:var(--ws-surface); color:var(--ws-ink); box-shadow:none; }
  .maker-engine.zg-ws-editor .form-select { padding-right:30px; }
  .maker-engine.zg-ws-editor .form-control::placeholder { color:var(--ws-muted); }
  .maker-engine.zg-ws-editor textarea.form-control { min-height:150px; resize:vertical; line-height:1.7; }
  .maker-engine.zg-ws-editor :is(.form-label,.maker-field-label,.maker-control-label) { font-size:13px; font-weight:600; color:var(--ws-ink); margin:0; }
  .maker-engine.zg-ws-editor .maker-list { list-style:none; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); padding:0; margin:0; gap:6px; max-height:none; overflow:visible; counter-reset:ws-word var(--ws-list-offset,0); }
  .maker-engine.zg-ws-editor .maker-list li { min-width:0; min-height:32px; padding:6px 7px; border:0; background:var(--ws-canvas); border-radius:3px; font-size:12px; font-weight:600; overflow-wrap:anywhere; display:flex; align-items:baseline; gap:5px; }
  .maker-engine.zg-ws-editor .maker-list li::before { counter-increment:ws-word; content:counter(ws-word,decimal-leading-zero); font-size:9px; font-weight:400; color:var(--ws-muted); }
  .maker-engine.zg-ws-editor .maker-list li.ws-word-skipped { color:var(--ws-error); text-decoration:underline dotted; text-underline-offset:3px; }
  .maker-engine.zg-ws-editor .maker-list li.ws-word-skipped:focus-visible { outline:3px solid var(--ws-purple); outline-offset:2px; }
  .maker-engine.zg-ws-editor .ws-word-feedback { font-size:12px; line-height:1.5; color:var(--ws-muted); }
  .maker-engine.zg-ws-editor .ws-content-actions { display:flex; align-items:center; justify-content:space-between; gap:8px; }
  .maker-engine.zg-ws-editor .ws-content-actions button { background:transparent; border:0; color:var(--ws-accent); padding:0 3px; min-width:44px; font-size:12px; font-weight:600; display:inline-flex; align-items:center; gap:7px; }
  .maker-engine.zg-ws-editor .ws-content-actions button:hover { text-decoration:underline; text-underline-offset:3px; }
  .maker-engine.zg-ws-editor .ws-settings { margin-top:14px; border-top:1px solid var(--ws-line); padding-top:18px; }
  .maker-engine.zg-ws-editor .maker-controls,.maker-engine.zg-ws-editor .maker-controls-simple,.maker-engine.zg-ws-editor .maker-controls-advanced { display:flex; flex-direction:column; gap:12px; }
  .maker-engine.zg-ws-editor .maker-control { min-width:0; gap:5px; }
  .maker-engine.zg-ws-editor .maker-toggle-row { display:flex; flex-direction:row-reverse; justify-content:space-between; align-items:center; min-height:44px; gap:10px; }
  .maker-engine.zg-ws-editor .maker-toggle-row .form-check-input { width:36px; height:21px; flex:none; border:1px solid var(--ws-control); border-radius:20px; background:var(--ws-control); background-image:none!important; appearance:none; margin:0; position:relative; cursor:pointer; }
  .maker-engine.zg-ws-editor .maker-toggle-row .form-check-input::after { content:""; position:absolute; width:15px; height:15px; left:2px; top:2px; border-radius:50%; background:white; }
  .maker-engine.zg-ws-editor .maker-toggle-row .form-check-input:checked { background:var(--ws-purple); border-color:var(--ws-purple); }
  .maker-engine.zg-ws-editor .maker-toggle-row .form-check-input:checked::after { left:17px; }
  .maker-engine.zg-ws-editor .ws-grid-size { border:0; padding:0; margin:0; min-width:0; }
  .maker-engine.zg-ws-editor .ws-grid-size legend { font-size:13px; font-weight:600; padding:0; margin:0 0 6px; float:none; width:auto; }
  .maker-engine.zg-ws-editor .ws-grid-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
  .maker-engine.zg-ws-editor .ws-grid-options label { position:relative; cursor:pointer; min-width:0; }
  .maker-engine.zg-ws-editor .ws-grid-options input { appearance:none; position:absolute; inset:0; width:100%; height:100%; margin:0; border-radius:4px; cursor:pointer; opacity:0; }
  .maker-engine.zg-ws-editor .ws-grid-options input:focus-visible+span { outline:3px solid var(--ws-purple); outline-offset:3px; }
  .maker-engine.zg-ws-editor .ws-grid-options label>span { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-height:56px; border:1px solid var(--ws-line); border-radius:4px; padding:6px 2px; }
  .maker-engine.zg-ws-editor .ws-grid-options b { font-size:13px; font-weight:600; }
  .maker-engine.zg-ws-editor .ws-grid-options small { color:var(--ws-muted); font-size:10px; }
  .maker-engine.zg-ws-editor .ws-grid-options input:checked+span { background:var(--ws-soft); border-color:var(--ws-purple); color:var(--ws-accent); }
  .maker-engine.zg-ws-editor .ws-advanced-heading { margin-top:14px; padding-top:18px; border-top:1px solid var(--ws-line); }
  .maker-engine.zg-ws-editor .ws-advanced-heading .maker-advanced-toggle { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; background:transparent; color:inherit; font:inherit; letter-spacing:inherit; border:0; padding:0; text-align:left; text-decoration:none; }
  .maker-engine.zg-ws-editor .maker-advanced-toggle .ph { flex:none; font-size:18px; color:var(--ws-muted); }
  .maker-engine.zg-ws-editor .maker-advanced-toggle[aria-expanded=true] .ph { transform:rotate(180deg); }
  .maker-engine.zg-ws-editor .maker-advanced-panel { padding:0 0 4px; border:0; }
  .maker-engine.zg-ws-editor .maker-radio-group { display:flex; flex-wrap:wrap; gap:0; font-size:12px; }
  .maker-engine.zg-ws-editor .maker-radio-group label { display:flex; align-items:center; gap:6px; min-height:44px; padding:0 8px; cursor:pointer; }
  .maker-engine.zg-ws-editor input[type=radio] { accent-color:var(--ws-purple); }
  .maker-engine.zg-ws-editor .maker-lesson-hint { font-size:11px; color:var(--ws-muted); line-height:1.5; }
  .maker-engine.zg-ws-editor .maker-lesson-hint a { color:var(--ws-accent); text-decoration:underline; }
  .maker-engine.zg-ws-editor .ws-preview { position:sticky; top:0; display:flex; flex-direction:column; min-width:0; height:max(500px,calc(100dvh - 215px)); max-height:none; padding:16px 20px 12px; background:var(--ws-canvas); align-self:stretch; }
  .maker-engine.zg-ws-editor .maker-preview-header { flex:none; display:flex; align-items:center; gap:10px; }
  .maker-engine.zg-ws-editor .maker-preview-header .maker-section-title { font:600 12px/1.5 Inter,system-ui,sans-serif; text-transform:uppercase; letter-spacing:1px; }
  .maker-engine.zg-ws-editor .ws-preview-status { font-size:11px; color:var(--ws-muted); }
  .maker-engine.zg-ws-editor .ws-preview-zoom { width:auto; margin-left:auto; min-height:44px; padding:7px 26px 7px 10px; font-size:12px; }
  .maker-engine.zg-ws-editor .maker-preview { flex:1; min-height:0; padding:6px 8px; border:0; border-radius:0; background:transparent; overflow:auto; display:flex; justify-content:center; align-items:flex-start; container-type:size; }
  .maker-engine.zg-ws-editor .maker-preview-pages { display:block; flex:none; width:min(100%,calc(100cqh * 210 / 297)); padding:0; background:transparent; }
  .maker-engine.zg-ws-editor .maker-preview-page { width:100%; min-height:0; aspect-ratio:210/297; padding:4%; border:0; border-radius:0; background:#fff; color:#181818; box-shadow:0 2px 12px #38215012; overflow:visible; container-type:inline-size; }
  .maker-engine.zg-ws-editor .maker-preview-page .maker-preview-empty { color:#5f5f65; }
  .maker-engine.zg-ws-editor .ws-preview[data-ws-zoom=large] .maker-preview-pages { width:min(100%,700px); }
  .maker-engine.zg-ws-editor .ws-preview-bottom { flex:none; display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:10px; min-height:44px; }
  .maker-engine.zg-ws-editor .ws-preview-note { font-size:10px; color:var(--ws-muted); }
  .maker-engine.zg-ws-editor .maker-preview-navigation { flex:none; gap:5px; }
  .maker-engine.zg-ws-editor :is(.maker-preview-navigation,.maker-items-navigation) button { min-width:44px; min-height:44px; background:var(--ws-surface); color:var(--ws-accent); border:1px solid var(--ws-line); border-radius:4px; }
  .maker-engine.zg-ws-editor .maker-preview-warning { flex:none; padding:9px 11px; margin:0; font-size:12px; color:var(--ws-error); background:var(--ws-surface); border:1px solid var(--ws-control); border-radius:4px; overflow-wrap:anywhere; max-height:110px; overflow:auto; }
  .maker-engine.zg-ws-editor .ws-action-dock { position:sticky; bottom:0; z-index:5; display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:5px 16px; background:var(--ws-surface); border-top:1px solid var(--ws-line); padding:12px 22px 8px; }
  .maker-engine.zg-ws-editor .ws-generate-actions,.maker-engine.zg-ws-editor .ws-output-actions,.maker-engine.zg-ws-editor .maker-export-buttons { display:flex; align-items:center; gap:8px; }
  .maker-engine.zg-ws-editor .ws-output-actions { justify-content:flex-end; min-width:0; }
  .maker-engine.zg-ws-editor .ws-action-dock button,.maker-engine.zg-ws-editor .maker-source-panel button { min-height:44px; border-radius:5px; font-size:12px; font-weight:600; padding:10px 13px; background:var(--ws-surface); border:1px solid var(--ws-control); color:var(--ws-ink); white-space:nowrap; box-shadow:none; }
  .maker-engine.zg-ws-editor :is([data-maker-action=generate],[data-maker-action=export],.maker-source-panel .btn-primary) { background:var(--ws-purple); border:1px solid var(--ws-purple); color:white; }
  .maker-engine.zg-ws-editor :is([data-maker-action=generate],[data-maker-action=export],.maker-source-panel .btn-primary):hover:not(:disabled) { background:var(--ws-accent); border-color:var(--ws-accent); }
  .maker-engine.zg-ws-editor .ws-generate-actions [data-maker-action=regenerate] { font-size:0; width:44px; padding:0; flex:none; }
  .maker-engine.zg-ws-editor [data-maker-action=regenerate]::before { content:"↻"; font:24px/1 system-ui,sans-serif; }
  .maker-engine.zg-ws-editor .maker-export-buttons { margin:0; flex-wrap:nowrap; }
  .maker-engine.zg-ws-editor .ws-copies-control { display:flex; align-items:center; gap:8px; margin:0; }
  .maker-engine.zg-ws-editor .ws-copies-control input { width:58px; min-width:0; max-width:58px; padding:8px; flex:none; }
  .maker-engine.zg-ws-editor .ws-copies-control .maker-field-label { color:var(--ws-muted); font-size:12px; white-space:nowrap; margin:0; }
  .maker-engine.zg-ws-editor .ws-document-info { font-size:11px; color:var(--ws-muted); white-space:nowrap; }
  .maker-engine.zg-ws-editor .ws-feedback { grid-column:1/-1; font-size:11px; color:var(--ws-muted); min-height:17px; }
  .maker-engine.zg-ws-editor .ws-feedback[data-error=true] { color:var(--ws-error); }
  .maker-engine.zg-ws-editor .ws-mobile-pagination { display:none; }
  .maker-engine.zg-ws-editor .ws-output,.maker-engine.zg-ws-editor .ws-legacy-summary,.maker-engine.zg-ws-editor .ws-canonical-edit,.maker-engine.zg-ws-editor [data-ws-collapsed=true] { display:none!important; }
  .maker-engine.zg-ws-editor .ws-native-grid { position:absolute!important; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  .dark-mode .maker-engine.zg-ws-editor { --ws-purple:#a786ff; --ws-accent:#c4aaff; --ws-ink:#f6f1ff; --ws-muted:#bcb2ce; --ws-canvas:#211b2c; --ws-surface:#2a2336; --ws-soft:#3b2e50; --ws-line:#463953; --ws-control:#746483; --ws-error:#ffabb9; }
  .dark-mode .maker-engine.zg-ws-editor .maker-engine-section :is(.form-control,.form-select,textarea) { background-color:var(--ws-surface); color:var(--ws-ink); border-color:var(--ws-control); }
  .dark-mode .maker-engine.zg-ws-editor :is([data-maker-action=generate],[data-maker-action=export],.maker-source-panel .btn-primary) { background:#7545e8; border-color:#9972f2; color:#fff; }
  .dark-mode .maker-engine.zg-ws-editor :is([data-maker-action=generate],[data-maker-action=export],.maker-source-panel .btn-primary):hover:not(:disabled) { background:#5630b7; }
  @media(min-width:1500px) { .maker-engine.zg-ws-editor { --ws-rail:420px; } }
  @media(max-width:1200px) { .maker-engine.zg-ws-editor { --ws-rail:360px; } .maker-engine.zg-ws-editor .ws-document-info { display:none; } .maker-engine.zg-ws-editor .ws-studio-header { gap:16px; } }
  @media(max-width:950px) { .maker-engine.zg-ws-editor { --ws-rail:330px; } .maker-engine.zg-ws-editor .ws-editing-rail { padding:20px; } .maker-engine.zg-ws-editor .ws-brand { padding-right:16px; font-size:22px; } .maker-engine.zg-ws-editor .ws-tool-title { font-size:20px; } .maker-engine.zg-ws-editor .ws-studio-header { padding:12px 16px; gap:12px; } .maker-engine.zg-ws-editor .ws-identity>.ph { display:none; } .maker-engine.zg-ws-editor .ws-action-dock { padding:10px 15px 8px; gap:5px 8px; } .maker-engine.zg-ws-editor .ws-preview { padding:14px 12px 10px; } }
  @media(max-width:760px) {
    .content-scroll > #makerView.zg-ws-active { margin-inline:-18px; padding-top:64px; }
    .maker-engine.zg-ws-editor { border:0; border-radius:0; scroll-margin-top:80px; }
    .maker-engine.zg-ws-editor .ws-studio-header { min-height:72px; flex-wrap:nowrap; gap:13px; padding:12px 16px; }
    .maker-engine.zg-ws-editor .ws-brand { font-size:21px; padding-right:13px; }
    .maker-engine.zg-ws-editor .ws-brand small { font-size:6px; letter-spacing:1.6px; }
    .maker-engine.zg-ws-editor .ws-tool-title { font-size:20px; }
    .maker-engine.zg-ws-editor .ws-header-actions { margin-left:auto; }
    .maker-engine.zg-ws-editor .ws-workspace { display:block; flex:1 0 auto; }
    .maker-engine.zg-ws-editor .ws-editing-rail { border:0; padding:20px; }
    .maker-engine.zg-ws-editor .ws-intro h2 { font-size:27px; }
    .maker-engine.zg-ws-editor .ws-content { margin-top:20px; }
    .maker-engine.zg-ws-editor .ws-preview { position:static; height:max(530px,calc(100dvh - 280px)); padding:12px; }
    .maker-engine.zg-ws-editor .ws-preview-note { max-width:50%; }
    .maker-engine.zg-ws-editor .ws-action-dock { padding:10px 16px calc(9px + env(safe-area-inset-bottom,0px)); display:flex; flex-direction:column; align-items:stretch; gap:8px; }
    .maker-engine.zg-ws-editor .ws-generate-actions { justify-content:stretch; }
    .maker-engine.zg-ws-editor [data-maker-action=generate] { flex:1; }
    .maker-engine.zg-ws-editor .ws-output-actions { display:flex; justify-content:space-between; gap:8px; }
    .maker-engine.zg-ws-editor .ws-feedback { font-size:11px; }
    .maker-engine.zg-ws-editor .ws-mobile-pagination:has(.maker-preview-navigation:not([hidden])) { display:block; }
    .maker-engine.zg-ws-editor .ws-mobile-pagination .maker-preview-navigation { width:100%; justify-content:space-between; }
    .maker-engine.zg-ws-editor .maker-export-buttons { flex:1; justify-content:flex-end; gap:6px; }
    .maker-engine.zg-ws-editor .maker-export-buttons button { padding:10px; }
    .maker-engine.zg-ws-editor .ws-copies-control { gap:6px; }
    .maker-engine.zg-ws-editor .ws-copies-control .form-label { font-size:11px; }
    .maker-engine.zg-ws-editor .ws-copies-control input { width:50px; }
    .maker-engine.zg-ws-editor .maker-list { gap:5px; }
    .maker-engine.zg-ws-editor .maker-list li { padding:6px; }
    .maker-engine.zg-ws-editor .maker-source-panel :is(select,textarea,input[type=text]),.maker-engine.zg-ws-editor .maker-control :is(select,input[type=text]),.maker-engine.zg-ws-editor .maker-title-input { font-size:16px; }
    .maker-engine.zg-ws-editor textarea.maker-textarea { min-height:min(150px,var(--ws-input-height,150px)); max-height:var(--ws-input-height,none); }
    .maker-engine.zg-ws-editor .maker-help-panel { position:fixed; top:90px; right:16px; left:16px; width:auto; max-height:65dvh; overflow:auto; }
  }
  @media(prefers-reduced-motion:reduce) { .maker-engine.zg-ws-editor * { scroll-behavior:auto!important; transition:none!important; } }
  @media(max-width:360px) {
    .maker-engine.zg-ws-editor .ws-copies-control { flex-direction:column; align-items:flex-start; gap:2px; }
    .maker-engine.zg-ws-editor .ws-copies-control .maker-field-label { font-size:10px; line-height:1.2; }
  }
}
