/* App-sized screens. Optional choices live in dialogs; primary actions stay visible. */
body {height:100dvh;overflow:hidden}
body>main {height:100dvh;min-height:0;padding:26px 32px;overflow:hidden}
#setup-screen:not([hidden]) {height:100%;display:flex;flex-direction:column;gap:16px;max-width:1400px}
.setup-heading {padding:0;margin:0;flex:0 0 auto}
.setup-heading .eyebrow {margin:0 0 8px}
.setup-heading h1 {font-size:clamp(28px,3.6vw,46px);margin:0;line-height:1.12;letter-spacing:-.045em}
.setup-heading>p:last-child {font-size:13px;margin:9px 0 0;max-width:none}
#setup-screen .workspace {flex:1;min-height:0;grid-template-columns:minmax(310px,.85fr) minmax(0,1.15fr);gap:24px;align-items:stretch}
#class-settings.settings {padding:22px;min-height:0;display:flex;flex-direction:column;gap:12px;border-radius:24px}
#class-settings .panel-heading {display:none}
#settings-fields {min-width:0;margin:0;padding:0;display:flex;flex-direction:column;gap:14px}
#class-settings .field {margin:0}
#class-settings .field>label,#class-settings .field-label {margin-bottom:7px;font-size:12px}
#class-settings .duration-presets button {min-height:44px;font-size:15px;padding:10px}
#class-settings .setting-choice {padding:12px 14px;min-height:52px}
#class-settings .setting-choice strong {font-size:15px}
#class-settings .setting-choice small {font-size:11px;margin-top:3px}
#class-settings .additions {display:grid;grid-template-columns:1fr 1fr;gap:8px}
#class-settings .additions>.field-label {grid-column:1/-1;margin:0}
#class-settings .check-row {margin:0;padding:12px 10px;min-height:64px;gap:8px}
#class-settings .check-row small {font-size:10px;line-height:1.4}
#class-settings .check-row strong {font-size:13px}
#class-settings #peak-image,#peak-field>.field-note {display:none!important}
#peak-field>label {display:none}
.refinements-open {text-align:left;padding:10px 0;min-height:40px;border:0;border-top:1px solid #dde4d5;background:none;color:#36543e;font:600 12px system-ui;cursor:pointer}
.refinements-open::after {content:'↗';float:right}
#class-settings>.field-note {margin:0;font-size:12px;line-height:1.5}
#class-settings #generate {margin-top:auto;min-height:48px;padding:12px 18px;flex:0 0 auto}
#class-settings #status:empty {display:none}
#setup-screen .class-space,#setup-screen #result {height:100%;min-height:0}
#setup-screen .practice-preview {height:100%;min-height:0;position:relative;padding:0;border:0;background:#31432c}
#setup-screen .practice-preview-photo {position:absolute;inset:0;height:100%}
#setup-screen .practice-preview-photo img {object-position:50% 65%}
#setup-screen .practice-preview-body {position:absolute;inset:0;padding:32px;display:flex;flex-direction:column;justify-content:flex-end;color:white;background:linear-gradient(180deg,transparent 36%,#11261abe)}
#setup-screen .practice-preview-body .eyebrow {color:#f0f1e7;font-size:10px;margin:0 0 12px}
#setup-screen .practice-preview-body h2 {font:400 clamp(32px,4vw,58px)/1.06 Georgia,serif;letter-spacing:-.035em;margin:0 0 16px}
#setup-screen .practice-preview-body>p:last-child {font-size:13px;line-height:1.7;margin:0;color:#eef0e6}
#setup-screen .continue-practice {padding:8px 14px;margin:0;flex:0 0 auto;font-size:12px}
.refinements-dialog {width:min(480px,calc(100vw - 28px));border:1px solid #dce3d5;border-radius:24px;padding:28px;background:#f7f8f1;color:#203e36;max-height:90dvh;overflow:auto}
.refinements-dialog::backdrop {background:#18342b85;backdrop-filter:blur(6px)}
.refinements-dialog h2 {font:400 32px Georgia,serif;margin:0 0 22px}
.refinements-dialog .field {margin:18px 0!important}
.refinements-dialog>.secondary {width:100%;min-height:44px;margin-top:20px}
#today-screen {height:100%;min-height:0;overflow:auto}
#today-screen .intro {padding:0;margin:0;gap:24px;min-height:0}
#today-screen .intro h1 {font-size:clamp(34px,4vw,56px);margin:12px 0}
#today-screen .hero-photo {max-height:300px}
#today-screen .intro-copy {font-size:14px;line-height:1.6}
#today-screen .practice-journey {display:none}
#today-screen .guide-heading {display:none}
#today-screen .feature-grid {margin:18px 0;gap:12px}
#today-screen .feature-grid button {padding:16px}
#today-screen .feature-grid button>span:not(.feature-number) {display:none}
#today-screen .recent-practices {margin:20px 0 0}
#today-screen .recent-practices h2 {font-size:20px;margin:0}
#today-screen .recent-card img {height:90px}
#today-screen .recent-card strong {font-size:14px}
#today-screen .recent-card span {font-size:11px}
.app-history,.app-library,#class-screen {height:100%;min-height:0;overflow:auto;padding:0!important}
@media(min-width:801px) and (max-height:780px) {
 body>main {padding:18px 24px}.setup-heading>p:last-child{display:none}
 #class-settings.settings{padding:16px;gap:8px}#settings-fields{gap:9px}
 #class-settings .check-row{min-height:48px}#class-settings .check-row small{display:none}
 #class-settings .setting-choice small{display:none}#class-settings .setting-choice{min-height:44px}
}
@media(max-width:800px) {
 .site-header{height:48px;padding:10px 20px}.site-header .brand{font-size:23px}
 body>main{height:calc(100dvh - 110px - env(safe-area-inset-bottom));padding:12px 16px}
 .site-header nav{padding:6px 6px max(6px,env(safe-area-inset-bottom))}
 #setup-screen:not([hidden]){gap:12px}.setup-heading .eyebrow{display:none}.setup-heading h1{font-size:30px}
 .setup-heading>p:last-child{font-size:12px;margin-top:6px}
 #setup-screen .workspace{grid-template-columns:1fr;gap:0}
 #setup-screen .class-space{display:none}
 #class-settings.settings{padding:18px;gap:12px;background:linear-gradient(#fffefaed,#fffefaf5),url('/images/room-to-begin.webp') center/cover}
 #settings-fields{gap:12px}
 #class-settings .setting-choice small{display:none}
 #class-settings .check-row{min-height:56px}
 #class-settings .check-row small{display:none}
 #setup-screen .continue-practice{display:none}
 #today-screen .feature-grid{grid-template-columns:1fr;gap:8px}
 #today-screen .feature-grid button{padding:12px;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:62px}
 #today-screen .feature-number{display:none}#today-screen .feature-grid strong{font-size:13px}
 #today-screen .feature-grid em{font-size:11px;margin:0}
 #today-screen .intro h1{font-size:38px}#today-screen .intro-copy{font-size:13px}
 #today-screen .intro h1 br{display:none}#today-screen .recent-practices>.field-note{display:none}
}
@media(max-width:800px) and (max-height:740px) {
 .setup-heading>p:last-child{display:none}#setup-screen:not([hidden]){gap:8px}
 #class-settings.settings{padding:12px;gap:6px}#settings-fields{gap:6px}
 #class-settings .field>label{margin-bottom:4px}.setup-heading h1{font-size:27px}
 #class-settings .check-row{min-height:44px}#class-settings .setting-choice{min-height:44px;padding:9px 12px}
 #class-settings .duration-presets button{min-height:40px;padding:8px}
 #class-settings #status{font-size:10px}.refinements-open{min-height:36px;padding:8px 0}
}
/* Allow access rather than clipping controls under unusually large text/short viewports. */
@media(max-height:560px) {body>main{overflow:auto}#setup-screen:not([hidden]){height:auto;min-height:100%}#setup-screen .workspace{min-height:400px}}
#setup-screen .workspace{width:100%;margin:0}
.collection-pages{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 0;font-size:11px;color:#59705d}
.collection-pages button{min-height:36px;padding:8px 12px;border:1px solid #d3ddcc;border-radius:12px;background:#f7f9f1;color:#294d38;font:inherit;cursor:pointer}
.collection-pages button:disabled{opacity:.35;cursor:default}
.collection-pages[hidden],[hidden].choice-option,[hidden].recent-card,[hidden].history-row,[hidden].saved-row{display:none!important}
#today-screen{overflow:hidden}
#today-screen .hero-stamp{display:none}
#today-screen .recent-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.app-history .dialog-heading h2,.app-library .dialog-heading h2{font-size:32px;margin:0}
.app-history .dialog-heading,.app-library .dialog-heading{margin:0 0 12px}
.history-row{padding:14px;margin:10px 0}.history-row h3{margin:5px 0;font-size:18px}
.history-row p{margin:5px 0;font-size:12px}.history-row .history-actions{margin-top:10px}
.history-stat{padding:12px}.history-stat strong{font-size:25px}
.history-explanation{margin:8px 0}.history-filters{margin:12px 0;gap:12px}
.app-library #library-list{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:800px){
 #today-screen .recent-grid,.app-library #library-list{grid-template-columns:1fr}
 #today-screen .recent-card{display:grid;grid-template-columns:90px 1fr;align-items:center;padding:0}
 #today-screen .recent-card img{grid-row:1/3;width:90px;height:76px}
 #today-screen .recent-card strong,#today-screen .recent-card span{margin:5px 12px}
 #today-screen .recent-practices{margin-top:12px}
 #today-screen .intro-link{font-size:13px;margin-top:10px}
 .app-history .eyebrow,.app-library .eyebrow{display:none}
 .app-history>.field-note,.app-library>.field-note{font-size:11px;margin:8px 0}
 .app-history .dialog-heading h2,.app-library .dialog-heading h2{font-size:28px}
 .history-stat{padding:8px}.history-stat strong{font-size:22px}
 .history-row .history-actions button{font-size:11px;padding:8px}
 .history-filters input,.history-filters select{padding:8px;font-size:12px}
 .choice-sheet{padding:20px}.choice-option{padding:12px}.choice-intro{margin:10px 0 14px}
}
@media(max-width:800px) and (max-height:740px){#today-screen .intro .eyebrow{display:none}#today-screen .intro h1{font-size:31px;margin:5px 0}#today-screen .intro-copy{margin:8px 0}.history-explanation{display:none}}
#today-screen .intro{grid-template-columns:1fr 1fr}
#today-screen .hero-photo{height:250px;min-height:0;max-height:250px}
#today-screen .practice-guide{margin:16px 0 0}
#today-screen .feature-grid button{min-height:100px}
#today-screen .recent-practices{padding:0}
#today-screen .empty-library{padding:12px 0;font-size:13px}
@media(max-width:800px){
 #today-screen .intro{grid-template-columns:1fr}
 #today-screen .hero-photo{display:none!important}
 #today-screen .feature-grid button{flex-direction:row;min-height:54px}
 #today-screen .practice-guide{margin-top:12px}
 #today-screen .feature-grid{margin:0}
 #today-screen .recent-practices{margin-top:16px}
}
#today-screen .feature-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
#today-screen .recent-practices>.field-note{display:none}
#today-screen .recent-card{display:grid;grid-template-columns:100px 1fr;align-items:center;padding:0}
#today-screen .recent-card img{grid-row:1/3;width:100px;height:88px}
#today-screen .recent-card strong,#today-screen .recent-card span{margin:6px 12px}
#history-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.history-filters{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.history-filters>div{min-width:0}.history-filters input,.history-filters select{width:100%;min-width:0}
@media(max-width:800px){
 #today-screen .feature-grid,#history-list{grid-template-columns:1fr}
 .history-filters{display:grid!important;grid-template-columns:1fr 1fr;margin:8px 0}
 .history-filters label{font-size:11px;margin-bottom:4px}
 .history-filters input,.history-filters select{min-height:36px;height:36px;padding:7px}
 .history-row{margin:4px 0;padding:12px}
 .app-history .dialog-heading{margin-bottom:6px}
 .app-history>.field-note{margin:5px 0;font-size:10px}
 #history-export{min-height:36px;padding:8px 12px;font-size:11px}
 #today-screen .recent-practices{margin-top:10px}
 #today-screen .recent-card img{height:76px}
}
.history-info .history-explanation{display:block}.history-info .history-explanation summary{display:none}
.history-info-open{font-size:11px;min-height:36px;padding:8px 0}
/* Peak selection and its opt-out share one card; no additional setup row. */
#class-settings .peak-card{padding:0;gap:0;overflow:visible}
#class-settings .peak-card-choice.setting-choice{flex:1;min-width:0;align-self:stretch;min-height:100%;border:0;border-radius:14px;background:transparent;box-shadow:none;padding:12px 44px 12px 10px;text-align:left}
#class-settings .peak-card-choice>span:first-child{min-width:0}
#class-settings .peak-card-choice strong{font-size:13px;line-height:1.3;overflow-wrap:anywhere}
#class-settings .peak-card-choice .choice-chevron{display:none}
#class-settings .peak-card-choice small{font-size:10px}
#class-settings .peak-card input{inset:0 0 0 auto;width:40px;height:100%;z-index:1}
#class-settings .peak-card .check-mark{position:absolute;right:10px;pointer-events:none}
#peak-field{display:none!important}

/* Mobile navigation has only Practice and History. */
@media (max-width:800px), (hover:none) and (pointer:coarse) {
 .site-header #library-open{display:none!important}
}
