/* Shared rhythm across the showroom, quiz, reader and studio. */
.nav-label-short{display:none}
:is(.section-top h1,.choice-bottom h2,.toc-chapter h2,.workbench-inner>h2,#studio-panel h2,.room-concepts legend){word-break:keep-all;overflow-wrap:anywhere;letter-spacing:-.035em}
:is(.section-description,.reader-lead,.reader-section>p,.reader-example p,.reader-myth p,.workbench-inner>p,.material-description){line-height:1.7}
.reader-section h2,.reader-glossary h2,.reader-checklist h2{line-height:1.4;margin:8px 0 16px}
.reader-section{padding:28px 0}.reader-section>p{margin:0 0 16px}
.reader-example,.reader-myth{margin:20px 0;padding:20px}.reader-example p{margin:8px 0 0}
.reader-lead{margin:0 0 20px}.reader-contents{margin:20px 0}.book-reader>.knowledge-figure{margin:20px auto 28px}
.material-detail-kicker{display:block;margin-top:12px}
.workbench-inner:has(.material-detail-kicker)>.mobile-workbench-back{display:none}
.material-intro{margin:16px 0}.material-intro>.material-description{line-height:1.7;margin:0 0 12px}.material-shopping .button{line-height:1.4}
.room-concept-grid small{margin-right:4px}

@media(max-width:760px){
 :root{--studio-preview-height:136px;--bottom-nav-height:64px}
 .topbar{padding:8px 12px;gap:8px 12px;min-height:0}.topbar .header-controls{gap:4px;align-items:stretch}
 .header-controls>button{height:48px;min-height:48px;line-height:1.3}
 .header-controls .story-launch{flex:0 0 72px;min-width:72px;padding:6px;font-size:13px}
 .header-controls .save-button{min-width:52px;font-size:12px;padding:4px 2px}.header-controls .save-short{font-size:12px;line-height:1.3}
 .header-controls .avatar-button{width:48px!important;min-width:48px;height:48px!important;padding:0!important;gap:0;justify-content:center}
 .header-controls .avatar-button .avatar-sprite,.header-controls .avatar-button .avatar-sprite canvas{width:30px!important;height:30px!important;flex-basis:30px}
 .header-controls .avatar-button-label{font-size:12px;line-height:16px}
 .header-controls .music-button{font-size:12px;padding:6px;justify-content:center}.header-controls .music-menu,.header-controls .help-button{min-width:40px;padding:4px;font-size:20px}
 .main-content,.launcher-mode .main-content{padding:16px 16px 24px}.app-shell:not(.launcher-mode) .main-content{padding-bottom:calc(var(--bottom-nav-height) + 24px + env(safe-area-inset-bottom))}
 .main-content:has(#view-play:not([hidden])){padding-top:12px}
 .section-top{margin:0 0 16px;gap:12px}.section-top h1{font-size:24px;line-height:1.35}
 .eyebrow{font-size:12px;line-height:1.4;margin:0 0 8px;letter-spacing:.045em}.section-description{font-size:16px;line-height:1.65;margin:12px 0 0}
 .launcher-mode .launch-heading h1{line-height:1.25;margin:8px 0 12px}.launcher-mode .launch-heading h1 br{display:initial}.launch-heading>p:last-child,.choice-bottom p{font-size:14px;line-height:1.6;word-break:keep-all;overflow-wrap:anywhere}
 .choice-bottom{padding:12px}.choice-bottom h2{font-size:21px;line-height:1.3;margin:0 0 8px}
 .guide-start{padding:12px 16px;margin:16px 0;gap:12px;line-height:1.4}.guide-start small{line-height:1.5}.launch-utility{gap:8px}.launch-utility button{min-height:48px;line-height:1.4}
 .sidebar{padding:0 8px env(safe-area-inset-bottom)}.main-nav{grid-template-columns:repeat(5,minmax(0,1fr));gap:0}
 .nav-item{height:var(--bottom-nav-height);min-height:var(--bottom-nav-height);padding:8px 2px!important;justify-content:center;gap:4px}
 .nav-item>span:nth-child(2),.nav-item[data-view="studio"]>span:nth-child(2){font-size:13px!important;line-height:18px;letter-spacing:-.025em;white-space:nowrap}
 .nav-label-long{display:none}.nav-label-short{display:inline}.nav-symbol{font-size:20px;line-height:22px;height:22px}
 .guided-quest{padding:12px;margin:0 0 16px}.quest-heading{gap:8px;min-height:44px;margin:0 0 8px}
 .quest-heading .micro{font-size:13px;line-height:1.4;letter-spacing:0;font-variant-numeric:tabular-nums;white-space:nowrap}
 .quest-heading [data-action="curation-help"]{font-size:14px;padding:8px 12px;line-height:1.4;min-height:44px}
 .guided-quest .action-row{gap:8px;margin:0;align-items:stretch}.guided-quest .quest-next{min-height:48px;padding:12px;font-size:16px;line-height:1.4}
 .guided-quest .action-row>.text-link{font-size:13px;line-height:1.4;min-height:48px;display:inline-flex;align-items:center;white-space:normal;word-break:keep-all}
 .scene-top{min-height:40px;padding:10px 12px;gap:8px;line-height:1.4}.scene-top>.pixel,.showroom-layout .scene-top>span:last-child{font-size:12px;line-height:1.4;letter-spacing:0;word-break:keep-all}
 .mobile-showroom-controls{padding:8px}.mobile-rack-controls,.mobile-station-controls{gap:8px}.mobile-station-controls{margin-top:8px}
 .mobile-showroom-controls button{min-height:48px;padding:8px;gap:4px;font-size:14px;line-height:1.35}.mobile-showroom-controls button>span{min-width:16px;font-size:12px;line-height:1.35}
 .scene-bottom{padding:8px 12px}.scene-bottom .text-link{min-height:40px;font-size:14px;line-height:1.4;display:inline-flex;align-items:center}
 .room-switch{margin:12px 0 0;gap:0}.room-tab{padding:10px 12px;min-height:44px;line-height:1.4}.showroom-lower{margin-top:16px;gap:16px}.daily-card,.showroom-ad{padding:20px}
 .workbench-inner{padding:16px}.workbench-inner>h2{font-size:23px;line-height:1.35;margin:12px 0 16px}.workbench-inner>p{font-size:16px;line-height:1.65;margin:0 0 16px}
 .mobile-workbench-back{margin:0 0 12px;line-height:1.4}.material-detail-kicker{font-size:12px;margin-top:8px}
 .workbench-inner:has(.material-detail-kicker)>h2,#studio-panel:has(.material-detail-kicker)>h2{margin:8px 0 12px;font-size:23px;line-height:1.3}
 .fabric-gallery{margin:12px 0 16px}.gallery-toolbar{margin:0 0 8px;gap:8px}.gallery-toolbar button{min-height:44px;line-height:1.4}
 .fabric-gallery:not(.is-large) .fabric-slides{height:clamp(180px,34dvh,300px)}.gallery-hint{font-size:13px;line-height:1.5;margin:8px 0 0}.material-shopping .button{min-height:48px;font-size:14px}
 .book-tabs{margin:16px 0;gap:8px}.book-tabs button{min-height:44px;font-size:14px;line-height:1.4;padding:10px 12px}
 .toc-chapter{padding:16px;gap:12px;grid-template-columns:30px minmax(0,1fr) 16px;align-items:start}.toc-chapter h2{font-size:19px;line-height:1.4;margin:8px 0 0}
 .toc-chapter .micro{font-size:12px;line-height:1.5;letter-spacing:0}.toc-number{font-size:26px;line-height:1.2}.toc-arrow{line-height:1.2}.book-toc{gap:12px}
 .book-reader>h1{font-size:28px;line-height:1.35;margin:12px 0 16px;word-break:keep-all;overflow-wrap:anywhere}.reader-eyebrow{margin-top:20px}.reader-lead{font-size:16px;line-height:1.65}
 .reader-section{padding:24px 0}.reader-section h2,.reader-glossary h2,.reader-checklist h2{font-size:22px;line-height:1.4;margin:8px 0 16px;word-break:keep-all}
 .reader-section>p,.reader-example p,.reader-myth p{font-size:16px;line-height:1.7}.reader-contents{padding:12px 16px;margin:16px 0;line-height:1.5}
 .reader-example,.reader-myth,.reader-glossary{padding:16px;margin:16px 0}.reader-glossary dd,.reader-checklist li{font-size:15px;line-height:1.65}.reader-actions{gap:8px;margin:16px 0 24px}.reader-actions .button{font-size:15px;min-height:48px;line-height:1.4}
 .question-card{padding:16px}.run-top{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;line-height:1.4}.run-top>span.pixel{font-size:13px;letter-spacing:0;word-break:keep-all}.run-top>span:last-child{text-align:right}
 .run-top .text-link{justify-self:start}.run-top .restart-button{justify-self:end}
 .question-progress{margin:12px 0}.question-share-row{right:16px;top:8px}.question-meta{padding-right:104px;min-height:32px;gap:8px}.question-meta .chip{font-size:12px;line-height:1.4}
 .question-card h1{font-size:21px;line-height:1.4;margin:12px 0}.question-coach{margin:12px 0;padding:10px 12px}.question-coach p{font-size:14px;line-height:1.5}
 .answer{padding:12px;min-height:48px;line-height:1.45;font-size:16px;gap:12px}.answer-letter{font-size:18px;line-height:1.3}.question-hint{font-size:13px;line-height:1.5;margin-top:16px}.answer-explanation{margin-top:20px;padding-top:16px}.answer-explanation p{line-height:1.7}
 .miniroom-card{width:calc(100% + 32px);margin:-16px -16px 0;max-width:none}.miniroom-heading{padding:8px 12px 0}.miniroom-heading>.pixel{font-size:14px;line-height:1.35;letter-spacing:0}
 .miniroom-actions{padding:0 12px 4px;gap:0}.miniroom-actions button{min-height:40px;font-size:14px;line-height:1.4;padding:8px 0;border:0}
 .studio-tabs{margin:0 -16px 16px;padding:4px 8px;gap:4px}.studio-tabs button{font-size:14px;line-height:1.4;padding:8px;min-height:44px}
 #studio-panel{scroll-margin-top:calc(var(--header-height) + var(--studio-preview-height) + 64px)}#studio-panel>p{font-size:16px;line-height:1.65}
 #studio-panel:has(.room-concepts)>.maker-step{display:none}
 .room-concepts{margin:0 0 16px}.room-concepts legend{line-height:1.4}.room-concept-grid{padding:8px 0;gap:8px}
 .room-concept-grid button{display:flex;flex-direction:column;justify-content:flex-start}.room-concept-grid button img{height:80px;flex-shrink:0}.room-concept-grid button>span{font-size:13px;line-height:18px;padding:6px 2px;min-height:48px;word-break:keep-all;overflow-wrap:anywhere}
 .studio-commit{bottom:calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));padding:8px 0;margin:8px 0 0}.studio-commit .button{min-height:48px;line-height:1.4;font-size:16px}
 .studio-material-list{margin-top:16px;gap:12px}.studio-material b{line-height:1.4;margin:4px 0}.studio-material em{line-height:1.5}.maker-step{font-size:14px;line-height:1.5;word-break:keep-all}.studio-details summary{line-height:1.5;min-height:44px}.make-kinds{margin:16px 0}
 .fabric-note h2{font-size:21px;line-height:1.4}.fabric-note p{font-size:16px;line-height:1.65}
}
@media(max-width:360px){
 .topbar .header-controls{gap:2px}.header-controls .story-launch{flex-basis:60px;min-width:60px;font-size:12px;padding:4px}.header-controls .save-button{min-width:48px}.header-controls .avatar-button{width:44px!important;min-width:44px}
 .header-controls .music-button{width:44px;white-space:normal;font-size:12px;padding:4px}.header-controls .music-menu,.header-controls .help-button{min-width:40px}
 .guided-quest .quest-next{font-size:15px}.guided-quest .action-row{flex-wrap:wrap}.guided-quest .action-row>.text-link{font-size:13px;min-height:44px}
 .mobile-showroom-controls button{padding:8px 5px;font-size:13px;gap:3px}.mobile-showroom-controls button>span{min-width:14px}
 .question-card{padding:12px}.question-card h1{font-size:20px}.question-share-row{right:12px}.question-coach{padding:8px 10px}.answer{padding:10px;gap:10px}.studio-tabs button{font-size:13px;padding:8px 4px}
}
@media(max-width:760px) and (max-height:720px){
 :root{--studio-preview-height:112px}.miniroom-heading>span:last-child{display:none}.miniroom-actions button{min-height:36px;padding:6px 0}.showroom-layout .scene{aspect-ratio:1.5}
}
/* On short phones the preview scrolls away so options retain their full size. */
@media(max-width:760px) and (max-height:620px){
 .launcher-mode .main-content{padding-top:8px}
 .miniroom-card{position:relative;top:auto}.studio-tabs{top:var(--header-height)}#studio-panel{scroll-margin-top:calc(var(--header-height) + 64px)}
 .room-concept-grid button img{height:64px}.room-concept-grid button>span{min-height:40px;padding:2px;line-height:18px}
}
@media(min-width:761px) and (max-width:1024px) and (max-height:500px){
 :root{--bottom-nav-height:56px}
 .topbar{height:64px;min-height:64px;padding:8px 16px;grid-template-columns:minmax(120px,1fr) auto auto;gap:12px}.topbar .edition{display:none}.topbar .brand{max-width:220px}.header-controls{gap:8px}
 .header-controls .avatar-button{height:48px!important;padding:0!important;min-width:44px}.header-controls .avatar-button .avatar-sprite,.header-controls .avatar-button .avatar-sprite canvas{width:30px!important;height:30px!important}
 .workspace{display:block}.sidebar{position:fixed;inset:auto 0 0;z-index:15;padding:0 8px env(safe-area-inset-bottom);border:0;border-top:1px solid var(--ink);background:var(--paper)}
 .sidebar>:not(.main-nav){display:none}.main-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0}.nav-item{min-height:56px;height:56px;padding:8px!important;justify-content:center;gap:8px;white-space:nowrap}.nav-item small,.nav-number,.nav-label-long{display:none}.nav-label-short{display:inline}.nav-item>span:nth-child(2){font-size:14px!important;line-height:1.4}
 .main-content,.launcher-mode .main-content{padding:16px 20px 24px}.app-shell:not(.launcher-mode) .main-content{padding-bottom:calc(var(--bottom-nav-height) + 24px + env(safe-area-inset-bottom))}
 #view-studio>.section-top{display:none}.studio-layout{grid-template-columns:220px minmax(0,1fr);gap:16px}.miniroom-card{position:sticky;top:calc(var(--header-height) + 12px);max-width:none;width:100%;margin:0}
 #miniroom-canvas{width:100%;height:160px;object-fit:contain}.miniroom-heading{padding:8px 12px}.miniroom-heading .pixel{font-size:13px;line-height:1.3}.miniroom-heading>span:last-child,.miniroom-message,.miniroom-card>.studio-render-status,.miniroom-actions [data-action="studio-save"]{display:none}
 .miniroom-actions button{min-height:44px;padding:8px 4px;font-size:13px;line-height:1.4}.studio-workshop{border:0;background:var(--paper)}.studio-tabs{position:sticky;top:var(--header-height);z-index:12;background:var(--paper)}.studio-tabs button{min-height:44px;line-height:1.4}
 .main-content:has(#view-studio:not([hidden])){padding-top:8px}
 #studio-panel{padding:8px 0;scroll-margin-top:calc(var(--header-height) + 56px)}#studio-panel:has(.room-concepts)>.maker-step{display:none}
 .room-concepts{margin:0 0 16px}.room-concepts legend{font-size:16px;line-height:1.4}.room-concepts>p{display:none}.room-concept-grid{display:flex;gap:8px;overflow-x:auto;padding:8px 0}.room-concept-grid button{flex:0 0 120px;display:flex;flex-direction:column;justify-content:flex-start}.room-concept-grid button img{width:104px;height:52px;object-fit:cover}.room-concept-grid button>span{display:block;min-height:40px;padding:2px;font-size:13px;line-height:18px;word-break:keep-all;overflow-wrap:anywhere}
 .studio-commit{bottom:calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));padding:8px 0}.studio-layout.is-material-detail{display:block}.studio-layout.is-material-detail .miniroom-card{display:none}
}
