/* Shared screen UI. Printed worksheet layouts retain their own styles. */
.common-settings-panel{min-width:0}.common-settings-panel>summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:18px;padding:15px 20px;font-size:13px}.common-settings-panel>summary::-webkit-details-marker{display:none}.common-settings-panel>summary span{flex:1;color:#778679;font-size:12px}.common-settings-panel>summary i{font-style:normal;color:#477256;font-size:12px}.common-settings-panel>summary i:after{content:' ＋'}.common-settings-panel[open]>summary i:after{content:' −'}
.read-choice-task .common-settings-panel{display:none}
.material-search{max-width:650px;margin:24px 0 0}.material-search>label{font-size:14px;font-weight:650;display:block;margin-bottom:8px}.material-search>input{width:100%;border:1px solid #dce5d9;border-radius:10px;padding:13px 16px;font-size:15px;background:#fff}.material-search>p{font-size:12px;color:#788574}.material-search>p:empty{display:none}.material-search-results{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:10px}.material-search-results button{border:1px solid #e2e8df;border-radius:10px;background:#fff;padding:13px;text-align:left}.material-search-results b,.material-search-results small{display:block}.material-search-results b{font-size:14px;color:#345441}.material-search-results small{font-size:11px;color:#798675;line-height:1.6;margin-top:5px}
@media screen{
 body{background:#f9faf7;color:#293c30}
 body[data-group]{--accent:#326f50;--accent-dark:#275b40;--accent-soft:#eaf3e9;--accent-mist:#f5f8f1}
 .app-header{background:#fff;border-bottom:1px solid #e7ece3;box-shadow:none}.brand-mark{box-shadow:none;background:#326f50}.brand h1{font-size:20px}.brand p{font-size:11px;color:#819079}.version-badge{display:none}
 .button.primary{background:#326f50;border-color:#326f50;box-shadow:none}.button.secondary{background:#fff;color:#657d69;border-color:#dce5d9;box-shadow:none}.button.ghost{color:#657d69}
 button:focus-visible,summary:focus-visible,a:focus-visible{outline:3px solid #83aa8b;outline-offset:3px}
 .home-screen,.category-screen{max-width:1280px;margin:auto;padding:28px 28px 50px}
 .home-hero{display:block;background:none;border:0;border-radius:0;box-shadow:none;min-height:0;padding:16px 0 12px}.hero-visual,.eyebrow,.hero-button{display:none}.hero-copy h2{font-size:30px;line-height:1.5;letter-spacing:.025em;margin:0}.hero-copy h2 br{display:none}.hero-copy h2 em{color:#326f50;font-style:normal}.hero-copy>p{font-size:13px;line-height:1.8;max-width:none;margin:12px 0;color:#7d8b76}.home-stats{display:flex;gap:18px;margin-top:16px}.home-stats>div{display:flex;gap:7px;align-items:baseline;border:0;padding:0;margin:0;min-width:0}.home-stats b{font-size:15px;color:#486b4c}.home-stats small{font-size:11px;color:#8b9883}
 .material-library{padding-top:28px}.section-title{margin-bottom:14px}.section-title span,.section-title p{display:none}.section-title h2{font-size:19px;font-weight:650;margin:0}
 .group-grid{gap:14px}.group-card{min-height:155px;background:#fff!important;border:1px solid #e2e8dd;border-radius:14px;padding:20px;box-shadow:none;transform:none;color:#334c38}.group-card:hover{transform:none;border-color:#8db193;box-shadow:0 4px 14px #304c3410}.group-number{display:none}.group-symbol{background:#eef4e9!important;color:#527952!important;box-shadow:none;width:38px;height:38px;font-size:21px}.group-card b{font-size:17px}.group-card small{font-size:12px;color:#7c8974}.group-card i{font-size:11px;background:transparent;color:#88977e}.group-arrow{background:none;color:#7b9a6d}
 .standalone-tools{background:none;border:0;padding:24px 0;margin-top:15px;border-top:1px solid #e6ebdf;border-radius:0}.standalone-tools .home-task-card{min-height:120px;box-shadow:none;border-radius:12px}.standalone-tools .home-icon{width:35px;height:35px}.standalone-tools .card-copy b{font-size:15px}
 .category-nav{margin-bottom:16px}.category-nav button{border:0;background:none;color:#84947b;padding:0}.category-nav>span{display:none}.category-intro{background:none;border:0;padding:8px 0 20px;border-radius:0;box-shadow:none;min-height:0}.category-intro>span,#categoryKicker{display:none}.category-copy h2{font-size:26px;margin:0 0 7px}.category-copy>p{font-size:13px;color:#7b8b72}.category-stats{margin-top:10px}.category-stats span{background:none;border:0;padding:0 12px 0 0;color:#7c9070;font-size:11px}
 .task-cluster{border:0;box-shadow:none;background:none;padding:0;margin-bottom:26px}.task-cluster>header{padding:0;margin-bottom:10px}.task-cluster>header>span,.task-cluster>header>b,.task-cluster>header p{display:none}.task-cluster h3{font-size:15px;font-weight:600;color:#617a55}.cluster-grid{gap:12px;grid-template-columns:repeat(3,minmax(0,1fr))}.subcategory-card{background:#fff;border:1px solid #e2e8dd;border-radius:12px;box-shadow:none;min-height:104px;padding:18px;gap:12px;transform:none}.subcategory-card:hover{transform:none;border-color:#90b180;box-shadow:none}.sub-order,.sub-copy i{display:none}.sub-icon{width:34px;height:34px;background:#f1f5eb;color:#5c8455;border-radius:9px;font-size:18px}.sub-copy b{font-size:15px}.sub-copy small{font-size:12px;line-height:1.6;color:#7d8a73}.subcategory-card>em{background:none;color:#9aab8b}
 body:not(.read-choice-task) .app-shell{display:grid;grid-template-columns:minmax(0,1.18fr) minmax(0,1fr);gap:16px 24px;max-width:1560px;margin:auto;padding:20px 28px 45px;align-items:start;background:#f9faf7}
 body:not(.read-choice-task) .controls{display:contents}
 body:not(.read-choice-task) .builder-flow{display:none}
 body:not(.read-choice-task) .task-section{grid-column:1/-1;grid-row:1;background:none;border:0;box-shadow:none;padding:0;margin:0;display:flex;align-items:center;justify-content:space-between;gap:12px}
 body:not(.read-choice-task) .task-section>.step-heading{display:none}
 body:not(.read-choice-task) .current-task-summary{border:0;background:none;padding:0;box-shadow:none}.current-task-summary>span{background:#eef4e8;color:#477543;box-shadow:none}.current-task-summary b{font-size:21px}.current-task-summary small{font-size:12px;color:#7e8d73}
 .choose-task-btn{border:0;background:none;font-size:12px;color:#86967b;padding:7px}
 body:not(.read-choice-task) .common-settings-panel{grid-column:1/-1;grid-row:2;background:#f0f5ed;border:0;border-radius:12px}
 .common-settings-panel>.setup-section{margin:0 16px 16px;border:0;border-radius:9px;box-shadow:none;padding:18px;background:#fff}
 .common-settings-panel .step-heading{display:none}
 body:not(.read-choice-task) .vocabulary-section{grid-column:1;grid-row:3;margin:0;border:1px solid #e2e8dd;border-radius:14px;background:#fff;box-shadow:none;padding:24px;min-width:0}
 .step-heading>span{display:none}.step-heading h2{font-size:20px;color:#30492f}.step-heading p{font-size:12px;color:#7a8b70}.step-heading{margin-bottom:18px}
 .vocab-mode-tabs{background:none;padding:0;border-bottom:1px solid #e2e8de;border-radius:0;display:flex;gap:22px}.vocab-mode-tabs button{font-size:13px;background:none!important;padding:9px 0 12px;border-radius:0;box-shadow:none!important;color:#88977a}.vocab-mode-tabs button.active{color:#326f50;border-bottom:2px solid #326f50}
 .vocab-filter-panel{border:0;padding:0;background:none;display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0}.field>span,.field>span>b{font-size:12px}.vocab-filter-panel .field>span>i,.vocab-list-heading b>i{display:none}.field select,.field input{border-color:#dce5d6;border-radius:8px;font-size:14px;min-height:40px}
 .reading-filters{background:#f7faf3;border-color:#e3ebdb;padding:13px;border-radius:10px;margin:12px 0}.reading-filters>summary{font-size:13px;color:#537a43}.reading-filters .selection-note{font-size:12px}.saved-selection-tools{color:#7e9270}
 .selection-bar{gap:8px;margin-bottom:12px}.selection-bar>small{font-size:11px;white-space:normal;line-height:1.6;color:#839576}.selection-bar button{font-size:12px;padding:8px;border:1px solid #e1e8db;border-radius:8px;background:#fff;color:#607852}.selection-bar label{font-size:12px}.selection-bar input[type=number]{padding:8px;border:1px solid #dce5d6;border-radius:8px}.count-pill{font-size:12px;background:#eef5e7;color:#507749;padding:5px 8px}
 #randomWordsBtn,#randomOddWordsBtn{background:#326f50;border-color:#326f50;color:#fff;padding:10px 16px;font-weight:600}
 .vocab-list-heading b{font-size:13px}.vocab-list-heading>span{font-size:11px}
 .word-list{grid-template-columns:repeat(auto-fill,minmax(115px,1fr));gap:9px;max-height:490px;padding:3px}
 .word-choice{position:relative;display:flex!important;flex-direction:column;justify-content:center;text-align:center;padding:12px 6px;gap:8px!important;border-color:#e9eee3;border-radius:11px;background:#fafcf7;font-size:13px;min-height:120px}.word-choice img{width:68px;height:65px;object-fit:contain;background:transparent;border-radius:0}.word-choice>input{position:absolute;right:6px;top:6px;width:15px;height:15px}.word-choice span{max-width:100%;white-space:normal;overflow-wrap:anywhere;font-weight:600}.word-choice:has(input:checked){background:#eff7e9;border-color:#80a76d}.word-choice:focus-within{outline:2px solid #87aa76;outline-offset:1px}.word-choice>label{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0}
 .dynamic-options select,.condition-grid select,.condition-grid input{font-size:13px;min-height:38px}.dynamic-options label,.dynamic-options legend{font-size:12px}.hint{font-size:12px;line-height:1.7;background:#f6f8f1;color:#75866a}.layout-picker span>b,.phon-option-picker span>b{font-size:13px}.script-mode-picker label:has(input:checked){box-shadow:none;background:#eef5e8;border-color:#79a064}.script-mode-picker label>b{font-size:12px}
 body:not(.read-choice-task) .workspace{grid-column:2;grid-row:3;position:sticky;top:100px;max-height:calc(100vh - 116px);overflow:auto;min-width:0;background:none;padding:0;border:0}
 body:not(.read-choice-task) .paper-stage{min-width:0;padding:14px;background:#edf1e7;border-radius:10px}
 body:not(.read-choice-task) .sheet{zoom:var(--workspace-preview-scale,.65);box-shadow:0 3px 12px #35452f12}
 body:not(.read-choice-task) .preview-toolbar{zoom:1;position:static;border:0;background:none;box-shadow:none;backdrop-filter:none;padding:0 2px;margin:0 0 12px;display:block}
 .preview-label>span{box-shadow:none;background:#94ad80}.preview-label b{font-size:13px;color:#75876a}.preview-label small{color:#93a086}.page-fields{width:100%;margin-top:10px;display:flex;gap:10px}.page-fields label{flex:1;display:block;font-size:11px;color:#86957c}.page-fields input{width:100%;min-width:0;border-color:#e1e8db;font-size:12px}
 .condition-message{font-size:12px;line-height:1.6}.condition-vocab-panel{background:#f7faf3;border-color:#dfe8d5}.condition-vocab-panel>header b,.condition-vocab-panel button,.condition-grid span,.auto-select-row span{font-size:12px}.condition-vocab-panel>header small{font-size:11px}.active-condition-summary span{font-size:11px}
}
@media screen and (max-width:1000px){body:not(.read-choice-task) .app-shell{padding:14px;gap:14px;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}body:not(.read-choice-task) .vocabulary-section{padding:16px}.word-list{grid-template-columns:repeat(auto-fill,minmax(86px,1fr))}.cluster-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.group-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media screen and (max-width:760px){.home-screen,.category-screen{padding:20px 14px 40px}.hero-copy h2{font-size:24px}.material-search-results{grid-template-columns:1fr}.group-card{min-height:145px;padding:16px}.group-card b{font-size:15px}.group-card small{font-size:11px}.cluster-grid{grid-template-columns:1fr}.subcategory-card{min-height:90px}.app-header{padding:10px 14px}.brand h1{font-size:16px}.button{font-size:0}.button span{font-size:17px}.page-fields label{display:block}body:not(.read-choice-task) .app-shell{display:flex;flex-direction:column;padding:12px}body:not(.read-choice-task) .task-section{width:100%;flex-wrap:wrap}.current-task-summary b{font-size:19px}.common-settings-panel{width:100%}.common-settings-panel>summary{gap:8px;padding:14px}.common-settings-panel>summary span{display:none}.common-settings-panel>summary i{margin-left:auto}body:not(.read-choice-task) .vocabulary-section{width:100%}body:not(.read-choice-task) .workspace{width:100%;position:static;max-height:none}.word-list{grid-template-columns:repeat(3,minmax(0,1fr));max-height:440px}.word-choice img{width:58px;height:58px}.selection-bar{flex-wrap:wrap}.vocab-filter-panel{gap:8px}.home-stats{gap:10px}}
@media screen{
 .home-hero:before,.home-hero:after,.group-card:before,.group-card:after{display:none}
 body:not(.read-choice-task) .current-task-summary{flex:1;max-width:none;width:auto;grid-template-columns:38px minmax(0,1fr)}
 body:not(.read-choice-task) .current-task-summary>div{min-width:0}
 .phon-length-details{background:#f7faf3;border:1px solid #e3ebdb;border-radius:10px;padding:13px;margin:12px 0}
 .phon-length-details>summary{cursor:pointer;font-size:13px;font-weight:600;color:#537a43}
 .phon-length-details:has(>#phonVocabFilters.hidden),.reading-task .phon-length-details{display:none}
 .phon-length-details #phonVocabFilters{border:0;background:none;padding:10px 0 0;margin:0}
}
@media screen{
 body:not(.read-choice-task) .task-section>.choose-task-btn{width:auto;flex:0 0 auto}
 body:not(.read-choice-task) .current-task-summary{min-width:0}
 body:not(.read-choice-task) .current-task-summary>span{flex:0 0 38px}
}

/* Show only conditions that contribute to the current task. */
body:not(.reading-task) #readingFilters,body:not(.sound-task) .phon-length-details,body:not(.sound-task) #phonVocabFilters,body:not(.sound-task) .script-mode-picker,body:not(.sound-task) #conditionVocabPanel label:has(#conditionPosition,#conditionSound,#conditionRow,#conditionColumn){display:none!important}
body[data-group="basic"] .vocab-mode-tabs,body[data-group="basic"] #conditionVocabPanel{display:none!important}

/* Worksheet geometry is shared by the preview and print output. */
.match-sheet>div{gap:4mm}
.match-pic{height:31mm;break-inside:avoid}
.match-pic img{height:29mm;max-width:100%}
.match-sheet:has(.match-pic:nth-child(7)) .match-pic{height:24mm}
.match-sheet:has(.match-pic:nth-child(7)) .match-pic img{height:23mm}
.phon-count-5,.phon-count-6{--phon-picture:25mm!important}
.phon-row{min-width:0}
.phon-answer .mora-circles{max-width:100%;flex-wrap:wrap}
.card-grid{gap:4mm}
.card-grid .print-card{min-width:0;min-height:70mm;padding:4mm}
.card-grid .print-card img{height:47mm}
.card-grid .print-card .word{font-size:22px;overflow-wrap:anywhere}
.riddle-item{padding:3mm 0}
.riddle-hints{font-size:16px;line-height:1.65;overflow-wrap:anywhere}
.function-list{gap:3mm}
.function-list>div{grid-template-columns:34mm minmax(0,1fr);gap:5mm;padding:2mm;break-inside:avoid}
.function-list img{width:32mm;height:28mm}
.sound-remove{gap:3mm}
.sound-remove>div{grid-template-columns:30mm minmax(0,1fr);gap:4mm;padding:2mm 1mm;min-width:0}
.sound-remove img{width:29mm;height:28mm}
.sound-remove section{display:grid;grid-template-columns:minmax(0,1fr) 7mm 11mm 7mm;gap:2mm;align-items:center;min-width:0}
.sound-remove section strong{font-size:20px;white-space:normal;overflow-wrap:anywhere;letter-spacing:.02em}
.sound-remove section em{min-width:0;width:11mm;height:11mm;font-size:20px}
.sound-remove section b{font-size:20px}
.sound-remove section i{grid-column:1/-1;min-width:0;width:100%;height:8mm}
.line-chain-gap{height:3mm}
.shiritori-line-chain>section,.shiritori-problem{break-inside:avoid}
@media print{
 @page{size:A4 portrait;margin:13mm 14mm}
 html,body{margin:0!important;padding:0!important;height:auto!important;overflow:visible!important}
 .app-shell,.workspace,.paper-stage{position:static!important;display:block!important;width:auto!important;height:auto!important;max-height:none!important;min-height:0!important;margin:0!important;padding:0!important;overflow:visible!important;transform:none!important}
 #sheet.sheet{width:182mm!important;min-height:0!important;height:auto!important;padding:0!important;border:0!important;zoom:1!important;overflow:visible!important;transform:none!important}
 .phon-sheet,.shiritori-line-chain,.function-list,.sound-remove{display:block}
 .phon-row{margin-bottom:2mm}
 .function-list>div,.sound-remove>div{margin-bottom:3mm}
 .sheet-head,.instruction{break-inside:avoid;break-after:avoid}
}
.reading-item,.job-question,.relation-pairs>div,.compare-pairs>div{break-inside:avoid;page-break-inside:avoid}
@media print{
 html,body,.app-shell,.workspace,.paper-stage,#sheet.sheet{background:#fff!important;box-shadow:none!important;border-radius:0!important}
 .job-who-list,.relation-pairs,.compare-pairs{display:block}
 .job-question,.relation-pairs>div,.compare-pairs>div{margin-bottom:5mm}
}
/* Keep the expression and the writing space on the same line. */
.sound-remove section{grid-template-columns:minmax(0,1fr) 7mm 11mm 7mm minmax(50mm,1.15fr);gap:2mm;align-items:center}
.sound-remove section strong{line-height:1.5}
.sound-remove section i{grid-column:auto;min-width:0;width:100%;height:16mm;border:1.2px solid #78827d;border-radius:2mm;background:#fff}

/* Leave the middle of the page open for drawing connecting lines. */
.match-sheet{grid-template-columns:46mm 46mm;gap:90mm}
.match-sheet>div,.rc-connect-print .connect-col{height:214mm;display:flex;flex-direction:column;justify-content:space-between;gap:0}
.match-sheet:not(:has(.match-pic:nth-child(4)))>div{height:150mm}
.match-pic{gap:3mm;flex:none}
.match-pic i{flex:none;margin-left:0}
.match-pic.right{justify-content:flex-start}
.rc-connect-print{grid-template-columns:46mm minmax(0,1fr);gap:70mm}
.rc-connect-print .connect-node{flex:none}
.rc-connect-print .right-node{justify-content:flex-start}
.rc-connect-print .dot{flex:none}
.sound-link-sheet{grid-template-columns:30mm minmax(0,1fr);gap:50mm;min-height:202mm}
.sound-link-guide{grid-template-columns:30mm 50mm minmax(0,1fr)}
.sound-link-guide>b:last-child{width:auto;justify-self:stretch}
.sound-link-pictures b{white-space:normal;overflow-wrap:anywhere}
.sound-link-pictures{grid-template-rows:repeat(var(--sound-link-groups),1fr);align-items:center;align-content:stretch}.sound-link-pictures b{font-size:18px}

/* Make editable choices distinct from labels and worksheet content. */
@media screen {
  #builderScreen select:not(.sr-only):not(#kind) {
    appearance:auto;
    background-color:#eaf4ff;
    color:#173e68;
    border:2px solid #4878a8;
    border-radius:8px;
    min-height:42px;
    padding:8px 10px;
    font-weight:600;
    cursor:pointer;
    box-shadow:0 2px 0 #d6e4f2;
  }
  #builderScreen select:not(.sr-only):not(#kind):hover:not(:disabled) {
    background-color:#dcecff;
    border-color:#245b93;
  }
  #builderScreen select:focus-visible {
    outline:3px solid #175da8;
    outline-offset:3px;
  }
  #builderScreen select:disabled {
    background-color:#edf0f3;
    border-color:#a2afbb;
    color:#627080;
    box-shadow:none;
    cursor:not-allowed;
  }
  #builderScreen select option {background:#fff;color:#173e68}
  #builderScreen select option:disabled {color:#7a8794}
  #builderScreen .common-settings-panel>summary {
    background:#245b93;
    color:#fff;
    border:2px solid #1b4d80;
    border-radius:10px;
    box-shadow:0 2px 0 #ceddeb;
  }
  #builderScreen .common-settings-panel>summary span,
  #builderScreen .common-settings-panel>summary i {color:#fff}
  #builderScreen .common-settings-panel>summary:hover {background:#194b7e}
  #builderScreen .common-settings-panel>summary i {
    padding:5px 10px;
    border:1px solid #fff;
    border-radius:6px;
    font-weight:600;
  }
  #builderScreen .rc-filter-card>summary,
  #builderScreen .reading-filters>summary,
  #builderScreen .phon-length-details>summary {
    background:#eaf4ff;
    color:#173e68;
    border:2px solid #4878a8;
    border-radius:8px;
    padding:12px;
  }
  #builderScreen .rc-filter-card>summary>small,
  #builderScreen .rc-filter-card>summary>b {color:#173e68}
  #builderScreen summary:focus-visible {outline:3px solid #175da8;outline-offset:3px}
}

/* Make the word and missing-sound marker easier to read. */
.sound-add-equation section strong{font-size:32px;line-height:1.45}

/* Avoid a nearly empty second sheet when the largest useful set still fits on A4. */
@media print{
 .sound-remove:has(>div:nth-child(7)){gap:0}
 .sound-remove:has(>div:nth-child(7))>div{grid-template-columns:25mm minmax(0,1fr);gap:3mm;padding:1mm;margin:0 0 1mm}
 .sound-remove:has(>div:nth-child(7)) img{width:24mm;height:22mm}
 .sound-remove:has(>div:nth-child(7)) section{grid-template-columns:minmax(0,1fr) 6mm 9mm 6mm minmax(45mm,1fr);gap:1.5mm}
 .sound-remove:has(>div:nth-child(7)) section strong,.sound-remove:has(>div:nth-child(7)) section b{font-size:18px}
 .sound-remove:has(>div:nth-child(7)) section em{width:9mm;height:9mm;min-width:9mm;font-size:17px}
 .sound-remove:has(>div:nth-child(7)) section i{height:10mm}
 .sound-add-equation:has(>div:nth-child(7)) section strong{font-size:21px}

 .relation-pairs:has(>div:nth-child(6)){gap:0}
 .relation-pairs:has(>div:nth-child(6))>div{grid-template-columns:22mm minmax(0,1fr) 9mm 22mm minmax(0,1fr);gap:2mm;padding:1.5mm;margin:0 0 1.5mm}
 .relation-pairs:has(>div:nth-child(6)) img{width:21mm;height:19mm}
 .relation-pairs:has(>div:nth-child(6)) p{margin:0;padding-top:1mm;font-size:10px}
 .relation-pairs:has(>div:nth-child(6)) .pair-number{top:7mm}

 .job-who-list:has(.job-question:nth-child(5)){gap:2mm}
 .job-who-list:has(.job-question:nth-child(5)) .job-question{grid-template-columns:25mm minmax(0,1fr);gap:1mm 4mm;padding:1.5mm;margin:0;break-inside:avoid}
 .job-who-list:has(.job-question:nth-child(5)) .job-question h3{font-size:12px}
 .job-who-list:has(.job-question:nth-child(5)) .job-tool img{width:23mm;height:20mm}
 .job-who-list:has(.job-question:nth-child(5)) .job-choices{gap:2mm}
 .job-who-list:has(.job-question:nth-child(5)) .job-choices span{padding:1mm}
 .job-who-list:has(.job-question:nth-child(5)) .job-choices img{height:20mm}
}

/* Show every printed A4 page separately in the preview and preserve those page boundaries in print. */
.sheet-stack{display:grid;justify-items:center;gap:18px}
.sheet-stack>.sheet{position:relative;margin:0}
.page-number{position:absolute;right:14mm;bottom:6mm;color:#777;font-size:9px;font-weight:700}
@media print{
 @page{size:A4 portrait;margin:0}
 #sheet.sheet-stack{display:block!important;width:auto!important;height:auto!important;margin:0!important;padding:0!important;background:#fff!important;overflow:visible!important}
 .sheet-stack>.sheet{width:210mm!important;min-height:297mm!important;height:297mm!important;margin:0!important;padding:13mm 14mm!important;border:0!important;border-radius:0!important;box-shadow:none!important;zoom:1!important;overflow:hidden!important;break-after:page;page-break-after:always}
 .sheet-stack>.sheet:last-child{break-after:auto;page-break-after:auto}
}

/* Selected pictures stay separate from the candidate list. */
.vocabulary-auto-panel{padding:16px;background:#eef7f4;border:1px solid #c7e2d8;border-radius:14px;margin-bottom:16px}
.vocabulary-auto-panel .selection-bar{margin:0;gap:12px;align-items:center;flex-wrap:wrap}
.vocabulary-auto-panel #randomWordsBtn{background:#237961;color:white;border-color:#237961;font-weight:700;padding:12px 18px}
.vocabulary-auto-panel .selection-bar small{flex-basis:100%}
.selected-vocabulary-tray{border:1px solid #cbded7;border-radius:14px;padding:16px;margin-bottom:20px;background:#fff}
.selected-tray-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.selected-tray-heading h3{margin:0;font-size:16px}.selected-tray-heading h3 span{color:#237961;margin-left:8px;font-size:14px}
#pickedWordTools{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:10px;max-height:320px;overflow:auto}
#pickedWordTools .selected-picture{display:flex;flex-direction:column;gap:6px;align-items:stretch;padding:10px;border:1px solid #d8e5df;border-radius:10px;background:#f8fbfa;margin:0;min-width:0}
.selected-picture img{width:64px;height:64px;object-fit:contain;align-self:center}.selected-picture b{text-align:center;font-size:14px;overflow-wrap:anywhere}
.selected-picture button{font-size:12px;padding:6px}.selected-picture [aria-pressed=true]{background:#237961;color:white}.selected-picture[data-usable=false]{border-style:dashed;background:#fff8ed}.selected-picture small{color:#815818}
@media(max-width:600px){.vocabulary-auto-panel,.selected-vocabulary-tray{padding:12px}#pickedWordTools{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.selected-picture img{width:48px;height:48px}#pickedWordTools .selected-picture{padding:6px}}

@media(max-width:760px){body:not(.read-choice-task) .current-task-summary{flex:1 0 100%;width:100%}}

.circle-target-host{margin-top:20px;padding-top:20px;border-top:2px solid #c7e2d8}.circle-target-host .target-control-head{font-weight:700}.circle-target-host .target-choice-list{max-height:320px;overflow:auto}

/* Sound conditions and exclusions are visible as part of phoneme selection. */
body.phoneme-task .vocab-mode-tabs{display:none}
.vocabulary-exclusions{border:1px solid #f0c18e;border-radius:12px;padding:14px;margin:12px 0;background:#fff7ed;font-size:13px}
.vocabulary-exclusions>summary{cursor:pointer;font-weight:700;color:#925420}
.vocabulary-exclusions .selection-tool-row{margin-top:12px}
.vocabulary-exclusions label{min-width:0;flex:1}
.vocabulary-exclusions select{width:100%;max-width:100%}
@media print{.phon-sheet{display:grid;gap:2mm}.phon-row{margin-bottom:0}}

/* A4 density follows the requested number of phoneme tasks. */
.phon-count-7,.phon-count-8{gap:1.2mm}.phon-count-7 .phon-row,.phon-count-8 .phon-row{min-height:0;padding-block:1.2mm}
.phon-count-9,.phon-count-10{gap:1mm}.phon-count-9 .phon-row,.phon-count-10 .phon-row{min-height:0;padding-block:1mm}
.phon-count-11,.phon-count-12{gap:.8mm}.phon-count-11 .phon-row,.phon-count-12 .phon-row{min-height:0;padding-block:.7mm}
@media screen{.phoneme-count-status{margin:8px 0 16px;padding:10px 12px;border:1px solid #c5dcd1;border-radius:8px;background:#f2f8f4;font-size:13px;color:#365e4c}.phoneme-count-status p{margin:0;line-height:1.7}.phoneme-count-status button{margin-top:8px;border:1px solid #2f7557;border-radius:7px;background:#2f7557;color:#fff;min-height:42px;padding:8px 12px;cursor:pointer}.phoneme-count-status button:disabled{opacity:.55;cursor:default}}
