:root{color-scheme:light;--navy:#14243d;--paper:#fff9eb;--ivory:#faf5e8;--ink:#33271f;--muted:#69533e;--rule:#c4ae8a;--gold:#e5c184;--wash:#eee4cf;font-family:Georgia,"Times New Roman",serif;color:var(--ink);background:var(--ivory);line-height:1.5}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit;color:inherit}button,select,summary{cursor:pointer}button:disabled{cursor:default;opacity:.48}button{padding:.56rem .9rem;border:1px solid #9f8867;border-radius:2px;background:var(--paper);font-weight:700}button:not(:disabled):hover{background:#f0e4cc}.primary{color:#fff6e5;background:var(--navy);border-color:var(--navy)}.primary:not(:disabled):hover{background:#253b5b}.plain{background:transparent}.masthead{background:var(--navy);color:#fff6e5;border-bottom:3px solid #a58349}.mast-inner{max-width:1440px;margin:auto;padding:1.25rem 2.4rem;display:flex;align-items:center;gap:1.1rem}.crest{object-fit:contain}.school,.subject{margin:0;color:var(--gold);font-family:system-ui,sans-serif;font-size:.875rem}.school{font-weight:650}.subject{margin-top:.18rem}.masthead h1{font-size:clamp(1.9rem,3.4vw,2.95rem);font-weight:400;line-height:1.1;margin:.18rem 0}.layout{max-width:1440px;margin:auto;display:grid;grid-template-columns:minmax(350px, .95fr) minmax(400px,1.11fr);align-items:start;gap:2.5rem;padding:2rem 2.4rem 3rem}.editor-heading,.preview-heading{display:flex;justify-content:space-between;gap:1rem;align-items:baseline}.editor-heading h2,.preview-heading h2{margin:0;font-size:1.68rem;font-weight:400}.editor-heading span,.preview-heading span{font-size:.875rem;color:var(--muted)}.details{margin:1rem 0 1.25rem;padding:.65rem .8rem .85rem;border:1px solid var(--rule);display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:.75rem}.details legend{padding:0 .3rem;color:var(--muted);font-weight:700}.details .theme,#custom-wrap{grid-column:1/-1}label{display:block;font-weight:700;font-size:.92rem}input,select,textarea{display:block;width:100%;border:1px solid #a79172;border-radius:2px;background:#fffdf5;padding:.48rem .55rem;margin-top:.24rem;min-width:0}input[type=date]{min-height:2.58rem}textarea{resize:vertical;min-height:7.25rem;line-height:1.55}.stages{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-bottom:1px solid var(--rule);gap:.22rem}.stages button{border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent;color:#59432f;min-height:3.15rem;padding:.38rem .18rem;font-size:.93rem}.stages button[aria-current=step]{border-color:#976b34;color:var(--navy);background:var(--wash)}.step-heading{font-weight:400;margin:.9rem 0 .1rem;font-size:1.74rem}.prompt,.delivery{margin:.15rem 0 .75rem;color:#594531}.delivery{border-left:2px solid var(--rule);padding-left:.62rem;font-size:.94rem}.hint,.examples,.scripture,.drafts,.rehearse{border-top:1px solid var(--rule);padding:.48rem 0}.help{margin:0 0 .8rem}.help summary,.drafts summary,.rehearse summary{color:#594029;font-weight:700}.help p{margin:.38rem 0}.example{margin:.55rem 0;padding:.42rem .65rem;border-left:2px solid var(--rule);background:#f2ead8}.example strong{font-size:.9rem}.example blockquote{margin:.2rem 0;font-style:italic}.example p{font-size:.92rem;margin:.2rem 0}.example-note,.field-note,.verse-note{font-size:.9rem;color:var(--muted);margin:.35rem 0}.warning{color:#852e20}.stage-actions,.draft-actions{display:flex;justify-content:space-between;gap:.7rem;margin:.9rem 0}.draft-actions{justify-content:flex-start}.preview-area{position:sticky;top:1rem;min-width:0}.preview-heading{border-bottom:1px solid var(--rule);padding-bottom:.5rem;margin-bottom:.9rem}.preview-area canvas{display:block;width:100%;aspect-ratio:1300/919;height:auto;border:1px solid var(--rule);background:var(--paper);box-shadow:0 3px 10px #3d2d211c}.artwork{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;column-gap:.8rem;margin-top:.9rem;max-width:30rem}.artwork select{margin:0}.artwork p{grid-column:1/-1;color:var(--muted);font-size:.92rem;margin:.32rem 0}#pdf-status{min-height:1.2em;margin:.32rem 0 .6rem;color:var(--muted);font-size:.94rem}.pdf{margin-bottom:.9rem}.rehearse ul{padding-left:1.25rem;margin:.4rem 0}.verse-list{max-height:20rem;overflow:auto;margin:.5rem 0}.verse{border-top:1px solid var(--rule);padding:.48rem .12rem}.verse h4,.verse p{margin:.1rem 0}.verse a{color:#264465}.verse button{margin:.35rem 0 .1rem;font-size:.9rem}.selected-reading{font-size:.94rem;margin:.4rem 0}.selected-reading button{padding:.2rem .42rem;margin-left:.45rem;font-size:.87rem}input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,button:focus-visible,a:focus-visible{outline:2px solid #356589;outline-offset:3px}
@media(max-width:950px){.layout{gap:1.4rem;padding:1.4rem;grid-template-columns:minmax(300px,1fr) minmax(340px,1fr)}.mast-inner{padding:1rem 1.4rem}.editor-heading{align-items:flex-start;flex-direction:column;gap:0}}
@media(max-width:740px){.layout{display:block;padding:1rem}.preview-area{position:static;margin-top:1.65rem}.mast-inner{padding:.85rem 1rem}.crest{width:48px;height:48px}.editor-heading{flex-direction:row;align-items:baseline;gap:.6rem}.editor-heading span{font-size:.8rem}}
[hidden]{display:none!important}
.export-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1rem}.export-actions .pdf{margin:0}#exports{border-top:1px solid var(--rule);padding-top:.4rem}#export-title{font-weight:400;font-size:1.35rem;margin:.35rem 0 .7rem}.review-intro{padding:.35rem 0}.review-intro ul{padding-left:1.4rem}.review-intro li{margin:.35rem 0}
.teacher-link{margin-left:auto;background:transparent;color:#fff6e5;border-color:#ad9265;flex-shrink:0}.teacher-link:not(:disabled):hover{background:#263954}.reading-scroll,.example-scroll{max-height:21rem;overflow:auto;overscroll-behavior:contain;padding:.18rem .65rem .28rem .15rem}.example{border:1px solid var(--rule);border-left:3px solid #9d753e;background:#fff9ec;padding:.62rem .7rem}.example blockquote{font-size:1rem}.verse{border:1px solid var(--rule);margin:.55rem 0;padding:.65rem .75rem;background:#fff9ec}.verse blockquote,.reading-chosen blockquote{margin:.35rem 0;white-space:pre-line}.verse small,.reading-chosen small{color:var(--muted)}.reading-chosen{padding:.55rem .7rem;border-left:3px solid #9d753e;background:#f2ead8;margin:.4rem 0}.reading-chosen button{margin:.35rem 0 0}.verse-list{max-height:23rem}.verse h4{font-size:1.05rem}.teacher-head{display:flex;justify-content:space-between;align-items:start;gap:1rem}.teacher-head h2,.teacher-head p{margin:0}.teacher-head h2{font-size:1.7rem;font-weight:400}.teacher-tools{margin:.9rem 0}.teacher-tools small{font-weight:400;color:var(--muted);margin-left:.35rem}.teacher-actions{display:flex;gap:.5rem;flex-wrap:wrap}#teacher{width:min(89vw,60rem);max-height:88vh;border:1px solid #a08052;padding:1.2rem 1.35rem;background:var(--paper);color:var(--ink)}#teacher::backdrop{background:#121c2bd0}#teacher-preview{width:min(100%,47rem);height:auto;display:block;margin:auto;border:1px solid var(--rule)}#presentation{position:fixed;inset:0;z-index:100;background:#141f31;color:#fff5de;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:.4rem;padding:.6rem}.present-head,.present-controls{display:flex;justify-content:space-between;align-items:center;gap:.55rem}.present-head{padding:.2rem .45rem;font-size:1.06rem}.present-head button,.present-controls button{color:#fff5de;background:#253950;border-color:#b79b6e}.present-head button:hover,.present-controls button:hover{color:var(--ink)}.present-controls{justify-content:center;padding:.35rem}#present-sheet{width:100%;height:100%;object-fit:contain;min-height:0;min-width:0}.presentation-open{overflow:hidden}
@media(max-width:520px){.mast-inner{gap:.6rem;flex-wrap:wrap}.teacher-link{margin-left:0;font-size:.85rem}.teacher-tools small{display:block;margin-left:0}.present-head{font-size:.91rem}}

/* Keep the teacher control aligned to the right in the compact masthead. */
.mast-inner{padding:.68rem 2.4rem;gap:.78rem;flex-wrap:nowrap}
.mast-inner .crest{width:50px;height:50px;flex:none}
.mast-inner>div{min-width:0}
.masthead h1{font-size:clamp(1.45rem,2.75vw,2.3rem);margin:.08rem 0}
.masthead .school,.masthead .subject{font-size:.78rem;line-height:1.25}
.masthead .subject{margin-top:.1rem}
.mast-inner .teacher-link{margin-left:auto;align-self:center;white-space:nowrap;padding:.35rem .7rem;font-size:.88rem}
@media(max-width:950px){.mast-inner{padding:.57rem 1.4rem}}
@media(max-width:520px){.mast-inner{padding:.46rem .7rem;gap:.48rem}.mast-inner .crest{width:35px;height:35px}.mast-inner .teacher-link{padding:.33rem .38rem;font-size:.76rem}.masthead h1{font-size:1.23rem}.masthead .school,.masthead .subject{font-size:.67rem}}
.prayer-details{margin:.85rem 0 1rem;border:1px solid var(--rule)}
.prayer-details summary{padding:.4rem .75rem;font-size:.95rem;color:#594029;font-weight:700}
.prayer-details[open] summary{border-bottom:1px solid #dfd0b4}
.prayer-details .details{border:0;margin:0;padding:.6rem .75rem .75rem}
.details-theme{color:var(--muted);font-weight:400;margin-left:.5rem}
.details-theme:not(:empty)::before{content:"·";margin-right:.45rem}
.prayer-details[open] .details-theme{display:none}

/* Keep optional help in a distinct, compact blue area below the writing field. */
.help{display:grid;grid-template-columns:1fr 1fr;gap:.45rem;margin:.55rem 0 .8rem}
.help:has(details[open]){grid-template-columns:1fr}
.help>details{min-width:0;padding:0;border:1px solid #38577a;border-radius:2px;background:#e8f0f8}
.help>details>summary{padding:.42rem .65rem;color:#fff;background:var(--navy);font-size:.94rem}
.help>details>summary:hover{background:#315779}
.help>.hint>p{margin:0;padding:.55rem .7rem;color:#203d59}
.help .example-scroll{max-height:min(17rem,38vh);padding:.1rem .55rem;scrollbar-color:#4b6e90 #e8f0f8}
.help .example{margin:.42rem 0;padding:.5rem .6rem;border:1px solid #8ea9c3;border-left:3px solid #385f88;background:#f5f9fd;color:#203d59}
.help .example blockquote{margin:.13rem 0;font-size:.98rem;line-height:1.4}
.help .example p{margin:.16rem 0;font-size:.88rem}
.help .example-note{margin:0;padding:.28rem .65rem .45rem;color:#355571;font-size:.87rem}
.verse-group>h4{margin:.5rem 0 .3rem;font-size:1rem;color:#213d58}
.verse h5{font-size:1rem;margin:0 0 .25rem;color:#253b55}

.zoom-controls{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;flex-wrap:nowrap}
.zoom-controls button{min-width:2.25rem;padding:.23rem .52rem}
.zoom-controls output{font: .82rem system-ui,sans-serif;min-width:3.05rem;text-align:right;font-variant-numeric:tabular-nums}
.zoom-controls [aria-pressed="true"]{box-shadow:inset 0 -2px #a08052}
.zoom-window{position:relative;overflow:auto;min-width:0;min-height:0;overscroll-behavior:contain}
.zoom-paper{box-sizing:border-box;min-width:100%;min-height:100%;width:max-content;height:max-content;display:grid;place-items:center;padding:4px}
#teacher-preview-wrap{display:flex;flex-direction:column;gap:.45rem}
#teacher-preview-wrap .zoom-controls{align-self:flex-end}
#teacher-zoom-window{height:min(49vh,34rem);background:#eee3d0;border:1px solid var(--rule)}
#teacher-preview,#present-sheet{display:block;max-width:none;margin:0}
#present-sheet{object-fit:initial}
#presentation .present-controls{flex-wrap:wrap}
#presentation .zoom-controls{margin-right:.35rem}

.preview-heading{align-items:center;flex-wrap:wrap}
#sheet-zoom{margin-left:auto}
#sheet-zoom-window{aspect-ratio:1300 / 919;width:100%;background:#eee3d0;border:1px solid var(--rule)}
#sheet-zoom-window #sheet{margin:0;max-width:none;aspect-ratio:auto;box-shadow:none}
@media(min-width:741px){
  body{display:grid;grid-template-rows:auto minmax(0,1fr);height:100dvh}
  .layout{width:100%;min-height:0;align-items:stretch;overflow:hidden;padding-bottom:1rem;gap:clamp(.7rem,2vw,2rem)}
  .editor,.preview-area{overflow-y:auto;overscroll-behavior:contain;min-height:0}
  .editor{overflow-y:auto;padding-right:.75rem;scrollbar-color:#98805d #eee4cf}
  .preview-area{position:static;padding-right:.25rem}
  #sheet-zoom-window{max-height:max(230px,calc(100dvh - 230px))}
}

.mast-inner .mast-actions{margin-left:auto;display:flex;align-items:center;gap:.45rem;flex:none}
.mast-inner .mast-actions .teacher-link{margin-left:0}
.mast-week{max-width:1363px;margin:0 auto .55rem;border-color:#8f7b56}
.mast-week summary{color:#fff3d9;padding:.28rem .65rem}
.mast-week .details-theme{color:#e5c184}
.mast-week[open] summary{border-color:#8f7b56}
.mast-week .details{grid-template-columns:minmax(0,1.3fr) minmax(0,1.1fr) minmax(0,.75fr);color:#fff3d9}
.mast-week .details .theme{grid-column:auto}
.mast-week .details #custom-wrap{grid-column:1/-1}
.mast-week input,.mast-week select{color:var(--ink)}
.prayer-dialog{width:min(92vw,37rem);border:1px solid #a08052;padding:1.15rem 1.25rem;background:var(--paper);color:var(--ink)}
.prayer-dialog::backdrop{background:#121c2bd0}
.prayer-dialog .export-actions{margin:.75rem 0}
#load-status,#save-status{margin-bottom:0;color:var(--muted)}
@media(max-width:1440px){.mast-week{margin-inline:2.4rem}}
@media(max-width:950px){.mast-week{margin-inline:1.4rem}}
@media(max-width:650px){
  .mast-inner{flex-wrap:wrap}.mast-inner .mast-actions{width:100%;justify-content:flex-end}
  .mast-week .details{grid-template-columns:1.1fr 1fr}.mast-week .details .theme{grid-column:1/-1}
}
@media(max-width:520px){.mast-week{margin-inline:.7rem}}
#use-current-prayer{margin-bottom:.65rem}

.stages{position:sticky;top:0;z-index:1;gap:2px;border-bottom:2px solid #ad8a4c;background:var(--paper)}
#step,#export-title{scroll-margin-top:3.5rem}
.stages button{position:relative;overflow:hidden;background:#203451;color:#fff2d8;border:0;transition:background-color .18s ease,color .18s ease}
.stages button::after{content:"";position:absolute;inset:auto 0 0;height:3px;background:#d9b373;transform:scaleX(0);transform-origin:left;transition:transform .2s ease}
.stages button[aria-current=step]{background:#14243d;color:#f7d894}
.stages button:not(:disabled):hover,.stages button:focus-visible{background:#2d4667;color:#ffe5ab}
.stages button[aria-current=step]::after,.stages button:hover::after,.stages button:focus-visible::after{transform:scaleX(1)}
@media(prefers-reduced-motion:reduce){.stages button,.stages button::after{transition:none}}

.role-intro{font-size:.92rem;color:var(--muted);margin:.36rem 0 .48rem}
.prayer-roles{display:grid;grid-template-columns:minmax(9rem,12rem) minmax(8rem,1fr);align-items:center;gap:.35rem .7rem;max-width:31rem;margin:.42rem 0 .75rem}
.prayer-roles label{font-size:.9rem}
.prayer-roles select{margin:0;padding:.29rem .4rem}

/* The weekly details float over the builder so opening them does not resize it. */
.masthead{position:relative;z-index:2}
.mast-inner .mast-week{margin:0 0 0 auto;position:relative;max-width:min(26vw,19rem);min-width:0;border:0}
.mast-inner .mast-week summary{border:1px solid #ad9265;border-radius:2px;padding:.34rem .55rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;background:var(--navy)}
.mast-inner .mast-week summary:hover,.mast-inner .mast-week[open] summary{background:#263954}
.mast-inner .mast-week .details-theme{display:inline}
.mast-inner .mast-actions{margin-left:0}
.mast-inner .mast-week .details{position:absolute;top:calc(100% + .3rem);right:0;z-index:5;width:min(19rem,calc(100vw - 1.5rem));margin:0;padding:.68rem .75rem .75rem;grid-template-columns:minmax(0,1fr);gap:.55rem;background:#192e49;border:1px solid #ad9265;box-shadow:0 4px 9px #15243d38}
.mast-inner .mast-week .details label{grid-column:1/-1}
@media(max-width:1060px){
  .mast-inner{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:.45rem .75rem}
  .mast-inner>div:nth-child(2){grid-column:2/-1}
  .mast-inner .mast-week{grid-column:1/3;margin:0;max-width:100%;justify-self:start}
  .mast-inner .mast-week .details{left:0;right:auto}
  .mast-inner .mast-actions{grid-column:3;justify-self:end;width:auto}
}
@media(max-width:430px){
  .mast-inner{grid-template-columns:auto minmax(0,1fr)}
  .mast-inner .mast-week{grid-column:1/-1}
  .mast-inner .mast-actions{grid-column:1/-1}
}
.zoom-window.can-pan canvas{cursor:grab}
.zoom-window.is-panning,.zoom-window.is-panning canvas{cursor:grabbing;user-select:none}

.mast-inner .mast-week{align-self:center}
.mast-inner .mast-week summary{min-height:2.2rem;line-height:1.35;padding:.42rem .65rem;border-color:#d0ab67;color:#fff3d9}
.mast-inner .mast-week.needs-details summary{background:#f2ce82;border-color:#ffde99;color:#142338;font-weight:700}
.mast-inner .mast-week.needs-details summary:hover{background:#ffe1a2}
.setup-cue{display:none}
.mast-week.needs-details:not([open]) .setup-cue{display:inline;margin-inline-start:.55rem;padding-inline-start:.55rem;border-inline-start:1px solid #9e753d}
#prayer-start :focus-visible,.mast-week summary:focus-visible{outline:2px solid #9d6c25;outline-offset:3px}
.verse-credit{display:block;margin:.4rem 0 .15rem;color:var(--muted);font-size:.8rem}

.stage-check{margin-left:.28em;color:#f1c76f;font-family:system-ui,sans-serif;font-size:.95em;font-weight:750;white-space:nowrap}

/* Equal side columns keep the weekly dropdown centred across the full header. */
.mast-inner{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center}
.mast-inner .mast-brand{display:flex;align-items:center;gap:.78rem;min-width:0}
.mast-inner .mast-week{margin:0;justify-self:center}
.mast-inner .mast-actions{justify-self:end}
.mast-inner .mast-week .details{left:50%;right:auto;transform:translateX(-50%)}
@media(max-width:1100px){
  .mast-inner{grid-template-columns:minmax(0,1fr) auto;row-gap:.45rem}
  .mast-inner .mast-brand{grid-area:1/1}
  .mast-inner .mast-actions{grid-area:1/2}
  .mast-inner .mast-week{grid-area:2/1/3/-1;max-width:100%}
}
@media(max-width:650px){
  .mast-inner{grid-template-columns:minmax(0,1fr)}
  .mast-inner .mast-brand{grid-area:1/1}
  .mast-inner .mast-week{grid-area:2/1}
  .mast-inner .mast-actions{grid-area:3/1;justify-self:end}
}

/* Expanded pupil help and reading results scroll with the main builder. */
.editor .verse-list,.editor .help .example-scroll{max-height:none;overflow:visible;overscroll-behavior:auto}

.mast-inner .mast-week{max-width:min(34vw,24rem)}
.mast-inner .mast-week summary{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
.mast-inner .mast-week.needs-details:not([open]) summary{
  outline:1px solid #dbb672;outline-offset:2px;
}
@media(max-width:1100px){.mast-inner .mast-week{max-width:100%}}

.zoom-controls{gap:.24rem}
.zoom-controls button{min-width:1.62rem;min-height:1.62rem;padding:.13rem .34rem;font-size:.8rem;line-height:1.15}
.zoom-controls output{min-width:2.65rem;font-size:.73rem}

.zoom-paper>svg,.zoom-paper>[role=img]{display:block}
.zoom-window.can-pan .zoom-paper>[role=img]{cursor:grab}
.zoom-window.is-panning .zoom-paper>[role=img]{cursor:grabbing}
#sheet-zoom-window #sheet{display:block}
.layout{max-width:none;padding:1.15rem clamp(.85rem,2vw,2rem) 1rem;gap:clamp(.75rem,1.55vw,1.5rem)}
.editor{font-size:.94rem;line-height:1.42}
.editor-heading h2,.preview-heading h2{font-size:1.47rem}
.editor .step-heading{font-size:1.52rem;margin:.65rem 0 .12rem}
.editor .prompt,.editor .delivery{margin:.12rem 0 .48rem}
.editor .stages button{min-height:2.55rem;padding:.32rem .14rem}
.editor .scripture{padding:.35rem 0}
.editor .verse-note{font-size:.855rem;margin:.27rem 0}
.editor .verse-group>h4{margin:.36rem 0 .24rem}
.editor .verse{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.2rem .65rem;padding:.42rem .56rem;margin:.34rem 0;font-size:.92rem;line-height:1.38}
.editor .verse h5{grid-column:1;grid-row:1;margin:0;font-size:.95rem}
.editor .verse button{grid-column:2;grid-row:1;margin:0;padding:.22rem .45rem;font-size:.79rem;white-space:nowrap}
.editor .verse blockquote{grid-column:1/-1;grid-row:2;margin:.13rem 0 0}
.artwork{margin-top:.6rem}
#pdf-status{margin-bottom:.2rem}
@media(min-width:741px){
  body{overflow:hidden}
  .layout{grid-template-columns:minmax(0,1.05fr) minmax(0,1fr)}
  .preview-area{display:flex;flex-direction:column;overflow:visible;padding-right:0}
  #sheet-zoom-window{flex:1 1 auto;min-height:0;max-height:none;scrollbar-width:none}
  #sheet-zoom-window::-webkit-scrollbar{display:none}
  .preview-heading{margin-bottom:.55rem}
}
@media(max-width:740px){.layout{padding:.8rem}}

/* The desktop columns occupy one viewport row, so the builder owns the middle scrollbar. */
#sheet-zoom-window .zoom-paper{align-items:start}
.preview-roles{padding:.37rem 0 .23rem;margin:.45rem 0 0}
.preview-roles .prayer-roles{display:flex;flex-wrap:wrap;gap:.32rem .45rem;max-width:none;margin:.3rem 0 0}
.preview-roles .role-choice{flex:1 1 7.1rem;min-width:0}
.preview-roles .role-choice:last-child{flex-basis:10rem}
.preview-roles label{font-size:.8rem;line-height:1.2;margin-bottom:.15rem}
.preview-roles select{width:100%;font-size:.82rem;padding:.18rem .24rem}

.preview-area #pdf-status{margin:.14rem 0 0;font-size:.86rem}
@media(min-width:741px){
  html{overflow:hidden}
  body{height:100dvh;min-height:0;grid-template-rows:auto minmax(0,1fr)}
  .layout{height:100%;max-height:100%;min-height:0;grid-template-rows:minmax(0,1fr);overflow:hidden}
  .editor{height:100%;max-height:100%;min-height:0;overflow-x:hidden;overflow-y:auto}
  .preview-area{height:100%;min-height:0;min-width:0;justify-content:flex-start}
  .preview-area>:not(#sheet-zoom-window){flex-shrink:0}
  #sheet-zoom-window{height:min(57dvh,44rem);min-height:0;max-height:100%;aspect-ratio:auto;flex:0 1 auto}
}

.preview-area #pdf-status:empty{display:none}

#step{padding-top:.58rem}
#step:focus{outline:none}
#opening{margin-bottom:.5rem}
.stage-instruction{margin:.18rem 0 .55rem;color:var(--muted)}
#answer{min-height:5.5rem}
#stage-actions{margin:.42rem 0 .14rem;justify-content:flex-end;gap:.4rem;flex-wrap:wrap}
#stage-actions button{padding:.27rem .62rem}
.stage-help-card{
  position:fixed;z-index:4;right:var(--help-right,1rem);bottom:1rem;width:min(var(--help-width,29rem),calc(100vw - 2rem));
  font-size:.87rem;line-height:1.4;
  max-height:min(62dvh,28rem);overflow:auto;overscroll-behavior:contain;
  background:#edf3fa;border:1px solid #476687;color:#203d59;box-shadow:0 5px 20px #15263e44;
  visibility:hidden;opacity:0;transform:translate(calc(var(--help-x,0px) + 1.5rem),var(--help-y,0px));
  transition:opacity .22s ease,transform .22s ease,visibility 0s linear .22s;
}
.stage-help-card.is-open{visibility:visible;opacity:1;transform:translate(var(--help-x,0px),var(--help-y,0px));transition-delay:0s}
.stage-help-header{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.3rem .65rem;background:var(--navy);color:#fff2d8}
.stage-help-header h3{font-size:1rem;margin:0}
.stage-help-header button{padding:.05rem .42rem;font-size:1.15rem;background:transparent;color:inherit;border-color:#9ab0c6}
.stage-help-header button:not(:disabled):hover{background:#38577a}
#stage-help-content{padding:.42rem .65rem}
#stage-help-content p{margin:.25rem 0}
.theme-examples .example{margin:.35rem 0;background:#f8fbff;border-color:#476687}
.theme-examples blockquote{margin:.22rem 0}
@media(prefers-reduced-motion:reduce){.stage-help-card{transition:none}}

.stage-help-header{cursor:grab;touch-action:none;user-select:none}
.stage-help-card.is-dragging{transition:none}
.stage-help-card.is-dragging .stage-help-header{cursor:grabbing}

.verse-search-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.2rem .42rem;align-items:end}
.verse-search-form label{grid-column:1/-1}
.verse-search-form input{margin:0}
.verse-search-form button{padding:.48rem .65rem}
.selected-reading{margin:.28rem 0;font-size:.83rem}
.stage-help-card .verse{margin:.36rem 0;padding:.48rem .6rem;border:1px solid #8ea9c3;background:#f8fbff}
.stage-help-card .verse blockquote{margin:.24rem 0}
.stage-help-card .verse button{margin:.15rem 0 0;padding:.23rem .5rem}
.stage-help-card .verse-connection{color:#355571}

.own-verse-button{margin-top:.32rem;padding:.25rem .5rem;font-size:.83rem}
.own-verse-form label{margin-top:.4rem}
.own-verse-form textarea{min-height:4.75rem}
.own-verse-form button{margin-top:.5rem}

#stage-help-content .verse-guide{margin:.32rem 0 .42rem;line-height:1.45}
.verse-guide strong{display:block;color:#203d59}
.verse-quote{margin:.2rem 0 .28rem}
.verse-quote summary{width:fit-content;color:#2d5275;font-weight:700}

.question-guide{padding:.55rem .65rem;margin-bottom:.52rem;background:#e1edf9;border:1px solid #8ea9c3}
.question-guide h4{font-size:.94rem;margin:0}
.question-guide ol{margin:.3rem 0;padding-inline-start:1.24rem}
.question-guide li+li{margin-top:.15rem}
.model-question{font-weight:700}

.email-status{font-size:.88rem;margin:.35rem 0}
.email-status:empty{display:none}

#prayer-printout{display:none}
@media print{
  @page{size:A4 landscape;margin:8mm}
  html,body{display:block!important;height:auto!important;overflow:visible!important;background:#fff}
  body:has(#prayer-printout)>:not(#prayer-printout){display:none!important}
  body:has(#prayer-printout) dialog::backdrop{display:none}
  #prayer-printout{display:block;print-color-adjust:exact;-webkit-print-color-adjust:exact}
  .prayer-print-page{display:grid;grid-template-rows:1fr;width:100%;height:193mm;break-inside:avoid}
  .prayer-print-page:not(:last-child){break-after:page}
  .prayer-print-page.four-copies{grid-template:repeat(2,minmax(0,1fr))/repeat(2,minmax(0,1fr));gap:2mm}
  .prayer-print-copy{display:flex;align-items:center;justify-content:center;min-height:0;min-width:0}
  .prayer-print-copy>svg,.prayer-print-copy>canvas{display:block;max-width:100%;max-height:100%;height:100%;width:auto;object-fit:contain}
}

.email-status p{margin:.3rem 0 .5rem}

.teacher-email-address{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem .4rem;margin:.24rem 0 .5rem}
.teacher-email-address input{flex:1 1 6rem;width:auto;min-width:0;max-width:17rem;margin:0}
.teacher-email-address span{white-space:nowrap;color:var(--muted)}

#exports .export-actions{margin:.25rem 0 0}

#teacher[open]{
  display:flex;flex-direction:column;width:calc(100vw - 1.2rem);height:calc(100dvh - 1.2rem);
  max-width:none;max-height:none;padding:.45rem .55rem;gap:.35rem;overflow:hidden
}
.teacher-toolbar,.teacher-toolbar-buttons{
  display:flex;align-items:center;flex-wrap:wrap;gap:.28rem .45rem
}
.teacher-toolbar{justify-content:space-between;flex-shrink:0;border-bottom:1px solid var(--rule);padding-bottom:.36rem}
.teacher-toolbar h2{margin:0;font-size:1.12rem;font-weight:400;white-space:nowrap}
.teacher-toolbar-buttons button,#presentation .present-head button{font-size:.8rem;min-height:1.65rem;padding:.16rem .42rem;line-height:1.1;white-space:nowrap}
.teacher-toolbar .zoom-controls{margin-left:0}
#teacher-status{margin:.06rem 0;font-size:.83rem}
#teacher-status:empty{display:none}
.teacher-status-quiet{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap}
#teacher-preview-wrap{flex:1 1 auto;min-height:0}
#teacher-zoom-window{flex:1 1 auto;height:auto;min-height:0}
#presentation{grid-template-rows:auto minmax(0,1fr);gap:.32rem;padding:.35rem}
#presentation .present-head{flex-wrap:wrap;font-size:.92rem;gap:.3rem}
#presentation .present-controls{flex-wrap:wrap;gap:.28rem;padding:0}

.preview-heading{--preview-control-height:1.62rem;gap:.28rem .65rem;justify-content:flex-start}
.preview-heading .artwork{margin:0;gap:.3rem;max-width:100%;grid-template-columns:auto minmax(6.5rem,10rem)}
.preview-heading .artwork label{font-size:.8rem}
.preview-heading .artwork select,.preview-heading #sheet-zoom button{
  min-height:var(--preview-control-height);height:var(--preview-control-height)
}
.preview-heading .artwork select{font-size:.8rem;padding:.13rem .35rem}

.panel-divider{display:none}
@media(min-width:741px){
  .layout{
    grid-template-columns:minmax(0,var(--builder-track,1.05fr)) .75rem minmax(0,var(--preview-track,1fr));
    column-gap:clamp(.23rem,.6vw,.7rem)
  }
  .panel-divider{
    position:relative;display:block;height:100%;cursor:col-resize;touch-action:none;user-select:none;
    background:transparent;border-radius:2px
  }
  .panel-divider::before{
    content:"";position:absolute;inset:0 5px;background:#d5c4a7;border-radius:2px
  }
  .panel-divider::after{
    content:"";position:absolute;top:46%;left:3px;width:6px;height:2rem;border-radius:3px;background:#9e8052
  }
  .panel-divider:hover,.panel-divider:focus-visible,.panel-divider.is-resizing{background:#e9ddc6}
  .panel-divider:focus-visible{outline:2px solid #356589;outline-offset:1px}
}

.stage-hint{margin:.18rem 0 .55rem;color:var(--muted);font-size:.88rem}
.inline-passage{margin-top:.45rem}
.inline-passage label+input{margin-bottom:.38rem}
.inline-passage textarea{min-height:4.4rem;white-space:pre-wrap;overflow-wrap:anywhere;color:#142338;font-weight:400}

.section-nav{display:inline-flex;align-items:center;gap:.2rem;margin-inline-end:.25rem}

.mast-inner{max-width:none;padding-inline:clamp(.7rem,1.3vw,1.25rem)}

.save-panels{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:.65rem}
.save-panel{flex:1 1 11rem;border:1px solid var(--rule);padding:.48rem .55rem}
.save-panel h3{font-size:.92rem;margin:0}
#save-prayer .save-panel .export-actions{gap:.3rem;margin:.4rem 0 0}
#save-prayer button{font-size:.82rem;padding:.27rem .48rem}
#save-status:empty{display:none}

.teacher-email-address button{white-space:nowrap;font-size:.82rem;padding:.32rem .48rem}

#prayer-details summary{list-style:none}
#prayer-details summary::-webkit-details-marker{display:none}
.prayer-arrow{
  display:inline-block;width:0;height:0;margin-inline:.12rem .48rem;vertical-align:.04em;
  border-block:.31em solid transparent;border-inline-start:.49em solid currentColor;
}
#prayer-details[open] .prayer-arrow{transform:rotate(90deg)}
#prayer-start .prayer-start-example{background:#f2ce82;border-color:#ad8a4c;color:#142338;padding:.42rem .65rem}
#prayer-start .prayer-start-example:hover{background:#ffe1a2}
.prayer-start-caption{margin-inline-start:.55rem;padding-inline-start:.55rem;border-inline-start:1px solid #9e753d}



.prayer-setup-guide,.setup-field-note{display:none}
#prayer-details.needs-details .prayer-setup-guide{
  display:block;grid-column:1/-1;margin:0;padding:.38rem .5rem;
  background:#f2ce82;color:#142338;border-radius:2px;font-size:.83rem;line-height:1.35
}
.prayer-setup-guide strong{display:block;font-size:.92rem}
#prayer-details .setup-next .setup-field-note{
  display:inline-block;margin-inline-start:.4rem;padding:.1rem .32rem;
  border-radius:2px;background:#f2ce82;color:#142338;font-size:.71rem
}
#prayer-details .setup-next :is(input,select){border:2px solid #f2ce82;box-shadow:0 0 0 1px #f2ce82}

.gather-start-tip{
  display:inline-block;margin-inline-start:.4rem;padding:.1rem .32rem;border-radius:2px;
  background:#f2ce82;color:#142338;font-size:.75rem;font-weight:700;visibility:hidden;opacity:0;
  transition:opacity .22s ease,visibility 0s linear .22s
}
.gather-start-tip.is-visible{visibility:visible;opacity:1;transition-delay:0s}
@media(prefers-reduced-motion:reduce){.gather-start-tip{transition:none}}

.title-stage-number{font-family:"Times New Roman","Liberation Serif",serif;font-variant-numeric:lining-nums;vertical-align:baseline}

[data-prototype="2"] #start-writing{background:#f2ce82;color:#142338;justify-self:start}
[data-prototype="2"] .prototype-verse-choice h3{font-size:1.03rem;margin:.3rem 0 .55rem}
[data-prototype="2"] .prototype-verse-choice details{margin:.42rem 0}
[data-prototype="2"] .prototype-verse-choice summary{font-weight:700}
[data-prototype="2"] .prototype-verse-choice #prototype-verse-status{margin:.45rem 0;color:#214b32;font-weight:700}
[data-prototype="2"] .prototype-verse-choice #prototype-verse-status:empty{display:none}
[data-prototype="2"] .prototype-writing-prompt{margin-top:.65rem}
[data-prototype="2"] .prototype-checklist{padding-inline-start:1rem}
[data-prototype="2"] .prototype-checklist li{margin:.25rem 0}
[data-prototype="2"] #review-reader-panel{padding:.55rem .65rem;border:1px solid var(--rule);margin:.55rem 0}

.section-speaker{color:#8e7143;cursor:pointer}
.section-speaker:hover,.section-speaker:focus,.section-speaker[aria-pressed=true]{color:#142338}
.section-speaker:focus{outline:none}
.section-speaker:focus rect,.section-speaker[aria-pressed=true] rect{fill:#efcf89}
.prayer-voice{position:relative;font-size:.82rem;z-index:3}
.prayer-voice summary{cursor:pointer;border:1px solid #a78e67;padding:.2rem .4rem}
.voice-options{
  position:absolute;top:calc(100% + .35rem);right:0;z-index:5;
  width:min(17rem,calc(100vw - 1rem));padding:.5rem .65rem;
  background:#fff9eb;color:#142338;border:1px solid #a78e67;
  box-shadow:0 5px 16px #14233840;
}
.prayer-voice select{font-size:.82rem}
.prayer-voice small{display:block;margin-top:.3rem;line-height:1.3}

html:not(.show-section-speakers) .section-speaker{display:none}
.prayer-voice .speaker-toggle{display:flex;align-items:center;gap:.35rem;margin:.25rem 0 .45rem}
.prayer-voice .speaker-toggle input{width:auto;margin:0;accent-color:#142338}
.mast-inner #open-teacher{background:#fff;color:#142338;border-color:#fff}
.mast-inner #open-teacher:hover{background:#f2ce82;color:#142338;border-color:#f2ce82}

.action-amen{margin:.3rem 0;color:#142338;font-style:italic}

.editor #review-reader-panel{padding:.55rem .65rem;border:1px solid var(--rule);margin:.55rem 0}
.editor #prayer-roles{display:grid;grid-template-columns:1fr;gap:.25rem;max-width:none}
.editor #prayer-roles .role-choice{display:grid;grid-template-columns:minmax(0,1fr) minmax(6rem,11rem);gap:.5rem;align-items:center}
.reader-progress{display:block;color:var(--muted);font-weight:400}
.closing-instruction{font-size:.85rem;margin:.35rem 0}

#presentation{grid-template-columns:minmax(0,1fr);overflow:hidden}
#present-zoom-window{width:100%;min-width:0;min-height:0}

#save-prayer{width:min(92vw,44rem)}
.save-panel{flex-basis:15rem;padding:.75rem}
.save-panel h3{display:flex;align-items:center;gap:.4rem;font-size:1rem}
.save-panel h3 svg{width:1.1rem;height:1.1rem;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.save-panel p{font-size:.9rem;line-height:1.4;margin:.65rem 0 0}
.email-attachment-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;margin:.25rem 0 .7rem}
.email-attachment-actions select{width:auto;margin:0}
#email-status [role="status"]:empty{display:none}

.email-steps{margin:.75rem 0 0;padding-inline-start:1.45rem}
.email-steps>li{padding-inline-start:.3rem;margin-block:.75rem}
.email-steps>li::marker{font-weight:bold;color:var(--ink)}
.email-steps h3{font-size:1rem;margin:0 0 .35rem}
.email-download-status{font-weight:bold;overflow-wrap:anywhere}

.teacher-email-address .gmail-draft-button{background:#fff;border-color:#dadce0;border-radius:4px;padding:.3rem .48rem}
.teacher-email-address .gmail-draft-button:hover:not(:disabled){background:#f8f9fa;border-color:#bdc1c6}
.gmail-draft-button img{display:block;width:5rem;height:auto}
